aboutsummaryrefslogtreecommitdiffstats
path: root/template-common/lib/ui
diff options
context:
space:
mode:
Diffstat (limited to 'template-common/lib/ui')
-rw-r--r--template-common/lib/ui/ui.accordion.js294
-rw-r--r--template-common/lib/ui/ui.accordion.packed.js2
-rw-r--r--template-common/lib/ui/ui.core.js312
-rw-r--r--template-common/lib/ui/ui.core.packed.js2
4 files changed, 610 insertions, 0 deletions
diff --git a/template-common/lib/ui/ui.accordion.js b/template-common/lib/ui/ui.accordion.js
new file mode 100644
index 000000000..4df9edea9
--- /dev/null
+++ b/template-common/lib/ui/ui.accordion.js
@@ -0,0 +1,294 @@
+/*
+ * jQuery UI Accordion
+ *
+ * Copyright (c) 2007, 2008 Jörn Zaefferer
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Accordion
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function($) {
+
+$.widget("ui.accordion", {
+ init: function() {
+ var options = this.options;
+
+ if ( options.navigation ) {
+ var current = this.element.find("a").filter(options.navigationFilter);
+ if ( current.length ) {
+ if ( current.filter(options.header).length ) {
+ options.active = current;
+ } else {
+ options.active = current.parent().parent().prev();
+ current.addClass("current");
+ }
+ }
+ }
+
+ // calculate active if not specified, using the first header
+ options.headers = this.element.find(options.header);
+ options.active = findActive(options.headers, options.active);
+
+ // IE7-/Win - Extra vertical space in Lists fixed
+ if ($.browser.msie) {
+ this.element.find('a').css('zoom', '1');
+ }
+
+ if (!this.element.hasClass("ui-accordion")) {
+ this.element.addClass("ui-accordion");
+ $("<span class='ui-accordion-left'/>").insertBefore(options.headers);
+ $("<span class='ui-accordion-right'/>").appendTo(options.headers);
+ options.headers.addClass("ui-accordion-header").attr("tabindex", "0");
+ }
+
+ var maxHeight;
+ if ( options.fillSpace ) {
+ maxHeight = this.element.parent().height();
+ options.headers.each(function() {
+ maxHeight -= $(this).outerHeight();
+ });
+ var maxPadding = 0;
+ options.headers.next().each(function() {
+ maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height());
+ }).height(maxHeight - maxPadding);
+ } else if ( options.autoHeight ) {
+ maxHeight = 0;
+ options.headers.next().each(function() {
+ maxHeight = Math.max(maxHeight, $(this).outerHeight());
+ }).height(maxHeight);
+ }
+
+ options.headers
+ .not(options.active || "")
+ .next()
+ .hide();
+ options.active.parent().andSelf().addClass(options.selectedClass);
+
+ if (options.event) {
+ this.element.bind((options.event) + ".accordion", clickHandler);
+ }
+ },
+ activate: function(index) {
+ // call clickHandler with custom event
+ clickHandler.call(this.element[0], {
+ target: findActive( this.options.headers, index )[0]
+ });
+ },
+ destroy: function() {
+ this.options.headers.next().css("display", "");
+ if ( this.options.fillSpace || this.options.autoHeight ) {
+ this.options.headers.next().css("height", "");
+ }
+ $.removeData(this.element[0], "accordion");
+ this.element.removeClass("ui-accordion").unbind(".accordion");
+ }
+});
+
+function scopeCallback(callback, scope) {
+ return function() {
+ return callback.apply(scope, arguments);
+ };
+};
+
+function completed(cancel) {
+ // if removed while animated data can be empty
+ if (!$.data(this, "accordion")) {
+ return;
+ }
+
+ var instance = $.data(this, "accordion");
+ var options = instance.options;
+ options.running = cancel ? 0 : --options.running;
+ if ( options.running ) {
+ return;
+ }
+ if ( options.clearStyle ) {
+ options.toShow.add(options.toHide).css({
+ height: "",
+ overflow: ""
+ });
+ }
+ instance.trigger('change', null, options.data);
+}
+
+function toggle(toShow, toHide, data, clickedActive, down) {
+ var options = $.data(this, "accordion").options;
+ options.toShow = toShow;
+ options.toHide = toHide;
+ options.data = data;
+ var complete = scopeCallback(completed, this);
+
+ // count elements to animate
+ options.running = toHide.size() === 0 ? toShow.size() : toHide.size();
+
+ if ( options.animated ) {
+ if ( !options.alwaysOpen && clickedActive ) {
+ $.ui.accordion.animations[options.animated]({
+ toShow: jQuery([]),
+ toHide: toHide,
+ complete: complete,
+ down: down,
+ autoHeight: options.autoHeight
+ });
+ } else {
+ $.ui.accordion.animations[options.animated]({
+ toShow: toShow,
+ toHide: toHide,
+ complete: complete,
+ down: down,
+ autoHeight: options.autoHeight
+ });
+ }
+ } else {
+ if ( !options.alwaysOpen && clickedActive ) {
+ toShow.toggle();
+ } else {
+ toHide.hide();
+ toShow.show();
+ }
+ complete(true);
+ }
+}
+
+function clickHandler(event) {
+ var options = $.data(this, "accordion").options;
+ if (options.disabled) {
+ return false;
+ }
+
+ // called only when using activate(false) to close all parts programmatically
+ if ( !event.target && !options.alwaysOpen ) {
+ options.active.parent().andSelf().toggleClass(options.selectedClass);
+ var toHide = options.active.next(),
+ data = {
+ options: options,
+ newHeader: jQuery([]),
+ oldHeader: options.active,
+ newContent: jQuery([]),
+ oldContent: toHide
+ },
+ toShow = (options.active = $([]));
+ toggle.call(this, toShow, toHide, data );
+ return false;
+ }
+ // get the click target
+ var clicked = $(event.target);
+
+ // due to the event delegation model, we have to check if one
+ // of the parent elements is our actual header, and find that
+ // otherwise stick with the initial target
+ clicked = $( clicked.parents(options.header)[0] || clicked );
+
+ var clickedActive = clicked[0] == options.active[0];
+
+ // if animations are still active, or the active header is the target, ignore click
+ if (options.running || (options.alwaysOpen && clickedActive)) {
+ return false;
+ }
+ if (!clicked.is(options.header)) {
+ return;
+ }
+
+ // switch classes
+ options.active.parent().andSelf().toggleClass(options.selectedClass);
+ if ( !clickedActive ) {
+ clicked.parent().andSelf().addClass(options.selectedClass);
+ }
+
+ // find elements to show and hide
+ var toShow = clicked.next(),
+ toHide = options.active.next(),
+ data = {
+ options: options,
+ newHeader: clickedActive && !options.alwaysOpen ? $([]) : clicked,
+ oldHeader: options.active,
+ newContent: clickedActive && !options.alwaysOpen ? $([]) : toShow,
+ oldContent: toHide
+ },
+ down = options.headers.index( options.active[0] ) > options.headers.index( clicked[0] );
+
+ options.active = clickedActive ? $([]) : clicked;
+ toggle.call(this, toShow, toHide, data, clickedActive, down );
+
+ return false;
+};
+
+function findActive(headers, selector) {
+ return selector
+ ? typeof selector == "number"
+ ? headers.filter(":eq(" + selector + ")")
+ : headers.not(headers.not(selector))
+ : selector === false
+ ? $([])
+ : headers.filter(":eq(0)");
+}
+
+$.extend($.ui.accordion, {
+ defaults: {
+ selectedClass: "selected",
+ alwaysOpen: true,
+ animated: 'slide',
+ event: "click",
+ header: "a",
+ autoHeight: true,
+ running: 0,
+ navigationFilter: function() {
+ return this.href.toLowerCase() == location.href.toLowerCase();
+ }
+ },
+ animations: {
+ slide: function(options, additions) {
+ options = $.extend({
+ easing: "swing",
+ duration: 300
+ }, options, additions);
+ if ( !options.toHide.size() ) {
+ options.toShow.animate({height: "show"}, options);
+ return;
+ }
+ var hideHeight = options.toHide.height(),
+ showHeight = options.toShow.height(),
+ difference = showHeight / hideHeight;
+ options.toShow.css({ height: 0, overflow: 'hidden' }).show();
+ options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{
+ step: function(now) {
+ var current = (hideHeight - now) * difference;
+ if ($.browser.msie || $.browser.opera) {
+ current = Math.ceil(current);
+ }
+ options.toShow.height( current );
+ },
+ duration: options.duration,
+ easing: options.easing,
+ complete: function() {
+ if ( !options.autoHeight ) {
+ options.toShow.css("height", "auto");
+ }
+ options.complete();
+ }
+ });
+ },
+ bounceslide: function(options) {
+ this.slide(options, {
+ easing: options.down ? "bounceout" : "swing",
+ duration: options.down ? 1000 : 200
+ });
+ },
+ easeslide: function(options) {
+ this.slide(options, {
+ easing: "easeinout",
+ duration: 700
+ });
+ }
+ }
+});
+
+// deprecated, use accordion("activate", index) instead
+$.fn.activate = function(index) {
+ return this.accordion("activate", index);
+};
+
+})(jQuery);
diff --git a/template-common/lib/ui/ui.accordion.packed.js b/template-common/lib/ui/ui.accordion.packed.js
new file mode 100644
index 000000000..649527fc3
--- /dev/null
+++ b/template-common/lib/ui/ui.accordion.packed.js
@@ -0,0 +1,2 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(4(E){E.2f("d.5",{2e:4(){7 G=2.c;3(G.2d){7 J=2.e.13("a").m(G.1c);3(J.1p){3(J.m(G.o).1p){G.6=J}w{G.6=J.k().k().2c();J.v("2b")}}}G.8=2.e.13(G.o);G.6=C(G.8,G.6);3(E.U.15){2.e.13("a").l("2a","1")}3(!2.e.29("d-5")){2.e.v("d-5");E("<1o 1n=\'d-5-28\'/>").27(G.8);E("<1o 1n=\'d-5-26\'/>").25(G.8);G.8.v("d-5-o").24("23","0")}7 I;3(G.1k){I=2.e.k().b();G.8.O(4(){I-=E(2).1l()});7 H=0;G.8.h().O(4(){H=T.1m(H,E(2).22()-E(2).b())}).b(I-H)}w{3(G.g){I=0;G.8.h().O(4(){I=T.1m(I,E(2).1l())}).b(I)}}G.8.10(G.6||"").h().V();G.6.k().R().v(G.t);3(G.Z){2.e.21((G.Z)+".5",F)}},S:4(G){F.11(2.e[0],{12:C(2.c.8,G)[0]})},20:4(){2.c.8.h().l("1Z","");3(2.c.1k||2.c.g){2.c.8.h().l("b","")}E.1Y(2.e[0],"5");2.e.1X("d-5").1W(".5")}});4 B(H,G){9 4(){9 H.1V(G,1U)}}4 D(I){3(!E.p(2,"5")){9}7 G=E.p(2,"5");7 H=G.c;H.n=I?0:--H.n;3(H.n){9}3(H.1T){H.f.1S(H.i).l({b:"",18:""})}G.1R("1Q",1P,H.p)}4 A(G,K,L,J,M){7 I=E.p(2,"5").c;I.f=G;I.i=K;I.p=L;7 H=B(D,2);I.n=K.P()===0?G.P():K.P();3(I.Q){3(!I.j&&J){E.d.5.X[I.Q]({f:x([]),i:K,s:H,z:M,g:I.g})}w{E.d.5.X[I.Q]({f:G,i:K,s:H,z:M,g:I.g})}}w{3(!I.j&&J){G.1O()}w{K.V();G.W()}H(Y)}}4 F(L){7 J=E.p(2,"5").c;3(J.1N){9 u}3(!L.12&&!J.j){J.6.k().R().1j(J.t);7 I=J.6.h(),M={c:J,1i:x([]),1h:J.6,1g:x([]),1f:I},G=(J.6=E([]));A.11(2,G,I,M);9 u}7 K=E(L.12);K=E(K.1M(J.o)[0]||K);7 H=K[0]==J.6[0];3(J.n||(J.j&&H)){9 u}3(!K.1L(J.o)){9}J.6.k().R().1j(J.t);3(!H){K.k().R().v(J.t)}7 G=K.h(),I=J.6.h(),M={c:J,1i:H&&!J.j?E([]):K,1h:J.6,1g:H&&!J.j?E([]):G,1f:I},N=J.8.1e(J.6[0])>J.8.1e(K[0]);J.6=H?E([]):K;A.11(2,G,I,M,H,N);9 u}4 C(H,G){9 G?1K G=="1J"?H.m(":1d("+G+")"):H.10(H.10(G)):G===u?E([]):H.m(":1d(0)")}E.19(E.d.5,{1I:{t:"1H",j:Y,Q:"y",Z:"1G",o:"a",g:Y,n:0,1c:4(){9 2.1b.1a()==1F.1b.1a()}},X:{y:4(G,I){G=E.19({r:"14",q:1E},G,I);3(!G.i.P()){G.f.16({b:"W"},G);9}7 H=G.i.b(),J=G.f.b(),K=J/H;G.f.l({b:0,18:"17"}).W();G.i.m(":17").O(G.s).1D().m(":1C").16({b:"V"},{1B:4(L){7 M=(H-L)*K;3(E.U.15||E.U.1A){M=T.1z(M)}G.f.b(M)},q:G.q,r:G.r,s:4(){3(!G.g){G.f.l("b","1y")}G.s()}})},1x:4(G){2.y(G,{r:G.z?"1w":"14",q:G.z?1v:1u})},1t:4(G){2.y(G,{r:"1s",q:1r})}}});E.1q.S=4(G){9 2.5("S",G)}})(x)',62,140,'||this|if|function|accordion|active|var|headers|return||height|options|ui|element|toShow|autoHeight|next|toHide|alwaysOpen|parent|css|filter|running|header|data|duration|easing|complete|selectedClass|false|addClass|else|jQuery|slide|down|||||||||||||||each|size|animated|andSelf|activate|Math|browser|hide|show|animations|true|event|not|call|target|find|swing|msie|animate|hidden|overflow|extend|toLowerCase|href|navigationFilter|eq|index|oldContent|newContent|oldHeader|newHeader|toggleClass|fillSpace|outerHeight|max|class|span|length|fn|700|easeinout|easeslide|200|1000|bounceout|bounceslide|auto|ceil|opera|step|visible|end|300|location|click|selected|defaults|number|typeof|is|parents|disabled|toggle|null|change|trigger|add|clearStyle|arguments|apply|unbind|removeClass|removeData|display|destroy|bind|innerHeight|tabindex|attr|appendTo|right|insertBefore|left|hasClass|zoom|current|prev|navigation|init|widget'.split('|'),0,{}))
+
diff --git a/template-common/lib/ui/ui.core.js b/template-common/lib/ui/ui.core.js
new file mode 100644
index 000000000..5cb669800
--- /dev/null
+++ b/template-common/lib/ui/ui.core.js
@@ -0,0 +1,312 @@
+/*
+ * jQuery UI 1.6b
+ *
+ * Copyright (c) 2008 Paul Bakaus (ui.jquery.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI
+ */
+;(function($) {
+
+// This adds a selector to check if data exists.
+jQuery.extend(jQuery.expr[':'], {
+ data: "jQuery.data(a, m[3])"
+});
+
+$.ui = {
+ plugin: {
+ add: function(module, option, set) {
+ var proto = $.ui[module].prototype;
+ for(var i in set) {
+ proto.plugins[i] = proto.plugins[i] || [];
+ proto.plugins[i].push([option, set[i]]);
+ }
+ },
+ call: function(instance, name, args) {
+ var set = instance.plugins[name];
+ if(!set) { return; }
+
+ for (var i = 0; i < set.length; i++) {
+ if (instance.options[set[i][0]]) {
+ set[i][1].apply(instance.element, args);
+ }
+ }
+ }
+ },
+ cssCache: {},
+ css: function(name) {
+ if ($.ui.cssCache[name]) { return $.ui.cssCache[name]; }
+ var tmp = $('<div class="ui-gen">').addClass(name).css({position:'absolute', top:'-5000px', left:'-5000px', display:'block'}).appendTo('body');
+
+ //if (!$.browser.safari)
+ //tmp.appendTo('body');
+
+ //Opera and Safari set width and height to 0px instead of auto
+ //Safari returns rgba(0,0,0,0) when bgcolor is not set
+ $.ui.cssCache[name] = !!(
+ (!(/auto|default/).test(tmp.css('cursor')) || (/^[1-9]/).test(tmp.css('height')) || (/^[1-9]/).test(tmp.css('width')) ||
+ !(/none/).test(tmp.css('backgroundImage')) || !(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor')))
+ );
+ try { $('body').get(0).removeChild(tmp.get(0)); } catch(e){}
+ return $.ui.cssCache[name];
+ },
+ disableSelection: function(el) {
+ $(el).attr('unselectable', 'on').css('MozUserSelect', 'none').bind('selectstart', function() { return false; });
+ },
+ enableSelection: function(el) {
+ $(el).attr('unselectable', 'off').css('MozUserSelect', '').unbind('selectstart');
+ },
+ hasScroll: function(e, a) {
+ var scroll = (a && a == 'left') ? 'scrollLeft' : 'scrollTop',
+ has = false;
+
+ if (e[scroll] > 0) { return true; }
+
+ // TODO: determine which cases actually cause this to happen
+ // if the element doesn't have the scroll set, see if it's possible to
+ // set the scroll
+ e[scroll] = 1;
+ has = (e[scroll] > 0);
+ e[scroll] = 0;
+ return has;
+ }
+};
+
+
+/** jQuery core modifications and additions **/
+
+var _remove = $.fn.remove;
+$.fn.remove = function() {
+ $("*", this).add(this).triggerHandler("remove");
+ return _remove.apply(this, arguments );
+};
+
+// $.widget is a factory to create jQuery plugins
+// taking some boilerplate code out of the plugin code
+// created by Scott González and Jörn Zaefferer
+function getter(namespace, plugin, method) {
+ var methods = $[namespace][plugin].getter || [];
+ methods = (typeof methods == "string" ? methods.split(/,?\s+/) : methods);
+ return ($.inArray(method, methods) != -1);
+}
+
+$.widget = function(name, prototype) {
+ var namespace = name.split(".")[0];
+ name = name.split(".")[1];
+
+ // create plugin method
+ $.fn[name] = function(options) {
+ var isMethodCall = (typeof options == 'string'),
+ args = Array.prototype.slice.call(arguments, 1);
+
+ if (isMethodCall && getter(namespace, name, options)) {
+ var instance = $.data(this[0], name);
+ return (instance ? instance[options].apply(instance, args)
+ : undefined);
+ }
+
+ return this.each(function() {
+ var instance = $.data(this, name);
+ if (isMethodCall && instance && $.isFunction(instance[options])) {
+ instance[options].apply(instance, args);
+ } else if (!isMethodCall) {
+ $.data(this, name, new $[namespace][name](this, options));
+ }
+ });
+ };
+
+ // create widget constructor
+ $[namespace][name] = function(element, options) {
+ var self = this;
+
+ this.widgetName = name;
+ this.widgetEventPrefix = $[namespace][name].eventPrefix || name;
+ this.widgetBaseClass = namespace + '-' + name;
+
+ this.options = $.extend({}, $.widget.defaults, $[namespace][name].defaults, options);
+ this.element = $(element)
+ .bind('setData.' + name, function(e, key, value) {
+ return self.setData(key, value);
+ })
+ .bind('getData.' + name, function(e, key) {
+ return self.getData(key);
+ })
+ .bind('remove', function() {
+ return self.destroy();
+ });
+ this.init();
+ };
+
+ // add widget prototype
+ $[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype);
+};
+
+$.widget.prototype = {
+ init: function() {},
+ destroy: function() {
+ this.element.removeData(this.widgetName);
+ },
+
+ getData: function(key) {
+ return this.options[key];
+ },
+ setData: function(key, value) {
+ this.options[key] = value;
+
+ if (key == 'disabled') {
+ this.element[value ? 'addClass' : 'removeClass'](
+ this.widgetBaseClass + '-disabled');
+ }
+ },
+
+ enable: function() {
+ this.setData('disabled', false);
+ },
+ disable: function() {
+ this.setData('disabled', true);
+ },
+
+ trigger: function(type, e, data) {
+ var eventName = (type == this.widgetEventPrefix
+ ? type : this.widgetEventPrefix + type);
+ e = e || $.event.fix({ type: eventName, target: this.element[0] });
+ return this.element.triggerHandler(eventName, [e, data], this.options[type]);
+ }
+};
+
+$.widget.defaults = {
+ disabled: false
+};
+
+
+/** Mouse Interaction Plugin **/
+
+$.ui.mouse = {
+ mouseInit: function() {
+ var self = this;
+
+ this.element.bind('mousedown.'+this.widgetName, function(e) {
+ return self.mouseDown(e);
+ });
+
+ // Prevent text selection in IE
+ if ($.browser.msie) {
+ this._mouseUnselectable = this.element.attr('unselectable');
+ this.element.attr('unselectable', 'on');
+ }
+
+ this.started = false;
+ },
+
+ // TODO: make sure destroying one instance of mouse doesn't mess with
+ // other instances of mouse
+ mouseDestroy: function() {
+ this.element.unbind('.'+this.widgetName);
+
+ // Restore text selection in IE
+ ($.browser.msie
+ && this.element.attr('unselectable', this._mouseUnselectable));
+ },
+
+ mouseDown: function(e) {
+ // we may have missed mouseup (out of window)
+ (this._mouseStarted && this.mouseUp(e));
+
+ this._mouseDownEvent = e;
+
+ var self = this,
+ btnIsLeft = (e.which == 1),
+ elIsCancel = (typeof this.options.cancel == "string" ? $(e.target).parents().add(e.target).filter(this.options.cancel).length : false);
+ if (!btnIsLeft || elIsCancel || !this.mouseCapture(e)) {
+ return true;
+ }
+
+ this._mouseDelayMet = !this.options.delay;
+ if (!this._mouseDelayMet) {
+ this._mouseDelayTimer = setTimeout(function() {
+ self._mouseDelayMet = true;
+ }, this.options.delay);
+ }
+
+ if (this.mouseDistanceMet(e) && this.mouseDelayMet(e)) {
+ this._mouseStarted = (this.mouseStart(e) !== false);
+ if (!this._mouseStarted) {
+ e.preventDefault();
+ return true;
+ }
+ }
+
+ // these delegates are required to keep context
+ this._mouseMoveDelegate = function(e) {
+ return self.mouseMove(e);
+ };
+ this._mouseUpDelegate = function(e) {
+ return self.mouseUp(e);
+ };
+ $(document)
+ .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+ .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+
+ return false;
+ },
+
+ mouseMove: function(e) {
+ // IE mouseup check - mouseup happened when mouse was out of window
+ if ($.browser.msie && !e.button) {
+ return this.mouseUp(e);
+ }
+
+ if (this._mouseStarted) {
+ this.mouseDrag(e);
+ return false;
+ }
+
+ if (this.mouseDistanceMet(e) && this.mouseDelayMet(e)) {
+ this._mouseStarted =
+ (this.mouseStart(this._mouseDownEvent, e) !== false);
+ (this._mouseStarted ? this.mouseDrag(e) : this.mouseUp(e));
+ }
+
+ return !this._mouseStarted;
+ },
+
+ mouseUp: function(e) {
+ $(document)
+ .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+ .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+
+ if (this._mouseStarted) {
+ this._mouseStarted = false;
+ this.mouseStop(e);
+ }
+
+ return false;
+ },
+
+ mouseDistanceMet: function(e) {
+ return (Math.max(
+ Math.abs(this._mouseDownEvent.pageX - e.pageX),
+ Math.abs(this._mouseDownEvent.pageY - e.pageY)
+ ) >= this.options.distance
+ );
+ },
+
+ mouseDelayMet: function(e) {
+ return this._mouseDelayMet;
+ },
+
+ // These are placeholder methods, to be overriden by extending plugin
+ mouseStart: function(e) {},
+ mouseDrag: function(e) {},
+ mouseStop: function(e) {},
+ mouseCapture: function(e) { return true; }
+};
+
+$.ui.mouse.defaults = {
+ cancel: null,
+ distance: 1,
+ delay: 0
+};
+
+})(jQuery);
diff --git a/template-common/lib/ui/ui.core.packed.js b/template-common/lib/ui/ui.core.packed.js
new file mode 100644
index 000000000..b0428002d
--- /dev/null
+++ b/template-common/lib/ui/ui.core.packed.js
@@ -0,0 +1,2 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(4(C){v.16(v.2C[":"],{r:"v.r(a, m[3])"});C.d={2B:{11:4(E,F,H){7 G=C.d[E].q;1C(7 D 2A H){G.O[D]=G.O[D]||[];G.O[D].2z([F,H[D]])}},1u:4(D,F,E){7 H=D.O[F];6(!H){5}1C(7 G=0;G<H.1k;G++){6(D.c[H[G][0]]){H[G][1].N(D.b,E)}}}},t:{},f:4(D){6(C.d.t[D]){5 C.d.t[D]}7 E=C(\'<2y 2x="d-2w">\').1q(D).f({2v:"2u",2t:"-1B",1v:"-1B",2s:"2r"}).2q("1A");C.d.t[D]=!!((!(/2p|2o/).u(E.f("2n"))||(/^[1-9]/).u(E.f("2m"))||(/^[1-9]/).u(E.f("2l"))||!(/1y/).u(E.f("2k"))||!(/2j|2i\\(0, 0, 0, 0\\)/).u(E.f("2h"))));2g{C("1A").1z(0).2f(E.1z(0))}2e(F){}5 C.d.t[D]},2d:4(D){C(D).l("k","1n").f("1x","1y").h("1w",4(){5 8})},2c:4(D){C(D).l("k","2b").f("1x","").z("1w")},2a:4(G,E){7 D=(E&&E=="1v")?"29":"28",F=8;6(G[D]>0){5 i}G[D]=1;F=(G[D]>0);G[D]=0;5 F}};7 B=C.17.M;C.17.M=4(){C("*",2).11(2).1o("M");5 B.N(2,1t)};4 A(E,F,G){7 D=C[E][F].27||[];D=(13 D=="12"?D.18(/,?\\s+/):D);5(C.26(G,D)!=-1)}C.o=4(E,D){7 F=E.18(".")[0];E=E.18(".")[1];C.17[E]=4(J){7 H=(13 J=="12"),I=25.q.24.1u(1t,1);6(H&&A(F,E,J)){7 G=C.r(2[0],E);5(G?G[J].N(G,I):23)}5 2.22(4(){7 K=C.r(2,E);6(H&&K&&C.21(K[J])){K[J].N(K,I)}20{6(!H){C.r(2,E,1Z C[F][E](2,J))}}})};C[F][E]=4(I,H){7 G=2;2.g=E;2.14=C[F][E].1Y||E;2.1p=F+"-"+E;2.c=C.16({},C.o.w,C[F][E].w,H);2.b=C(I).h("p."+E,4(L,J,K){5 G.p(J,K)}).h("15."+E,4(K,J){5 G.15(J)}).h("M",4(){5 G.1r()});2.1s()};C[F][E].q=C.16({},C.o.q,D)};C.o.q={1s:4(){},1r:4(){2.b.1X(2.g)},15:4(D){5 2.c[D]},p:4(D,E){2.c[D]=E;6(D=="n"){2.b[E?"1q":"1W"](2.1p+"-n")}},1V:4(){2.p("n",8)},1U:4(){2.p("n",i)},1T:4(E,G,F){7 D=(E==2.14?E:2.14+E);G=G||C.1S.1R({1Q:D,10:2.b[0]});5 2.b.1o(D,[G,F],2.c[E])}};C.o.w={n:8};C.d.1a={1P:4(){7 D=2;2.b.h("1O."+2.g,4(E){5 D.1l(E)});6(C.Z.Y){2.1m=2.b.l("k");2.b.l("k","1n")}2.1N=8},1M:4(){2.b.z("."+2.g);(C.Z.Y&&2.b.l("k",2.1m))},1l:4(F){(2.e&&2.j(F));2.y=F;7 E=2,G=(F.1L==1),D=(13 2.c.Q=="12"?C(F.10).1K().11(F.10).1J(2.c.Q).1k:8);6(!G||D||!2.1b(F)){5 i}2.x=!2.c.P;6(!2.x){2.1I=1H(4(){E.x=i},2.c.P)}6(2.V(F)&&2.T(F)){2.e=(2.S(F)!==8);6(!2.e){F.1G();5 i}}2.X=4(H){5 E.1j(H)};2.W=4(H){5 E.j(H)};C(1i).h("1h."+2.g,2.X).h("1g."+2.g,2.W);5 8},1j:4(D){6(C.Z.Y&&!D.1F){5 2.j(D)}6(2.e){2.R(D);5 8}6(2.V(D)&&2.T(D)){2.e=(2.S(2.y,D)!==8);(2.e?2.R(D):2.j(D))}5!2.e},j:4(D){C(1i).z("1h."+2.g,2.X).z("1g."+2.g,2.W);6(2.e){2.e=8;2.1c(D)}5 8},V:4(D){5(U.1E(U.1e(2.y.1f-D.1f),U.1e(2.y.1d-D.1d))>=2.c.19)},T:4(D){5 2.x},S:4(D){},R:4(D){},1c:4(D){},1b:4(D){5 i}};C.d.1a.w={Q:1D,19:1,P:0}})(v)',62,163,'||this||function|return|if|var|false|||element|options|ui|_mouseStarted|css|widgetName|bind|true|mouseUp|unselectable|attr||disabled|widget|setData|prototype|data||cssCache|test|jQuery|defaults|_mouseDelayMet|_mouseDownEvent|unbind|||||||||||||remove|apply|plugins|delay|cancel|mouseDrag|mouseStart|mouseDelayMet|Math|mouseDistanceMet|_mouseUpDelegate|_mouseMoveDelegate|msie|browser|target|add|string|typeof|widgetEventPrefix|getData|extend|fn|split|distance|mouse|mouseCapture|mouseStop|pageY|abs|pageX|mouseup|mousemove|document|mouseMove|length|mouseDown|_mouseUnselectable|on|triggerHandler|widgetBaseClass|addClass|destroy|init|arguments|call|left|selectstart|MozUserSelect|none|get|body|5000px|for|null|max|button|preventDefault|setTimeout|_mouseDelayTimer|filter|parents|which|mouseDestroy|started|mousedown|mouseInit|type|fix|event|trigger|disable|enable|removeClass|removeData|eventPrefix|new|else|isFunction|each|undefined|slice|Array|inArray|getter|scrollTop|scrollLeft|hasScroll|off|enableSelection|disableSelection|catch|removeChild|try|backgroundColor|rgba|transparent|backgroundImage|width|height|cursor|default|auto|appendTo|block|display|top|absolute|position|gen|class|div|push|in|plugin|expr'.split('|'),0,{}))
+