summaryrefslogtreecommitdiff
path: root/share/www/script/jquery.resizer.js
diff options
context:
space:
mode:
authorChristopher Lenz <cmlenz@apache.org>2008-06-03 15:16:29 +0000
committerChristopher Lenz <cmlenz@apache.org>2008-06-03 15:16:29 +0000
commit0193f6280ce311c86e097ed38ad5802d3dcf7734 (patch)
tree16c90d6903ca00e1b70d3f9cdd7b49f750bc35b3 /share/www/script/jquery.resizer.js
parent3544891c723ddb79a3daa54ae3d50a42851447d1 (diff)
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
Diffstat (limited to 'share/www/script/jquery.resizer.js')
-rw-r--r--share/www/script/jquery.resizer.js17
1 files changed, 14 insertions, 3 deletions
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};