標籤:
1、Extjs : 遮罩+進度條
2、Extjs: extjs form.isvalid
http://stackoverflow.com/questions/19354433/extjs-form-isvalid-is-false-but-how-to-know-why-the-form-is-invalid
EXT API:
http://docs.sencha.com/extjs/3.4.0/
http://dev.sencha.com/deploy/ext-3.x/docs/
http://extjs.cachefly.net/ext-3.1.1/docs/
http://extjs.cachefly.net/ext-3.4.0/docs/
EXT CDN HOME:
http://extjs.cachefly.net/ext-3.1.1/
-----------------------------
http://why100000.com/_others/extjs3.0/index.html
進度條+遮罩沒找到,但下面這個也可用。
Ext.onReady(function(){ var loadMarsk = new Ext.LoadMask(Ext.getBody(),{ msg : ‘正在處理,請稍後......‘, removeMask: true //完成後刪除 }); loadMarsk.show(); //loadMarsk.hide();});View Code
接了一個頁面非常複雜的活,驗證把人搞死,而且,有地方沒有通過extjs內建的驗證,沒法提交,還不要定位,悲劇啊。還好,下面這個+firebug可以協助定位下。
Ext.onReady(function(){ var simple = new Ext.FormPanel({ id: ‘id_formpanel‘, labelWidth: 75, // label settings here cascade unless overridden url:‘save-form.php‘, frame:true, title: ‘Simple Form‘, bodyStyle:‘padding:5px 5px 0‘, width: 350, defaults: {width: 230}, defaultType: ‘textfield‘, items: [{ fieldLabel: ‘First Name‘, name: ‘first‘, allowBlank:false },{ fieldLabel: ‘Last Name‘, name: ‘last‘ },{ fieldLabel: ‘Company‘, name: ‘company‘ }, { fieldLabel: ‘Email‘, name: ‘email‘, vtype:‘email‘ }, new Ext.form.TimeField({ fieldLabel: ‘Time‘, name: ‘time‘, minValue: ‘8:00am‘, maxValue: ‘6:00pm‘ }) ], buttons: [{ text: ‘Save‘, handler: function(){ var formpanel = Ext.getCmp("id_formpanel"); var form = formpanel.getForm(); if(!form.isValid()){ //console.log( form ); var formItems = form.items.items; Ext.each(formItems, function(ia,i,all){ //console.log( ia.isValid() ); if(!ia.isValid()){ console.log( ia.name ); console.log( ia ); } }); return; } } },{ text: ‘Cancel‘ }] }); simple.render(document.body);});View Code
2014年12月20日00:33:14-遮罩+進度條-extjs form.isvalid