From 9ef693c6f7d0c720e33b5415bd78191d52e1eef8 Mon Sep 17 00:00:00 2001 From: Einar Egilsson Date: Tue, 30 Aug 2011 14:55:16 +0200 Subject: [PATCH] Some style fixes --- chrome/js/settings.js | 18 +++++++++++------- chrome/settings.html | 8 ++++---- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/chrome/js/settings.js b/chrome/js/settings.js index 29cdf29..1a190ff 100644 --- a/chrome/js/settings.js +++ b/chrome/js/settings.js @@ -97,7 +97,12 @@ $(document).ready(function() { } ev.preventDefault(); }); - + + $('#redirect-list li div a.edit').live('click', function(ev) { + var redirect = $(this.parentNode.parentNode).data('redirect'); + $('#redirect-form').show(); + ev.preventDefault(); + }); databind(); $('#import').click(importRedirects); @@ -112,13 +117,12 @@ $(document).ready(function() { bindConfig(); prefs.addListener({ changedPrefs:bindConfig}); - var moving = false; - - function drag() { - - } + var movingElement = null; - $('li').mousedown(function() { + $('li').mousedown(function(ev) { + if (ev.target && ev.target.tagName == 'A') { + return; + } $(this).css('background', '-moz-linear-gradient(top, #aac, #99b)'); $('#redirect-list').css('cursor', 'move'); movingElement = this; diff --git a/chrome/settings.html b/chrome/settings.html index ec98b10..43318bf 100644 --- a/chrome/settings.html +++ b/chrome/settings.html @@ -4,7 +4,7 @@ Redirector Extension Settings