hls.js 686 Bytes
Newer Older
Spencer Chang's avatar
Spencer Chang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
//$Version : 1.1
//$Author : DJ
if(!window.f_hls){
	function HLS (props) {
		this.context_path = props['context_path'];
	}
	HLS.prototype.winMask = function (win,desc) {
		if(Ext.isEmpty(desc))
		{
			desc = '正在提交...';
		}
		if(Ext.isEmpty(win))
		{
			Leaf.Masker.mask(Ext.getBody(),desc);
		}
		else
		{
			Leaf.Masker.mask(win.wrap,desc);
		}
	}
	HLS.prototype.winNoMask = function (win) {
		if(Ext.isEmpty(win))
		{
			Leaf.Masker.unmask(Ext.getBody());
		}
		else
		{
			Leaf.Masker.unmask(win.wrap);
		}
	}
	HLS.prototype.validateCode = function (code) {
		var reg=/^[_A-Za-z0-9]{1,30}$/;
	    if(reg.test(code))
	    {
	        return true;
	    }
	    return false;
	}
}