ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [08/50] [abbrv] incubator-ignite git commit: IGNITE-843: WIP: tables.
Date Thu, 23 Jul 2015 08:40:39 GMT
IGNITE-843: WIP: tables.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/3ab9a914
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/3ab9a914
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/3ab9a914

Branch: refs/heads/ignite-1121
Commit: 3ab9a914e38cebacb5a2203b7bcb93b7a576cda3
Parents: fffdbdb
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Tue Jul 21 00:26:04 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Tue Jul 21 00:26:04 2015 +0700

----------------------------------------------------------------------
 .../nodejs/controllers/metadata-controller.js   |  7 ++++-
 .../nodejs/public/stylesheets/style.less        | 30 ++++++++++++++------
 .../nodejs/views/includes/controls.jade         | 25 ++++++++--------
 3 files changed, 40 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3ab9a914/modules/web-control-center/nodejs/controllers/metadata-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/metadata-controller.js b/modules/web-control-center/nodejs/controllers/metadata-controller.js
index 65229da..5f20fb2 100644
--- a/modules/web-control-center/nodejs/controllers/metadata-controller.js
+++ b/modules/web-control-center/nodejs/controllers/metadata-controller.js
@@ -311,7 +311,7 @@ controlCenterModule.controller('metadataController', ['$scope', '$http',
'$commo
                     {name: "fld2", className: "String", direction: "DESC"}]
             },
                 {
-                    name: "index1",
+                    name: "index2",
                     fields: [
                         {name: "fld3", className: "Integer", direction: "ASC"},
                         {name: "fld4", className: "Data", direction: "DESC"}]
@@ -455,6 +455,11 @@ controlCenterModule.controller('metadataController', ['$scope', '$http',
'$commo
             $table.tableReset();
         };
 
+        $scope.tableRemoveGroupItem = function(group, index) {
+            console.log("group: " + group.name);
+            console.log("index: " + index);
+        };
+
         $scope.selectSchema = function (idx) {
             var data = $scope.data;
             var tables = data.tables;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3ab9a914/modules/web-control-center/nodejs/public/stylesheets/style.less
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/stylesheets/style.less b/modules/web-control-center/nodejs/public/stylesheets/style.less
index 80bbbdb..ca4d72f 100644
--- a/modules/web-control-center/nodejs/public/stylesheets/style.less
+++ b/modules/web-control-center/nodejs/public/stylesheets/style.less
@@ -143,7 +143,7 @@
 }
 
 .theme-line #category-columns ul li a {
-  padding: 4px 0;
+  padding: 5px 0;
   display: block;
   font-size: 16px;
 }
@@ -184,11 +184,11 @@
 
 .theme-line .main-content .nav-horizontal a:hover {
   color: #999;
-  border-bottom: 4px solid #ddd;
+  border-bottom: 5px solid #ddd;
 }
 
 .theme-line .main-content .nav-horizontal a.active {
-  border-bottom: 4px solid #888;
+  border-bottom: 5px solid #888;
 }
 
 .theme-line .navbar-nav, .theme-line .sidebar-nav {
@@ -279,7 +279,7 @@
 }
 
 .theme-line .suggest {
-  padding: 4px;
+  padding: 5px;
   display: inline-block;
   font-size: 12px;
 }
@@ -623,7 +623,7 @@ h1.ignite-logo {
 
   input[type="checkbox"] {
     line-height: 20px;
-    margin-right: 4px;
+    margin-right: 5px;
   }
 
   .checkbox label {
@@ -633,7 +633,7 @@ h1.ignite-logo {
 }
 
 button {
-  margin-right: 4px;
+  margin-right: 5px;
 }
 
 h1,
@@ -803,7 +803,7 @@ button .caret, .btn .caret {
 
   padding: 0;
 
-  border-radius: 4px;
+  border-radius: 5px;
   border: thin dotted lightgrey;
 }
 
@@ -1052,7 +1052,7 @@ a {
 
 .block-callout {
   background-color: @ignite-block-callout-background;
-  border-left-width: 4px;
+  border-left-width: 5px;
   border-left-style: solid;
   border-color: @ignite-block-callout-border;
 
@@ -1080,14 +1080,26 @@ a {
   }
 }
 
-.grid-cell {
+.grid-cell-1 {
+  flex-basis: 100%;
+}
+
+.grid-cell-2 {
   flex-basis: 50%;
 }
 
+.grid-cell-3 {
+  flex-basis: 33%;
+}
+
 .grid-cell-4 {
   flex-basis: 25%;
 }
 
+.grid-cell-fa {
+  flex-basis: 16px;
+}
+
 .grid-fixed-cell {
   flex-basis: 10px;
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3ab9a914/modules/web-control-center/nodejs/views/includes/controls.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/includes/controls.jade b/modules/web-control-center/nodejs/views/includes/controls.jade
index d803e08..ce476d7 100644
--- a/modules/web-control-center/nodejs/views/includes/controls.jade
+++ b/modules/web-control-center/nodejs/views/includes/controls.jade
@@ -39,11 +39,11 @@ mixin btn-down(show, click)
 
 mixin table-pair-edit(keyModel, valModel, keyPlaceholder, valPlaceholder)
     .grid
-        .grid-cell
+        .grid-cell-2
             input.form-control(type='text' ng-model=keyModel placeholder=keyPlaceholder)
         div
             label &nbsp;/&nbsp;
-        .grid-cell
+        .grid-cell-2
             input.form-control(type='text' ng-model=valModel placeholder=valPlaceholder)
 
 mixin table-pair(header, tblMdl, keyFld, valFld, keyPlaceholder, valPlaceholder)
@@ -56,7 +56,7 @@ mixin table-pair(header, tblMdl, keyFld, valFld, keyPlaceholder, valPlaceholder)
             tr.col-sm-12(ng-repeat='item in #{tblMdl}')
                 td.col-sm-6
                     div(ng-show='!tableEditing(field, $index)')
-                        a(ng-click='curPair = tableStartEdit(backupItem, field, $index);
curKey = curPair.#{keyFld}; curValue = curPair.#{valFld}') {{$index + 1}}) {{item.#{keyFld}}}
/ {{item.#{valFld}}}
+                        a.labelFormField(ng-click='curPair = tableStartEdit(backupItem, field,
$index); curKey = curPair.#{keyFld}; curValue = curPair.#{valFld}') {{$index + 1}}) {{item.#{keyFld}}}
/ {{item.#{valFld}}}
                         +btn-remove('tableRemove(backupItem, field, $index)')
                     div(ng-show='tableEditing(field, $index)')
                         label.labelField {{$index + 1}})
@@ -120,11 +120,10 @@ mixin details-row
                     tr(ng-repeat='item in #{detailMdl} track by $index')
                         td
                             div(ng-show='!tableEditing(detail, $index)')
+                                a.labelFormField(ng-click='curValue = tableStartEdit(backupItem,
detail, $index)') {{$index + 1}}) {{item}}
                                 +btn-remove('tableRemove(backupItem, detail, $index)')
                                 +btn-down('detail.reordering && tableSimpleDownVisible(backupItem,
detail, $index)', 'tableSimpleDown(backupItem, detail, $index)')
                                 +btn-up('detail.reordering && $index > 0', 'tableSimpleUp(backupItem,
detail, $index)')
-                                .input-tip
-                                    a(ng-click='curValue = tableStartEdit(backupItem, detail,
$index)') {{$index + 1}}) {{item}}
                             div(ng-show='tableEditing(detail, $index)')
                                 label.labelField {{$index + 1}})
                                 +btn-save('tableSimpleSaveVisible(curValue)', 'tableSimpleSave(tableSimpleValid,
backupItem, detail, curValue, $index)')
@@ -227,7 +226,7 @@ mixin form-row-custom(lblClasses, fieldClasses)
                     tr.col-sm-12(ng-repeat='item in #{fieldMdl} track by $index')
                         td.col-sm-6
                             div(ng-show='!tableEditing(field, $index)')
-                                a(ng-click='curValue = tableStartEdit(backupItem, field,
$index)') {{$index + 1}}) {{item | compact}}
+                                a.labelFormField(ng-click='curValue = tableStartEdit(backupItem,
field, $index)') {{$index + 1}}) {{item | compact}}
                                 +btn-remove('tableRemove(backupItem, field, $index)')
                                 +btn-down('field.reordering && tableSimpleDownVisible(backupItem,
field, $index)', 'tableSimpleDown(backupItem, field, $index)')
                                 +btn-up('field.reordering && $index > 0', 'tableSimpleUp(backupItem,
field, $index)')
@@ -255,7 +254,7 @@ mixin form-row-custom(lblClasses, fieldClasses)
                     tr.col-sm-12(ng-repeat='item in #{fieldMdl}')
                         td.col-sm-6
                             div(ng-show='!tableEditing(field, $index)')
-                                a(ng-click='curDbFldMeta = tableStartEdit(backupItem, field,
$index); curDbName = curDbFldMeta.dbName; curDbType = curDbFldMeta.dbType; curJavaName = curDbFldMeta.javaName;
curJavaType = curDbFldMeta.javaType') {{$index + 1}}) {{item.dbName}} / {{item.dbType}} /
{{item.javaName}} / {{item.javaType}}
+                                a.labelFormField(ng-click='curValue = tableStartEdit(backupItem,
field, $index)') {{$index + 1}}) {{item | compact}}(ng-click='curDbFldMeta = tableStartEdit(backupItem,
field, $index); curDbName = curDbFldMeta.dbName; curDbType = curDbFldMeta.dbType; curJavaName
= curDbFldMeta.javaName; curJavaType = curDbFldMeta.javaType') {{$index + 1}}) {{item.dbName}}
/ {{item.dbType}} / {{item.javaName}} / {{item.javaType}}
                                 +btn-remove('tableRemove(backupItem, field, $index)')
                             div(ng-if='tableEditing(field, $index)')
                                 label.labelField {{$index + 1}})
@@ -274,13 +273,15 @@ mixin form-row-custom(lblClasses, fieldClasses)
                 button.btn.btn-primary.fieldButton(ng-click='tableNewItem(field)') Add
             table.links-edit.col-sm-12(st-table=fieldMdl ng-show='#{fieldMdl}.length >
0')
                 tbody
-                    tr.col-sm-12(ng-repeat='item in #{fieldMdl}')
+                    tr.col-sm-12(ng-repeat='group in #{fieldMdl}')
                         td.col-sm-6
                             div
-                                a(ng-click='curGroup = tableStartEdit(backupItem, field,
$index); curName = curGroup.name; curFields = curGroup.fields') {{$index + 1}}) {{item.name}}
+                                a.labelFormField(ng-click='curGroup = tableStartEdit(backupItem,
field, $index); curName = curGroup.name; curFields = curGroup.fields') {{$index + 1}}) {{group.name}}
                                 +btn-remove('tableRemove(backupItem, field, $index)')
-                                table
-                                    tr(ng-repeat='z in item.fields')
+                                table.links-edit.col-sm-12(st-table='group.fields' ng-show='group.fields.length
> 0')
+                                    tr(ng-repeat='groupItem in group.fields')
                                         td
-                                            label {{$index + 1}}) {{z.name}} / {{z.className}}
/ {{z.direction}}
+                                            a.labelFormField('') {{$index + 1}}) {{groupItem.name}}
/ {{groupItem.className}} / {{groupItem.direction}}
+                                            +btn-remove('tableRemoveGroupItem(group, $index)')
+
 


Mime
View raw message