From dc0fb12b09925bdf408d9b70c33283653a2bbd29 Mon Sep 17 00:00:00 2001 From: Chad Weider Date: Wed, 29 Feb 2012 14:13:02 -0800 Subject: [PATCH 01/10] 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(-) diff --git a/src/static/js/pad.js b/src/static/js/pad.js index dbbee43c6..99f4a0b9c 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 268fb0297..51c5a3c6a 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 0798f045e..0418182bf 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -21,65 +21,65 @@
From ab8b2cae21383b643b8160399dc0b100fc7f80e1 Mon Sep 17 00:00:00 2001 From: Chad Weider Date: Wed, 29 Feb 2012 16:02:16 -0800 Subject: [PATCH 02/10] Remove nonsense styles. --- src/static/css/pad.css | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/static/css/pad.css b/src/static/css/pad.css index e052c3293..233942fac 100644 --- a/src/static/css/pad.css +++ b/src/static/css/pad.css @@ -119,9 +119,6 @@ a img { .toolbar ul li a { display: block } -.toolbar ul li a img { - padding: 1px -} .toolbar ul { float: left } From 2a3fce0cf16fa90df9c122e7c752b00124d228cb Mon Sep 17 00:00:00 2001 From: Chad Weider Date: Wed, 29 Feb 2012 16:47:16 -0800 Subject: [PATCH 03/10] The showusers control is an anchor. --- src/templates/pad.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/templates/pad.html b/src/templates/pad.html index 0418182bf..1fd0372b7 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -77,9 +77,11 @@ -
  • - - 1 +
  • + + + 1 +
  • <% e.end_block(); %> From 1ea889bfab9c0498b4fbbdb40364bb725bff026b Mon Sep 17 00:00:00 2001 From: Chad Weider Date: Wed, 29 Feb 2012 14:39:01 -0800 Subject: [PATCH 04/10] Anchors are not icons --- src/static/css/pad.css | 6 ++-- src/templates/pad.html | 64 +++++++++++++++++++++++++++++++----------- 2 files changed, 50 insertions(+), 20 deletions(-) diff --git a/src/static/css/pad.css b/src/static/css/pad.css index 233942fac..71f482f50 100644 --- a/src/static/css/pad.css +++ b/src/static/css/pad.css @@ -87,10 +87,6 @@ a img { color: #ccc; position: absolute; } -.toolbar ul li a span { - position: relative; - top: -2px; -} .toolbar ul li:hover { background: #fff; background: -webkit-linear-gradient(#f4f4f4, #e4e4e4); @@ -425,6 +421,7 @@ a#hidetopmsg { top: 0; width: 56px; z-index: 10; + display: inline-block; } .toolbarsavetable { position: absolute; @@ -1232,6 +1229,7 @@ ul#colorpickerswatches li:hover { height: 16px; background-image: url('../../static/img/etherpad_lite_icons.png'); background-repeat: no-repeat; + display: inline-block; margin-left: 1px; margin-top: 1px; } diff --git a/src/templates/pad.html b/src/templates/pad.html index 1fd0372b7..94a75f510 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -22,60 +22,92 @@