From 0193f6280ce311c86e097ed38ad5802d3dcf7734 Mon Sep 17 00:00:00 2001 From: Christopher Lenz Date: Tue, 3 Jun 2008 15:16:29 +0000 Subject: Futon: fixes for IE6/7 compatibility, some minor polish for the map/reduce code editor, updated logo to match the version used elsewhere. git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@662823 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/jquery.couch.js | 4 ++-- share/www/script/jquery.resizer.js | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) (limited to 'share/www/script') diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js index 1e3e623c..2121cf0c 100644 --- a/share/www/script/jquery.couch.js +++ b/share/www/script/jquery.couch.js @@ -11,7 +11,7 @@ // the License. (function($) { - $.couch = $.couch || {} + $.couch = $.couch || {}; $.fn.extend($.couch, { allDbs: function(options) { @@ -120,7 +120,7 @@ alert("An error occurred retrieving a list of all documents: " + resp.reason); } - }, + } }); }, openDoc: function(docId, options) { diff --git a/share/www/script/jquery.resizer.js b/share/www/script/jquery.resizer.js index f020d3e2..9e0a291b 100644 --- a/share/www/script/jquery.resizer.js +++ b/share/www/script/jquery.resizer.js @@ -16,18 +16,29 @@ options = options || {}; options.always = options.always || false; options.grippie = options.grippie || null; + options.horizontal = options.horizontal || false; options.minWidth = options.minWidth || 100; options.maxWidth = options.maxWidth || null; + options.vertical = options.vertical || false; options.minHeight = options.minHeight || 32; options.maxHeight = options.maxHeight || null; - if (!options.always && $.browser.safari && parseInt($.browser.version) >= 522) - return this; // safari3 and later provides textarea resizing natively - return this.each(function() { + if ($(this).is("textarea") && !options.always && + $.browser.safari && parseInt($.browser.version) >= 522) + return this; // safari3 and later provides textarea resizing natively + var grippie = options.grippie; if (!grippie) grippie = $("
").appendTo(this.parentNode); grippie.addClass("grippie"); + if (options.horizontal && options.vertical) { + grippie.css("cursor", "nwse-resize"); + } else if (options.horizontal) { + grippie.css("cursor", "col-resize"); + } else if (options.vertical) { + grippie.css("cursor", "row-resize"); + } + var elem = $(this); grippie.mousedown(function(e) { var pos = {x: e.screenX, y: e.screenY}; -- cgit v1.2.3