From dc0fb12b09925bdf408d9b70c33283653a2bbd29 Mon Sep 17 00:00:00 2001 From: Chad Weider Date: Wed, 29 Feb 2012 14:13:02 -0800 Subject: Remove onclick attributes from editbar. --- src/static/js/pad.js | 7 ------- src/static/js/pad_editbar.js | 7 +++++++ src/templates/pad.html | 36 ++++++++++++++++++------------------ 3 files changed, 25 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/static/js/pad.js b/src/static/js/pad.js index dbbee43c..99f4a0b9 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -683,13 +683,6 @@ var pad = { paduserlist.removeGuestPrompt(msg.guestId); } }, - editbarClick: function(cmd) - { - if (padeditbar) - { - padeditbar.toolbarClick(cmd); - } - }, dmesg: function(m) { if (pad.getIsDebugEnabled()) diff --git a/src/static/js/pad_editbar.js b/src/static/js/pad_editbar.js index 268fb029..51c5a3c6 100644 --- a/src/static/js/pad_editbar.js +++ b/src/static/js/pad_editbar.js @@ -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() { diff --git a/src/templates/pad.html b/src/templates/pad.html index 0798f045..0418182b 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -21,65 +21,65 @@
-- cgit v1.2.3