From 0133f127b8e278f9b1dcf6a0d05294e72beb1383 Mon Sep 17 00:00:00 2001 From: Paulo Veiga Date: Sun, 16 Oct 2011 21:42:02 -0300 Subject: [PATCH] Fix embedded view. --- mindplot/src/main/javascript/IconGroup.js | 2 +- .../libraries/moodialog/MooDialog.Request.js | 8 +- mindplot/src/main/javascript/widget/Menu.js | 21 ++- wise-doc/src/main/webapp/c/export.bin | Bin 0 -> 658 bytes wise-doc/src/main/webapp/c/export.htm | 100 +++++++++++++ wise-doc/src/main/webapp/c/publish.htm | 98 +++++++++++++ wise-doc/src/main/webapp/css/editor2.css | 23 ++- wise-doc/src/main/webapp/css/embedded.css | 133 ++++++++++++++++++ wise-doc/src/main/webapp/html/editor.html | 3 - wise-doc/src/main/webapp/html/embeddde.html | 4 - wise-doc/src/main/webapp/html/embedded.htm | 111 +++++++++++++++ wise-doc/src/main/webapp/js/editor.js | 14 +- .../wisemapping/exporter/ExporterFactory.java | 4 +- wise-webapp/src/main/webapp/css/common.css | 8 +- wise-webapp/src/main/webapp/css/editor2.css | 19 ++- wise-webapp/src/main/webapp/css/embedded.css | 20 ++- .../src/main/webapp/html/embedded.html | 4 + wise-webapp/src/main/webapp/js/editor.js | 5 +- wise-webapp/src/main/webapp/js/embedded.js | 73 ---------- .../src/main/webapp/jsp/embeddedView.jsp | 79 ++++++++--- .../main/webapp/jsp/mindmapCollaborator.jsp | 63 +++++---- .../src/main/webapp/jsp/mindmapEditor.jsp | 9 +- .../src/main/webapp/jsp/mindmapExport.jsp | 112 +++++++-------- .../src/main/webapp/jsp/mindmapPublish.jsp | 27 ++-- .../src/main/webapp/jsp/mindmapTags.jsp | 8 +- .../nicons/{discart.png => discard.png} | Bin 26 files changed, 713 insertions(+), 235 deletions(-) create mode 100644 wise-doc/src/main/webapp/c/export.bin create mode 100644 wise-doc/src/main/webapp/c/export.htm create mode 100644 wise-doc/src/main/webapp/c/publish.htm create mode 100644 wise-doc/src/main/webapp/css/embedded.css delete mode 100644 wise-doc/src/main/webapp/html/embeddde.html create mode 100644 wise-doc/src/main/webapp/html/embedded.htm create mode 100644 wise-webapp/src/main/webapp/html/embedded.html delete mode 100644 wise-webapp/src/main/webapp/js/embedded.js rename wise-webapp/src/main/webapp/nicons/{discart.png => discard.png} (100%) diff --git a/mindplot/src/main/javascript/IconGroup.js b/mindplot/src/main/javascript/IconGroup.js index 3cae7278..9ac2e055 100644 --- a/mindplot/src/main/javascript/IconGroup.js +++ b/mindplot/src/main/javascript/IconGroup.js @@ -99,7 +99,7 @@ mindplot.IconGroup = new Class({ removeIconByUrl : function(url) { var icon = this._findIconFromUrl(url); - $assert(icon,'icon could not be found'); + $assert(icon, 'icon could not be found'); this._removeIcon(icon); }, diff --git a/mindplot/src/main/javascript/libraries/moodialog/MooDialog.Request.js b/mindplot/src/main/javascript/libraries/moodialog/MooDialog.Request.js index a0c828c0..101fa6e1 100644 --- a/mindplot/src/main/javascript/libraries/moodialog/MooDialog.Request.js +++ b/mindplot/src/main/javascript/libraries/moodialog/MooDialog.Request.js @@ -17,11 +17,11 @@ MooDialog.Request = new Class({ this.parent(options); this.requestOptions = requestOptions || {method:'get'}; this.requestOptions.url = url; + this.requestOptions.update = this.content; + this.requestOptions.evalScripts = true; this.addEvent('open', function() { - - var request = new Request.HTML(this.requestOptions).addEvent('success', function(text) { - this.setContent(text); - }.bind(this)).send(); + var request = new Request.HTML(this.requestOptions).send(); + MooDialog.Request.active = this; }.bind(this)); if (this.options.autoOpen) this.open(); diff --git a/mindplot/src/main/javascript/widget/Menu.js b/mindplot/src/main/javascript/widget/Menu.js index 64745ac7..09ca9c14 100644 --- a/mindplot/src/main/javascript/widget/Menu.js +++ b/mindplot/src/main/javascript/widget/Menu.js @@ -181,7 +181,7 @@ mindplot.widget.Menu = new Class({ this.addButton('export', false, false, function() { var reqDialog = new MooDialog.Request('../c/export.htm?mapId=' + mapId, null, - {'class': 'historyModalDialog', + {'class': 'exportItModalDialog', closeButton:true, destroyOnClose:true, title:'Export' @@ -191,6 +191,7 @@ mindplot.widget.Menu = new Class({ reqDialog.setContent('loading...'); } }); + MooDialog.Request.active = reqDialog; }); this.addButton('print', false, false, function() { @@ -251,9 +252,9 @@ mindplot.widget.Menu = new Class({ }); } - var discartElem = $('discart'); + var discartElem = $('discard'); if (discartElem) { - this.addButton('tagIt', false, false, function() { + this.addButton('discard', false, false, function() { if (!readOnly) { displayLoading(); @@ -302,8 +303,22 @@ mindplot.widget.Menu = new Class({ var publishElem = $('publishIt'); if (publishElem) { + this.addButton('publishIt', false, false, function() { + var reqDialog = new MooDialog.Request('../c/publish.htm?mapId=' + mapId, null, + {'class': 'publishModalDialog', + closeButton:true, + destroyOnClose:true, + title:'Publish' + }); + reqDialog.setRequestOptions({ + onRequest: function() { + reqDialog.setContent('loading...'); + } + }); + }); } + var historyElem = $('history'); if (historyElem) { diff --git a/wise-doc/src/main/webapp/c/export.bin b/wise-doc/src/main/webapp/c/export.bin new file mode 100644 index 0000000000000000000000000000000000000000..efa4f251a4939168342b9f844070b7ad90bad249 GIT binary patch literal 658 zcmZ?wbhEHbEMkyiIKsg2UqImhhY$ZRT=@Us!G8mT{|O2I6%_t2Snxj};QxdP|2J&- zUr_MBq2a%S!~X*Z{sYzj2NEOz#h)x-)jA*&WG4gbe+8Akl+1Ym7kTJ zZ^g|-nIw3SRCg&3x0_a2x(OCZSGfauB+)-DZx{~FZJKfA(eHywV+od|$!UF1cFWXiU4WOXyC`dbenc$K0oMi< zfhoORlO}v~cy~!ZNMmv2H`O->4rwGYSuB{wy2&fyoTpmht@j;HuV#GBy;2p(xU74H zqUjU~{qB`W?7p1;{N&l`++HjP2)iWi&(~kMh>+V5BQsS%w9Zb Q7I4#e*doFu!Ngz<0O^(iFaQ7m literal 0 HcmV?d00001 diff --git a/wise-doc/src/main/webapp/c/export.htm b/wise-doc/src/main/webapp/c/export.htm new file mode 100644 index 00000000..b7466a47 --- /dev/null +++ b/wise-doc/src/main/webapp/c/export.htm @@ -0,0 +1,100 @@ +
+ + + +

+ Export + 'sss'

+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ + + Scalable Vector Graphics (SVG) + + +

+ Scalable Vector Graphics (SVG) is an XML markup language for describing two-dimensional + vector graphics. This format will enable you to print your maps without quality lost at any + resolution. +

+
+ + + Portable Document Format (PDF) + + +

+ Get your map as Portable Document Format(PDF) to share use in your presentations. +

+
+ + + Freemind (version 0.9.0) + + +

+ FreeMind is a nice desktop mind mapping application that has the great benefit of being + free. +

+
+ + + Image File + + +

+ Get a graphic representation of your map including all colors and shapes to reuse in + documents or for archiving +

+
+ + +
+
+
+ +
+ \ No newline at end of file diff --git a/wise-doc/src/main/webapp/c/publish.htm b/wise-doc/src/main/webapp/c/publish.htm new file mode 100644 index 00000000..4f975384 --- /dev/null +++ b/wise-doc/src/main/webapp/c/publish.htm @@ -0,0 +1,98 @@ +
+ + + +

+ Publish + 'ddd' +

+ +

+ By publishing the map you make it visible to everyone on the Internet. Copy the code snippets below to integrate + it into your website or blog. +

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+   + + + Publish map to the Internet +
+   + + +
+ URL: + + +
+ Direct Link: + + +
+   + +   +
+ For inclusion in blogs and web pages + : + + + +

* Note: You can change embedded map size modifying 'height' and 'width' style properties. You + can also adjust the zoom factor modifying 'zoom' parameter from the URL.

+
+ + +
+
+
+
\ No newline at end of file diff --git a/wise-doc/src/main/webapp/css/editor2.css b/wise-doc/src/main/webapp/css/editor2.css index f38af077..1b7b1976 100644 --- a/wise-doc/src/main/webapp/css/editor2.css +++ b/wise-doc/src/main/webapp/css/editor2.css @@ -704,7 +704,7 @@ div#small_error_icon { /** */ /* Modal dialogs definitions */ -.tagItModalDialog, .historyModalDialog, .shareItModalDialog { +.tagItModalDialog, .historyModalDialog, .shareItModalDialog, .exportModalDialog, .publishModalDialog { position: fixed; top: 50%; left: 50%; @@ -733,7 +733,11 @@ div#small_error_icon { width: 500px; } -.tagItModalDialog .title, .historyModalDialog .title, .shareItModalDialog .title { +.publishModalDialog { + width: 600px; +} + +.tagItModalDialog .title, .historyModalDialog .title, .shareItModalDialog .title, .exportModalDialog .title, .publishModalDialog .title { position: absolute; top: 0; left: 0; @@ -758,6 +762,14 @@ div#small_error_icon { height: 300px; } +.exportItModalDialog .content { + height: 280px; +} + +.publishModalDialog .content { + height: 330px; +} + .modalDialog h1 { font-size: 14px; } @@ -767,4 +779,9 @@ div#small_error_icon { margin: 5px; } - +td.formLabel { + text-align: right; + padding: 2px 10px; + font-weight: bolder; + vertical-align: top; +} \ No newline at end of file diff --git a/wise-doc/src/main/webapp/css/embedded.css b/wise-doc/src/main/webapp/css/embedded.css new file mode 100644 index 00000000..7f93c0a3 --- /dev/null +++ b/wise-doc/src/main/webapp/css/embedded.css @@ -0,0 +1,133 @@ +html { + overflow: hidden; +} + +#waitDialog { + position: absolute; + top: 10px; + left: 10px; + height: 100px; +} + +#firstHeader { + width: 100%; +} + +#subHeader { + position: absolute; + width: 100%; + height: 55px; + top: 30px; +} + +#loadingContainer { + position: relative; + top: 80px; + height: 120px; /*background: whitesmoke;*/ + background: #FEFEFE; + opacity: .99; + padding: 15px; + width: 100%; + border: 1px solid; + border-color: #a9a9a9; + +} + +#loadingContainer .loadingText { + position: relative; + top: 50%; + margin-top: -35px; + font-size: 30px; + font-weight: bold; + vertical-align: text-bottom; + height: 30px; + float: left; +} + +#loadingContainer .loadingIcon { + position: relative; + background: url(../images/ajax-loader2.gif) no-repeat; + top: 25px; + height: 100px; + width: 70px; + float: left; + clear: both; +} + +/* ------------- Footer Styles -------------------------*/ +div#embFooter { + position: absolute; + height: 35px; + width: 100%; + bottom: 0; + left: 0; + border-top: 1px solid black; + background: #E5E5E5; +} + +div#logo { + height: 65px; + width: 80px; + position: absolute; + background: url(../nicons/logo-small.png) no-repeat right top; + right: 10px; + top: -10px; +} + +.button { + width: 20px; + height: 20px; + float: left; + cursor: pointer; + white-space: nowrap; + margin: 1px; +} + +.button:hover { + float: left; + cursor: pointer; + border: 1px solid black; + border-top-color: white; + border-left-color: white; + margin: 0; + +} + +div#zoomIn { + background: url(../nicons/zoom-in.png) no-repeat left top; + margin-top: 10px; + margin-left: 10px; +} + +#zoomOut { + background: url(../nicons/zoom-out.png) no-repeat left top;; + margin-top: 10px; + margin-left: 5px; +} + +div#mindplot { + position: relative; + top: 0; + left: 0; + width: 100%; +} + +div#mapContainer { + border-bottom: 1px solid black; + padding-bottom: 40px; + height: 400px; + width: 100%; +} + +div#mapDetails { + float: right; + padding-top: 10px; + margin-right: 100px; + +} + +div#mapDetails .title { + font-weight: bold; + margin-left: 10px; + margin-right: 3px; +} \ No newline at end of file diff --git a/wise-doc/src/main/webapp/html/editor.html b/wise-doc/src/main/webapp/html/editor.html index 1b37baf6..62e3ba93 100644 --- a/wise-doc/src/main/webapp/html/editor.html +++ b/wise-doc/src/main/webapp/html/editor.html @@ -113,9 +113,6 @@ }); -
-
-