From 3b4a1e1036ab2a08b22a7b19ed6cdada067a66f3 Mon Sep 17 00:00:00 2001 From: Tero Piirainen Date: Thu, 21 Jan 2010 15:39:26 +0000 Subject: [PATCH 1/8] First new items for jQuery Tools 1.3.0 --- src/accordion/accordion.js | 91 +++++++++++++ src/form/form.upload.js | 244 ++++++++++++++++++++++++++++++++++ test/accordion/accordion.html | 119 +++++++++++++++++ 3 files changed, 454 insertions(+) create mode 100644 src/accordion/accordion.js create mode 100644 src/form/form.upload.js create mode 100644 test/accordion/accordion.html diff --git a/src/accordion/accordion.js b/src/accordion/accordion.js new file mode 100644 index 0000000..9a270c7 --- /dev/null +++ b/src/accordion/accordion.js @@ -0,0 +1,91 @@ + +(function($) { + $.fn.accordion = function(options) { + var DEFAULTS = { + orientation: "vertical", + min: 0, + max: 200, + sticky: false, + event: "mouseenter", + duration: 500, + pane: ".pane", + defaultPane: 0 + }; + + options = $.extend(DEFAULTS, options); + + this.each(function() { + var panes = $(options.pane, this); + var currentPane; + var dummy = document.createElement("span"); + + if (panes.length) { + if (options.orientation == "vertical") { + var STYLE_PROPERTY = "height"; + var OFFSET_PROPERTY = "offsetHeight"; + } else { + STYLE_PROPERTY = "width"; + OFFSET_PROPERTY = "offsetWidth"; + + $(this).next().css({clear: "left"}); + var lastPane = panes.get(panes.length - 1); + $(this).css({ + width: lastPane.offsetLeft + lastPane.offsetWidth - panes[0].offsetLeft, + height: lastPane.offsetHeight, + overflow: "hidden" + }); + } + + var size = panes[0][OFFSET_PROPERTY]; + + panes.bind(options.event, function() { + currentPane = this; + animatePanes(options.max, options.min); + }); + + if (options.sticky) { + currentPane = panes.get(options.defaultPane); + animatePanes(options.max, options.min, 1); + } else { + $(this).mouseleave(function() { + animatePanes(size); + }); + } + } + + function animatePanes(max, min, duration) { + if (!currentPane) return; + + if (duration == null) duration = options.duration; + + var totalSize = size * panes.length; + + var sizes = []; + panes.each(function(i) { + sizes[i] = this[OFFSET_PROPERTY]; + }); + + var collapsedSize = min || Math.round((totalSize - max) / (panes.length - 1)); + + $(dummy).stop(); + dummy.style.step = 0; + $(dummy).animate({step: 1}, { + duration: duration, + easing: options.easing, + step: function(step) { + var expandedSize = totalSize; + for (var i = 0, pane; pane = panes[i]; i++) { + if (pane != currentPane) { + var value = sizes[i] + Math.round(step * (collapsedSize - sizes[i])); + if (value < 0) value = 0; + pane.style[STYLE_PROPERTY] = value + "px"; + expandedSize -= value; + } + } + currentPane.style[STYLE_PROPERTY] = expandedSize + "px"; + } + }); + }; + }); + }; +})(jQuery); diff --git a/src/form/form.upload.js b/src/form/form.upload.js new file mode 100644 index 0000000..a75c3b0 --- /dev/null +++ b/src/form/form.upload.js @@ -0,0 +1,244 @@ +/*! + * A front-end script for uploadify.swf (http://www.uploadify.com) + * Experimental stuff. Used by Flowplayer setup in 2010 + * + * http://flowplayer.org/setup/ + * + * @author Tero Piirainen + * @license MIT, GPL2+ + * + * TODO + * - :file input replaceWith(wrap) + */ +(function() { + + $.tools = $.tools || {version: '@VERSION'}; + + var tool = $.tools.upload = { + + conf: { + pagepath: '/setup/upload/', + buttonText: 'Select file', + script: '/setup/actions/uploadMedia', + folder: '', + method: 'POST', + + queueSizeLimit: 1, + simUploadLimit: 1, + + sizeLimit: 6000, + fileDataName: 'Filedata', + + // JQT stuff + autoStart: false, + progress: null, + + css: { + root: 'uploadRoot', + progress: 'uploadProgress', + items: 'uploadItems', + item: 'uploadItem', + active: 'active' + }, + + swf: { + width: 110, + height: 30, + src: null, + version: [9, 24] + } + } + }; + + + function prettyPrint(file) { + var name = file.name, size = file.size / 1024; + + if (name.length > 20) { name = file.name.substring(0, 20) + " …"; } + size = size > 1000 ? Math.round(size / 10) * .01 + " Mb" : Math.round(size) + " kb"; + + return "" + name + " (" + size + ")"; + } + + function findOrCreate(context, query) { + if (query.substring(0, 1) == '#') { return $(query); } + var el = context.parent().find("." + query); + + if (!el.length) { + el = $("
").addClass(query); + context.after(el); + return el; + } + } + + function Upload(input, conf, index) { + + var self = this, + swfWrap = input.parent().next(), + css = conf.css; + + // id attribute required for input field + conf.uploadifyID = input.attr("id") || "upload"; + input.attr("id", conf.uploadifyID).hide(); + + conf.script += "?name=" + input.attr("name"); + conf.swf.id = conf.swf.id || 'foo'; + + + // progress and info elements + var progress = findOrCreate(swfWrap, css.progress); + + // install SWF component + var api = flashembed(swfWrap.get(0), conf.swf, conf).getApi(); + + + // The Upload API + $.extend(self, { + + getConf: function() { + return conf; + }, + + getRoot: function() { + return swfWrap; + }, + + getProgress: function() { + return progress; + }, + + getProgressItems: function() { + return progress.find("." + css.items); + }, + + start: function() { + var e = new $.Event("uploadifyBeforeStart"); + input.trigger(e); + + if (!e.isDefaultPrevented()) { + input.trigger("uploadifyStart"); + api.startFileUpload(null, true); + } + }, + + // bind / unbind + bind: function(name, fn) { + input.bind(name.replace("on", "uploadify"), function() { + fn.apply(self, arguments); + }); + return self; + }, + + unbind: function(name) { + input.unbind(name.replace("on", "uploadify")); + return self; + } + + }); + + + // define callbacks + $.each("Select,BeforeStart,Start,Cancel,Error,Progress,Complete,AllComplete".split(","), function(i, name) { + + name = "on" + name; + + // configuration + if ($.isFunction(conf[name])) { + self.bind(name, conf[name]); + } + + // API method + self[name] = function(fn) { + return self.bind(name, fn); + }; + + }); + + + // assign callbacks (to the end of queue) + self.onSelect(function(event, fileId, file) { + + // root for the items + var items = self.getProgressItems(); + + if (!items.length) { + items = $("
").addClass(css.items); + progress.append(items); + } + + // single item + var item = $("#" + fileId), am = items.find("." + css.item).length; + + + // queue is full + if (am == conf.queueSizeLimit) { + var old = items.children(":first"); + api.cancelFileUpload(old.attr("id"), true, true); + old.remove(); + } + + // add to queue + if (!item.length) { + item = $("
").attr("id", fileId).addClass(css.item); + item.find("small").html(prettyPrint(file)); + items.append(item); + } + + if (conf.autoStart) { + self.start(); + } + + }); + + + self.onStart(function() { + progress.addClass(css.active); + }); + + self.onComplete(function() { + progress.removeClass(css.active); + api.clearFileUploadQueue(false); + }); + + self.onProgress(function(event, fileId, file, data) { + var item = $("#" + fileId); + item.find("span").css({display: 'block', width: data.percentage + "%"}); + }); + + } + + /* Flash API + cancelFileUpload(key, true, true) + startFileUpload(fileId || null, true) + startFileUpload(null, true) + updateSettings(settingName, settingValue) + startFileUpload(ID, false) + cancelFileUpload(ID, true, false) + clearFileUploadQueue(false) + */ + + // jQuery plugin implementation + $.fn.upload = function(conf) { + + // already constructed --> return API + var el = this.eq(typeof conf == 'number' ? conf : 0).data("upload"); + if (el) { return el; } + + conf = $.extend(true, $.extend({}, tool.conf), conf); + + this.each(function(index) { + el = new Upload($(this), conf); + $(this).data("upload", el, index); + }); + + return conf.api ? el: this; + + }; + +})(); + + + + + + diff --git a/test/accordion/accordion.html b/test/accordion/accordion.html new file mode 100644 index 0000000..2800714 --- /dev/null +++ b/test/accordion/accordion.html @@ -0,0 +1,119 @@ + + + + Accordion Test Page + + + + + + + + + + + +

Accordion Test Page

+ +
    +
  • +
  • +
  • +
  • +
+ +
    +
  • +
  • +
  • +
  • +
+ + From bae7763f81dd5322966c1cac30127ae24daa8840 Mon Sep 17 00:00:00 2001 From: Tero Piirainen Date: Wed, 22 Sep 2010 12:18:55 +0000 Subject: [PATCH 2/8] jQuery Tools Accordion v0.10 --- src/accordion/accordion.js | 194 +++++++++++++++++++--------------- src/core.js | 37 +++++++ src/tabs/tabs.js | 2 +- test/accordion/accordion.html | 138 +++++------------------- test/accordion/style.css | 32 ++++++ 5 files changed, 203 insertions(+), 200 deletions(-) create mode 100644 src/core.js create mode 100644 test/accordion/style.css diff --git a/src/accordion/accordion.js b/src/accordion/accordion.js index 9a270c7..6c26ea1 100644 --- a/src/accordion/accordion.js +++ b/src/accordion/accordion.js @@ -1,91 +1,115 @@ +/* ACCORDION */ (function($) { - $.fn.accordion = function(options) { - var DEFAULTS = { - orientation: "vertical", - min: 0, - max: 200, - sticky: false, - event: "mouseenter", - duration: 500, - pane: ".pane", - defaultPane: 0 - }; - - options = $.extend(DEFAULTS, options); - - this.each(function() { - var panes = $(options.pane, this); - var currentPane; - var dummy = document.createElement("span"); - - if (panes.length) { - if (options.orientation == "vertical") { - var STYLE_PROPERTY = "height"; - var OFFSET_PROPERTY = "offsetHeight"; - } else { - STYLE_PROPERTY = "width"; - OFFSET_PROPERTY = "offsetWidth"; - - $(this).next().css({clear: "left"}); - var lastPane = panes.get(panes.length - 1); - $(this).css({ - width: lastPane.offsetLeft + lastPane.offsetWidth - panes[0].offsetLeft, - height: lastPane.offsetHeight, - overflow: "hidden" - }); - } + + var CONF = { + easing: 'swing', + event: 'click', // mouseenter + initialIndex: -1, + small: 0, + large: 300, + panes: null, + speed: 400, + sticky: false, + vertical: false + }; - var size = panes[0][OFFSET_PROPERTY]; + function Accordion(root, conf) { + + var panes = root.children(conf.panes), + currentIndex = conf.initialIndex, + self = this, + totalSize, + vertical, + prop, + size; + + $.extend(self, { + + select: function(index, evt) { + + // calculate dimensions + if (!size) { + vertical = conf.vertical || root.height() > root.width(); + prop = vertical ? 'height' : 'width'; + size = panes.eq(0)[prop](); + totalSize = size * panes.length; + } + + var large = conf.large, + small = conf.small || (totalSize - large) / (panes.length - 1); + + // same element clicked + if (index === currentIndex && self.isOpened()) { + large = small = size; + } + + var sizes = $.map(panes, function(el) { + return $(el)[prop](); + }); + + $("").stop().animate({step: 1}, { + duration: conf.speed, + easing: conf.easing, + + step: function(step) { + var large = totalSize; + panes.each(function(i) { + if (i !== index) { + var value = sizes[i] + Math.round(step * (small - sizes[i])); + if (value < 0) { value = 0; } + $(this)[prop](value); + large -= value; + } + }); + panes.eq(index)[prop](large); + } + }); + + currentIndex = index; + }, + + getPanes: function() { + return panes; + }, + + getCurrentPane: function() { + return panes.eq(index); + }, + + getIndex: function() { + return index; + }, + + isOpened: function() { + return panes.eq(currentIndex)[prop]() > size; + }, + + next: function() { + return self.select(index + 1); + }, + + prev: function() { + return self.select(index - 1); + } + + }); - panes.bind(options.event, function() { - currentPane = this; - animatePanes(options.max, options.min); - }); + panes.bind(conf.event, function(e) { + self.select($(this).index(), e); + }); + + if (!conf.sticky) { + root.bind("mouseleave", function(e) { + if (self.isOpened()) { + self.select(currentIndex); + } + }); + } + } + + $.fn.accordion = function(conf) { + return $.tools.create(this, Accordion, CONF, conf); + }; - if (options.sticky) { - currentPane = panes.get(options.defaultPane); - animatePanes(options.max, options.min, 1); - } else { - $(this).mouseleave(function() { - animatePanes(size); - }); - } - } - - function animatePanes(max, min, duration) { - if (!currentPane) return; - - if (duration == null) duration = options.duration; - - var totalSize = size * panes.length; - - var sizes = []; - panes.each(function(i) { - sizes[i] = this[OFFSET_PROPERTY]; - }); - - var collapsedSize = min || Math.round((totalSize - max) / (panes.length - 1)); - - $(dummy).stop(); - dummy.style.step = 0; - $(dummy).animate({step: 1}, { - duration: duration, - easing: options.easing, - step: function(step) { - var expandedSize = totalSize; - for (var i = 0, pane; pane = panes[i]; i++) { - if (pane != currentPane) { - var value = sizes[i] + Math.round(step * (collapsedSize - sizes[i])); - if (value < 0) value = 0; - pane.style[STYLE_PROPERTY] = value + "px"; - expandedSize -= value; - } - } - currentPane.style[STYLE_PROPERTY] = expandedSize + "px"; - } - }); - }; - }); - }; })(jQuery); diff --git a/src/core.js b/src/core.js new file mode 100644 index 0000000..3d93dab --- /dev/null +++ b/src/core.js @@ -0,0 +1,37 @@ +(function($) { + + $.tools = { + version: '@VERSION', + + create: function(root, fn, globals, conf) { + + var args = arguments, + name = fn.name.toLowerCase(), + api = root.data(name); + + if (api) { + api.destroy(); + + } else { + + if (!globals.conf) { globals = { conf: globals }; } + + $.tools[name] = globals; + + conf = $.extend(true, {}, globals.conf, conf); + + $.extend(fn.prototype, { + getConf: function() { + return conf; + } + }); + } + + return root.each(function() { + api = new fn($(this), conf); + $(this).data(name, api); + }); + } + }; + +})(jQuery); diff --git a/src/tabs/tabs.js b/src/tabs/tabs.js index 6e0f433..79cdcf2 100644 --- a/src/tabs/tabs.js +++ b/src/tabs/tabs.js @@ -118,7 +118,7 @@ // public methods - $.extend(this, { + $.extend(this, { click: function(i, e) { var tab = tabs.eq(i); diff --git a/test/accordion/accordion.html b/test/accordion/accordion.html index 2800714..f541634 100644 --- a/test/accordion/accordion.html +++ b/test/accordion/accordion.html @@ -1,119 +1,29 @@ - - - - Accordion Test Page - - - - - + + + + - - +
+
+
+
+
+
- -

Accordion Test Page

+
-
    -
  • -
  • -
  • -
  • -
- -
    -
  • -
  • -
  • -
  • -
- - +
+
+
+
+
+
+ + + diff --git a/test/accordion/style.css b/test/accordion/style.css new file mode 100644 index 0000000..67c9d95 --- /dev/null +++ b/test/accordion/style.css @@ -0,0 +1,32 @@ + +body { + margin:50px auto; + background-color: #333; + width:900px; +} + +.accordion div { + width: 160px; + height: 100px; + float: left; + margin: 5px; + border:1px solid #ccc; +} + +.vertical { + height:500px; + width:200px; +} + +.vertical div { + float:none; + margin:10px 5px; +} + + + +/* colors */ +.pane1 { background-color: #53b388; } +.pane2 { background-color: #5a69a9; } +.pane3 { background-color: #c26468; } +.pane4 { background-color: #bf7cc7; } From ef03622a27956ef262719aa7d4c7a632cde32959 Mon Sep 17 00:00:00 2001 From: Tero Piirainen Date: Wed, 22 Sep 2010 12:36:11 +0000 Subject: [PATCH 3/8] readme fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f28814..cae3dfa 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ [jQuery Tools](http://flowplayer.org/tools/) - The Missing UI library for the Web ================================ -jQuery Tools is a collection of the most important user-interface components for modern websites. Used by large sites all over the world. \ No newline at end of file +jQuery Tools is a collection of the most important user-interface components for modern websites. From 04ad044eb07e97db725a33f005427dc373f0b514 Mon Sep 17 00:00:00 2001 From: Tero Piirainen Date: Wed, 22 Sep 2010 12:54:03 +0000 Subject: [PATCH 4/8] test commit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cae3dfa..97d3143 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ [jQuery Tools](http://flowplayer.org/tools/) - The Missing UI library for the Web ================================ -jQuery Tools is a collection of the most important user-interface components for modern websites. +jQuery Tools is a collection of the most important user-interface components for modern websites From 42c562db397c40094193f4330a9c287b133bdc64 Mon Sep 17 00:00:00 2001 From: Tero Piirainen Date: Thu, 23 Sep 2010 07:13:42 +0000 Subject: [PATCH 5/8] Implemented most of the tools use core.js. This branch is now in unfunctional state. --- src/accordion/accordion.js | 4 +- src/core.js | 66 +++++-- src/dateinput/dateinput.js | 78 ++------ src/form/form.upload.js | 244 ------------------------ src/overlay/overlay.js | 61 +----- src/rangeinput/rangeinput.js | 99 +++------- src/scrollable/scrollable.autoscroll.js | 7 +- src/scrollable/scrollable.js | 83 +++----- src/scrollable/scrollable.navigator.js | 6 +- src/tabs/tabs.js | 95 ++------- src/tabs/tabs.slideshow.js | 56 ++---- src/tooltip/tooltip.js | 54 +----- test/dateinput/minimal.htm | 1 + test/overlay/index.htm | 1 + test/overlay/style.css | 10 +- test/rangeinput/multiple.htm | 1 + test/scrollable/single.html | 2 + test/tabs/index.html | 1 + test/tabs/slideshow.htm | 1 + test/tooltip/index.html | 1 + 20 files changed, 179 insertions(+), 692 deletions(-) delete mode 100644 src/form/form.upload.js diff --git a/src/accordion/accordion.js b/src/accordion/accordion.js index 6c26ea1..9b7f63f 100644 --- a/src/accordion/accordion.js +++ b/src/accordion/accordion.js @@ -14,7 +14,7 @@ vertical: false }; - function Accordion(root, conf) { + function Tool(root, conf) { var panes = root.children(conf.panes), currentIndex = conf.initialIndex, @@ -109,7 +109,7 @@ } $.fn.accordion = function(conf) { - return $.tools.create(this, Accordion, CONF, conf); + return $.tools.create(this, "accordion", Tool, CONF, conf); }; })(jQuery); diff --git a/src/core.js b/src/core.js index 3d93dab..714a4c3 100644 --- a/src/core.js +++ b/src/core.js @@ -3,35 +3,69 @@ $.tools = { version: '@VERSION', - create: function(root, fn, globals, conf) { + create: function(elem, name, fn, globals, conf, events, isInput) { - var args = arguments, - name = fn.name.toLowerCase(), - api = root.data(name); + var api = elem.data(name); if (api) { api.destroy(); } else { - - if (!globals.conf) { globals = { conf: globals }; } - - $.tools[name] = globals; - + // configuration + if (!globals.conf) { globals = { conf: globals }; } + $.tools[name] = globals; conf = $.extend(true, {}, globals.conf, conf); + + // :overlay, :date + $.expr[':'][name] = $.expr[':'][name] || function(el) { + return !!$(el).data(name); + }; + } + + var ret; + + elem.each(function() { + + api = new fn($(this), conf); - $.extend(fn.prototype, { + $.extend(api, { getConf: function() { return conf; } - }); - } + }); + + // events + $.each(events.split(","), function(i, name) { + + if (name != 'change') { name = "on" + name; } + + // configuration + if ($.isFunction(conf[name])) { + $(api).bind(name, conf[name]); + } + + // API + api[name] = function(fn) { + if (fn) { $(api).bind(name, fn); } + return api; + }; + }); + + $(this).data(name, api).data("api", api); + + if (isInput) { + var input = api.getInput().data(name, api).data("api", api); + ret = ret ? ret.add(input) : input; + } + }); - return root.each(function() { - api = new fn($(this), conf); - $(this).data(name, api); - }); + return ret ? ret : elem; } }; + + // jQuery.tool(":overlay").load(); + $.tool = function(query) { + return $(query).data("api"); + }; })(jQuery); diff --git a/src/dateinput/dateinput.js b/src/dateinput/dateinput.js index 64f2098..817884f 100644 --- a/src/dateinput/dateinput.js +++ b/src/dateinput/dateinput.js @@ -10,22 +10,14 @@ * Date: @DATE */ (function($) { - - /* TODO: - preserve today highlighted - */ - - $.tools = $.tools || {version: '@VERSION'}; - var instances = [], - tool, - - // h=72, j=74, k=75, l=76, down=40, left=37, up=38, right=39 - KEYS = [75, 76, 38, 39, 74, 72, 40, 37], - LABELS = {}; - - tool = $.tools.dateinput = { - + $.expr[':'].date = function(el) { + var type = el.getAttribute("type"); + return type && type == 'date' || !!$(el).data("dateinput"); + }; + + // h=72, j=74, k=75, l=76, down=40, left=37, up=38, right=39 + var KEYS = [75, 76, 38, 39, 74, 72, 40, 37], LABELS = {}, instances = [], GLOBAL = { conf: { format: 'mm/dd/yy', selectors: false, @@ -73,11 +65,10 @@ labels[key] = val.split(","); }); LABELS[language] = labels; - } - + } }; - tool.localize("en", { + GLOBAL.localize("en", { months: 'January,February,March,April,May,June,July,August,September,October,November,December', shortMonths: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec', days: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday', @@ -170,7 +161,7 @@ //}}} - function Dateinput(input, conf) { + function Tool(input, conf) { // variables var self = this, @@ -647,10 +638,6 @@ return self; }, - getConf: function() { - return conf; - }, - getInput: function() { return input; }, @@ -669,22 +656,6 @@ }); - // callbacks - $.each(['onBeforeShow','onShow','change','onHide'], function(i, name) { - - // configuration - if ($.isFunction(conf[name])) { - $(self).bind(name, conf[name]); - } - - // API methods - self[name] = function(fn) { - if (fn) { $(self).bind(name, fn); } - return self; - }; - }); - - // show dateinput & assign keyboard shortcuts input.bind("focus click", self.show).keydown(function(e) { @@ -706,39 +677,24 @@ select(value, conf); } + instances.push(self); + } - $.expr[':'].date = function(el) { - var type = el.getAttribute("type"); - return type && type == 'date' || !!$(el).data("dateinput"); - }; - - $.fn.dateinput = function(conf) { - - // already instantiated - if (this.data("dateinput")) { return this; } - - // configuration - conf = $.extend(true, {}, tool.conf, conf); + $.fn.dateinput = function(conf) { + conf = $.extend(true, {}, GLOBAL.conf, conf); + // CSS prefix $.each(conf.css, function(key, val) { if (!val && key != 'prefix') { conf.css[key] = (conf.css.prefix || '') + (val || key); } }); - - var els; - this.each(function() { - var el = new Dateinput($(this), conf); - instances.push(el); - var input = el.getInput().data("dateinput", el); - els = els ? els.add(input) : input; - }); - - return els ? els : this; + return $.tools.create(this, "dateinput", Tool, GLOBAL, conf, "BeforeShow,Show,change,onHide", true); + }; diff --git a/src/form/form.upload.js b/src/form/form.upload.js deleted file mode 100644 index a75c3b0..0000000 --- a/src/form/form.upload.js +++ /dev/null @@ -1,244 +0,0 @@ -/*! - * A front-end script for uploadify.swf (http://www.uploadify.com) - * Experimental stuff. Used by Flowplayer setup in 2010 - * - * http://flowplayer.org/setup/ - * - * @author Tero Piirainen - * @license MIT, GPL2+ - * - * TODO - * - :file input replaceWith(wrap) - */ -(function() { - - $.tools = $.tools || {version: '@VERSION'}; - - var tool = $.tools.upload = { - - conf: { - pagepath: '/setup/upload/', - buttonText: 'Select file', - script: '/setup/actions/uploadMedia', - folder: '', - method: 'POST', - - queueSizeLimit: 1, - simUploadLimit: 1, - - sizeLimit: 6000, - fileDataName: 'Filedata', - - // JQT stuff - autoStart: false, - progress: null, - - css: { - root: 'uploadRoot', - progress: 'uploadProgress', - items: 'uploadItems', - item: 'uploadItem', - active: 'active' - }, - - swf: { - width: 110, - height: 30, - src: null, - version: [9, 24] - } - } - }; - - - function prettyPrint(file) { - var name = file.name, size = file.size / 1024; - - if (name.length > 20) { name = file.name.substring(0, 20) + " …"; } - size = size > 1000 ? Math.round(size / 10) * .01 + " Mb" : Math.round(size) + " kb"; - - return "" + name + " (" + size + ")"; - } - - function findOrCreate(context, query) { - if (query.substring(0, 1) == '#') { return $(query); } - var el = context.parent().find("." + query); - - if (!el.length) { - el = $("
").addClass(query); - context.after(el); - return el; - } - } - - function Upload(input, conf, index) { - - var self = this, - swfWrap = input.parent().next(), - css = conf.css; - - // id attribute required for input field - conf.uploadifyID = input.attr("id") || "upload"; - input.attr("id", conf.uploadifyID).hide(); - - conf.script += "?name=" + input.attr("name"); - conf.swf.id = conf.swf.id || 'foo'; - - - // progress and info elements - var progress = findOrCreate(swfWrap, css.progress); - - // install SWF component - var api = flashembed(swfWrap.get(0), conf.swf, conf).getApi(); - - - // The Upload API - $.extend(self, { - - getConf: function() { - return conf; - }, - - getRoot: function() { - return swfWrap; - }, - - getProgress: function() { - return progress; - }, - - getProgressItems: function() { - return progress.find("." + css.items); - }, - - start: function() { - var e = new $.Event("uploadifyBeforeStart"); - input.trigger(e); - - if (!e.isDefaultPrevented()) { - input.trigger("uploadifyStart"); - api.startFileUpload(null, true); - } - }, - - // bind / unbind - bind: function(name, fn) { - input.bind(name.replace("on", "uploadify"), function() { - fn.apply(self, arguments); - }); - return self; - }, - - unbind: function(name) { - input.unbind(name.replace("on", "uploadify")); - return self; - } - - }); - - - // define callbacks - $.each("Select,BeforeStart,Start,Cancel,Error,Progress,Complete,AllComplete".split(","), function(i, name) { - - name = "on" + name; - - // configuration - if ($.isFunction(conf[name])) { - self.bind(name, conf[name]); - } - - // API method - self[name] = function(fn) { - return self.bind(name, fn); - }; - - }); - - - // assign callbacks (to the end of queue) - self.onSelect(function(event, fileId, file) { - - // root for the items - var items = self.getProgressItems(); - - if (!items.length) { - items = $("
").addClass(css.items); - progress.append(items); - } - - // single item - var item = $("#" + fileId), am = items.find("." + css.item).length; - - - // queue is full - if (am == conf.queueSizeLimit) { - var old = items.children(":first"); - api.cancelFileUpload(old.attr("id"), true, true); - old.remove(); - } - - // add to queue - if (!item.length) { - item = $("
").attr("id", fileId).addClass(css.item); - item.find("small").html(prettyPrint(file)); - items.append(item); - } - - if (conf.autoStart) { - self.start(); - } - - }); - - - self.onStart(function() { - progress.addClass(css.active); - }); - - self.onComplete(function() { - progress.removeClass(css.active); - api.clearFileUploadQueue(false); - }); - - self.onProgress(function(event, fileId, file, data) { - var item = $("#" + fileId); - item.find("span").css({display: 'block', width: data.percentage + "%"}); - }); - - } - - /* Flash API - cancelFileUpload(key, true, true) - startFileUpload(fileId || null, true) - startFileUpload(null, true) - updateSettings(settingName, settingValue) - startFileUpload(ID, false) - cancelFileUpload(ID, true, false) - clearFileUploadQueue(false) - */ - - // jQuery plugin implementation - $.fn.upload = function(conf) { - - // already constructed --> return API - var el = this.eq(typeof conf == 'number' ? conf : 0).data("upload"); - if (el) { return el; } - - conf = $.extend(true, $.extend({}, tool.conf), conf); - - this.each(function(index) { - el = new Upload($(this), conf); - $(this).data("upload", el, index); - }); - - return conf.api ? el: this; - - }; - -})(); - - - - - - diff --git a/src/overlay/overlay.js b/src/overlay/overlay.js index 163cb4b..57cf567 100644 --- a/src/overlay/overlay.js +++ b/src/overlay/overlay.js @@ -12,9 +12,7 @@ (function($) { // static constructs - $.tools = $.tools || {version: '@VERSION'}; - - $.tools.overlay = { + var instances = [], effects = {}, GLOBAL = { addEffect: function(name, loadFn, closeFn) { effects[name] = [loadFn, closeFn]; @@ -38,19 +36,9 @@ target: null, // target element to be overlayed. by default taken from [rel] top: '10%' } - }; - + }; - var instances = [], effects = {}; - - // the default effect. nice and easy! - $.tools.overlay.addEffect('default', - - /* - onLoad/onClose functions must be called otherwise none of the - user supplied callback methods won't be called - */ - function(pos, onLoad) { + GLOBAL.addEffect('default', function(pos, onLoad) { var conf = this.getConf(), w = $(window); @@ -65,11 +53,11 @@ }, function(onClose) { this.getOverlay().fadeOut(this.getConf().closeSpeed, onClose); - } + } ); - function Overlay(trigger, conf) { + function Tool(trigger, conf) { // private variables var self = this, @@ -180,7 +168,6 @@ } }); } - return self; }, @@ -226,29 +213,10 @@ isOpened: function() { return opened; - }, - - // manipulate start, finish and speeds - getConf: function() { - return conf; } }); - - // callbacks - $.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","), function(i, name) { - - // configuration - if ($.isFunction(conf[name])) { - $(self).bind(name, conf[name]); - } - - // API - self[name] = function(fn) { - if (fn) { $(self).bind(name, fn); } - return self; - }; - }); + // close button closers = overlay.find(conf.close || ".close"); @@ -265,28 +233,17 @@ // autoload if (conf.load) { self.load(); } + instances.push(self); } // jQuery plugin initialization $.fn.overlay = function(conf) { - - // already constructed --> return API - var el = this.data("overlay"); - if (el) { return el; } - + if ($.isFunction(conf)) { conf = {onBeforeLoad: conf}; } - - conf = $.extend(true, {}, $.tools.overlay.conf, conf); - - this.each(function() { - el = new Overlay($(this), conf); - instances.push(el); - $(this).data("overlay", el); - }); - return conf.api ? el: this; + return $.tools.create(this, "overlay", Tool, GLOBAL, conf, "BeforeLoad,Start,Load,BeforeClose,Close"); }; })(jQuery); diff --git a/src/rangeinput/rangeinput.js b/src/rangeinput/rangeinput.js index 237d1ee..39c4d90 100644 --- a/src/rangeinput/rangeinput.js +++ b/src/rangeinput/rangeinput.js @@ -10,36 +10,35 @@ * Date: @DATE */ (function($) { - - $.tools = $.tools || {version: '@VERSION'}; - - var tool; - - tool = $.tools.rangeinput = { - - conf: { - min: 0, - max: 100, // as defined in the standard - step: 'any', // granularity of the value. a non-zero float or int (or "any") - steps: 0, - value: 0, - precision: undefined, - vertical: 0, - keyboard: true, - progress: false, - speed: 100, - - // set to null if not needed - css: { - input: 'range', - slider: 'slider', - progress: 'progress', - handle: 'handle' - } + $.expr[':'].range = function(el) { + var type = el.getAttribute("type"); + return type && type == 'range' || !!$(el).filter("input").data("rangeinput"); + }; + + var CONF = { + + min: 0, + max: 100, // as defined in the standard + step: 'any', // granularity of the value. a non-zero float or int (or "any") + steps: 0, + value: 0, + precision: undefined, + vertical: 0, + keyboard: true, + progress: false, + speed: 100, + + // set to null if not needed + css: { + input: 'range', + slider: 'slider', + progress: 'progress', + handle: 'handle' } }; + //{{{ fn.drag /* @@ -136,7 +135,7 @@ return e && e.onSlide; } - function RangeInput(input, conf) { + function Tool(input, conf) { // private variables var self = this, @@ -292,10 +291,6 @@ return slide(e || $.Event("api"), undefined, val, true); }, - getConf: function() { - return conf; - }, - getProgress: function() { return progress; }, @@ -325,21 +320,6 @@ } }); - - // callbacks - $.each("onSlide,change".split(","), function(i, name) { - - // from configuration - if ($.isFunction(conf[name])) { - $(self).bind(name, conf[name]); - } - - // API methods - self[name] = function(fn) { - if (fn) { $(self).bind(name, fn); } - return self; - }; - }); // dragging @@ -439,32 +419,11 @@ if (!len) { $(window).load(begin); } - } - - $.expr[':'].range = function(el) { - var type = el.getAttribute("type"); - return type && type == 'range' || !!$(el).filter("input").data("rangeinput"); - }; - + } // jQuery plugin implementation - $.fn.rangeinput = function(conf) { - - // already installed - if (this.data("rangeinput")) { return this; } - - // extend configuration with globals - conf = $.extend(true, {}, tool.conf, conf); - - var els; - - this.each(function() { - var el = new RangeInput($(this), $.extend(true, {}, conf)); - var input = el.getInput().data("rangeinput", el); - els = els ? els.add(input) : input; - }); - - return els ? els : this; + $.fn.rangeinput = function(conf) { + return $.tools.create(this, "rangeinput", Tool, CONF, conf, "Slide,change", true); }; diff --git a/src/scrollable/scrollable.autoscroll.js b/src/scrollable/scrollable.autoscroll.js index 0a2ac05..389de33 100644 --- a/src/scrollable/scrollable.autoscroll.js +++ b/src/scrollable/scrollable.autoscroll.js @@ -31,7 +31,7 @@ var opts = $.extend({}, t.autoscroll.conf, conf), ret; - this.each(function() { + return this.each(function() { var api = $(this).data("scrollable"); if (api) { ret = api; } @@ -72,10 +72,7 @@ api.play(); } - }); - - return opts.api ? ret : this; - + }); }; })(jQuery); diff --git a/src/scrollable/scrollable.js b/src/scrollable/scrollable.js index 2a73119..132cdd1 100644 --- a/src/scrollable/scrollable.js +++ b/src/scrollable/scrollable.js @@ -11,29 +11,23 @@ */ (function($) { - // static constructs - $.tools = $.tools || {version: '@VERSION'}; - - $.tools.scrollable = { - - conf: { - activeClass: 'active', - circular: false, - clonedClass: 'cloned', - disabledClass: 'disabled', - easing: 'swing', - initialIndex: 0, - item: null, - items: '.items', - keyboard: true, - mousewheel: false, - next: '.next', - prev: '.prev', - speed: 400, - vertical: false, - touch: true, - wheelSpeed: 0 - } + var CONF = { + activeClass: 'active', + circular: false, + clonedClass: 'cloned', + disabledClass: 'disabled', + easing: 'swing', + initialIndex: 0, + item: null, + items: '.items', + keyboard: true, + mousewheel: false, + next: '.next', + prev: '.prev', + speed: 400, + vertical: false, + touch: true, + wheelSpeed: 0 }; // get hidden element's width or height even though it's hidden @@ -52,7 +46,7 @@ var current; // constructor - function Scrollable(root, conf) { + function Tool(root, conf) { // current instance var self = this, @@ -65,11 +59,7 @@ if (itemWrap.length > 1) { itemWrap = $(conf.items, root); } // methods - $.extend(self, { - - getConf: function() { - return conf; - }, + $.extend(self, { getIndex: function() { return index; @@ -177,20 +167,7 @@ } }); - - // callbacks - $.each(['onBeforeSeek', 'onSeek', 'onAddItem'], function(i, name) { - - // configuration - if ($.isFunction(conf[name])) { - $(self).bind(name, conf[name]); - } - - self[name] = function(fn) { - if (fn) { $(self).bind(name, fn); } - return self; - }; - }); + // circular loop if (conf.circular) { @@ -200,8 +177,7 @@ cloned1.add(cloned2).addClass(conf.clonedClass); - self.onBeforeSeek(function(e, i, time) { - + root.bind("onBeforeSeek", function(e, i, time) { if (e.isDefaultPrevented()) { return; } @@ -233,7 +209,7 @@ if (!conf.circular && self.getSize() > 1) { - self.onBeforeSeek(function(e, i) { + root.bind("onBeforeSeek", function(e, i) { setTimeout(function() { if (!e.isDefaultPrevented()) { prev.toggleClass(conf.disabledClass, i <= 0); @@ -315,20 +291,7 @@ // jQuery plugin implementation $.fn.scrollable = function(conf) { - - // already constructed --> return API - var el = this.data("scrollable"); - if (el) { return el; } - - conf = $.extend({}, $.tools.scrollable.conf, conf); - - this.each(function() { - el = new Scrollable($(this), conf); - $(this).data("scrollable", el); - }); - - return conf.api ? el: this; - + return $.tools.create(this, "scrollable", Tool, CONF, conf, "BeforeSeek,Seek,AddItem"); }; diff --git a/src/scrollable/scrollable.navigator.js b/src/scrollable/scrollable.navigator.js index 5aa2a96..dac69fd 100644 --- a/src/scrollable/scrollable.navigator.js +++ b/src/scrollable/scrollable.navigator.js @@ -39,9 +39,7 @@ if (typeof conf == 'string') { conf = {navi: conf}; } conf = $.extend({}, t.navigator.conf, conf); - var ret; - - this.each(function() { + return this.each(function() { var api = $(this).data("scrollable"), navi = conf.navi.jquery ? conf.navi : find(api.getRoot(), conf.navi), @@ -132,8 +130,6 @@ }); - return conf.api ? ret : this; - }; })(jQuery); diff --git a/src/tabs/tabs.js b/src/tabs/tabs.js index 79cdcf2..2b8461c 100644 --- a/src/tabs/tabs.js +++ b/src/tabs/tabs.js @@ -11,10 +11,7 @@ */ (function($) { - // static constructs - $.tools = $.tools || {version: '@VERSION'}; - - $.tools.tabs = { + var GLOBALS = { conf: { tabs: 'a', @@ -25,8 +22,6 @@ initialIndex: 0, event: 'click', rotate: false, - - // 1.2 history: false }, @@ -38,17 +33,12 @@ var effects = { - // simple "toggle" effect + // toggle 'default': function(i, done) { this.getPanes().hide().eq(i).show(); done.call(); }, - - /* - configuration: - - fadeOutSpeed (positive value does "crossfading") - - fadeInSpeed - */ + fade: function(i, done) { var conf = this.getConf(), @@ -63,50 +53,19 @@ panes.eq(i).fadeIn(conf.fadeInSpeed, done); }, - - // for basic accordions - slide: function(i, done) { - this.getPanes().slideUp(200); - this.getPanes().eq(i).slideDown(400, done); - }, - /** - * AJAX effect - */ ajax: function(i, done) { this.getPanes().eq(0).load(this.getTabs().eq(i).attr("href"), done); } }; - - var w; - - /** - * Horizontal accordion - * - * @deprecated will be replaced with a more robust implementation - */ - $.tools.tabs.addEffect("horizontal", function(i, done) { - - // store original width of a pane into memory - if (!w) { w = this.getPanes().eq(0).width(); } - - // set current pane's width to zero - this.getCurrentPane().animate({width: 0}, function() { $(this).hide(); }); - - // grow opened pane to it's original width - this.getPanes().eq(i).animate({width: w}, function() { - $(this).show(); - done.call(); - }); - - }); - function Tabs(root, paneSelector, conf) { + function Tabs(root, conf) { var self = this, trigger = root.add(this), tabs = root.find(conf.tabs), + paneSelector = conf.select, panes = paneSelector.jquery ? paneSelector : root.children(paneSelector), current; @@ -164,10 +123,6 @@ return self; }, - - getConf: function() { - return conf; - }, getTabs: function() { return tabs; @@ -205,21 +160,6 @@ }); - // callbacks - $.each("onBeforeClick,onClick".split(","), function(i, name) { - - // configuration - if ($.isFunction(conf[name])) { - $(self).bind(name, conf[name]); - } - - // API - self[name] = function(fn) { - if (fn) { $(self).bind(name, fn); } - return self; - }; - }); - if (conf.history && $.fn.history) { $.tools.history.init(tabs); @@ -247,35 +187,22 @@ if (conf.initialIndex === 0 || conf.initialIndex > 0) { self.click(conf.initialIndex); } - } - + } } // jQuery plugin implementation $.fn.tabs = function(paneSelector, conf) { - - // return existing instance - var el = this.data("tabs"); - if (el) { - el.destroy(); - this.removeData("tabs"); - } + conf = conf || {}; + if ($.isFunction(conf)) { conf = {onBeforeClick: conf}; } - // setup conf - conf = $.extend({}, $.tools.tabs.conf, conf); - - - this.each(function() { - el = new Tabs($(this), paneSelector, conf); - $(this).data("tabs", el); - }); - - return conf.api ? el: this; + conf.select = paneSelector; + + return $.tools.create(this, "tabs", Tabs, GLOBALS, conf, "BeforeClick,Click"); }; }) (jQuery); diff --git a/src/tabs/tabs.slideshow.js b/src/tabs/tabs.slideshow.js index 8f1abe0..e958a1a 100644 --- a/src/tabs/tabs.slideshow.js +++ b/src/tabs/tabs.slideshow.js @@ -11,23 +11,17 @@ */ (function($) { - var tool; - - tool = $.tools.tabs.slideshow = { - - conf: { - next: '.forward', - prev: '.backward', - disabledClass: 'disabled', - autoplay: false, - autopause: true, - interval: 3000, - clickable: true, - api: false - } + var CONF = { + next: '.forward', + prev: '.backward', + disabledClass: 'disabled', + autoplay: false, + autopause: true, + interval: 3000, + clickable: true }; - function Slideshow(root, conf) { + function Tool(root, conf) { var self = this, fire = root.add(this), @@ -58,10 +52,6 @@ getTabs: function() { return tabs; }, - - getConf: function() { - return conf; - }, play: function() { @@ -109,20 +99,6 @@ }); - // callbacks - $.each("onBeforePlay,onPlay,onBeforePause,onPause".split(","), function(i, name) { - - // configuration - if ($.isFunction(conf[name])) { - $(self).bind(name, conf[name]); - } - - // API methods - self[name] = function(fn) { - return $(self).bind(name, fn); - }; - }); - /* when mouse enters, slideshow stops */ if (conf.autopause) { @@ -160,18 +136,8 @@ // jQuery plugin implementation $.fn.slideshow = function(conf) { - // return existing instance - var el = this.data("slideshow"); - if (el) { return el; } - - conf = $.extend({}, tool.conf, conf); - - this.each(function() { - el = new Slideshow($(this), conf); - $(this).data("slideshow", el); - }); - - return conf.api ? el : this; + return $.tools.create(this, "slideshow", Tool, CONF, conf, "BeforePlay,Play,BeforePause,Pause"); + }; })(jQuery); diff --git a/src/tooltip/tooltip.js b/src/tooltip/tooltip.js index cf9a451..dfec61d 100644 --- a/src/tooltip/tooltip.js +++ b/src/tooltip/tooltip.js @@ -9,11 +9,9 @@ * Since: November 2008 * Date: @DATE */ -(function($) { - // static constructs - $.tools = $.tools || {version: '@VERSION'}; - - $.tools.tooltip = { +(function($) { + + var CONF = { conf: { @@ -111,7 +109,7 @@ - function Tooltip(trigger, conf) { + function Tool(trigger, conf) { var self = this, fire = trigger.add(self), @@ -282,10 +280,6 @@ return fully ? shown == 'full' : shown; }, - getConf: function() { - return conf; - }, - getTip: function() { return tip; }, @@ -294,47 +288,19 @@ return trigger; } - }); - - // callbacks - $.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","), function(i, name) { - - // configuration - if ($.isFunction(conf[name])) { - $(self).bind(name, conf[name]); - } - - // API - self[name] = function(fn) { - if (fn) { $(self).bind(name, fn); } - return self; - }; - }); - + }); } // jQuery plugin implementation - $.fn.tooltip = function(conf) { - - // return existing instance - var api = this.data("tooltip"); - if (api) { return api; } - - conf = $.extend(true, {}, $.tools.tooltip.conf, conf); - + $.fn.tooltip = function(conf) { + // position can also be given as string - if (typeof conf.position == 'string') { + if (conf && typeof conf.position == 'string') { conf.position = conf.position.split(/,?\s/); } - - // install tooltip for each entry in jQuery object - this.each(function() { - api = new Tooltip($(this), conf); - $(this).data("tooltip", api); - }); - - return conf.api ? api: this; + + return $.tools.create(this, "tooltip", Tool, CONF, conf, "Hide,BeforeShow,Show,BeforeHide"); }; }) (jQuery); diff --git a/test/dateinput/minimal.htm b/test/dateinput/minimal.htm index cc3d2f6..e9410b4 100644 --- a/test/dateinput/minimal.htm +++ b/test/dateinput/minimal.htm @@ -1,5 +1,6 @@ + diff --git a/test/overlay/index.htm b/test/overlay/index.htm index af3f64c..bc24ac4 100644 --- a/test/overlay/index.htm +++ b/test/overlay/index.htm @@ -1,5 +1,6 @@ + diff --git a/test/overlay/style.css b/test/overlay/style.css index be1e470..a3c9777 100644 --- a/test/overlay/style.css +++ b/test/overlay/style.css @@ -1,12 +1,12 @@ /* automatically absolutely positioned */ -div.overlay { - width:400px; +.overlay { + width:600px; display:none; color:#fff; padding:10px; } -div.overlay a.close { +.overlay .close { background-image:url(img/close.png); position:absolute; right:5px; @@ -23,7 +23,9 @@ div.overlay a.close { } #overlay2 { - background-image:url(img/overlay.png) + background-image:url(img/overlay.png); + width:300px; + z-index:10010; } #img { diff --git a/test/rangeinput/multiple.htm b/test/rangeinput/multiple.htm index 8d4d4a7..3aa64d2 100644 --- a/test/rangeinput/multiple.htm +++ b/test/rangeinput/multiple.htm @@ -1,5 +1,6 @@ + diff --git a/test/scrollable/single.html b/test/scrollable/single.html index d26bcde..69e16a3 100644 --- a/test/scrollable/single.html +++ b/test/scrollable/single.html @@ -1,5 +1,6 @@ + @@ -7,6 +8,7 @@ + diff --git a/test/tabs/slideshow.htm b/test/tabs/slideshow.htm index a149b5c..eed27c7 100644 --- a/test/tabs/slideshow.htm +++ b/test/tabs/slideshow.htm @@ -1,5 +1,6 @@ + diff --git a/test/tooltip/index.html b/test/tooltip/index.html index 0177a66..63bbd78 100644 --- a/test/tooltip/index.html +++ b/test/tooltip/index.html @@ -1,5 +1,6 @@ + From de457acd0ab7eec7e6cff1b03ce84912a9c594c2 Mon Sep 17 00:00:00 2001 From: Tero Piirainen Date: Fri, 8 Oct 2010 07:19:31 +0000 Subject: [PATCH 6/8] tweaking accordion --- .gitignore | 1 + src/accordion/accordion.js | 2 +- test/accordion/accordion.html | 17 +++++++++++++++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index ad2bfbd..2acc623 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ build +www # patch *.rej diff --git a/src/accordion/accordion.js b/src/accordion/accordion.js index 9b7f63f..c34d376 100644 --- a/src/accordion/accordion.js +++ b/src/accordion/accordion.js @@ -109,7 +109,7 @@ } $.fn.accordion = function(conf) { - return $.tools.create(this, "accordion", Tool, CONF, conf); + return $.tools.create(this, "accordion", Tool, CONF, conf, "Select"); }; })(jQuery); diff --git a/test/accordion/accordion.html b/test/accordion/accordion.html index f541634..d5acf8b 100644 --- a/test/accordion/accordion.html +++ b/test/accordion/accordion.html @@ -21,9 +21,22 @@
- From 4660bea90bbf0f10ffe10b54634f915a4ba6fc3b Mon Sep 17 00:00:00 2001 From: Tero Piirainen Date: Mon, 7 Feb 2011 06:40:31 +0000 Subject: [PATCH 7/8] modified gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 2acc623..05410dd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ +builder build www +site +jquerytools.github.com # patch *.rej From 6dcdb26a10085c8127efaad7c31f77179231e5fe Mon Sep 17 00:00:00 2001 From: Tero Piirainen Date: Tue, 8 Feb 2011 06:25:07 +0000 Subject: [PATCH 8/8] merging 1.2.6 --- test/dateinput/trigger.htm | 35 +++++++++++++++++++++++++++++++++++ test/overlay/another.htm | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 test/dateinput/trigger.htm create mode 100644 test/overlay/another.htm diff --git a/test/dateinput/trigger.htm b/test/dateinput/trigger.htm new file mode 100644 index 0000000..d27e372 --- /dev/null +++ b/test/dateinput/trigger.htm @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + diff --git a/test/overlay/another.htm b/test/overlay/another.htm new file mode 100644 index 0000000..a82c9ef --- /dev/null +++ b/test/overlay/another.htm @@ -0,0 +1,38 @@ + + + + + + + + +

+ show +

+ + +
+ +
+ asdfasdfsfadasd kasdj fjhasd fljkasd flkjasd flkasdj asdfasdfsfadasd kasdj fjhasd fljkasd flkjasd flkasdj asdfasdfsfadasd kasdj fjhasd fljkasd flkjasd flkasdj asdfasdfsfadasd kasdj fjhasd fljkasd flkjasd flkasdj +
+ + show b + +
+ +
+ +
+ asdfasdfsfadasd kasdj fjhasd fljkasd flkjasd flkasdj asdfasdfsfadasd kasdj fjhasd fljkasd flkjasd flkasdj asdfasdfsfadasd kasdj fjhasd fljkasd flkjasd flkasdj asdfasdfsfadasd kasdj fjhasd fljkasd flkjasd flkasdj +
+ +
+ +