ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [08/28] ignite git commit: IGNITE-843 Implemented support of "required" for number fields.
Date Thu, 03 Mar 2016 12:07:15 GMT
IGNITE-843 Implemented support of "required" for number fields.


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

Branch: refs/heads/ignite-843-rc3
Commit: 9aa0a573790c89ba0893d140160759d14f4a90fa
Parents: c772d33
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Thu Feb 25 17:16:16 2016 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Thu Feb 25 17:16:16 2016 +0700

----------------------------------------------------------------------
 .../src/main/js/app/modules/form/field/input/number.directive.js | 4 ++++
 .../src/main/js/app/modules/form/field/input/number.jade         | 1 +
 2 files changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/9aa0a573/modules/control-center-web/src/main/js/app/modules/form/field/input/number.directive.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/form/field/input/number.directive.js
b/modules/control-center-web/src/main/js/app/modules/form/field/input/number.directive.js
index b88425f..cc135b5 100644
--- a/modules/control-center-web/src/main/js/app/modules/form/field/input/number.directive.js
+++ b/modules/control-center-web/src/main/js/app/modules/form/field/input/number.directive.js
@@ -25,6 +25,10 @@ export default ['igniteFormFieldInputNumber', ['IgniteFormGUID', (guid)
=> {
         scope.field = field;
         label.for = scope.id = id || guid();
 
+        scope.$watch('required', (required) => {
+            label.required = required || false;
+        });
+
         form.$defaults = form.$defaults || {};
         form.$defaults[name] = _.cloneDeep(scope.value);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/9aa0a573/modules/control-center-web/src/main/js/app/modules/form/field/input/number.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/app/modules/form/field/input/number.jade
b/modules/control-center-web/src/main/js/app/modules/form/field/input/number.jade
index 6b31ebd..920a5eb 100644
--- a/modules/control-center-web/src/main/js/app/modules/form/field/input/number.jade
+++ b/modules/control-center-web/src/main/js/app/modules/form/field/input/number.jade
@@ -40,5 +40,6 @@ mixin feedback(error, message)
     +feedback('min', 'Value is less than allowable minimum: {{ min || 0 }}')
     +feedback('max', 'Value is more than allowable maximum: {{ max }}')
     +feedback('number', 'Only numbers allowed')
+    +feedback('required', 'This field could not be empty')
 
     span(ng-transclude='')


Mime
View raw message