ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [1/7] ignite git commit: IGNITE-1939 Fixed $selectAll, $selectNone.
Date Thu, 11 Feb 2016 12:31:52 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc3 aca04bc3b -> 84207e6a2


IGNITE-1939 Fixed $selectAll, $selectNone.


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

Branch: refs/heads/ignite-843-rc3
Commit: 4278569c1808db44840508cb4b9b7efd938be1e7
Parents: aca04bc
Author: Andrey <anovikov@gridgain.com>
Authored: Thu Feb 11 11:23:47 2016 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Thu Feb 11 11:23:47 2016 +0700

----------------------------------------------------------------------
 .../src/main/js/app/decorator/select.js         | 67 ++++++++++++++++++++
 .../control-center-web/src/main/js/app/index.js |  2 +
 .../control-center-web/src/main/js/config.js    | 53 ++++++++--------
 .../control-center-web/src/main/js/package.json | 18 +++---
 .../src/main/js/serve/routes/admin.js           |  4 +-
 .../src/main/js/views/templates/select.jade     |  4 +-
 6 files changed, 107 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4278569c/modules/control-center-web/src/main/js/app/decorator/select.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/decorator/select.js b/modules/control-center-web/src/main/js/app/decorator/select.js
new file mode 100644
index 0000000..f770fc1
--- /dev/null
+++ b/modules/control-center-web/src/main/js/app/decorator/select.js
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import angular from 'angular';
+
+angular.module('mgcrea.ngStrap.select')
+    .decorator('$select', ($delegate) => {
+        function SelectFactoryDecorated(element, controller, config) {
+            const deligate = $delegate(element, controller, config);
+
+            const scope = deligate.$scope;
+
+            const $selectAllDeligate = scope.$selectAll;
+
+            scope.$selectAll = () => {
+                if (scope.$isMultiple) {
+                    const newActiveIndex = [];
+
+                    for (let i = 0; i < scope.$matches.length; i++)
+                        newActiveIndex.push(i);
+
+                    scope.$activeIndex = newActiveIndex;
+
+                    controller.$setViewValue(scope.$activeIndex.map((index) => {
+                        if (angular.isUndefined(scope.$matches[index]))
+                            return null;
+
+                        return scope.$matches[index].value;
+                    }));
+                }
+                else
+                    $selectAllDeligate();
+            };
+
+            const $selectNoneDeligate = scope.$selectNone;
+
+            scope.$selectNone = () => {
+                if (scope.$isMultiple) {
+                    scope.$activeIndex = [];
+
+                    controller.$setViewValue([]);
+                }
+                else
+                    $selectNoneDeligate();
+            };
+
+            return deligate;
+        }
+
+        SelectFactoryDecorated.defaults = $delegate.defaults;
+
+        return SelectFactoryDecorated;
+    });

http://git-wip-us.apache.org/repos/asf/ignite/blob/4278569c/modules/control-center-web/src/main/js/app/index.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/index.js b/modules/control-center-web/src/main/js/app/index.js
index 30dc3ba..7862054 100644
--- a/modules/control-center-web/src/main/js/app/index.js
+++ b/modules/control-center-web/src/main/js/app/index.js
@@ -56,6 +56,8 @@ import 'angular-ui-grid/ui-grid.css!';
 import 'angular-loading/angular-loading.css!';
 import 'angular-motion/dist/angular-motion.css!';
 
+import './decorator/select';
+
 import './modules/form/form.module';
 import './modules/JavaTypes/JavaTypes.provider';
 import './modules/QueryNotebooks/QueryNotebooks.provider';

http://git-wip-us.apache.org/repos/asf/ignite/blob/4278569c/modules/control-center-web/src/main/js/config.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/config.js b/modules/control-center-web/src/main/js/config.js
index 136d52e..4868aef 100644
--- a/modules/control-center-web/src/main/js/config.js
+++ b/modules/control-center-web/src/main/js/config.js
@@ -17,22 +17,22 @@ System.config({
     "Blob": "github:eligrey/Blob.js@master",
     "FileSaver": "github:eligrey/FileSaver.js@master",
     "ace": "github:ajaxorg/ace-builds@1.2.3",
-    "angular": "github:angular/bower-angular@1.4.9",
+    "angular": "github:angular/bower-angular@1.5.0",
     "angular-ag-grid": "github:ceolter/ag-grid@2.3.5",
-    "angular-animate": "github:angular/bower-angular-animate@1.4.9",
-    "angular-drag-and-drop-lists": "github:marceljuenemann/angular-drag-and-drop-lists@1.3.0",
+    "angular-animate": "github:angular/bower-angular-animate@1.5.0",
+    "angular-drag-and-drop-lists": "github:marceljuenemann/angular-drag-and-drop-lists@1.4.0",
     "angular-grid": "github:ceolter/ag-grid@2.3.5",
     "angular-loading": "github:darthwade/angular-loading@0.1.4",
     "angular-motion": "github:mgcrea/angular-motion@0.4.3",
     "angular-nvd3": "github:krispo/angular-nvd3@1.0.5",
-    "angular-retina": "github:jrief/angular-retina@0.3.8",
-    "angular-sanitize": "github:angular/bower-angular-sanitize@1.4.9",
+    "angular-retina": "github:jrief/angular-retina@0.3.9",
+    "angular-sanitize": "github:angular/bower-angular-sanitize@1.5.0",
     "angular-smart-table": "github:lorenzofox3/Smart-Table@2.1.7",
-    "angular-strap": "github:akuznetsov-gridgain/angular-strap@fix-1852-2.3.6",
+    "angular-strap": "github:mgcrea/angular-strap@2.3.7",
     "angular-tree-control": "github:wix/angular-tree-control@0.2.23",
     "angular-ui-ace": "github:angular-ui/ui-ace@0.2.3",
-    "angular-ui-grid": "github:angular-ui/bower-ui-grid@3.1.0",
-    "angular-ui-router": "github:angular-ui/ui-router@0.2.17",
+    "angular-ui-grid": "github:angular-ui/bower-ui-grid@3.1.1",
+    "angular-ui-router": "github:angular-ui/ui-router@0.2.18",
     "angular-ui-router-title": "github:nonplus/angular-ui-router-title@0.0.4",
     "babel": "npm:babel-core@5.8.35",
     "babel-runtime": "npm:babel-runtime@5.8.35",
@@ -53,28 +53,22 @@ System.config({
     "pdfmake": "github:bpampuch/pdfmake@0.1.20",
     "query-command-supported": "github:zenorocha/document.queryCommandSupported@1.0.0",
     "spinjs": "github:fgnass/spin.js@2.3.2",
-    "github:akuznetsov-gridgain/angular-strap@fix-1852-2.3.6": {
-      "angular": "github:angular/bower-angular@1.4.9",
-      "angular-animate": "github:angular/bower-angular-animate@1.4.9",
-      "angular-motion": "github:mgcrea/angular-motion@0.4.3",
-      "angular-sanitize": "github:angular/bower-angular-sanitize@1.4.9"
-    },
-    "github:angular-ui/bower-ui-grid@3.1.0": {
+    "github:angular-ui/bower-ui-grid@3.1.1": {
       "pdfmake": "github:bpampuch/pdfmake@0.1.20"
     },
     "github:angular-ui/ui-ace@0.2.3": {
       "ace": "github:ajaxorg/ace-builds@1.2.3"
     },
-    "github:angular-ui/ui-router@0.2.17": {
-      "angular": "github:angular/bower-angular@1.4.9"
+    "github:angular-ui/ui-router@0.2.18": {
+      "angular": "github:angular/bower-angular@1.5.0"
     },
-    "github:angular/bower-angular-animate@1.4.9": {
-      "angular": "github:angular/bower-angular@1.4.9"
+    "github:angular/bower-angular-animate@1.5.0": {
+      "angular": "github:angular/bower-angular@1.5.0"
     },
-    "github:angular/bower-angular-sanitize@1.4.9": {
-      "angular": "github:angular/bower-angular@1.4.9"
+    "github:angular/bower-angular-sanitize@1.5.0": {
+      "angular": "github:angular/bower-angular@1.5.0"
     },
-    "github:angular/bower-angular@1.4.9": {
+    "github:angular/bower-angular@1.5.0": {
       "jquery": "github:components/jquery@2.2.0"
     },
     "github:darthwade/angular-loading@0.1.4": {
@@ -131,22 +125,25 @@ System.config({
       "vm-browserify": "npm:vm-browserify@0.0.4"
     },
     "github:krispo/angular-nvd3@1.0.5": {
-      "angular": "github:angular/bower-angular@1.4.9",
+      "angular": "github:angular/bower-angular@1.5.0",
       "d3": "npm:d3@3.5.14",
       "nvd3": "npm:nvd3@1.8.1"
     },
-    "github:marceljuenemann/angular-drag-and-drop-lists@1.3.0": {
-      "angular": "github:angular/bower-angular@1.4.9"
-    },
     "github:mgcrea/angular-motion@0.4.3": {
-      "angular": "github:angular/bower-angular@1.4.9",
+      "angular": "github:angular/bower-angular@1.5.0",
       "css": "github:systemjs/plugin-css@0.1.20"
     },
+    "github:mgcrea/angular-strap@2.3.7": {
+      "angular": "github:angular/bower-angular@1.5.0",
+      "angular-animate": "github:angular/bower-angular-animate@1.5.0",
+      "angular-motion": "github:mgcrea/angular-motion@0.4.3",
+      "angular-sanitize": "github:angular/bower-angular-sanitize@1.5.0"
+    },
     "github:twbs/bootstrap@3.3.6": {
       "jquery": "github:components/jquery@2.2.0"
     },
     "github:wix/angular-tree-control@0.2.23": {
-      "angular": "github:angular/bower-angular@1.4.9"
+      "angular": "github:angular/bower-angular@1.5.0"
     },
     "npm:acorn-globals@1.0.9": {
       "acorn": "npm:acorn@2.7.0"

http://git-wip-us.apache.org/repos/asf/ignite/blob/4278569c/modules/control-center-web/src/main/js/package.json
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/package.json b/modules/control-center-web/src/main/js/package.json
index e526d86..3c36eeb 100644
--- a/modules/control-center-web/src/main/js/package.json
+++ b/modules/control-center-web/src/main/js/package.json
@@ -70,16 +70,16 @@
   "jspm": {
     "dependencies": {
       "ace": "github:ajaxorg/ace-builds@^1.2.2",
-      "angular": "github:angular/bower-angular@^1.4.8",
-      "angular-animate": "github:angular/bower-angular-animate@^1.4.8",
+      "angular": "github:angular/bower-angular@^1.5.0",
+      "angular-animate": "github:angular/bower-angular-animate@^1.5.0",
       "angular-drag-and-drop-lists": "github:marceljuenemann/angular-drag-and-drop-lists@^1.3.0",
       "angular-loading": "github:darthwade/angular-loading@^0.1.4",
       "angular-motion": "github:mgcrea/angular-motion@^0.4.3",
       "angular-nvd3": "github:krispo/angular-nvd3@^1.0.4",
       "angular-retina": "github:jrief/angular-retina@^0.3.8",
-      "angular-sanitize": "github:angular/bower-angular-sanitize@^1.4.8",
+      "angular-sanitize": "github:angular/bower-angular-sanitize@^1.5.0",
       "angular-smart-table": "github:lorenzofox3/Smart-Table@^2.1.4",
-      "angular-strap": "github:akuznetsov-gridgain/angular-strap@fix-1852-2.3.6",
+      "angular-strap": "github:mgcrea/angular-strap@^2.3.7",
       "angular-tree-control": "github:wix/angular-tree-control@^0.2.23",
       "angular-ui-ace": "github:angular-ui/ui-ace@^0.2.3",
       "angular-ui-grid": "github:angular-ui/bower-ui-grid@^3.0.7",
@@ -105,7 +105,7 @@
       "core-js": "npm:core-js@^1.1.4"
     },
     "overrides": {
-      "github:angular/bower-angular@1.4.8": {
+      "github:angular/bower-angular@1.5.0": {
         "format": "global",
         "dependencies": {
           "jquery": "github:components/jquery@^2.1.4"
@@ -217,13 +217,13 @@
           "pdfmake": "github:bpampuch/pdfmake@^0.1.20"
         }
       },
-      "github:akuznetsov-gridgain/angular-strap@fix-1852-2.3.6": {
+      "github:mgcrea/angular-strap@2.3.7": {
         "main": "dist/angular-strap.tpl",
         "dependencies": {
-          "angular": "github:angular/bower-angular@^1.4.8",
-          "angular-animate": "github:angular/bower-angular-animate@^1.4.8",
+          "angular": "github:angular/bower-angular@^1.5.0",
+          "angular-animate": "github:angular/bower-angular-animate@^1.5.0",
           "angular-motion": "github:mgcrea/angular-motion@^0.4.3",
-          "angular-sanitize": "github:angular/bower-angular-sanitize@^1.4.8"
+          "angular-sanitize": "github:angular/bower-angular-sanitize@^1.5.0"
         },
         "shim": {
           "dist/angular-strap.tpl": {

http://git-wip-us.apache.org/repos/asf/ignite/blob/4278569c/modules/control-center-web/src/main/js/serve/routes/admin.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/serve/routes/admin.js b/modules/control-center-web/src/main/js/serve/routes/admin.js
index a79d584..013ae5f 100644
--- a/modules/control-center-web/src/main/js/serve/routes/admin.js
+++ b/modules/control-center-web/src/main/js/serve/routes/admin.js
@@ -19,10 +19,10 @@
 
 module.exports = {
     implements: 'admin-routes',
-    inject: ['require(lodash)', 'require(express)', 'require(nodemailer)', 'mongo']
+    inject: ['require(lodash)', 'require(express)', 'require(nodemailer)', 'settings', 'mongo']
 };
 
-module.exports.factory = function (_, express, nodemailer, mongo) {
+module.exports.factory = function (_, express, nodemailer, settings, mongo) {
     return new Promise((resolve) => {
         const router = express.Router();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4278569c/modules/control-center-web/src/main/js/views/templates/select.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/templates/select.jade b/modules/control-center-web/src/main/js/views/templates/select.jade
index 5825d1e..3feee61 100644
--- a/modules/control-center-web/src/main/js/views/templates/select.jade
+++ b/modules/control-center-web/src/main/js/views/templates/select.jade
@@ -16,8 +16,8 @@
 
 ul.select.dropdown-menu(tabindex='-1' ng-show='$isVisible()' role='select')
     li(ng-if='$showAllNoneButtons || ($isMultiple && $matches.length > 2)')
-        a(id='li-dropdown-select-all' ng-click='$selectAllAtOnce()') {{$allText}} ({{$matches.length}})
-        a(id='li-dropdown-select-none' ng-click='$selectNoneAtOnce()') {{$noneText}}
+        a(id='li-dropdown-select-all' ng-click='$selectAll()') {{$allText}} ({{$matches.length}})
+        a(id='li-dropdown-select-none' ng-click='$selectNone()') {{$noneText}}
         hr(style='margin: 5px 0')
     li(role='presentation' ng-repeat='match in $matches')
         hr(ng-if='match.value == undefined' style='margin: 5px 0')


Mime
View raw message