examples/bootstrap/dashboard3.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 31 Mar 2015 09:04:04 +0000 (17:04 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 31 Mar 2015 09:04:04 +0000 (17:04 +0800)
examples/bootstrap/dashboard3.js

examples/bootstrap/dashboard3.bjs
examples/bootstrap/dashboard3.js

index 629a9c6..e5e3888 100644 (file)
@@ -34,8 +34,8 @@
    "items" : [
     {
      "String cls" : "header",
-     "xtype" : "Container",
      "tag" : "header",
+     "xtype" : "Container",
      "* xinclude" : "Dashboard.Header1",
      "$ xns" : "Roo.bootstrap"
     },
@@ -83,8 +83,8 @@
            "items" : [
             {
              "Number md" : 3,
-             "Number lg" : 3,
              "xtype" : "Column",
+             "Number lg" : 3,
              "$ xns" : "Roo.bootstrap",
              "items" : [
               {
             },
             {
              "Number md" : 3,
-             "Number lg" : 3,
              "xtype" : "Column",
+             "Number lg" : 3,
              "$ xns" : "Roo.bootstrap",
              "items" : [
               {
             },
             {
              "Number md" : 3,
-             "Number lg" : 3,
              "xtype" : "Column",
+             "Number lg" : 3,
              "$ xns" : "Roo.bootstrap",
              "items" : [
               {
             },
             {
              "Number md" : 3,
-             "xtype" : "Column",
              "Number lg" : 3,
+             "xtype" : "Column",
              "$ xns" : "Roo.bootstrap",
              "items" : [
               {
            "items" : [
             {
              "Number md" : 6,
-             "Number lg" : 6,
              "xtype" : "Column",
+             "Number lg" : 6,
              "$ xns" : "Roo.bootstrap",
              "String style" : "",
              "Number sm" : 12,
                    "items" : [
                     {
                      "listeners" : {
-                      "|render" : "function (_self)\n{\n     _this.listTable = _self;\n    (function() { _self.store.load({}); }).defer(100)\n}",
-                      "cellclick" : "function (_self, el, rowIndex, columnIndex, e)\n{\n    \n\n    var cm = this.colModel.getColumnById(this.colModel.getColumnId(columnIndex));\n    if (cm.dataIndex == 'current') {\n        var rec = _this.listTable.ds.getAt(rowIndex);\n        \n        rec.set('current', rec.data.current * 1 ? '0' : '1');\n\n        //_this.listTable.ds.fireEvent(\"datachanged\", this);\n        rec.commit();\n        return;\n    }\n      if (cm.dataIndex == 'aspire') {\n        var rec = _this.listTable.ds.getAt(rowIndex);\n        \n        rec.set('aspire', rec.data.aspire * 1 ? '0' : '1');\n\n        //_this.listTable.ds.fireEvent(\"datachanged\", this);\n        rec.commit();\n        return;\n    }\n\n     \n}"
+                      "cellclick" : "function (_self, el, rowIndex, columnIndex, e)\n{\n    \n\n    var cm = this.colModel.getColumnById(this.colModel.getColumnId(columnIndex));\n    if (cm.dataIndex == 'current') {\n        var rec = _this.listTable.ds.getAt(rowIndex);\n        \n        rec.set('current', rec.data.current * 1 ? '0' : '1');\n\n        //_this.listTable.ds.fireEvent(\"datachanged\", this);\n        rec.commit();\n        return;\n    }\n      if (cm.dataIndex == 'aspire') {\n        var rec = _this.listTable.ds.getAt(rowIndex);\n        \n        rec.set('aspire', rec.data.aspire * 1 ? '0' : '1');\n\n        //_this.listTable.ds.fireEvent(\"datachanged\", this);\n        rec.commit();\n        return;\n    }\n\n     \n}",
+                      "|render" : "function (_self)\n{\n     _this.listTable = _self;\n    (function() { _self.store.load({}); }).defer(100)\n}"
                      },
                      "xtype" : "Table",
                      "Boolean CellSelection" : true,
                      "Boolean RowSelection" : true,
                      "items" : [
                       {
+                       "$ Array data" : "[\n  [ 'A TEST', '1', '0' ],\n  \n    [ 'B test', '1', '0' ],\n      [ 'C test', '1', '0' ],\n    [ 'D test', '1', '0' ]\n]",
                        "boolean isLocal" : true,
                        "$ Array fields" : "[ 'display_name', 'current', 'aspire' ]",
-                       "$ Array data" : "[\n  [ 'A TEST', '1', '0' ],\n  \n    [ 'B test', '1', '0' ],\n      [ 'C test', '1', '0' ],\n    [ 'D test', '1', '0' ]\n]",
                        "xtype" : "SimpleStore",
                        "$ xns" : "Roo.data",
                        "* prop" : "store"
               }
              ]
             },
+            {
+             "Number md" : 6,
+             "Number lg" : 6,
+             "xtype" : "Column",
+             "$ xns" : "Roo.bootstrap",
+             "String style" : "",
+             "Number sm" : 12,
+             "items" : [
+              {
+               "String cls" : "nav-tabs-custom",
+               "xtype" : "Container",
+               "$ xns" : "Roo.bootstrap",
+               "items" : [
+                {
+                 "xtype" : "Header",
+                 "$ xns" : "Roo.bootstrap",
+                 "String html" : "income",
+                 "String style" : "margin: 10,10,0,0"
+                }
+               ]
+              }
+             ]
+            }
+           ]
+          },
+          {
+           "xtype" : "Row",
+           "$ xns" : "Roo.bootstrap",
+           "items" : [
+            {
+             "Number md" : 6,
+             "Number lg" : 6,
+             "xtype" : "Column",
+             "$ xns" : "Roo.bootstrap",
+             "String style" : "",
+             "Number sm" : 12,
+             "items" : [
+              {
+               "listeners" : {
+                "render" : "function (_self)\n{\n    _this.testbox = _self;\n}"
+               },
+               "xtype" : "TabBox",
+               "$ xns" : "Roo.bootstrap.dash",
+               "String title" : "test 1",
+               "items" : [
+                {
+                 "xtype" : "TabPane",
+                 "$ xns" : "Roo.bootstrap.dash",
+                 "string title" : "tab 1",
+                 "items" : [
+                  {
+                   "xtype" : "Column",
+                   "$ xns" : "Roo.bootstrap"
+                  }
+                 ]
+                },
+                {
+                 "xtype" : "TabPane",
+                 "$ xns" : "Roo.bootstrap.dash",
+                 "string title" : "tab 2",
+                 "items" : [
+                  {
+                   "xtype" : "Column",
+                   "$ xns" : "Roo.bootstrap",
+                   "String html" : "tab 2 content"
+                  }
+                 ]
+                }
+               ]
+              }
+             ]
+            },
             {
              "Number md" : 6,
              "xtype" : "Column",
                "items" : [
                 {
                  "xtype" : "Header",
-                 "Number level" : 3,
                  "$ xns" : "Roo.bootstrap",
+                 "Number level" : 3,
                  "String html" : "first tab"
                 },
                 {
                "items" : [
                 {
                  "xtype" : "Header",
-                 "$ xns" : "Roo.bootstrap",
                  "Number level" : 3,
+                 "$ xns" : "Roo.bootstrap",
                  "String html" : "second tab"
                 },
                 {
index bf2c5bd..ce12f2c 100644 (file)
@@ -391,6 +391,98 @@ dashboard3 = new Roo.XComponent({
             }
            ]
 
+          },
+          {
+           '|xns' : 'Roo.bootstrap',
+           xns : Roo.bootstrap,
+           xtype : 'Row',
+           items : [
+            {
+             '|xns' : 'Roo.bootstrap',
+             lg : 6,
+             md : 6,
+             sm : 12,
+             style : '',
+             xns : Roo.bootstrap,
+             xtype : 'Column',
+             items : [
+              {
+               '|xns' : 'Roo.bootstrap.dash',
+               title : _this._strings['9a7b64c98b066602b21f869ae7cd673a'],
+               xns : Roo.bootstrap.dash,
+               xtype : 'TabBox',
+               listeners : {
+                render : function (_self)
+                 {
+                     _this.testbox = _self;
+                 }
+               },
+               items : [
+                {
+                 '|xns' : 'Roo.bootstrap.dash',
+                 title : _this._strings['c4f5a294a273c3a1c97642a76f15c5c7'],
+                 xns : Roo.bootstrap.dash,
+                 xtype : 'TabPane',
+                 items : [
+                  {
+                   '|xns' : 'Roo.bootstrap',
+                   xns : Roo.bootstrap,
+                   xtype : 'Column'
+                  }
+                 ]
+
+                },
+                {
+                 '|xns' : 'Roo.bootstrap.dash',
+                 title : _this._strings['58a00f6a3da23fc3821f24115493b750'],
+                 xns : Roo.bootstrap.dash,
+                 xtype : 'TabPane',
+                 items : [
+                  {
+                   '|xns' : 'Roo.bootstrap',
+                   html : _this._strings['70ce2e7a27cab2a670ca954f8362e19f'],
+                   xns : Roo.bootstrap,
+                   xtype : 'Column'
+                  }
+                 ]
+
+                }
+               ]
+
+              }
+             ]
+
+            },
+            {
+             '|xns' : 'Roo.bootstrap',
+             lg : 6,
+             md : 6,
+             sm : 12,
+             style : '',
+             xns : Roo.bootstrap,
+             xtype : 'Column',
+             items : [
+              {
+               '|xns' : 'Roo.bootstrap',
+               cls : 'nav-tabs-custom',
+               xns : Roo.bootstrap,
+               xtype : 'Container',
+               items : [
+                {
+                 '|xns' : 'Roo.bootstrap',
+                 html : _this._strings['34ae6773410925b4574e656be194f0ad'],
+                 style : 'margin: 10,10,0,0',
+                 xns : Roo.bootstrap,
+                 xtype : 'Header'
+                }
+               ]
+
+              }
+             ]
+
+            }
+           ]
+
           },
           {
            '|xns' : 'Roo.bootstrap',