PageRenderTime 35ms CodeModel.GetById 17ms app.highlight 15ms RepoModel.GetById 2ms app.codeStats 0ms

/source/gl/mb/form/htmleditor.html

http://prosporous.googlecode.com/
HTML | 177 lines | 174 code | 3 blank | 0 comment | 0 complexity | b68a1ac7fbba8b867a3fa1aba022a93d MD5 | raw file
  1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2<html>
  3<head>
  4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5<title>??????-combo</title>
  6<{$showjs}>
  7<link rel="stylesheet" type="text/css" href="../css/main1.css" />
  8    <style>
  9        .x-check-group-alt {
 10            background: #D1DDEF;
 11            border-top:1px dotted #B5B8C8;
 12            border-bottom:1px dotted #B5B8C8;
 13        }
 14    </style>
 15<script language="javascript">
 16Ext.onReady(function(){
 17    Ext.QuickTips.init();
 18    Ext.form.Field.prototype.msgTarget = 'side';
 19	var myMask = new Ext.LoadMask(Ext.getBody(), {
 20							msg: '???...',
 21							removeMask: true //?????
 22						});
 23    var fp = new Ext.FormPanel({
 24        frame: true,
 25//        title:'????? [Right Group Config]',
 26        labelWidth: 110,
 27        width: Ext.getBody().getWidth(),
 28        renderTo:'form-ct',
 29        bodyStyle: 'padding:0 10px 0;',
 30        
 31        items: [{
 32            xtype:'fieldset',
 33            title: '????',
 34            autoHeight: true,
 35            layout: 'form',
 36            items: [{
 37                xtype: 'textfield',
 38                name: 'width',
 39                fieldLabel: '??{TM??????,??}',
 40				itemCls: 'x-check-group-alt',
 41				value:'<{if $fld.width==''}>400<{else}><{$fld.width}><{/if}>',
 42				width:'80px'
 43            },{
 44                xtype: 'textfield',
 45                name: 'cfg[height]',
 46                fieldLabel: '??{??TM??}',
 47				itemCls: 'x-check-group-alt',
 48				value:'<{if $cfg.height==''}>200<{else}><{$cfg.height}><{/if}>',
 49				width:'80px'
 50            },{
 51               xtype: 'checkboxgroup',
 52                fieldLabel: '????',
 53				itemCls: 'x-check-group-alt',
 54                items: [
 55                    {boxLabel: '????', name: 'bt',inputValue: 1<{if $fld.bt=='1'}>,checked: true<{/if}>},
 56                    {boxLabel: '????', name: 'gj',inputValue: 1<{if $fld.gj=='1'}>,checked: true<{/if}>},
 57                    {boxLabel: '????', name: 'zy',inputValue: 1<{if $fld.zy=='1'}>,checked: true<{/if}>},
 58                    {boxLabel: '????', name: 'xr',inputValue:1<{if $fld.xr=='1'}>,checked: true<{/if}>}
 59                ]
 60            }]
 61        },{
 62            xtype:'fieldset',
 63            title: '??????',
 64            autoHeight: true,
 65            items: [{
 66                itemCls: 'x-check-group-alt',
 67 				allowBlank: false,
 68                layout:'form',
 69                items: [{
 70               	xtype: 'textarea',
 71                fieldLabel: 'STR[JSON]{,??,?????,???EXTJS??JSON??.}',
 72				name:'cfg[STR]',
 73				width:200,
 74				value:'<{$cfg.STR}>'
 75	            }]
 76            }]
 77        },{
 78            xtype:'fieldset',
 79            title: '????',
 80            autoHeight: true,
 81            items: [{
 82                itemCls: 'x-check-group-alt',
 83 				allowBlank: false,
 84                layout:'column',
 85                items: [{
 86                    columnWidth: '.33',
 87			        bodyStyle: 'padding:0 10px 0;',
 88 					labelWidth:60,
 89					layout:'form',
 90                   items: [{
 91							html:"<font color='red'><b>???<hr></b></font>"
 92							},{xtype: 'combo',value:'<{if $fld.qzfs==''}>1<{else}><{$fld.qzfs}><{/if}>',fieldLabel:'????',blankText:'...????',style:'text-align:left',mode: 'local',forceSelection: true,triggerAction: 'all',width: 90,editable: false,emptyText:'???...',valueField :'yinv',displayField:'xianv',store:new Ext.data.SimpleStore({fields:['yinv','xianv'],data:[['0','???'],['1','????'],['function','function'],['$_GET','$_GET'],['$_POST','$_POST'],['$_SESSION','$_SESSION'],['$_COOKIE','$_COOKIE'],['$_SERVER','$_SERVER'],['$_ENV','$_ENV'],['$_FILES','$_FILES']]}),hiddenName: 'qzfs'},
 93{
 94                xtype: 'textfield',
 95                name: 'blm',
 96                fieldLabel: '???',
 97				value:"<{$fld.blm}>",
 98				width:'80px'}]
 99                },{
100                    columnWidth: '.33',
101			        bodyStyle: 'padding:0 10px 0;',
102 					labelWidth:40,
103					layout:'form',
104                   items: [{
105							html:"<font color='red'><b>XY??<hr></b></font>"
106							},{
107                xtype: 'textfield',
108                name: 'x',
109                fieldLabel: 'X?',
110				value:'<{$fld.x}>',
111				width:'80px'},
112{
113                xtype: 'textfield',
114                name: 'y',
115                fieldLabel: 'Y?',
116				value:'<{$fld.y}>',
117				width:'80px'}]
118                },{
119                    columnWidth: '.33',
120			        bodyStyle: 'padding:0 10px 0;',
121 					labelWidth:40,
122					layout:'form',
123                   items: [{
124							html:"<font color='red'><b>Z??<hr></b></font>"
125							},{
126                xtype: 'textfield',
127                name: 'z',
128                fieldLabel: 'Z?',
129				value:'<{$fld.z}>',
130				width:'80px'},{
131                xtype: 'hidden',
132                name: 'id',
133				value:'<{$fld.id}>'},{
134                xtype: 'hidden',
135                name: 'type',
136				value:'<{$fld.type}>'}]
137                }]
138            }]
139        }],
140        
141        buttons: [{
142            text: '??',
143            handler: function(){
144               if(fp.getForm().isValid()){
145                    //Ext.Msg.alert('Submitted Values',fp.getForm().getValues(true).replace(/&/g,', '));
146					myMask.show();
147					fp.form.doAction('submit',{
148									url:'fldcfg.php',
149									method:'POST',
150									params:{op:'save'},
151									waitMsg:'????....',
152									success:function (response){
153									 myMask.hide();
154									parent.Ext.getCmp('<{$fld.id}>').close();
155									Ext.MessageBox.alert('????','????');
156									},
157									failure:function (response){
158									    Ext.MessageBox.alert('????','????');
159									}
160								});
161
162                }
163            }
164        },{
165            text: 'Reset',
166            handler: function(){
167                fp.getForm().reset();
168            }
169        }]
170    });
171});
172</script>
173</head>
174<body>
175<div id="form-ct"></div>
176</body>
177</html>