NOBUG: Fixed file access permissions
[moodle.git] / lib / yuilib / 3.13.0 / dd-ddm / dd-ddm-coverage.js
blob0af23ab29cf1ecb2d839fcf329bf020c46ce699f
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/dd-ddm/dd-ddm.js']) {
10    __coverage__['build/dd-ddm/dd-ddm.js'] = {"path":"build/dd-ddm/dd-ddm.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,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":18},"end":{"line":1,"column":37}}},"2":{"name":"(anonymous_2)","line":28,"loc":{"start":{"line":28,"column":26},"end":{"line":28,"column":37}}},"3":{"name":"(anonymous_3)","line":29,"loc":{"start":{"line":29,"column":28},"end":{"line":29,"column":39}}},"4":{"name":"(anonymous_4)","line":30,"loc":{"start":{"line":30,"column":20},"end":{"line":30,"column":31}}},"5":{"name":"(anonymous_5)","line":37,"loc":{"start":{"line":37,"column":18},"end":{"line":37,"column":29}}},"6":{"name":"(anonymous_6)","line":46,"loc":{"start":{"line":46,"column":24},"end":{"line":46,"column":35}}},"7":{"name":"(anonymous_7)","line":54,"loc":{"start":{"line":54,"column":22},"end":{"line":54,"column":33}}},"8":{"name":"(anonymous_8)","line":80,"loc":{"start":{"line":80,"column":18},"end":{"line":80,"column":29}}},"9":{"name":"(anonymous_9)","line":96,"loc":{"start":{"line":96,"column":19},"end":{"line":96,"column":30}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":126,"column":60}},"2":{"start":{"line":13,"column":4},"end":{"line":121,"column":13}},"3":{"start":{"line":31,"column":12},"end":{"line":35,"column":13}},"4":{"start":{"line":32,"column":16},"end":{"line":32,"column":38}},"5":{"start":{"line":33,"column":16},"end":{"line":33,"column":36}},"6":{"start":{"line":34,"column":16},"end":{"line":34,"column":40}},"7":{"start":{"line":38,"column":12},"end":{"line":38,"column":34}},"8":{"start":{"line":39,"column":12},"end":{"line":39,"column":38}},"9":{"start":{"line":47,"column":12},"end":{"line":47,"column":49}},"10":{"start":{"line":55,"column":12},"end":{"line":57,"column":13}},"11":{"start":{"line":56,"column":16},"end":{"line":56,"column":33}},"12":{"start":{"line":58,"column":12},"end":{"line":58,"column":71}},"13":{"start":{"line":59,"column":12},"end":{"line":61,"column":13}},"14":{"start":{"line":60,"column":16},"end":{"line":60,"column":44}},"15":{"start":{"line":62,"column":12},"end":{"line":64,"column":13}},"16":{"start":{"line":63,"column":16},"end":{"line":63,"column":45}},"17":{"start":{"line":66,"column":12},"end":{"line":66,"column":28}},"18":{"start":{"line":67,"column":12},"end":{"line":73,"column":15}},"19":{"start":{"line":81,"column":12},"end":{"line":89,"column":13}},"20":{"start":{"line":82,"column":16},"end":{"line":84,"column":38}},"21":{"start":{"line":85,"column":16},"end":{"line":88,"column":19}},"22":{"start":{"line":97,"column":12},"end":{"line":98,"column":36}},"23":{"start":{"line":99,"column":12},"end":{"line":109,"column":15}},"24":{"start":{"line":110,"column":12},"end":{"line":110,"column":38}},"25":{"start":{"line":111,"column":12},"end":{"line":111,"column":55}},"26":{"start":{"line":112,"column":12},"end":{"line":112,"column":27}},"27":{"start":{"line":113,"column":12},"end":{"line":113,"column":26}},"28":{"start":{"line":114,"column":12},"end":{"line":114,"column":101}},"29":{"start":{"line":115,"column":12},"end":{"line":115,"column":60}},"30":{"start":{"line":117,"column":12},"end":{"line":117,"column":31}},"31":{"start":{"line":118,"column":12},"end":{"line":118,"column":63}},"32":{"start":{"line":119,"column":12},"end":{"line":119,"column":58}}},"branchMap":{"1":{"line":31,"type":"if","locations":[{"start":{"line":31,"column":12},"end":{"line":31,"column":12}},{"start":{"line":31,"column":12},"end":{"line":31,"column":12}}]},"2":{"line":31,"type":"binary-expr","locations":[{"start":{"line":31,"column":16},"end":{"line":31,"column":31}},{"start":{"line":31,"column":35},"end":{"line":31,"column":65}}]},"3":{"line":55,"type":"if","locations":[{"start":{"line":55,"column":12},"end":{"line":55,"column":12}},{"start":{"line":55,"column":12},"end":{"line":55,"column":12}}]},"4":{"line":59,"type":"if","locations":[{"start":{"line":59,"column":12},"end":{"line":59,"column":12}},{"start":{"line":59,"column":12},"end":{"line":59,"column":12}}]},"5":{"line":62,"type":"if","locations":[{"start":{"line":62,"column":12},"end":{"line":62,"column":12}},{"start":{"line":62,"column":12},"end":{"line":62,"column":12}}]},"6":{"line":71,"type":"cond-expr","locations":[{"start":{"line":71,"column":46},"end":{"line":71,"column":50}},{"start":{"line":71,"column":53},"end":{"line":71,"column":56}}]},"7":{"line":81,"type":"if","locations":[{"start":{"line":81,"column":12},"end":{"line":81,"column":12}},{"start":{"line":81,"column":12},"end":{"line":81,"column":12}}]}},"code":["(function () { YUI.add('dd-ddm', function (Y, NAME) {","","","    /**","     * Extends the dd-ddm-base Class to add support for the viewport shim to allow a draggable","     * anode to drag to be dragged over an iframe or any other node that traps mousemove events.","     * It is also required to have Drop Targets enabled, as the viewport shim will contain the shims for the Drop Targets.","     * @module dd","     * @submodule dd-ddm","     * @for DDM","     * @namespace DD","     */","    Y.mix(Y.DD.DDM, {","        /**","        * The shim placed over the screen to track the mousemove event.","        * @private","        * @property _pg","        * @type {Node}","        */","        _pg: null,","        /**","        * Set this to true to set the shims opacity to .5 for debugging it, default: false.","        * @private","        * @property _debugShim","        * @type {Boolean}","        */","        _debugShim: false,","        _activateTargets: function() { },","        _deactivateTargets: function() {},","        _startDrag: function() {","            if (this.activeDrag && this.activeDrag.get('useShim')) {","                this._shimming = true;","                this._pg_activate();","                this._activateTargets();","            }","        },","        _endDrag: function() {","            this._pg_deactivate();","            this._deactivateTargets();","        },","        /**","        * Deactivates the shim","        * @private","        * @method _pg_deactivate","        */","        _pg_deactivate: function() {","            this._pg.setStyle('display', 'none');","        },","        /**","        * Activates the shim","        * @private","        * @method _pg_activate","        */","        _pg_activate: function() {","            if (!this._pg) {","                this._createPG();","            }","            var ah = this.activeDrag.get('activeHandle'), cur = 'auto';","            if (ah) {","                cur = ah.getStyle('cursor');","            }","            if (cur === 'auto') {","                cur = this.get('dragCursor');","            }","","            this._pg_size();","            this._pg.setStyles({","                top: 0,","                left: 0,","                display: 'block',","                opacity: ((this._debugShim) ? '.5' : '0'),","                cursor: cur","            });","        },","        /**","        * Sizes the shim on: activatation, window:scroll, window:resize","        * @private","        * @method _pg_size","        */","        _pg_size: function() {","            if (this.activeDrag) {","                var b = Y.one('body'),","                h = b.get('docHeight'),","                w = b.get('docWidth');","                this._pg.setStyles({","                    height: h + 'px',","                    width: w + 'px'","                });","            }","        },","        /**","        * Creates the shim and adds it's listeners to it.","        * @private","        * @method _createPG","        */","        _createPG: function() {","            var pg = Y.Node.create('<div></div>'),","            bd = Y.one('body'), win;","            pg.setStyles({","                top: '0',","                left: '0',","                position: 'absolute',","                zIndex: '9999',","                overflow: 'hidden',","                backgroundColor: 'red',","                display: 'none',","                height: '5px',","                width: '5px'","            });","            pg.set('id', Y.stamp(pg));","            pg.addClass(Y.DD.DDM.CSS_PREFIX + '-shim');","            bd.prepend(pg);","            this._pg = pg;","            this._pg.on('mousemove', Y.throttle(Y.bind(this._move, this), this.get('throttleTime')));","            this._pg.on('mouseup', Y.bind(this._end, this));","","            win = Y.one('win');","            Y.on('window:resize', Y.bind(this._pg_size, this));","            win.on('scroll', Y.bind(this._pg_size, this));","        }","    }, true);","","","","","}, '3.13.0', {\"requires\": [\"dd-ddm-base\", \"event-resize\"]});","","}());"]};
12 var __cov_9Br2mMEofVNi0vj7HFd23g = __coverage__['build/dd-ddm/dd-ddm.js'];
13 __cov_9Br2mMEofVNi0vj7HFd23g.s['1']++;YUI.add('dd-ddm',function(Y,NAME){__cov_9Br2mMEofVNi0vj7HFd23g.f['1']++;__cov_9Br2mMEofVNi0vj7HFd23g.s['2']++;Y.mix(Y.DD.DDM,{_pg:null,_debugShim:false,_activateTargets:function(){__cov_9Br2mMEofVNi0vj7HFd23g.f['2']++;},_deactivateTargets:function(){__cov_9Br2mMEofVNi0vj7HFd23g.f['3']++;},_startDrag:function(){__cov_9Br2mMEofVNi0vj7HFd23g.f['4']++;__cov_9Br2mMEofVNi0vj7HFd23g.s['3']++;if((__cov_9Br2mMEofVNi0vj7HFd23g.b['2'][0]++,this.activeDrag)&&(__cov_9Br2mMEofVNi0vj7HFd23g.b['2'][1]++,this.activeDrag.get('useShim'))){__cov_9Br2mMEofVNi0vj7HFd23g.b['1'][0]++;__cov_9Br2mMEofVNi0vj7HFd23g.s['4']++;this._shimming=true;__cov_9Br2mMEofVNi0vj7HFd23g.s['5']++;this._pg_activate();__cov_9Br2mMEofVNi0vj7HFd23g.s['6']++;this._activateTargets();}else{__cov_9Br2mMEofVNi0vj7HFd23g.b['1'][1]++;}},_endDrag:function(){__cov_9Br2mMEofVNi0vj7HFd23g.f['5']++;__cov_9Br2mMEofVNi0vj7HFd23g.s['7']++;this._pg_deactivate();__cov_9Br2mMEofVNi0vj7HFd23g.s['8']++;this._deactivateTargets();},_pg_deactivate:function(){__cov_9Br2mMEofVNi0vj7HFd23g.f['6']++;__cov_9Br2mMEofVNi0vj7HFd23g.s['9']++;this._pg.setStyle('display','none');},_pg_activate:function(){__cov_9Br2mMEofVNi0vj7HFd23g.f['7']++;__cov_9Br2mMEofVNi0vj7HFd23g.s['10']++;if(!this._pg){__cov_9Br2mMEofVNi0vj7HFd23g.b['3'][0]++;__cov_9Br2mMEofVNi0vj7HFd23g.s['11']++;this._createPG();}else{__cov_9Br2mMEofVNi0vj7HFd23g.b['3'][1]++;}__cov_9Br2mMEofVNi0vj7HFd23g.s['12']++;var ah=this.activeDrag.get('activeHandle'),cur='auto';__cov_9Br2mMEofVNi0vj7HFd23g.s['13']++;if(ah){__cov_9Br2mMEofVNi0vj7HFd23g.b['4'][0]++;__cov_9Br2mMEofVNi0vj7HFd23g.s['14']++;cur=ah.getStyle('cursor');}else{__cov_9Br2mMEofVNi0vj7HFd23g.b['4'][1]++;}__cov_9Br2mMEofVNi0vj7HFd23g.s['15']++;if(cur==='auto'){__cov_9Br2mMEofVNi0vj7HFd23g.b['5'][0]++;__cov_9Br2mMEofVNi0vj7HFd23g.s['16']++;cur=this.get('dragCursor');}else{__cov_9Br2mMEofVNi0vj7HFd23g.b['5'][1]++;}__cov_9Br2mMEofVNi0vj7HFd23g.s['17']++;this._pg_size();__cov_9Br2mMEofVNi0vj7HFd23g.s['18']++;this._pg.setStyles({top:0,left:0,display:'block',opacity:this._debugShim?(__cov_9Br2mMEofVNi0vj7HFd23g.b['6'][0]++,'.5'):(__cov_9Br2mMEofVNi0vj7HFd23g.b['6'][1]++,'0'),cursor:cur});},_pg_size:function(){__cov_9Br2mMEofVNi0vj7HFd23g.f['8']++;__cov_9Br2mMEofVNi0vj7HFd23g.s['19']++;if(this.activeDrag){__cov_9Br2mMEofVNi0vj7HFd23g.b['7'][0]++;__cov_9Br2mMEofVNi0vj7HFd23g.s['20']++;var b=Y.one('body'),h=b.get('docHeight'),w=b.get('docWidth');__cov_9Br2mMEofVNi0vj7HFd23g.s['21']++;this._pg.setStyles({height:h+'px',width:w+'px'});}else{__cov_9Br2mMEofVNi0vj7HFd23g.b['7'][1]++;}},_createPG:function(){__cov_9Br2mMEofVNi0vj7HFd23g.f['9']++;__cov_9Br2mMEofVNi0vj7HFd23g.s['22']++;var pg=Y.Node.create('<div></div>'),bd=Y.one('body'),win;__cov_9Br2mMEofVNi0vj7HFd23g.s['23']++;pg.setStyles({top:'0',left:'0',position:'absolute',zIndex:'9999',overflow:'hidden',backgroundColor:'red',display:'none',height:'5px',width:'5px'});__cov_9Br2mMEofVNi0vj7HFd23g.s['24']++;pg.set('id',Y.stamp(pg));__cov_9Br2mMEofVNi0vj7HFd23g.s['25']++;pg.addClass(Y.DD.DDM.CSS_PREFIX+'-shim');__cov_9Br2mMEofVNi0vj7HFd23g.s['26']++;bd.prepend(pg);__cov_9Br2mMEofVNi0vj7HFd23g.s['27']++;this._pg=pg;__cov_9Br2mMEofVNi0vj7HFd23g.s['28']++;this._pg.on('mousemove',Y.throttle(Y.bind(this._move,this),this.get('throttleTime')));__cov_9Br2mMEofVNi0vj7HFd23g.s['29']++;this._pg.on('mouseup',Y.bind(this._end,this));__cov_9Br2mMEofVNi0vj7HFd23g.s['30']++;win=Y.one('win');__cov_9Br2mMEofVNi0vj7HFd23g.s['31']++;Y.on('window:resize',Y.bind(this._pg_size,this));__cov_9Br2mMEofVNi0vj7HFd23g.s['32']++;win.on('scroll',Y.bind(this._pg_size,this));}},true);},'3.13.0',{'requires':['dd-ddm-base','event-resize']});