diff --git a/mindplot/src/main/javascript/DesignerKeyboard.js b/mindplot/src/main/javascript/DesignerKeyboard.js index cc5bdd64..59144e29 100644 --- a/mindplot/src/main/javascript/DesignerKeyboard.js +++ b/mindplot/src/main/javascript/DesignerKeyboard.js @@ -64,6 +64,10 @@ mindplot.DesignerKeyboard = new Class({ designer.createChildForSelectedNode(); }.bind(this), + 'meta+enter' : function() { + designer.createChildForSelectedNode(); + }.bind(this), + 'ctrl+z' : function() { designer.undo(); }.bind(this), diff --git a/mindplot/src/main/javascript/NodeGraph.js b/mindplot/src/main/javascript/NodeGraph.js index 3f34722b..4e8fd1ed 100644 --- a/mindplot/src/main/javascript/NodeGraph.js +++ b/mindplot/src/main/javascript/NodeGraph.js @@ -80,7 +80,7 @@ mindplot.NodeGraph = new Class({ }, setSize : function(size) { - this._model.setSize(size.width, size.height); + this._model.setSize(parseInt(size.width), parseInt(size.height)); }, getModel:function() { diff --git a/mindplot/src/main/javascript/NoteIcon.js b/mindplot/src/main/javascript/NoteIcon.js index 4e27fc7e..2783ee48 100644 --- a/mindplot/src/main/javascript/NoteIcon.js +++ b/mindplot/src/main/javascript/NoteIcon.js @@ -68,7 +68,8 @@ mindplot.NoteIcon = new Class({ arrowOffset : 10, center: true, arrowSize: 15, - offset : {x:10,y:20} + offset : {x:10,y:20}, + className:'notesTip' }); }, diff --git a/mindplot/src/main/javascript/Topic.js b/mindplot/src/main/javascript/Topic.js index a0e52661..0a84a52c 100644 --- a/mindplot/src/main/javascript/Topic.js +++ b/mindplot/src/main/javascript/Topic.js @@ -180,7 +180,7 @@ mindplot.Topic = new Class({ result = new web2d.Line({strokeColor:"#495879",strokeWidth:1, strokeOpacity:1}); result.setSize = function(width, height) { this.size = {width:width, height:height}; - result.setFrom(-1, height); + result.setFrom(0, height); result.setTo(width + 1, height); // Lines will have the same color of the default connection lines... @@ -980,7 +980,7 @@ mindplot.Topic = new Class({ var innerShape = this.getInnerShape(); outerShape.setSize(size.width + 4, size.height + 6); - innerShape.setSize(size.width, size.height); + innerShape.setSize(parseInt(size.width), parseInt(size.height)); }, setSize : function(size, force, updatePosition) { diff --git a/mindplot/src/main/javascript/widget/FloatingTip.js b/mindplot/src/main/javascript/widget/FloatingTip.js index 2d27edb1..1e92ea87 100644 --- a/mindplot/src/main/javascript/widget/FloatingTip.js +++ b/mindplot/src/main/javascript/widget/FloatingTip.js @@ -37,6 +37,7 @@ mindplot.widget.FloatingTip = new Class({ hideDelay: 250, className: 'floating-tip', offset: {x: 0, y: 0}, + preventHideOnOver: true, fx: { 'duration': 'short' } }, @@ -75,9 +76,10 @@ mindplot.widget.FloatingTip = new Class({ return this; element.store('floatingtip', tip); this._animate(tip, 'in'); - tip.addEvent(this.options.showOn, this.boundShow); - tip.addEvent(this.options.hideOn, this.boundHide); - + if (this.options.preventHideOnOver) { + tip.addEvent(this.options.showOn, this.boundShow); + tip.addEvent(this.options.hideOn, this.boundHide); + } this.fireEvent('show', [tip, element]); return this; }, diff --git a/mindplot/src/main/javascript/widget/IconPanel.js b/mindplot/src/main/javascript/widget/IconPanel.js index 16df019e..f1f3d378 100644 --- a/mindplot/src/main/javascript/widget/IconPanel.js +++ b/mindplot/src/main/javascript/widget/IconPanel.js @@ -25,6 +25,9 @@ mindplot.widget.IconPanel = new Class({ buildPanel: function() { var content = new Element('div', {'class':'toolbarPanel','id':'IconsPanel'}); content.setStyles({width:253,height:200,padding:5}); + content.addEvent("click", function(event) { + event.stopPropagation() + }); var count = 0; for (var i = 0; i < mindplot.ImageIcon.prototype.ICON_FAMILIES.length; i = i + 1) { @@ -41,11 +44,17 @@ mindplot.widget.IconPanel = new Class({ id:iconId, src:mindplot.ImageIcon.prototype._getImageUrl(iconId) }); - img.setStyles({width:16,height:16,padding:"0px 2px"}).inject(familyContent); + img.setStyles({width:16, + height:16, + padding:"0px 2px", + cursor: 'pointer' + }).inject(familyContent); + var panel = this; var model = this.getModel(); - img.addEvent('click', function() { + img.addEvent('click', function(event) { model.setValue(this.id); + panel.hide(); }.bind(img)); count = count + 1; diff --git a/mindplot/src/main/javascript/widget/Menu.js b/mindplot/src/main/javascript/widget/Menu.js index 5db91143..af54d021 100644 --- a/mindplot/src/main/javascript/widget/Menu.js +++ b/mindplot/src/main/javascript/widget/Menu.js @@ -26,7 +26,6 @@ mindplot.widget.Menu = new Class({ this._designer = designer; this._toolbarElems = []; this._containerId = containerId; - this._toolbarDisabled = false; // Stop event propagation ... $(this._containerId).addEvent('click', function(event) { @@ -181,15 +180,15 @@ mindplot.widget.Menu = new Class({ this._toolbarElems.push(new mindplot.widget.ColorPalettePanel('fontColor', fontColorModel, baseUrl)); this.addButton('zoomIn', false, false, function() { - designer.zoomIn() + designer.zoomIn(); }); this.addButton('zoomOut', false, false, function() { - designer.zoomOut() + designer.zoomOut(); }); this.addButton('undoEdition', false, false, function() { - designer.undo() + designer.undo(); }); this.addButton('redoEdition', false, false, function() { @@ -327,7 +326,10 @@ mindplot.widget.Menu = new Class({ if (button.isTopicAction() && button.isRelAction()) { disable = rels.length == 0 && topics.length == 0; - } else if (button.isTopicAction() && topics.length == 0) { + } else if (!button.isTopicAction() && !button.isRelAction()) { + disable = false; + } + else if (button.isTopicAction() && topics.length == 0) { disable = true; } else if (button.isRelAction() && rels.length == 0) { disable = true; @@ -335,9 +337,10 @@ mindplot.widget.Menu = new Class({ if (disable) { button.disable(); + } else { + button.enable(); } - }) }.bind(this)); @@ -375,15 +378,15 @@ mindplot.widget.Menu = new Class({ addButton:function (buttonId, topic, rel, fn) { // Register Events ... var button = new mindplot.widget.ToolbarItem(buttonId, function(event) { - this.clear(); fn(event); + this.clear(); }.bind(this), {topicAction:topic,relAction:rel}); this._toolbarElems.push(button); }, clear : function() { - this._toolbarElems.forEach(function(elem) { - elem.hide(); + this._toolbarElems.forEach(function(item) { + item.hide(); }); } }); \ No newline at end of file diff --git a/mindplot/src/main/javascript/widget/Monitor.js b/mindplot/src/main/javascript/widget/Monitor.js index 0e61c1ea..8244ad50 100644 --- a/mindplot/src/main/javascript/widget/Monitor.js +++ b/mindplot/src/main/javascript/widget/Monitor.js @@ -38,7 +38,7 @@ mindplot.widget.Monitor = new Class({ }, logMessage : function(msg, msgKind) { - console.log(userMsg); + console.log(msg); } }); diff --git a/mindplot/src/main/javascript/widget/ToolbarItem.js b/mindplot/src/main/javascript/widget/ToolbarItem.js index 583766d6..add6e30f 100644 --- a/mindplot/src/main/javascript/widget/ToolbarItem.js +++ b/mindplot/src/main/javascript/widget/ToolbarItem.js @@ -24,6 +24,28 @@ mindplot.widget.ToolbarItem = new Class({ this._buttonId = buttonId; this._fn = fn; this._options = options; + this.enable(); +// this._tip = this._registerTip(); + + }, + + _registerTip: function() { + + return new mindplot.widget.FloatingTip($(this._buttonId), { + html: false, + position: 'bottom', + arrowOffset : 5, + center: true, + arrowSize: 5, + showDelay: 500, + hideDelay: 0, + className: 'toolbarTip', + motionOnShow:false, + motionOnHide:false, + motion: 0, + distance: 0, + preventHideOnOver:false + }); }, getButtonElem : function() { @@ -66,5 +88,9 @@ mindplot.widget.ToolbarItem = new Class({ elem.addClass('buttonOn'); this._enable = true; } - } + }, + + getTip : function() { + return this._tip; + }.protect() }); \ No newline at end of file diff --git a/mindplot/src/main/javascript/widget/ToolbarPaneItem.js b/mindplot/src/main/javascript/widget/ToolbarPaneItem.js index bf563819..427a55dd 100644 --- a/mindplot/src/main/javascript/widget/ToolbarPaneItem.js +++ b/mindplot/src/main/javascript/widget/ToolbarPaneItem.js @@ -38,6 +38,7 @@ mindplot.widget.ToolbarPaneItem = new Class({ _init:function () { // Load the context of the panel ... var panelElem = this.buildPanel(); + panelElem.setStyle('cursor','default'); var buttonElem = this.getButtonElem(); // Add panel content .. @@ -51,12 +52,6 @@ mindplot.widget.ToolbarPaneItem = new Class({ return this._model; }, - getButtonElem : function() { - var elem = $(this._buttonId); - $assert(elem, "Could not find element for " + this._buttonId); - return elem; - }.protect(), - getPanelElem : function() { return $(this._panelId); }.protect(), diff --git a/wise-doc/src/main/webapp/css/editor.css b/wise-doc/src/main/webapp/css/editor.css deleted file mode 100644 index 49c5f039..00000000 --- a/wise-doc/src/main/webapp/css/editor.css +++ /dev/null @@ -1,667 +0,0 @@ -@import "common.css"; -@import "/mindplot/src/main/javascript/widget/lightbox.css"; -@import "/mindplot/src/main/javascript/libraries/moodialog/css/MooDialog.css"; - -html { - overflow: hidden; -} - -body { - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -o-user-select: none; - user-select: none; -} - -#waitDialog { - position: absolute; - top: 10px; - left: 10px; - height: 200px; -} - -#firstHeader { - width: 100%; -} - -#subHeader { - position: absolute; - width: 100%; - height: 55px; - top: 30px; -} - -#waitingContainer, #errorContainer { - position: relative; - top: 80px; - height: 120px; /*background: whitesmoke;*/ - background: #FEFEFE; - opacity: .99; - padding: 15px; - width: 100%; - border: 1px solid; - border-color: #a9a9a9; - -} - -#errorContainer { - width: 400px; - border: 1px solid red; -} - -#waitingContainer .loadingText { - position: relative; - top: 50%; - margin-top: -35px; - font-size: 30px; - font-weight: bold; - vertical-align: text-bottom; - height: 30px; - float: left; -} - -#errorContainer .loadingText { - position: relative; - top: 50%; - margin-top: -80px; - font-size: 15px; - font-weight: bold; - vertical-align: text-bottom; - height: 30px; - float: right; - padding-left: 120px; -} - -#waitingContainer .loadingIcon { - position: relative; - background: url(../images/loadingIcon.gif) no-repeat; - top: 50%; - margin-top: -65px; - height: 100px; - width: 121px; - float: left; - clear: both; -} - -#errorContainer .loadingIcon { - position: relative; - background: url(../images/errorIcon.png) no-repeat; - top: 50%; - margin-top: -65px; - height: 100px; - width: 121px; - float: left; - clear: both; -} - -#infoContainer { - float: left; -} - -#infoContainer { - float: left; - padding-left: 5px; -} - -#title { - position: relative; - left: 120px; - top: 80px; -} - -#operationsContainer { - font-size: 12px; - float: right; - padding: 0 5px; -} - -#operationsContainer a { - padding: 0 5px; -} - -#user { - font-weight: bold; - margin-right: 5px; -} - -#toolbar { - width: 100%; - height: 25px; - color: #ffffff; - border-bottom: 2px solid black; - position: absolute; - top: 0; -} - -div#toolbar .buttonContainer { - height: 44px; - float: left; - color: black; -} - -.buttonContainer fieldset { - border: 1px solid #BBB4D6; - padding: 2px 2px 4px; - margin: 8px 1px 1px; -} - -.buttonContainer legend { - padding: 0.2em 0.5em; - border: 1px solid #BBB4D6; - background-color: #F5F5F5; - color: #BBB4D6; - font-size: 11px; - text-align: right; - margin: 0; - -moz-margin-start: 7px; - -moz-margin-end: 7px; -} - -div#toolbar .buttonOn, div#toolbar .buttonOff, div#toolbar .buttonActive, div#toolbar .buttonOn:hover { - width: 32px; - height: 36px; - float: left; - margin: 0 2px 2px 2px; - text-align: center; -} - -div#toolbar .buttonOn:hover, div#toolbar .buttonActive { - margin: 0 1px; - cursor: pointer; - border: 1px solid black; - border-top-color: white; - border-left-color: white; - cursor: pointer; -} - -div#toolbar .buttonOff { - opacity: 0.4; -} - -div#toolbar .button img { - width: 30px; - height: 30px; - border: 0; -} - -div#toolbar .toolbarLabel { - position: relative; - top: 55%; - text-align: center; - width: 34px; - height: 10px; - font-size: 10px; -} - -.mapSeparator { - width: 1px; - height: 20px; - background-color: #166D66; - float: left; - margin: 5px 3px; -} - -div#file, div#zoom, div#node, div#font, div#share { - position: absolute; - top: -6px; - left: 3px; -} - -div#zoom { - left: 84px; -} - -div#node { - left: 165px; -} - -div#font { - left: 522px; /*left:581px;*/ -} - -div#saveButton { - background: url(../images/save.png) no-repeat center top; -} - -div#undoEdition { - background: url(../images/file_undo_dis.png) no-repeat center top; -} - -div#redoEdition { - background: url(../images/file_redo_dis.png) no-repeat center top; -} - -#export { - background: url(../images/file_export.png) no-repeat center top; - position: relative; -} - -#exportAnchor { - position: absolute; - width: 100%; - height: 100%; - top: 0; - left: 0; -} - -div#zoomIn { - background: url(../images/zoom_in.png) no-repeat center top; -} - -#zoomOut { - background: url(../images/zoom_out.png) no-repeat center top; -} - -#addTopic { - background: url(../images/topic_add.png) no-repeat center top; -} - -#deleteTopic { - background: url(../images/topic_delete.png) no-repeat center top; -} - -div#topicColor { - background: url(../images/topic_bgcolor.png) no-repeat center top; - z-index: 4; -} - -div#topicIcon { - background: url(../images/topic_icon.png) no-repeat center top; - z-index: 4; -} - -div#topicNote { - background: url(../images/note.png) no-repeat center top; - z-index: 4; -} - -div#topicNote { - background: url(../images/topic_icon.png) no-repeat center top; - z-index: 4; -} - -div#topicLink { - background: url(../images/topic_link.png) no-repeat center top; - z-index: 4; -} - -div#topicNote { - background-image: url(../images/note.png); - z-index: 4; -} - -#topicBorder { - background: url(../images/topic_border.png) no-repeat center top; - width: 30px; -} - -#fontFamily { - background: url(../images/font_type.png) no-repeat center top; -} - -#topicShape { - background: url(../images/topic_shape.png) no-repeat center top; - width: 30px; -} - -#fontBold { - background: url(../images/font_bold.png) no-repeat center top; -} - -#fontItalic { - background: url(../images/font_italic.png) no-repeat center top; -} - -div#fontColor { - background: url(../images/font_color.png) no-repeat center top; - z-index: 4; -} - -#fontSize { - float: left; - background: url(../images/font_size.png) no-repeat center top; -} - -#font-size { - font-size: 10px; -} - -.wiseToolbarButton { - float: left; - height: 16px; - cursor: pointer; - font-size: 10px; - font-weight: bold; - margin-right: 15px; -} - -#shareIt { - background: url(../images/collab_share.png) no-repeat center top; -} - -#publishIt { - background: url(../images/collab_publish.png) no-repeat center top; -} - -#tagIt { - background: url(../images/collab_tag.png) no-repeat center top; -} - -#colorPalette { - border: 1px solid #bbb4d6; - display: none; - position: absolute; - z-index: 4; - width: 160px; - top: 89px; -} - -#paletteHeader { - background-color: #E5E5E5; - height: 4px; -} - -.toolbarPanel { - color: black; - border-color: #CCC #666 #666 #CCC; - border-style: solid; - border-width: 1px; - background: white; - padding: 2px; - display: none; - position: absolute; - z-index: 4; - top: 53px; - text-align: left; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -o-user-select: none; - user-select: none; -} - -div.toolbarPanelLink { - cursor: pointer; - color: black; - font-weight: bold; - padding: 0 3px 0 4px; - margin: 1px; - cursor: pointer; - font-size: 12px; - font-weight: bold; -} - -div.toolbarPanelLink:hover { - cursor: pointer; - font-weight: bold; - background-color: #c3def5; -} - -div.toolbarPanelLinkSelectedLink { - cursor: pointer; - color: white; - font-weight: bold; - padding: 0 3px 0 4px; - margin: 1px; - background-color: #c3def5; -} - -/* ------------- Footer Styles -------------------------*/ -div#footerEditor { - position: absolute; - height: 60px; - width: 100%; - background: #E5E5E5; - border-top: 1px solid #bbb4d6; - bottom: 0; -} - -#logo { - height: 50px; - width: 80px; - float: right; - margin: 5px; - background: url(../images/logo-vsmall.png) no-repeat right top; -} - -#footerEditor .msgLoggerContainer { - position: relative; - width: 550px; - height: 36px; - left: 50%; - margin-left: -300px; - top: 10px; - opacity: 0; - visibility: hidden; -} - -div#msgStart { - float: left; - height: 36px; - width: 16px; - background: url(../images/footerStart.png) no-repeat right top; -} - -div#msgEnd { - float: left; - height: 36px; - width: 16px; - background: url(../images/footerEnd.png) no-repeat right top; - -} - -div#msgLogger { - float: left; - height: 36px; - width: 500px; - background: url(../images/footerBody.png) repeat-x right top; - text-align: center; - white-space: nowrap; - padding: 5px; - font-size: 13px; - font-weight: bold; -} - -/** Tab labels */ -div#tabsHolder { - width: 100%; - height: 20px; -} - -div#tabs { - float: left; -} - -div.tabContent { - clear: left; - width: 100%; - height: 50px; - border-bottom: 1px solid #bbb4d6; - border-top: 1px solid #bbb4d6; - background: #E5E5E5; - display: none; - position: absolute; - left: 0; -} - -ol#toc { - height: 2em; - list-style: none; - margin: 0; - padding: 0; -} - -ol#toc li { - float: left; - margin: 0 1px 0 0; - border: 0; -} - -ol#toc a { - background: #fff url(../images/tab4.png); - color: #008; - display: block; - float: left; - height: 25px; - padding-left: 10px; - text-decoration: none; -} - -ol#toc a:hover { - background-color: #fff; - background-position: 0 -121px; -} - -ol#toc a:hover span { - background-position: 100% -121px; -} - -ol#toc li.current a { - background-color: #fff; - background-position: 0 -61px; - color: #008; - font-weight: bold; -} - -ol#toc li.current span { - background-position: 100% -61px; -} - -ol#toc span { - background: #fff url(../images/tab4.png) 100% 0; - display: block; - line-height: 2em; - padding-right: 10px; -} - -#mindplot { - position: relative; - top: 53px; - left: 0; - width: 100%; - border: 0; -} - -#workspaceContainer { - background: url(../images/grid.gif) bottom left repeat !important; -} - -div#mapInfo { - float: right; - color: #008; - padding-right: 5px; - height: 25px; - white-space: nowrap; -} - -span#mapName { - font-size: 15px; - font-weight: bold; -} - -span#lastSaved { - font-size: 10px; -} - -.label { - border: none; - color: #ffffff; - font-weight: bold; -} - -.label :hover { - cursor: pointer; -} - -#tryEditorWarning { - position: absolute; - margin: 20px auto; - width: 300px; - right: 10px; - top: 100px; - padding: 20px; - opacity: 0.9; - cursor: move; - background-color: #69686F; - filter: alpha(opacity = 90); - color: #000c8f; -} - -#tryEditorWarning a { - color: white; - font-weight: bold; -} - -#tryEditorWarning h1 { - color: #f5f5f5; - font-weight: bold; - margin-bottom: 5px; - font-size: 15px; -} - -div#helpContainer { - position: absolute; - margin: 20px auto; - z-index: 3; - opacity: 0.9; - width: 220px; - top: 100px; - left: 10px; - color: #000c8f; - padding: 20px; - cursor: move; - background-color: #69686F; - filter: alpha(opacity = 90); -} - -div#helpContent h1 { - font-weight: bold; - color: #f5f5f5; - font-size: 15px; -} - -div#helpContent h2 { - font-weight: bold; - padding: 20px 0 10px 0; - color: #bfbfbf; -} - -div.close { - position: absolute; - height: 12px; - width: 12px; - top: 7px; - right: 10px; - cursor: pointer; - background: url(../images/close12_1.gif) bottom left no-repeat !important; -} - -div#helpContent li { - font-family: arial, helvetica, sans-serif; - list-style-type: disc; - margin-left: 12px; - font-size: 11px; -} - -div#small_error_icon { - padding-left: 18px; - min-height: 16px; - background: url(../images/error_icon.png) bottom left no-repeat !important; -} - -div#toolbar .topicRelation { - width: 56px; - background: url(../images/topic_relationship.png) no-repeat center top; - z-index: 4; -} - -div#toolbar .topicRelation:hover { - width: 56px; - background: url(../images/topic_relationship.png) no-repeat center top; - z-index: 4; -} - -div#toolbar .relationshiplabel { - width: 56px; -} diff --git a/wise-doc/src/main/webapp/css/editor2.css b/wise-doc/src/main/webapp/css/editor2.css new file mode 100644 index 00000000..ca9101da --- /dev/null +++ b/wise-doc/src/main/webapp/css/editor2.css @@ -0,0 +1,511 @@ +@import "/mindplot/src/main/javascript/widget/lightbox.css"; +@import "/mindplot/src/main/javascript/libraries/moodialog/css/MooDialog.css"; + +@header-height : 70px; +@header-toolbar-height : 30px; +@header-info-height : @header-height - @header-toolbar-height; + +/* Common Default Style */ +html { + overflow: hidden; +} + +body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td { + margin: 0; + padding: 0; +} + +table { + border-collapse: collapse; + border-spacing: 0; +} + +fieldset, img { + border: 0; +} + +address, caption, cite, code, dfn, em, strong, th, var { + font-style: normal; + font-weight: normal; +} + +ol, ul { + list-style: none; +} + +caption, th { + text-align: left; +} + +h1, h2, h3, h4, h5, h6 { + font-size: 100%; + font-weight: normal; +} + +q:before, q:after { + content: ''; +} + +abbr, acronym { + border: 0; +} + +/** + * Percents could work for IE, but for backCompat purposes, we are using keywords. + * x-small is for IE6/7 quirks mode. + * + */ +body { + font: 13px arial, helvetica, clean, sans-serif; + font-size: small; + font: x-small; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -o-user-select: none; + user-select: none; +} + +table { + font-size: inherit; + font-size: 100%; +} + +/** + * 99% for safari; 100% is too large + */ +select, input, textarea { + font: 99% arial, helvetica, clean, sans-serif; +} + +/** + * Bump up !IE to get to 13px equivalent + */ +pre, code { + font: 115% monospace; + font-size: 100%; +} + +/** + * Default line-height based on font-size rather than "computed-value" + * see: http://www.w3.org/TR/CSS21/visudet.html#line-height + */ + +body * { + line-height: 1.22em; +} + +* { + margin: 0; + padding: 0; +} + +body { + font: normal 80% "trebuchet ms", verdana, arial, helvetica, sans-serif; + background-color: #fff; +} + +img { + border: 0; +} + +form { + padding: 0; + margin: 0; +} + +p { + margin: 5px 0 5px 0; +} + +ul { + list-style-position: inside; +} + +a:link, a:visited { + font: bold 100%; + text-decoration: underline; + color: black; +} + +a:hover, a:active { + font: bold 100%; + text-decoration: underline; + color: black; +} + +h2 { + font-size: 160%; + color: #8e9181; +} + +h1 { + font-style: normal; + font-size: 180%; + color: white; + padding-bottom: 2px; +} + +h3 { + /* use as subhead on main body */ + clear: left; + font-style: normal; + font-size: 130%; + color: #6b6f5b; +} + +h4 { + /* use as headers in footer */ + font-weight: bold; + font-size: 120%; + border-bottom: 1px solid #8e9181; + color: #e2e3dd; + padding-bottom: 10px; + width: 400px; +} + +/**********************************************************/ +/* End: Common Default Style */ +/**********************************************************/ + +/**********************************************************/ +/* Error Dialog ... */ +/**********************************************************/ + +#waitDialog { + position: absolute; + top: 10px; + left: 10px; + height: 200px; +} + +#waitingContainer, #errorContainer { + position: relative; + top: 80px; + height: 120px; /*background: whitesmoke;*/ + background: #FEFEFE; + opacity: .99; + padding: 15px; + width: 100%; + border: 1px solid; + border-color: #a9a9a9; + +} + +#errorContainer { + width: 400px; + border: 1px solid red; +} + +#waitingContainer .loadingText { + position: relative; + top: 50%; + margin-top: -35px; + font-size: 30px; + font-weight: bold; + vertical-align: text-bottom; + height: 30px; + float: left; +} + +#errorContainer .loadingText { + position: relative; + top: 50%; + margin-top: -80px; + font-size: 15px; + font-weight: bold; + vertical-align: text-bottom; + height: 30px; + float: right; + padding-left: 120px; +} + +#waitingContainer .loadingIcon { + position: relative; + background: url(../images/loadingIcon.gif) no-repeat; + top: 50%; + margin-top: -65px; + height: 100px; + width: 121px; + float: left; + clear: both; +} + +#errorContainer .loadingIcon { + position: relative; + background: url(../images/errorIcon.png) no-repeat; + top: 50%; + margin-top: -65px; + height: 100px; + width: 121px; + float: left; + clear: both; +} + +/********************************************************************************/ +/* Toolbar Styles */ +/********************************************************************************/ + +div#header { + background-color: #000000; + width: 100%; + height: @header-height; +} + +div#headerInfo { + width: 100%; + height: @header-info-height; + color: white; +} + +div#toolbar { + width: 100%; + height: @header-toolbar-height; + background: whiteSmoke; + border-top: 1px solid #E5E5E5; +} + +div#toolbar .buttonContainer { + height: @header-toolbar-height; + float: left; + color: black; + border: 1px solid #BBB4D6; + margin-left: 5px; +} + +div#toolbar .buttonOn, div#toolbar .buttonOff, div#toolbar .buttonActive, div#toolbar .buttonOn:hover { + width: 30px; + height: @header-toolbar-height; + float: left; + text-align: center; +} + +div#toolbar .buttonOn:hover, div#toolbar .buttonActive { + margin: 0; + cursor: pointer; + border: 1px solid #d3d3d3; + cursor: pointer; + opacity: 1; +} + +div#toolbar .buttonOn { + margin: 1px; + opacity: 0.8; +} + +div#toolbar .buttonOff { + margin: 1px; + opacity: 0.4; +} + +div#toolbar .button img { + height: @header-toolbar-height; + border: 0; +} + +div#saveButton { + background: url(../images/save.png) no-repeat center top; +} + +div#undoEdition { + background: url(../images/file_undo_dis.png) no-repeat center top; +} + +div#redoEdition { + background: url(../images/file_redo_dis.png) no-repeat center top; +} + +div#export { + background: url(../images/file_export.png) no-repeat center top; + position: relative; +} + +div#exportAnchor { + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; +} + +div#zoomIn { + background: url(../images/zoom_in.png) no-repeat center top; +} + +div#zoomOut { + background: url(../images/zoom_out.png) no-repeat center top; +} + +div#addTopic { + background: url(../images/topic_add.png) no-repeat center top; +} + +div#deleteTopic { + background: url(../images/topic_delete.png) no-repeat center top; +} + +div#topicColor { + background: url(../images/topic_bgcolor.png) no-repeat center top; + z-index: 4; +} + +div#topicIcon { + background: url(../images/topic_icon.png) no-repeat center top; + z-index: 4; +} + +div#topicNote { + background: url(../images/note.png) no-repeat center top; + z-index: 4; +} + +div#topicNote { + background: url(../images/topic_icon.png) no-repeat center top; + z-index: 4; +} + +div#topicLink { + background: url(../images/topic_link.png) no-repeat center top; + z-index: 4; +} + +div#topicNote { + background-image: url(../images/note.png); + z-index: 4; +} + +div#topicBorder { + background: url(../images/topic_border.png) no-repeat center top; +} + +div#fontFamily { + background: url(../images/font_type.png) no-repeat center top; +} + +div#topicShape { + background: url(../images/topic_shape.png) no-repeat center top; +} + +div#fontBold { + background: url(../images/font_bold.png) no-repeat center top; +} + +div#fontItalic { + background: url(../images/font_italic.png) no-repeat center top; +} + +div#fontColor { + background: url(../images/font_color.png) no-repeat center top; + z-index: 4; +} + +div#fontSize { + float: left; + background: url(../images/font_size.png) no-repeat center top; +} + +div#font-size { + font-size: 10px; +} + +div#shareIt { + background: url(../images/collab_share.png) no-repeat center top; +} + +div#publishIt { + background: url(../images/collab_publish.png) no-repeat center top; +} + +div#tagIt { + background: url(../images/collab_tag.png) no-repeat center top; +} + +div#topicRelation { + width: 56px; + background: url(../images/topic_relationship.png) no-repeat center top; + z-index: 4; +} + +div#colorPalette { + border: 1px solid #bbb4d6; + display: none; + position: absolute; + z-index: 4; + width: 160px; + top: 89px; +} + +.toolbarPanel { + z-index: 4; + top: @header-height+3; + -moz-transition: opacity 0.218s ease 0s; + background: none repeat scroll 0 0 #FFFFFF; + border: 1px solid rgba(0, 0, 0, 0.2); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); + cursor: default; + font-size: 13px; + margin: 0; + outline: medium none; + padding: 0 0 6px; + position: absolute; +} + +div.toolbarPanelLink, div.toolbarPanelLinkSelectedLink { + cursor: pointer; + color: black; + margin: 1px; + cursor: pointer; + font-size: 12px; + padding: 5px 15px; +} + +div.toolbarPanelLink:hover, div.toolbarPanelLinkSelectedLink { + cursor: pointer; + background-color: #efefef; +} + +div#mindplot { + position: relative; + top: 0; + left: 0; + width: 100%; + border: 0; +} + +div#workspaceContainer { + background: url(../images/grid.gif) bottom left repeat !important; +} + +div#small_error_icon { + padding-left: 18px; + min-height: 16px; + background: url(../images/error_icon.png) bottom left no-repeat !important; +} + +.notesTip { + background-color: #dfcf3c; + padding: 5px 15px; + color: #666666; + /*font-weight: bold;*/ + /*width: 100px;*/ + font-size: 13px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2); +} + +.toolbarTip { + background-color: black; + padding: 5px 5px; + color: #f5f5f5; + /*font-weight: bold;*/ + /*width: 100px;*/ + font-size: 11px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2); +} + + diff --git a/wise-doc/src/main/webapp/html/editor.html b/wise-doc/src/main/webapp/html/editor.html index e29c8cdf..919cf6b0 100644 --- a/wise-doc/src/main/webapp/html/editor.html +++ b/wise-doc/src/main/webapp/html/editor.html @@ -9,11 +9,13 @@ - + + + @@ -114,138 +116,44 @@
-
-
-
-
-
-
-

Undo

-
-
-
-
-

Redo

-
-
-
-
-
-
-
-
-

In

-
-
-
-
-

Out

-
-
-
-
-
-
-
-
-

Shape

-
-
-
-
-

Add

-
-
-
-
-

Delete

-
-
-
-
-

Border

-
-
-
-
-

Color

-
-
-
-
-

Icon

-
-
-
-
-

Note

-
-
- -
-
-

Relationship

-
-
-
-
-
-
-
-
-

Style

-
-
-
-
-

Size

-
-
-
-
-

Bold

-
-
-
-
-

Italic

-
-
-
-
-

Color

-
-
-
+ +
- -
-
- - - - -
-
-
-
-
-
-
-
-
Shortcuts
-
-
diff --git a/wise-doc/src/main/webapp/js/editor.js b/wise-doc/src/main/webapp/js/editor.js index f3bdc36c..3496d6e2 100644 --- a/wise-doc/src/main/webapp/js/editor.js +++ b/wise-doc/src/main/webapp/js/editor.js @@ -29,7 +29,7 @@ function buildDesigner() { var editorProperties = {zoom:0.85,saveOnLoad:true,collab:collab}; designer = new mindplot.Designer(editorProperties, container); designer.setViewPort({ - height: parseInt(window.innerHeight - 112), // Footer and Header + height: parseInt(window.innerHeight-70), // Footer and Header width: parseInt(window.innerWidth) }); @@ -109,121 +109,4 @@ if (localEnv) { $(document).fireEvent('loadcomplete', 'mind') } }); -} - -// CSS helper functions -CSS = { - // Adds a class to an element. - AddClass: function (e, c) { - if (!e.className.match(new RegExp("\\b" + c + "\\b", "i"))) - e.className += (e.className ? " " : "") + c; - }, - - // Removes a class from an element. - RemoveClass: function (e, c) { - e.className = e.className.replace(new RegExp(" \\b" + c + "\\b|\\b" + c + "\\b ?", "gi"), ""); - } -}; - -// Functions for handling tabs. -Tabs = { - // Changes to the tab with the specified ID. - GoTo: function (contentId, skipReplace) { - // This variable will be true if a tab for the specified - // content ID was found. - var foundTab = false; - - // Get the TOC element. - var toc = $("toc"); - if (toc) { - var lis = toc.getElementsByTagName("li"); - for (var j = 0; j < lis.length; j++) { - var li = lis[j]; - - // Give the current tab link the class "current" and - // remove the class from any other TOC links. - var anchors = li.getElementsByTagName("a"); - var anchors = li.getElementsByTagName("a"); - for (var k = 0; k < anchors.length; k++) { - if (anchors[k].hash == "#" + contentId) { - CSS.AddClass(li, "current"); - foundTab = true; - break; - } else { - CSS.RemoveClass(li, "current"); - } - } - } - } - - // Show the content with the specified ID. - var divsToHide = []; - var divs = document.getElementsByTagName("div"); - for (var i = 0; i < divs.length; i++) { - var div = divs[i]; - - if (div.className.match(/\btabContent\b/i)) { - if (div.id == "_" + contentId) - div.style.display = "block"; - else { - divsToHide.push(div); - } - } - } - - // Hide the other content boxes. - for (var i = 0; i < divsToHide.length; i++) - divsToHide[i].style.display = "none"; - - // Change the address bar. - if (!skipReplace) window.location.replace("#" + contentId); - }, - - OnClickHandler: function (e) { - // Stop the event (to stop it from scrolling or - // making an entry in the history). - if (!e) e = window.event; - if (e.preventDefault) e.preventDefault(); else e.returnValue = false; - - // Get the name of the anchor of the link that was clicked. - Tabs.GoTo(this.hash.substring(1)); - }, - - Init: function () { - if (!document.getElementsByTagName) { - return; - } - - // Attach an onclick event to all the anchor links on the page. - var anchors = document.getElementsByTagName("a"); - for (var i = 0; i < anchors.length; i++) { - var a = anchors[i]; - if (a.hash) { - a.onclick = Tabs.OnClickHandler; - } - } - - var contentId; - if (window.location.hash) - contentId = window.location.hash.substring(1); - - var divs = document.getElementsByTagName("div"); - for (var i = 0; i < divs.length; i++) { - var div = divs[i]; - - if (div.className.match(/\btabContent\b/i)) { - if (!contentId) contentId = div.id; - div.id = "_" + div.id; - } - } - - if (contentId) - Tabs.GoTo(contentId, true); - } -}; - -// Hook up the OnLoad event to the tab initialization function. -Tabs.Init(); - -// Hide the content while waiting for the onload event to trigger. -var contentId = window.location.hash || "#Introduction"; +} \ No newline at end of file diff --git a/wise-doc/src/main/webapp/js/less-1.1.3.min.js b/wise-doc/src/main/webapp/js/less-1.1.3.min.js new file mode 100644 index 00000000..6e4d5cff --- /dev/null +++ b/wise-doc/src/main/webapp/js/less-1.1.3.min.js @@ -0,0 +1,16 @@ +// +// LESS - Leaner CSS v1.1.3 +// http://lesscss.org +// +// Copyright (c) 2009-2011, Alexis Sellier +// Licensed under the Apache 2.0 License. +// +// +// LESS - Leaner CSS v1.1.3 +// http://lesscss.org +// +// Copyright (c) 2009-2011, Alexis Sellier +// Licensed under the Apache 2.0 License. +// +(function(a,b){function v(a,b){var c="less-error-message:"+p(b),e=["
    ",'
  • {0}
  • ',"
  • {current}
  • ",'
  • {2}
  • ',"
"].join("\n"),f=document.createElement("div"),g,h;f.id=c,f.className="less-error-message",h="

"+(a.message||"There is an error in your .less file")+"

"+'

'+b+" ",a.extract&&(h+="on line "+a.line+", column "+(a.column+1)+":

"+e.replace(/\[(-?\d)\]/g,function(b,c){return parseInt(a.line)+parseInt(c)||""}).replace(/\{(\d)\}/g,function(b,c){return a.extract[parseInt(c)]||""}).replace(/\{current\}/,a.extract[1].slice(0,a.column)+''+a.extract[1].slice(a.column)+"")),f.innerHTML=h,q([".less-error-message ul, .less-error-message li {","list-style-type: none;","margin-right: 15px;","padding: 4px 0;","margin: 0;","}",".less-error-message label {","font-size: 12px;","margin-right: 15px;","padding: 4px 0;","color: #cc7777;","}",".less-error-message pre {","color: #ee4444;","padding: 4px 0;","margin: 0;","display: inline-block;","}",".less-error-message pre.ctx {","color: #dd4444;","}",".less-error-message h3 {","font-size: 20px;","font-weight: bold;","padding: 15px 0 5px 0;","margin: 0;","}",".less-error-message a {","color: #10a","}",".less-error-message .error {","color: red;","font-weight: bold;","padding-bottom: 2px;","border-bottom: 1px dashed red;","}"].join("\n"),{title:"error-message"}),f.style.cssText=["font-family: Arial, sans-serif","border: 1px solid #e00","background-color: #eee","border-radius: 5px","-webkit-border-radius: 5px","-moz-border-radius: 5px","color: #e00","padding: 15px","margin-bottom: 15px"].join(";"),d.env=="development"&&(g=setInterval(function(){document.body&&(document.getElementById(c)?document.body.replaceChild(f,document.getElementById(c)):document.body.insertBefore(f,document.body.firstChild),clearInterval(g))},10))}function u(a){d.env=="development"&&typeof console!="undefined"&&console.log("less: "+a)}function t(a){return a&&a.parentNode.removeChild(a)}function s(){if(a.XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(b){u("browser doesn't support AJAX.");return null}}function r(a,b,c,e){function i(b,c,d){b.status>=200&&b.status<300?c(b.responseText,b.getResponseHeader("Last-Modified")):typeof d=="function"&&d(b.status,a)}var f=s(),h=g?!1:d.async;typeof f.overrideMimeType=="function"&&f.overrideMimeType("text/css"),f.open("GET",a,h),f.setRequestHeader("Accept",b||"text/x-less, text/css; q=0.9, */*; q=0.5"),f.send(null),g?f.status===0?c(f.responseText):e(f.status,a):h?f.onreadystatechange=function(){f.readyState==4&&i(f,c,e)}:i(f,c,e)}function q(a,b,c){var d,e=b.href?b.href.replace(/\?.*$/,""):"",f="less:"+(b.title||p(e));(d=document.getElementById(f))===null&&(d=document.createElement("style"),d.type="text/css",d.media=b.media||"screen",d.id=f,document.getElementsByTagName("head")[0].appendChild(d));if(d.styleSheet)try{d.styleSheet.cssText=a}catch(g){throw new Error("Couldn't reassign styleSheet.cssText.")}else(function(a){d.childNodes.length>0?d.firstChild.nodeValue!==a.nodeValue&&d.replaceChild(a,d.firstChild):d.appendChild(a)})(document.createTextNode(a));c&&h&&(u("saving "+e+" to cache."),h.setItem(e,a),h.setItem(e+":timestamp",c))}function p(a){return a.replace(/^[a-z]+:\/\/?[^\/]+/,"").replace(/^\//,"").replace(/\?.*$/,"").replace(/\.[^\.\/]+$/,"").replace(/[^\.\w-]+/g,"-").replace(/\./g,":")}function o(b,c,e,f){var g=a.location.href.replace(/[#?].*$/,""),i=b.href.replace(/\?.*$/,""),j=h&&h.getItem(i),k=h&&h.getItem(i+":timestamp"),l={css:j,timestamp:k};/^(https?|file):/.test(i)||(i.charAt(0)=="/"?i=a.location.protocol+"//"+a.location.host+i:i=g.slice(0,g.lastIndexOf("/")+1)+i),r(b.href,b.type,function(a,g){if(!e&&l&&g&&(new Date(g)).valueOf()===(new Date(l.timestamp)).valueOf())q(l.css,b),c(null,b,{local:!0,remaining:f});else try{(new d.Parser({optimization:d.optimization,paths:[i.replace(/[\w\.-]+$/,"")],mime:b.type})).parse(a,function(a,d){if(a)return v(a,i);try{c(d,b,{local:!1,lastModified:g,remaining:f}),t(document.getElementById("less-error-message:"+p(i)))}catch(a){v(a,i)}})}catch(h){v(h,i)}},function(a,b){throw new Error("Couldn't load "+b+" ("+a+")")})}function n(a,b){for(var c=0;c>>0;for(var d=0;d>>0,c=Array(b),d=arguments[1];for(var e=0;e>>0,c=0;if(b===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2)var d=arguments[1];else for(;;){if(c in this){d=this[c++];break}if(++c>=b)throw new TypeError}for(;c=b)return-1;c<0&&(c+=b);for(;ck&&(j[f]=j[f].slice(c-k),k=c)}function q(){j[f]=g,c=h,k=c}function p(){g=j[f],h=c,k=c}var b,c,f,g,h,i,j,k,l,m=this,n=function(){},o=this.imports={paths:a&&a.paths||[],queue:[],files:{},mime:a&&a.mime,push:function(b,c){var e=this;this.queue.push(b),d.Parser.importer(b,this.paths,function(a){e.queue.splice(e.queue.indexOf(b),1),e.files[b]=a,c(a),e.queue.length===0&&n()},a)}};this.env=a=a||{},this.optimization="optimization"in this.env?this.env.optimization:1,this.env.filename=this.env.filename||null;return l={imports:o,parse:function(d,g){var h,l,m,o,p,q,r=[],t,u=null;c=f=k=i=0,j=[],b=d.replace(/\r\n/g,"\n"),j=function(c){var d=0,e=/[^"'`\{\}\/\(\)]+/g,f=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,g=0,h,i=c[0],j,k;for(var l=0,m,n;l0)throw{type:"Syntax",message:"Missing closing `}`",filename:a.filename};return c.map(function(a){return a.join("")})}([[]]),h=new e.Ruleset([],s(this.parsers.primary)),h.root=!0,h.toCSS=function(c){var d,f,g;return function(g,h){function n(a){return a?(b.slice(0,a).match(/\n/g)||"").length:null}var i=[];g=g||{},typeof h=="object"&&!Array.isArray(h)&&(h=Object.keys(h).map(function(a){var b=h[a];b instanceof e.Value||(b instanceof e.Expression||(b=new e.Expression([b])),b=new e.Value([b]));return new e.Rule("@"+a,b,!1,0)}),i=[new e.Ruleset(null,h)]);try{var j=c.call(this,{frames:i}).toCSS([],{compress:g.compress||!1})}catch(k){f=b.split("\n"),d=n(k.index);for(var l=k.index,m=-1;l>=0&&b.charAt(l)!=="\n";l--)m++;throw{type:k.type,message:k.message,filename:a.filename,index:k.index,line:typeof d=="number"?d+1:null,callLine:k.call&&n(k.call)+1,callExtract:f[n(k.call)],stack:k.stack,column:m,extract:[f[d-1],f[d],f[d+1]]}}return g.compress?j.replace(/(\s)+/g,"$1"):j}}(h.eval);if(c=0&&b.charAt(v)!=="\n";v--)w++;u={name:"ParseError",message:"Syntax Error on line "+p,index:c,filename:a.filename,line:p,column:w,extract:[q[p-2],q[p-1],q[p]]}}this.imports.queue.length>0?n=function(){g(u,h)}:g(u,h)},parsers:{primary:function(){var a,b=[];while((a=s(this.mixin.definition)||s(this.rule)||s(this.ruleset)||s(this.mixin.call)||s(this.comment)||s(this.directive))||s(/^[\s\n]+/))a&&b.push(a);return b},comment:function(){var a;if(b.charAt(c)==="/"){if(b.charAt(c+1)==="/")return new e.Comment(s(/^\/\/.*/),!0);if(a=s(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))return new e.Comment(a)}},entities:{quoted:function(){var a,d=c,f;b.charAt(d)==="~"&&(d++,f=!0);if(b.charAt(d)==='"'||b.charAt(d)==="'"){f&&s("~");if(a=s(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/))return new e.Quoted(a[0],a[1]||a[2],f)}},keyword:function(){var a;if(a=s(/^[A-Za-z-]+/))return new e.Keyword(a)},call:function(){var a,b,d=c;if(!!(a=/^([\w-]+|%)\(/.exec(j[f]))){a=a[1].toLowerCase();if(a==="url")return null;c+=a.length;if(a==="alpha")return s(this.alpha);s("("),b=s(this.entities.arguments);if(!s(")"))return;if(a)return new e.Call(a,b,d)}},arguments:function(){var a=[],b;while(b=s(this.expression)){a.push(b);if(!s(","))break}return a},literal:function(){return s(this.entities.dimension)||s(this.entities.color)||s(this.entities.quoted)},url:function(){var a;if(b.charAt(c)==="u"&&!!s(/^url\(/)){a=s(this.entities.quoted)||s(this.entities.variable)||s(this.entities.dataURI)||s(/^[-\w%@$\/.&=:;#+?~]+/)||"";if(!s(")"))throw new Error("missing closing ) for url()");return new e.URL(a.value||a.data||a instanceof e.Variable?a:new e.Anonymous(a),o.paths)}},dataURI:function(){var a;if(s(/^data:/)){a={},a.mime=s(/^[^\/]+\/[^,;)]+/)||"",a.charset=s(/^;\s*charset=[^,;)]+/)||"",a.base64=s(/^;\s*base64/)||"",a.data=s(/^,\s*[^)]+/);if(a.data)return a}},variable:function(){var a,d=c;if(b.charAt(c)==="@"&&(a=s(/^@@?[\w-]+/)))return new e.Variable(a,d)},color:function(){var a;if(b.charAt(c)==="#"&&(a=s(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new e.Color(a[1])},dimension:function(){var a,d=b.charCodeAt(c);if(!(d>57||d<45||d===47))if(a=s(/^(-?\d*\.?\d+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn)?/))return new e.Dimension(a[1],a[2])},javascript:function(){var a,d=c,f;b.charAt(d)==="~"&&(d++,f=!0);if(b.charAt(d)==="`"){f&&s("~");if(a=s(/^`([^`]*)`/))return new e.JavaScript(a[1],c,f)}}},variable:function(){var a;if(b.charAt(c)==="@"&&(a=s(/^(@[\w-]+)\s*:/)))return a[1]},shorthand:function(){var a,b;if(!!t(/^[@\w.%-]+\/[@\w.-]+/)&&(a=s(this.entity))&&s("/")&&(b=s(this.entity)))return new e.Shorthand(a,b)},mixin:{call:function(){var a=[],d,f,g,h=c,i=b.charAt(c);if(i==="."||i==="#"){while(d=s(/^[#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/))a.push(new e.Element(f,d)),f=s(">");s("(")&&(g=s(this.entities.arguments))&&s(")");if(a.length>0&&(s(";")||t("}")))return new e.mixin.Call(a,g,h)}},definition:function(){var a,d=[],f,g,h,i;if(!(b.charAt(c)!=="."&&b.charAt(c)!=="#"||t(/^[^{]*(;|})/)))if(f=s(/^([#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+)\s*\(/)){a=f[1];while(h=s(this.entities.variable)||s(this.entities.literal)||s(this.entities.keyword)){if(h instanceof e.Variable)if(s(":"))if(i=s(this.expression))d.push({name:h.name,value:i});else throw new Error("Expected value");else d.push({name:h.name});else d.push({value:h});if(!s(","))break}if(!s(")"))throw new Error("Expected )");g=s(this.block);if(g)return new e.mixin.Definition(a,d,g)}}},entity:function(){return s(this.entities.literal)||s(this.entities.variable)||s(this.entities.url)||s(this.entities.call)||s(this.entities.keyword)||s(this.entities.javascript)||s(this.comment)},end:function(){return s(";")||t("}")},alpha:function(){var a;if(!!s(/^\(opacity=/i))if(a=s(/^\d+/)||s(this.entities.variable)){if(!s(")"))throw new Error("missing closing ) for alpha()");return new e.Alpha(a)}},element:function(){var a,b,c;c=s(this.combinator),a=s(/^(?:[.#]?|:*)(?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/)||s("*")||s(this.attribute)||s(/^\([^)@]+\)/);if(a)return new e.Element(c,a)},combinator:function(){var a,d=b.charAt(c);if(d===">"||d==="&"||d==="+"||d==="~"){c++;while(b.charAt(c)===" ")c++;return new e.Combinator(d)}if(d===":"&&b.charAt(c+1)===":"){c+=2;while(b.charAt(c)===" ")c++;return new e.Combinator("::")}return b.charAt(c-1)===" "?new e.Combinator(" "):new e.Combinator(null)},selector:function(){var a,d,f=[],g,h;while(d=s(this.element)){g=b.charAt(c),f.push(d);if(g==="{"||g==="}"||g===";"||g===",")break}if(f.length>0)return new e.Selector(f)},tag:function(){return s(/^[a-zA-Z][a-zA-Z-]*[0-9]?/)||s("*")},attribute:function(){var a="",b,c,d;if(!!s("[")){if(b=s(/^[a-zA-Z-]+/)||s(this.entities.quoted))(d=s(/^[|~*$^]?=/))&&(c=s(this.entities.quoted)||s(/^[\w-]+/))?a=[b,d,c.toCSS?c.toCSS():c].join(""):a=b;if(!s("]"))return;if(a)return"["+a+"]"}},block:function(){var a;if(s("{")&&(a=s(this.primary))&&s("}"))return a},ruleset:function(){var a=[],b,d,g;p();if(g=/^([.#: \w-]+)[\s\n]*\{/.exec(j[f]))c+=g[0].length-1,a=[new e.Selector([new e.Element(null,g[1])])];else while(b=s(this.selector)){a.push(b),s(this.comment);if(!s(","))break;s(this.comment)}if(a.length>0&&(d=s(this.block)))return new e.Ruleset(a,d);i=c,q()},rule:function(){var a,d,g=b.charAt(c),k,l;p();if(g!=="."&&g!=="#"&&g!=="&")if(a=s(this.variable)||s(this.property)){a.charAt(0)!="@"&&(l=/^([^@+\/'"*`(;{}-]*);/.exec(j[f]))?(c+=l[0].length-1,d=new e.Anonymous(l[1])):a==="font"?d=s(this.font):d=s(this.value),k=s(this.important);if(d&&s(this.end))return new e.Rule(a,d,k,h);i=c,q()}},"import":function(){var a;if(s(/^@import\s+/)&&(a=s(this.entities.quoted)||s(this.entities.url))&&s(";"))return new e.Import(a,o)},directive:function(){var a,d,f,g;if(b.charAt(c)==="@"){if(d=s(this["import"]))return d;if(a=s(/^@media|@page|@-[-a-z]+/)){g=(s(/^[^{]+/)||"").trim();if(f=s(this.block))return new e.Directive(a+" "+g,f)}else if(a=s(/^@[-a-z]+/))if(a==="@font-face"){if(f=s(this.block))return new e.Directive(a,f)}else if((d=s(this.entity))&&s(";"))return new e.Directive(a,d)}},font:function(){var a=[],b=[],c,d,f,g;while(g=s(this.shorthand)||s(this.entity))b.push(g);a.push(new e.Expression(b));if(s(","))while(g=s(this.expression)){a.push(g);if(!s(","))break}return new e.Value(a)},value:function(){var a,b=[],c;while(a=s(this.expression)){b.push(a);if(!s(","))break}if(b.length>0)return new e.Value(b)},important:function(){if(b.charAt(c)==="!")return s(/^! *important/)},sub:function(){var a;if(s("(")&&(a=s(this.expression))&&s(")"))return a},multiplication:function(){var a,b,c,d;if(a=s(this.operand)){while((c=s("/")||s("*"))&&(b=s(this.operand)))d=new e.Operation(c,[d||a,b]);return d||a}},addition:function(){var a,d,f,g;if(a=s(this.multiplication)){while((f=s(/^[-+]\s+/)||b.charAt(c-1)!=" "&&(s("+")||s("-")))&&(d=s(this.multiplication)))g=new e.Operation(f,[g||a,d]);return g||a}},operand:function(){var a,d=b.charAt(c+1);b.charAt(c)==="-"&&(d==="@"||d==="(")&&(a=s("-"));var f=s(this.sub)||s(this.entities.dimension)||s(this.entities.color)||s(this.entities.variable)||s(this.entities.call);return a?new e.Operation("*",[new e.Dimension(-1),f]):f},expression:function(){var a,b,c=[],d;while(a=s(this.addition)||s(this.entity))c.push(a);if(c.length>0)return new e.Expression(c)},property:function(){var a;if(a=s(/^(\*?-?[-a-z_0-9]+)\s*:/))return a[1]}}}},typeof a!="undefined"&&(d.Parser.importer=function(a,b,c,d){a.charAt(0)!=="/"&&b.length>0&&(a=b[0]+a),o({href:a,title:a,type:d.mime},c,!0)}),function(a){function d(a){return Math.min(1,Math.max(0,a))}function c(b){if(b instanceof a.Dimension)return parseFloat(b.unit=="%"?b.value/100:b.value);if(typeof b=="number")return b;throw{error:"RuntimeError",message:"color functions take numbers as parameters"}}function b(b){return a.functions.hsla(b.h,b.s,b.l,b.a)}a.functions={rgb:function(a,b,c){return this.rgba(a,b,c,1)},rgba:function(b,d,e,f){var g=[b,d,e].map(function(a){return c(a)}),f=c(f);return new a.Color(g,f)},hsl:function(a,b,c){return this.hsla(a,b,c,1)},hsla:function(a,b,d,e){function h(a){a=a<0?a+1:a>1?a-1:a;return a*6<1?g+(f-g)*a*6:a*2<1?f:a*3<2?g+(f-g)*(2/3-a)*6:g}a=c(a)%360/360,b=c(b),d=c(d),e=c(e);var f=d<=.5?d*(b+1):d+b-d*b,g=d*2-f;return this.rgba(h(a+1/3)*255,h(a)*255,h(a-1/3)*255,e)},hue:function(b){return new a.Dimension(Math.round(b.toHSL().h))},saturation:function(b){return new a.Dimension(Math.round(b.toHSL().s*100),"%")},lightness:function(b){return new a.Dimension(Math.round(b.toHSL().l*100),"%")},alpha:function(b){return new a.Dimension(b.toHSL().a)},saturate:function(a,c){var e=a.toHSL();e.s+=c.value/100,e.s=d(e.s);return b(e)},desaturate:function(a,c){var e=a.toHSL();e.s-=c.value/100,e.s=d(e.s);return b(e)},lighten:function(a,c){var e=a.toHSL();e.l+=c.value/100,e.l=d(e.l);return b(e)},darken:function(a,c){var e=a.toHSL();e.l-=c.value/100,e.l=d(e.l);return b(e)},fadein:function(a,c){var e=a.toHSL();e.a+=c.value/100,e.a=d(e.a);return b(e)},fadeout:function(a,c){var e=a.toHSL();e.a-=c.value/100,e.a=d(e.a);return b(e)},spin:function(a,c){var d=a.toHSL(),e=(d.h+c.value)%360;d.h=e<0?360+e:e;return b(d)},mix:function(b,c,d){var e=d.value/100,f=e*2-1,g=b.toHSL().a-c.toHSL().a,h=((f*g==-1?f:(f+g)/(1+f*g))+1)/2,i=1-h,j=[b.rgb[0]*h+c.rgb[0]*i,b.rgb[1]*h+c.rgb[1]*i,b.rgb[2]*h+c.rgb[2]*i],k=b.alpha*e+c.alpha*(1-e);return new a.Color(j,k)},greyscale:function(b){return this.desaturate(b,new a.Dimension(100))},e:function(b){return new a.Anonymous(b instanceof a.JavaScript?b.evaluated:b)},escape:function(b){return new a.Anonymous(encodeURI(b.value).replace(/=/g,"%3D").replace(/:/g,"%3A").replace(/#/g,"%23").replace(/;/g,"%3B").replace(/\(/g,"%28").replace(/\)/g,"%29"))},"%":function(b){var c=Array.prototype.slice.call(arguments,1),d=b.value;for(var e=0;e255?255:a<0?0:a).toString(16);return a.length===1?"0"+a:a}).join("")},operate:function(b,c){var d=[];c instanceof a.Color||(c=c.toColor());for(var e=0;e<3;e++)d[e]=a.operate(b,this.rgb[e],c.rgb[e]);return new a.Color(d,this.alpha+c.alpha)},toHSL:function(){var a=this.rgb[0]/255,b=this.rgb[1]/255,c=this.rgb[2]/255,d=this.alpha,e=Math.max(a,b,c),f=Math.min(a,b,c),g,h,i=(e+f)/2,j=e-f;if(e===f)g=h=0;else{h=i>.5?j/(2-e-f):j/(e+f);switch(e){case a:g=(b-c)/j+(b":a.compress?">":" > "}[this.value]}}(c("less/tree")),function(a){a.Expression=function(a){this.value=a},a.Expression.prototype={eval:function(b){return this.value.length>1?new a.Expression(this.value.map(function(a){return a.eval(b)})):this.value.length===1?this.value[0].eval(b):this},toCSS:function(a){return this.value.map(function(b){return b.toCSS(a)}).join(" ")}}}(c("less/tree")),function(a){a.Import=function(b,c){var d=this;this._path=b,b instanceof a.Quoted?this.path=/\.(le?|c)ss$/.test(b.value)?b.value:b.value+".less":this.path=b.value.value||b.value,this.css=/css$/.test(this.path),this.css||c.push(this.path,function(a){if(!a)throw new Error("Error parsing "+d.path);d.root=a})},a.Import.prototype={toCSS:function(){return this.css?"@import "+this._path.toCSS()+";\n":""},eval:function(b){var c;if(this.css)return this;c=new a.Ruleset(null,this.root.rules.slice(0));for(var d=0;d0){c=this.arguments&&this.arguments.map(function(b){return b.eval(a)});for(var g=0;g0&&c>this.params.length)return!1;d=Math.min(c,this.arity);for(var e=0;e1?Array.prototype.push.apply(d,e.find(new a.Selector(b.elements.slice(1)),c)):d.push(e);break}});return this._lookups[g]=d},toCSS:function(b,c){var d=[],e=[],f=[],g=[],h,i;if(!this.root)if(b.length===0)g=this.selectors.map(function(a){return[a]});else for(var j=0;j0&&(h=g.map(function(a){return a.map(function(a){return a.toCSS(c)}).join("").trim()}).join(c.compress?",":g.length>3?",\n":", "),d.push(h,(c.compress?"{":" {\n ")+e.join(c.compress?"":"\n ")+(c.compress?"}":"\n}\n"))),d.push(f);return d.join("")+(c.compress?"\n":"")}}}(c("less/tree")),function(a){a.Selector=function(a){this.elements=a,this.elements[0].combinator.value===""&&(this.elements[0].combinator.value=" ")},a.Selector.prototype.match=function(a){return this.elements[0].value===a.elements[0].value?!0:!1},a.Selector.prototype.toCSS=function(a){if(this._css)return this._css;return this._css=this.elements.map(function(b){return typeof b=="string"?" "+b.trim():b.toCSS(a)}).join("")}}(c("less/tree")),function(b){b.URL=function(b,c){b.data?this.attrs=b:(!/^(?:https?:\/|file:\/|data:\/)?\//.test(b.value)&&c.length>0&&typeof a!="undefined"&&(b.value=c[0]+(b.value.charAt(0)==="/"?b.value.slice(1):b.value)),this.value=b,this.paths=c)},b.URL.prototype={toCSS:function(){return"url("+(this.attrs?"data:"+this.attrs.mime+this.attrs.charset+this.attrs.base64+this.attrs.data:this.value.toCSS())+")"},eval:function(a){return this.attrs?this:new b.URL(this.value.eval(a),this.paths)}}}(c("less/tree")),function(a){a.Value=function(a){this.value=a,this.is="value"},a.Value.prototype={eval:function(b){return this.value.length===1?this.value[0].eval(b):new a.Value(this.value.map(function(a){return a.eval(b)}))},toCSS:function(a){return this.value.map(function(b){return b.toCSS(a)}).join(a.compress?",":", ")}}}(c("less/tree")),function(a){a.Variable=function(a,b){this.name=a,this +.index=b},a.Variable.prototype={eval:function(b){var c,d,e=this.name;e.indexOf("@@")==0&&(e="@"+(new a.Variable(e.slice(1))).eval(b).value);if(c=a.find(b.frames,function(a){if(d=a.variable(e))return d.value.eval(b)}))return c;throw{message:"variable "+e+" is undefined",index:this.index}}}}(c("less/tree")),c("less/tree").find=function(a,b){for(var c=0,d;c1?"["+a.value.map(function(a){return a.toCSS(!1)}).join(", ")+"]":a.toCSS(!1)};var g=location.protocol==="file:"||location.protocol==="chrome:"||location.protocol==="chrome-extension:"||location.protocol==="resource:";d.env=d.env||(location.hostname=="127.0.0.1"||location.hostname=="0.0.0.0"||location.hostname=="localhost"||location.port.length>0||g?"development":"production"),d.async=!1,d.poll=d.poll||(g?1e3:1500),d.watch=function(){return this.watchMode=!0},d.unwatch=function(){return this.watchMode=!1},d.env==="development"?(d.optimization=0,/!watch/.test(location.hash)&&d.watch(),d.watchTimer=setInterval(function(){d.watchMode&&n(function(a,b,c){a&&q(a.toCSS(),b,c.lastModified)})},d.poll)):d.optimization=3;var h;try{h=typeof a.localStorage=="undefined"?null:a.localStorage}catch(i){h=null}var j=document.getElementsByTagName("link"),k=/^text\/(x-)?less$/;d.sheets=[];for(var l=0;l