Skip to content

Commit

Permalink
成绩导入
Browse files Browse the repository at this point in the history
  • Loading branch information
xEasy committed Mar 24, 2012
1 parent dc286ec commit 52f94a3
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 3 deletions.
Binary file added files/masters/course_score.xls
Binary file not shown.
Binary file modified files/masters/student.xls
Binary file not shown.
1 change: 1 addition & 0 deletions public/javascripts/PF/pages/comment_student.js
Expand Up @@ -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);
}
Expand Down
8 changes: 8 additions & 0 deletions public/javascripts/PF/pages/home_index.js
Expand Up @@ -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({
Expand Down
4 changes: 3 additions & 1 deletion public/javascripts/PF/pages/student.js
Expand Up @@ -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: "删除",
Expand Down
3 changes: 2 additions & 1 deletion public/javascripts/PF/util/master_import.js
Expand Up @@ -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){
Expand Down
2 changes: 1 addition & 1 deletion public/javascripts/PF/util/util.js
Expand Up @@ -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} 条记录 ",
Expand Down

0 comments on commit 52f94a3

Please sign in to comment.