/* */ var applicationName = '/gdex'; Ext.onReady(function(){ Ext.BLANK_IMAGE_URL = applicationName + '/lib/ext/resources/images/default/s.gif'; // ユーザ名 var userField = new Ext.form.TextField( { applyTo: 'lgnUserNameText', width: 200, regex: /^[\x20-\x7e]/, style: 'ime-mode:inactive;' } ); // パスワード var passField = new Ext.form.TextField({ applyTo: 'lgnPasswordText', width: 200 }); // コンボボックス用Store(JSONを取得) var store = new procenter.common.BaseJsonStore({ url: applicationName + '/lgnGetLanguage.do', root: 'data.Languages', fields: ['value', 'displayValue', 'defaultValue'] }); // 言語 var comboBox = new Ext.form.ComboBox({ id: 'lgnLocaleComboBox', fieldLabel: '言語', hiddenName: 'localeId', listWidth: 150, width: 150, store: store, valueField: 'value', displayField: 'displayValue', triggerAction: "all", editable: false, mode: 'local', forceSelection : true, typeAhead :true }); // コンボボックス格納用フィールドセット var fieldSet = new Ext.form.FieldSet({ collapsible : true, renderTo: 'fieldSet', title: 'オプション', width: 300, autoHeight: true, animCollapse: true, collapsed: true, hideBorders: true, items: [comboBox] }); // ボタン var submitBtn = new Ext.Button({ type :'submit', applyTo: 'lgnOk', text: 'ログイン', formBind: true, minWidth: 80, handler: function() { //マスクの開始 if(procenter.common.isMaskFullScreen() == true){ return; } procenter.common.MaskFullScreen(); this.disable(); Ext.get('form1').dom.submit(); } }); // コンボボックスのデフォルト値を設定する store.load({callback : function(r, options, success){ if(this.jsonStatus == true){ if(success){ var record = null; var defaultValue = ""; for (var i = 0; i < r.length; i++){ record = r[i]; // defaultValueの値がtrueのデータをデフォルト値として設定する defaultValue = record.get('defaultValue'); if (defaultValue) { comboBox.setValue(r[i].get('value')); break; } } } }} }); // パネルの作成 new Ext.Panel({ title: 'ユーザIDとパスワードを入力してください', renderTo: 'show-login-area', frame: true, cls: 'loginFormPanel', items:[{contentEl: 'hide-login-area'}], listeners: { afterlayout: function(panel, layout) { } } }); userField.focus(); });