Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 3c7ab56

Browse files
author
Dean Sofer
committed
Renamed global options from defaultTheme -> theme, etc
1 parent 24d10e7 commit 3c7ab56

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

dist/select.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ if (angular.element.prototype.querySelectorAll === undefined) {
1818
angular.module('ui.select', [])
1919

2020
.constant('uiSelectConfig', {
21-
defaultTheme: 'select2',
22-
defaultPlaceholder: 'Select Item'
21+
theme: 'select2',
22+
placeholder: 'Select Item'
2323
})
2424

2525
.directive('uiSelect',
@@ -29,7 +29,7 @@ angular.module('ui.select', [])
2929
return {
3030
restrict: 'E',
3131
templateUrl: function(tElement, tAttrs) {
32-
var theme = tAttrs.theme || uiSelectConfig.defaultTheme;
32+
var theme = tAttrs.theme || uiSelectConfig.theme;
3333
return theme + '/select.tpl.html';
3434
},
3535
replace: true,
@@ -129,7 +129,7 @@ angular.module('ui.select', [])
129129
replace: true,
130130
templateUrl: function(tElement) {
131131
// Gets theme attribute from parent (ui-select)
132-
var theme = tElement.parent().attr('theme') || uiSelectConfig.defaultTheme;
132+
var theme = tElement.parent().attr('theme') || uiSelectConfig.theme;
133133
return theme + '/choices.tpl.html';
134134
},
135135

@@ -215,12 +215,12 @@ angular.module('ui.select', [])
215215
replace: true,
216216
templateUrl: function(tElement) {
217217
// Gets theme attribute from parent (ui-select)
218-
var theme = tElement.parent().attr('theme') || uiSelectConfig.defaultTheme;
218+
var theme = tElement.parent().attr('theme') || uiSelectConfig.theme;
219219
return theme + '/match.tpl.html';
220220
},
221221
link: function(scope, element, attrs) {
222222
attrs.$observe('placeholder', function(placeholder){
223-
scope.$select.placeholder = placeholder || uiSelectConfig.defaultPlaceholder;
223+
scope.$select.placeholder = placeholder || uiSelectConfig.placeholder;
224224
});
225225
}
226226
};

src/select.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ if (angular.element.prototype.querySelectorAll === undefined) {
1818
angular.module('ui.select', [])
1919

2020
.constant('uiSelectConfig', {
21-
defaultTheme: 'select2',
22-
defaultPlaceholder: 'Select Item'
21+
theme: 'select2',
22+
placeholder: 'Select Item'
2323
})
2424

2525
.directive('uiSelect',
@@ -29,7 +29,7 @@ angular.module('ui.select', [])
2929
return {
3030
restrict: 'E',
3131
templateUrl: function(tElement, tAttrs) {
32-
var theme = tAttrs.theme || uiSelectConfig.defaultTheme;
32+
var theme = tAttrs.theme || uiSelectConfig.theme;
3333
return theme + '/select.tpl.html';
3434
},
3535
replace: true,
@@ -129,7 +129,7 @@ angular.module('ui.select', [])
129129
replace: true,
130130
templateUrl: function(tElement) {
131131
// Gets theme attribute from parent (ui-select)
132-
var theme = tElement.parent().attr('theme') || uiSelectConfig.defaultTheme;
132+
var theme = tElement.parent().attr('theme') || uiSelectConfig.theme;
133133
return theme + '/choices.tpl.html';
134134
},
135135

@@ -215,12 +215,12 @@ angular.module('ui.select', [])
215215
replace: true,
216216
templateUrl: function(tElement) {
217217
// Gets theme attribute from parent (ui-select)
218-
var theme = tElement.parent().attr('theme') || uiSelectConfig.defaultTheme;
218+
var theme = tElement.parent().attr('theme') || uiSelectConfig.theme;
219219
return theme + '/match.tpl.html';
220220
},
221221
link: function(scope, element, attrs) {
222222
attrs.$observe('placeholder', function(placeholder){
223-
scope.$select.placeholder = placeholder || uiSelectConfig.defaultPlaceholder;
223+
scope.$select.placeholder = placeholder || uiSelectConfig.placeholder;
224224
});
225225
}
226226
};

0 commit comments

Comments
 (0)