Permalink
Browse files

Gallery Build Tag: gallery-2011.02.02-21-07

  • Loading branch information...
YUI Builder
YUI Builder committed Feb 2, 2011
1 parent 6e4386b commit 833887ee6b2ef467e92991df6ea19ff094529973
Showing with 2,163 additions and 711 deletions.
  1. +44 −0 build/gallery-ac-list-scaler/gallery-ac-list-scaler-debug.js
  2. +1 −0 build/gallery-ac-list-scaler/gallery-ac-list-scaler-min.js
  3. +44 −0 build/gallery-ac-list-scaler/gallery-ac-list-scaler.js
  4. +185 −0 build/gallery-ac-multidelimit/gallery-ac-multidelimit-debug.js
  5. +1 −0 build/gallery-ac-multidelimit/gallery-ac-multidelimit-min.js
  6. +185 −0 build/gallery-ac-multidelimit/gallery-ac-multidelimit.js
  7. +149 −0 build/gallery-ac-typeahead/gallery-ac-typeahead-debug.js
  8. +1 −0 build/gallery-ac-typeahead/gallery-ac-typeahead-min.js
  9. +149 −0 build/gallery-ac-typeahead/gallery-ac-typeahead.js
  10. +100 −76 build/gallery-button/gallery-button-debug.js
  11. +1 −1 build/gallery-button/gallery-button-min.js
  12. +98 −76 build/gallery-button/gallery-button.js
  13. +54 −52 build/gallery-dialog/gallery-dialog-debug.js
  14. +1 −1 build/gallery-dialog/gallery-dialog-min.js
  15. +53 −51 build/gallery-dialog/gallery-dialog.js
  16. +18 −10 build/gallery-ellipsis/gallery-ellipsis-debug.js
  17. +1 −1 build/gallery-ellipsis/gallery-ellipsis-min.js
  18. +18 −10 build/gallery-ellipsis/gallery-ellipsis.js
  19. +21 −45 build/gallery-event-nav-keys/gallery-event-nav-keys-debug.js
  20. +1 −1 build/gallery-event-nav-keys/gallery-event-nav-keys-min.js
  21. +21 −45 build/gallery-event-nav-keys/gallery-event-nav-keys.js
  22. +226 −131 build/gallery-markout/gallery-markout-debug.js
  23. +4 −4 build/gallery-markout/gallery-markout-min.js
  24. +226 −131 build/gallery-markout/gallery-markout.js
  25. +105 −33 build/gallery-progress-bar/gallery-progress-bar-debug.js
  26. +1 −1 build/gallery-progress-bar/gallery-progress-bar-min.js
  27. +99 −31 build/gallery-progress-bar/gallery-progress-bar.js
  28. +171 −0 build/gallery-xarno-calendar-controls/gallery-xarno-calendar-controls-debug.js
  29. +1 −0 build/gallery-xarno-calendar-controls/gallery-xarno-calendar-controls-min.js
  30. +171 −0 build/gallery-xarno-calendar-controls/gallery-xarno-calendar-controls.js
  31. +6 −5 build/gallery-xarno-calendar/gallery-xarno-calendar-debug.js
  32. +1 −1 build/gallery-xarno-calendar/gallery-xarno-calendar-min.js
  33. +6 −5 build/gallery-xarno-calendar/gallery-xarno-calendar.js
@@ -0,0 +1,44 @@
+YUI.add('gallery-ac-list-scaler', function(Y) {
+
+var HOST = 'host',
+ CONTENT_BOX = 'contentBox';
+
+Y.ACListScaler = Y.Base.create('ac-list-scaler', Y.Plugin.Base, [], {
+ _afterRender : function (e) {
+ var host = this.get(HOST),
+ hostCb = host.get(CONTENT_BOX);
+ hostCb.setStyle('overflow', 'auto');
+ },
+
+ _afterResults : function(e) {
+ var host = this.get(HOST),
+ hostCb, cbRegion, vpRegion;
+
+ if (host.get('visible')) {
+ hostCb = host.get(CONTENT_BOX);
+ vpRegion = Y.DOM.viewportRegion();
+
+ hostCb.setStyle('height', '');
+ cbRegion = hostCb.get('region');
+ if (cbRegion.height + cbRegion.top > vpRegion.height) {
+ hostCb.setStyle('height', (vpRegion.height - cbRegion.top) + 'px');
+ }
+ }
+ },
+
+ initializer : function () {
+ this.doAfter('render', this._afterRender);
+ this.doAfter('results', this._afterResults);
+ },
+
+ destructor : function () {
+ var host = this.get(HOST),
+ hostCb = host.get(CONTENT_BOX);
+ hostCb.setStyle('overflow', '');
+ }
+}, {
+ NS : 'scaler'
+});
+
+
+}, 'gallery-2011.02.02-21-07' ,{requires:['base-build', 'plugin', 'autocomplete-list']});

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -0,0 +1,44 @@
+YUI.add('gallery-ac-list-scaler', function(Y) {
+
+var HOST = 'host',
+ CONTENT_BOX = 'contentBox';
+
+Y.ACListScaler = Y.Base.create('ac-list-scaler', Y.Plugin.Base, [], {
+ _afterRender : function (e) {
+ var host = this.get(HOST),
+ hostCb = host.get(CONTENT_BOX);
+ hostCb.setStyle('overflow', 'auto');
+ },
+
+ _afterResults : function(e) {
+ var host = this.get(HOST),
+ hostCb, cbRegion, vpRegion;
+
+ if (host.get('visible')) {
+ hostCb = host.get(CONTENT_BOX);
+ vpRegion = Y.DOM.viewportRegion();
+
+ hostCb.setStyle('height', '');
+ cbRegion = hostCb.get('region');
+ if (cbRegion.height + cbRegion.top > vpRegion.height) {
+ hostCb.setStyle('height', (vpRegion.height - cbRegion.top) + 'px');
+ }
+ }
+ },
+
+ initializer : function () {
+ this.doAfter('render', this._afterRender);
+ this.doAfter('results', this._afterResults);
+ },
+
+ destructor : function () {
+ var host = this.get(HOST),
+ hostCb = host.get(CONTENT_BOX);
+ hostCb.setStyle('overflow', '');
+ }
+}, {
+ NS : 'scaler'
+});
+
+
+}, 'gallery-2011.02.02-21-07' ,{requires:['base-build', 'plugin', 'autocomplete-list']});
@@ -0,0 +1,185 @@
+YUI.add('gallery-ac-multidelimit', function(Y) {
+
+var HOST = 'host',
+ QUERY_DELIMITER = 'queryDelimiter',
+ VALUE = 'value',
+ VALUE_CHANGE = 'valueChange',
+ PARSE_VALUE = '_parseValue',
+ UPDATE_VALUE = '_updateValue',
+ ON_INPUT_BLUR = '_onInputBlur';
+
+Y.ACMultiQueryDelim = Y.Base.create('ac-multidelim', Y.Plugin.Base, [], {
+ _beforeParseValue : function (value) {
+ return new Y.Do.Prevent();
+ },
+
+ _findLastDelimiter : function (str, delim) {
+ if (!Y.Lang.isArray(delim)) {
+ return delim;
+ }
+
+ var delimIndex = 0,
+ useDelim;
+
+ Y.Array.each(delim, function (d) {
+ var index = str.lastIndexOf(d);
+ if (index > delimIndex) {
+ delimIndex = index;
+ useDelim = d;
+ }
+ });
+
+ return useDelim;
+ },
+
+ _newParseValue : function (value) {
+ var delim = this.get(HOST).get(QUERY_DELIMITER);
+
+ value = value || '';
+
+ delim = this._findLastDelimiter(value, delim);
+
+ if (Y.Lang.isString(delim)) {
+ value = value.split(delim);
+ value = value[value.length - 1];
+ }
+
+ return new Y.Do.AlterReturn('', Y.Lang.trimLeft(value));
+ },
+
+ _newUpdateValue : function (newVal) {
+ var host = this.get(HOST),
+ delim = host.get(QUERY_DELIMITER),
+ insertDelim,
+ len,
+ prevVal;
+
+ newVal = Y.Lang.trimLeft(newVal);
+
+ if (delim) {
+ if (Y.Lang.isString(delim)) {
+ insertDelim = Y.Lang.trim(delim); // so we don't double up on spaces
+ prevVal = Y.Array.map(Y.Lang.trim(host.get(VALUE)).split(delim), Y.Lang.trim);
+ len = prevVal.length;
+
+ if (len > 1) {
+ prevVal[len - 1] = newVal;
+ newVal = prevVal.join(insertDelim + ' ');
+ }
+
+ newVal = newVal + insertDelim + ' ';
+ } else if (Y.Lang.isArray(delim)) {
+ // For now if you have multiple delimiters, there is no need to
+ // try and append one after completing
+ }
+ }
+
+ host.set(VALUE, newVal);
+ return new Y.Do.Prevent();
+ },
+
+ _newOnInputBlur : function (e) {
+ var host = this.get(HOST),
+ delim = host.get(QUERY_DELIMITER),
+ testArr,
+ delimPos,
+ newVal,
+ value;
+
+ function trimDelim(str, d) {
+ while ((str = Y.Lang.trimRight(str)) &&
+ (delimPos = str.length - d.length) &&
+ str.lastIndexOf(d) === delimPos) {
+
+ str = str.substring(0, delimPos);
+ }
+ return str;
+ }
+
+ function checkForDelimiter (d, i) {
+ var trimmed = trimDelim(newVal, Y.Lang.trimRight(d));
+ if (trimmed == newVal) {
+ testArr[i] = true;
+ } else {
+ testArr[i] = false;
+ }
+ newVal = trimmed;
+ }
+
+ // If a query delimiter is set and the input's value contains one or
+ // more trailing delimiters, strip them.
+ if (delim && !host.get('allowTrailingDelimiter')) {
+ value = newVal = host._inputNode.get(VALUE);
+
+ if (delim) {
+ if (Y.Lang.isString(delim)) {
+ delim = Y.Lang.trimRight(delim);
+ newVal = trimDelim(newVal, delim);
+ } else if (Y.Lang.isArray(delim)) {
+ // For an array of delimiters, we need to go through
+ // all of them until none remain at the end
+ testArr = Y.Array.map(delim, function () {
+ return false;
+ });
+
+ while (Y.Array.indexOf(testArr, false) > -1) {
+ Y.Array.each(delim, checkForDelimiter);
+ }
+ }
+ } else {
+ // Delimiter is one or more space characters, so just trim the
+ // value.
+ newVal = Y.Lang.trimRight(newVal);
+ }
+
+ if (newVal !== value) {
+ host.set(VALUE, newVal);
+ }
+ }
+ return new Y.Do.Prevent();
+ },
+
+ _onValueChange : function (e) {
+ if (!e.newVal || (e.src && e.src == 'ui')) {
+ return;
+ }
+ var val = e.newVal,
+ host = this.get(HOST),
+ completed;
+
+ completed = this.getCompletedStr(e.prevVal, val, host.get(QUERY_DELIMITER));
+
+ if (completed) {
+ e.newVal = completed;
+ } else {
+ e.newVal = val;
+ }
+ },
+
+ getCompletedStr : function (fullStr, term, delim) {
+ var lastDelim = this._findLastDelimiter(fullStr, delim),
+ valueArr;
+
+ if (lastDelim) {
+ valueArr = fullStr.split(lastDelim);
+ valueArr.pop();
+ valueArr.push(term);
+ return valueArr.join(lastDelim);
+ }
+
+ },
+
+ initializer : function () {
+ this.doBefore(PARSE_VALUE, this._beforeParseValue);
+ this.doAfter(PARSE_VALUE, this._newParseValue);
+ this.doBefore(UPDATE_VALUE, this._newUpdateValue);
+ this.doBefore(ON_INPUT_BLUR, this._newOnInputBlur);
+ this.doBefore(VALUE_CHANGE, this._onValueChange);
+ }
+}, {
+ NS : 'multiQueryDelim'
+});
+
+
+
+}, 'gallery-2011.02.02-21-07' ,{requires:['autocomplete-list', 'plugin', 'base-build']});

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 833887e

Please sign in to comment.