动态添加工具栏

tbars.push({
			text : "审核全部",
			handler : function() {
				Ext.MessageBox.confirm('Confirm', '确认审核全部?', function(btn) {
					if (btn == 'yes') {
						Ext.Ajax.request({
							url : './dsworkinfo!auditAll.html',
							params : {
								sdate : Ext.getDom("sdate").value,
								edate : Ext.getDom("edate").value,
								status : Ext.getCmp("type").getValue(),
								station : Ext.getCmp("station").selectItem.viewCode
							},
							method : "POST",
							success : function(response, opt) {
								store.reload();
							},
							failure : function(response, otp) {
								Ext.Msg.alert("error", response);
							}
						});
					}
				});
			}
		});
		tbars.push('-');

你可能感兴趣的:(html,Ajax,ext)