Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 7df1e9fbed3ab4a1004b716bdfa76b62e6d3286a 1 parent 65f9b69
@mouse-lin authored
Showing with 124 additions and 25 deletions.
  1. +1 −0  app/views/layouts/application.html.erb
  2. +1 −0  app/views/settings/index.html.erb
  3. BIN  public/images/icon/add.png
  4. BIN  public/images/icon/arrow_left.png
  5. BIN  public/images/icon/arrow_right.png
  6. BIN  public/images/icon/calculator.png
  7. BIN  public/images/icon/check.png
  8. BIN  public/images/icon/database.png
  9. BIN  public/images/icon/delete.png
  10. BIN  public/images/icon/drop-yes.png
  11. BIN  public/images/icon/emoticon_happy.png
  12. BIN  public/images/icon/error.png
  13. BIN  public/images/icon/go-to-post.gif
  14. BIN  public/images/icon/hand.png
  15. BIN  public/images/icon/import.png
  16. BIN  public/images/icon/lightbulb.png
  17. BIN  public/images/icon/lightbulb_add.png
  18. BIN  public/images/icon/lightbulb_off.png
  19. BIN  public/images/icon/magnifier.png
  20. BIN  public/images/icon/options.png
  21. BIN  public/images/icon/paintbrush.png
  22. BIN  public/images/icon/pencil_delete.png
  23. BIN  public/images/icon/printer.png
  24. BIN  public/images/icon/ruby.png
  25. BIN  public/images/icon/table_edit.png
  26. BIN  public/images/icon/table_refresh.png
  27. BIN  public/images/icon/table_row_delete.png
  28. BIN  public/images/icon/user.png
  29. +9 −2 public/javascripts/PF/pages/settings_index.js
  30. +35 −23 public/javascripts/PF/pages/student.js
  31. +78 −0 public/stylesheets/button_icon.css
View
1  app/views/layouts/application.html.erb
@@ -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>
View
1  app/views/settings/index.html.erb
@@ -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
BIN  public/images/icon/add.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/arrow_left.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/arrow_right.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/calculator.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/check.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/database.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/delete.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/drop-yes.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/emoticon_happy.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/error.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/go-to-post.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/hand.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/import.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/lightbulb.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/lightbulb_add.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/lightbulb_off.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/magnifier.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/options.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/paintbrush.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/pencil_delete.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/printer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/ruby.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/table_edit.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/table_refresh.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/table_row_delete.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/icon/user.png
Diff not rendered
View
11 public/javascripts/PF/pages/settings_index.js
@@ -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;
}
View
58 public/javascripts/PF/pages/student.js
@@ -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;
+ }
+})
View
78 public/stylesheets/button_icon.css
@@ -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;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.