diff options
-rw-r--r-- | README.md | 7 | ||||
-rw-r--r-- | angular-multi-select.js | 29 |
2 files changed, 31 insertions, 5 deletions
@@ -16,9 +16,10 @@ See changelog.md Note -- -<br />If you have any problem, just open an issue in https://github.com/isteven/angular-multi-select. -<br />Pardon the some incorrect HTML highlighting. Apparently highlight.js breaks when it sees on-open="function()" etc. -<br />If you like / use this directive in your awesome projects, star this repo. It's a huge motivation for me. Thanks! +If you have any problem, just open an issue in <a href="https://github.com/isteven/angular-multi-select">https://github.com/isteven/angular-multi-select</a>.<br /> +This directive is a practical solution, not a performance champion. It will not win any code efficiency competition.<br /> +Pardon some incorrect HTML highlighting in this document. Apparently highlight.js breaks when it sees on-open="function()" etc.<br /> +If you like / use this directive in your awesome projects, star this repo. It's a huge motivation for me. Would also love to hear from you if you use it in an open source project. Thanks!<br /> Licence -- diff --git a/angular-multi-select.js b/angular-multi-select.js index 003c3ce..eedb172 100644 --- a/angular-multi-select.js +++ b/angular-multi-select.js @@ -59,12 +59,25 @@ angular.module( 'multi-select', ['ng'] ).directive( 'multiSelect' , [ '$sce', '$ // settings based on input model property tickProperty : '@', disableProperty : '@', +<<<<<<< HEAD groupProperty : '@', // callbacks onClose : '&', onItemClick : '&', onOpen : '&' +======= + orientation : '@', + defaultLabel : '@', + maxLabels : '@', + isDisabled : '=', + directiveId : '@', + helperElements : '@', + onOpen : '&', + onClose : '&', + onBlur : '&', + onFocus : '&', +>>>>>>> 93c81c29e84ff5859b4d4b294b04687f2198493e }, template: @@ -439,10 +452,14 @@ angular.module( 'multi-select', ['ng'] ).directive( 'multiSelect' , [ '$sce', '$ // refresh button label... if ( $scope.selectedItems.length === 0 ) { +<<<<<<< HEAD // https://github.com/isteven/angular-multi-select/pull/19 $scope.varButtonLabel = ( typeof $scope.defaultLabel !== 'undefined' ) ? $scope.defaultLabel : 'None selected'; +======= + $scope.varButtonLabel = ($scope.defaultLabel)? $scope.defaultLabel : 'None selected'; +>>>>>>> 93c81c29e84ff5859b4d4b294b04687f2198493e } - else { + else { var tempMaxLabels = $scope.selectedItems.length; if ( typeof $scope.maxLabels !== 'undefined' && $scope.maxLabels !== '' ) { tempMaxLabels = $scope.maxLabels; @@ -463,14 +480,22 @@ angular.module( 'multi-select', ['ng'] ).directive( 'multiSelect' , [ '$sce', '$ } ctr++; } - }); + }); if ( $scope.more === true ) { +<<<<<<< HEAD // https://github.com/isteven/angular-multi-select/pull/16 if (tempMaxLabels > 0) { $scope.varButtonLabel += ', ... '; } $scope.varButtonLabel += '(Total: ' + $scope.selectedItems.length + ')'; +======= + if (tempMaxLabels > 0) { + $scope.varButtonLabel += ', ... '; + } + + $scope.varButtonLabel += '(Total: ' + $scope.selectedItems.length + ')'; +>>>>>>> 93c81c29e84ff5859b4d4b294b04687f2198493e } } $scope.varButtonLabel = $sce.trustAsHtml( $scope.varButtonLabel + '<span class="caret"></span>' ); |