Add publish map on editor.
This commit is contained in:
@@ -56,6 +56,10 @@ public class ExtensionsController {
|
||||
return new ModelAndView("termsOfUse");
|
||||
}
|
||||
|
||||
@RequestMapping(value = "faq")
|
||||
public ModelAndView faq() {
|
||||
return new ModelAndView("faq");
|
||||
}
|
||||
|
||||
public static final int TRY_EXAMPLE_MINDMAP_ID = 3;
|
||||
public static final String MAP_XML_PARAM = "mapXml";
|
||||
|
@@ -27,13 +27,13 @@ public class MindmapController {
|
||||
@Autowired
|
||||
private MindmapService mindmapService;
|
||||
|
||||
@RequestMapping(value = "map/{id}/export")
|
||||
@RequestMapping(value = "maps/{id}/export")
|
||||
public ModelAndView export(@PathVariable int id) throws IOException {
|
||||
final MindMapBean modelObject = findMindmapBean(id);
|
||||
return new ModelAndView("mindmapExport", "mindmap", modelObject);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "map/{id}/details")
|
||||
@RequestMapping(value = "maps/{id}/details")
|
||||
public ModelAndView showDetails(@PathVariable int id) {
|
||||
final MindMapBean modelObject = findMindmapBean(id);
|
||||
final ModelAndView view = new ModelAndView("mindmapDetail", "wisemapDetail", modelObject);
|
||||
@@ -41,23 +41,25 @@ public class MindmapController {
|
||||
return view;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "map/{id}/print")
|
||||
@RequestMapping(value = "maps/{id}/print")
|
||||
public ModelAndView showPrintPage(@PathVariable int id) {
|
||||
final MindMap mindmap = findMindmap(id);
|
||||
final ModelAndView view = new ModelAndView("mindmapPrint", "mindmap", mindmap);
|
||||
view.addObject("user", Utils.getUser());
|
||||
return view;
|
||||
return new ModelAndView("mindmapPrint", "mindmap", mindmap);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "map/{id}/publish")
|
||||
@RequestMapping(value = "maps/{id}/publish")
|
||||
public ModelAndView showPublishPage(@PathVariable int id) {
|
||||
final MindMap mindmap = findMindmap(id);
|
||||
final ModelAndView view = new ModelAndView("mindmapPublish", "mindmap", mindmap);
|
||||
view.addObject("user", Utils.getUser());
|
||||
return view;
|
||||
return new ModelAndView("mindmapPublish", "mindmap", mindmap);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "map/{id}/edit")
|
||||
@RequestMapping(value = "maps/{id}/publishf")
|
||||
public ModelAndView showPublishPageFull(@PathVariable int id) {
|
||||
final MindMap mindmap = findMindmap(id);
|
||||
return new ModelAndView("mindmapPublishFull", "mindmap", mindmap);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "maps/{id}/edit")
|
||||
public ModelAndView editMap(@PathVariable int id, @NotNull HttpServletRequest request) {
|
||||
ModelAndView view;
|
||||
final UserAgent userAgent = UserAgent.create(request);
|
||||
|
@@ -22,6 +22,7 @@ import com.wisemapping.service.MindmapService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
@Controller
|
||||
@@ -30,10 +31,6 @@ public class PublicPagesController {
|
||||
@Autowired
|
||||
private MindmapService mindmapService;
|
||||
|
||||
@RequestMapping(value = "faq")
|
||||
public ModelAndView faq() {
|
||||
return new ModelAndView("faq");
|
||||
}
|
||||
|
||||
@RequestMapping(value = "aboutUs")
|
||||
public ModelAndView aboutUs() {
|
||||
@@ -59,4 +56,10 @@ public class PublicPagesController {
|
||||
public ModelAndView home() {
|
||||
return new ModelAndView("homepage");
|
||||
}
|
||||
|
||||
@RequestMapping(value = "iframeWrapper")
|
||||
public ModelAndView showIframe(@RequestParam(required = true) String url) {
|
||||
return new ModelAndView("iframeWrapper", "url", url);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -22,7 +22,13 @@
|
||||
<put name="body" value="/jsp/error.jsp" type="page"/>
|
||||
</definition>
|
||||
|
||||
<definition name="formDialogTemplate" page="/jsp/formDialogTemplate.jsp">
|
||||
<definition name="dialogTemplate" page="/jsp/dialogTemplate.jsp">
|
||||
<put name="title" value="title" type="string"/>
|
||||
<put name="details" value="details" type="string"/>
|
||||
<put name="body" value="/jsp/error.jsp" type="page"/>
|
||||
</definition>
|
||||
|
||||
<definition name="dialogFullTemplate" page="/jsp/dialogFullTemplate.jsp">
|
||||
<put name="title" value="title" type="string"/>
|
||||
<put name="details" value="details" type="string"/>
|
||||
<put name="body" value="/jsp/error.jsp" type="page"/>
|
||||
@@ -32,6 +38,9 @@
|
||||
<put name="body" value="/jsp/errorTemplate.jsp" type="page"/>
|
||||
</definition>
|
||||
|
||||
<definition name="iframeWrapper" page="/jsp/iframeWrapper.jsp"/>
|
||||
|
||||
<!-- Error Pages -->
|
||||
<definition name="gcfPluginNeeded" extends="pageTemplate">
|
||||
<put name="body" value="/jsp/gcfPluginNeeded.jsp" type="page"/>
|
||||
<put name="title" value="INSTALL_CFG"/>
|
||||
@@ -42,7 +51,6 @@
|
||||
<put name="title" value="INSTALL_CFG"/>
|
||||
</definition>
|
||||
|
||||
<!-- Error Pages -->
|
||||
<definition name="unexpectedError" extends="errorTemplate">
|
||||
<put name="title" value="UNEXPECTED_ERROR"/>
|
||||
<put name="details" value="UNEXPECTED_ERROR_DETAILS"/>
|
||||
@@ -87,54 +95,60 @@
|
||||
|
||||
<!-- Dialog Forms -->
|
||||
|
||||
<definition name="mindmapDetail" extends="formDialogTemplate">
|
||||
<definition name="mindmapDetail" extends="dialogTemplate">
|
||||
<put name="title" value="MINDMAP_DETAIL"/>
|
||||
<put name="body" value="/jsp/mindmapDetail.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="setting" extends="formDialogTemplate">
|
||||
<definition name="setting" extends="dialogTemplate">
|
||||
<put name="title" value="SETTINGS"/>
|
||||
<put name="details" value="SETTINGS_MSG"/>
|
||||
<put name="body" value="/jsp/setting.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="editProfile" extends="formDialogTemplate">
|
||||
<definition name="editProfile" extends="dialogTemplate">
|
||||
<put name="title" value="EDIT_PROFILE"/>
|
||||
<put name="details" value="FIELD_REQUIRED_MSG"/>
|
||||
<put name="body" value="/jsp/editProfile.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="changePassword" extends="formDialogTemplate">
|
||||
<definition name="changePassword" extends="dialogTemplate">
|
||||
<put name="title" value="CHANGE_PASSWORD"/>
|
||||
<put name="details" value="FIELD_REQUIRED_MSG"/>
|
||||
<put name="body" value="/jsp/changePassword.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="mindmapTags" extends="formDialogTemplate">
|
||||
<definition name="mindmapTags" extends="dialogTemplate">
|
||||
<put name="title" value=""/>
|
||||
<put name="details" value=""/>
|
||||
<put name="body" value="/jsp/mindmapTags.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="mindmapExport" extends="formDialogTemplate">
|
||||
<definition name="mindmapExport" extends="dialogTemplate">
|
||||
<put name="title" value=""/>
|
||||
<put name="details" value=""/>
|
||||
<put name="body" value="/jsp/mindmapExport.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="mindmapPublish" extends="formDialogTemplate">
|
||||
<definition name="mindmapPublish" extends="dialogTemplate">
|
||||
<put name="title" value=""/>
|
||||
<put name="details" value=""/>
|
||||
<put name="body" value="/jsp/mindmapPublish.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="mindmapCollaborator" extends="formDialogTemplate">
|
||||
<definition name="mindmapPublishFull" extends="dialogFullTemplate">
|
||||
<put name="title" value=""/>
|
||||
<put name="details" value=""/>
|
||||
<put name="body" value="/jsp/mindmapPublish.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="mindmapCollaborator" extends="dialogTemplate">
|
||||
<put name="title" value=""/>
|
||||
<put name="details" value=""/>
|
||||
<put name="body" value="/jsp/mindmapCollaborator.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="keyboard" extends="formDialogTemplate">
|
||||
<definition name="keyboard" extends="dialogTemplate">
|
||||
<put name="title" value="KEYBOARD"/>
|
||||
<put name="details" value="KEYBOARD_MSG"/>
|
||||
<put name="body" value="/jsp/keyboard.jsp"/>
|
||||
@@ -156,7 +170,7 @@
|
||||
<put name="body" value="/jsp/activationAccountConfirmationFail.jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="mindmapHistory" extends="formDialogTemplate">
|
||||
<definition name="mindmapHistory" extends="dialogTemplate">
|
||||
<put name="title" value="HISTORY"/>
|
||||
<put name="details" value="HISTORY_INFO"/>
|
||||
<put name="body" value="/jsp/mindmapHistory.jsp"/>
|
||||
|
@@ -180,7 +180,7 @@
|
||||
</property>
|
||||
<property name="mappings">
|
||||
<props>
|
||||
<prop key="/c/map/import.htm">importMapController</prop>
|
||||
<prop key="/c/maps/import.htm">importMapController</prop>
|
||||
|
||||
<!-- Review -->
|
||||
<prop key="/c/publicView.htm">publicView</prop>
|
||||
|
23
wise-webapp/src/main/webapp/jsp/dialogFullTemplate.jsp
Normal file
23
wise-webapp/src/main/webapp/jsp/dialogFullTemplate.jsp
Normal file
@@ -0,0 +1,23 @@
|
||||
<%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles" %>
|
||||
<%@ include file="/jsp/init.jsp" %>
|
||||
|
||||
<tiles:importAttribute name="title" scope="page"/>
|
||||
<tiles:importAttribute name="details" scope="page"/>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<base href="${pageContext.request.contextPath}/"/>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css"/>
|
||||
<script type="text/javascript" language="javascript" src="js/jquery-1.7.2.min.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="bootstrap/js/bootstrap.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap-responsive.min.css"/>
|
||||
|
||||
|
||||
<body>
|
||||
<div style="padding-top:20px">
|
||||
<tiles:insert name="body"/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -5,7 +5,7 @@
|
||||
<tiles:importAttribute name="title" scope="page"/>
|
||||
<tiles:importAttribute name="details" scope="page"/>
|
||||
|
||||
<div class="modalDialog">
|
||||
<div>
|
||||
<!-- Header can be customized -->
|
||||
<tiles:insert name="body"/>
|
||||
</div>
|
@@ -28,7 +28,9 @@
|
||||
var editorProperties = {zoom:${zoom},saveOnLoad:true,collab:'standalone',readOnly:true};
|
||||
designer = buildDesigner(editorProperties);
|
||||
|
||||
var domDocument = core.Utils.createDocumentFromText(mapXml);
|
||||
var parser = new DOMParser();
|
||||
var domDocument = parser.parseFromString(mapXml, "text/xml");
|
||||
|
||||
var serializer = mindplot.persistence.XMLSerializerFactory.getSerializerFromDocument(domDocument);
|
||||
var mindmap = serializer.loadFromDom(domDocument, mapId);
|
||||
|
||||
|
27
wise-webapp/src/main/webapp/jsp/iframeWrapper.jsp
Normal file
27
wise-webapp/src/main/webapp/jsp/iframeWrapper.jsp
Normal file
@@ -0,0 +1,27 @@
|
||||
<%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles" %>
|
||||
<%@ include file="/jsp/init.jsp" %>
|
||||
|
||||
<div>
|
||||
<iframe src='${url}' style="border: 0;width: 100%;height:100%" id="dialogContentIframe"></iframe>
|
||||
<div style="float: right;margin-right: 25px">
|
||||
<input type="button" class="btn-primary" value="Accept" id="submitBtn"/>
|
||||
<input type="button" class="btn-secondary" value="Cancel" id="cancelBtn"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('submitBtn').addEvent('click', function() {
|
||||
var iframeWindow = $('dialogContentIframe').contentWindow;
|
||||
iframeWindow.submitDialogForm();
|
||||
|
||||
if (MooDialog.Request.active) {
|
||||
MooDialog.Request.active.close();
|
||||
}
|
||||
});
|
||||
|
||||
$('cancelBtn').addEvent('click', function() {
|
||||
if (MooDialog.Request.active) {
|
||||
MooDialog.Request.active.close();
|
||||
}
|
||||
});
|
||||
</script>
|
@@ -48,7 +48,9 @@
|
||||
var designer = buildDesigner(options);
|
||||
|
||||
// Load map from XML ...
|
||||
var domDocument = core.Utils.createDocumentFromText(mapXml);
|
||||
var parser = new DOMParser();
|
||||
var domDocument = parser.parseFromString(mapXml, "text/xml");
|
||||
|
||||
var persistence = mindplot.PersistenceManager.getInstance();
|
||||
var mindmap = persistence.loadFromDom(mapId, domDocument);
|
||||
designer.loadMap(mindmap);
|
||||
|
@@ -49,7 +49,7 @@
|
||||
bUseRendered : false,
|
||||
mDataProp: "title",
|
||||
fnRender : function(obj) {
|
||||
return '<a href="c/map/' + obj.aData.id + '/edit.htm">' + obj.aData.title + '</a>';
|
||||
return '<a href="c/maps/' + obj.aData.id + '/edit.htm">' + obj.aData.title + '</a>';
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -110,13 +110,13 @@
|
||||
$("#newBtn").click(
|
||||
function() {
|
||||
$("#new-dialog-modal").dialogForm({
|
||||
redirect: "c/map/{header.resourceId}/edit.htm",
|
||||
redirect: "c/maps/{header.resourceId}/edit.htm",
|
||||
url : "../service/maps"
|
||||
});
|
||||
});
|
||||
|
||||
$("#importBtn").click(function() {
|
||||
window.open('c/map/import.htm');
|
||||
window.open('c/maps/import.htm');
|
||||
});
|
||||
|
||||
$("#duplicateBtn").click(function() {
|
||||
@@ -134,7 +134,7 @@
|
||||
|
||||
// Initialize dialog ...
|
||||
$("#duplicate-dialog-modal").dialogForm({
|
||||
redirect: "c/map/{header.resourceId}/edit.htm",
|
||||
redirect: "c/maps/{header.resourceId}/edit.htm",
|
||||
url : "../service/maps/" + mapId
|
||||
});
|
||||
}
|
||||
@@ -194,14 +194,14 @@
|
||||
$("#printBtn").click(function() {
|
||||
var mapIds = $('#mindmapListTable').dataTableExt.getSelectedMapsIds();
|
||||
if (mapIds.length > 0) {
|
||||
window.open('c/map/' + mapIds[0] + '/print.htm');
|
||||
window.open('c/maps/' + mapIds[0] + '/print.htm');
|
||||
}
|
||||
});
|
||||
|
||||
$("#infoBtn").click(function() {
|
||||
var mapIds = $('#mindmapListTable').dataTableExt.getSelectedMapsIds();
|
||||
if (mapIds.length > 0) {
|
||||
$('#info-dialog-modal .modal-body').load("c/map/" + mapIds[0] + "/details.htm", function() {
|
||||
$('#info-dialog-modal .modal-body').load("c/maps/" + mapIds[0] + "/details.htm", function() {
|
||||
$('#info-dialog-modal').modal();
|
||||
});
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
$("#publishBtn").click(function() {
|
||||
var mapIds = $('#mindmapListTable').dataTableExt.getSelectedMapsIds();
|
||||
if (mapIds.length > 0) {
|
||||
$('#publish-dialog-modal .modal-body').load("c/map/" + mapIds[0] + "/publish.htm",
|
||||
$('#publish-dialog-modal .modal-body').load("c/maps/" + mapIds[0] + "/publish.htm",
|
||||
function() {
|
||||
$('#publish-dialog-modal .btn-accept').click(function() {
|
||||
$('#publish-dialog-modal #publishForm').submit();
|
||||
@@ -309,10 +309,12 @@
|
||||
Duplicate</a></li>
|
||||
<li id="renameBtn"><a href="#" onclick="return false"><i class="icon-edit"></i> Rename</a></li>
|
||||
<li id="printBtn"><a href="#" onclick="return false"><i class="icon-print"></i> Print</a></li>
|
||||
<li id="publishBtn"><a href="#" onclick="return false"><i class="icon-globe"></i>Publish</a></li>
|
||||
<li id="publishBtn"><a href="#" onclick="return false"><i class="icon-globe"></i>Publish</a>
|
||||
</li>
|
||||
<li id="shareBtn"><a href="#" onclick="return false"><i class="icon-share"></i> Share</a></li>
|
||||
<li id="tagBtn"><a href="#" onclick="return false"><i class="icon-tags"></i> Tag</a></li>
|
||||
<li id="historyBtn"><a href="#" onclick="return false"><i class="icon-time"></i> History</a></li>
|
||||
<li id="historyBtn"><a href="#" onclick="return false"><i class="icon-time"></i> History</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -470,5 +472,6 @@
|
||||
<button class="btn btn-cancel" data-dismiss="modal">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -87,7 +87,9 @@
|
||||
var designer = buildDesigner(options);
|
||||
|
||||
// Load map from XML ...
|
||||
var domDocument = core.Utils.createDocumentFromText(mapXml);
|
||||
var parser = new DOMParser();
|
||||
var domDocument = parser.parseFromString(mapXml, "text/xml");
|
||||
|
||||
var persistence = mindplot.PersistenceManager.getInstance();
|
||||
var mindmap = persistence.loadFromDom(mapId, domDocument);
|
||||
designer.loadMap(mindmap);
|
||||
|
@@ -1,22 +1,24 @@
|
||||
<%@ include file="/jsp/init.jsp" %>
|
||||
<style type="text/css">
|
||||
#wizardContainer input {
|
||||
width: 50px;
|
||||
height: 25px;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<form method="post" id="publishForm" action="#" class="form-horizontal">
|
||||
<fieldset>
|
||||
<div class="control-group">
|
||||
<label for="enablePublicView" class="control-label">Enable Sharing:
|
||||
<input type="checkbox" id="enablePublicView" name="publicView" class="control"
|
||||
<c:if test="${mindmap.public}">
|
||||
checked="checked"
|
||||
</c:if>/>
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
<form method="post" id="dialogMainForm" action="#" class="well form-inline">
|
||||
<label for="enablePublicView" class="control-label">Enable Sharing:
|
||||
<input type="checkbox" id="enablePublicView" name="publicView"
|
||||
<c:if test="${mindmap.public}">
|
||||
checked="checked"
|
||||
</c:if> />
|
||||
</label>
|
||||
</form>
|
||||
|
||||
<p><span class="label label-important">Warning</span> <spring:message code="PUBLISH_DETAILS"/></p>
|
||||
|
||||
<div id="sharingPanel">
|
||||
<div id="publishPanel">
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#embedTab" data-toggle="pill">Embed</a></li>
|
||||
@@ -25,23 +27,22 @@
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade active in" id="embedTab">
|
||||
|
||||
<spring:message code="BLOG_INCLUSION"/>
|
||||
|
||||
<form class="form-inline" action="#" style="text-align: center">
|
||||
<fieldset>
|
||||
|
||||
<div id="wizardContainer">
|
||||
<form class="form-inline" action="#">
|
||||
<label for="frameWith">Frame width:</label>
|
||||
<input type="number" id="frameWith" name="frameWith" value="600" class="span1" min="0"/>
|
||||
<input type="number" id="frameWith" name="frameWith" value="600" class="span2"
|
||||
min="0"/>
|
||||
|
||||
<label for="frameHeight" class="control-label">Frame height:</label>
|
||||
<input type="number" id="frameHeight" name="frameHeight" value="400" class="span1" min="0"/>
|
||||
<label for="frameHeight">Frame height:</label>
|
||||
<input type="number" id="frameHeight" name="frameHeight" value="400" class="span2" min="0"/>
|
||||
|
||||
<label for="mapZoom">Zoom %:</label>
|
||||
<input type="number" id="mapZoom" name="mapZoom" value="80" class="span1" min="10"
|
||||
max="200" step="10"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<input type="number" id="mapZoom"
|
||||
name="mapZoom" value="80"
|
||||
class="span2" min="10" max="200" step="10"/>
|
||||
</form>
|
||||
</div>
|
||||
<label><spring:message code="BLOG_SNIPPET"/></label>
|
||||
<pre id="embedCode"><iframe style="width:600px;height:400px;border: 1px
|
||||
solid black" src="http://www.wisemapping.com/c/embeddedView.htm?mapId=${mindmap.id}&zoom=1"> </iframe></pre>
|
||||
@@ -58,9 +59,9 @@ solid black" src="http://www.wisemapping.com/c/embeddedView.htm?mapId=${mindmap.
|
||||
|
||||
<script type="text/javascript">
|
||||
// Update tabs display status ...
|
||||
var checkboxElems = $('#publishForm input:checkbox');
|
||||
var checkboxElems = $('#dialogMainForm input:checkbox');
|
||||
var updateTabsDisplay = function() {
|
||||
var divElem = $('#sharingPanel');
|
||||
var divElem = $('#publishPanel');
|
||||
checkboxElems[0].checked ? divElem.show() : divElem.hide();
|
||||
};
|
||||
checkboxElems.change(updateTabsDisplay);
|
||||
@@ -68,7 +69,7 @@ solid black" src="http://www.wisemapping.com/c/embeddedView.htm?mapId=${mindmap.
|
||||
|
||||
// Change snippet code based on the user options ...
|
||||
var replaceCode = function(regExpr, strReplace, factor) {
|
||||
var preElem = $('#sharingPanel #embedCode')[0];
|
||||
var preElem = $('#publishPanel #embedCode')[0];
|
||||
var fieldValue = this.value;
|
||||
if (!isNaN(fieldValue) && fieldValue.length > 0) {
|
||||
var textVal = $(preElem).text().replace(regExpr, strReplace.replace('%s', fieldValue * factor));
|
||||
@@ -76,37 +77,37 @@ solid black" src="http://www.wisemapping.com/c/embeddedView.htm?mapId=${mindmap.
|
||||
}
|
||||
};
|
||||
|
||||
$('#sharingPanel #frameWith').keyup(function() {
|
||||
$('#publishPanel #frameWith').keyup(function() {
|
||||
replaceCode.bind(this)(/width:[0-9]+px/g, "width:%spx", 1);
|
||||
});
|
||||
|
||||
$('#sharingPanel #frameWith').change(function() {
|
||||
$('#publishPanel #frameWith').change(function() {
|
||||
replaceCode.bind(this)(/width:[0-9]+px/g, "width:%spx", 1);
|
||||
});
|
||||
|
||||
$('#sharingPanel #frameHeight').keyup(function() {
|
||||
$('#publishPanel #frameHeight').keyup(function() {
|
||||
replaceCode.bind(this)(/height:[0-9]+px/g, "height:%spx", 1);
|
||||
});
|
||||
|
||||
$('#sharingPanel #frameHeight').change(function() {
|
||||
$('#publishPanel #frameHeight').change(function() {
|
||||
replaceCode.bind(this)(/height:[0-9]+px/g, "height:%spx", 1);
|
||||
});
|
||||
|
||||
$('#sharingPanel #mapZoom').keyup(function() {
|
||||
$('#publishPanel #mapZoom').keyup(function() {
|
||||
replaceCode.bind(this)(/zoom=.+\"/g, "zoom=%s\"", 0.1);
|
||||
});
|
||||
|
||||
$('#sharingPanel #mapZoom').change(function() {
|
||||
$('#publishPanel #mapZoom').change(function() {
|
||||
replaceCode.bind(this)(/zoom=.+\"/g, "zoom=%s\"", 0.01);
|
||||
});
|
||||
|
||||
|
||||
// Save status on click ...
|
||||
$('#publishForm').submit(function(event) {
|
||||
$('#dialogMainForm').submit(function(event) {
|
||||
jQuery.ajax("service/maps/${mindmap.id}/publish", {
|
||||
async:false,
|
||||
dataType: 'json',
|
||||
data: $('#publishForm #enablePublicView')[0].checked ? 'true' : 'false',
|
||||
data: $('#dialogMainForm #enablePublicView')[0].checked ? 'true' : 'false',
|
||||
type: 'PUT',
|
||||
contentType:"text/plain",
|
||||
success : function(data, textStatus, jqXHR) {
|
||||
@@ -119,5 +120,9 @@ solid black" src="http://www.wisemapping.com/c/embeddedView.htm?mapId=${mindmap.
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
// Hook for interaction with the main parent window ...
|
||||
var submitDialogForm = function() {
|
||||
$('#dialogMainForm').submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user