Permalink
Browse files

Merge branch 'master' of yuisource.corp.yahoo.com:yui3

  • Loading branch information...
2 parents 031daa7 + 6b33c38 commit 68f0aa41bbc72389cf2a13450a3f311fd71e2ac0 @allenrabinovich allenrabinovich committed Aug 29, 2012
Showing with 5,373 additions and 5,373 deletions.
  1. +146 −146 build/app-base/app-base-coverage.js
  2. +2 −2 build/app-base/app-base-debug.js
  3. +1 −1 build/app-base/app-base-min.js
  4. +2 −2 build/app-base/app-base.js
  5. +1 −0 build/app-transitions-css/app-transitions-css.css
  6. +103 −103 build/app-transitions-native/app-transitions-native-coverage.js
  7. +2 −2 build/app-transitions-native/app-transitions-native-debug.js
  8. +1 −1 build/app-transitions-native/app-transitions-native-min.js
  9. +2 −2 build/app-transitions-native/app-transitions-native.js
  10. +23 −23 build/app-transitions/app-transitions-coverage.js
  11. +2 −2 build/app-transitions/app-transitions-debug.js
  12. +1 −1 build/app-transitions/app-transitions-min.js
  13. +2 −2 build/app-transitions/app-transitions.js
  14. +84 −84 build/cache-base/cache-base-coverage.js
  15. +2 −2 build/cache-base/cache-base-debug.js
  16. +1 −1 build/cache-base/cache-base-min.js
  17. +2 −2 build/cache-base/cache-base.js
  18. +76 −76 build/cache-offline/cache-offline-coverage.js
  19. +2 −2 build/cache-offline/cache-offline-debug.js
  20. +1 −1 build/cache-offline/cache-offline-min.js
  21. +2 −2 build/cache-offline/cache-offline.js
  22. +18 −18 build/cache-plugin/cache-plugin-coverage.js
  23. +2 −2 build/cache-plugin/cache-plugin-debug.js
  24. +1 −1 build/cache-plugin/cache-plugin-min.js
  25. +2 −2 build/cache-plugin/cache-plugin.js
  26. +35 −35 build/createlink-base/createlink-base-coverage.js
  27. +167 −167 build/dd-constrain/dd-constrain-coverage.js
  28. +107 −107 build/dd-ddm-base/dd-ddm-base-coverage.js
  29. +152 −152 build/dd-ddm-drop/dd-ddm-drop-coverage.js
  30. +45 −45 build/dd-ddm/dd-ddm-coverage.js
  31. +100 −100 build/dd-delegate/dd-delegate-coverage.js
  32. +334 −334 build/dd-drag/dd-drag-coverage.js
  33. +18 −18 build/dd-drop-plugin/dd-drop-plugin-coverage.js
  34. +0 −1 build/dd-drop-plugin/dd-drop-plugin-min.js
  35. +189 −189 build/dd-drop/dd-drop-coverage.js
  36. +24 −24 build/dd-gestures/dd-gestures-coverage.js
  37. +58 −58 build/dd-plugin/dd-plugin-coverage.js
  38. +89 −89 build/dd-proxy/dd-proxy-coverage.js
  39. +128 −128 build/dd-scroll/dd-scroll-coverage.js
  40. +1 −1 build/dial/assets/skins/night/dial.css
  41. +1 −1 build/dial/assets/skins/sam/dial.css
  42. +1,659 −1,659 build/dial/dial-coverage.js
  43. +2 −2 build/dial/dial-debug.js
  44. +3 −3 build/dial/dial-min.js
  45. +2 −2 build/dial/dial.js
  46. +55 −55 build/dump/dump-coverage.js
  47. +2 −2 build/dump/dump-debug.js
  48. +1 −1 build/dump/dump-min.js
  49. +2 −2 build/dump/dump.js
  50. +331 −331 build/editor-base/editor-base-coverage.js
  51. +123 −123 build/editor-bidi/editor-bidi-coverage.js
  52. +53 −53 build/editor-br/editor-br-coverage.js
  53. +48 −48 build/editor-lists/editor-lists-coverage.js
  54. +49 −49 build/editor-para-base/editor-para-base-coverage.js
  55. +57 −57 build/editor-para-ie/editor-para-ie-coverage.js
  56. +169 −169 build/editor-para/editor-para-coverage.js
  57. +434 −434 build/editor-selection/editor-selection-coverage.js
  58. +26 −26 build/editor-tab/editor-tab-coverage.js
  59. +323 −323 build/exec-command/exec-command-coverage.js
  60. +105 −105 build/features/features-coverage.js
Sorry, we could not display the entire diff because it was too big.
View
292 build/app-base/app-base-coverage.js
146 additions, 146 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
4 build/app-base/app-base-debug.js
@@ -1,4 +1,4 @@
-YUI.add('app-base', function(Y) {
+YUI.add('app-base', function (Y, NAME) {
/**
The App Framework provides simple MVC-like building blocks (models, model lists,
@@ -1075,4 +1075,4 @@ Default `serverRouting` attribute value for all apps.
**/
-}, '@VERSION@' ,{requires:['classnamemanager', 'pjax-base', 'router', 'view']});
+}, '@VERSION@', {"requires": ["classnamemanager", "pjax-base", "router", "view"]});
View
2 build/app-base/app-base-min.js
@@ -1 +1 @@
-YUI.add("app-base",function(c){var g=c.Lang,i=c.Object,a=c.PjaxBase,d=c.Router,b=c.View,e=c.ClassNameManager.getClassName,h=c.config.win,f;f=c.Base.create("app",c.Base,[b,d,a],{views:{},initializer:function(k){k||(k={});var j={};function l(m,n){j[n]=c.merge(j[n],m);}i.each(this.views,l);i.each(k.views,l);this.views=j;this._viewInfoMap={};this.after("activeViewChange",c.bind("_afterActiveViewChange",this));if(!this.get("serverRouting")){this._pjaxBindUI();}},createView:function(m,l){var k=this.getViewInfo(m),n=(k&&k.type)||b,o,j;o=g.isString(n)?i.getValue(c,n.split(".")):n;j=new o(l);this._viewInfoMap[c.stamp(j,true)]=k;return j;},getViewInfo:function(j){if(g.isString(j)){return this.views[j];}return j&&this._viewInfoMap[c.stamp(j,true)];},render:function(){var o=c.App.CLASS_NAMES,k=this.get("container"),j=this.get("viewContainer"),l=this.get("activeView"),n=l&&l.get("container"),m=k.compareTo(j);k.addClass(o.app);j.addClass(o.views);if(l&&!j.contains(n)){j.appendChild(n);}if(!k.contains(j)&&!m){k.appendChild(j);}return this;},showView:function(j,m,l,o){var k,n;l||(l={});if(o){l=c.merge(l,{callback:o});}else{if(g.isFunction(l)){l={callback:l};}}if(g.isString(j)){k=this.getViewInfo(j);if(k&&k.preserve&&k.instance){j=k.instance;this._viewInfoMap[c.stamp(j,true)]=k;}else{j=this.createView(j,m);n=true;}}if(l.update&&!n){j.setAttrs(m);}if("render" in l){l.render&&j.render();}else{if(n){j.render();}}return this._set("activeView",j,{options:l});},_attachView:function(k,l){if(!k){return;}var m=this.getViewInfo(k),j=this.get("viewContainer");k.addTarget(this);m&&(m.instance=k);j[l?"prepend":"append"](k.get("container"));},_destroyContainer:function(){var m=c.App.CLASS_NAMES,k=this.get("container"),j=this.get("viewContainer"),l=k.compareTo(j);if(c.one("body").compareTo(k)){this.detachEvents();k&&k.removeClass(m.app);if(l){k&&k.removeClass(m.views);}else{j&&j.remove(true);}return;}j&&j.remove(true);!l&&k&&k.remove(true);},_detachView:function(j){if(!j){return;}var k=this.getViewInfo(j)||{};if(k.preserve){j.remove();}else{j.destroy({remove:true});delete this._viewInfoMap[c.stamp(j,true)];if(j===k.instance){delete k.instance;}}j.removeTarget(this);},_getViewContainer:function(j){if(!j&&!this._viewContainer){j=this._viewContainer=this.create();this._set("viewContainer",j);}return j;},_initHtml5:function(){if(this.get("serverRouting")===false){return false;}else{return d.html5;}},_isChildView:function(j,m){var l=this.getViewInfo(j),k=this.getViewInfo(m);if(l&&k){return this.getViewInfo(l.parent)===k;}return false;},_isParentView:function(j,m){var k=this.getViewInfo(j),l=this.getViewInfo(m);if(k&&l){return this.getViewInfo(l.parent)===k;}return false;},_navigate:function(k,j){if(!this.get("serverRouting")){j=c.merge({force:true},j);}return a.prototype._navigate.call(this,k,j);},_save:function(j,k){if(this.get("serverRouting")&&!this.get("html5")){if(!this._hasSameOrigin(j)){c.error("Security error: The new URL must be of the same origin as the current URL.");return this;}j=this._joinURL(j||"");if(k){h&&h.location.replace(j);}else{h&&(h.location=j);}return this;}return d.prototype._save.apply(this,arguments);},_uiSetActiveView:function(p,n,m){m||(m={});var o=m.callback,j=this._isChildView(p,n),l=!j&&this._isParentView(p,n),k=!!m.prepend||l;if(p===n){return o&&o.call(this,p);}this._attachView(p,k);this._detachView(n);o&&o.call(this,p);},_afterActiveViewChange:function(j){this._uiSetActiveView(j.newVal,j.prevVal,j.options);}},{ATTRS:{activeView:{value:null,readOnly:true},container:{valueFn:function(){return c.one("body");}},html5:{valueFn:"_initHtml5"},linkSelector:{value:"a"},serverRouting:{valueFn:function(){return c.App.serverRouting;},writeOnce:"initOnly"},viewContainer:{getter:"_getViewContainer",setter:c.one,writeOnce:true}},_NON_ATTRS_CFG:["views"]});c.namespace("App").Base=f;c.App=c.mix(c.Base.create("app",f,[]),c.App,true);c.App.CLASS_NAMES={app:e("app"),views:e("app","views")};},"@VERSION@",{requires:["classnamemanager","pjax-base","router","view"]});
+YUI.add("app-base",function(c,j){var g=c.Lang,i=c.Object,a=c.PjaxBase,d=c.Router,b=c.View,e=c.ClassNameManager.getClassName,h=c.config.win,f;f=c.Base.create("app",c.Base,[b,d,a],{views:{},initializer:function(l){l||(l={});var k={};function m(n,o){k[o]=c.merge(k[o],n);}i.each(this.views,m);i.each(l.views,m);this.views=k;this._viewInfoMap={};this.after("activeViewChange",c.bind("_afterActiveViewChange",this));if(!this.get("serverRouting")){this._pjaxBindUI();}},createView:function(n,m){var l=this.getViewInfo(n),o=(l&&l.type)||b,p,k;p=g.isString(o)?i.getValue(c,o.split(".")):o;k=new p(m);this._viewInfoMap[c.stamp(k,true)]=l;return k;},getViewInfo:function(k){if(g.isString(k)){return this.views[k];}return k&&this._viewInfoMap[c.stamp(k,true)];},render:function(){var p=c.App.CLASS_NAMES,l=this.get("container"),k=this.get("viewContainer"),m=this.get("activeView"),o=m&&m.get("container"),n=l.compareTo(k);l.addClass(p.app);k.addClass(p.views);if(m&&!k.contains(o)){k.appendChild(o);}if(!l.contains(k)&&!n){l.appendChild(k);}return this;},showView:function(k,n,m,p){var l,o;m||(m={});if(p){m=c.merge(m,{callback:p});}else{if(g.isFunction(m)){m={callback:m};}}if(g.isString(k)){l=this.getViewInfo(k);if(l&&l.preserve&&l.instance){k=l.instance;this._viewInfoMap[c.stamp(k,true)]=l;}else{k=this.createView(k,n);o=true;}}if(m.update&&!o){k.setAttrs(n);}if("render" in m){m.render&&k.render();}else{if(o){k.render();}}return this._set("activeView",k,{options:m});},_attachView:function(l,m){if(!l){return;}var n=this.getViewInfo(l),k=this.get("viewContainer");l.addTarget(this);n&&(n.instance=l);k[m?"prepend":"append"](l.get("container"));},_destroyContainer:function(){var n=c.App.CLASS_NAMES,l=this.get("container"),k=this.get("viewContainer"),m=l.compareTo(k);if(c.one("body").compareTo(l)){this.detachEvents();l&&l.removeClass(n.app);if(m){l&&l.removeClass(n.views);}else{k&&k.remove(true);}return;}k&&k.remove(true);!m&&l&&l.remove(true);},_detachView:function(k){if(!k){return;}var l=this.getViewInfo(k)||{};if(l.preserve){k.remove();}else{k.destroy({remove:true});delete this._viewInfoMap[c.stamp(k,true)];if(k===l.instance){delete l.instance;}}k.removeTarget(this);},_getViewContainer:function(k){if(!k&&!this._viewContainer){k=this._viewContainer=this.create();this._set("viewContainer",k);}return k;},_initHtml5:function(){if(this.get("serverRouting")===false){return false;}else{return d.html5;}},_isChildView:function(k,n){var m=this.getViewInfo(k),l=this.getViewInfo(n);if(m&&l){return this.getViewInfo(m.parent)===l;}return false;},_isParentView:function(k,n){var l=this.getViewInfo(k),m=this.getViewInfo(n);if(l&&m){return this.getViewInfo(m.parent)===l;}return false;},_navigate:function(l,k){if(!this.get("serverRouting")){k=c.merge({force:true},k);}return a.prototype._navigate.call(this,l,k);},_save:function(k,l){if(this.get("serverRouting")&&!this.get("html5")){if(!this._hasSameOrigin(k)){c.error("Security error: The new URL must be of the same origin as the current URL.");return this;}k=this._joinURL(k||"");if(l){h&&h.location.replace(k);}else{h&&(h.location=k);}return this;}return d.prototype._save.apply(this,arguments);},_uiSetActiveView:function(q,o,n){n||(n={});var p=n.callback,k=this._isChildView(q,o),m=!k&&this._isParentView(q,o),l=!!n.prepend||m;if(q===o){return p&&p.call(this,q);}this._attachView(q,l);this._detachView(o);p&&p.call(this,q);},_afterActiveViewChange:function(k){this._uiSetActiveView(k.newVal,k.prevVal,k.options);}},{ATTRS:{activeView:{value:null,readOnly:true},container:{valueFn:function(){return c.one("body");}},html5:{valueFn:"_initHtml5"},linkSelector:{value:"a"},serverRouting:{valueFn:function(){return c.App.serverRouting;},writeOnce:"initOnly"},viewContainer:{getter:"_getViewContainer",setter:c.one,writeOnce:true}},_NON_ATTRS_CFG:["views"]});c.namespace("App").Base=f;c.App=c.mix(c.Base.create("app",f,[]),c.App,true);c.App.CLASS_NAMES={app:e("app"),views:e("app","views")};},"@VERSION@",{"requires":["classnamemanager","pjax-base","router","view"]});
View
4 build/app-base/app-base.js
@@ -1,4 +1,4 @@
-YUI.add('app-base', function(Y) {
+YUI.add('app-base', function (Y, NAME) {
/**
The App Framework provides simple MVC-like building blocks (models, model lists,
@@ -1075,4 +1075,4 @@ Default `serverRouting` attribute value for all apps.
**/
-}, '@VERSION@' ,{requires:['classnamemanager', 'pjax-base', 'router', 'view']});
+}, '@VERSION@', {"requires": ["classnamemanager", "pjax-base", "router", "view"]});
View
1 build/app-transitions-css/app-transitions-css.css
@@ -18,5 +18,6 @@
-moz-box-sizing: border-box;
box-sizing: border-box;
}
+
/* YUI CSS Detection Stamp */
#yui3-css-stamp.app-transitions-css { display: none; }
View
206 build/app-transitions-native/app-transitions-native-coverage.js
@@ -16,23 +16,23 @@ if (typeof _yuitest_coverage == "undefined"){
coverage.functions[funcId]++;
};
}
-_yuitest_coverage["/build/app-transitions-native/app-transitions-native.js"] = {
+_yuitest_coverage["build/app-transitions-native/app-transitions-native.js"] = {
lines: {},
functions: {},
coveredLines: 0,
calledLines: 0,
coveredFunctions: 0,
calledFunctions: 0,
- path: "/build/app-transitions-native/app-transitions-native.js",
+ path: "build/app-transitions-native/app-transitions-native.js",
code: []
};
-_yuitest_coverage["/build/app-transitions-native/app-transitions-native.js"].code=["YUI.add('app-transitions-native', function(Y) {","","/**","Provides the implementation of view transitions for `Y.App.Transitions` in","browsers which support native CSS3 transitions.","","@module app","@submodule app-transitions-native","@since 3.5.0","**/","","var AppTransitions = Y.App.Transitions;","","/**","Provides the implementation of view transitions for `Y.App.Transitions` in","browsers which support native CSS3 transitions.","","When this module is used, `Y.App.TransitionsNative` will automatically mix","itself in to `Y.App`.","","@class App.TransitionsNative","@extensionfor App","@since 3.5.0","**/","function AppTransitionsNative() {}","","AppTransitionsNative.prototype = {"," // -- Protected Properties -------------------------------------------------",""," /**"," Whether this app is currently transitioning its `activeView`.",""," @property _transitioning"," @type Boolean"," @default false"," @protected"," @since 3.5.0"," **/",""," /**"," A queue that holds pending calls to this app's `_uiTransitionActiveView()`"," method.",""," @property _viewTransitionQueue"," @type Array"," @default []"," @protected"," @since 3.5.0"," **/",""," // -- Lifecycle Methods ----------------------------------------------------",""," initializer: function () {"," this._transitioning = false;"," this._viewTransitionQueue = [];",""," // TODO: Consider the AOP approach that `Plugin.WidgetAnim` uses."," Y.Do.before(this._queueActiveView, this, '_uiSetActiveView');"," },",""," // -- Protected Methods ----------------------------------------------------",""," /**"," Dequeues any pending calls to `_uiTransitionActiveView()`.",""," **Note:** When there is more than one queued transition, only the most"," recent `activeView` change will be visually transitioned, while the others"," will have their `transition` option overridden to `false`.",""," @method _dequeueActiveView"," @protected"," @since 3.5.0"," **/"," _dequeueActiveView: function () {"," var queue = this._viewTransitionQueue,"," transition = queue.shift(),"," options;",""," if (transition) {"," // When items are still left in the queue, override the transition"," // so it does not run."," if (queue.length) {"," // Overrides `transition` option and splices in the new options."," options = Y.merge(transition[2], {transition: false});"," transition.splice(2, 1, options);"," }",""," this._uiTransitionActiveView.apply(this, transition);"," }"," },",""," /**"," Returns an object containing a named fx for both `viewIn` and `viewOut`"," based on the relationship between the specified `newView` and `oldView`.",""," @method _getFx"," @param {View} newView The view being transitioned-in."," @param {View} oldView The view being transitioned-out."," @param {String} [transition] The preferred transition to use."," @return {Object} An object containing a named fx for both `viewIn` and"," `viewOut`."," @protected"," @since 3.5.0"," **/"," _getFx: function (newView, oldView, transition) {"," var fx = AppTransitions.FX,"," transitions = this.get('transitions');",""," if (transition === false || !transitions) {"," return null;"," }",""," if (transition) {"," return fx[transition];"," }",""," if (this._isChildView(newView, oldView)) {"," return fx[transitions.toChild];"," }",""," if (this._isParentView(newView, oldView)) {"," return fx[transitions.toParent];"," }",""," return fx[transitions.navigate];"," },",""," /**"," Queues calls to `_uiTransitionActiveView()` to make sure a currently running"," transition isn't interrupted.",""," **Note:** This method prevents the default `_uiSetActiveView()` method from"," running.",""," @method _queueActiveView"," @protected"," @since 3.5.0"," **/"," _queueActiveView: function () {"," var args = Y.Array(arguments, 0, true);",""," this._viewTransitionQueue.push(args);",""," if (!this._transitioning) {"," this._dequeueActiveView();"," }",""," return new Y.Do.Prevent();"," },",""," /**"," Performs the actual change of this app's `activeView` by visually"," transitioning between the `newView` and `oldView` using any specified"," `options`.",""," The `newView` is attached to the app by rendering it to the `viewContainer`,"," and making this app a bubble target of its events.",""," The `oldView` is detached from the app by removing it from the"," `viewContainer`, and removing this app as a bubble target for its events."," The `oldView` will either be preserved or properly destroyed.",""," **Note:** This method overrides `_uiSetActiveView()` and provides all of its"," functionality plus supports visual transitions. Also, the `activeView`"," attribute is read-only and can be changed by calling the `showView()`"," method.",""," @method _uiTransitionActiveView"," @param {View} newView The View which is now this app's `activeView`."," @param {View} [oldView] The View which was this app's `activeView`."," @param {Object} [options] Optional object containing any of the following"," properties:"," @param {Function} [options.callback] Optional callback function to call"," after new `activeView` is ready to use, the function will be passed:"," @param {View} options.callback.view A reference to the new"," `activeView`."," @param {Boolean} [options.prepend=false] Whether the `view` should be"," prepended instead of appended to the `viewContainer`."," @param {Boolean} [options.render] Whether the `view` should be rendered."," **Note:** If no value is specified, a view instance will only be"," rendered if it's newly created by this method."," @param {Boolean|String} [options.transition] Optional transition override."," A transition can be specified which will override the default, or"," `false` for no transition."," @param {Boolean} [options.update=false] Whether an existing view should"," have its attributes updated by passing the `config` object to its"," `setAttrs()` method. **Note:** This option does not have an effect if"," the `view` instance is created as a result of calling this method."," @protected"," @since 3.5.0"," **/"," _uiTransitionActiveView: function (newView, oldView, options) {"," options || (options = {});",""," var callback = options.callback,"," container, transitioning, isChild, isParent, prepend,"," fx, fxConfig, transitions;",""," // Quits early when to new and old views are the same."," if (newView === oldView) {"," callback && callback.call(this, newView);",""," this._transitioning = false;"," return this._dequeueActiveView();"," }",""," fx = this._getFx(newView, oldView, options.transition);"," isChild = this._isChildView(newView, oldView);"," isParent = !isChild && this._isParentView(newView, oldView);"," prepend = !!options.prepend || isParent;",""," // Preforms simply attach/detach of the new and old view respectively"," // when there's no transition to perform."," if (!fx) {"," this._attachView(newView, prepend);"," this._detachView(oldView);"," callback && callback.call(this, newView);",""," this._transitioning = false;"," return this._dequeueActiveView();"," }",""," this._transitioning = true;",""," container = this.get('container');"," transitioning = Y.App.CLASS_NAMES.transitioning;",""," container.addClass(transitioning);",""," this._attachView(newView, prepend);",""," // Called when view transitions completed, if none were added this will"," // run right away."," function complete() {"," this._detachView(oldView);"," container.removeClass(transitioning);"," callback && callback.call(this, newView);",""," this._transitioning = false;"," return this._dequeueActiveView();"," }",""," // Setup a new stack to run the view transitions in parallel."," transitions = new Y.Parallel({context: this});"," fxConfig = {"," crossView: !!oldView && !!newView,"," prepended: prepend"," };",""," // Transition the new view first to prevent a gap when sliding."," if (newView && fx.viewIn) {"," newView.get('container')"," .transition(fx.viewIn, fxConfig, transitions.add());"," }",""," if (oldView && fx.viewOut) {"," oldView.get('container')"," .transition(fx.viewOut, fxConfig, transitions.add());"," }",""," transitions.done(complete);"," }","};","","// -- Transition fx ------------------------------------------------------------","Y.mix(Y.Transition.fx, {"," 'app:fadeIn': {"," opacity : 1,"," duration: 0.3,",""," on: {"," start: function (data) {"," var styles = {opacity: 0},"," config = data.config;",""," if (config.crossView && !config.prepended) {"," styles.transform = 'translateX(-100%)';"," }",""," this.setStyles(styles);"," },",""," end: function () {"," this.setStyle('transform', 'translateX(0)');"," }"," }"," },",""," 'app:fadeOut': {"," opacity : 0,"," duration: 0.3,",""," on: {"," start: function (data) {"," var styles = {opacity: 1},"," config = data.config;",""," if (config.crossView && config.prepended) {"," styles.transform = 'translateX(-100%)';"," }",""," this.setStyles(styles);"," },",""," end: function () {"," this.setStyle('transform', 'translateX(0)');"," }"," }"," },",""," 'app:slideLeft': {"," duration : 0.3,"," transform: 'translateX(-100%)',",""," on: {"," start: function () {"," this.setStyles({"," opacity : 1,"," transform: 'translateX(0%)'"," });"," },",""," end: function () {"," this.setStyle('transform', 'translateX(0)');"," }"," }"," },",""," 'app:slideRight': {"," duration : 0.3,"," transform: 'translateX(0)',",""," on: {"," start: function () {"," this.setStyles({"," opacity : 1,"," transform: 'translateX(-100%)'"," });"," },",""," end: function () {"," this.setStyle('transform', 'translateX(0)');"," }"," }"," }","});","","// -- Namespacae ---------------------------------------------------------------","Y.App.TransitionsNative = AppTransitionsNative;","Y.Base.mix(Y.App, [AppTransitionsNative]);","","","}, '@VERSION@' ,{requires:['app-transitions', 'app-transitions-css', 'parallel', 'transition']});"];
-_yuitest_coverage["/build/app-transitions-native/app-transitions-native.js"].lines = {"1":0,"12":0,"25":0,"27":0,"54":0,"55":0,"58":0,"75":0,"79":0,"82":0,"84":0,"85":0,"88":0,"106":0,"109":0,"110":0,"113":0,"114":0,"117":0,"118":0,"121":0,"122":0,"125":0,"140":0,"142":0,"144":0,"145":0,"148":0,"193":0,"195":0,"200":0,"201":0,"203":0,"204":0,"207":0,"208":0,"209":0,"210":0,"214":0,"215":0,"216":0,"217":0,"219":0,"220":0,"223":0,"225":0,"226":0,"228":0,"230":0,"234":0,"235":0,"236":0,"237":0,"239":0,"240":0,"244":0,"245":0,"251":0,"252":0,"256":0,"257":0,"261":0,"266":0,"273":0,"276":0,"277":0,"280":0,"284":0,"295":0,"298":0,"299":0,"302":0,"306":0,"317":0,"324":0,"335":0,"342":0,"349":0,"350":0};
-_yuitest_coverage["/build/app-transitions-native/app-transitions-native.js"].functions = {"AppTransitionsNative:25":0,"initializer:53":0,"_dequeueActiveView:74":0,"_getFx:105":0,"_queueActiveView:139":0,"complete:234":0,"_uiTransitionActiveView:192":0,"start:272":0,"end:283":0,"start:294":0,"end:305":0,"start:316":0,"end:323":0,"start:334":0,"end:341":0,"(anonymous 1):1":0};
-_yuitest_coverage["/build/app-transitions-native/app-transitions-native.js"].coveredLines = 79;
-_yuitest_coverage["/build/app-transitions-native/app-transitions-native.js"].coveredFunctions = 16;
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 1);
-YUI.add('app-transitions-native', function(Y) {
+_yuitest_coverage["build/app-transitions-native/app-transitions-native.js"].code=["YUI.add('app-transitions-native', function (Y, NAME) {","","/**","Provides the implementation of view transitions for `Y.App.Transitions` in","browsers which support native CSS3 transitions.","","@module app","@submodule app-transitions-native","@since 3.5.0","**/","","var AppTransitions = Y.App.Transitions;","","/**","Provides the implementation of view transitions for `Y.App.Transitions` in","browsers which support native CSS3 transitions.","","When this module is used, `Y.App.TransitionsNative` will automatically mix","itself in to `Y.App`.","","@class App.TransitionsNative","@extensionfor App","@since 3.5.0","**/","function AppTransitionsNative() {}","","AppTransitionsNative.prototype = {"," // -- Protected Properties -------------------------------------------------",""," /**"," Whether this app is currently transitioning its `activeView`.",""," @property _transitioning"," @type Boolean"," @default false"," @protected"," @since 3.5.0"," **/",""," /**"," A queue that holds pending calls to this app's `_uiTransitionActiveView()`"," method.",""," @property _viewTransitionQueue"," @type Array"," @default []"," @protected"," @since 3.5.0"," **/",""," // -- Lifecycle Methods ----------------------------------------------------",""," initializer: function () {"," this._transitioning = false;"," this._viewTransitionQueue = [];",""," // TODO: Consider the AOP approach that `Plugin.WidgetAnim` uses."," Y.Do.before(this._queueActiveView, this, '_uiSetActiveView');"," },",""," // -- Protected Methods ----------------------------------------------------",""," /**"," Dequeues any pending calls to `_uiTransitionActiveView()`.",""," **Note:** When there is more than one queued transition, only the most"," recent `activeView` change will be visually transitioned, while the others"," will have their `transition` option overridden to `false`.",""," @method _dequeueActiveView"," @protected"," @since 3.5.0"," **/"," _dequeueActiveView: function () {"," var queue = this._viewTransitionQueue,"," transition = queue.shift(),"," options;",""," if (transition) {"," // When items are still left in the queue, override the transition"," // so it does not run."," if (queue.length) {"," // Overrides `transition` option and splices in the new options."," options = Y.merge(transition[2], {transition: false});"," transition.splice(2, 1, options);"," }",""," this._uiTransitionActiveView.apply(this, transition);"," }"," },",""," /**"," Returns an object containing a named fx for both `viewIn` and `viewOut`"," based on the relationship between the specified `newView` and `oldView`.",""," @method _getFx"," @param {View} newView The view being transitioned-in."," @param {View} oldView The view being transitioned-out."," @param {String} [transition] The preferred transition to use."," @return {Object} An object containing a named fx for both `viewIn` and"," `viewOut`."," @protected"," @since 3.5.0"," **/"," _getFx: function (newView, oldView, transition) {"," var fx = AppTransitions.FX,"," transitions = this.get('transitions');",""," if (transition === false || !transitions) {"," return null;"," }",""," if (transition) {"," return fx[transition];"," }",""," if (this._isChildView(newView, oldView)) {"," return fx[transitions.toChild];"," }",""," if (this._isParentView(newView, oldView)) {"," return fx[transitions.toParent];"," }",""," return fx[transitions.navigate];"," },",""," /**"," Queues calls to `_uiTransitionActiveView()` to make sure a currently running"," transition isn't interrupted.",""," **Note:** This method prevents the default `_uiSetActiveView()` method from"," running.",""," @method _queueActiveView"," @protected"," @since 3.5.0"," **/"," _queueActiveView: function () {"," var args = Y.Array(arguments, 0, true);",""," this._viewTransitionQueue.push(args);",""," if (!this._transitioning) {"," this._dequeueActiveView();"," }",""," return new Y.Do.Prevent();"," },",""," /**"," Performs the actual change of this app's `activeView` by visually"," transitioning between the `newView` and `oldView` using any specified"," `options`.",""," The `newView` is attached to the app by rendering it to the `viewContainer`,"," and making this app a bubble target of its events.",""," The `oldView` is detached from the app by removing it from the"," `viewContainer`, and removing this app as a bubble target for its events."," The `oldView` will either be preserved or properly destroyed.",""," **Note:** This method overrides `_uiSetActiveView()` and provides all of its"," functionality plus supports visual transitions. Also, the `activeView`"," attribute is read-only and can be changed by calling the `showView()`"," method.",""," @method _uiTransitionActiveView"," @param {View} newView The View which is now this app's `activeView`."," @param {View} [oldView] The View which was this app's `activeView`."," @param {Object} [options] Optional object containing any of the following"," properties:"," @param {Function} [options.callback] Optional callback function to call"," after new `activeView` is ready to use, the function will be passed:"," @param {View} options.callback.view A reference to the new"," `activeView`."," @param {Boolean} [options.prepend=false] Whether the `view` should be"," prepended instead of appended to the `viewContainer`."," @param {Boolean} [options.render] Whether the `view` should be rendered."," **Note:** If no value is specified, a view instance will only be"," rendered if it's newly created by this method."," @param {Boolean|String} [options.transition] Optional transition override."," A transition can be specified which will override the default, or"," `false` for no transition."," @param {Boolean} [options.update=false] Whether an existing view should"," have its attributes updated by passing the `config` object to its"," `setAttrs()` method. **Note:** This option does not have an effect if"," the `view` instance is created as a result of calling this method."," @protected"," @since 3.5.0"," **/"," _uiTransitionActiveView: function (newView, oldView, options) {"," options || (options = {});",""," var callback = options.callback,"," container, transitioning, isChild, isParent, prepend,"," fx, fxConfig, transitions;",""," // Quits early when to new and old views are the same."," if (newView === oldView) {"," callback && callback.call(this, newView);",""," this._transitioning = false;"," return this._dequeueActiveView();"," }",""," fx = this._getFx(newView, oldView, options.transition);"," isChild = this._isChildView(newView, oldView);"," isParent = !isChild && this._isParentView(newView, oldView);"," prepend = !!options.prepend || isParent;",""," // Preforms simply attach/detach of the new and old view respectively"," // when there's no transition to perform."," if (!fx) {"," this._attachView(newView, prepend);"," this._detachView(oldView);"," callback && callback.call(this, newView);",""," this._transitioning = false;"," return this._dequeueActiveView();"," }",""," this._transitioning = true;",""," container = this.get('container');"," transitioning = Y.App.CLASS_NAMES.transitioning;",""," container.addClass(transitioning);",""," this._attachView(newView, prepend);",""," // Called when view transitions completed, if none were added this will"," // run right away."," function complete() {"," this._detachView(oldView);"," container.removeClass(transitioning);"," callback && callback.call(this, newView);",""," this._transitioning = false;"," return this._dequeueActiveView();"," }",""," // Setup a new stack to run the view transitions in parallel."," transitions = new Y.Parallel({context: this});"," fxConfig = {"," crossView: !!oldView && !!newView,"," prepended: prepend"," };",""," // Transition the new view first to prevent a gap when sliding."," if (newView && fx.viewIn) {"," newView.get('container')"," .transition(fx.viewIn, fxConfig, transitions.add());"," }",""," if (oldView && fx.viewOut) {"," oldView.get('container')"," .transition(fx.viewOut, fxConfig, transitions.add());"," }",""," transitions.done(complete);"," }","};","","// -- Transition fx ------------------------------------------------------------","Y.mix(Y.Transition.fx, {"," 'app:fadeIn': {"," opacity : 1,"," duration: 0.3,",""," on: {"," start: function (data) {"," var styles = {opacity: 0},"," config = data.config;",""," if (config.crossView && !config.prepended) {"," styles.transform = 'translateX(-100%)';"," }",""," this.setStyles(styles);"," },",""," end: function () {"," this.setStyle('transform', 'translateX(0)');"," }"," }"," },",""," 'app:fadeOut': {"," opacity : 0,"," duration: 0.3,",""," on: {"," start: function (data) {"," var styles = {opacity: 1},"," config = data.config;",""," if (config.crossView && config.prepended) {"," styles.transform = 'translateX(-100%)';"," }",""," this.setStyles(styles);"," },",""," end: function () {"," this.setStyle('transform', 'translateX(0)');"," }"," }"," },",""," 'app:slideLeft': {"," duration : 0.3,"," transform: 'translateX(-100%)',",""," on: {"," start: function () {"," this.setStyles({"," opacity : 1,"," transform: 'translateX(0%)'"," });"," },",""," end: function () {"," this.setStyle('transform', 'translateX(0)');"," }"," }"," },",""," 'app:slideRight': {"," duration : 0.3,"," transform: 'translateX(0)',",""," on: {"," start: function () {"," this.setStyles({"," opacity : 1,"," transform: 'translateX(-100%)'"," });"," },",""," end: function () {"," this.setStyle('transform', 'translateX(0)');"," }"," }"," }","});","","// -- Namespacae ---------------------------------------------------------------","Y.App.TransitionsNative = AppTransitionsNative;","Y.Base.mix(Y.App, [AppTransitionsNative]);","","","}, '@VERSION@', {\"requires\": [\"app-transitions\", \"app-transitions-css\", \"parallel\", \"transition\"]});"];
+_yuitest_coverage["build/app-transitions-native/app-transitions-native.js"].lines = {"1":0,"12":0,"25":0,"27":0,"54":0,"55":0,"58":0,"75":0,"79":0,"82":0,"84":0,"85":0,"88":0,"106":0,"109":0,"110":0,"113":0,"114":0,"117":0,"118":0,"121":0,"122":0,"125":0,"140":0,"142":0,"144":0,"145":0,"148":0,"193":0,"195":0,"200":0,"201":0,"203":0,"204":0,"207":0,"208":0,"209":0,"210":0,"214":0,"215":0,"216":0,"217":0,"219":0,"220":0,"223":0,"225":0,"226":0,"228":0,"230":0,"234":0,"235":0,"236":0,"237":0,"239":0,"240":0,"244":0,"245":0,"251":0,"252":0,"256":0,"257":0,"261":0,"266":0,"273":0,"276":0,"277":0,"280":0,"284":0,"295":0,"298":0,"299":0,"302":0,"306":0,"317":0,"324":0,"335":0,"342":0,"349":0,"350":0};
+_yuitest_coverage["build/app-transitions-native/app-transitions-native.js"].functions = {"AppTransitionsNative:25":0,"initializer:53":0,"_dequeueActiveView:74":0,"_getFx:105":0,"_queueActiveView:139":0,"complete:234":0,"_uiTransitionActiveView:192":0,"start:272":0,"end:283":0,"start:294":0,"end:305":0,"start:316":0,"end:323":0,"start:334":0,"end:341":0,"(anonymous 1):1":0};
+_yuitest_coverage["build/app-transitions-native/app-transitions-native.js"].coveredLines = 79;
+_yuitest_coverage["build/app-transitions-native/app-transitions-native.js"].coveredFunctions = 16;
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 1);
+YUI.add('app-transitions-native', function (Y, NAME) {
/**
Provides the implementation of view transitions for `Y.App.Transitions` in
@@ -43,8 +43,8 @@ browsers which support native CSS3 transitions.
@since 3.5.0
**/
-_yuitest_coverfunc("/build/app-transitions-native/app-transitions-native.js", "(anonymous 1)", 1);
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 12);
+_yuitest_coverfunc("build/app-transitions-native/app-transitions-native.js", "(anonymous 1)", 1);
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 12);
var AppTransitions = Y.App.Transitions;
/**
@@ -58,10 +58,10 @@ itself in to `Y.App`.
@extensionfor App
@since 3.5.0
**/
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 25);
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 25);
function AppTransitionsNative() {}
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 27);
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 27);
AppTransitionsNative.prototype = {
// -- Protected Properties -------------------------------------------------
@@ -89,14 +89,14 @@ AppTransitionsNative.prototype = {
// -- Lifecycle Methods ----------------------------------------------------
initializer: function () {
- _yuitest_coverfunc("/build/app-transitions-native/app-transitions-native.js", "initializer", 53);
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 54);
+ _yuitest_coverfunc("build/app-transitions-native/app-transitions-native.js", "initializer", 53);
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 54);
this._transitioning = false;
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 55);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 55);
this._viewTransitionQueue = [];
// TODO: Consider the AOP approach that `Plugin.WidgetAnim` uses.
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 58);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 58);
Y.Do.before(this._queueActiveView, this, '_uiSetActiveView');
},
@@ -114,26 +114,26 @@ Y.Do.before(this._queueActiveView, this, '_uiSetActiveView');
@since 3.5.0
**/
_dequeueActiveView: function () {
- _yuitest_coverfunc("/build/app-transitions-native/app-transitions-native.js", "_dequeueActiveView", 74);
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 75);
+ _yuitest_coverfunc("build/app-transitions-native/app-transitions-native.js", "_dequeueActiveView", 74);
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 75);
var queue = this._viewTransitionQueue,
transition = queue.shift(),
options;
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 79);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 79);
if (transition) {
// When items are still left in the queue, override the transition
// so it does not run.
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 82);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 82);
if (queue.length) {
// Overrides `transition` option and splices in the new options.
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 84);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 84);
options = Y.merge(transition[2], {transition: false});
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 85);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 85);
transition.splice(2, 1, options);
}
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 88);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 88);
this._uiTransitionActiveView.apply(this, transition);
}
},
@@ -152,36 +152,36 @@ this._uiTransitionActiveView.apply(this, transition);
@since 3.5.0
**/
_getFx: function (newView, oldView, transition) {
- _yuitest_coverfunc("/build/app-transitions-native/app-transitions-native.js", "_getFx", 105);
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 106);
+ _yuitest_coverfunc("build/app-transitions-native/app-transitions-native.js", "_getFx", 105);
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 106);
var fx = AppTransitions.FX,
transitions = this.get('transitions');
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 109);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 109);
if (transition === false || !transitions) {
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 110);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 110);
return null;
}
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 113);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 113);
if (transition) {
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 114);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 114);
return fx[transition];
}
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 117);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 117);
if (this._isChildView(newView, oldView)) {
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 118);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 118);
return fx[transitions.toChild];
}
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 121);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 121);
if (this._isParentView(newView, oldView)) {
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 122);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 122);
return fx[transitions.toParent];
}
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 125);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 125);
return fx[transitions.navigate];
},
@@ -197,20 +197,20 @@ return fx[transitions.navigate];
@since 3.5.0
**/
_queueActiveView: function () {
- _yuitest_coverfunc("/build/app-transitions-native/app-transitions-native.js", "_queueActiveView", 139);
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 140);
+ _yuitest_coverfunc("build/app-transitions-native/app-transitions-native.js", "_queueActiveView", 139);
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 140);
var args = Y.Array(arguments, 0, true);
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 142);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 142);
this._viewTransitionQueue.push(args);
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 144);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 144);
if (!this._transitioning) {
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 145);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 145);
this._dequeueActiveView();
}
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 148);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 148);
return new Y.Do.Prevent();
},
@@ -256,141 +256,141 @@ return new Y.Do.Prevent();
@since 3.5.0
**/
_uiTransitionActiveView: function (newView, oldView, options) {
- _yuitest_coverfunc("/build/app-transitions-native/app-transitions-native.js", "_uiTransitionActiveView", 192);
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 193);
+ _yuitest_coverfunc("build/app-transitions-native/app-transitions-native.js", "_uiTransitionActiveView", 192);
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 193);
options || (options = {});
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 195);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 195);
var callback = options.callback,
container, transitioning, isChild, isParent, prepend,
fx, fxConfig, transitions;
// Quits early when to new and old views are the same.
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 200);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 200);
if (newView === oldView) {
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 201);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 201);
callback && callback.call(this, newView);
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 203);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 203);
this._transitioning = false;
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 204);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 204);
return this._dequeueActiveView();
}
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 207);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 207);
fx = this._getFx(newView, oldView, options.transition);
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 208);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 208);
isChild = this._isChildView(newView, oldView);
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 209);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 209);
isParent = !isChild && this._isParentView(newView, oldView);
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 210);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 210);
prepend = !!options.prepend || isParent;
// Preforms simply attach/detach of the new and old view respectively
// when there's no transition to perform.
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 214);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 214);
if (!fx) {
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 215);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 215);
this._attachView(newView, prepend);
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 216);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 216);
this._detachView(oldView);
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 217);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 217);
callback && callback.call(this, newView);
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 219);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 219);
this._transitioning = false;
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 220);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 220);
return this._dequeueActiveView();
}
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 223);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 223);
this._transitioning = true;
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 225);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 225);
container = this.get('container');
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 226);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 226);
transitioning = Y.App.CLASS_NAMES.transitioning;
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 228);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 228);
container.addClass(transitioning);
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 230);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 230);
this._attachView(newView, prepend);
// Called when view transitions completed, if none were added this will
// run right away.
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 234);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 234);
function complete() {
- _yuitest_coverfunc("/build/app-transitions-native/app-transitions-native.js", "complete", 234);
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 235);
+ _yuitest_coverfunc("build/app-transitions-native/app-transitions-native.js", "complete", 234);
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 235);
this._detachView(oldView);
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 236);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 236);
container.removeClass(transitioning);
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 237);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 237);
callback && callback.call(this, newView);
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 239);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 239);
this._transitioning = false;
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 240);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 240);
return this._dequeueActiveView();
}
// Setup a new stack to run the view transitions in parallel.
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 244);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 244);
transitions = new Y.Parallel({context: this});
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 245);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 245);
fxConfig = {
crossView: !!oldView && !!newView,
prepended: prepend
};
// Transition the new view first to prevent a gap when sliding.
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 251);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 251);
if (newView && fx.viewIn) {
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 252);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 252);
newView.get('container')
.transition(fx.viewIn, fxConfig, transitions.add());
}
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 256);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 256);
if (oldView && fx.viewOut) {
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 257);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 257);
oldView.get('container')
.transition(fx.viewOut, fxConfig, transitions.add());
}
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 261);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 261);
transitions.done(complete);
}
};
// -- Transition fx ------------------------------------------------------------
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 266);
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 266);
Y.mix(Y.Transition.fx, {
'app:fadeIn': {
opacity : 1,
duration: 0.3,
on: {
start: function (data) {
- _yuitest_coverfunc("/build/app-transitions-native/app-transitions-native.js", "start", 272);
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 273);
+ _yuitest_coverfunc("build/app-transitions-native/app-transitions-native.js", "start", 272);
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 273);
var styles = {opacity: 0},
config = data.config;
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 276);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 276);
if (config.crossView && !config.prepended) {
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 277);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 277);
styles.transform = 'translateX(-100%)';
}
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 280);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 280);
this.setStyles(styles);
},
end: function () {
- _yuitest_coverfunc("/build/app-transitions-native/app-transitions-native.js", "end", 283);
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 284);
+ _yuitest_coverfunc("build/app-transitions-native/app-transitions-native.js", "end", 283);
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 284);
this.setStyle('transform', 'translateX(0)');
}
}
@@ -402,24 +402,24 @@ this.setStyle('transform', 'translateX(0)');
on: {
start: function (data) {
- _yuitest_coverfunc("/build/app-transitions-native/app-transitions-native.js", "start", 294);
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 295);
+ _yuitest_coverfunc("build/app-transitions-native/app-transitions-native.js", "start", 294);
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 295);
var styles = {opacity: 1},
config = data.config;
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 298);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 298);
if (config.crossView && config.prepended) {
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 299);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 299);
styles.transform = 'translateX(-100%)';
}
- _yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 302);
+ _yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 302);
this.setStyles(styles);
},
end: function () {
- _yuitest_coverfunc("/build/app-transitions-native/app-transitions-native.js", "end", 305);
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 306);
+ _yuitest_coverfunc("build/app-transitions-native/app-transitions-native.js", "end", 305);
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 306);
this.setStyle('transform', 'translateX(0)');
}
}
@@ -431,17 +431,17 @@ this.setStyle('transform', 'translateX(0)');
on: {
start: function () {
- _yuitest_coverfunc("/build/app-transitions-native/app-transitions-native.js", "start", 316);
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 317);
+ _yuitest_coverfunc("build/app-transitions-native/app-transitions-native.js", "start", 316);
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 317);
this.setStyles({
opacity : 1,
transform: 'translateX(0%)'
});
},
end: function () {
- _yuitest_coverfunc("/build/app-transitions-native/app-transitions-native.js", "end", 323);
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 324);
+ _yuitest_coverfunc("build/app-transitions-native/app-transitions-native.js", "end", 323);
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 324);
this.setStyle('transform', 'translateX(0)');
}
}
@@ -453,28 +453,28 @@ this.setStyle('transform', 'translateX(0)');
on: {
start: function () {
- _yuitest_coverfunc("/build/app-transitions-native/app-transitions-native.js", "start", 334);
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 335);
+ _yuitest_coverfunc("build/app-transitions-native/app-transitions-native.js", "start", 334);
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 335);
this.setStyles({
opacity : 1,
transform: 'translateX(-100%)'
});
},
end: function () {
- _yuitest_coverfunc("/build/app-transitions-native/app-transitions-native.js", "end", 341);
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 342);
+ _yuitest_coverfunc("build/app-transitions-native/app-transitions-native.js", "end", 341);
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 342);
this.setStyle('transform', 'translateX(0)');
}
}
}
});
// -- Namespacae ---------------------------------------------------------------
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 349);
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 349);
Y.App.TransitionsNative = AppTransitionsNative;
-_yuitest_coverline("/build/app-transitions-native/app-transitions-native.js", 350);
+_yuitest_coverline("build/app-transitions-native/app-transitions-native.js", 350);
Y.Base.mix(Y.App, [AppTransitionsNative]);
-}, '@VERSION@' ,{requires:['app-transitions', 'app-transitions-css', 'parallel', 'transition']});
+}, '@VERSION@', {"requires": ["app-transitions", "app-transitions-css", "parallel", "transition"]});
View
4 build/app-transitions-native/app-transitions-native-debug.js
@@ -1,4 +1,4 @@
-YUI.add('app-transitions-native', function(Y) {
+YUI.add('app-transitions-native', function (Y, NAME) {
/**
Provides the implementation of view transitions for `Y.App.Transitions` in
@@ -350,4 +350,4 @@ Y.App.TransitionsNative = AppTransitionsNative;
Y.Base.mix(Y.App, [AppTransitionsNative]);
-}, '@VERSION@' ,{requires:['app-transitions', 'app-transitions-css', 'parallel', 'transition']});
+}, '@VERSION@', {"requires": ["app-transitions", "app-transitions-css", "parallel", "transition"]});
View
2 build/app-transitions-native/app-transitions-native-min.js
@@ -1 +1 @@
-YUI.add("app-transitions-native",function(c){var a=c.App.Transitions;function b(){}b.prototype={initializer:function(){this._transitioning=false;this._viewTransitionQueue=[];c.Do.before(this._queueActiveView,this,"_uiSetActiveView");},_dequeueActiveView:function(){var d=this._viewTransitionQueue,f=d.shift(),e;if(f){if(d.length){e=c.merge(f[2],{transition:false});f.splice(2,1,e);}this._uiTransitionActiveView.apply(this,f);}},_getFx:function(h,d,g){var e=a.FX,f=this.get("transitions");if(g===false||!f){return null;}if(g){return e[g];}if(this._isChildView(h,d)){return e[f.toChild];}if(this._isParentView(h,d)){return e[f.toParent];}return e[f.navigate];},_queueActiveView:function(){var d=c.Array(arguments,0,true);this._viewTransitionQueue.push(d);if(!this._transitioning){this._dequeueActiveView();}return new c.Do.Prevent();},_uiTransitionActiveView:function(i,l,p){p||(p={});var n=p.callback,d,m,e,j,o,h,g,k;if(i===l){n&&n.call(this,i);this._transitioning=false;return this._dequeueActiveView();}h=this._getFx(i,l,p.transition);e=this._isChildView(i,l);j=!e&&this._isParentView(i,l);o=!!p.prepend||j;if(!h){this._attachView(i,o);this._detachView(l);n&&n.call(this,i);this._transitioning=false;return this._dequeueActiveView();}this._transitioning=true;d=this.get("container");m=c.App.CLASS_NAMES.transitioning;d.addClass(m);this._attachView(i,o);function f(){this._detachView(l);d.removeClass(m);n&&n.call(this,i);this._transitioning=false;return this._dequeueActiveView();}k=new c.Parallel({context:this});g={crossView:!!l&&!!i,prepended:o};if(i&&h.viewIn){i.get("container").transition(h.viewIn,g,k.add());}if(l&&h.viewOut){l.get("container").transition(h.viewOut,g,k.add());}k.done(f);}};c.mix(c.Transition.fx,{"app:fadeIn":{opacity:1,duration:0.3,on:{start:function(f){var e={opacity:0},d=f.config;if(d.crossView&&!d.prepended){e.transform="translateX(-100%)";}this.setStyles(e);},end:function(){this.setStyle("transform","translateX(0)");}}},"app:fadeOut":{opacity:0,duration:0.3,on:{start:function(f){var e={opacity:1},d=f.config;if(d.crossView&&d.prepended){e.transform="translateX(-100%)";}this.setStyles(e);},end:function(){this.setStyle("transform","translateX(0)");}}},"app:slideLeft":{duration:0.3,transform:"translateX(-100%)",on:{start:function(){this.setStyles({opacity:1,transform:"translateX(0%)"});},end:function(){this.setStyle("transform","translateX(0)");}}},"app:slideRight":{duration:0.3,transform:"translateX(0)",on:{start:function(){this.setStyles({opacity:1,transform:"translateX(-100%)"});},end:function(){this.setStyle("transform","translateX(0)");}}}});c.App.TransitionsNative=b;c.Base.mix(c.App,[b]);},"@VERSION@",{requires:["app-transitions","app-transitions-css","parallel","transition"]});
+YUI.add("app-transitions-native",function(d,b){var a=d.App.Transitions;function c(){}c.prototype={initializer:function(){this._transitioning=false;this._viewTransitionQueue=[];d.Do.before(this._queueActiveView,this,"_uiSetActiveView");},_dequeueActiveView:function(){var e=this._viewTransitionQueue,g=e.shift(),f;if(g){if(e.length){f=d.merge(g[2],{transition:false});g.splice(2,1,f);}this._uiTransitionActiveView.apply(this,g);}},_getFx:function(i,e,h){var f=a.FX,g=this.get("transitions");if(h===false||!g){return null;}if(h){return f[h];}if(this._isChildView(i,e)){return f[g.toChild];}if(this._isParentView(i,e)){return f[g.toParent];}return f[g.navigate];},_queueActiveView:function(){var e=d.Array(arguments,0,true);this._viewTransitionQueue.push(e);if(!this._transitioning){this._dequeueActiveView();}return new d.Do.Prevent();},_uiTransitionActiveView:function(j,m,q){q||(q={});var o=q.callback,e,n,f,k,p,i,h,l;if(j===m){o&&o.call(this,j);this._transitioning=false;return this._dequeueActiveView();}i=this._getFx(j,m,q.transition);f=this._isChildView(j,m);k=!f&&this._isParentView(j,m);p=!!q.prepend||k;if(!i){this._attachView(j,p);this._detachView(m);o&&o.call(this,j);this._transitioning=false;return this._dequeueActiveView();}this._transitioning=true;e=this.get("container");n=d.App.CLASS_NAMES.transitioning;e.addClass(n);this._attachView(j,p);function g(){this._detachView(m);e.removeClass(n);o&&o.call(this,j);this._transitioning=false;return this._dequeueActiveView();}l=new d.Parallel({context:this});h={crossView:!!m&&!!j,prepended:p};if(j&&i.viewIn){j.get("container").transition(i.viewIn,h,l.add());}if(m&&i.viewOut){m.get("container").transition(i.viewOut,h,l.add());}l.done(g);}};d.mix(d.Transition.fx,{"app:fadeIn":{opacity:1,duration:0.3,on:{start:function(g){var f={opacity:0},e=g.config;if(e.crossView&&!e.prepended){f.transform="translateX(-100%)";}this.setStyles(f);},end:function(){this.setStyle("transform","translateX(0)");}}},"app:fadeOut":{opacity:0,duration:0.3,on:{start:function(g){var f={opacity:1},e=g.config;if(e.crossView&&e.prepended){f.transform="translateX(-100%)";}this.setStyles(f);},end:function(){this.setStyle("transform","translateX(0)");}}},"app:slideLeft":{duration:0.3,transform:"translateX(-100%)",on:{start:function(){this.setStyles({opacity:1,transform:"translateX(0%)"});},end:function(){this.setStyle("transform","translateX(0)");}}},"app:slideRight":{duration:0.3,transform:"translateX(0)",on:{start:function(){this.setStyles({opacity:1,transform:"translateX(-100%)"});},end:function(){this.setStyle("transform","translateX(0)");}}}});d.App.TransitionsNative=c;d.Base.mix(d.App,[c]);},"@VERSION@",{"requires":["app-transitions","app-transitions-css","parallel","transition"]});
View
4 build/app-transitions-native/app-transitions-native.js
@@ -1,4 +1,4 @@
-YUI.add('app-transitions-native', function(Y) {
+YUI.add('app-transitions-native', function (Y, NAME) {
/**
Provides the implementation of view transitions for `Y.App.Transitions` in
@@ -350,4 +350,4 @@ Y.App.TransitionsNative = AppTransitionsNative;
Y.Base.mix(Y.App, [AppTransitionsNative]);
-}, '@VERSION@' ,{requires:['app-transitions', 'app-transitions-css', 'parallel', 'transition']});
+}, '@VERSION@', {"requires": ["app-transitions", "app-transitions-css", "parallel", "transition"]});
View
46 build/app-transitions/app-transitions-coverage.js
@@ -16,23 +16,23 @@ if (typeof _yuitest_coverage == "undefined"){
coverage.functions[funcId]++;
};
}
-_yuitest_coverage["/build/app-transitions/app-transitions.js"] = {
+_yuitest_coverage["build/app-transitions/app-transitions.js"] = {
lines: {},
functions: {},
coveredLines: 0,
calledLines: 0,
coveredFunctions: 0,
calledFunctions: 0,
- path: "/build/app-transitions/app-transitions.js",
+ path: "build/app-transitions/app-transitions.js",
code: []
};
-_yuitest_coverage["/build/app-transitions/app-transitions.js"].code=["YUI.add('app-transitions', function(Y) {","","/**","Provides view transitions for `Y.App` in browsers which support native CSS3","transitions.","","@module app","@submodule app-transitions","@since 3.5.0","**/","","/**","Provides view transitions for `Y.App` in browsers which support native CSS3","transitions.","","View transitions provide an nice way to move from one \"page\" to the next that is","both pleasant to the user and helps to communicate a hierarchy between sections","of an application.","","When this module is used, it will automatically mix itself in to `Y.App` and","transition between `activeView` changes using the following effects:",""," * **`fade`**: Cross-fades between the old an new active views.",""," * **`slideLeft`**: The old and new active views are positioned next to each"," other and both slide to the left.",""," * **`slideRight`**: The old and new active views are positioned next to each"," other and both slide to the right.","","**Note:** Transitions are an opt-in feature and are enabled via an app's","`transitions` attribute.","","@class App.Transitions","@uses App.TransitionsNative","@extensionfor App","@since 3.5.0","**/","function AppTransitions() {}","","AppTransitions.ATTRS = {"," /**"," Whether or not this application should use view transitions, and if so then"," which ones or `true` for the defaults which are specified by the"," `transitions` prototype property.",""," **Note:** Transitions are an opt-in feature and will only be used in"," browsers which support native CSS3 transitions.",""," @attribute transitions"," @type Boolean|Object"," @default false"," @since 3.5.0"," **/"," transitions: {"," setter: '_setTransitions',"," value : false"," }","};","","/**","Collect of transitions -> fx.","","A transition (e.g. \"fade\") is a simple name given to a configuration of fx to","apply, consisting of `viewIn` and `viewOut` properties who's values are names of","fx registered on `Y.Transition.fx`.","","By default transitions: `fade`, `slideLeft`, and `slideRight` have fx defined.","","@property FX","@type Object","@static","@since 3.5.0","**/","AppTransitions.FX = {"," fade: {"," viewIn : 'app:fadeIn',"," viewOut: 'app:fadeOut'"," },",""," slideLeft: {"," viewIn : 'app:slideLeft',"," viewOut: 'app:slideLeft'"," },",""," slideRight: {"," viewIn : 'app:slideRight',"," viewOut: 'app:slideRight'"," }","};","","AppTransitions.prototype = {"," // -- Public Properties ----------------------------------------------------",""," /**"," Default transitions to use when the `activeView` changes.",""," The following are types of changes for which transitions can be defined that"," correspond to the relationship between the new and previous `activeView`:",""," * `navigate`: The default transition to use when changing the `activeView`"," of the application.",""," * `toChild`: The transition to use when the new `activeView` is configured"," as a child of the previously active view via its `parent` property as"," defined in this app's `views`.",""," * `toParent`: The transition to use when the new `activeView` is"," configured as the `parent` of the previously active view as defined in"," this app's `views`.",""," **Note:** Transitions are an opt-in feature and will only be used in"," browsers which support native CSS3 transitions.",""," @property transitions"," @type Object"," @default"," {"," navigate: 'fade',"," toChild : 'slideLeft',"," toParent: 'slideRight'"," }"," @since 3.5.0"," **/"," transitions: {"," navigate: 'fade',"," toChild : 'slideLeft',"," toParent: 'slideRight'"," },",""," // -- Public Methods -------------------------------------------------------",""," /**"," Sets which view is active/visible for the application. This will set the"," app's `activeView` attribute to the specified `view`.",""," The `view` will be \"attached\" to this app, meaning it will be both rendered"," into this app's `viewContainer` node and all of its events will bubble to"," the app. The previous `activeView` will be \"detached\" from this app.",""," When a string-name is provided for a view which has been registered on this"," app's `views` object, the referenced metadata will be used and the"," `activeView` will be set to either a preserved view instance, or a new"," instance of the registered view will be created using the specified `config`"," object passed-into this method.",""," A callback function can be specified as either the third or fourth argument,"," and this function will be called after the new `view` becomes the"," `activeView`, is rendered to the `viewContainer`, and is ready to use.",""," @example"," var app = new Y.App({"," views: {"," usersView: {"," // Imagine that `Y.UsersView` has been defined."," type: Y.UsersView"," }"," },",""," transitions: true,"," users : new Y.ModelList()"," });",""," app.route('/users/', function () {"," this.showView('usersView', {users: this.get('users')});"," });",""," app.render();"," app.navigate('/uses/');"," // => Creates a new `Y.UsersView` and transitions to it.",""," @method showView"," @param {String|View} view The name of a view defined in the `views` object,"," or a view instance which should become this app's `activeView`."," @param {Object} [config] Optional configuration to use when creating a new"," view instance. This config object can also be used to update an existing"," or preserved view's attributes when `options.update` is `true`."," @param {Object} [options] Optional object containing any of the following"," properties:"," @param {Function} [options.callback] Optional callback function to call"," after new `activeView` is ready to use, the function will be passed:"," @param {View} options.callback.view A reference to the new"," `activeView`."," @param {Boolean} [options.prepend=false] Whether the `view` should be"," prepended instead of appended to the `viewContainer`."," @param {Boolean} [options.render] Whether the `view` should be rendered."," **Note:** If no value is specified, a view instance will only be"," rendered if it's newly created by this method."," @param {Boolean|String} [options.transition] Optional transition override."," A transition can be specified which will override the default, or"," `false` for no transition."," @param {Boolean} [options.update=false] Whether an existing view should"," have its attributes updated by passing the `config` object to its"," `setAttrs()` method. **Note:** This option does not have an effect if"," the `view` instance is created as a result of calling this method."," @param {Function} [callback] Optional callback Function to call after the"," new `activeView` is ready to use. **Note:** this will override"," `options.callback` and it can be specified as either the third or fourth"," argument. The function will be passed the following:"," @param {View} callback.view A reference to the new `activeView`."," @chainable"," @since 3.5.0"," **/"," // Does not override `showView()` but does use `options.transitions`.",""," // -- Protected Methods ----------------------------------------------------",""," /**"," Setter for `transitions` attribute.",""," When specified as `true`, the defaults will be use as specified by the"," `transitions` prototype property.",""," @method _setTransitions"," @param {Boolean|Object} transitions The new `transitions` attribute value."," @return {Mixed} The processed value which represents the new state."," @protected"," @see App.Base.showView()"," @since 3.5.0"," **/"," _setTransitions: function (transitions) {"," var defTransitions = this.transitions;",""," if (transitions && transitions === true) {"," return Y.merge(defTransitions);"," }",""," return transitions;"," }","};","","// -- Namespace ----------------------------------------------------------------","Y.App.Transitions = AppTransitions;","Y.Base.mix(Y.App, [AppTransitions]);","","Y.mix(Y.App.CLASS_NAMES, {"," transitioning: Y.ClassNameManager.getClassName('app', 'transitioning')","});","","","}, '@VERSION@' ,{requires:['app-base']});"];
-_yuitest_coverage["/build/app-transitions/app-transitions.js"].lines = {"1":0,"39":0,"41":0,"75":0,"92":0,"222":0,"224":0,"225":0,"228":0,"233":0,"234":0,"236":0};
-_yuitest_coverage["/build/app-transitions/app-transitions.js"].functions = {"AppTransitions:39":0,"_setTransitions:221":0,"(anonymous 1):1":0};
-_yuitest_coverage["/build/app-transitions/app-transitions.js"].coveredLines = 12;
-_yuitest_coverage["/build/app-transitions/app-transitions.js"].coveredFunctions = 3;
-_yuitest_coverline("/build/app-transitions/app-transitions.js", 1);
-YUI.add('app-transitions', function(Y) {
+_yuitest_coverage["build/app-transitions/app-transitions.js"].code=["YUI.add('app-transitions', function (Y, NAME) {","","/**","Provides view transitions for `Y.App` in browsers which support native CSS3","transitions.","","@module app","@submodule app-transitions","@since 3.5.0","**/","","/**","Provides view transitions for `Y.App` in browsers which support native CSS3","transitions.","","View transitions provide an nice way to move from one \"page\" to the next that is","both pleasant to the user and helps to communicate a hierarchy between sections","of an application.","","When this module is used, it will automatically mix itself in to `Y.App` and","transition between `activeView` changes using the following effects:",""," * **`fade`**: Cross-fades between the old an new active views.",""," * **`slideLeft`**: The old and new active views are positioned next to each"," other and both slide to the left.",""," * **`slideRight`**: The old and new active views are positioned next to each"," other and both slide to the right.","","**Note:** Transitions are an opt-in feature and are enabled via an app's","`transitions` attribute.","","@class App.Transitions","@uses App.TransitionsNative","@extensionfor App","@since 3.5.0","**/","function AppTransitions() {}","","AppTransitions.ATTRS = {"," /**"," Whether or not this application should use view transitions, and if so then"," which ones or `true` for the defaults which are specified by the"," `transitions` prototype property.",""," **Note:** Transitions are an opt-in feature and will only be used in"," browsers which support native CSS3 transitions.",""," @attribute transitions"," @type Boolean|Object"," @default false"," @since 3.5.0"," **/"," transitions: {"," setter: '_setTransitions',"," value : false"," }","};","","/**","Collect of transitions -> fx.","","A transition (e.g. \"fade\") is a simple name given to a configuration of fx to","apply, consisting of `viewIn` and `viewOut` properties who's values are names of","fx registered on `Y.Transition.fx`.","","By default transitions: `fade`, `slideLeft`, and `slideRight` have fx defined.","","@property FX","@type Object","@static","@since 3.5.0","**/","AppTransitions.FX = {"," fade: {"," viewIn : 'app:fadeIn',"," viewOut: 'app:fadeOut'"," },",""," slideLeft: {"," viewIn : 'app:slideLeft',"," viewOut: 'app:slideLeft'"," },",""," slideRight: {"," viewIn : 'app:slideRight',"," viewOut: 'app:slideRight'"," }","};","","AppTransitions.prototype = {"," // -- Public Properties ----------------------------------------------------",""," /**"," Default transitions to use when the `activeView` changes.",""," The following are types of changes for which transitions can be defined that"," correspond to the relationship between the new and previous `activeView`:",""," * `navigate`: The default transition to use when changing the `activeView`"," of the application.",""," * `toChild`: The transition to use when the new `activeView` is configured"," as a child of the previously active view via its `parent` property as"," defined in this app's `views`.",""," * `toParent`: The transition to use when the new `activeView` is"," configured as the `parent` of the previously active view as defined in"," this app's `views`.",""," **Note:** Transitions are an opt-in feature and will only be used in"," browsers which support native CSS3 transitions.",""," @property transitions"," @type Object"," @default"," {"," navigate: 'fade',"," toChild : 'slideLeft',"," toParent: 'slideRight'"," }"," @since 3.5.0"," **/"," transitions: {"," navigate: 'fade',"," toChild : 'slideLeft',"," toParent: 'slideRight'"," },",""," // -- Public Methods -------------------------------------------------------",""," /**"," Sets which view is active/visible for the application. This will set the"," app's `activeView` attribute to the specified `view`.",""," The `view` will be \"attached\" to this app, meaning it will be both rendered"," into this app's `viewContainer` node and all of its events will bubble to"," the app. The previous `activeView` will be \"detached\" from this app.",""," When a string-name is provided for a view which has been registered on this"," app's `views` object, the referenced metadata will be used and the"," `activeView` will be set to either a preserved view instance, or a new"," instance of the registered view will be created using the specified `config`"," object passed-into this method.",""," A callback function can be specified as either the third or fourth argument,"," and this function will be called after the new `view` becomes the"," `activeView`, is rendered to the `viewContainer`, and is ready to use.",""," @example"," var app = new Y.App({"," views: {"," usersView: {"," // Imagine that `Y.UsersView` has been defined."," type: Y.UsersView"," }"," },",""," transitions: true,"," users : new Y.ModelList()"," });",""," app.route('/users/', function () {"," this.showView('usersView', {users: this.get('users')});"," });",""," app.render();"," app.navigate('/uses/');"," // => Creates a new `Y.UsersView` and transitions to it.",""," @method showView"," @param {String|View} view The name of a view defined in the `views` object,"," or a view instance which should become this app's `activeView`."," @param {Object} [config] Optional configuration to use when creating a new"," view instance. This config object can also be used to update an existing"," or preserved view's attributes when `options.update` is `true`."," @param {Object} [options] Optional object containing any of the following"," properties:"," @param {Function} [options.callback] Optional callback function to call"," after new `activeView` is ready to use, the function will be passed:"," @param {View} options.callback.view A reference to the new"," `activeView`."," @param {Boolean} [options.prepend=false] Whether the `view` should be"," prepended instead of appended to the `viewContainer`."," @param {Boolean} [options.render] Whether the `view` should be rendered."," **Note:** If no value is specified, a view instance will only be"," rendered if it's newly created by this method."," @param {Boolean|String} [options.transition] Optional transition override."," A transition can be specified which will override the default, or"," `false` for no transition."," @param {Boolean} [options.update=false] Whether an existing view should"," have its attributes updated by passing the `config` object to its"," `setAttrs()` method. **Note:** This option does not have an effect if"," the `view` instance is created as a result of calling this method."," @param {Function} [callback] Optional callback Function to call after the"," new `activeView` is ready to use. **Note:** this will override"," `options.callback` and it can be specified as either the third or fourth"," argument. The function will be passed the following:"," @param {View} callback.view A reference to the new `activeView`."," @chainable"," @since 3.5.0"," **/"," // Does not override `showView()` but does use `options.transitions`.",""," // -- Protected Methods ----------------------------------------------------",""," /**"," Setter for `transitions` attribute.",""," When specified as `true`, the defaults will be use as specified by the"," `transitions` prototype property.",""," @method _setTransitions"," @param {Boolean|Object} transitions The new `transitions` attribute value."," @return {Mixed} The processed value which represents the new state."," @protected"," @see App.Base.showView()"," @since 3.5.0"," **/"," _setTransitions: function (transitions) {"," var defTransitions = this.transitions;",""," if (transitions && transitions === true) {"," return Y.merge(defTransitions);"," }",""," return transitions;"," }","};","","// -- Namespace ----------------------------------------------------------------","Y.App.Transitions = AppTransitions;","Y.Base.mix(Y.App, [AppTransitions]);","","Y.mix(Y.App.CLASS_NAMES, {"," transitioning: Y.ClassNameManager.getClassName('app', 'transitioning')","});","","","}, '@VERSION@', {\"requires\": [\"app-base\"]});"];
+_yuitest_coverage["build/app-transitions/app-transitions.js"].lines = {"1":0,"39":0,"41":0,"75":0,"92":0,"222":0,"224":0,"225":0,"228":0,"233":0,"234":0,"236":0};
+_yuitest_coverage["build/app-transitions/app-transitions.js"].functions = {"AppTransitions:39":0,"_setTransitions:221":0,"(anonymous 1):1":0};
+_yuitest_coverage["build/app-transitions/app-transitions.js"].coveredLines = 12;
+_yuitest_coverage["build/app-transitions/app-transitions.js"].coveredFunctions = 3;
+_yuitest_coverline("build/app-transitions/app-transitions.js", 1);
+YUI.add('app-transitions', function (Y, NAME) {
/**
Provides view transitions for `Y.App` in browsers which support native CSS3
@@ -70,11 +70,11 @@ transition between `activeView` changes using the following effects:
@extensionfor App
@since 3.5.0
**/
-_yuitest_coverfunc("/build/app-transitions/app-transitions.js", "(anonymous 1)", 1);
-_yuitest_coverline("/build/app-transitions/app-transitions.js", 39);
+_yuitest_coverfunc("build/app-transitions/app-transitions.js", "(anonymous 1)", 1);
+_yuitest_coverline("build/app-transitions/app-transitions.js", 39);
function AppTransitions() {}
-_yuitest_coverline("/build/app-transitions/app-transitions.js", 41);
+_yuitest_coverline("build/app-transitions/app-transitions.js", 41);
AppTransitions.ATTRS = {
/**
Whether or not this application should use view transitions, and if so then
@@ -109,7 +109,7 @@ By default transitions: `fade`, `slideLeft`, and `slideRight` have fx defined.
@static
@since 3.5.0
**/
-_yuitest_coverline("/build/app-transitions/app-transitions.js", 75);
+_yuitest_coverline("build/app-transitions/app-transitions.js", 75);
AppTransitions.FX = {
fade: {
viewIn : 'app:fadeIn',
@@ -127,7 +127,7 @@ AppTransitions.FX = {
}
};
-_yuitest_coverline("/build/app-transitions/app-transitions.js", 92);
+_yuitest_coverline("build/app-transitions/app-transitions.js", 92);
AppTransitions.prototype = {
// -- Public Properties ----------------------------------------------------
@@ -258,31 +258,31 @@ AppTransitions.prototype = {
@since 3.5.0
**/
_setTransitions: function (transitions) {
- _yuitest_coverfunc("/build/app-transitions/app-transitions.js", "_setTransitions", 221);
-_yuitest_coverline("/build/app-transitions/app-transitions.js", 222);
+ _yuitest_coverfunc("build/app-transitions/app-transitions.js", "_setTransitions", 221);
+_yuitest_coverline("build/app-transitions/app-transitions.js", 222);
var defTransitions = this.transitions;
- _yuitest_coverline("/build/app-transitions/app-transitions.js", 224);
+ _yuitest_coverline("build/app-transitions/app-transitions.js", 224);
if (transitions && transitions === true) {
- _yuitest_coverline("/build/app-transitions/app-transitions.js", 225);
+ _yuitest_coverline("build/app-transitions/app-transitions.js", 225);
return Y.merge(defTransitions);
}
- _yuitest_coverline("/build/app-transitions/app-transitions.js", 228);
+ _yuitest_coverline("build/app-transitions/app-transitions.js", 228);
return transitions;
}
};
// -- Namespace ----------------------------------------------------------------
-_yuitest_coverline("/build/app-transitions/app-transitions.js", 233);
+_yuitest_coverline("build/app-transitions/app-transitions.js", 233);
Y.App.Transitions = AppTransitions;
-_yuitest_coverline("/build/app-transitions/app-transitions.js", 234);
+_yuitest_coverline("build/app-transitions/app-transitions.js", 234);
Y.Base.mix(Y.App, [AppTransitions]);
-_yuitest_coverline("/build/app-transitions/app-transitions.js", 236);
+_yuitest_coverline("build/app-transitions/app-transitions.js", 236);
Y.mix(Y.App.CLASS_NAMES, {
transitioning: Y.ClassNameManager.getClassName('app', 'transitioning')
});
-}, '@VERSION@' ,{requires:['app-base']});
+}, '@VERSION@', {"requires": ["app-base"]});
View
4 build/app-transitions/app-transitions-debug.js
@@ -1,4 +1,4 @@
-YUI.add('app-transitions', function(Y) {
+YUI.add('app-transitions', function (Y, NAME) {
/**
Provides view transitions for `Y.App` in browsers which support native CSS3
@@ -238,4 +238,4 @@ Y.mix(Y.App.CLASS_NAMES, {
});
-}, '@VERSION@' ,{requires:['app-base']});
+}, '@VERSION@', {"requires": ["app-base"]});
View
2 build/app-transitions/app-transitions-min.js
@@ -1 +1 @@
-YUI.add("app-transitions",function(b){function a(){}a.ATTRS={transitions:{setter:"_setTransitions",value:false}};a.FX={fade:{viewIn:"app:fadeIn",viewOut:"app:fadeOut"},slideLeft:{viewIn:"app:slideLeft",viewOut:"app:slideLeft"},slideRight:{viewIn:"app:slideRight",viewOut:"app:slideRight"}};a.prototype={transitions:{navigate:"fade",toChild:"slideLeft",toParent:"slideRight"},_setTransitions:function(d){var c=this.transitions;if(d&&d===true){return b.merge(c);}return d;}};b.App.Transitions=a;b.Base.mix(b.App,[a]);b.mix(b.App.CLASS_NAMES,{transitioning:b.ClassNameManager.getClassName("app","transitioning")});},"@VERSION@",{requires:["app-base"]});
+YUI.add("app-transitions",function(c,b){function a(){}a.ATTRS={transitions:{setter:"_setTransitions",value:false}};a.FX={fade:{viewIn:"app:fadeIn",viewOut:"app:fadeOut"},slideLeft:{viewIn:"app:slideLeft",viewOut:"app:slideLeft"},slideRight:{viewIn:"app:slideRight",viewOut:"app:slideRight"}};a.prototype={transitions:{navigate:"fade",toChild:"slideLeft",toParent:"slideRight"},_setTransitions:function(e){var d=this.transitions;if(e&&e===true){return c.merge(d);}return e;}};c.App.Transitions=a;c.Base.mix(c.App,[a]);c.mix(c.App.CLASS_NAMES,{transitioning:c.ClassNameManager.getClassName("app","transitioning")});},"@VERSION@",{"requires":["app-base"]});
View
4 build/app-transitions/app-transitions.js
@@ -1,4 +1,4 @@
-YUI.add('app-transitions', function(Y) {
+YUI.add('app-transitions', function (Y, NAME) {
/**
Provides view transitions for `Y.App` in browsers which support native CSS3
@@ -238,4 +238,4 @@ Y.mix(Y.App.CLASS_NAMES, {
});
-}, '@VERSION@' ,{requires:['app-base']});
+}, '@VERSION@', {"requires": ["app-base"]});
View
168 build/cache-base/cache-base-coverage.js
@@ -16,23 +16,23 @@ if (typeof _yuitest_coverage == "undefined"){
coverage.functions[funcId]++;
};
}
-_yuitest_coverage["/build/cache-base/cache-base.js"] = {
+_yuitest_coverage["build/cache-base/cache-base.js"] = {
lines: {},
functions: {},
coveredLines: 0,
calledLines: 0,
coveredFunctions: 0,
calledFunctions: 0,
- path: "/build/cache-base/cache-base.js",
+ path: "build/cache-base/cache-base.js",
code: []
};
-_yuitest_coverage["/build/cache-base/cache-base.js"].code=["YUI.add('cache-base', function(Y) {","","/**"," * The Cache utility provides a common configurable interface for components to"," * cache and retrieve data from a local JavaScript struct."," *"," * @module cache"," * @main"," */","","/**"," * Provides the base class for the YUI Cache utility."," *"," * @submodule cache-base"," */","var LANG = Y.Lang,"," isDate = Y.Lang.isDate,","","/**"," * Base class for the YUI Cache utility."," * @class Cache"," * @extends Base"," * @constructor"," */","Cache = function() {"," Cache.superclass.constructor.apply(this, arguments);","};",""," /////////////////////////////////////////////////////////////////////////////"," //"," // Cache static properties"," //"," /////////////////////////////////////////////////////////////////////////////","Y.mix(Cache, {"," /**"," * Class name."," *"," * @property NAME"," * @type String"," * @static"," * @final"," * @value \"cache\""," */"," NAME: \"cache\",","",""," ATTRS: {"," /////////////////////////////////////////////////////////////////////////////"," //"," // Cache Attributes"," //"," /////////////////////////////////////////////////////////////////////////////",""," /**"," * @attribute max"," * @description Maximum number of entries the Cache can hold."," * Set to 0 to turn off caching."," * @type Number"," * @default 0"," */"," max: {"," value: 0,"," setter: \"_setMax\""," },",""," /**"," * @attribute size"," * @description Number of entries currently cached."," * @type Number"," */"," size: {"," readOnly: true,"," getter: \"_getSize\""," },",""," /**"," * @attribute uniqueKeys"," * @description Validate uniqueness of stored keys. Default is false and"," * is more performant."," * @type Boolean"," */"," uniqueKeys: {"," value: false"," },",""," /**"," * @attribute expires"," * @description Absolute Date when data expires or"," * relative number of milliseconds. Zero disables expiration."," * @type Date | Number"," * @default 0"," */"," expires: {"," value: 0,"," validator: function(v) {"," return Y.Lang.isDate(v) || (Y.Lang.isNumber(v) && v >= 0);"," }"," },",""," /**"," * @attribute entries"," * @description Cached entries."," * @type Array"," */"," entries: {"," readOnly: true,"," getter: \"_getEntries\""," }"," }","});","","Y.extend(Cache, Y.Base, {"," /////////////////////////////////////////////////////////////////////////////"," //"," // Cache private properties"," //"," /////////////////////////////////////////////////////////////////////////////",""," /**"," * Array of request/response objects indexed chronologically."," *"," * @property _entries"," * @type Object[]"," * @private"," */"," _entries: null,",""," /////////////////////////////////////////////////////////////////////////////"," //"," // Cache private methods"," //"," /////////////////////////////////////////////////////////////////////////////",""," /**"," * @method initializer"," * @description Internal init() handler."," * @param config {Object} Config object."," * @private"," */"," initializer: function(config) {",""," /**"," * @event add"," * @description Fired when an entry is added."," * @param e {Event.Facade} Event Facade with the following properties:"," * <dl>"," * <dt>entry (Object)</dt> <dd>The cached entry.</dd>"," * </dl>"," * @preventable _defAddFn"," */"," this.publish(\"add\", {defaultFn: this._defAddFn});",""," /**"," * @event flush"," * @description Fired when the cache is flushed."," * @param e {Event.Facade} Event Facade object."," * @preventable _defFlushFn"," */"," this.publish(\"flush\", {defaultFn: this._defFlushFn});",""," /**"," * @event request"," * @description Fired when an entry is requested from the cache."," * @param e {Event.Facade} Event Facade with the following properties:"," * <dl>"," * <dt>request (Object)</dt> <dd>The request object.</dd>"," * </dl>"," */",""," /**"," * @event retrieve"," * @description Fired when an entry is retrieved from the cache."," * @param e {Event.Facade} Event Facade with the following properties:"," * <dl>"," * <dt>entry (Object)</dt> <dd>The retrieved entry.</dd>"," * </dl>"," */",""," // Initialize internal values"," this._entries = [];"," },",""," /**"," * @method destructor"," * @description Internal destroy() handler."," * @private"," */"," destructor: function() {"," this._entries = [];"," },",""," /////////////////////////////////////////////////////////////////////////////"," //"," // Cache protected methods"," //"," /////////////////////////////////////////////////////////////////////////////",""," /**"," * Sets max."," *"," * @method _setMax"," * @protected"," */"," _setMax: function(value) {"," // If the cache is full, make room by removing stalest element (index=0)"," var entries = this._entries;"," if(value > 0) {"," if(entries) {"," while(entries.length > value) {"," entries.shift();"," }"," }"," }"," else {"," value = 0;"," this._entries = [];"," }"," return value;"," },",""," /**"," * Gets size."," *"," * @method _getSize"," * @protected"," */"," _getSize: function() {"," return this._entries.length;"," },",""," /**"," * Gets all entries."," *"," * @method _getEntries"," * @protected"," */"," _getEntries: function() {"," return this._entries;"," },","",""," /**"," * Adds entry to cache."," *"," * @method _defAddFn"," * @param e {Event.Facade} Event Facade with the following properties:"," * <dl>"," * <dt>entry (Object)</dt> <dd>The cached entry.</dd>"," * </dl>"," * @protected"," */"," _defAddFn: function(e) {"," var entries = this._entries,"," entry = e.entry,"," max = this.get(\"max\"),"," pos;",""," // If uniqueKeys is true and item exists with this key, then remove it."," if (this.get(\"uniqueKeys\")) {"," pos = this._position(e.entry.request);"," if (LANG.isValue(pos)) {"," entries.splice(pos, 1);"," }"," }",""," // If the cache at or over capacity, make room by removing stalest"," // element(s) starting at index-0."," while (max && entries.length >= max) {"," entries.shift();"," }",""," // Add entry to cache in the newest position, at the end of the array"," entries[entries.length] = entry;"," },",""," /**"," * Flushes cache."," *"," * @method _defFlushFn"," * @param e {Event.Facade} Event Facade object."," * @protected"," */"," _defFlushFn: function(e) {"," var entries = this._entries,"," details = e.details[0],"," pos;",""," //passed an item, flush only that"," if(details && LANG.isValue(details.request)) {"," pos = this._position(details.request);",""," if(LANG.isValue(pos)) {"," entries.splice(pos,1);",""," }"," }"," //no item, flush everything"," else {"," this._entries = [];"," }"," },",""," /**"," * Default overridable method compares current request with given cache entry."," * Returns true if current request matches the cached request, otherwise"," * false. Implementers should override this method to customize the"," * cache-matching algorithm."," *"," * @method _isMatch"," * @param request {Object} Request object."," * @param entry {Object} Cached entry."," * @return {Boolean} True if current request matches given cached request, false otherwise."," * @protected"," */"," _isMatch: function(request, entry) {"," if(!entry.expires || new Date() < entry.expires) {"," return (request === entry.request);"," }"," return false;"," },",""," /**"," * Returns position of a request in the entries array, otherwise null."," *"," * @method _position"," * @param request {Object} Request object."," * @return {Number} Array position if found, null otherwise."," * @protected"," */"," _position: function(request) {"," // If cache is enabled..."," var entries = this._entries,"," length = entries.length,"," i = length-1;",""," if((this.get(\"max\") === null) || this.get(\"max\") > 0) {"," // Loop through each cached entry starting from the newest"," for(; i >= 0; i--) {"," // Execute matching function"," if(this._isMatch(request, entries[i])) {"," return i;"," }"," }"," }",""," return null;"," },",""," /////////////////////////////////////////////////////////////////////////////"," //"," // Cache public methods"," //"," /////////////////////////////////////////////////////////////////////////////",""," /**"," * Adds a new entry to the cache of the format"," * {request:request, response:response, cached:cached, expires:expires}."," * If cache is full, evicts the stalest entry before adding the new one."," *"," * @method add"," * @param request {Object} Request value."," * @param response {Object} Response value."," */"," add: function(request, response) {"," var expires = this.get(\"expires\");"," if(this.get(\"initialized\") && ((this.get(\"max\") === null) || this.get(\"max\") > 0) &&"," (LANG.isValue(request) || LANG.isNull(request) || LANG.isUndefined(request))) {"," this.fire(\"add\", {entry: {"," request:request,"," response:response,"," cached: new Date(),"," expires: isDate(expires) ? expires :"," (expires ? new Date(new Date().getTime() + this.get(\"expires\")) : null)"," }});"," }"," else {"," }"," },",""," /**"," * Flushes cache."," *"," * @method flush"," */"," flush: function(request) {"," this.fire(\"flush\", { request: (LANG.isValue(request) ? request : null) });"," },",""," /**"," * Retrieves cached object for given request, if available, and refreshes"," * entry in the cache. Returns null if there is no cache match."," *"," * @method retrieve"," * @param request {Object} Request object."," * @return {Object} Cached object with the properties request and response, or null."," */"," retrieve: function(request) {"," // If cache is enabled..."," var entries = this._entries,"," length = entries.length,"," entry = null,"," pos;",""," if((length > 0) && ((this.get(\"max\") === null) || (this.get(\"max\") > 0))) {"," this.fire(\"request\", {request: request});",""," pos = this._position(request);",""," if(LANG.isValue(pos)) {"," entry = entries[pos];",""," this.fire(\"retrieve\", {entry: entry});",""," // Refresh the position of the cache hit"," if(pos < length-1) {"," // Remove element from its original location"," entries.splice(pos,1);"," // Add as newest"," entries[entries.length] = entry;"," }",""," return entry;"," }"," }"," return null;"," }","});","","Y.Cache = Cache;","","","}, '@VERSION@' ,{requires:['base']});"];
-_yuitest_coverage["/build/cache-base/cache-base.js"].lines = {"1":0,"16":0,"26":0,"34":0,"96":0,"112":0,"151":0,"159":0,"180":0,"189":0,"206":0,"207":0,"208":0,"209":0,"210":0,"215":0,"216":0,"218":0,"228":0,"238":0,"253":0,"259":0,"260":0,"261":0,"262":0,"268":0,"269":0,"273":0,"284":0,"289":0,"290":0,"292":0,"293":0,"299":0,"316":0,"317":0,"319":0,"332":0,"336":0,"338":0,"340":0,"341":0,"346":0,"365":0,"366":0,"368":0,"386":0,"399":0,"404":0,"405":0,"407":0,"409":0,"410":0,"412":0,"415":0,"417":0,"419":0,"422":0,"425":0,"429":0};
-_yuitest_coverage["/build/cache-base/cache-base.js"].functions = {"Cache:25":0,"validator:95":0,"initializer:140":0,"destructor:188":0,"_setMax:204":0,"_getSize:227":0,"_getEntries:237":0,"_defAddFn:252":0,"_defFlushFn:283":0,"_isMatch:315":0,"_position:330":0,"add:364":0,"flush:385":0,"retrieve:397":0,"(anonymous 1):1":0};
-_yuitest_coverage["/build/cache-base/cache-base.js"].coveredLines = 60;
-_yuitest_coverage["/build/cache-base/cache-base.js"].coveredFunctions = 15;
-_yuitest_coverline("/build/cache-base/cache-base.js", 1);
-YUI.add('cache-base', function(Y) {
+_yuitest_coverage["build/cache-base/cache-base.js"].code=["YUI.add('cache-base', function (Y, NAME) {","","/**"," * The Cache utility provides a common configurable interface for components to"," * cache and retrieve data from a local JavaScript struct."," *"," * @module cache"," * @main"," */","","/**"," * Provides the base class for the YUI Cache utility."," *"," * @submodule cache-base"," */","var LANG = Y.Lang,"," isDate = Y.Lang.isDate,","","/**"," * Base class for the YUI Cache utility."," * @class Cache"," * @extends Base"," * @constructor"," */","Cache = function() {"," Cache.superclass.constructor.apply(this, arguments);","};",""," /////////////////////////////////////////////////////////////////////////////"," //"," // Cache static properties"," //"," /////////////////////////////////////////////////////////////////////////////","Y.mix(Cache, {"," /**"," * Class name."," *"," * @property NAME"," * @type String"," * @static"," * @final"," * @value \"cache\""," */"," NAME: \"cache\",","",""," ATTRS: {"," /////////////////////////////////////////////////////////////////////////////"," //"," // Cache Attributes"," //"," /////////////////////////////////////////////////////////////////////////////",""," /**"," * @attribute max"," * @description Maximum number of entries the Cache can hold."," * Set to 0 to turn off caching."," * @type Number"," * @default 0"," */"," max: {"," value: 0,"," setter: \"_setMax\""," },",""," /**"," * @attribute size"," * @description Number of entries currently cached."," * @type Number"," */"," size: {"," readOnly: true,"," getter: \"_getSize\""," },",""," /**"," * @attribute uniqueKeys"," * @description Validate uniqueness of stored keys. Default is false and"," * is more performant."," * @type Boolean"," */"," uniqueKeys: {"," value: false"," },",""," /**"," * @attribute expires"," * @description Absolute Date when data expires or"," * relative number of milliseconds. Zero disables expiration."," * @type Date | Number"," * @default 0"," */"," expires: {"," value: 0,"," validator: function(v) {"," return Y.Lang.isDate(v) || (Y.Lang.isNumber(v) && v >= 0);"," }"," },",""," /**"," * @attribute entries"," * @description Cached entries."," * @type Array"," */"," entries: {"," readOnly: true,"," getter: \"_getEntries\""," }"," }","});","","Y.extend(Cache, Y.Base, {"," /////////////////////////////////////////////////////////////////////////////"," //"," // Cache private properties"," //"," /////////////////////////////////////////////////////////////////////////////",""," /**"," * Array of request/response objects indexed chronologically."," *"," * @property _entries"," * @type Object[]"," * @private"," */"," _entries: null,",""," /////////////////////////////////////////////////////////////////////////////"," //"," // Cache private methods"," //"," /////////////////////////////////////////////////////////////////////////////",""," /**"," * @method initializer"," * @description Internal init() handler."," * @param config {Object} Config object."," * @private"," */"," initializer: function(config) {",""," /**"," * @event add"," * @description Fired when an entry is added."," * @param e {Event.Facade} Event Facade with the following properties:"," * <dl>"," * <dt>entry (Object)</dt> <dd>The cached entry.</dd>"," * </dl>"," * @preventable _defAddFn"," */"," this.publish(\"add\", {defaultFn: this._defAddFn});",""," /**"," * @event flush"," * @description Fired when the cache is flushed."," * @param e {Event.Facade} Event Facade object."," * @preventable _defFlushFn"," */"," this.publish(\"flush\", {defaultFn: this._defFlushFn});",""," /**"," * @event request"," * @description Fired when an entry is requested from the cache."," * @param e {Event.Facade} Event Facade with the following properties:"," * <dl>"," * <dt>request (Object)</dt> <dd>The request object.</dd>"," * </dl>"," */",""," /**"," * @event retrieve"," * @description Fired when an entry is retrieved from the cache."," * @param e {Event.Facade} Event Facade with the following properties:"," * <dl>"," * <dt>entry (Object)</dt> <dd>The retrieved entry.</dd>"," * </dl>"," */",""," // Initialize internal values"," this._entries = [];"," },",""," /**"," * @method destructor"," * @description Internal destroy() handler."," * @private"," */"," destructor: function() {"," this._entries = [];"," },",""," /////////////////////////////////////////////////////////////////////////////"," //"," // Cache protected methods"," //"," /////////////////////////////////////////////////////////////////////////////",""," /**"," * Sets max."," *"," * @method _setMax"," * @protected"," */"," _setMax: function(value) {"," // If the cache is full, make room by removing stalest element (index=0)"," var entries = this._entries;"," if(value > 0) {"," if(entries) {"," while(entries.length > value) {"," entries.shift();"," }"," }"," }"," else {"," value = 0;"," this._entries = [];"," }"," return value;"," },",""," /**"," * Gets size."," *"," * @method _getSize"," * @protected"," */"," _getSize: function() {"," return this._entries.length;"," },",""," /**"," * Gets all entries."," *"," * @method _getEntries"," * @protected"," */"," _getEntries: function() {"," return this._entries;"," },","",""," /**"," * Adds entry to cache."," *"," * @method _defAddFn"," * @param e {Event.Facade} Event Facade with the following properties:"," * <dl>"," * <dt>entry (Object)</dt> <dd>The cached entry.</dd>"," * </dl>"," * @protected"," */"," _defAddFn: function(e) {"," var entries = this._entries,"," entry = e.entry,"," max = this.get(\"max\"),"," pos;",""," // If uniqueKeys is true and item exists with this key, then remove it."," if (this.get(\"uniqueKeys\")) {"," pos = this._position(e.entry.request);"," if (LANG.isValue(pos)) {"," entries.splice(pos, 1);"," }"," }",""," // If the cache at or over capacity, make room by removing stalest"," // element(s) starting at index-0."," while (max && entries.length >= max) {"," entries.shift();"," }",""," // Add entry to cache in the newest position, at the end of the array"," entries[entries.length] = entry;"," },",""," /**"," * Flushes cache."," *"," * @method _defFlushFn"," * @param e {Event.Facade} Event Facade object."," * @protected"," */"," _defFlushFn: function(e) {"," var entries = this._entries,"," details = e.details[0],"," pos;",""," //passed an item, flush only that"," if(details && LANG.isValue(details.request)) {"," pos = this._position(details.request);",""," if(LANG.isValue(pos)) {"," entries.splice(pos,1);",""," }"," }"," //no item, flush everything"," else {"," this._entries = [];"," }"," },",""," /**"," * Default overridable method compares current request with given cache entry."," * Returns true if current request matches the cached request, otherwise"," * false. Implementers should override this method to customize the"," * cache-matching algorithm."," *"," * @method _isMatch"," * @param request {Object} Request object."," * @param entry {Object} Cached entry."," * @return {Boolean} True if current request matches given cached request, false otherwise."," * @protected"," */"," _isMatch: function(request, entry) {"," if(!entry.expires || new Date() < entry.expires) {"," return (request === entry.request);"," }"," return false;"," },",""," /**"," * Returns position of a request in the entries array, otherwise null."," *"," * @method _position"," * @param request {Object} Request object."," * @return {Number} Array position if found, null otherwise."," * @protected"," */"," _position: function(request) {"," // If cache is enabled..."," var entries = this._entries,"," length = entries.length,"," i = length-1;",""," if((this.get(\"max\") === null) || this.get(\"max\") > 0) {"," // Loop through each cached entry starting from the newest"," for(; i >= 0; i--) {"," // Execute matching function"," if(this._isMatch(request, entries[i])) {"," return i;"," }"," }"," }",""," return null;"," },",""," /////////////////////////////////////////////////////////////////////////////"," //"," // Cache public methods"," //"," /////////////////////////////////////////////////////////////////////////////",""," /**"," * Adds a new entry to the cache of the format"," * {request:request, response:response, cached:cached, expires:expires}."," * If cache is full, evicts the stalest entry before adding the new one."," *"," * @method add"," * @param request {Object} Request value."," * @param response {Object} Response value."," */"," add: function(request, response) {"," var expires = this.get(\"expires\");"," if(this.get(\"initialized\") && ((this.get(\"max\") === null) || this.get(\"max\") > 0) &&"," (LANG.isValue(request) || LANG.isNull(request) || LANG.isUndefined(request))) {"," this.fire(\"add\", {entry: {"," request:request,"," response:response,"," cached: new Date(),"," expires: isDate(expires) ? expires :"," (expires ? new Date(new Date().getTime() + this.get(\"expires\")) : null)"," }});"," }"," else {"," }"," },",""," /**"," * Flushes cache."," *"," * @method flush"," */"," flush: function(request) {"," this.fire(\"flush\", { request: (LANG.isValue(request) ? request : null) });"," },",""," /**"," * Retrieves cached object for given request, if available, and refreshes"," * entry in the cache. Returns null if there is no cache match."," *"," * @method retrieve"," * @param request {Object} Request object."," * @return {Object} Cached object with the properties request and response, or null."," */"," retrieve: function(request) {"," // If cache is enabled..."," var entries = this._entries,"," length = entries.length,"," entry = null,"," pos;",""," if((length > 0) && ((this.get(\"max\") === null) || (this.get(\"max\") > 0))) {"," this.fire(\"request\", {request: request});",""," pos = this._position(request);",""," if(LANG.isValue(pos)) {"," entry = entries[pos];",""," this.fire(\"retrieve\", {entry: entry});",""," // Refresh the position of the cache hit"," if(pos < length-1) {"," // Remove element from its original location"," entries.splice(pos,1);"," // Add as newest"," entries[entries.length] = entry;"," }",""," return entry;"," }"," }"," return null;"," }","});","","Y.Cache = Cache;","","","}, '@VERSION@', {\"requires\": [\"base\"]});"];
+_yuitest_coverage["build/cache-base/cache-base.js"].lines = {"1":0,"16":0,"26":0,"34":0,"96":0,"112":0,"151":0,"159":0,"180":0,"189":0,"206":0,"207":0,"208":0,"209":0,"210":0,"215":0,"216":0,"218":0,"228":0,"238":0,"253":0,"259":0,"260":0,"261":0,"262":0,"268":0,"269":0,"273":0,"284":0,"289":0,"290":0,"292":0,"293":0,"299":0,"316":0,"317":0,"319":0,"332":0,"336":0,"338":0,"340":0,"341":0,"346":0,"365":0,"366":0,"368":0,"386":0,"399":0,"404":0,"405":0,"407":0,"409":0,"410":0,"412":0,"415":0,"417":0,"419":0,"422":0,"425":0,"429":0};
+_yuitest_coverage["build/cache-base/cache-base.js"].functions = {"Cache:25":0,"validator:95":0,"initializer:140":0,"destructor:188":0,"_setMax:204":0,"_getSize:227":0,"_getEntries:237":0,"_defAddFn:252":0,"_defFlushFn:283":0,"_isMatch:315":0,"_position:330":0,"add:364":0,"flush:385":0,"retrieve:397":0,"(anonymous 1):1":0};
+_yuitest_coverage["build/cache-base/cache-base.js"].coveredLines = 60;
+_yuitest_coverage["build/cache-base/cache-base.js"].coveredFunctions = 15;
+_yuitest_coverline("build/cache-base/cache-base.js", 1);
+YUI.add('cache-base', function (Y, NAME) {
/**
* The Cache utility provides a common configurable interface for components to
@@ -47,8 +47,8 @@ YUI.add('cache-base', function(Y) {
*
* @submodule cache-base
*/
-_yuitest_coverfunc("/build/cache-base/cache-base.js", "(anonymous 1)", 1);
-_yuitest_coverline("/build/cache-base/cache-base.js", 16);
+_yuitest_coverfunc("build/cache-base/cache-base.js", "(anonymous 1)", 1);
+_yuitest_coverline("build/cache-base/cache-base.js", 16);
var LANG = Y.Lang,
isDate = Y.Lang.isDate,
@@ -59,8 +59,8 @@ var LANG = Y.Lang,
* @constructor
*/
Cache = function() {
- _yuitest_coverfunc("/build/cache-base/cache-base.js", "Cache", 25);
-_yuitest_coverline("/build/cache-base/cache-base.js", 26);
+ _yuitest_coverfunc("build/cache-base/cache-base.js", "Cache", 25);
+_yuitest_coverline("build/cache-base/cache-base.js", 26);
Cache.superclass.constructor.apply(this, arguments);
};
@@ -69,7 +69,7 @@ Cache.superclass.constructor.apply(this, arguments);
// Cache static properties
//
/////////////////////////////////////////////////////////////////////////////
-_yuitest_coverline("/build/cache-base/cache-base.js", 34);
+_yuitest_coverline("build/cache-base/cache-base.js", 34);
Y.mix(Cache, {
/**
* Class name.
@@ -132,8 +132,8 @@ Y.mix(Cache, {
expires: {
value: 0,
validator: function(v) {
- _yuitest_coverfunc("/build/cache-base/cache-base.js", "validator", 95);
-_yuitest_coverline("/build/cache-base/cache-base.js", 96);
+ _yuitest_coverfunc("build/cache-base/cache-base.js", "validator", 95);
+_yuitest_coverline("build/cache-base/cache-base.js", 96);
return Y.Lang.isDate(v) || (Y.Lang.isNumber(v) && v >= 0);
}
},
@@ -150,7 +150,7 @@ return Y.Lang.isDate(v) || (Y.Lang.isNumber(v) && v >= 0);
}
});
-_yuitest_coverline("/build/cache-base/cache-base.js", 112);
+_yuitest_coverline("build/cache-base/cache-base.js", 112);
Y.extend(Cache, Y.Base, {
/////////////////////////////////////////////////////////////////////////////
//
@@ -190,8 +190,8 @@ Y.extend(Cache, Y.Base, {
* </dl>
* @preventable _defAddFn
*/
- _yuitest_coverfunc("/build/cache-base/cache-base.js", "initializer", 140);
-_yuitest_coverline("/build/cache-base/cache-base.js", 151);
+ _yuitest_coverfunc("build/cache-base/cache-base.js", "initializer", 140);
+_yuitest_coverline("build/cache-base/cache-base.js", 151);
this.publish("add", {defaultFn: this._defAddFn});
/**
@@ -200,7 +200,7 @@ this.publish("add", {defaultFn: this._defAddFn});
* @param e {Event.Facade} Event Facade object.
* @preventable _defFlushFn
*/
- _yuitest_coverline("/build/cache-base/cache-base.js", 159);
+ _yuitest_coverline("build/cache-base/cache-base.js", 159);
this.publish("flush", {defaultFn: this._defFlushFn});
/**
@@ -222,7 +222,7 @@ this.publish("flush", {defaultFn: this._defFlushFn});
*/
// Initialize internal values
- _yuitest_coverline("/build/cache-base/cache-base.js", 180);
+ _yuitest_coverline("build/cache-base/cache-base.js", 180);
this._entries = [];
},
@@ -232,8 +232,8 @@ this._entries = [];
* @private
*/
destructor: function() {
- _yuitest_coverfunc("/build/cache-base/cache-base.js", "destructor", 188);
-_yuitest_coverline("/build/cache-base/cache-base.js", 189);
+ _yuitest_coverfunc("build/cache-base/cache-base.js", "destructor", 188);
+_yuitest_coverline("build/cache-base/cache-base.js", 189);
this._entries = [];
},
@@ -251,27 +251,27 @@ this._entries = [];
*/
_setMax: function(value) {
// If the cache is full, make room by removing stalest element (index=0)
- _yuitest_coverfunc("/build/cache-base/cache-base.js", "_setMax", 204);
-_yuitest_coverline("/build/cache-base/cache-base.js", 206);
+ _yuitest_coverfunc("build/cache-base/cache-base.js", "_setMax", 204);
+_yuitest_coverline("build/cache-base/cache-base.js", 206);
var entries = this._entries;
- _yuitest_coverline("/build/cache-base/cache-base.js", 207);
+ _yuitest_coverline("build/cache-base/cache-base.js", 207);
if(value > 0) {
- _yuitest_coverline("/build/cache-base/cache-base.js", 208);
+ _yuitest_coverline("build/cache-base/cache-base.js", 208);
if(entries) {
- _yuitest_coverline("/build/cache-base/cache-base.js", 209);
+ _yuitest_coverline("build/cache-base/cache-base.js", 209);
while(entries.length > value) {
- _yuitest_coverline("/build/cache-base/cache-base.js", 210);
+ _yuitest_coverline("build/cache-base/cache-base.js", 210);
entries.shift();
}
}
}
else {
- _yuitest_coverline("/build/cache-base/cache-base.js", 215);
+ _yuitest_coverline("build/cache-base/cache-base.js", 215);
value = 0;
- _yuitest_coverline("/build/cache-base/cache-base.js", 216);
+ _yuitest_coverline("build/cache-base/cache-base.js", 216);
this._entries = [];
}
- _yuitest_coverline("/build/cache-base/cache-base.js", 218);
+ _yuitest_coverline("build/cache-base/cache-base.js", 218);
return value;
},
@@ -282,8 +282,8 @@ return value;
* @protected
*/
_getSize: function() {
- _yuitest_coverfunc("/build/cache-base/cache-base.js", "_getSize", 227);
-_yuitest_coverline("/build/cache-base/cache-base.js", 228);
+ _yuitest_coverfunc("build/cache-base/cache-base.js", "_getSize", 227);
+_yuitest_coverline("build/cache-base/cache-base.js", 228);
return this._entries.length;
},
@@ -294,8 +294,8 @@ return this._entries.length;
* @protected
*/
_getEntries: function() {
- _yuitest_coverfunc("/build/cache-base/cache-base.js", "_getEntries", 237);
-_yuitest_coverline("/build/cache-base/cache-base.js", 238);
+ _yuitest_coverfunc("build/cache-base/cache-base.js", "_getEntries", 237);
+_yuitest_coverline("build/cache-base/cache-base.js", 238);
return this._entries;
},
@@ -311,35 +311,35 @@ return this._entries;
* @protected
*/
_defAddFn: function(e) {
- _yuitest_coverfunc("/build/cache-base/cache-base.js", "_defAddFn", 252);
-_yuitest_coverline("/build/cache-base/cache-base.js", 253);
+ _yuitest_coverfunc("build/cache-base/cache-base.js", "_defAddFn", 252);
+_yuitest_coverline("build/cache-base/cache-base.js", 253);
var entries = this._entries,
entry = e.entry,
max = this.get("max"),
pos;
// If uniqueKeys is true and item exists with this key, then remove it.
- _yuitest_coverline("/build/cache-base/cache-base.js", 259);
+ _yuitest_coverline("build/cache-base/cache-base.js", 259);
if (this.get("uniqueKeys")) {
- _yuitest_coverline("/build/cache-base/cache-base.js", 260);
+ _yuitest_coverline("build/cache-base/cache-base.js", 260);
pos = this._position(e.entry.request);
- _yuitest_coverline("/build/cache-base/cache-base.js", 261);
+ _yuitest_coverline("build/cache-base/cache-base.js", 261);
if (LANG.isValue(pos)) {
- _yuitest_coverline("/build/cache-base/cache-base.js", 262);
+ _yuitest_coverline("build/cache-base/cache-base.js", 262);
entries.splice(pos, 1);
}
}
// If the cache at or over capacity, make room by removing stalest
// element(s) starting at index-0.
- _yuitest_coverline("/build/cache-base/cache-base.js", 268);
+ _yuitest_coverline("build/cache-base/cache-base.js", 268);
while (max && entries.length >= max) {
- _yuitest_coverline("/build/cache-base/cache-base.js", 269);
+ _yuitest_coverline("build/cache-base/cache-base.js", 269);
entries.shift();
}
// Add entry to cache in the newest position, at the end of the array
- _yuitest_coverline("/build/cache-base/cache-base.js", 273);
+ _yuitest_coverline("build/cache-base/cache-base.js", 273);
entries[entries.length] = entry;
},
@@ -351,28 +351,28 @@ entries[entries.length] = entry;
* @protected
*/
_defFlushFn: function(e) {
- _yuitest_coverfunc("/build/cache-base/cache-base.js", "_defFlushFn", 283);
-_yuitest_coverline("/build/cache-base/cache-base.js", 284);
+ _yuitest_coverfunc("build/cache-base/cache-base.js", "_defFlushFn", 283);
+_yuitest_coverline("build/cache-base/cache-base.js", 284);
var entries = this._entries,
details = e.details[0],
pos;
//passed an item, flush only that
- _yuitest_coverline("/build/cache-base/cache-base.js", 289);
+ _yuitest_coverline("build/cache-base/cache-base.js", 289);
if(details && LANG.isValue(details.request)) {
- _yuitest_coverline("/build/cache-base/cache-base.js", 290);
+ _yuitest_coverline("build/cache-base/cache-base.js", 290);
pos = this._position(details.request);
- _yuitest_coverline("/build/cache-base/cache-base.js", 292);
+ _yuitest_coverline("build/cache-base/cache-base.js", 292);
if(LANG.isValue(pos)) {
- _yuitest_coverline("/build/cache-base/cache-base.js", 293);
+ _yuitest_coverline("build/cache-base/cache-base.js", 293);
entries.splice(pos,1);
}
}
//no item, flush everything
else {
- _yuitest_coverline("/build/cache-base/cache-base.js", 299);
+ _yuitest_coverline("build/cache-base/cache-base.js", 299);
this._entries = [];
}
},
@@ -390,13 +390,13 @@ this._entries = [];
* @protected
*/
_isMatch: function(request, entry) {
- _yuitest_coverfunc("/build/cache-base/cache-base.js", "_isMatch", 315);
-_yuitest_coverline("/build/cache-base/cache-base.js", 316);
+ _yuitest_coverfunc("build/cache-base/cache-base.js", "_isMatch", 315);
+_yuitest_coverline("build/cache-base/cache-base.js", 316);
if(!entry.expires || new Date() < entry.expires) {
- _yuitest_coverline("/build/cache-base/cache-base.js", 317);
+ _yuitest_coverline("build/cache-base/cache-base.js", 317);
return (request === entry.request);
}
- _yuitest_coverline("/build/cache-base/cache-base.js", 319);
+ _yuitest_coverline("build/cache-base/cache-base.js", 319);
return false;
},
@@ -410,27 +410,27 @@ return false;
*/
_position: function(request) {
// If cache is enabled...
- _yuitest_coverfunc("/build/cache-base/cache-base.js", "_position", 330);
-_yuitest_coverline("/build/cache-base/cache-base.js", 332);
+ _yuitest_coverfunc("build/cache-base/cache-base.js", "_position", 330);
+_yuitest_coverline("build/cache-base/cache-base.js", 332);
var entries = this._entries,
length = entries.length,
i = length-1;
- _yuitest_coverline("/build/cache-base/cache-base.js", 336);
+ _yuitest_coverline("build/cache-base/cache-base.js", 336);
if((this.get("max") === null) || this.get("max") > 0) {
// Loop through each cached entry starting from the newest
- _yuitest_coverline("/build/cache-base/cache-base.js", 338);
+ _yuitest_coverline("build/cache-base/cache-base.js", 338);
for(; i >= 0; i--) {
// Execute matching function
- _yuitest_coverline("/build/cache-base/cache-base.js", 340);
+ _yuitest_coverline("build/cache-base/cache-base.js", 340);
if(this._isMatch(request, entries[i])) {
- _yuitest_coverline("/build/cache-base/cache-base.js", 341);
+ _yuitest_coverline("build/cache-base/cache-base.js", 341);
return i;
}
}
}
- _yuitest_coverline("/build/cache-base/cache-base.js", 346);
+ _yuitest_coverline("build/cache-base/cache-base.js", 346);
return null;
},
@@ -450,13 +450,13 @@ return null;
* @param response {Object} Response value.
*/
add: function(request, response) {
- _yuitest_coverfunc("/build/cache-base/cache-base.js", "add", 364);
-_yuitest_coverline("/build/cache-base/cache-base.js", 365);
+ _yuitest_coverfunc("build/cache-base/cache-base.js", "add", 364);
+_yuitest_coverline("build/cache-base/cache-base.js", 365);
var expires = this.get("expires");
- _yuitest_coverline("/build/cache-base/cache-base.js", 366);
+ _yuitest_coverline("build/cache-base/cache-base.js", 366);
if(this.get("initialized") && ((this.get("max") === null) || this.get("max") > 0) &&
(LANG.isValue(request) || LANG.isNull(request) || LANG.isUndefined(request))) {
- _yuitest_coverline("/build/cache-base/cache-base.js", 368);
+ _yuitest_coverline("build/cache-base/cache-base.js", 368);
this.fire("add", {entry: {
request:request,
response:response,
@@ -475,8 +475,8 @@ this.fire("add", {entry: {
* @method flush
*/
flush: function(request) {
- _yuitest_coverfunc("/build/cache-base/cache-base.js", "flush", 385);
-_yuitest_coverline("/build/cache-base/cache-base.js", 386);
+ _yuitest_coverfunc("build/cache-base/cache-base.js", "flush", 385);
+_yuitest_coverline("build/cache-base/cache-base.js", 386);
this.fire("flush", { request: (LANG.isValue(request) ? request : null) });
},
@@ -490,51 +490,51 @@ this.fire("flush", { request: (LANG.isValue(request) ? request : null) });
*/
retrieve: function(request) {
// If cache is enabled...
- _yuitest_coverfunc("/build/cache-base/cache-base.js", "retrieve", 397);
-_yuitest_coverline("/build/cache-base/cache-base.js", 399);
+ _yuitest_coverfunc("build/cache-base/cache-base.js", "retrieve", 397);
+_yuitest_coverline("build/cache-base/cache-base.js", 399);
var entries = this._entries,
length = entries.length,
entry = null,
pos;
- _yuitest_coverline("/build/cache-base/cache-base.js", 404);
+ _yuitest_coverline("build/cache-base/cache-base.js", 404);
if((length > 0) && ((this.get("max") === null) || (this.get("max") > 0))) {
- _yuitest_coverline("/build/cache-base/cache-base.js", 405);
+ _yuitest_coverline("build/cache-base/cache-base.js", 405);
this.fire("request", {request: request});
- _yuitest_coverline("/build/cache-base/cache-base.js", 407);
+ _yuitest_coverline("build/cache-base/cache-base.js", 407);
pos = this._position(request);
- _yuitest_coverline("/build/cache-base/cache-base.js", 409);
+ _yuitest_coverline("build/cache-base/cache-base.js", 409);
if(LANG.isValue(pos)) {
- _yuitest_coverline("/build/cache-base/cache-base.js", 410);
+ _yuitest_coverline("build/cache-base/cache-base.js", 410);
entry = entries[pos];
- _yuitest_coverline("/build/cache-base/cache-base.js", 412);
+ _yuitest_coverline("build/cache-base/cache-base.js", 412);
this.fire("retrieve", {entry: entry});
// Refresh the position of the cache hit
- _yuitest_coverline("/build/cache-base/cache-base.js", 415);
+ _yuitest_coverline("build/cache-base/cache-base.js", 415);
if(pos < length-1) {
// Remove element from its original location
- _yuitest_coverline("/build/cache-base/cache-base.js", 417);
+ _yuitest_coverline("build/cache-base/cache-base.js", 417);
entries.splice(pos,1);
// Add as newest
- _yuitest_coverline("/build/cache-base/cache-base.js", 419);
+ _yuitest_coverline("build/cache-base/cache-base.js", 419);
entries[entries.length] = entry;
}
- _yuitest_coverline("/build/cache-base/cache-base.js", 422);
+ _yuitest_coverline("build/cache-base/cache-base.js", 422);
return entry;
}
}
- _yuitest_coverline("/build/cache-base/cache-base.js", 425);
+ _yuitest_coverline("build/cache-base/cache-base.js", 425);
return null;
}
});
-_yuitest_coverline("/build/cache-base/cache-base.js", 429);
+_yuitest_coverline("build/cache-base/cache-base.js", 429);
Y.Cache = Cache;
-}, '@VERSION@' ,{requires:['base']});
+}, '@VERSION@', {"requires": ["base"]});
View
4 build/cache-base/cache-base-debug.js
@@ -1,4 +1,4 @@
-YUI.add('cache-base', function(Y) {
+YUI.add('cache-base', function (Y, NAME) {
/**
* The Cache utility provides a common configurable interface for components to
@@ -439,4 +439,4 @@ Y.extend(Cache, Y.Base, {
Y.Cache = Cache;
-}, '@VERSION@' ,{requires:['base']});
+}, '@VERSION@', {"requires": ["base"]});
View
2 build/cache-base/cache-base-min.js
@@ -1 +1 @@
-YUI.add("cache-base",function(d){var a=d.Lang,b=d.Lang.isDate,c=function(){c.superclass.constructor.apply(this,arguments);};d.mix(c,{NAME:"cache",ATTRS:{max:{value:0,setter:"_setMax"},size:{readOnly:true,getter:"_getSize"},uniqueKeys:{value:false},expires:{value:0,validator:function(e){return d.Lang.isDate(e)||(d.Lang.isNumber(e)&&e>=0);}},entries:{readOnly:true,getter:"_getEntries"}}});d.extend(c,d.Base,{_entries:null,initializer:function(e){this.publish("add",{defaultFn:this._defAddFn});this.publish("flush",{defaultFn:this._defFlushFn});this._entries=[];},destructor:function(){this._entries=[];},_setMax:function(f){var e=this._entries;if(f>0){if(e){while(e.length>f){e.shift();}}}else{f=0;this._entries=[];}return f;},_getSize:function(){return this._entries.length;},_getEntries:function(){return this._entries;},_defAddFn:function(i){var g=this._entries,h=i.entry,f=this.get("max"),j;if(this.get("uniqueKeys")){j=this._position(i.entry.request);if(a.isValue(j)){g.splice(j,1);}}while(f&&g.length>=f){g.shift();}g[g.length]=h;},_defFlushFn:function(h){var f=this._entries,g=h.details[0],i;if(g&&a.isValue(g.request)){i=this._position(g.request);if(a.isValue(i)){f.splice(i,1);}}else{this._entries=[];}},_isMatch:function(f,e){if(!e.expires||new Date()<e.expires){return(f===e.request);}return false;},_position:function(h){var e=this._entries,g=e.length,f=g-1;if((this.get("max")===null)||this.get("max")>0){for(;f>=0;f--){if(this._isMatch(h,e[f])){return f;}}}return null;},add:function(g,f){var e=this.get("expires");if(this.get("initialized")&&((this.get("max")===null)||this.get("max")>0)&&(a.isValue(g)||a.isNull(g)||a.isUndefined(g))){this.fire("add",{entry:{request:g,response:f,cached:new Date(),expires:b(e)?e:(e?new Date(new Date().getTime()+this.get("expires")):null)}});}else{}},flush:function(e){this.fire("flush",{request:(a.isValue(e)?e:null)});},retrieve:function(h){var e=this._entries,g=e.length,f=null,i;if((g>0)&&((this.get("max")===null)||(this.get("max")>0))){this.fire("request",{request:h});i=this._position(h);if(a.isValue(i)){f=e[i];this.fire("retrieve",{entry:f});if(i<g-1){e.splice(i,1);e[e.length]=f;}return f;}}return null;}});d.Cache=c;},"@VERSION@",{requires:["base"]});
+YUI.add("cache-base",function(e,d){var a=e.Lang,b=e.Lang.isDate,c=function(){c.superclass.constructor.apply(this,arguments);};e.mix(c,{NAME:"cache",ATTRS:{max:{value:0,setter:"_setMax"},size:{readOnly:true,getter:"_getSize"},uniqueKeys:{value:false},expires:{value:0,validator:function(f){return e.Lang.isDate(f)||(e.Lang.isNumber(f)&&f>=0);}},entries:{readOnly:true,getter:"_getEntries"}}});e.extend(c,e.Base,{_entries:null,initializer:function(f){this.publish("add",{defaultFn:this._defAddFn});this.publish("flush",{defaultFn:this._defFlushFn});this._entries=[];},destructor:function(){this._entries=[];},_setMax:function(g){var f=this._entries;if(g>0){if(f){while(f.length>g){f.shift();}}}else{g=0;this._entries=[];}return g;},_getSize:function(){return this._entries.length;},_getEntries:function(){return this._entries;},_defAddFn:function(i){var g=this._entries,h=i.entry,f=this.get("max"),j;if(this.get("uniqueKeys")){j=this._position(i.entry.request);if(a.isValue(j)){g.splice(j,1);}}while(f&&g.length>=f){g.shift();}g[g.length]=h;},_defFlushFn:function(h){var f=this._entries,g=h.details[0],i;if(g&&a.isValue(g.request)){i=this._position(g.request);if(a.isValue(i)){f.splice(i,1);}}else{this._entries=[];}},_isMatch:function(g,f){if(!f.expires||new Date()<f.expires){return(g===f.request);}return false;},_position:function(j){var f=this._entries,h=f.length,g=h-1;if((this.get("max")===null)||this.get("max")>0){for(;g>=0;g--){if(this._isMatch(j,f[g])){return g;}}}return null;},add:function(h,g){var f=this.get("expires");if(this.get("initialized")&&((this.get("max")===null)||this.get("max")>0)&&(a.isValue(h)||a.isNull(h)||a.isUndefined(h))){this.fire("add",{entry:{request:h,response:g,cached:new Date(),expires:b(f)?f:(f?new Date(new Date().getTime()+this.get("expires")):null)}});}else{}},flush:function(f){this.fire("flush",{request:(a.isValue(f)?f:null)});},retrieve:function(i){var f=this._entries,h=f.length,g=null,j;if((h>0)&&((this.get("max")===null)||(this.get("max")>0))){this.fire("request",{request:i});j=this._position(i);if(a.isValue(j)){g=f[j];this.fire("retrieve",{entry:g});if(j<h-1){f.splice(j,1);f[f.length]=g;}return g;}}return null;}});e.Cache=c;},"@VERSION@",{"requires":["base"]});
View
4 build/cache-base/cache-base.js
@@ -1,4 +1,4 @@
-YUI.add('cache-base', function(Y) {
+YUI.add('cache-base', function (Y, NAME) {
/**
* The Cache utility provides a common configurable interface for components to
@@ -429,4 +429,4 @@ Y.extend(Cache, Y.Base, {
Y.Cache = Cache;
-}, '@VERSION@' ,{requires:['base']});
+}, '@VERSION@', {"requires": ["base"]});
View
152 build/cache-offline/cache-offline-coverage.js
@@ -16,23 +16,23 @@ if (typeof _yuitest_coverage == "undefined"){
coverage.functions[funcId]++;
};
}
-_yuitest_coverage["/build/cache-offline/cache-offline.js"] = {
+_yuitest_coverage["build/cache-offline/cache-offline.js"] = {
lines: {},
functions: {},
coveredLines: 0,
calledLines: 0,
coveredFunctions: 0,
calledFunctions: 0,
- path: "/build/cache-offline/cache-offline.js",
+ path: "build/cache-offline/cache-offline.js",
code: []
};
-_yuitest_coverage["/build/cache-offline/cache-offline.js"].code=["YUI.add('cache-offline', function(Y) {","","/**"," * Provides a Cache subclass which uses HTML5 `localStorage` for persistence."," * "," * @module cache"," * @submodule cache-offline"," */","","/**"," * Extends Cache utility with offline functionality."," * @class CacheOffline"," * @extends Cache"," * @constructor"," */","function CacheOffline() {"," CacheOffline.superclass.constructor.apply(this, arguments);","}","","var localStorage = null,"," JSON = Y.JSON;","","// Bug 2529572","try {"," localStorage = Y.config.win.localStorage;","}","catch(e) {","}","","/////////////////////////////////////////////////////////////////////////////","//","// CacheOffline events","//","/////////////////////////////////////////////////////////////////////////////","","/**","* @event error","* @description Fired when an entry could not be added, most likely due to","* exceeded browser quota.","* <dl>","* <dt>error (Object)</dt> <dd>The error object.</dd>","* </dl>","*/","","/////////////////////////////////////////////////////////////////////////////","//","// CacheOffline static","//","/////////////////////////////////////////////////////////////////////////////","Y.mix(CacheOffline, {"," /**"," * Class name."," *"," * @property NAME"," * @type String"," * @static"," * @final"," * @value \"cacheOffline\""," */"," NAME: \"cacheOffline\",",""," ATTRS: {"," /////////////////////////////////////////////////////////////////////////////"," //"," // CacheOffline Attributes"," //"," /////////////////////////////////////////////////////////////////////////////",""," /**"," * @attribute sandbox"," * @description A string that must be passed in via the constructor."," * This identifier is used to sandbox one cache instance's entries"," * from another. Calling the cache instance's flush and length methods"," * or get(\"entries\") will apply to only these sandboxed entries."," * @type String"," * @default \"default\""," * @initOnly"," */"," sandbox: {"," value: \"default\","," writeOnce: \"initOnly\""," },",""," /**"," * @attribute expires"," * @description Absolute Date when data expires or"," * relative number of milliseconds. Zero disables expiration."," * @type Date | Number"," * @default 86400000 (one day)"," */"," expires: {"," value: 86400000"," },",""," /**"," * @attribute max"," * @description Disabled."," * @readOnly"," * @default null"," */"," max: {"," value: null,"," readOnly: true"," },",""," /**"," * @attribute uniqueKeys"," * @description Always true for CacheOffline."," * @readOnly"," * @default true"," */"," uniqueKeys: {"," value: true,"," readOnly: true,"," setter: function() {"," return true;"," }"," }"," },",""," /**"," * Removes all items from all sandboxes. Useful if localStorage has"," * exceeded quota. Only supported on browsers that implement HTML 5"," * localStorage."," *"," * @method flushAll"," * @static"," */"," flushAll: function() {"," var store = localStorage, key;"," if(store) {"," if(store.clear) {"," store.clear();"," }"," // FF2.x and FF3.0.x"," else {"," for (key in store) {"," if (store.hasOwnProperty(key)) {"," store.removeItem(key);"," delete store[key];"," }"," }"," }"," }"," else {"," }"," }","});","","Y.extend(CacheOffline, Y.Cache, localStorage ? {","/////////////////////////////////////////////////////////////////////////////","//","// Offline is supported","//","/////////////////////////////////////////////////////////////////////////////",""," /////////////////////////////////////////////////////////////////////////////"," //"," // CacheOffline protected methods"," //"," /////////////////////////////////////////////////////////////////////////////"," /**"," * Always return null."," *"," * @method _setMax"," * @protected"," */"," _setMax: function(value) {"," return null;"," },",""," /**"," * Gets size."," *"," * @method _getSize"," * @protected"," */"," _getSize: function() {"," var count = 0,"," i=0,"," l=localStorage.length;"," for(; i<l; ++i) {"," // Match sandbox id"," if(localStorage.key(i).indexOf(this.get(\"sandbox\")) === 0) {"," count++;"," }"," }"," return count;"," },",""," /**"," * Gets all entries."," *"," * @method _getEntries"," * @protected"," */"," _getEntries: function() {"," var entries = [],"," i=0,"," l=localStorage.length,"," sandbox = this.get(\"sandbox\");"," for(; i<l; ++i) {"," // Match sandbox id"," if(localStorage.key(i).indexOf(sandbox) === 0) {"," entries[i] = JSON.parse(localStorage.key(i).substring(sandbox.length));"," }"," }"," return entries;"," },",""," /**"," * Adds entry to cache."," *"," * @method _defAddFn"," * @param e {Event.Facade} Event Facade with the following properties:"," * <dl>"," * <dt>entry (Object)</dt> <dd>The cached entry.</dd>"," * </dl>"," * @protected"," */"," _defAddFn: function(e) {"," var entry = e.entry,"," request = entry.request,"," cached = entry.cached,"," expires = entry.expires;",""," // Convert Dates to msecs on the way into localStorage"," entry.cached = cached.getTime();"," entry.expires = expires ? expires.getTime() : expires;",""," try {"," localStorage.setItem(this.get(\"sandbox\")+JSON.stringify({\"request\":request}), JSON.stringify(entry));"," }"," catch(error) {"," this.fire(\"error\", {error:error});"," }"," },",""," /**"," * Flushes cache."," *"," * @method _defFlushFn"," * @param e {Event.Facade} Event Facade object."," * @protected"," */"," _defFlushFn: function(e) {"," var key,"," i=localStorage.length-1;"," for(; i>-1; --i) {"," // Match sandbox id"," key = localStorage.key(i);"," if(key.indexOf(this.get(\"sandbox\")) === 0) {"," localStorage.removeItem(key);"," }"," }"," },",""," /////////////////////////////////////////////////////////////////////////////"," //"," // CacheOffline public methods"," //"," /////////////////////////////////////////////////////////////////////////////"," /**"," * Adds a new entry to the cache of the format"," * {request:request, response:response, cached:cached, expires: expires}."," *"," * @method add"," * @param request {Object} Request value must be a String or JSON."," * @param response {Object} Response value must be a String or JSON."," */",""," /**"," * Retrieves cached object for given request, if available."," * Returns null if there is no cache match."," *"," * @method retrieve"," * @param request {Object} Request object."," * @return {Object} Cached object with the properties request, response,"," * and expires, or null."," */"," retrieve: function(request) {"," this.fire(\"request\", {request: request});",""," var entry, expires, sandboxedrequest;",""," try {"," sandboxedrequest = this.get(\"sandbox\")+JSON.stringify({\"request\":request});"," try {"," entry = JSON.parse(localStorage.getItem(sandboxedrequest));"," }"," catch(e) {"," }"," }"," catch(e2) {"," }",""," if(entry) {"," // Convert msecs to Dates on the way out of localStorage"," entry.cached = new Date(entry.cached);"," expires = entry.expires;"," expires = !expires ? null : new Date(expires);"," entry.expires = expires;",""," if(this._isMatch(request, entry)) {"," this.fire(\"retrieve\", {entry: entry});"," return entry;"," }"," }"," return null;"," }","} :","/////////////////////////////////////////////////////////////////////////////","//","// Offline is not supported","//","/////////////////////////////////////////////////////////////////////////////","{"," /**"," * Always return null."," *"," * @method _setMax"," * @protected"," */"," _setMax: function(value) {"," return null;"," }","});","","","Y.CacheOffline = CacheOffline;","","","}, '@VERSION@' ,{requires:['cache-base', 'json']});"];
-_yuitest_coverage["/build/cache-offline/cache-offline.js"].lines = {"1":0,"16":0,"17":0,"20":0,"24":0,"25":0,"50":0,"116":0,"130":0,"131":0,"132":0,"133":0,"137":0,"138":0,"139":0,"140":0,"150":0,"169":0,"179":0,"182":0,"184":0,"185":0,"188":0,"198":0,"202":0,"204":0,"205":0,"208":0,"222":0,"228":0,"229":0,"231":0,"232":0,"235":0,"247":0,"249":0,"251":0,"252":0,"253":0,"282":0,"284":0,"286":0,"287":0,"288":0,"289":0,"297":0,"299":0,"300":0,"301":0,"302":0,"304":0,"305":0,"306":0,"309":0,"325":0,"330":0};
-_yuitest_coverage["/build/cache-offline/cache-offline.js"].functions = {"CacheOffline:16":0,"setter:115":0,"flushAll:129":0,"_setMax:168":0,"_getSize:178":0,"_getEntries:197":0,"_defAddFn:221":0,"_defFlushFn:246":0,"retrieve:281":0,"_setMax:324":0,"(anonymous 1):1":0};
-_yuitest_coverage["/build/cache-offline/cache-offline.js"].coveredLines = 56;
-_yuitest_coverage["/build/cache-offline/cache-offline.js"].coveredFunctions = 11;
-_yuitest_coverline("/build/cache-offline/cache-offline.js", 1);
-YUI.add('cache-offline', function(Y) {
+_yuitest_coverage["build/cache-offline/cache-offline.js"].code=["YUI.add('cache-offline', function (Y, NAME) {","","/**"," * Provides a Cache subclass which uses HTML5 `localStorage` for persistence."," * "," * @module cache"," * @submodule cache-offline"," */","","/**"," * Extends Cache utility with offline functionality."," * @class CacheOffline"," * @extends Cache"," * @constructor"," */","function CacheOffline() {"," CacheOffline.superclass.constructor.apply(this, arguments);","}","","var localStorage = null,"," JSON = Y.JSON;","","// Bug 2529572","try {"," localStorage = Y.config.win.localStorage;","}","catch(e) {","}","","/////////////////////////////////////////////////////////////////////////////","//","// CacheOffline events","//","/////////////////////////////////////////////////////////////////////////////","","/**","* @event error","* @description Fired when an entry could not be added, most likely due to","* exceeded browser quota.","* <dl>","* <dt>error (Object)</dt> <dd>The error object.</dd>","* </dl>","*/","","/////////////////////////////////////////////////////////////////////////////","//","// CacheOffline static","//","/////////////////////////////////////////////////////////////////////////////","Y.mix(CacheOffline, {"," /**"," * Class name."," *"," * @property NAME"," * @type String"," * @static"," * @final"," * @value \"cacheOffline\""," */"," NAME: \"cacheOffline\",",""," ATTRS: {"," /////////////////////////////////////////////////////////////////////////////"," //"," // CacheOffline Attributes"," //"," /////////////////////////////////////////////////////////////////////////////",""," /**"," * @attribute sandbox"," * @description A string that must be passed in via the constructor."," * This identifier is used to sandbox one cache instance's entries"," * from another. Calling the cache instance's flush and length methods"," * or get(\"entries\") will apply to only these sandboxed entries."," * @type String"," * @default \"default\""," * @initOnly"," */"," sandbox: {"," value: \"default\","," writeOnce: \"initOnly\""," },",""," /**"," * @attribute expires"," * @description Absolute Date when data expires or"," * relative number of milliseconds. Zero disables expiration."," * @type Date | Number"," * @default 86400000 (one day)"," */"," expires: {"," value: 86400000"," },",""," /**"," * @attribute max"," * @description Disabled."," * @readOnly"," * @default null"," */"," max: {"," value: null,"," readOnly: true"," },",""," /**"," * @attribute uniqueKeys"," * @description Always true for CacheOffline."," * @readOnly"," * @default true"," */"," uniqueKeys: {"," value: true,"," readOnly: true,"," setter: function() {"," return true;"," }"," }"," },",""," /**"," * Removes all items from all sandboxes. Useful if localStorage has"," * exceeded quota. Only supported on browsers that implement HTML 5"," * localStorage."," *"," * @method flushAll"," * @static"," */"," flushAll: function() {"," var store = localStorage, key;"," if(store) {"," if(store.clear) {"," store.clear();"," }"," // FF2.x and FF3.0.x"," else {"," for (key in store) {"," if (store.hasOwnProperty(key)) {"," store.removeItem(key);"," delete store[key];"," }"," }"," }"," }"," else {"," }"," }","});","","Y.extend(CacheOffline, Y.Cache, localStorage ? {","/////////////////////////////////////////////////////////////////////////////","//","// Offline is supported","//","/////////////////////////////////////////////////////////////////////////////",""," /////////////////////////////////////////////////////////////////////////////"," //"," // CacheOffline protected methods"," //"," /////////////////////////////////////////////////////////////////////////////"," /**"," * Always return null."," *"," * @method _setMax"," * @protected"," */"," _setMax: function(value) {"," return null;"," },",""," /**"," * Gets size."," *"," * @method _getSize"," * @protected"," */"," _getSize: function() {"," var count = 0,"," i=0,"," l=localStorage.length;"," for(; i<l; ++i) {"," // Match sandbox id"," if(localStorage.key(i).indexOf(this.get(\"sandbox\")) === 0) {"," count++;"," }"," }"," return count;"," },",""," /**"," * Gets all entries."," *"," * @method _getEntries"," * @protected"," */"," _getEntries: function() {"," var entries = [],"," i=0,"," l=localStorage.length,"," sandbox = this.get(\"sandbox\");"," for(; i<l; ++i) {"," // Match sandbox id"," if(localStorage.key(i).indexOf(sandbox) === 0) {"," entries[i] = JSON.parse(localStorage.key(i).substring(sandbox.length));"," }"," }"," return entries;"," },",""," /**"," * Adds entry to cache."," *"," * @method _defAddFn"," * @param e {Event.Facade} Event Facade with the following properties:"," * <dl>"," * <dt>entry (Object)</dt> <dd>The cached entry.</dd>"," * </dl>"," * @protected"," */"," _defAddFn: function(e) {"," var entry = e.entry,"," request = entry.request,"," cached = entry.cached,"," expires = entry.expires;",""," // Convert Dates to msecs on the way into localStorage"," entry.cached = cached.getTime();"," entry.expires = expires ? expires.getTime() : expires;",""," try {"," localStorage.setItem(this.get(\"sandbox\")+JSON.stringify({\"request\":request}), JSON.stringify(entry));"," }"," catch(error) {"," this.fire(\"error\", {error:error});"," }"," },",""," /**"," * Flushes cache."," *"," * @method _defFlushFn"," * @param e {Event.Facade} Event Facade object."," * @protected"," */"," _defFlushFn: function(e) {"," var key,"," i=localStorage.length-1;"," for(; i>-1; --i) {"," // Match sandbox id"," key = localStorage.key(i);"," if(key.indexOf(this.get(\"sandbox\")) === 0) {"," localStorage.removeItem(key);"," }"," }"," },",""," /////////////////////////////////////////////////////////////////////////////"," //"," // CacheOffline public methods"," //"," /////////////////////////////////////////////////////////////////////////////"," /**"," * Adds a new entry to the cache of the format"," * {request:request, response:response, cached:cached, expires: expires}."," *"," * @method add"," * @param request {Object} Request value must be a String or JSON."," * @param response {Object} Response value must be a String or JSON."," */",""," /**"," * Retrieves cached object for given request, if available."," * Returns null if there is no cache match."," *"," * @method retrieve"," * @param request {Object} Request object."," * @return {Object} Cached object with the properties request, response,"," * and expires, or null."," */"," retrieve: function(request) {"," this.fire(\"request\", {request: request});",""," var entry, expires, sandboxedrequest;",""," try {"," sandboxedrequest = this.get(\"sandbox\")+JSON.stringify({\"request\":request});"," try {"," entry = JSON.parse(localStorage.getItem(sandboxedrequest));"," }"," catch(e) {"," }"," }"," catch(e2) {"," }",""," if(entry) {"," // Convert msecs to Dates on the way out of localStorage"," entry.cached = new Date(entry.cached);"," expires = entry.expires;"," expires = !expires ? null : new Date(expires);"," entry.expires = expires;",""," if(this._isMatch(request, entry)) {"," this.fire(\"retrieve\", {entry: entry});"," return entry;"," }"," }"," return null;"," }","} :","/////////////////////////////////////////////////////////////////////////////","//","// Offline is not supported","//","/////////////////////////////////////////////////////////////////////////////","{"," /**"," * Always return null."," *"," * @method _setMax"," * @protected"," */"," _setMax: function(value) {"," return null;"," }","});","","","Y.CacheOffline = CacheOffline;","","","}, '@VERSION@', {\"requires\": [\"cache-base\", \"json\"]});"];
+_yuitest_coverage["build/cache-offline/cache-offline.js"].lines = {"1":0,"16":0,"17":0,"20":0,"24":0,"25":0,"50":0,"116":0,"130":0,"131":0,"132":0,"133":0,"137":0,"138":0,"139":0,"140":0,"150":0,"169":0,"179":0,"182":0,"184":0,"185":0,"188":0,"198":0,"202":0,"204":0,"205":0,"208":0,"222":0,"228":0,"229":0,"231":0,"232":0,"235":0,"247":0,"249":0,"251":0,"252":0,"253":0,"282":0,"284":0,"286":0,"287":0,"288":0,"289":0,"297":0,"299":0,"300":0,"301":0,"302":0,"304":0,"305":0,"306":0,"309":0,"325":0,"330":0};
+_yuitest_coverage["build/cache-offline/cache-offline.js"].functions = {"CacheOffline:16":0,"setter:115":0,"flushAll:129":0,"_setMax:168":0,"_getSize:178":0,"_getEntries:197":0,"_defAddFn:221":0,"_defFlushFn:246":0,"retrieve:281":0,"_setMax:324":0,"(anonymous 1):1":0};
+_yuitest_coverage["build/cache-offline/cache-offline.js"].coveredLines = 56;
+_yuitest_coverage["build/cache-offline/cache-offline.js"].coveredFunctions = 11;
+_yuitest_coverline("build/cache-offline/cache-offline.js", 1);
+YUI.add('cache-offline', function (Y, NAME) {
/**
* Provides a Cache subclass which uses HTML5 `localStorage` for persistence.
@@ -47,22 +47,22 @@ YUI.add('cache-offline', function(Y) {
* @extends Cache
* @constructor
*/
-_yuitest_coverfunc("/build/cache-offline/cache-offline.js", "(anonymous 1)", 1);
-_yuitest_coverline("/build/cache-offline/cache-offline.js", 16);
+_yuitest_coverfunc("build/cache-offline/cache-offline.js", "(anonymous 1)", 1);
+_yuitest_coverline("build/cache-offline/cache-offline.js", 16);
function CacheOffline() {
- _yuitest_coverfunc("/build/cache-offline/cache-offline.js", "CacheOffline", 16);
-_yuitest_coverline("/build/cache-offline/cache-offline.js", 17);
+ _yuitest_coverfunc("build/cache-offline/cache-offline.js", "CacheOffline", 16);
+_yuitest_coverline("build/cache-offline/cache-offline.js", 17);
CacheOffline.superclass.constructor.apply(this, arguments);
}
-_yuitest_coverline("/build/cache-offline/cache-offline.js", 20);
+_yuitest_coverline("build/cache-offline/cache-offline.js", 20);
var localStorage = null,
JSON = Y.JSON;
// Bug 2529572
-_yuitest_coverline("/build/cache-offline/cache-offline.js", 24);
+_yuitest_coverline("build/cache-offline/cache-offline.js", 24);
try {
- _yuitest_coverline("/build/cache-offline/cache-offline.js", 25);
+ _yuitest_coverline("build/cache-offline/cache-offline.js", 25);
localStorage = Y.config.win.localStorage;
}
catch(e) {
@@ -88,7 +88,7 @@ catch(e) {
// CacheOffline static
//
/////////////////////////////////////////////////////////////////////////////
-_yuitest_coverline("/build/cache-offline/cache-offline.js", 50);
+_yuitest_coverline("build/cache-offline/cache-offline.js", 50);
Y.mix(CacheOffline, {
/**
* Class name.
@@ -155,8 +155,8 @@ Y.mix(CacheOffline, {
value: true,
readOnly: true,
setter: function() {
- _yuitest_coverfunc("/build/cache-offline/cache-offline.js", "setter", 115);
-_yuitest_coverline("/build/cache-offline/cache-offline.js", 116);
+ _yuitest_coverfunc("build/cache-offline/cache-offline.js", "setter", 115);
+_yuitest_coverline("build/cache-offline/cache-offline.js", 116);
return true;
}
}
@@ -171,25 +171,25 @@ return true;
* @static
*/
flushAll: function() {
- _yuitest_coverfunc("/build/cache-offline/cache-offline.js", "flushAll", 129);
-_yuitest_coverline("/build/cache-offline/cache-offline.js", 130);
+ _yuitest_coverfunc("build/cache-offline/cache-offline.js", "flushAll", 129);
+_yuitest_coverline("build/cache-offline/cache-offline.js", 130);
var store = localStorage, key;
- _yuitest_coverline("/build/cache-offline/cache-offline.js", 131);
+ _yuitest_coverline("build/cache-offline/cache-offline.js", 131);
if(store) {
- _yuitest_coverline("/build/cache-offline/cache-offline.js", 132);
+ _yuitest_coverline("build/cache-offline/cache-offline.js", 132);
if(store.clear) {
- _yuitest_coverline("/build/cache-offline/cache-offline.js", 133);
+ _yuitest_coverline("build/cache-offline/cache-offline.js", 133);
store.clear();
}
// FF2.x and FF3.0.x
else {
- _yuitest_coverline("/build/cache-offline/cache-offline.js", 137);
+ _yuitest_coverline("build/cache-offline/cache-offline.js", 137);
for (key in store) {
- _yuitest_coverline("/build/cache-offline/cache-offline.js", 138);
+ _yuitest_coverline("build/cache-offline/cache-offline.js", 138);
if (store.hasOwnProperty(key)) {
- _yuitest_coverline("/build/cache-offline/cache-offline.js", 139);
+ _yuitest_coverline("build/cache-offline/cache-offline.js", 139);
store.removeItem(key);
- _yuitest_coverline("/build/cache-offline/cache-offline.js", 140);
+ _yuitest_coverline("build/cache-offline/cache-offline.js", 140);
delete store[key];
}
}
@@ -200,7 +200,7 @@ delete store[key];
}
});
-_yuitest_coverline("/build/cache-offline/cache-offline.js", 150);
+_yuitest_coverline("build/cache-offline/cache-offline.js", 150);
Y.extend(CacheOffline, Y.Cache, localStorage ? {
/////////////////////////////////////////////////////////////////////////////
//
@@ -220,8 +220,8 @@ Y.extend(CacheOffline, Y.Cache, localStorage ? {
* @protected
*/
_setMax: function(value) {
- _yuitest_coverfunc("/build/cache-offline/cache-offline.js", "_setMax", 168);
-_yuitest_coverline("/build/cache-offline/cache-offline.js", 169);
+ _yuitest_coverfunc("build/cache-offline/cache-offline.js", "_setMax", 168);
+_yuitest_coverline("build/cache-offline/cache-offline.js", 169);
return null;
},
@@ -232,21 +232,21 @@ return null;
* @protected
*/
_getSize: function() {
- _yuitest_coverfunc("/build/cache-offline/cache-offline.js", "_getSize", 178);
-_yuitest_coverline("/build/cache-offline/cache-offline.js", 179);
+ _yuitest_coverfunc("build/cache-offline/cache-offline.js", "_getSize", 178);
+_yuitest_coverline("build/cache-offline/cache-offline.js", 179);
var count = 0,
i=0,
l=localStorage.length;
- _yuitest_coverline("/build/cache-offline/cache-offline.js", 182);
+ _yuitest_coverline("build/cache-offline/cache-offline.js", 182);
for(; i<l; ++i) {
// Match sandbox id
- _yuitest_coverline("/build/cache-offline/cache-offline.js", 184);
+ _yuitest_coverline("build/cache-offline/cache-offline.js", 184);
if(localStorage.key(i).indexOf(this.get("sandbox")) === 0) {
- _yuitest_coverline("/build/cache-offline/cache-offline.js", 185);
+ _yuitest_coverline("build/cache-offline/cache-offline.js", 185);
count++;
}
}
- _yuitest_coverline("/build/cache-offline/cache-offline.js", 188);
+ _yuitest_coverline("build/cache-offline/cache-offline.js", 188);
return count;
},
@@ -257,22 +257,22 @@ return count;
* @protected
*/
_getEntries: function() {
- _yuitest_coverfunc("/build/cache-offline/cache-offline.js", "_getEntries", 197);
-_yuitest_coverline("/build/cache-offline/cache-offline.js", 198);
+ _yuitest_coverfunc("build/cache-offline/cache-offline.js", "_getEntries", 197);
+_yuitest_coverline("build/cache-offline/cache-offline.js", 198);
var entries = [],
i=0,
l=localStorage.length,
sandbox = this.get("sandbox");
- _yuitest_coverline("/build/cache-offline/cache-offline.js", 202);
+ _yuitest_coverline("build/cache-offline/cache-offline.js", 202);
for(; i<l; ++i) {
// Match sandbox id
- _yuitest_coverline("/build/cache-offline/cache-offline.js", 204);
+ _yuitest_coverline("build/cache-offline/cache-offline.js", 204);
if(localStorage.key(i).indexOf(sandbox) === 0) {
- _yuitest_coverline("/build/cache-offline/cache-offline.js", 205);
+ _yuitest_coverline("build/cache-offline/cache-offline.js", 205);
entries[i] = JSON.parse(localStorage.key(i).substring(sandbox.length));
}
}
- _yuitest_coverline("/build/cache-offline/cache-offline.js", 208);
+ _yuitest_coverline("build/cache-offline/cache-offline.js", 208);
return entries;
},