ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject ignite git commit: IGNITE-2253 Fixed validation message.
Date Thu, 28 Jan 2016 09:55:00 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc2 0f6b2d64a -> b2e0f3d94


IGNITE-2253 Fixed validation message.


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

Branch: refs/heads/ignite-843-rc2
Commit: b2e0f3d943de9b3fc077fb32f29cd92e17f2b53b
Parents: 0f6b2d6
Author: Dmitriyff <dmitriyff@gmail.com>
Authored: Thu Jan 28 16:55:48 2016 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Thu Jan 28 16:55:48 2016 +0700

----------------------------------------------------------------------
 .../form-field-java-class.directive.js                  |  2 ++
 .../form-field-java-class/form-field-java-class.jade    | 12 ++++++------
 .../main/js/app/modules/Form/field/label.directive.js   |  9 +++++++--
 3 files changed, 15 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b2e0f3d9/modules/control-center-web/src/main/js/app/directives/form-field-java-class/form-field-java-class.directive.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/directives/form-field-java-class/form-field-java-class.directive.js
b/modules/control-center-web/src/main/js/app/directives/form-field-java-class/form-field-java-class.directive.js
index 00e6177..d0f7254 100644
--- a/modules/control-center-web/src/main/js/app/directives/form-field-java-class/form-field-java-class.directive.js
+++ b/modules/control-center-web/src/main/js/app/directives/form-field-java-class/form-field-java-class.directive.js
@@ -24,6 +24,8 @@ export default ['igniteFormFieldJavaClass', ['IgniteFormGUID', (guid) =>
{
 
         scope.form = form;
         scope.field = field;
+        scope.label = label;
+
         label.for = scope.id = id || guid();
 
         scope.$watch('required', (required) => {

http://git-wip-us.apache.org/repos/asf/ignite/blob/b2e0f3d9/modules/control-center-web/src/main/js/app/directives/form-field-java-class/form-field-java-class.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/directives/form-field-java-class/form-field-java-class.jade
b/modules/control-center-web/src/main/js/app/directives/form-field-java-class/form-field-java-class.jade
index f2e4b73..58c60da 100644
--- a/modules/control-center-web/src/main/js/app/directives/form-field-java-class/form-field-java-class.jade
+++ b/modules/control-center-web/src/main/js/app/directives/form-field-java-class/form-field-java-class.jade
@@ -1,6 +1,6 @@
 mixin feedback(error, message)
     i.fa.fa-exclamation-triangle.form-control-feedback(
-        ng-show='!form[name].$pristine && form[name].$error.#{error}'
+        ng-if='!form[name].$pristine && form[name].$error.#{error}'
         bs-tooltip='"#{message}"'
     )
 
@@ -28,8 +28,8 @@ div
     )
         span(ng-transclude)
 
-        +feedback('javaIdentifier', '{{ name }} is invalid!')
-        +feedback('required', '{{ name }} could not be empty!')
-        +feedback('javaKeywords', '{{ name }} could not contains reserved Java keyword!')
-        +feedback('javaBuiltInClass', '{{ name }} should not be the Java built-in class!')
-        +feedback('javaPackageSpecified', '{{ name }} does not have package specified!')
+        +feedback('javaIdentifier', '{{ label.name }} is invalid!')
+        +feedback('required', '{{ label.name }} could not be empty!')
+        +feedback('javaKeywords', '{{ label.name }} could not contains reserved Java keyword!')
+        +feedback('javaBuiltInClass', '{{ label.name }} should not be the Java built-in class!')
+        +feedback('javaPackageSpecified', '{{ label.name }} does not have package specified!')

http://git-wip-us.apache.org/repos/asf/ignite/blob/b2e0f3d9/modules/control-center-web/src/main/js/app/modules/Form/field/label.directive.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/Form/field/label.directive.js
b/modules/control-center-web/src/main/js/app/modules/Form/field/label.directive.js
index f5f1c59..d22df2c 100644
--- a/modules/control-center-web/src/main/js/app/modules/Form/field/label.directive.js
+++ b/modules/control-center-web/src/main/js/app/modules/Form/field/label.directive.js
@@ -20,8 +20,13 @@ export default ['igniteFormFieldLabel', [() => {
         restrict: 'E',
         compile() {
             return {
-                post($scope, $element, $attrs, $ctrl, $transclude) {
+                post($scope, $element, $attrs, [form, field], $transclude) {
                     $transclude($scope, function(clone) {
+                        const text = clone.text();
+
+                        if (/(.*):$/.test(text))
+                            field.name = /(.*):$/.exec(text)[1];
+
                         const $label = $element.parent().parent().find('label');
 
                         $label.append(clone);
@@ -31,6 +36,6 @@ export default ['igniteFormFieldLabel', [() => {
         },
         replace: true,
         transclude: true,
-        require: '^form'
+        require: ['^form', '?^igniteFormField']
     };
 }]];


Mime
View raw message