Skip to content

Commit 7edde4a

Browse files
committed
build new version support hiding actionbox and live search box in linking phase.
1 parent 96711b0 commit 7edde4a

File tree

10 files changed

+30
-20
lines changed

10 files changed

+30
-20
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nya-bootstrap-select",
3-
"version": "2.3.0",
3+
"version": "2.4.0",
44
"main": [
55
"dist/js/nya-bs-select.js",
66
"dist/css/nya-bs-select.css"

dist/css/nya-bs-select.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @lordfriend/nya-bootstrap-select v2.3.0
2+
* @lordfriend/nya-bootstrap-select v2.4.0
33
* Copyright 2014 Nyasoft
44
* Licensed under MIT license
55
*/

dist/css/nya-bs-select.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/nya-bs-select.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @lordfriend/nya-bootstrap-select v2.3.0
2+
* @lordfriend/nya-bootstrap-select v2.4.0
33
* Copyright 2014 Nyasoft
44
* Licensed under MIT license
55
*/
@@ -788,8 +788,8 @@ nyaBsSelect.directive('nyaBsSelect', ['$parse', '$document', '$timeout', '$compi
788788
actionsBox.find('button').eq(1).on('click', function () {
789789
setAllOptions(false);
790790
});
791-
}
792-
else{
791+
} else {
792+
// if using inside ng-repeat or other transclude directive
793793
if (actionsBox) {
794794
actionsBox.addClass('hidden');
795795
}
@@ -844,8 +844,8 @@ nyaBsSelect.directive('nyaBsSelect', ['$parse', '$document', '$timeout', '$compi
844844
}
845845

846846
});
847-
}
848-
else{
847+
} else {
848+
// if using inside ng-repeat or other transclude directive
849849
if (searchBox) {
850850
searchBox.addClass('hidden');
851851
}

dist/js/nya-bs-select.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/dist/css/main.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @lordfriend/nya-bootstrap-select v2.3.0
2+
* @lordfriend/nya-bootstrap-select v2.4.0
33
* Copyright 2014 Nyasoft
44
* Licensed under MIT license
55
*/

docs/dist/css/nya-bs-select.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @lordfriend/nya-bootstrap-select v2.3.0
2+
* @lordfriend/nya-bootstrap-select v2.4.0
33
* Copyright 2014 Nyasoft
44
* Licensed under MIT license
55
*/

docs/dist/js/nya-bs-select.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @lordfriend/nya-bootstrap-select v2.3.0
2+
* @lordfriend/nya-bootstrap-select v2.4.0
33
* Copyright 2014 Nyasoft
44
* Licensed under MIT license
55
*/
@@ -532,7 +532,7 @@ nyaBsSelect.directive('nyaBsSelect', ['$parse', '$document', '$timeout', '$compi
532532
}
533533
}
534534

535-
if(tAttrs.liveSearch === 'true') {
535+
if(typeof tAttrs.liveSearch !== 'undefined') {
536536
searchBox = jqLite(SEARCH_BOX);
537537

538538
if(tAttrs.noSearchTitle) {
@@ -553,7 +553,7 @@ nyaBsSelect.directive('nyaBsSelect', ['$parse', '$document', '$timeout', '$compi
553553
dropdownMenu.append(noSearchResult);
554554
}
555555

556-
if (tAttrs.actionsBox === 'true' && isMultiple) {
556+
if (typeof tAttrs.actionsBox !== 'undefined' && isMultiple) {
557557
// set localizedText
558558
if (localizedText.selectAllTpl) {
559559
ACTIONS_BOX = ACTIONS_BOX.replace('SELECT ALL', localizedText.selectAllTpl);
@@ -788,6 +788,11 @@ nyaBsSelect.directive('nyaBsSelect', ['$parse', '$document', '$timeout', '$compi
788788
actionsBox.find('button').eq(1).on('click', function () {
789789
setAllOptions(false);
790790
});
791+
} else {
792+
// if using inside ng-repeat or other transclude directive
793+
if (actionsBox) {
794+
actionsBox.addClass('hidden');
795+
}
791796
}
792797

793798

@@ -839,6 +844,11 @@ nyaBsSelect.directive('nyaBsSelect', ['$parse', '$document', '$timeout', '$compi
839844
}
840845

841846
});
847+
} else {
848+
// if using inside ng-repeat or other transclude directive
849+
if (searchBox) {
850+
searchBox.addClass('hidden');
851+
}
842852
}
843853

844854

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lordfriend/nya-bootstrap-select",
3-
"version": "2.3.0",
3+
"version": "2.4.0",
44
"description": "An angular directive wraps bootstrap-select",
55
"main": "index.js",
66
"repository": {

src/nya-bs-select.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,8 @@ nyaBsSelect.directive('nyaBsSelect', ['$parse', '$document', '$timeout', '$compi
378378
actionsBox.find('button').eq(1).on('click', function () {
379379
setAllOptions(false);
380380
});
381-
}
382-
else{
381+
} else {
382+
// if using inside ng-repeat or other transclude directive
383383
if (actionsBox) {
384384
actionsBox.addClass('hidden');
385385
}
@@ -434,8 +434,8 @@ nyaBsSelect.directive('nyaBsSelect', ['$parse', '$document', '$timeout', '$compi
434434
}
435435

436436
});
437-
}
438-
else{
437+
} else {
438+
// if using inside ng-repeat or other transclude directive
439439
if (searchBox) {
440440
searchBox.addClass('hidden');
441441
}

0 commit comments

Comments
 (0)