Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

homeIndex UI Complated

  • Loading branch information...
commit efab80517d73e0c58588ebb764127de5e45f19d7 1 parent fd1bde1
@xEasy xEasy authored
View
BIN  public/images/Temp.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
125 public/javascripts/PF/pages/home_index.js
@@ -45,33 +45,142 @@ Pf.classes.homeIndex.MainPanel = Ext.extend(Ext.Panel, {
defaults: { menuDisabled : true, sortable : true }
});
+ var classCombox = new Ext.form.ComboBox({
+ triggerAction : 'all',
+ displayField : 'name',
+ mode : 'remote',
+ autoSelect : true,
+ width : 130,
+ forceSelection : true,
+ lastQuery : '',
+ store : new Pf.util.FieldsJsonStore({
+ url : '#',
+ fields : ["id", "name"],
+ autoLoad: false
+ }),
+ listeners : {
+ select : function(combo, record, index) {
+ }
+ }
+ });
+
var grid = new Ext.grid.EditorGridPanel({
store: store,
cm : cm,
border: false,
containerScroll: true,
- width: "12%",
+ width: 200,
region: 'west',
split: true,
title : "学生列表",
stripeRows: true,
viewConfig: { forceFit: true },
- //tbar: tbar,
+ tbar: new Ext.Toolbar({
+ items : ['班级:',classCombox ]
+ }),
+ sm : new Ext.grid.RowSelectionModel({
+ listeners : {
+ rowselect : function (model, row, record) {
+ $("#image img").attr("src", record.get('image/url'));
+ }
+ }
+ }),
listeners: { }
});
return grid;
},
createForm : function() {
+ var store = new Pf.util.FieldsJsonStore({
+ root : 'root',
+ url : '#',
+ fields : ['course','grade','score','remark']
+ });
+ var cm = new Ext.grid.ColumnModel({
+ columns: [
+ { header: '科目' , dataIndex: 'course', width : 50 },
+ { header: '学期' , dataIndex: 'grade',width : 50 },
+ { header: '成绩' , dataIndex: 'score', width : 50 },
+ { header: '备注' , dataIndex: 'remark' },
+ ],
+ defaults: { menuDisabled : true, sortable : true }
+ });
+ var grid = new Ext.grid.EditorGridPanel({
+ store: store,
+ cm : cm,
+ height : 200,
+ title : "学生成绩",
+ stripeRows: true,
+ viewConfig: { forceFit: true },
+ });
var form = new Ext.FormPanel({
region : 'center',
frame : true,
- lableWidth: 50,
- defaults: {
- allowBlank: false,
- msgTarget: 'side'
- },
- items : [],
+ autoScroll : true,
+ lableWidth: 60,
+ labelAlign : 'right',
+ bodyStyle: 'padding:5px 5px 0',
+ items: [{
+ layout: 'column',
+ items: [{
+ width : 150,
+ layout: 'fit',
+ items: [new Ext.form.FieldSet({
+ title : '头像',
+ layout : 'fit',
+ height : 130,
+ items :[{
+ html : '<span id="image"><img src="/images/Temp.png" height=110px width=120px alt="图片" /></span>'
+ }]
+ })]
+ }, {
+ defaults : { anchor : '95%' },
+ defaultType : 'textfield',
+ columnWidth: .25,
+ layout: 'form',
+ items: [{
+ fieldLabel: '学号',
+ name: 'number',
+ },{
+ fieldLabel: '姓名',
+ name: 'name',
+ },{
+ fieldLabel: '性别',
+ name: 'sex',
+ }, {
+ fieldLabel: '班级',
+ name: 'classes',
+ }]
+ },{
+ defaults : { anchor : '95%' },
+ defaultType : 'textfield',
+ columnWidth: .45,
+ layout: 'form',
+ items: [ {
+ fieldLabel: '电话',
+ name: 'phone',
+ }, {
+ fieldLabel: '住址',
+ name: 'home',
+ }, {
+ xtype : 'textarea',
+ fieldLabel: '备注',
+ name: 'remark',
+ height : 80
+ }]
+ }]
+ },new Ext.form.FieldSet({
+ title : '评语',
+ layout : 'fit',
+ items : [{
+ xtype: 'textarea',
+ id: 'bio',
+ height: 150,
+ anchor: '98%'
+ }]
+ }),
+ grid
+ ]
});
return form;
},
Please sign in to comment.
Something went wrong with that request. Please try again.