Ext.namespace("Login");
Login.app = function(){
return{
init:function(){
Ext.QuickTips.init();//需要的元件提供提示信息功能,form的主要提示信息就是客戶端驗證的錯誤信息了。
Ext.form.Field.prototype.msgTarget = 'side'; //第二句的目的就是設(shè)置控件的錯誤信息顯示位置,
var Login_Form = new Ext.form.FormPanel({
width:438,
height:274,
border : false,
cls : 'loginbgimage',
baseCls : 'ex-panel',//設(shè)置透明FORM 嵌入頁面
buttonAlign:"center",
labelWidth : 170,
labelAlign : 'right',
items : [{
xtype : 'panel',
baseCls:"x-pain",
border:false,
height:110
},{
fieldLabel : "機構(gòu)",
xtype : "combotree",
id : "Org_ID",
width : 200,
allowBlank : false,
tree : {
xtype : "treepanel",
rootVisible : false,
animCollapse : true,
animate : true,
loader: new Ext.tree.TreeLoader({dataUrl:'loginOrgTree.do'}),
root : new Ext.tree.AsyncTreeNode({id:'0',text:'根結(jié)點'}) ,
autoScroll : true
}
},{
fieldLabel : "帳號",
xtype : "textfield",
id : "User_Account",
width : 200,
allowBlank : false,
maxLength : 12
},{
fieldLabel : "密碼",
xtype : "textfield",
inputType : "password",
id : "User_Pass",
width : 200,
allowBlank : false,
maxLength : 12
},{
layout : "column",
baseCls : 'x-plain',
items : [{
columnWidth : .65,
layout : "form",
baseCls : 'x-plain',
//bodyStyle:'padding:2px 0 0 0',
items : [{
fieldLabel : "驗證碼",
xtype : "textfield",
id : "User_Alia",
width : 90,
allowBlank : false,
maxLength : 4,
allowNegative : false
}]
},{
columnWidth : .35,
height : 20,
baseCls : 'x-plain',
id : "login_image",
bodyStyle:'padding:8px 0 0 0',
style: 'font-size:14px; background:url(image.jsp); background-repeat: no-repeat; background-position: 0px 1px;center right no-repeat;'
}]
},{
xtype : 'panel',
baseCls:"x-pain",
border:false,
layout:"column",
items:[{
columnWidth:.4,
baseCls:"x-pain",
border:false
},{
columnWidth:.5,
baseCls:"x-pain",
border:false,
items:[{
xtype : "button",
text:"登陸系統(tǒng)",
handler:function(){
Login_Form.form.submit({
waitTitle : "請稍候",
waitMsg : "請求提交中... ...",
url : "loginAction.do",
params :{
Org_ID : Ext.getCmp("Org_ID").getValue()
},
success : function(form,action){
var obj = Ext.decode(action.response.responseText);
Ext.MessageBox.alert('友情提示',obj.Mag);
if(obj.result==2){
location.href='index.jsp'
}
},
failure : function(){
}
})
}
}]
}]
}]
})
Login_Form.render("Login_Form_Div");
Login_Form.el.center();//使的PANEL頁面居中,注意必須放上渲染之后
}
}
}();
Ext.onReady(Login.app.init,Login.app);
?
Login.app = function(){
return{
init:function(){
Ext.QuickTips.init();//需要的元件提供提示信息功能,form的主要提示信息就是客戶端驗證的錯誤信息了。
Ext.form.Field.prototype.msgTarget = 'side'; //第二句的目的就是設(shè)置控件的錯誤信息顯示位置,
var Login_Form = new Ext.form.FormPanel({
width:438,
height:274,
border : false,
cls : 'loginbgimage',
baseCls : 'ex-panel',//設(shè)置透明FORM 嵌入頁面
buttonAlign:"center",
labelWidth : 170,
labelAlign : 'right',
items : [{
xtype : 'panel',
baseCls:"x-pain",
border:false,
height:110
},{
fieldLabel : "機構(gòu)",
xtype : "combotree",
id : "Org_ID",
width : 200,
allowBlank : false,
tree : {
xtype : "treepanel",
rootVisible : false,
animCollapse : true,
animate : true,
loader: new Ext.tree.TreeLoader({dataUrl:'loginOrgTree.do'}),
root : new Ext.tree.AsyncTreeNode({id:'0',text:'根結(jié)點'}) ,
autoScroll : true
}
},{
fieldLabel : "帳號",
xtype : "textfield",
id : "User_Account",
width : 200,
allowBlank : false,
maxLength : 12
},{
fieldLabel : "密碼",
xtype : "textfield",
inputType : "password",
id : "User_Pass",
width : 200,
allowBlank : false,
maxLength : 12
},{
layout : "column",
baseCls : 'x-plain',
items : [{
columnWidth : .65,
layout : "form",
baseCls : 'x-plain',
//bodyStyle:'padding:2px 0 0 0',
items : [{
fieldLabel : "驗證碼",
xtype : "textfield",
id : "User_Alia",
width : 90,
allowBlank : false,
maxLength : 4,
allowNegative : false
}]
},{
columnWidth : .35,
height : 20,
baseCls : 'x-plain',
id : "login_image",
bodyStyle:'padding:8px 0 0 0',
style: 'font-size:14px; background:url(image.jsp); background-repeat: no-repeat; background-position: 0px 1px;center right no-repeat;'
}]
},{
xtype : 'panel',
baseCls:"x-pain",
border:false,
layout:"column",
items:[{
columnWidth:.4,
baseCls:"x-pain",
border:false
},{
columnWidth:.5,
baseCls:"x-pain",
border:false,
items:[{
xtype : "button",
text:"登陸系統(tǒng)",
handler:function(){
Login_Form.form.submit({
waitTitle : "請稍候",
waitMsg : "請求提交中... ...",
url : "loginAction.do",
params :{
Org_ID : Ext.getCmp("Org_ID").getValue()
},
success : function(form,action){
var obj = Ext.decode(action.response.responseText);
Ext.MessageBox.alert('友情提示',obj.Mag);
if(obj.result==2){
location.href='index.jsp'
}
},
failure : function(){
}
})
}
}]
}]
}]
})
Login_Form.render("Login_Form_Div");
Login_Form.el.center();//使的PANEL頁面居中,注意必須放上渲染之后
}
}
}();
Ext.onReady(Login.app.init,Login.app);
?
更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯(lián)系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
