Merge branch 'master_MDL-48419' of https://github.com/danmarsden/moodle

This commit is contained in:
Dan Poltawski 2015-03-23 11:15:55 +00:00
commit 68d52a732f
4 changed files with 13 additions and 13 deletions

View File

@ -146,10 +146,10 @@ Y.extend(CheckNet, Y.Base, {
*
* @attribute timeout
* @type Number
* @value 2000
* @value 4000
*/
timeout: {
value: 2000
value: 4000
},
/**
@ -159,10 +159,10 @@ Y.extend(CheckNet, Y.Base, {
* @attribute frequency
* @writeOnce
* @type Number
* @value 5000
* @value 10000
*/
frequency: {
value: 5000
value: 10000
},
/**

View File

@ -1 +1 @@
YUI.add("moodle-core-checknet",function(e,t){function n(){n.superclass.constructor.apply(this,arguments)}e.extend(n,e.Base,{_alertDialogue:null,initializer:function(){this._scheduleCheck()},_scheduleCheck:function(){return e.later(this.get("frequency"),this,this._performCheck),this},_performCheck:function(){e.io(this.get("uri"),{data:{sesskey:M.cfg.sesskey,time:(new Date).getTime()},timeout:this.get("timeout"),headers:{"Cache-Control":"no-cache",Expires:"-1"},context:this,on:{complete:function(e,t){if(t&&typeof t.status!="undefined"){var n=parseInt(t.status,10);n===200?this._alertDialogue&&(this._alertDialogue.destroy(),this._alertDialogue=null):n>=300&&n<=399||(this._alertDialogue===null||this._alertDialogue.get("destroyed")?this._alertDialogue=new M.core.alert({message:M.util.get_string.apply(this,this.get("message"))}):this._alertDialogue.show())}this._scheduleCheck()}}})}},{NAME:"checkNet",ATTRS:{uri:{value:M.cfg.wwwroot+"/lib/yui/build/moodle-core-checknet/assets/checknet.txt"},timeout:{value:2e3},frequency:{value:5e3},message:{value:["networkdropped","moodle"]}}}),M.core=M.core||{},M.core.checknet=M.core.checknet||{},M.core.checknet.init=function(e){return new n(e)}},"@VERSION@",{requires:["base-base","moodle-core-notification-alert","io-base"]});
YUI.add("moodle-core-checknet",function(e,t){function n(){n.superclass.constructor.apply(this,arguments)}e.extend(n,e.Base,{_alertDialogue:null,initializer:function(){this._scheduleCheck()},_scheduleCheck:function(){return e.later(this.get("frequency"),this,this._performCheck),this},_performCheck:function(){e.io(this.get("uri"),{data:{sesskey:M.cfg.sesskey,time:(new Date).getTime()},timeout:this.get("timeout"),headers:{"Cache-Control":"no-cache",Expires:"-1"},context:this,on:{complete:function(e,t){if(t&&typeof t.status!="undefined"){var n=parseInt(t.status,10);n===200?this._alertDialogue&&(this._alertDialogue.destroy(),this._alertDialogue=null):n>=300&&n<=399||(this._alertDialogue===null||this._alertDialogue.get("destroyed")?this._alertDialogue=new M.core.alert({message:M.util.get_string.apply(this,this.get("message"))}):this._alertDialogue.show())}this._scheduleCheck()}}})}},{NAME:"checkNet",ATTRS:{uri:{value:M.cfg.wwwroot+"/lib/yui/build/moodle-core-checknet/assets/checknet.txt"},timeout:{value:4e3},frequency:{value:1e4},message:{value:["networkdropped","moodle"]}}}),M.core=M.core||{},M.core.checknet=M.core.checknet||{},M.core.checknet.init=function(e){return new n(e)}},"@VERSION@",{requires:["base-base","moodle-core-notification-alert","io-base"]});

View File

@ -143,10 +143,10 @@ Y.extend(CheckNet, Y.Base, {
*
* @attribute timeout
* @type Number
* @value 2000
* @value 4000
*/
timeout: {
value: 2000
value: 4000
},
/**
@ -156,10 +156,10 @@ Y.extend(CheckNet, Y.Base, {
* @attribute frequency
* @writeOnce
* @type Number
* @value 5000
* @value 10000
*/
frequency: {
value: 5000
value: 10000
},
/**

View File

@ -144,10 +144,10 @@ Y.extend(CheckNet, Y.Base, {
*
* @attribute timeout
* @type Number
* @value 2000
* @value 4000
*/
timeout: {
value: 2000
value: 4000
},
/**
@ -157,10 +157,10 @@ Y.extend(CheckNet, Y.Base, {
* @attribute frequency
* @writeOnce
* @type Number
* @value 5000
* @value 10000
*/
frequency: {
value: 5000
value: 10000
},
/**