toast.js.svn-base

来自「一个使用ssh+ext的例子。 希望对开发这个应用的人带来好处。仔细研究里面的」· SVN-BASE 代码 · 共 24 行

SVN-BASE
24
字号
Ext.ux.Toast = function() { 
var msgCt; 
  
function createBox(t, s){ 
	return ['<div class="msg">', 
		'<div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>', 
		'<div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc"><h3>', t, '</h3>', s, '</div></div></div>', 
		'<div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>', 
		'</div>'].join(''); 
} 
  
return { 
	msg : function(title, format){ 
		if(!msgCt){ 
			msgCt = Ext.DomHelper.insertFirst(document.body, {id:'msg-div',style:'position:absolute;z-index:10000'}, true); 
		} 
		var s = String.format.apply(String, Array.prototype.slice.call(arguments, 1)); 
		var m = Ext.DomHelper.append(msgCt, {html:createBox(title, s)}, true); 
		msgCt.alignTo(document, 't-t'); 
		m.slideIn('t').pause(2.5).ghost("t", {remove:true}); 
		} 
	} 
  
}(); 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?