nice-elements 1.13.4 → 1.13.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +1 -1
- package/bower.json +1 -1
- package/dist/nice.js +8 -3
- package/dist/nice.min.js +1 -1
- package/package.json +1 -1
- package/src/components/nice-input/nice-input.html +44 -4
- package/src/components/nice-input/nice-input.js +5 -1
- package/src/services/nice-service.js +1 -1
package/package.json
CHANGED
|
@@ -5,15 +5,55 @@
|
|
|
5
5
|
|
|
6
6
|
<!------------------------- Field ------------------------->
|
|
7
7
|
<div class="nice-field col-xs-12" ng-class="fieldWidth ? fieldWidth : 'col-sm-8'">
|
|
8
|
-
<div
|
|
8
|
+
<div
|
|
9
|
+
class="input-group"
|
|
10
|
+
ng-class="{
|
|
9
11
|
'has-feedback': showValid && !hideValid,
|
|
10
12
|
'has-warning': !isDisabled && forma.$invalid && forma.$dirty && !hideValid,
|
|
11
13
|
'has-success': !isDisabled && forma.$valid && forma.$dirty && showValid,
|
|
12
14
|
'symbol': symbol,
|
|
13
15
|
'nice-disabled': isDisabled
|
|
14
|
-
}"
|
|
15
|
-
|
|
16
|
-
<
|
|
16
|
+
}"
|
|
17
|
+
>
|
|
18
|
+
<textarea
|
|
19
|
+
ng-if="textArea"
|
|
20
|
+
class="form-control"
|
|
21
|
+
ng-model="$parent.internalModel"
|
|
22
|
+
id="{{ id }}"
|
|
23
|
+
tabindex="{{ tabIndex }}"
|
|
24
|
+
placeholder="{{ placeholder }}"
|
|
25
|
+
rows="{{ textAreaLines }}"
|
|
26
|
+
max="{{ max }}"
|
|
27
|
+
min="{{ min }}"
|
|
28
|
+
autocomplete="{{ autocomplete }}"
|
|
29
|
+
ng-minlength="minlength"
|
|
30
|
+
ng-maxlength="maxlength"
|
|
31
|
+
ng-required="required"
|
|
32
|
+
ng-pattern="regexexp"
|
|
33
|
+
ng-disabled="isDisabled"
|
|
34
|
+
></textarea>
|
|
35
|
+
|
|
36
|
+
<input
|
|
37
|
+
ng-if="!textArea"
|
|
38
|
+
class="form-control"
|
|
39
|
+
type="{{ internalType }}"
|
|
40
|
+
inputmode="{{ inputMode }}"
|
|
41
|
+
ng-model="$parent.internalModel"
|
|
42
|
+
name="{{ name }}"
|
|
43
|
+
id="{{ id }}"
|
|
44
|
+
tabindex="{{ tabIndex }}"
|
|
45
|
+
placeholder="{{ placeholder }}"
|
|
46
|
+
max="{{ max }}"
|
|
47
|
+
min="{{ min }}"
|
|
48
|
+
autocomplete="{{ autocomplete }}"
|
|
49
|
+
ng-minlength="minlength"
|
|
50
|
+
ng-maxlength="maxlength"
|
|
51
|
+
ng-required="required"
|
|
52
|
+
ng-keypress="keypress($event)"
|
|
53
|
+
ng-pattern="regexexp"
|
|
54
|
+
ng-disabled="isDisabled"
|
|
55
|
+
ng-trim="{{ !disableTrim }}"
|
|
56
|
+
/>
|
|
17
57
|
|
|
18
58
|
<div class="input-group-addon" ng-if="symbol">{{ symbol }}</div>
|
|
19
59
|
<button type="button" class="input-group-btn" ng-if="!multilanguageDisabled && multilanguageField" ng-click="openMultilanguage()">
|
|
@@ -42,7 +42,8 @@ angular.module('niceElements')
|
|
|
42
42
|
multilanguage: '=?', // Multiple languages object
|
|
43
43
|
multilanguageField: '@?', // Multiple languages field name
|
|
44
44
|
multilanguageDisabled: '=', // Multiple languages field disabled
|
|
45
|
-
autocomplete: "@?"
|
|
45
|
+
autocomplete: "@?",
|
|
46
|
+
disableTrim: "@?"
|
|
46
47
|
},
|
|
47
48
|
controller: function ($scope, $attrs, $rootScope, $element, ngDialog) {
|
|
48
49
|
if (!$attrs.type) { $attrs.type = 'text'; }
|
|
@@ -57,6 +58,7 @@ angular.module('niceElements')
|
|
|
57
58
|
if (!$attrs.symbol) { $attrs.symbol = ''; }
|
|
58
59
|
if (!$attrs.help) { $attrs.help = ''; }
|
|
59
60
|
if (!$attrs.name) { $attrs.name = ''; }
|
|
61
|
+
if (!$attrs.disableTrim) { $attrs.disableTrim = false; }
|
|
60
62
|
if (!$attrs.minDecimalsCutZeros) { $attrs.minDecimalsCutZeros = 0; }
|
|
61
63
|
$attrs.hideValid = $attrs.hideValid === 'true' || $attrs.hideValid === true;
|
|
62
64
|
$attrs.showValid = $attrs.showValid === 'true' || $attrs.showValid === true;
|
|
@@ -103,6 +105,8 @@ angular.module('niceElements')
|
|
|
103
105
|
$scope.inputMode = "email";
|
|
104
106
|
// TODO: get rid of the errors
|
|
105
107
|
$scope.regexexp = new RegExp('^[_a-zA-Z0-9]+(.[_a-zA-Z0-9]+)*@[a-zA-Z0-9]+(.[a-zA-Z0-9]+)+(.[a-zA-Z]{2,4})');
|
|
108
|
+
} else {
|
|
109
|
+
$scope.internalType = "text";
|
|
106
110
|
}
|
|
107
111
|
|
|
108
112
|
if (angular.isDefined($scope.valid)) {
|