Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getContentTypeSelect: function ($scope) {
- entityService.getEntities('ContentType')
- .then(function (result) {
- $scope.option.contentTypes = result;
- $scope.option.contentTypesPlus = [{ id: 0, name: '*' }].concat(result);
- $scope.option.selectedContentType
- = localStorageService.get('selectedContentType');
- }, function (result) {
- alert("Error: No data returned");
- });
- },
- <span class="label">Type {{ option.selectedContentType }}</span>
- <select
- data-ng-disabled="!option.selectedSubject"
- data-ng-model="option.selectedContentType"
- data-ng-options="item.id as item.name for item in option.contentTypesPlus">
- <option style="display: none" value="">Select Content Type</option>
- </select>
- $scope.$watch('option.selectedContentType', function () {
- if ($scope.option.selectedContentType != null) {
- localStorageService.add('selectedContentType',
- $scope.option.selectedContentType);
- $scope.grid.data = null;
- $scope.grid.selected = false;
- }
- });
- 0: Object
- id: 0
- name: "*"
- __proto__: Object
- 1: b
- id: 1
- name: "Page"
- __proto__: b
- 2: b
- id: 2
- name: "Menu"
- __proto__: b
- 3: b
- id: 3
- name: "Content Block"
- __proto__: b
- item.id as item.name for item in option.contentTypesPlus
- <select
- ng-model="language.selected"
- ng-init="language.selected = settings.language[settings.language.selected.id]"
- ng-options="l.label for l in settings.language"
- ng-change="updateLanguage(language.selected)">
- $scope.settings = {
- enableEventsNotification: true,
- enableiBeaconNotification: true,
- hours: [
- { id: 0, label: '3h', value: 3 },
- { id: 1, label: '6h', value: 6 },
- { id: 2, label: '9h', value: 9 },
- { id: 3, label: '12h', value: 12 },
- { id: 4, label: '24h', value: 24 }
- ],
- language: [
- { id: 0, label: 'English', value: 'en-us' },
- { id: 1, label: 'Francais', value: 'fr-fr' }
- ]
- };
- $scope.hours = [];
- $scope.hours.selected = $localstorage.getObject('hours', $scope.settings.hours[1]);
- $scope.settings.hours.selected = $localstorage.getObject('hours', $scope.settings.hours[1]);
- $scope.hours.selected = $scope.hours.selected;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement