Remove onclick attributes from editbar.
parent
c406d076de
commit
dc0fb12b09
|
@ -683,13 +683,6 @@ var pad = {
|
|||
paduserlist.removeGuestPrompt(msg.guestId);
|
||||
}
|
||||
},
|
||||
editbarClick: function(cmd)
|
||||
{
|
||||
if (padeditbar)
|
||||
{
|
||||
padeditbar.toolbarClick(cmd);
|
||||
}
|
||||
},
|
||||
dmesg: function(m)
|
||||
{
|
||||
if (pad.getIsDebugEnabled())
|
||||
|
|
|
@ -97,8 +97,15 @@ var padeditbar = (function()
|
|||
var self = {
|
||||
init: function()
|
||||
{
|
||||
var self = this;
|
||||
$("#editbar .editbarbutton").attr("unselectable", "on"); // for IE
|
||||
$("#editbar").removeClass("disabledtoolbar").addClass("enabledtoolbar");
|
||||
$("#editbar [data-key]").each(function (i, e) {
|
||||
$(e).click(function (event) {
|
||||
self.toolbarClick($(e).attr('data-key'));
|
||||
event.preventDefault();
|
||||
});
|
||||
});
|
||||
},
|
||||
isEnabled: function()
|
||||
{
|
||||
|
|
|
@ -21,65 +21,65 @@
|
|||
<div id="editbar" class="toolbar">
|
||||
<ul class="menu_left">
|
||||
<% e.begin_block("editbarMenuLeft"); %>
|
||||
<li id="bold" onClick="window.pad&&pad.editbarClick('bold');return false">
|
||||
<li id="bold" data-key="bold">
|
||||
<a class="buttonicon buttonicon-bold" title="Bold (ctrl-B)"></a>
|
||||
</li>
|
||||
<li id="italic" onClick="window.pad&&pad.editbarClick('italic'); return false;">
|
||||
<li id="italic" data-key="italic">
|
||||
<a class="buttonicon buttonicon-italic" title="Italics (ctrl-I)"></a>
|
||||
</li>
|
||||
<li id="underline" onClick="window.pad&&pad.editbarClick('underline');return false;" >
|
||||
<li id="underline" data-key="underline">
|
||||
<a class="buttonicon buttonicon-underline" title="Underline (ctrl-U)"></a>
|
||||
</li>
|
||||
<li id="strikethrough" onClick="window.pad&&pad.editbarClick('strikethrough');return false;">
|
||||
<li id="strikethrough" data-key="strikethrough">
|
||||
<a class="buttonicon buttonicon-strikethrough" title="Strikethrough"></a>
|
||||
</li>
|
||||
<li class="separator"></li>
|
||||
<li id="oderedlist" onClick="window.pad&&pad.editbarClick('insertorderedlist');return false;">
|
||||
<li id="oderedlist" data-key="insertorderedlist">
|
||||
<a class="buttonicon buttonicon-insertorderedlist" title="Toggle Ordered List"></a>
|
||||
</li>
|
||||
<li id="unoderedlist" onClick="window.pad&&pad.editbarClick('insertunorderedlist');return false;">
|
||||
<li id="unoderedlist" data-key="insertunorderedlist">
|
||||
<a class="buttonicon buttonicon-insertunorderedlist" title="Toggle Bullet List"></a>
|
||||
</li>
|
||||
<li id="indent" onClick="window.pad&&pad.editbarClick('indent');return false;">
|
||||
<li id="indent" data-key="indent">
|
||||
<a class="buttonicon buttonicon-indent" title="Indent"></a>
|
||||
</li>
|
||||
<li id="outdent" onClick="window.pad&&pad.editbarClick('outdent');return false;">
|
||||
<li id="outdent" data-key="outdent">
|
||||
<a class="buttonicon buttonicon-outdent" title="Unindent"></a>
|
||||
</li>
|
||||
<li class="separator"></li>
|
||||
<li id="undo" onClick="window.pad&&pad.editbarClick('undo');return false;">
|
||||
<li id="undo" data-key="undo">
|
||||
<a class="buttonicon buttonicon-undo" title="Undo (ctrl-Z)"></a>
|
||||
</li>
|
||||
<li id="redo" onClick="window.pad&&pad.editbarClick('redo');return false;">
|
||||
<li id="redo" data-key="redo">
|
||||
<a class="buttonicon buttonicon-redo" title="Redo (ctrl-Y)"></a>
|
||||
</li>
|
||||
<li class="separator"></li>
|
||||
<li id="clearAuthorship" onClick="window.pad&&pad.editbarClick('clearauthorship');return false;">
|
||||
<li id="clearAuthorship" data-key="clearauthorship">
|
||||
<a class="buttonicon buttonicon-clearauthorship" title="Clear Authorship Colors"></a>
|
||||
</li>
|
||||
<% e.end_block(); %>
|
||||
</ul>
|
||||
<ul class="menu_right">
|
||||
<% e.begin_block("editbarMenuRight"); %>
|
||||
<li id="settingslink" onClick="window.pad&&pad.editbarClick('settings');return false;">
|
||||
<li id="settingslink" data-key="settings">
|
||||
<a class="buttonicon buttonicon-settings" title="Settings of this pad"></a>
|
||||
</li>
|
||||
<li id="importexportlink" onClick="window.pad&&pad.editbarClick('import_export');return false;">
|
||||
<li id="importexportlink" data-key="import_export">
|
||||
<a class="buttonicon buttonicon-import_export" title="Import/Export from/to different document formats"></a>
|
||||
</li>
|
||||
<li id="embedlink" onClick="window.pad&&pad.editbarClick('embed');return false;">
|
||||
<li id="embedlink" data-key="embed">
|
||||
<a class="buttonicon buttonicon-embed" title="Share and Embed this pad"></a>
|
||||
</li>
|
||||
<li id="revisionlink" onClick="window.pad&&pad.editbarClick('savedRevision');return false;">
|
||||
<li id="revisionlink" data-key="savedRevision">
|
||||
<a class="buttonicon buttonicon-savedRevision" title="Mark this revision as a saved revision"></a>
|
||||
</li>
|
||||
<li class="separator"></li>
|
||||
<li id="timesliderlink" onClick="document.location = document.location.pathname+ '/timeslider'">
|
||||
<a class="buttonicon buttonicon-history" title="Show the history of this pad"></a>
|
||||
</li>
|
||||
<li id="usericon" onClick="window.pad&&pad.editbarClick('showusers');return false;" title="Show connected users">
|
||||
<span class="buttonicon buttonicon-showusers" id="usericonback"></span>
|
||||
<span id="online_count">1</span>
|
||||
<li id="usericon" data-key="showusers" title="Show connected users">
|
||||
<span class="buttonicon buttonicon-showusers" id="usericonback"></span>
|
||||
<span id="online_count">1</span>
|
||||
</li>
|
||||
<% e.end_block(); %>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue