NOBUG: Fixed file access permissions
[moodle.git] / lib / yuilib / 3.13.0 / button-plugin / button-plugin-coverage.js
blob9c50978e2d1fd46113b0e6862bd4d1c9dbdde247
1 /*
2 YUI 3.13.0 (build 508226d)
3 Copyright 2013 Yahoo! Inc. All rights reserved.
4 Licensed under the BSD License.
5 http://yuilibrary.com/license/
6 */
8 if (typeof __coverage__ === 'undefined') { __coverage__ = {}; }
9 if (!__coverage__['build/button-plugin/button-plugin.js']) {
10    __coverage__['build/button-plugin/button-plugin.js'] = {"path":"build/button-plugin/button-plugin.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0},"b":{"1":[0,0,0],"2":[0,0],"3":[0,0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0,0],"9":[0,0],"10":[0,0],"11":[0,0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":25},"end":{"line":1,"column":44}}},"2":{"name":"ButtonPlugin","line":17,"loc":{"start":{"line":17,"column":0},"end":{"line":17,"column":24}}},"3":{"name":"(anonymous_3)","line":28,"loc":{"start":{"line":28,"column":19},"end":{"line":28,"column":35}}},"4":{"name":"(anonymous_4)","line":44,"loc":{"start":{"line":44,"column":19},"end":{"line":44,"column":40}}},"5":{"name":"(anonymous_5)","line":58,"loc":{"start":{"line":58,"column":15},"end":{"line":58,"column":32}}},"6":{"name":"(anonymous_6)","line":70,"loc":{"start":{"line":70,"column":13},"end":{"line":70,"column":23}}},"7":{"name":"(anonymous_7)","line":114,"loc":{"start":{"line":114,"column":26},"end":{"line":114,"column":49}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":134,"column":76}},"2":{"start":{"line":17,"column":0},"end":{"line":19,"column":1}},"3":{"start":{"line":18,"column":4},"end":{"line":18,"column":63}},"4":{"start":{"line":21,"column":0},"end":{"line":104,"column":3}},"5":{"start":{"line":30,"column":8},"end":{"line":31,"column":79}},"6":{"start":{"line":33,"column":8},"end":{"line":35,"column":9}},"7":{"start":{"line":34,"column":12},"end":{"line":34,"column":70}},"8":{"start":{"line":45,"column":8},"end":{"line":46,"column":79}},"9":{"start":{"line":48,"column":8},"end":{"line":50,"column":9}},"10":{"start":{"line":49,"column":12},"end":{"line":49,"column":31}},"11":{"start":{"line":59,"column":8},"end":{"line":59,"column":31}},"12":{"start":{"line":60,"column":8},"end":{"line":60,"column":26}},"13":{"start":{"line":62,"column":8},"end":{"line":62,"column":58}},"14":{"start":{"line":63,"column":8},"end":{"line":63,"column":58}},"15":{"start":{"line":114,"column":0},"end":{"line":129,"column":2}},"16":{"start":{"line":115,"column":4},"end":{"line":115,"column":17}},"17":{"start":{"line":117,"column":4},"end":{"line":122,"column":5}},"18":{"start":{"line":118,"column":8},"end":{"line":121,"column":9}},"19":{"start":{"line":119,"column":12},"end":{"line":119,"column":26}},"20":{"start":{"line":120,"column":12},"end":{"line":120,"column":34}},"21":{"start":{"line":124,"column":4},"end":{"line":124,"column":28}},"22":{"start":{"line":125,"column":4},"end":{"line":125,"column":69}},"23":{"start":{"line":126,"column":4},"end":{"line":126,"column":64}},"24":{"start":{"line":128,"column":4},"end":{"line":128,"column":53}},"25":{"start":{"line":131,"column":0},"end":{"line":131,"column":44}}},"branchMap":{"1":{"line":31,"type":"binary-expr","locations":[{"start":{"line":31,"column":17},"end":{"line":31,"column":28}},{"start":{"line":31,"column":32},"end":{"line":31,"column":50}},{"start":{"line":31,"column":54},"end":{"line":31,"column":78}}]},"2":{"line":33,"type":"if","locations":[{"start":{"line":33,"column":8},"end":{"line":33,"column":8}},{"start":{"line":33,"column":8},"end":{"line":33,"column":8}}]},"3":{"line":46,"type":"binary-expr","locations":[{"start":{"line":46,"column":17},"end":{"line":46,"column":28}},{"start":{"line":46,"column":32},"end":{"line":46,"column":50}},{"start":{"line":46,"column":54},"end":{"line":46,"column":78}}]},"4":{"line":48,"type":"if","locations":[{"start":{"line":48,"column":8},"end":{"line":48,"column":8}},{"start":{"line":48,"column":8},"end":{"line":48,"column":8}}]},"5":{"line":117,"type":"if","locations":[{"start":{"line":117,"column":4},"end":{"line":117,"column":4}},{"start":{"line":117,"column":4},"end":{"line":117,"column":4}}]},"6":{"line":117,"type":"binary-expr","locations":[{"start":{"line":117,"column":8},"end":{"line":117,"column":12}},{"start":{"line":117,"column":16},"end":{"line":117,"column":23}}]},"7":{"line":118,"type":"if","locations":[{"start":{"line":118,"column":8},"end":{"line":118,"column":8}},{"start":{"line":118,"column":8},"end":{"line":118,"column":8}}]},"8":{"line":118,"type":"binary-expr","locations":[{"start":{"line":118,"column":15},"end":{"line":118,"column":28}},{"start":{"line":118,"column":32},"end":{"line":118,"column":47}},{"start":{"line":118,"column":51},"end":{"line":118,"column":75}}]},"9":{"line":124,"type":"binary-expr","locations":[{"start":{"line":124,"column":15},"end":{"line":124,"column":21}},{"start":{"line":124,"column":25},"end":{"line":124,"column":27}}]},"10":{"line":125,"type":"binary-expr","locations":[{"start":{"line":125,"column":15},"end":{"line":125,"column":30}},{"start":{"line":125,"column":34},"end":{"line":125,"column":68}}]},"11":{"line":126,"type":"binary-expr","locations":[{"start":{"line":126,"column":15},"end":{"line":126,"column":19}},{"start":{"line":126,"column":23},"end":{"line":126,"column":37}},{"start":{"line":126,"column":41},"end":{"line":126,"column":63}}]}},"code":["(function () { YUI.add('button-plugin', function (Y, NAME) {","","/**","* A Button Plugin","*","* @module button-plugin","* @since 3.5.0","*/","","/**","* @class Button","* @param config {Object} Configuration object","* @extends ButtonCore","* @constructor","* @namespace Plugin","*/","function ButtonPlugin() {","    ButtonPlugin.superclass.constructor.apply(this, arguments);","}","","Y.extend(ButtonPlugin, Y.ButtonCore, {","","    /**","    * @method _afterNodeGet","    * @param name {string}","    * @private","    */","    _afterNodeGet: function (name) {","        // TODO: point to method (_uiSetLabel, etc) instead of getter/setter","        var ATTRS = this.constructor.ATTRS,","            fn = ATTRS[name] && ATTRS[name].getter && this[ATTRS[name].getter];","","        if (fn) {","            return new Y.Do.AlterReturn('get ' + name, fn.call(this));","        }","    },","","    /**","    * @method _afterNodeSet","    * @param name {String}","    * @param val {String}","    * @private","    */","    _afterNodeSet: function (name, val) {","        var ATTRS = this.constructor.ATTRS,","            fn = ATTRS[name] && ATTRS[name].setter && this[ATTRS[name].setter];","","        if (fn) {","            fn.call(this, val);","        }","    },","","    /**","    * @method _initNode","    * @param config {Object}","    * @private","    */","    _initNode: function(config) {","        var node = config.host;","        this._host = node;","","        Y.Do.after(this._afterNodeGet, node, 'get', this);","        Y.Do.after(this._afterNodeSet, node, 'set', this);","    },","","    /**","    * @method destroy","    * @private","    */","    destroy: function(){","        // Nothing to do, but things are happier with it here","    }","","}, {","","    /**","    * Attribute configuration.","    *","    * @property ATTRS","    * @type {Object}","    * @private","    * @static","    */","    ATTRS: Y.merge(Y.ButtonCore.ATTRS),","","    /**","    * Name of this component.","    *","    * @property NAME","    * @type String","    * @static","    */","    NAME: 'buttonPlugin',","","    /**","    * Namespace of this component.","    *","    * @property NS","    * @type String","    * @static","    */","    NS: 'button'","","});","","/**","* @method createNode","* @description A factory that plugs a Y.Node instance with Y.Plugin.Button","* @param node {Object}","* @param config {Object}","* @return {Object} A plugged Y.Node instance","* @public","*/","ButtonPlugin.createNode = function(node, config) {","    var template;","","    if (node && !config) {","        if (! (node.nodeType || node.getDOMNode || typeof node === 'string')) {","            config = node;","            node = config.srcNode;","        }","    }","","    config   = config || {};","    template = config.template || Y.Plugin.Button.prototype.TEMPLATE;","    node     = node || config.srcNode || Y.DOM.create(template);","","    return Y.one(node).plug(Y.Plugin.Button, config);","};","","Y.namespace('Plugin').Button = ButtonPlugin;","","","}, '3.13.0', {\"requires\": [\"button-core\", \"cssbutton\", \"node-pluginhost\"]});","","}());"]};
12 var __cov_zzHX0fM2oMcurCWfA9Tc7w = __coverage__['build/button-plugin/button-plugin.js'];
13 __cov_zzHX0fM2oMcurCWfA9Tc7w.s['1']++;YUI.add('button-plugin',function(Y,NAME){__cov_zzHX0fM2oMcurCWfA9Tc7w.f['1']++;__cov_zzHX0fM2oMcurCWfA9Tc7w.s['2']++;function ButtonPlugin(){__cov_zzHX0fM2oMcurCWfA9Tc7w.f['2']++;__cov_zzHX0fM2oMcurCWfA9Tc7w.s['3']++;ButtonPlugin.superclass.constructor.apply(this,arguments);}__cov_zzHX0fM2oMcurCWfA9Tc7w.s['4']++;Y.extend(ButtonPlugin,Y.ButtonCore,{_afterNodeGet:function(name){__cov_zzHX0fM2oMcurCWfA9Tc7w.f['3']++;__cov_zzHX0fM2oMcurCWfA9Tc7w.s['5']++;var ATTRS=this.constructor.ATTRS,fn=(__cov_zzHX0fM2oMcurCWfA9Tc7w.b['1'][0]++,ATTRS[name])&&(__cov_zzHX0fM2oMcurCWfA9Tc7w.b['1'][1]++,ATTRS[name].getter)&&(__cov_zzHX0fM2oMcurCWfA9Tc7w.b['1'][2]++,this[ATTRS[name].getter]);__cov_zzHX0fM2oMcurCWfA9Tc7w.s['6']++;if(fn){__cov_zzHX0fM2oMcurCWfA9Tc7w.b['2'][0]++;__cov_zzHX0fM2oMcurCWfA9Tc7w.s['7']++;return new Y.Do.AlterReturn('get '+name,fn.call(this));}else{__cov_zzHX0fM2oMcurCWfA9Tc7w.b['2'][1]++;}},_afterNodeSet:function(name,val){__cov_zzHX0fM2oMcurCWfA9Tc7w.f['4']++;__cov_zzHX0fM2oMcurCWfA9Tc7w.s['8']++;var ATTRS=this.constructor.ATTRS,fn=(__cov_zzHX0fM2oMcurCWfA9Tc7w.b['3'][0]++,ATTRS[name])&&(__cov_zzHX0fM2oMcurCWfA9Tc7w.b['3'][1]++,ATTRS[name].setter)&&(__cov_zzHX0fM2oMcurCWfA9Tc7w.b['3'][2]++,this[ATTRS[name].setter]);__cov_zzHX0fM2oMcurCWfA9Tc7w.s['9']++;if(fn){__cov_zzHX0fM2oMcurCWfA9Tc7w.b['4'][0]++;__cov_zzHX0fM2oMcurCWfA9Tc7w.s['10']++;fn.call(this,val);}else{__cov_zzHX0fM2oMcurCWfA9Tc7w.b['4'][1]++;}},_initNode:function(config){__cov_zzHX0fM2oMcurCWfA9Tc7w.f['5']++;__cov_zzHX0fM2oMcurCWfA9Tc7w.s['11']++;var node=config.host;__cov_zzHX0fM2oMcurCWfA9Tc7w.s['12']++;this._host=node;__cov_zzHX0fM2oMcurCWfA9Tc7w.s['13']++;Y.Do.after(this._afterNodeGet,node,'get',this);__cov_zzHX0fM2oMcurCWfA9Tc7w.s['14']++;Y.Do.after(this._afterNodeSet,node,'set',this);},destroy:function(){__cov_zzHX0fM2oMcurCWfA9Tc7w.f['6']++;}},{ATTRS:Y.merge(Y.ButtonCore.ATTRS),NAME:'buttonPlugin',NS:'button'});__cov_zzHX0fM2oMcurCWfA9Tc7w.s['15']++;ButtonPlugin.createNode=function(node,config){__cov_zzHX0fM2oMcurCWfA9Tc7w.f['7']++;__cov_zzHX0fM2oMcurCWfA9Tc7w.s['16']++;var template;__cov_zzHX0fM2oMcurCWfA9Tc7w.s['17']++;if((__cov_zzHX0fM2oMcurCWfA9Tc7w.b['6'][0]++,node)&&(__cov_zzHX0fM2oMcurCWfA9Tc7w.b['6'][1]++,!config)){__cov_zzHX0fM2oMcurCWfA9Tc7w.b['5'][0]++;__cov_zzHX0fM2oMcurCWfA9Tc7w.s['18']++;if(!((__cov_zzHX0fM2oMcurCWfA9Tc7w.b['8'][0]++,node.nodeType)||(__cov_zzHX0fM2oMcurCWfA9Tc7w.b['8'][1]++,node.getDOMNode)||(__cov_zzHX0fM2oMcurCWfA9Tc7w.b['8'][2]++,typeof node==='string'))){__cov_zzHX0fM2oMcurCWfA9Tc7w.b['7'][0]++;__cov_zzHX0fM2oMcurCWfA9Tc7w.s['19']++;config=node;__cov_zzHX0fM2oMcurCWfA9Tc7w.s['20']++;node=config.srcNode;}else{__cov_zzHX0fM2oMcurCWfA9Tc7w.b['7'][1]++;}}else{__cov_zzHX0fM2oMcurCWfA9Tc7w.b['5'][1]++;}__cov_zzHX0fM2oMcurCWfA9Tc7w.s['21']++;config=(__cov_zzHX0fM2oMcurCWfA9Tc7w.b['9'][0]++,config)||(__cov_zzHX0fM2oMcurCWfA9Tc7w.b['9'][1]++,{});__cov_zzHX0fM2oMcurCWfA9Tc7w.s['22']++;template=(__cov_zzHX0fM2oMcurCWfA9Tc7w.b['10'][0]++,config.template)||(__cov_zzHX0fM2oMcurCWfA9Tc7w.b['10'][1]++,Y.Plugin.Button.prototype.TEMPLATE);__cov_zzHX0fM2oMcurCWfA9Tc7w.s['23']++;node=(__cov_zzHX0fM2oMcurCWfA9Tc7w.b['11'][0]++,node)||(__cov_zzHX0fM2oMcurCWfA9Tc7w.b['11'][1]++,config.srcNode)||(__cov_zzHX0fM2oMcurCWfA9Tc7w.b['11'][2]++,Y.DOM.create(template));__cov_zzHX0fM2oMcurCWfA9Tc7w.s['24']++;return Y.one(node).plug(Y.Plugin.Button,config);};__cov_zzHX0fM2oMcurCWfA9Tc7w.s['25']++;Y.namespace('Plugin').Button=ButtonPlugin;},'3.13.0',{'requires':['button-core','cssbutton','node-pluginhost']});