Add missing Menu.js tooltip actions.

This commit is contained in:
Paulo Gustavo Veiga 2012-04-05 00:58:38 -03:00
parent 3b465940bb
commit 1aa4859da1
4 changed files with 31 additions and 100 deletions

View File

@ -327,6 +327,7 @@ mindplot.widget.Menu = new Class({
}
});
});
this._registerTooltip('tagIt', "Tag");
}
var shareElem = $('shareIt');
@ -345,6 +346,8 @@ mindplot.widget.Menu = new Class({
});
});
this._registerTooltip('shareIt', "Collaborators");
}
var publishElem = $('publishIt');
@ -363,6 +366,7 @@ mindplot.widget.Menu = new Class({
});
});
this._registerTooltip('publishIt', "Publish");
}
var historyElem = $('history');
@ -381,6 +385,7 @@ mindplot.widget.Menu = new Class({
}
});
});
this._registerTooltip('history', "History");
}
this._registerEvents(designer);

View File

@ -27,7 +27,6 @@ import javax.servlet.http.HttpServletResponse;
import com.wisemapping.model.MindMap;
public class PublicViewController extends BaseMultiActionController {
private static final String MAP_ID = "mapId";
protected ModelAndView handleNoSuchRequestHandlingMethod(NoSuchRequestHandlingMethodException noSuchRequestHandlingMethodException, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
throws Exception

View File

@ -1,73 +0,0 @@
/*
* Copyright [2011] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
* "powered by wisemapping" text requirement on every single page;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the license at
*
* http://www.wisemapping.org/license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var Menu = {
init: function ()
{
$ES('.subMenu2', $('mydocs')).each(function(el) {
var parent = el.getParent();
var button = $E('.button', parent);
if (button.getTag() == 'div')
{
el.setStyle('top', '25px');
el.setStyle('left', '7px');
}
button.addEvent('click', this.updateSubMenu.bindWithEvent(this, [button, el]));
button.state = "closed";
}, this);
this.currentElement = null;
this.currentItem = null;
$(document).addEvent('click', this.hide.bindWithEvent(this));
},
updateSubMenu: function(event, src, el)
{
if (src.state == "open")
{
el.setStyle("visibility", "hidden");
src.state = "closed";
this.currentElement = null;
this.currentItem = null;
}
else
{
if (this.currentElement != null)
{
this.hide.attempt(null, this);
}
this.currentElement = el;
this.currentItem = src;
el.setStyle("visibility", "visible");
src.state = "open";
}
if (event != null)
{
var evt = new Event(event);
evt.stopPropagation();
}
},
hide: function(event)
{
if (this.currentElement != null)
{
this.updateSubMenu.attempt([event, this.currentItem, this.currentElement], this);
}
}
};
Window.onDomReady(Menu.init.bind(Menu));

View File

@ -1,91 +1,91 @@
<div id="toolbar">
<div id="persist" class="buttonContainer">
<div id="save" class="buttonOn" title="Save">
<div id="save" class="buttonOn">
<img src="../images/save.png"/>
</div>
<div id="discard" class="buttonOn" title="Discard">
<div id="discard" class="buttonOn">
<img src="../images/discard.png"/>
</div>
<div id="print" class="buttonOn" title="Print">
<div id="print" class="buttonOn">
<img src="../images/print.png"/>
</div>
<div id="export" class="buttonOn" title="Export">
<div id="export" class="buttonOn">
<img src="../images/export.png"/>
</div>
</div>
<div id="edit" class="buttonContainer">
<div id="undoEdition" class="buttonOn" title="Undo Edition">
<div id="undoEdition" class="buttonOn">
<img src="../images/undo.png"/>
</div>
<div id="redoEdition" class="buttonOn" title="Redo Edition">
<div id="redoEdition" class="buttonOn">
<img src="../images/redo.png"/>
</div>
</div>
<div id="zoom" class="buttonContainer">
<div id="zoomIn" class="buttonOn" title="Zoom In">
<div id="zoomIn" class="buttonOn">
<img src="../images/zoom-in.png"/>
</div>
<div id="zoomOut" class="buttonOn" title="Zoom Out">
<div id="zoomOut" class="buttonOn">
<img src="../images/zoom-out.png"/>
</div>
</div>
<div id="node" class="buttonContainer">
<div id="topicShape" class="buttonExtOn" title="Topic Shape">
<div id="topicShape" class="buttonExtOn">
<img src="../images/topic-shape.png"/>
</div>
<div id="addTopic" class="buttonOn" title="Add Topic">
<div id="addTopic" class="buttonOn">
<img src="../images/topic-add.png"/>
</div>
<div id="deleteTopic" class="buttonOn" title="Delete">
<div id="deleteTopic" class="buttonOn">
<img src="../images/topic-delete.png"/>
</div>
<div id="topicBorder" class="buttonExtOn" title="Border Color">
<div id="topicBorder" class="buttonExtOn">
<img src="../images/topic-border.png"/>
</div>
<div id="topicColor" class="buttonExtOn" title="Background Color">
<div id="topicColor" class="buttonExtOn">
<img src="../images/topic-color.png"/>
</div>
<div id="topicIcon" class="buttonExtOn" title="Add Icon">
<div id="topicIcon" class="buttonExtOn">
<img src="../images/topic-icon.png"/>
</div>
<div id="topicNote" class="buttonOn" title="Add Note">
<div id="topicNote" class="buttonOn">
<img src="../images/topic-note.png"/>
</div>
<div id="topicLink" class="buttonOn" title="Add Link">
<div id="topicLink" class="buttonOn">
<img src="../images/topic-link.png"/>
</div>
<div id="topicRelation" class="buttonOn" title="Add Relationship">
<div id="topicRelation" class="buttonOn">
<img src="../images/topic-relation.png"/>
</div>
</div>
<div id="font" class="buttonContainer">
<div id="fontFamily" class="buttonOn" title="Font Style">
<div id="fontFamily" class="buttonOn">
<img src="../images/font-type.png"/>
</div>
<div id="fontSize" class="buttonExtOn" title="Font Size">
<div id="fontSize" class="buttonExtOn">
<img src="../images/font-size.png"/>
</div>
<div id="fontBold" class="buttonOn" title="Bold Style">
<div id="fontBold" class="buttonOn">
<img src="../images/font-bold.png"/>
</div>
<div id="fontItalic" class="buttonOn" title="Italic Style">
<div id="fontItalic" class="buttonOn">
<img src="../images/font-italic.png"/>
</div>
<div id="fontColor" class="buttonExtOn" title="Fond Color" style="padding-top:4px">
<div id="fontColor" class="buttonExtOn">
<img src="../images/font-color.png"/>
</div>
</div>
<div id="collaboration" class="buttonContainer">
<div id="tagIt" class="buttonOn" title="Tag">
<div id="tagIt" class="buttonOn">
<img src="../images/tag.png"/>
</div>
<div id="shareIt" class="buttonOn" title="Share">
<div id="shareIt" class="buttonOn">
<img src="../images/share.png"/>
</div>
<div id="publishIt" class="buttonOn" title="Publish">
<div id="publishIt" class="buttonOn">
<img src="../images/public.png"/>
</div>
<div id="history" class="buttonOn" title="History">
<div id="history" class="buttonOn">
<img src="../images/history.png"/>
</div>
</div>