From 65db1acf6a2db3391fa69a1e6f64dff0c45fff53 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sat, 16 Jun 2012 12:12:53 -0300 Subject: [PATCH] - Integrate to editor menu --- mindplot/src/main/javascript/widget/Menu.js | 12 ++++++------ wise-editor/src/main/webapp/css/editor.less | 8 ++++++++ wise-webapp/src/main/webapp/js/mymaps.js | 7 +------ wise-webapp/src/main/webapp/jsp/mindmapShare.jsp | 9 +++++---- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/mindplot/src/main/javascript/widget/Menu.js b/mindplot/src/main/javascript/widget/Menu.js index bc557203..36ff2c79 100644 --- a/mindplot/src/main/javascript/widget/Menu.js +++ b/mindplot/src/main/javascript/widget/Menu.js @@ -315,7 +315,7 @@ mindplot.widget.Menu = new Class({ var tagElem = $('tagIt'); if (tagElem) { this._addButton('tagIt', false, false, function() { - var reqDialog = new MooDialog.Request('c/tags.htm?mapId=' + mapId, null, + var reqDialog = new MooDialog.Request('c/tags?mapId=' + mapId, null, {'class': 'modalDialog tagItModalDialog', closeButton:true, destroyOnClose:true, @@ -333,11 +333,11 @@ mindplot.widget.Menu = new Class({ var shareElem = $('shareIt'); if (shareElem) { this._addButton('shareIt', false, false, function() { - var reqDialog = new MooDialog.Request('c/iframeWrapper.htm?url=c/maps/' + mapId + "/publishf", null, - {'class': 'modalDialog shareItModalDialog', + var reqDialog = new MooDialog.Request('c/iframeWrapper?url=c/maps/' + mapId + "/sharef", null, + {'class': 'modalDialog shareModalDialog', closeButton:true, destroyOnClose:true, - title:'Share It' + title:'Share' }); reqDialog.setRequestOptions({ onRequest: function() { @@ -353,7 +353,7 @@ mindplot.widget.Menu = new Class({ var publishElem = $('publishIt'); if (publishElem) { this._addButton('publishIt', false, false, function() { - var reqDialog = new MooDialog.Request('c/iframeWrapper.htm?url=c/maps/' + mapId + "/publishf", null, + var reqDialog = new MooDialog.Request('c/iframeWrapper?url=c/maps/' + mapId + "/publishf", null, {'class': 'modalDialog publishModalDialog', closeButton:true, destroyOnClose:true, @@ -374,7 +374,7 @@ mindplot.widget.Menu = new Class({ if (historyElem) { this._addButton('history', false, false, function() { - var reqDialog = new MooDialog.Request('c/history.htm?action=list&goToMindmapList&mapId=' + mapId, null, + var reqDialog = new MooDialog.Request('c/history?action=list&goToMindmapList&mapId=' + mapId, null, {'class': 'modalDialog historyModalDialog', closeButton:true, destroyOnClose:true, diff --git a/wise-editor/src/main/webapp/css/editor.less b/wise-editor/src/main/webapp/css/editor.less index b59f0a7a..e699e392 100644 --- a/wise-editor/src/main/webapp/css/editor.less +++ b/wise-editor/src/main/webapp/css/editor.less @@ -189,5 +189,13 @@ div.modalDialog .title height:400px; } +.shareModalDialog .content { + height:440px; +} + +div.shareModalDialog { + width: 550px; +} + diff --git a/wise-webapp/src/main/webapp/js/mymaps.js b/wise-webapp/src/main/webapp/js/mymaps.js index 50bdf800..2fb04cc3 100644 --- a/wise-webapp/src/main/webapp/js/mymaps.js +++ b/wise-webapp/src/main/webapp/js/mymaps.js @@ -456,7 +456,7 @@ $(function() { var mapId = mapIds[0]; $('#' + dialogElemId + ' .modal-body').load(urlTemplate.replace("{mapId}", mapId), function() { - $('#' + dialogElemId + ' .btn-accept').click(function() { + $('#' + dialogElemId + ' .btn-accept').unbind('click').click(function() { submitDialogForm(); }); $('#' + dialogElemId).modal(); @@ -464,11 +464,6 @@ $(function() { } }; - - $("#actionButtons .shareMap").click(function() { - }); - - $('#foldersContainer li').click(function(event) { // Deselect previous option ... $('#foldersContainer li').removeClass('active'); diff --git a/wise-webapp/src/main/webapp/jsp/mindmapShare.jsp b/wise-webapp/src/main/webapp/jsp/mindmapShare.jsp index 471e5aa5..cd0f5cf5 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapShare.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapShare.jsp @@ -56,7 +56,7 @@

Add People:

+ placeholder="Enter collaborators emails separared by comas." class="span1"/>
Can edit @@ -101,14 +101,14 @@ function onClickShare(aElem) { return role; } -function addCollaboration(email, role) { +function addCollaboration(email, role, changeType) { var rowStr; var tableElem = $("#collabsTable"); if (role != "owner") { // Add row to the table ... var rowTemplate = '\ \ - {email}\ + {email}{typeIcon}\ \
\ \ @@ -123,6 +123,7 @@ function addCollaboration(email, role) { rowStr = rowTemplate.replace(/{email}/g, email); rowStr = rowStr.replace(/{role}/g, role); + rowStr = rowStr.replace(/{typeIcon}/g, changeType ? ' ' + changeType + '' : ""); var elem = tableElem.append(rowStr); // Register change role event ... @@ -228,7 +229,7 @@ $("#addBtn").click(function(event) { $("#collabEmails").val(""); for (i = 0; i < emails.length; i++) { email = emails[i]; - addCollaboration(email, role); + addCollaboration(email, role, 'New'); } } else {