diff options
Diffstat (limited to 'share/www/script')
-rw-r--r-- | share/www/script/jquery.couch.js | 4 | ||||
-rw-r--r-- | share/www/script/jquery.resizer.js | 17 |
2 files changed, 16 insertions, 5 deletions
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 = $("<div></div>").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}; |