File tree Expand file tree Collapse file tree 4 files changed +18
-28
lines changed
src/Umbraco.Web.UI.Client/src
common/directives/components/forms Expand file tree Collapse file tree 4 files changed +18
-28
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ angular.module("umbraco.directives")
1717 }
1818
1919 $ ( element ) . on ( "keypress" , function ( event ) {
20- if ( event . which === 13 ) {
20+ if ( event . which === 13 && enabled === true ) {
2121 event . preventDefault ( ) ;
2222 }
2323 } ) ;
Original file line number Diff line number Diff line change 2424@param {boolean } model Set to <code>true</code> or <code>false</code> to set the checkbox to checked or unchecked.
2525@param {string } inputId Set the <code>id</code> of the checkbox.
2626@param {string } text Set the text for the checkbox label.
27- @param {string } labelKey Set a dictinary /localization string for the checkbox label
27+ @param {string } labelKey Set a dictionary /localization string for the checkbox label
2828@param {callback } onChange Callback when the value of the checkbox change by interaction.
2929@param {boolean } autoFocus Add autofocus to the input field
3030@param {boolean } preventSubmitOnEnter Set the enter prevent directive or not
4242 vm . change = change ;
4343
4444 function onInit ( ) {
45- vm . inputId = vm . inputId || "umb-check_" + String . CreateGuid ( ) ;
45+ vm . inputId = vm . inputId || "umb-search-filter_" + String . CreateGuid ( ) ;
46+ vm . autoFocus = Object . toBoolean ( vm . autoFocus ) === true ;
47+ vm . preventSubmitOnEnter = Object . toBoolean ( vm . preventSubmitOnEnter ) === true ;
4648
4749 // If a labelKey is passed let's update the returned text if it's does not contain an opening square bracket [
4850 if ( vm . labelKey ) {
4951 localizationService . localize ( vm . labelKey ) . then ( function ( data ) {
50- if ( data . indexOf ( '[' ) === - 1 ) {
51- vm . text = data ;
52+ if ( data . indexOf ( '[' ) === - 1 ) {
53+ vm . text = data ;
5254 }
5355 } ) ;
5456 }
Original file line number Diff line number Diff line change @@ -21,11 +21,12 @@ html .umb-search-filter {
2121 // "icon-search" class it kept for backward compatibility
2222 .umb-icon ,
2323 .icon-search {
24- color : #d8d7d9 ;
24+ color : @gray-8 ;
2525 position : absolute ;
2626 top : 0 ;
2727 bottom : 0 ;
2828 left : 10px ;
2929 margin : auto 0 ;
30+ pointer-events : none ;
3031 }
3132}
Original file line number Diff line number Diff line change 22 < div class ="umb-search-filter " ng-class ="vm.cssClass ">
33 < label for ="{{vm.inputId}} " class ="sr-only "> {{vm.text}}</ label >
44 < umb-icon icon ="icon-search " class ="icon-search "> </ umb-icon >
5- < input
6- ng-if ="vm.preventSubmitOnEnter "
7- id ="{{vm.inputId}} "
8- type ="text "
9- ng-change ="vm.change() "
10- ng-model ="vm.model "
11- class ="umb-search-filter__input "
12- placeholder ="{{vm.text}} "
13- umb-auto-focus ="{{vm.autoFocus === true}} "
14- prevent-enter-submit
15- no-dirty-check />
16-
17- < input
18- ng-if ="!vm.preventSubmitOnEnter "
19- id ="{{vm.inputId}} "
20- type ="text "
21- ng-change ="vm.change() "
22- ng-model ="vm.model "
23- class ="umb-search-filter__input {{vm.cssClass}} "
24- placeholder ="{{vm.text}} "
25- umb-auto-focus ="{{vm.autoFocus === true}} "
26- no-dirty-check />
5+ < input type ="text "
6+ id ="{{vm.inputId}} "
7+ ng-change ="vm.change() "
8+ ng-model ="vm.model "
9+ class ="umb-search-filter__input "
10+ placeholder ="{{vm.text}} "
11+ umb-auto-focus ="{{vm.autoFocus}} "
12+ prevent-enter-submit ="{{vm.preventSubmitOnEnter}} "
13+ no-dirty-check />
2714 </ div >
2815</ div >
You can’t perform that action at this time.
0 commit comments