Permalink
Browse files

添加学生主档,添加tbar css与图片

  • Loading branch information...
1 parent 65f9b69 commit 7df1e9fbed3ab4a1004b716bdfa76b62e6d3286a @mouse-lin committed Mar 22, 2012
@@ -14,6 +14,7 @@
<%= stylesheet_link_tag '/javascripts/Extjs/resources/css/ext-all.css' %>
<%= stylesheet_link_tag '/javascripts/Extjs/resources/css/xtheme-gray.css' %>
<%= stylesheet_link_tag 'menu-style.css' %>
+ <%= stylesheet_link_tag 'button_icon.css' %>
<%= csrf_meta_tag %>
</head>
<body>
@@ -1,4 +1,5 @@
<%= javascript_include_tag '/javascripts/PF/pages/settings_index.js' %>
+<%= javascript_include_tag '/javascripts/PF/pages/student.js' %>
<script language="javascript" type="text/javascript">
Ext.onReady(function() {
Pf.pages.currentInstance = Pf.settings.homeIndex.panel();
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Diff not rendered.
@@ -1,9 +1,16 @@
Pf.settings.homeIndex = {
panel: function(){
- var panel = new Ext.form.FormPanel({
+ var grid = new Pf.classes.student();
+ var grid2 = new Pf.classes.student();
+ var panel = new Ext.TabPanel({
autoScroll : true,
- title: "nihao",
+ activeTab: 0,
+ autpLoad: true,
frame: true,
+ items: [
+ { title: "学生主档", items: grid },
+ { title: "学生主档", items: grid2 },
+ ]
});
return panel;
}
@@ -1,25 +1,37 @@
Ext.ns("Pf.classes.student");
-var store_name = new Ext.data.JsonStore({
- fields: [
-
- ],
- root: 'content',
- url: 'store_url',
- totalProperty:'total',
- method:'GET',
-});
-var cm = new Ext.grid.ColumnModel([
- new Ext.grid.RowNumberer(),
- { header: '', sortable: true, dataIndex: '',editor:new Ext.form.TextField()},
- { header: '', sortable: true, dataIndex: '',editor:new Ext.form.TextField()},
-]);
-var tbar = [
- { iconCls: '', text: '', handler: function(){ },
-];
-var grid_name = new Ext.grid.EditorGridPanel({
+
+Pf.classes.student = Ext.extend(Ext.grid.EditorGridPanel,{
viewConfig: { forceFit: true },
- store: store_name ,
- cm: cm,
- tbar: tbar,
-)};
-return grid_name ;
+ //title: "学生主档",
+ height: 600,
+ initComponent : function () {
+ this.store = this.initStore();
+ this.cm = this.initCm();
+ this.tbar = this.initStudentTbar();
+ Pf.classes.student.superclass.initComponent.call(this);
+ },
+ initStore: function(){
+ var store = new Ext.data.JsonStore({
+ fields: [
+
+ ],
+ root: 'content',
+ url: 'store_url',
+ totalProperty:'total',
+ method:'GET',
+ });
+ return store;
+ },
+ initCm: function(){
+ var cm = new Ext.grid.ColumnModel([
+ new Ext.grid.RowNumberer(),
+ { header: 'mouse', sortable: true, dataIndex: '',editor:new Ext.form.TextField()},
+ { header: 'cat', sortable: true, dataIndex: '',editor:new Ext.form.TextField()},
+ ]);
+ return cm;
+ },
+ initStudentTbar: function(){
+ var tbar = [{ iconCls: "add", text: "添加" }];
+ return tbar;
+ }
+})
@@ -0,0 +1,78 @@
+/* extjs button image */
+.add {
+ background-image:url(../../images/icon/add.png) !important;
+}
+
+.table_row_delete {
+ background-image:url(../../images/icon/table_row_delete.png) !important;
+}
+
+.delete {
+ background-image:url(../../images/icon/delete.png) !important;
+}
+
+.check{
+ background-image:url(../../images/icon/check.png) !important;
+}
+
+.table_edit{
+ background-image:url(../../images/icon/table_edit.png) !important;
+}
+
+.drop-yes{
+ background-image:url(../../images/icon/drop-yes.png) !important;
+}
+
+.error{
+ background-image:url(../../images/icon/error.png) !important;
+}
+
+.magnifier{
+ background-image:url(../../images/icon/magnifier.png) !important;
+}
+
+.pencil_delete{
+ background-image:url(../../images/icon/pencil_delete.png) !important;
+}
+
+.paintbrush{
+ background-image:url(../../images/icon/paintbrush.png) !important;
+}
+
+.table_refresh{
+ background-image:url(../../images/icon/table_refresh.png) !important;
+}
+
+.database{
+ background-image:url(../../images/icon/database.png) !important;
+}
+
+.print{
+ background-image:url(../../images/icon/printer.png) !important;
+}
+
+.calculator {
+ background-image: url(../../images/icon/calculator.png) !important;
+}
+
+.options {
+ background-image: url(../../images/icon/options.png) !important;
+}
+
+.import {
+ background-image: url(../../images/icon/import.png) !important;
+}
+
+.icon-prev
+{
+ background: url(../../images/icon/arrow_left.png) no-repeat center center !important;
+}
+
+.icon-next
+{
+ background: url(../../images/icon/arrow_right.png) no-repeat center center !important;
+}
+
+.user {
+ background-image: url(../../images/icon/user.png) !important;
+}

0 comments on commit 7df1e9f

Please sign in to comment.