Permalink
Browse files

成绩导入

  • Loading branch information...
xEasy committed Mar 24, 2012
1 parent dc286ec commit 52f94a3ad3fe6b20dd34f8356a1c6b9aad15f99e
Binary file not shown.
View
Binary file not shown.
@@ -104,6 +104,7 @@ Pf.classes.commentStudent.MainPanel = Ext.extend(Ext.Panel, {
sm : new Ext.grid.RowSelectionModel({ }),
listeners: {
celldblclick : function(grid,rowIndex,columnIndex) {
+ if (currentStu == undefined) {return ;};
var content = grid.getStore().getAt(rowIndex).get("content");
scope.addComment(content,false);
}
@@ -70,6 +70,14 @@ Pf.classes.homeIndex.MainPanel = Ext.extend(Ext.Panel, {
fields : ["id", "name"],
autoLoad: false
}),
+ listeners : {
+ select : function(combo, record, index) {
+ var store = Ext.getCmp("student-grid").getStore();
+ store.removeAll();
+ store.setBaseParam("c_id",record.get("id"));
+ store.load();
+ }
+ }
});
var grid = new Ext.grid.EditorGridPanel({
@@ -61,12 +61,14 @@ Pf.classes.student = Ext.extend(Ext.grid.EditorGridPanel,{
initStudentTbar: function(){
var _this = this;
var tbar = [
+ // FIXME
// {
// iconCls: "add",
// text: "添加",
// handler: function(){ _this.addSingleStudent().show() }
// },
- new Pf.util.ImportXlsBtn({ actionName : 'student', store : _this.store }),
+ new Pf.util.ImportXlsBtn({ icon : Pf.Icon.AUe, actionName : 'student', callBackStore : _this.store, text : '导入学生' }),
+ new Pf.util.ImportXlsBtn({ actionName : 'course_score', text : '导入成绩' }),
{
iconCls: "delete",
text: "删除",
@@ -72,7 +72,8 @@ Pf.util.ImportXlsBtn = Ext.extend(Ext.Button,{
success: function(fp, action){
if(action.result == true) {
scope.importWin.hide();
- if (scope.store) {scope.store.reload();};
+ if (scope.callBackStore) {scope.callBackStore.reload();};
+ Ext.Msg.alert("Success", "导入成功。");
}
},
failure : function(fp, action){
@@ -24,7 +24,7 @@ Pf.util.FieldsJsonStore = Ext.extend(Ext.data.JsonStore, {
Pf.util.Bbar = Ext.extend(Ext.PagingToolbar,{
config : {
- pageSize : 20,
+ pageSize : 25,
emptyMsg : '没有记录',
displayInfo : true,
displayMsg : "显示 {0} - {1} 总 {2} 条记录 ",

0 comments on commit 52f94a3

Please sign in to comment.