ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [02/50] [abbrv] ignite git commit: IGNITE-843 Fixed validator for java classes.
Date Mon, 28 Mar 2016 08:47:42 GMT
IGNITE-843 Fixed validator for java classes.


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

Branch: refs/heads/ignite-2875
Commit: 6b017f019a834c1b1ab8d8f705f3ef75d02967b2
Parents: ec3150d
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Thu Mar 17 18:06:24 2016 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Thu Mar 17 18:06:24 2016 +0700

----------------------------------------------------------------------
 .../form-field-java-class/form-field-java-class.directive.js  | 3 ++-
 .../form-field-java-class/form-field-java-class.jade          | 6 +++---
 .../src/main/js/app/modules/form/group/group.directive.js     | 7 +++----
 3 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6b017f01/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 8c857f0..f1f66c9 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
@@ -26,6 +26,7 @@ export default ['igniteFormFieldJavaClass', ['IgniteFormGUID', (guid) =>
{
         scope.ngModel = ngModel;
         scope.form = form;
         scope.label = label;
+        scope.name = scope.ngModelName + 'JavaClass';
 
         scope.$watch('required', (required) => {
             label.required = required || false;
@@ -62,7 +63,7 @@ export default ['igniteFormFieldJavaClass', ['IgniteFormGUID', (guid) =>
{
         restrict: 'E',
         scope: {
             id: '@',
-            name: '@',
+            ngModelName: '@name',
             placeholder: '@',
             required: '=ngRequired',
             disabled: '=ngDisabled',

http://git-wip-us.apache.org/repos/asf/ignite/blob/6b017f01/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 6b56e6a..3078b80 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
@@ -16,7 +16,7 @@
 
 mixin feedback(error, message)
     i.fa.fa-exclamation-triangle.form-control-feedback(
-        ng-if='!form[name+"JavaClass"].$pristine && form[name+"JavaClass"].$error.#{error}'
+        ng-if='!form[name].$pristine && form[name].$error.#{error}'
         bs-tooltip='"{{ label.name }} #{message}"'
         ignite-error='#{error}'
         ignite-error-message='{{ label.name }} #{message}'
@@ -24,8 +24,8 @@ mixin feedback(error, message)
 
 .input-tip
     input.form-control(
-        id='{{ id }}'
-        name='{{ name }}JavaClass'
+        id='{{ id }}JavaClass'
+        name='{{ name }}'
         placeholder='Enter fully qualified class name'
         type='text'
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6b017f01/modules/control-center-web/src/main/js/app/modules/form/group/group.directive.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/form/group/group.directive.js
b/modules/control-center-web/src/main/js/app/modules/form/group/group.directive.js
index d5fedfd..5039d6f 100644
--- a/modules/control-center-web/src/main/js/app/modules/form/group/group.directive.js
+++ b/modules/control-center-web/src/main/js/app/modules/form/group/group.directive.js
@@ -34,7 +34,7 @@ export default ['igniteFormGroup', [() => {
         parentFormCtrl.$defaults = parentFormCtrl.$defaults || {};
 
         if (parentFormCtrl.$pristine) {
-            if (!(_.isNull(parentFormCtrl.$defaults[name]) || _.isUndefined(parentFormCtrl.$defaults[name])))

+            if (!(_.isNull(parentFormCtrl.$defaults[name]) || _.isUndefined(parentFormCtrl.$defaults[name])))
                 scope.ngModel = parentFormCtrl.$defaults[name];
             else
                 parentFormCtrl.$defaults[name] = _.cloneDeep(scope.ngModel);
@@ -50,11 +50,10 @@ export default ['igniteFormGroup', [() => {
         };
 
         const setAsDirty = () => {
-            if (JSON.stringify(scope.ngModel) !== JSON.stringify(parentFormCtrl.$defaults[name])){
+            if (JSON.stringify(scope.ngModel) !== JSON.stringify(parentFormCtrl.$defaults[name]))
                 ngModelCtrl.$setDirty();
-            }else{
+            else
                 ngModelCtrl.$setPristine();
-            }
         };
 
         scope.$watch(() => parentFormCtrl.$pristine, setAsDefault);


Mime
View raw message