diff --git a/CHANGELOG.md b/CHANGELOG.md index 67c5ebc..02c9c9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,23 @@ # CHANGELOG -## In develop +## 1.1.0 + +* Made media upload buttons sticky. +* Fixed datetime pickers. +* Removed os2display requirements. +* Added itk-header to allow injections into pages for decoupled bundles. +* Made datepicker configurable. +* Moved BaseApiController to mainModule. +* Removed unused call to get all channels in slide create. +* Moved shared components from ikApp to the module ikShared, so it can be injected in other apps. +* Fixed issue with missing slide/screen templates. +* Fixed submenu code to activate sub menu based on first part of path. +* Fixed active-filter for admin/users and admin/groups. +* Updated npm packages. +* Fixed z-index for "continue" button in slide/channel create. +* Fixed styling for group filter in overviews. +* Hide groups in overviews when user is not in a group. +* Added access to tool config from json files, to allow configurable tools. ## 1.0.11 diff --git a/Resources/config/angular.yml b/Resources/config/angular.yml index 080daa5..9c43d8d 100644 --- a/Resources/config/angular.yml +++ b/Resources/config/angular.yml @@ -14,7 +14,6 @@ assets: - bundles/os2displayadmin/assets/libs/angular-dnd.js - bundles/os2displayadmin/assets/libs/angular-tooltips.min.js - bundles/os2displayadmin/assets/libs/datetimepicker.jquery.js - - bundles/os2displayadmin/assets/libs/datetimepicker.js - bundles/os2displayadmin/assets/libs/locale_da.js - bundles/os2displayadmin/assets/libs/stacktrace.min.js - bundles/os2displayadmin/assets/libs/md5.min.js @@ -68,6 +67,10 @@ modules: - bundles/os2displayadmin/apps/mainModule/services/userService.js - bundles/os2displayadmin/apps/mainModule/services/authHttpResponseInterceptor.js + datetimePicker: + files: + - bundles/os2displayadmin/apps/datetimePicker/datetimepicker.js + styleguideComponentsModule: files: - bundles/os2displayadmin/apps/styleguideComponentsModule/styleguideComponents.js @@ -78,6 +81,52 @@ modules: - bundles/os2displayadmin/apps/styleguideComponentsModule/modules/panelMenu.js - bundles/os2displayadmin/apps/styleguideComponentsModule/modules/popup.js + ikShared: + files: + - bundles/os2displayadmin/apps/ikShared/services/mediaFactory.js + - bundles/os2displayadmin/apps/ikShared/services/templateFactory.js + - bundles/os2displayadmin/apps/ikShared/services/slideFactory.js + - bundles/os2displayadmin/apps/ikShared/services/screenFactory.js + - bundles/os2displayadmin/apps/ikShared/services/channelFactory.js + - bundles/os2displayadmin/apps/ikShared/services/sharedSearchFactory.js + - bundles/os2displayadmin/apps/ikShared/services/sharedChannelFactory.js + - bundles/os2displayadmin/apps/ikShared/services/kobaFactory.js + - bundles/os2displayadmin/apps/ikShared/controller/baseSearchController.js + - bundles/os2displayadmin/apps/ikShared/controller/baseEntityController.js + - bundles/os2displayadmin/apps/ikShared/elements/actionsMenu/actionsMenuDirective.js + - bundles/os2displayadmin/apps/ikShared/elements/actionReloadScreen/actionReloadScreenDirective.js + - bundles/os2displayadmin/apps/ikShared/elements/sharedChannel/sharedChannelDirective.js + - bundles/os2displayadmin/apps/ikShared/elements/sharedChannelOverview/sharedChannelOverview.js + - bundles/os2displayadmin/apps/ikShared/elements/channel/channelDirectives.js + - bundles/os2displayadmin/apps/ikShared/elements/channelOverview/channelOverviewDirective.js + - bundles/os2displayadmin/apps/ikShared/elements/pager/pagerDirective.js + - bundles/os2displayadmin/apps/ikShared/elements/delete/deleteDirective.js + - bundles/os2displayadmin/apps/ikShared/elements/channelShare/channelShareDirective.js + - bundles/os2displayadmin/apps/ikShared/elements/checklist/checklistDirective.js + - bundles/os2displayadmin/apps/ikShared/elements/itkHeader/itkHeader.js + - bundles/os2displayadmin/apps/ikShared/elements/screen/screenDirective.js + - bundles/os2displayadmin/apps/ikShared/elements/slideOverview/slideOverviewDirective.js + - bundles/os2displayadmin/apps/ikShared/elements/slide/slideDirective.js + - bundles/os2displayadmin/apps/ikShared/elements/slide/slideEditableDirective.js + - bundles/os2displayadmin/apps/ikShared/elements/slide/sharedSlideDirective.js + - bundles/os2displayadmin/apps/ikShared/elements/screenOverview/screenOverviewDirective.js + - bundles/os2displayadmin/apps/ikShared/elements/mediaOverview/mediaOverviewDirective.js + - bundles/os2displayadmin/apps/ikShared/elements/mediaUpload/mediaUploadDirective.js + - bundles/os2displayadmin/apps/ikShared/elements/thumb/thumbDirective.js + - bundles/os2displayadmin/apps/ikShared/elements/autoGrow/autoGrowDirective.js + - bundles/os2displayadmin/apps/ikShared/elements/includeReplace/includeReplaceDirective.js + - bundles/os2displayadmin/apps/ikShared/elements/controlPanel/control-panel.js + - bundles/os2displayadmin/apps/ikShared/elements/ngModal/ng-modal.js + - bundles/os2displayadmin/apps/ikShared/elements/disabledList/disabledList.js + - bundles/os2displayadmin/apps/ikShared/widgets/screenTemplatePickerWidget/screenTemplatePickerWidget.js + - bundles/os2displayadmin/apps/ikShared/widgets/textWidget/textWidget.js + - bundles/os2displayadmin/apps/ikShared/widgets/textAreaWidget/textAreaWidget.js + - bundles/os2displayadmin/apps/ikShared/widgets/numberWidget/numberWidget.js + - bundles/os2displayadmin/apps/ikShared/widgets/channelPickerWidget/channelPickerWidget.js + - bundles/os2displayadmin/apps/ikShared/widgets/sharedChannelPickerWidget/sharedChannelPickerWidget.js + - bundles/os2displayadmin/apps/ikShared/widgets/channelRemoverWidget/channelRemoverWidget.js + - bundles/os2displayadmin/apps/ikShared/widgets/regionPreviewWidget/regionPreviewWidget.js + apps: menuApp: container: false @@ -107,14 +156,6 @@ apps: - bundles/os2displayadmin/apps/ikApp/ikApp.js - bundles/os2displayadmin/apps/ikApp/routing.js - bundles/os2displayadmin/apps/ikApp/shared/filters/activeEvents.js - - bundles/os2displayadmin/apps/ikApp/shared/services/mediaFactory.js - - bundles/os2displayadmin/apps/ikApp/shared/services/templateFactory.js - - bundles/os2displayadmin/apps/ikApp/shared/services/slideFactory.js - - bundles/os2displayadmin/apps/ikApp/shared/services/screenFactory.js - - bundles/os2displayadmin/apps/ikApp/shared/services/channelFactory.js - - bundles/os2displayadmin/apps/ikApp/shared/services/sharedSearchFactory.js - - bundles/os2displayadmin/apps/ikApp/shared/services/sharedChannelFactory.js - - bundles/os2displayadmin/apps/ikApp/shared/services/kobaFactory.js - bundles/os2displayadmin/apps/ikApp/pages/screen/screen.js - bundles/os2displayadmin/apps/ikApp/pages/sharedChannel/sharedChannelController.js - bundles/os2displayadmin/apps/ikApp/pages/adminSharing/adminSharingController.js @@ -126,40 +167,6 @@ apps: - bundles/os2displayadmin/apps/ikApp/pages/slideOverview/slideOverviewController.js - bundles/os2displayadmin/apps/ikApp/pages/slide/slideController.js - bundles/os2displayadmin/apps/ikApp/pages/slide/slideEditController.js - - bundles/os2displayadmin/apps/ikApp/shared/controller/baseSearchController.js - - bundles/os2displayadmin/apps/ikApp/shared/controller/baseEntityController.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/actionsMenu/actionsMenuDirective.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/actionReloadScreen/actionReloadScreenDirective.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/sharedChannel/sharedChannelDirective.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/sharedChannelOverview/sharedChannelOverview.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/channel/channelDirectives.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/channelOverview/channelOverviewDirective.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/pager/pagerDirective.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/delete/deleteDirective.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/channelShare/channelShareDirective.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/checklist/checklistDirective.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/screen/screenDirective.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/slideOverview/slideOverviewDirective.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/slide/slideDirective.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/slide/slideEditableDirective.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/slide/sharedSlideDirective.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/screenOverview/screenOverviewDirective.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/mediaOverview/mediaOverviewDirective.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/mediaUpload/mediaUploadDirective.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/thumb/thumbDirective.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/autoGrow/autoGrowDirective.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/includeReplace/includeReplaceDirective.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/controlPanel/control-panel.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/ngModal/ng-modal.js - - bundles/os2displayadmin/apps/ikApp/shared/elements/disabledList/disabledList.js - - bundles/os2displayadmin/apps/ikApp/shared/widgets/screenTemplatePickerWidget/screenTemplatePickerWidget.js - - bundles/os2displayadmin/apps/ikApp/shared/widgets/textWidget/textWidget.js - - bundles/os2displayadmin/apps/ikApp/shared/widgets/textAreaWidget/textAreaWidget.js - - bundles/os2displayadmin/apps/ikApp/shared/widgets/numberWidget/numberWidget.js - - bundles/os2displayadmin/apps/ikApp/shared/widgets/channelPickerWidget/channelPickerWidget.js - - bundles/os2displayadmin/apps/ikApp/shared/widgets/sharedChannelPickerWidget/sharedChannelPickerWidget.js - - bundles/os2displayadmin/apps/ikApp/shared/widgets/channelRemoverWidget/channelRemoverWidget.js - - bundles/os2displayadmin/apps/ikApp/shared/widgets/regionPreviewWidget/regionPreviewWidget.js - bundles/os2displayadmin/apps/ikApp/shared/components/date/dateComponent.js - bundles/os2displayadmin/apps/ikApp/shared/components/digital-clock/digitalClockComponent.js dependencies: @@ -189,6 +196,7 @@ apps: - itkDateComponent - itkDigitalClockComponent - toolsModule + - ikShared timelineApp: container: true diff --git a/Resources/public/apps/adminApp/adminApp.js b/Resources/public/apps/adminApp/adminApp.js index 3e41097..90d2c00 100644 --- a/Resources/public/apps/adminApp/adminApp.js +++ b/Resources/public/apps/adminApp/adminApp.js @@ -95,7 +95,7 @@ angular.module('adminApp').service('adminAppSetup', [ title: 'Brugere', path: '#/admin/users', classes: 'admin-users', - activeFilter: '/admin/user', + activeFilter: '/admin/users', group: 'left', weight: 2 }); @@ -106,7 +106,7 @@ angular.module('adminApp').service('adminAppSetup', [ title: 'Grupper', path: '#/admin/groups', classes: 'overview-right', - activeFilter: '/admin/group', + activeFilter: '/admin/groups', group: 'left', weight: 3 }); diff --git a/Resources/public/apps/datetimePicker/datetimepicker.js b/Resources/public/apps/datetimePicker/datetimepicker.js new file mode 100644 index 0000000..de18f08 --- /dev/null +++ b/Resources/public/apps/datetimePicker/datetimepicker.js @@ -0,0 +1,175 @@ +/** + * @file + * Contains an angular wrapper for the datetime-picker jquery plugin: + * - jQuery DateTimePicker plugin v2.3.4 + * - http://xdsoft.net/jqplugins/datetimepicker/ + */ + +/** + * Angular wrapper for jquery.datetimepicker.js. + * For v2.3.4 + * Only a one way binding atm. + */ +angular.module('datetimePicker', []); + +/** + * Configurable datetime picker. + */ +angular.module('datetimePicker') + .directive('datetimePicker', function ($timeout) { + return { + scope: { + config: '=', + watch: '=' + }, + restrict: 'A', + require: '^ngModel', + link: function (scope, el, attrs, ctrl) { + var dateFormat = 'DD/MM/YYYY HH:mm'; + var config = null; + + if (scope.config) { + config = scope.config; + } + else { + config = { + lang: 'da', + format: 'd/m/Y H:i', + scrollMonth: false, + scrollTime: false + }; + } + + // Wait for initialization. + $timeout(function () { + if (ctrl.$modelValue) { + config.value = moment(ctrl.$modelValue * 1000) + .format(dateFormat); + } + + el.datetimepicker(config); + + ctrl.$formatters.unshift(function (modelValue) { + if (!modelValue) { + return ''; + } + + return moment(modelValue * 1000).format(dateFormat); + }); + + ctrl.$parsers.unshift(function (viewValue) { + if (viewValue == '') { + return null; + } + + var date = moment(viewValue, dateFormat); + return (date && date.isValid() && date.year() >= 1970) ? date.unix() : null; + }); + + el.bind('blur', function () { + var date = moment(ctrl.$viewValue, dateFormat); + + if (date && date.isValid() && date.year() >= 1970) { + ctrl.$modelValue = date.unix(); + } + else { + ctrl.$modelValue = moment().unix(); + } + + ctrl.$setViewValue(moment(ctrl.$modelValue * 1000) + .format(dateFormat)); + ctrl.$render(); + }); + + if (scope.watch) { + scope.$watch(function () { + return ctrl.$modelValue; + }, function (newValue) { + if (!newValue) { + return; + } + + config.value = moment(newValue * 1000) + .format(dateFormat); + el.datetimepicker('destroy'); + el.datetimepicker(config); + }); + } + }); + } + }; + }); + +/** + * Hour picker. Results in a integer value. + */ +angular.module('datetimePicker') + .directive('hourPicker', + function () { + return { + restrict: 'A', + require: '^ngModel', + link: function (scope, el) { + el.datetimepicker({ + datepicker: false, + format: 'G' + }); + } + }; + } + ); + +/** + * Expose datetime picker input editable as text. + */ +angular.module('datetimePicker') + .directive('datetimePickerText', function ($timeout) { + return { + restrict: 'A', + require: '^ngModel', + link: function (scope, el, attrs, ctrl) { + var dateFormat = 'DD/MM/YYYY HH:mm'; + + // Wait for initialization. + $timeout(function () { + ctrl.$formatters.unshift(function (modelValue) { + if (!modelValue) { + return ''; + } + + return moment(modelValue * 1000).format(dateFormat); + }); + + ctrl.$parsers.unshift(function (viewValue) { + if (viewValue == '') { + return null; + } + var date = moment(viewValue, dateFormat); + return (date && date.isValid() && date.year() >= 1970) ? date.unix() : null; + }); + + if (ctrl.$modelValue) { + ctrl.$setViewValue(moment(ctrl.$modelValue * 1000) + .format(dateFormat)); + ctrl.$render(); + } + + el.bind('blur', function () { + var date = moment(ctrl.$viewValue, dateFormat); + + if (date && date.isValid() && date.year() >= 1970) { + ctrl.$modelValue = date.unix(); + } + else { + ctrl.$modelValue = moment().unix(); + } + + ctrl.$setViewValue(moment(ctrl.$modelValue * 1000) + .format(dateFormat)); + ctrl.$render(); + }); + }); + + } + }; + }); diff --git a/Resources/public/apps/ikApp/pages/adminTemplates/adminTemplatesController.js b/Resources/public/apps/ikApp/pages/adminTemplates/adminTemplatesController.js index d334f41..94a7b48 100644 --- a/Resources/public/apps/ikApp/pages/adminTemplates/adminTemplatesController.js +++ b/Resources/public/apps/ikApp/pages/adminTemplates/adminTemplatesController.js @@ -1,10 +1,10 @@ /** * @file - * Contains the admin sharing controller. + * Contains the admin templates controller. */ /** - * Admin sharing controller. + * Admin templates controller. */ angular.module('ikApp').controller('AdminTemplatesController', ['busService', 'templateFactory', '$scope', function (busService, templateFactory, $scope) { @@ -16,7 +16,7 @@ angular.module('ikApp').controller('AdminTemplatesController', ['busService', 't $scope.enabledScreenTemplates = []; $scope.enabledSlideTemplates = []; - templateFactory.getAllScreenTemplates().then( + templateFactory.getScreenTemplates().then( function success(data) { $scope.screenTemplates = data; @@ -35,7 +35,7 @@ angular.module('ikApp').controller('AdminTemplatesController', ['busService', 't }); } ); - templateFactory.getAllSlideTemplates().then( + templateFactory.getSlideTemplates().then( function success(data) { $scope.slideTemplates = data; @@ -75,4 +75,4 @@ angular.module('ikApp').controller('AdminTemplatesController', ['busService', 't ); } } -]); \ No newline at end of file +]); diff --git a/Resources/public/apps/ikApp/pages/screen/screen.html b/Resources/public/apps/ikApp/pages/screen/screen.html index 967f432..3f40a10 100644 --- a/Resources/public/apps/ikApp/pages/screen/screen.html +++ b/Resources/public/apps/ikApp/pages/screen/screen.html @@ -2,6 +2,7 @@
+
diff --git a/Resources/public/apps/ikApp/pages/screen/screen.js b/Resources/public/apps/ikApp/pages/screen/screen.js index db5e3f9..dcc5fb2 100644 --- a/Resources/public/apps/ikApp/pages/screen/screen.js +++ b/Resources/public/apps/ikApp/pages/screen/screen.js @@ -48,7 +48,7 @@ angular.module('ikApp').controller('ScreenController', ['$scope', '$controller', }, function (reason) { if (reason === 404) { - templateFactory.getScreenTemplates().then( + templateFactory.getEnabledScreenTemplates().then( function success(data) { $scope.screen.template = angular.copy(data[0]); $scope.screen.orientation = data[0].orientation; @@ -167,7 +167,7 @@ angular.module('ikApp').controller('ScreenController', ['$scope', '$controller', } else { // Fallback to default tools. - $scope.toolbarTemplate = 'bundles/os2displayadmin/apps/ikApp/shared/toolbars/' + tool.name + '.html?' + window.config.version; + $scope.toolbarTemplate = 'bundles/os2displayadmin/apps/ikShared/toolbars/' + tool.name + '.html?' + window.config.version; } $scope.region = tool.region; $scope.displayToolbar = true; diff --git a/Resources/public/apps/ikApp/pages/slide/slideController.js b/Resources/public/apps/ikApp/pages/slide/slideController.js index a26ddc0..d5d5d98 100644 --- a/Resources/public/apps/ikApp/pages/slide/slideController.js +++ b/Resources/public/apps/ikApp/pages/slide/slideController.js @@ -15,7 +15,7 @@ angular.module('ikApp').controller('SlideController', ['$scope', '$controller', $scope.steps = 6; $scope.slide = {}; $scope.templates = []; - templateFactory.getSlideTemplates().then( + templateFactory.getEnabledSlideTemplates().then( function success(data) { for (var key in data) { if (data.hasOwnProperty(key)) { @@ -30,12 +30,6 @@ angular.module('ikApp').controller('SlideController', ['$scope', '$controller', }); } ); - $scope.channels = []; - - // Get all channels for step 6 - channelFactory.getChannels().then(function (data) { - $scope.channels = data; - }); // Setup the editor. $scope.editor = { @@ -284,4 +278,4 @@ angular.module('ikApp').controller('SlideController', ['$scope', '$controller', } }; } -]); \ No newline at end of file +]); diff --git a/Resources/public/apps/ikApp/pages/slide/slideEditController.js b/Resources/public/apps/ikApp/pages/slide/slideEditController.js index a0f4b3b..b94d61a 100644 --- a/Resources/public/apps/ikApp/pages/slide/slideEditController.js +++ b/Resources/public/apps/ikApp/pages/slide/slideEditController.js @@ -45,6 +45,7 @@ angular.module('ikApp').controller('SlideEditController', [ hideEditors: function hideEditors() { busService.$emit('bodyService.removeClass', 'is-locked'); $scope.editor.editorOpen = false; + $scope.selectedTool = null; var element = document.getElementById('slide-edit-tool'); angular.element(element).html( @@ -66,8 +67,17 @@ angular.module('ikApp').controller('SlideEditController', [ tool.id = 'base-editor'; } + $scope.selectedTool = tool; + var element = document.getElementById('slide-edit-tool'); - var html = '
<' + tool.id + ' slide="slide" close="editor.hideEditors()" ' + (tool.template ? 'template="' + tool.template + '"' : '') + '>
'; + var html = + '
<' + + tool.id + + ' slide="slide" close="editor.hideEditors()" ' + + (tool.template ? 'template="' + tool.template + '"' : '') + + ' ' + + 'tool="selectedTool"' + + '>
'; angular.element(element).html( $compile(html)($scope) ); diff --git a/Resources/public/apps/ikApp/shared/elements/slide/slideDirective.js b/Resources/public/apps/ikApp/shared/elements/slide/slideDirective.js deleted file mode 100644 index 69bb9b7..0000000 --- a/Resources/public/apps/ikApp/shared/elements/slide/slideDirective.js +++ /dev/null @@ -1,86 +0,0 @@ -/** - * @file - * Contains slide directives to display and edit a slide. - */ - -/** - * Directive to insert html for a slide. - * @param ik-id: the id of the slide. - * @param ik-width: the width of the slide. - */ -angular.module('ikApp').directive('ikSlide', ['slideFactory', 'templateFactory', 'busService', - function (slideFactory, templateFactory, busService) { - 'use strict'; - - return { - restrict: 'E', - scope: { - ikWidth: '@', - ikSlide: '=' - }, - link: function (scope, element, attrs) { - scope.templateURL = 'bundles/os2displayadmin/apps/ikApp/shared/elements/slide/slide-loading.html?' + window.config.version; - - // Observe for changes to the ik-slide attribute. Setup slide when ik-slide is set. - attrs.$observe('ikSlide', function (val) { - if (!val) { - return; - } - - if (scope.ikSlide.media_type === 'image') { - if (scope.ikSlide.media.length > 0) { - scope.ikSlide.currentImage = scope.ikSlide.media[0].urls.default_landscape_small; - } - else { - scope.ikSlide.currentImage = ''; - } - } - else { - if (scope.ikSlide.media.length > 0 && - scope.ikSlide.media[0].provider_metadata.length > 0 && - scope.ikSlide.media[0].provider_metadata[0].thumbnails && - scope.ikSlide.media[0].provider_metadata[0].thumbnails.length > 0 - ) { - scope.ikSlide.currentImage = scope.ikSlide.media[0].provider_metadata[0].thumbnails[1].reference; - } - else { - scope.ikSlide.currentImage = ''; - } - } - - // Set the currentLogo variable. - if (scope.ikSlide.logo !== undefined && scope.ikSlide.logo !== null) { - scope.ikSlide.currentLogo = scope.ikSlide.logo.urls.default_landscape; - } - else { - scope.ikSlide.currentLogo = ''; - } - - // Get the template. - templateFactory.getSlideTemplate(scope.ikSlide.template).then( - function success(data) { - scope.template = data; - scope.templateURL = scope.template.paths.preview; - - scope.theStyle = { - width: "" + scope.ikWidth + "px", - height: "" + parseFloat(scope.template.ideal_dimensions.height * parseFloat(scope.ikWidth / scope.template.ideal_dimensions.width)) + "px" - }; - - if (scope.ikSlide.options.fontsize) { - scope.theStyle.fontsize = "" + parseFloat(scope.ikSlide.options.fontsize * parseFloat(scope.ikWidth / scope.template.ideal_dimensions.width)) + "px" - } - }, - function error(reason) { - busService.$emit('log.error', { - 'cause': reason, - 'msg': 'Hentning af templates fejlede.' - }); - } - ); - }); - }, - template: '
' - } - } -]); diff --git a/Resources/public/apps/ikApp/shared/controller/baseEntityController.js b/Resources/public/apps/ikShared/controller/baseEntityController.js similarity index 92% rename from Resources/public/apps/ikApp/shared/controller/baseEntityController.js rename to Resources/public/apps/ikShared/controller/baseEntityController.js index db0ab69..b441b82 100644 --- a/Resources/public/apps/ikApp/shared/controller/baseEntityController.js +++ b/Resources/public/apps/ikShared/controller/baseEntityController.js @@ -3,7 +3,7 @@ * Contains base entity controller. */ -angular.module('ikApp').controller('BaseEntityController', [ +angular.module('ikShared').controller('BaseEntityController', [ '$scope', 'userService', 'busService', 'entityType', '$timeout', function ($scope, userService, busService, entityType, $timeout) { 'use strict'; diff --git a/Resources/public/apps/ikApp/shared/controller/baseSearchController.js b/Resources/public/apps/ikShared/controller/baseSearchController.js similarity index 95% rename from Resources/public/apps/ikApp/shared/controller/baseSearchController.js rename to Resources/public/apps/ikShared/controller/baseSearchController.js index 8e72b8f..1c52ed0 100644 --- a/Resources/public/apps/ikApp/shared/controller/baseSearchController.js +++ b/Resources/public/apps/ikShared/controller/baseSearchController.js @@ -3,7 +3,7 @@ * Contains base search controller. */ -angular.module('ikApp').controller('BaseSearchController', [ +angular.module('ikShared').controller('BaseSearchController', [ '$scope', 'userService', 'busService', function ($scope, userService, busService) { 'use strict'; @@ -39,8 +39,8 @@ angular.module('ikApp').controller('BaseSearchController', [ "filter": {} }; - // Get current user groups. - $scope.userGroups = angular.copy($scope.currentUser.groups); + // Get current user viewable groups. + $scope.userGroups = angular.copy($scope.currentUser.api_data.viewable_groups); /** * Build search filter based on selected groups. diff --git a/Resources/public/apps/ikApp/shared/elements/actionReloadScreen/action-reload-screen.html b/Resources/public/apps/ikShared/elements/actionReloadScreen/action-reload-screen.html similarity index 100% rename from Resources/public/apps/ikApp/shared/elements/actionReloadScreen/action-reload-screen.html rename to Resources/public/apps/ikShared/elements/actionReloadScreen/action-reload-screen.html diff --git a/Resources/public/apps/ikApp/shared/elements/actionReloadScreen/actionReloadScreenDirective.js b/Resources/public/apps/ikShared/elements/actionReloadScreen/actionReloadScreenDirective.js similarity index 83% rename from Resources/public/apps/ikApp/shared/elements/actionReloadScreen/actionReloadScreenDirective.js rename to Resources/public/apps/ikShared/elements/actionReloadScreen/actionReloadScreenDirective.js index 1fc8d10..1234eab 100644 --- a/Resources/public/apps/ikApp/shared/elements/actionReloadScreen/actionReloadScreenDirective.js +++ b/Resources/public/apps/ikShared/elements/actionReloadScreen/actionReloadScreenDirective.js @@ -8,7 +8,7 @@ * Has a play button. * When pressing the channel, but not the play button, redirect to the channel editor. */ -angular.module('ikApp').directive('ikActionReloadScreen', ['$http', 'busService', +angular.module('ikShared').directive('ikActionReloadScreen', ['$http', 'busService', function ($http, busService) { 'use strict'; @@ -38,7 +38,7 @@ angular.module('ikApp').directive('ikActionReloadScreen', ['$http', 'busService' } }; }, - templateUrl: 'bundles/os2displayadmin/apps/ikApp/shared/elements/actionReloadScreen/action-reload-screen.html?' + window.config.version + templateUrl: 'bundles/os2displayadmin/apps/ikShared/elements/actionReloadScreen/action-reload-screen.html?' + window.config.version }; } ]); diff --git a/Resources/public/apps/ikApp/shared/elements/actionsMenu/actions-menu.html b/Resources/public/apps/ikShared/elements/actionsMenu/actions-menu.html similarity index 100% rename from Resources/public/apps/ikApp/shared/elements/actionsMenu/actions-menu.html rename to Resources/public/apps/ikShared/elements/actionsMenu/actions-menu.html diff --git a/Resources/public/apps/ikApp/shared/elements/actionsMenu/actionsMenuDirective.js b/Resources/public/apps/ikShared/elements/actionsMenu/actionsMenuDirective.js similarity index 75% rename from Resources/public/apps/ikApp/shared/elements/actionsMenu/actionsMenuDirective.js rename to Resources/public/apps/ikShared/elements/actionsMenu/actionsMenuDirective.js index 88f2d89..99ef5b6 100644 --- a/Resources/public/apps/ikApp/shared/elements/actionsMenu/actionsMenuDirective.js +++ b/Resources/public/apps/ikShared/elements/actionsMenu/actionsMenuDirective.js @@ -8,7 +8,7 @@ * Has a play button. * When pressing the channel, but not the play button, redirect to the channel editor. */ -angular.module('ikApp').directive('ikActionsMenu', [ +angular.module('ikShared').directive('ikActionsMenu', [ function () { 'use strict'; @@ -25,7 +25,7 @@ angular.module('ikApp').directive('ikActionsMenu', [ scope.menuOpen = !scope.menuOpen; } }, - templateUrl: 'bundles/os2displayadmin/apps/ikApp/shared/elements/actionsMenu/actions-menu.html?' + window.config.version + templateUrl: 'bundles/os2displayadmin/apps/ikShared/elements/actionsMenu/actions-menu.html?' + window.config.version }; } ]); diff --git a/Resources/public/apps/ikApp/shared/elements/autoGrow/autoGrowDirective.js b/Resources/public/apps/ikShared/elements/autoGrow/autoGrowDirective.js similarity index 92% rename from Resources/public/apps/ikApp/shared/elements/autoGrow/autoGrowDirective.js rename to Resources/public/apps/ikShared/elements/autoGrow/autoGrowDirective.js index 9f64a39..9cec0f0 100644 --- a/Resources/public/apps/ikApp/shared/elements/autoGrow/autoGrowDirective.js +++ b/Resources/public/apps/ikShared/elements/autoGrow/autoGrowDirective.js @@ -7,7 +7,7 @@ * HTML attribute for textareas. Makes the textarea grow. * Uses jQuery. */ -angular.module('ikApp').directive('autoGrow', function() { +angular.module('ikShared').directive('autoGrow', function() { 'use strict'; return { @@ -40,4 +40,4 @@ angular.module('ikApp').directive('autoGrow', function() { }, 100); } }; -}); \ No newline at end of file +}); diff --git a/Resources/public/apps/ikApp/shared/elements/channel/channel-template.html b/Resources/public/apps/ikShared/elements/channel/channel-template.html similarity index 100% rename from Resources/public/apps/ikApp/shared/elements/channel/channel-template.html rename to Resources/public/apps/ikShared/elements/channel/channel-template.html diff --git a/Resources/public/apps/ikApp/shared/elements/channel/channelDirectives.js b/Resources/public/apps/ikShared/elements/channel/channelDirectives.js similarity index 86% rename from Resources/public/apps/ikApp/shared/elements/channel/channelDirectives.js rename to Resources/public/apps/ikShared/elements/channel/channelDirectives.js index 6b9b9cd..05e6fb4 100644 --- a/Resources/public/apps/ikApp/shared/elements/channel/channelDirectives.js +++ b/Resources/public/apps/ikShared/elements/channel/channelDirectives.js @@ -8,7 +8,7 @@ * Has a play button. * When pressing the channel, but not the play button, redirect to the channel editor. */ -angular.module('ikApp').directive('ikChannel', ['$interval', '$location', +angular.module('ikShared').directive('ikChannel', ['$interval', '$location', function($interval, $location) { 'use strict'; @@ -32,10 +32,10 @@ angular.module('ikApp').directive('ikChannel', ['$interval', '$location', // If channel is empty, display empty channel. if (scope.ikChannel.slides.length <= 0) { - scope.templateURL = 'bundles/os2displayadmin/apps/ikApp/shared/elements/channel/empty.html?' + window.config.version; + scope.templateURL = 'bundles/os2displayadmin/apps/ikShared/elements/channel/empty.html?' + window.config.version; } else { - scope.templateURL = 'bundles/os2displayadmin/apps/ikApp/shared/elements/channel/non-empty.html?' + window.config.version; + scope.templateURL = 'bundles/os2displayadmin/apps/ikShared/elements/channel/non-empty.html?' + window.config.version; scope.buttonState = 'play'; } @@ -77,7 +77,7 @@ angular.module('ikApp').directive('ikChannel', ['$interval', '$location', } }); }, - templateUrl: 'bundles/os2displayadmin/apps/ikApp/shared/elements/channel/channel-template.html?' + window.config.version + templateUrl: 'bundles/os2displayadmin/apps/ikShared/elements/channel/channel-template.html?' + window.config.version }; } ]); diff --git a/Resources/public/apps/ikApp/shared/elements/channel/empty.html b/Resources/public/apps/ikShared/elements/channel/empty.html similarity index 100% rename from Resources/public/apps/ikApp/shared/elements/channel/empty.html rename to Resources/public/apps/ikShared/elements/channel/empty.html diff --git a/Resources/public/apps/ikApp/shared/elements/channel/non-empty.html b/Resources/public/apps/ikShared/elements/channel/non-empty.html similarity index 100% rename from Resources/public/apps/ikApp/shared/elements/channel/non-empty.html rename to Resources/public/apps/ikShared/elements/channel/non-empty.html diff --git a/Resources/public/apps/ikApp/shared/elements/channelOverview/channel-overview-directive.html b/Resources/public/apps/ikShared/elements/channelOverview/channel-overview-directive.html similarity index 98% rename from Resources/public/apps/ikApp/shared/elements/channelOverview/channel-overview-directive.html rename to Resources/public/apps/ikShared/elements/channelOverview/channel-overview-directive.html index ed7b87a..e8cbfef 100644 --- a/Resources/public/apps/ikApp/shared/elements/channelOverview/channel-overview-directive.html +++ b/Resources/public/apps/ikShared/elements/channelOverview/channel-overview-directive.html @@ -16,7 +16,7 @@ Mine
-
+
diff --git a/Resources/public/apps/ikApp/shared/elements/channelOverview/channelOverviewDirective.js b/Resources/public/apps/ikShared/elements/channelOverview/channelOverviewDirective.js similarity index 97% rename from Resources/public/apps/ikApp/shared/elements/channelOverview/channelOverviewDirective.js rename to Resources/public/apps/ikShared/elements/channelOverview/channelOverviewDirective.js index 956b102..65338b4 100644 --- a/Resources/public/apps/ikApp/shared/elements/channelOverview/channelOverviewDirective.js +++ b/Resources/public/apps/ikShared/elements/channelOverview/channelOverviewDirective.js @@ -6,7 +6,7 @@ /** * Directive to show the Channel overview. */ -angular.module('ikApp').directive('ikChannelOverview', [ +angular.module('ikShared').directive('ikChannelOverview', [ 'busService', function(busService) { 'use strict'; @@ -211,7 +211,7 @@ angular.module('ikApp').directive('ikChannelOverview', [ $scope.setSearchFilters(); }, - templateUrl: 'bundles/os2displayadmin/apps/ikApp/shared/elements/channelOverview/channel-overview-directive.html?' + window.config.version + templateUrl: 'bundles/os2displayadmin/apps/ikShared/elements/channelOverview/channel-overview-directive.html?' + window.config.version }; } ]); diff --git a/Resources/public/apps/ikApp/shared/elements/channelShare/channel-share.html b/Resources/public/apps/ikShared/elements/channelShare/channel-share.html similarity index 100% rename from Resources/public/apps/ikApp/shared/elements/channelShare/channel-share.html rename to Resources/public/apps/ikShared/elements/channelShare/channel-share.html diff --git a/Resources/public/apps/ikApp/shared/elements/channelShare/channelShareDirective.js b/Resources/public/apps/ikShared/elements/channelShare/channelShareDirective.js similarity index 72% rename from Resources/public/apps/ikApp/shared/elements/channelShare/channelShareDirective.js rename to Resources/public/apps/ikShared/elements/channelShare/channelShareDirective.js index eac30ff..d504cae 100644 --- a/Resources/public/apps/ikApp/shared/elements/channelShare/channelShareDirective.js +++ b/Resources/public/apps/ikShared/elements/channelShare/channelShareDirective.js @@ -11,7 +11,7 @@ * html-parameters * ikChannel (object): Channel to share. */ -angular.module('ikApp').directive('ikChannelShare', [ +angular.module('ikShared').directive('ikChannelShare', [ function () { 'use strict'; @@ -25,7 +25,7 @@ angular.module('ikApp').directive('ikChannelShare', [ scope.$emit('ikChannelShare.clickShare', scope.ikChannel); }; }, - templateUrl: 'bundles/os2displayadmin/apps/ikApp/shared/elements/channelShare/channel-share.html?' + window.config.version + templateUrl: 'bundles/os2displayadmin/apps/ikShared/elements/channelShare/channel-share.html?' + window.config.version }; } ]); diff --git a/Resources/public/apps/ikApp/shared/elements/checklist/checklist.html b/Resources/public/apps/ikShared/elements/checklist/checklist.html similarity index 100% rename from Resources/public/apps/ikApp/shared/elements/checklist/checklist.html rename to Resources/public/apps/ikShared/elements/checklist/checklist.html diff --git a/Resources/public/apps/ikApp/shared/elements/checklist/checklistDirective.js b/Resources/public/apps/ikShared/elements/checklist/checklistDirective.js similarity index 87% rename from Resources/public/apps/ikApp/shared/elements/checklist/checklistDirective.js rename to Resources/public/apps/ikShared/elements/checklist/checklistDirective.js index 3a37966..123b03d 100644 --- a/Resources/public/apps/ikApp/shared/elements/checklist/checklistDirective.js +++ b/Resources/public/apps/ikShared/elements/checklist/checklistDirective.js @@ -7,7 +7,7 @@ * Checklist directive. * */ -angular.module('ikApp').directive('ikChecklist', [ +angular.module('ikShared').directive('ikChecklist', [ function () { 'use strict'; @@ -55,7 +55,7 @@ angular.module('ikApp').directive('ikChecklist', [ return false; }; }, - templateUrl: 'bundles/os2displayadmin/apps/ikApp/shared/elements/checklist/checklist.html?' + window.config.version + templateUrl: 'bundles/os2displayadmin/apps/ikShared/elements/checklist/checklist.html?' + window.config.version }; } ]); diff --git a/Resources/public/apps/ikApp/shared/elements/controlPanel/control-panel.js b/Resources/public/apps/ikShared/elements/controlPanel/control-panel.js similarity index 100% rename from Resources/public/apps/ikApp/shared/elements/controlPanel/control-panel.js rename to Resources/public/apps/ikShared/elements/controlPanel/control-panel.js diff --git a/Resources/public/apps/ikApp/shared/elements/delete/delete.html b/Resources/public/apps/ikShared/elements/delete/delete.html similarity index 100% rename from Resources/public/apps/ikApp/shared/elements/delete/delete.html rename to Resources/public/apps/ikShared/elements/delete/delete.html diff --git a/Resources/public/apps/ikApp/shared/elements/delete/deleteDirective.js b/Resources/public/apps/ikShared/elements/delete/deleteDirective.js similarity index 86% rename from Resources/public/apps/ikApp/shared/elements/delete/deleteDirective.js rename to Resources/public/apps/ikShared/elements/delete/deleteDirective.js index 3f1a886..4401dda 100644 --- a/Resources/public/apps/ikApp/shared/elements/delete/deleteDirective.js +++ b/Resources/public/apps/ikShared/elements/delete/deleteDirective.js @@ -8,7 +8,7 @@ * Has a play button. * When pressing the channel, but not the play button, redirect to the channel editor. */ -angular.module('ikApp').directive('ikDelete', ['$http', '$rootScope', 'busService', +angular.module('ikShared').directive('ikDelete', ['$http', '$rootScope', 'busService', function ($http, $rootScope, busService) { 'use strict'; @@ -41,7 +41,7 @@ angular.module('ikApp').directive('ikDelete', ['$http', '$rootScope', 'busServic } }; }, - templateUrl: 'bundles/os2displayadmin/apps/ikApp/shared/elements/delete/delete.html?' + window.config.version + templateUrl: 'bundles/os2displayadmin/apps/ikShared/elements/delete/delete.html?' + window.config.version }; } ]); diff --git a/Resources/public/apps/ikApp/shared/elements/disabledList/disabled-list.html b/Resources/public/apps/ikShared/elements/disabledList/disabled-list.html similarity index 100% rename from Resources/public/apps/ikApp/shared/elements/disabledList/disabled-list.html rename to Resources/public/apps/ikShared/elements/disabledList/disabled-list.html diff --git a/Resources/public/apps/ikApp/shared/elements/disabledList/disabledList.js b/Resources/public/apps/ikShared/elements/disabledList/disabledList.js similarity index 57% rename from Resources/public/apps/ikApp/shared/elements/disabledList/disabledList.js rename to Resources/public/apps/ikShared/elements/disabledList/disabledList.js index 7a602d2..6bca11f 100644 --- a/Resources/public/apps/ikApp/shared/elements/disabledList/disabledList.js +++ b/Resources/public/apps/ikShared/elements/disabledList/disabledList.js @@ -7,7 +7,7 @@ * DisabledList directive. * */ -angular.module('ikApp').directive('ikDisabledList', [ +angular.module('ikShared').directive('ikDisabledList', [ function () { 'use strict'; @@ -17,7 +17,7 @@ angular.module('ikApp').directive('ikDisabledList', [ scope: { elements: '=' }, - templateUrl: 'bundles/os2displayadmin/apps/ikApp/shared/elements/disabledList/disabled-list.html?' + window.config.version + templateUrl: 'bundles/os2displayadmin/apps/ikShared/elements/disabledList/disabled-list.html?' + window.config.version }; } ]); diff --git a/Resources/public/apps/ikApp/shared/elements/includeReplace/includeReplaceDirective.js b/Resources/public/apps/ikShared/elements/includeReplace/includeReplaceDirective.js similarity index 80% rename from Resources/public/apps/ikApp/shared/elements/includeReplace/includeReplaceDirective.js rename to Resources/public/apps/ikShared/elements/includeReplace/includeReplaceDirective.js index e4325cc..51e2536 100644 --- a/Resources/public/apps/ikApp/shared/elements/includeReplace/includeReplaceDirective.js +++ b/Resources/public/apps/ikShared/elements/includeReplace/includeReplaceDirective.js @@ -6,7 +6,7 @@ /** * HTML attribute to replace the ng-include div. */ -angular.module('ikApp').directive('includeReplace', function () { +angular.module('ikShared').directive('includeReplace', function () { 'use strict'; return { diff --git a/Resources/public/apps/ikShared/elements/itkHeader/itkHeader.js b/Resources/public/apps/ikShared/elements/itkHeader/itkHeader.js new file mode 100644 index 0000000..d17052c --- /dev/null +++ b/Resources/public/apps/ikShared/elements/itkHeader/itkHeader.js @@ -0,0 +1,61 @@ +/** + * @file + * itk-header directive. + */ + +/** + * itk-header DOM element. + * + * attributes (all required): + * - entity: The entity the header applies to. + * - type: The entity type, e.g. screen. + * - event: The name of the event to send out to request items. + * Will be prefixed and prefixed by itkHeader.{event}.requestItems + * Expects returnEvent(s) back. + */ +angular.module('ikShared').directive('itkHeader', ['busService', '$timeout', '$compile', + function (busService, $timeout, $compile) { + 'use strict'; + + return { + restrict: 'E', + replace: false, + scope: { + entity: '=', + type: '@', + event: '@' + }, + link: function (scope, element) { + // Make sure all attributes have been set. + if (!scope.entity || !scope.type || !scope.event) { + console.error('itkHeader: entity, type, event attributes are all required!'); + return; + } + + var event = 'itkHeader.' + scope.event; + var html = ''; + + var now = new Date(); + var returnEvent = event + '.returnItems-' + scope.entity.id + '-' + now.getTime(); + + busService.$on(returnEvent, function (event, data) { + $timeout(function () { + if (data.hasOwnProperty('html')) { + html = html + data.html; + + var e = $compile(html)(scope); + element.replaceWith(e); + } + }); + }); + + busService.$emit(event + '.requestItems', { + entity: scope.entity, + type: scope.type, + returnEvent: returnEvent + }); + }, + template: '' + }; + } +]); diff --git a/Resources/public/apps/ikApp/shared/elements/mediaOverview/media-overview-directive.html b/Resources/public/apps/ikShared/elements/mediaOverview/media-overview-directive.html similarity index 98% rename from Resources/public/apps/ikApp/shared/elements/mediaOverview/media-overview-directive.html rename to Resources/public/apps/ikShared/elements/mediaOverview/media-overview-directive.html index 5e943ab..ad55bc9 100644 --- a/Resources/public/apps/ikApp/shared/elements/mediaOverview/media-overview-directive.html +++ b/Resources/public/apps/ikShared/elements/mediaOverview/media-overview-directive.html @@ -19,7 +19,7 @@ Logoer Videoer
-
+
diff --git a/Resources/public/apps/ikApp/shared/elements/mediaOverview/mediaOverviewDirective.js b/Resources/public/apps/ikShared/elements/mediaOverview/mediaOverviewDirective.js similarity index 96% rename from Resources/public/apps/ikApp/shared/elements/mediaOverview/mediaOverviewDirective.js rename to Resources/public/apps/ikShared/elements/mediaOverview/mediaOverviewDirective.js index a67e4fa..a9c3f75 100644 --- a/Resources/public/apps/ikApp/shared/elements/mediaOverview/mediaOverviewDirective.js +++ b/Resources/public/apps/ikShared/elements/mediaOverview/mediaOverviewDirective.js @@ -14,7 +14,7 @@ * which media type should be shown, "image" or "video", * leave out show all media. */ -angular.module('ikApp').directive('ikMediaOverview', [ +angular.module('ikShared').directive('ikMediaOverview', [ 'busService', function (busService) { 'use strict'; @@ -193,7 +193,7 @@ angular.module('ikApp').directive('ikMediaOverview', [ } }); }, - templateUrl: 'bundles/os2displayadmin/apps/ikApp/shared/elements/mediaOverview/media-overview-directive.html?' + window.config.version + templateUrl: 'bundles/os2displayadmin/apps/ikShared/elements/mediaOverview/media-overview-directive.html?' + window.config.version }; } ]); diff --git a/Resources/public/apps/ikApp/shared/elements/mediaUpload/media-upload-directive.html b/Resources/public/apps/ikShared/elements/mediaUpload/media-upload-directive.html similarity index 99% rename from Resources/public/apps/ikApp/shared/elements/mediaUpload/media-upload-directive.html rename to Resources/public/apps/ikShared/elements/mediaUpload/media-upload-directive.html index a9327fc..a5b0c07 100644 --- a/Resources/public/apps/ikApp/shared/elements/mediaUpload/media-upload-directive.html +++ b/Resources/public/apps/ikShared/elements/mediaUpload/media-upload-directive.html @@ -58,7 +58,7 @@

Media - upload

-
+
{{ getProgress() }} %
diff --git a/Resources/public/apps/ikApp/shared/elements/mediaUpload/mediaUploadDirective.js b/Resources/public/apps/ikShared/elements/mediaUpload/mediaUploadDirective.js similarity index 96% rename from Resources/public/apps/ikApp/shared/elements/mediaUpload/mediaUploadDirective.js rename to Resources/public/apps/ikShared/elements/mediaUpload/mediaUploadDirective.js index 78185ef..263d944 100644 --- a/Resources/public/apps/ikApp/shared/elements/mediaUpload/mediaUploadDirective.js +++ b/Resources/public/apps/ikShared/elements/mediaUpload/mediaUploadDirective.js @@ -11,7 +11,7 @@ * Emits the 'mediaUpload.uploadComplete' event for a parent controller to catch. * Catch this event to handle when the upload is complete. */ -angular.module('ikApp').directive('ikMediaUpload', ['busService', 'userService', +angular.module('ikShared').directive('ikMediaUpload', ['busService', 'userService', function (busService, userService) { 'use strict'; @@ -223,7 +223,7 @@ angular.module('ikApp').directive('ikMediaUpload', ['busService', 'userService', cleanupGetCurrentUserGroups(); }); }, - templateUrl: 'bundles/os2displayadmin/apps/ikApp/shared/elements/mediaUpload/media-upload-directive.html?' + window.config.version + templateUrl: 'bundles/os2displayadmin/apps/ikShared/elements/mediaUpload/media-upload-directive.html?' + window.config.version }; } ]); diff --git a/Resources/public/apps/ikApp/shared/elements/ngModal/ng-modal.html b/Resources/public/apps/ikShared/elements/ngModal/ng-modal.html similarity index 100% rename from Resources/public/apps/ikApp/shared/elements/ngModal/ng-modal.html rename to Resources/public/apps/ikShared/elements/ngModal/ng-modal.html diff --git a/Resources/public/apps/ikApp/shared/elements/ngModal/ng-modal.js b/Resources/public/apps/ikShared/elements/ngModal/ng-modal.js similarity index 91% rename from Resources/public/apps/ikApp/shared/elements/ngModal/ng-modal.js rename to Resources/public/apps/ikShared/elements/ngModal/ng-modal.js index 258693e..9f7cd52 100644 --- a/Resources/public/apps/ikApp/shared/elements/ngModal/ng-modal.js +++ b/Resources/public/apps/ikShared/elements/ngModal/ng-modal.js @@ -47,7 +47,7 @@ } }); }, - templateUrl: 'bundles/os2displayadmin/apps/ikApp/shared/elements/ngModal/ng-modal.html?' + window.config.version + templateUrl: 'bundles/os2displayadmin/apps/ikShared/elements/ngModal/ng-modal.html?' + window.config.version }; } ]); diff --git a/Resources/public/apps/ikApp/shared/elements/pager/pager-directive.html b/Resources/public/apps/ikShared/elements/pager/pager-directive.html similarity index 100% rename from Resources/public/apps/ikApp/shared/elements/pager/pager-directive.html rename to Resources/public/apps/ikShared/elements/pager/pager-directive.html diff --git a/Resources/public/apps/ikApp/shared/elements/pager/pagerDirective.js b/Resources/public/apps/ikShared/elements/pager/pagerDirective.js similarity index 94% rename from Resources/public/apps/ikApp/shared/elements/pager/pagerDirective.js rename to Resources/public/apps/ikShared/elements/pager/pagerDirective.js index 19a299e..0ad9942 100644 --- a/Resources/public/apps/ikApp/shared/elements/pager/pagerDirective.js +++ b/Resources/public/apps/ikShared/elements/pager/pagerDirective.js @@ -6,7 +6,7 @@ /** * Paging directive. */ -angular.module('ikApp').directive('ikPager', [ +angular.module('ikShared').directive('ikPager', [ function () { 'use strict'; @@ -104,7 +104,7 @@ angular.module('ikApp').directive('ikPager', [ } ); }, - templateUrl: 'bundles/os2displayadmin/apps/ikApp/shared/elements/pager/pager-directive.html?' + window.config.version + templateUrl: 'bundles/os2displayadmin/apps/ikShared/elements/pager/pager-directive.html?' + window.config.version }; } ]); diff --git a/Resources/public/apps/ikApp/shared/elements/screen/screen-template.html b/Resources/public/apps/ikShared/elements/screen/screen-template.html similarity index 100% rename from Resources/public/apps/ikApp/shared/elements/screen/screen-template.html rename to Resources/public/apps/ikShared/elements/screen/screen-template.html diff --git a/Resources/public/apps/ikApp/shared/elements/screen/screenDirective.js b/Resources/public/apps/ikShared/elements/screen/screenDirective.js similarity index 82% rename from Resources/public/apps/ikApp/shared/elements/screen/screenDirective.js rename to Resources/public/apps/ikShared/elements/screen/screenDirective.js index f93fe66..be99d0e 100644 --- a/Resources/public/apps/ikApp/shared/elements/screen/screenDirective.js +++ b/Resources/public/apps/ikShared/elements/screen/screenDirective.js @@ -6,7 +6,7 @@ /** * Directive to insert a screen. */ -angular.module('ikApp').directive('ikScreen', [ +angular.module('ikShared').directive('ikScreen', [ function () { 'use strict'; @@ -37,7 +37,7 @@ angular.module('ikApp').directive('ikScreen', [ } }); }, - templateUrl: 'bundles/os2displayadmin/apps/ikApp/shared/elements/screen/screen-template.html?' + window.config.version + templateUrl: 'bundles/os2displayadmin/apps/ikShared/elements/screen/screen-template.html?' + window.config.version }; } ]); diff --git a/Resources/public/apps/ikApp/shared/elements/screenOverview/screen-overview-directive.html b/Resources/public/apps/ikShared/elements/screenOverview/screen-overview-directive.html similarity index 94% rename from Resources/public/apps/ikApp/shared/elements/screenOverview/screen-overview-directive.html rename to Resources/public/apps/ikShared/elements/screenOverview/screen-overview-directive.html index 1c27e45..70ea113 100644 --- a/Resources/public/apps/ikApp/shared/elements/screenOverview/screen-overview-directive.html +++ b/Resources/public/apps/ikShared/elements/screenOverview/screen-overview-directive.html @@ -16,7 +16,7 @@ Mine
-
+
@@ -41,6 +41,7 @@
-
+
diff --git a/Resources/public/apps/ikApp/shared/elements/slideOverview/slideOverviewDirective.js b/Resources/public/apps/ikShared/elements/slideOverview/slideOverviewDirective.js similarity index 96% rename from Resources/public/apps/ikApp/shared/elements/slideOverview/slideOverviewDirective.js rename to Resources/public/apps/ikShared/elements/slideOverview/slideOverviewDirective.js index 68e339d..23ed7b6 100644 --- a/Resources/public/apps/ikApp/shared/elements/slideOverview/slideOverviewDirective.js +++ b/Resources/public/apps/ikShared/elements/slideOverview/slideOverviewDirective.js @@ -6,7 +6,7 @@ /** * Directive to show the slide overview. */ -angular.module('ikApp').directive('ikSlideOverview', ['busService', '$filter', +angular.module('ikShared').directive('ikSlideOverview', ['busService', '$filter', function (busService, $filter) { 'use strict'; @@ -205,7 +205,7 @@ angular.module('ikApp').directive('ikSlideOverview', ['busService', '$filter', $scope.setSearchFilters(); }, - templateUrl: 'bundles/os2displayadmin/apps/ikApp/shared/elements/slideOverview/slide-overview-directive.html?' + window.config.version + templateUrl: 'bundles/os2displayadmin/apps/ikShared/elements/slideOverview/slide-overview-directive.html?' + window.config.version }; } ]); diff --git a/Resources/public/apps/ikApp/shared/elements/thumb/thumbDirective.js b/Resources/public/apps/ikShared/elements/thumb/thumbDirective.js similarity index 95% rename from Resources/public/apps/ikApp/shared/elements/thumb/thumbDirective.js rename to Resources/public/apps/ikShared/elements/thumb/thumbDirective.js index b7b7580..40e6caa 100644 --- a/Resources/public/apps/ikApp/shared/elements/thumb/thumbDirective.js +++ b/Resources/public/apps/ikShared/elements/thumb/thumbDirective.js @@ -9,7 +9,7 @@ * @author: nerv * @version: 0.1.2, 2014-01-09 */ -angular.module('ikApp').directive('ikThumb', ['$window', function ($window) { +angular.module('ikShared').directive('ikThumb', ['$window', function ($window) { 'use strict'; var helper = { diff --git a/Resources/public/apps/ikApp/shared/services/channelFactory.js b/Resources/public/apps/ikShared/services/channelFactory.js similarity index 98% rename from Resources/public/apps/ikApp/shared/services/channelFactory.js rename to Resources/public/apps/ikShared/services/channelFactory.js index 1195982..fd903e0 100644 --- a/Resources/public/apps/ikApp/shared/services/channelFactory.js +++ b/Resources/public/apps/ikShared/services/channelFactory.js @@ -6,7 +6,7 @@ /** * Channel factory. Main entry point for accessing channels. */ -angular.module('ikApp').factory('channelFactory', ['$http', '$q', 'busService', +angular.module('ikShared').factory('channelFactory', ['$http', '$q', 'busService', function ($http, $q, busService) { 'use strict'; diff --git a/Resources/public/apps/ikApp/shared/services/kobaFactory.js b/Resources/public/apps/ikShared/services/kobaFactory.js similarity index 94% rename from Resources/public/apps/ikApp/shared/services/kobaFactory.js rename to Resources/public/apps/ikShared/services/kobaFactory.js index 5dd28d5..d908b9b 100644 --- a/Resources/public/apps/ikApp/shared/services/kobaFactory.js +++ b/Resources/public/apps/ikShared/services/kobaFactory.js @@ -6,7 +6,7 @@ /** * Koba factory. */ -angular.module('ikApp').factory('kobaFactory', ['$http', '$q', +angular.module('ikShared').factory('kobaFactory', ['$http', '$q', function ($http, $q) { 'use strict'; diff --git a/Resources/public/apps/ikApp/shared/services/mediaFactory.js b/Resources/public/apps/ikShared/services/mediaFactory.js similarity index 97% rename from Resources/public/apps/ikApp/shared/services/mediaFactory.js rename to Resources/public/apps/ikShared/services/mediaFactory.js index 88d0dc9..6eb0055 100644 --- a/Resources/public/apps/ikApp/shared/services/mediaFactory.js +++ b/Resources/public/apps/ikShared/services/mediaFactory.js @@ -6,7 +6,7 @@ /** * Media factory. Main entry to media. */ -angular.module('ikApp').factory('mediaFactory', ['$http', '$q', 'busService', +angular.module('ikShared').factory('mediaFactory', ['$http', '$q', 'busService', function ($http, $q, busService) { 'use strict'; diff --git a/Resources/public/apps/ikApp/shared/services/screenFactory.js b/Resources/public/apps/ikShared/services/screenFactory.js similarity index 98% rename from Resources/public/apps/ikApp/shared/services/screenFactory.js rename to Resources/public/apps/ikShared/services/screenFactory.js index 9c46dd4..51641cc 100644 --- a/Resources/public/apps/ikApp/shared/services/screenFactory.js +++ b/Resources/public/apps/ikShared/services/screenFactory.js @@ -6,7 +6,7 @@ /** * Screen factory. Main entry point for screens and screen groups. */ -angular.module('ikApp').factory('screenFactory', ['$http', '$q', 'busService', +angular.module('ikShared').factory('screenFactory', ['$http', '$q', 'busService', function ($http, $q, busService) { 'use strict'; diff --git a/Resources/public/apps/ikApp/shared/services/sharedChannelFactory.js b/Resources/public/apps/ikShared/services/sharedChannelFactory.js similarity index 96% rename from Resources/public/apps/ikApp/shared/services/sharedChannelFactory.js rename to Resources/public/apps/ikShared/services/sharedChannelFactory.js index 087793a..549d2a1 100644 --- a/Resources/public/apps/ikApp/shared/services/sharedChannelFactory.js +++ b/Resources/public/apps/ikShared/services/sharedChannelFactory.js @@ -6,7 +6,7 @@ /** * Shared Channel factory. Main entry point for accessing shared channels. */ -angular.module('ikApp').factory('sharedChannelFactory', ['$http', '$q', 'sharedSearchFactory', +angular.module('ikShared').factory('sharedChannelFactory', ['$http', '$q', 'sharedSearchFactory', function ($http, $q, sharedSearchFactory) { 'use strict'; diff --git a/Resources/public/apps/ikApp/shared/services/sharedSearchFactory.js b/Resources/public/apps/ikShared/services/sharedSearchFactory.js similarity index 98% rename from Resources/public/apps/ikApp/shared/services/sharedSearchFactory.js rename to Resources/public/apps/ikShared/services/sharedSearchFactory.js index 3004fd0..9fd6660 100644 --- a/Resources/public/apps/ikApp/shared/services/sharedSearchFactory.js +++ b/Resources/public/apps/ikShared/services/sharedSearchFactory.js @@ -8,7 +8,7 @@ * * The communication is based on web-sockets via socket.io library. */ -angular.module('ikApp').service('sharedSearchFactory', ['$q', '$rootScope', '$http', 'busService', +angular.module('ikShared').service('sharedSearchFactory', ['$q', '$rootScope', '$http', 'busService', function ($q, $rootScope, $http, busService) { 'use strict'; diff --git a/Resources/public/apps/ikApp/shared/services/slideFactory.js b/Resources/public/apps/ikShared/services/slideFactory.js similarity index 98% rename from Resources/public/apps/ikApp/shared/services/slideFactory.js rename to Resources/public/apps/ikShared/services/slideFactory.js index 060e4f0..b3c5d78 100644 --- a/Resources/public/apps/ikApp/shared/services/slideFactory.js +++ b/Resources/public/apps/ikShared/services/slideFactory.js @@ -6,7 +6,7 @@ /** * Slide factory. Main entry point for slides. */ -angular.module('ikApp').factory('slideFactory', ['$http', '$q', 'busService', +angular.module('ikShared').factory('slideFactory', ['$http', '$q', 'busService', function ($http, $q, busService) { 'use strict'; diff --git a/Resources/public/apps/ikApp/shared/services/templateFactory.js b/Resources/public/apps/ikShared/services/templateFactory.js similarity index 85% rename from Resources/public/apps/ikApp/shared/services/templateFactory.js rename to Resources/public/apps/ikShared/services/templateFactory.js index 6fd08e1..2658a7e 100644 --- a/Resources/public/apps/ikApp/shared/services/templateFactory.js +++ b/Resources/public/apps/ikShared/services/templateFactory.js @@ -6,7 +6,8 @@ /** * Template factory. Main entry point for templates. */ -angular.module('ikApp').factory('templateFactory', ['$q', '$http', +angular.module('ikShared').factory('templateFactory', [ + '$q', '$http', function ($q, $http) { 'use strict'; @@ -26,7 +27,7 @@ angular.module('ikApp').factory('templateFactory', ['$q', '$http', defer.resolve(slideTemplates); } else { - $http.get('/api/templates/slides/enabled') + $http.get('/api/templates/slides/all') .success(function (data) { slideTemplates = data; defer.resolve(slideTemplates); @@ -78,7 +79,7 @@ angular.module('ikApp').factory('templateFactory', ['$q', '$http', defer.resolve(screenTemplates); } else { - $http.get('/api/templates/screens/enabled') + $http.get('/api/templates/screens/all') .success(function (data) { screenTemplates = data; defer.resolve(screenTemplates); @@ -128,9 +129,10 @@ angular.module('ikApp').factory('templateFactory', ['$q', '$http', var defer = $q.defer(); $http.post('/api/templates/save/enabled', { - "screens": enabledScreenTemplates, - "slides": enabledSlideTemplates + 'screens': enabledScreenTemplates, + 'slides': enabledSlideTemplates }) + .success(function (data, status) { $http.get('/api/templates/slides/enabled') .success(function (data) { @@ -157,16 +159,15 @@ angular.module('ikApp').factory('templateFactory', ['$q', '$http', }; /** - * Get all slide templates. + * Get enabled slide templates. * @returns {*} */ - factory.getAllSlideTemplates = function () { + factory.getEnabledSlideTemplates = function () { var defer = $q.defer(); - $http.get('/api/templates/slides/all') + $http.get('/api/templates/slides/enabled') .success(function (data) { - slideTemplates = data; - defer.resolve(slideTemplates); + defer.resolve(data); }) .error(function (data, status) { defer.reject(status); @@ -176,16 +177,15 @@ angular.module('ikApp').factory('templateFactory', ['$q', '$http', }; /** - * Get all screen templates. + * Get enabled screen templates. * @returns {*} */ - factory.getAllScreenTemplates = function () { + factory.getEnabledScreenTemplates = function () { var defer = $q.defer(); - $http.get('/api/templates/screens/all') + $http.get('/api/templates/screens/enabled') .success(function (data) { - slideTemplates = data; - defer.resolve(slideTemplates); + defer.resolve(data); }) .error(function (data, status) { defer.reject(status); @@ -196,4 +196,4 @@ angular.module('ikApp').factory('templateFactory', ['$q', '$http', return factory; } -]); \ No newline at end of file +]); diff --git a/Resources/public/apps/ikApp/shared/toolbars/channel-picker-tool.html b/Resources/public/apps/ikShared/toolbars/channel-picker-tool.html similarity index 100% rename from Resources/public/apps/ikApp/shared/toolbars/channel-picker-tool.html rename to Resources/public/apps/ikShared/toolbars/channel-picker-tool.html diff --git a/Resources/public/apps/ikApp/shared/widgets/channelPickerWidget/channel-picker-widget.html b/Resources/public/apps/ikShared/widgets/channelPickerWidget/channel-picker-widget.html similarity index 100% rename from Resources/public/apps/ikApp/shared/widgets/channelPickerWidget/channel-picker-widget.html rename to Resources/public/apps/ikShared/widgets/channelPickerWidget/channel-picker-widget.html diff --git a/Resources/public/apps/ikApp/shared/widgets/channelPickerWidget/channelPickerWidget.js b/Resources/public/apps/ikShared/widgets/channelPickerWidget/channelPickerWidget.js similarity index 97% rename from Resources/public/apps/ikApp/shared/widgets/channelPickerWidget/channelPickerWidget.js rename to Resources/public/apps/ikShared/widgets/channelPickerWidget/channelPickerWidget.js index ea0cd04..3d76b27 100644 --- a/Resources/public/apps/ikApp/shared/widgets/channelPickerWidget/channelPickerWidget.js +++ b/Resources/public/apps/ikShared/widgets/channelPickerWidget/channelPickerWidget.js @@ -25,7 +25,7 @@ return { restrict: 'E', replace: true, - templateUrl: 'bundles/os2displayadmin/apps/ikApp/shared/widgets/channelPickerWidget/channel-picker-widget.html?' + window.config.version, + templateUrl: 'bundles/os2displayadmin/apps/ikShared/widgets/channelPickerWidget/channel-picker-widget.html?' + window.config.version, scope: { screen: '=', region: '=' diff --git a/Resources/public/apps/ikApp/shared/widgets/channelRemoverWidget/channel-remover-widget.html b/Resources/public/apps/ikShared/widgets/channelRemoverWidget/channel-remover-widget.html similarity index 100% rename from Resources/public/apps/ikApp/shared/widgets/channelRemoverWidget/channel-remover-widget.html rename to Resources/public/apps/ikShared/widgets/channelRemoverWidget/channel-remover-widget.html diff --git a/Resources/public/apps/ikApp/shared/widgets/channelRemoverWidget/channelRemoverWidget.js b/Resources/public/apps/ikShared/widgets/channelRemoverWidget/channelRemoverWidget.js similarity index 92% rename from Resources/public/apps/ikApp/shared/widgets/channelRemoverWidget/channelRemoverWidget.js rename to Resources/public/apps/ikShared/widgets/channelRemoverWidget/channelRemoverWidget.js index 6ee424d..8182e3c 100644 --- a/Resources/public/apps/ikApp/shared/widgets/channelRemoverWidget/channelRemoverWidget.js +++ b/Resources/public/apps/ikShared/widgets/channelRemoverWidget/channelRemoverWidget.js @@ -24,7 +24,7 @@ return { restrict: 'E', replace: true, - templateUrl: 'bundles/os2displayadmin/apps/ikApp/shared/widgets/channelRemoverWidget/channel-remover-widget.html?' + window.config.version, + templateUrl: 'bundles/os2displayadmin/apps/ikShared/widgets/channelRemoverWidget/channel-remover-widget.html?' + window.config.version, scope: { screen: '=', region: '=' diff --git a/Resources/public/apps/ikApp/shared/widgets/numberWidget/numberWidget.js b/Resources/public/apps/ikShared/widgets/numberWidget/numberWidget.js similarity index 100% rename from Resources/public/apps/ikApp/shared/widgets/numberWidget/numberWidget.js rename to Resources/public/apps/ikShared/widgets/numberWidget/numberWidget.js diff --git a/Resources/public/apps/ikApp/shared/widgets/regionPreviewWidget/region-preview-widget.html b/Resources/public/apps/ikShared/widgets/regionPreviewWidget/region-preview-widget.html similarity index 100% rename from Resources/public/apps/ikApp/shared/widgets/regionPreviewWidget/region-preview-widget.html rename to Resources/public/apps/ikShared/widgets/regionPreviewWidget/region-preview-widget.html diff --git a/Resources/public/apps/ikApp/shared/widgets/regionPreviewWidget/regionPreviewWidget.js b/Resources/public/apps/ikShared/widgets/regionPreviewWidget/regionPreviewWidget.js similarity index 87% rename from Resources/public/apps/ikApp/shared/widgets/regionPreviewWidget/regionPreviewWidget.js rename to Resources/public/apps/ikShared/widgets/regionPreviewWidget/regionPreviewWidget.js index 9461003..9815c11 100644 --- a/Resources/public/apps/ikApp/shared/widgets/regionPreviewWidget/regionPreviewWidget.js +++ b/Resources/public/apps/ikShared/widgets/regionPreviewWidget/regionPreviewWidget.js @@ -29,7 +29,7 @@ width: '=' }, replace: false, - templateUrl: 'bundles/os2displayadmin/apps/ikApp/shared/widgets/regionPreviewWidget/region-preview-widget.html?' + window.config.version, + templateUrl: 'bundles/os2displayadmin/apps/ikShared/widgets/regionPreviewWidget/region-preview-widget.html?' + window.config.version, link: function (scope) { scope.getNumberOfChannels = function getNumberOfChannels() { var n = 0; diff --git a/Resources/public/apps/ikApp/shared/widgets/screenTemplatePickerWidget/screenTemplatePickerWidget.html b/Resources/public/apps/ikShared/widgets/screenTemplatePickerWidget/screenTemplatePickerWidget.html similarity index 100% rename from Resources/public/apps/ikApp/shared/widgets/screenTemplatePickerWidget/screenTemplatePickerWidget.html rename to Resources/public/apps/ikShared/widgets/screenTemplatePickerWidget/screenTemplatePickerWidget.html diff --git a/Resources/public/apps/ikApp/shared/widgets/screenTemplatePickerWidget/screenTemplatePickerWidget.js b/Resources/public/apps/ikShared/widgets/screenTemplatePickerWidget/screenTemplatePickerWidget.js similarity index 85% rename from Resources/public/apps/ikApp/shared/widgets/screenTemplatePickerWidget/screenTemplatePickerWidget.js rename to Resources/public/apps/ikShared/widgets/screenTemplatePickerWidget/screenTemplatePickerWidget.js index c265b39..703cb87 100644 --- a/Resources/public/apps/ikApp/shared/widgets/screenTemplatePickerWidget/screenTemplatePickerWidget.js +++ b/Resources/public/apps/ikShared/widgets/screenTemplatePickerWidget/screenTemplatePickerWidget.js @@ -28,7 +28,7 @@ replace: true, link: function (scope) { scope.templates = []; - templateFactory.getScreenTemplates().then( + templateFactory.getEnabledScreenTemplates().then( function success(data) { scope.templates = data; }, @@ -49,7 +49,7 @@ scope.screen.template = angular.copy(template); }; }, - templateUrl: 'bundles/os2displayadmin/apps/ikApp/shared/widgets/screenTemplatePickerWidget/screenTemplatePickerWidget.html?' + window.config.version + templateUrl: 'bundles/os2displayadmin/apps/ikShared/widgets/screenTemplatePickerWidget/screenTemplatePickerWidget.html?' + window.config.version }; } ]); diff --git a/Resources/public/apps/ikApp/shared/widgets/sharedChannelPickerWidget/shared-channel-picker-widget.html b/Resources/public/apps/ikShared/widgets/sharedChannelPickerWidget/shared-channel-picker-widget.html similarity index 100% rename from Resources/public/apps/ikApp/shared/widgets/sharedChannelPickerWidget/shared-channel-picker-widget.html rename to Resources/public/apps/ikShared/widgets/sharedChannelPickerWidget/shared-channel-picker-widget.html diff --git a/Resources/public/apps/ikApp/shared/widgets/sharedChannelPickerWidget/sharedChannelPickerWidget.js b/Resources/public/apps/ikShared/widgets/sharedChannelPickerWidget/sharedChannelPickerWidget.js similarity index 97% rename from Resources/public/apps/ikApp/shared/widgets/sharedChannelPickerWidget/sharedChannelPickerWidget.js rename to Resources/public/apps/ikShared/widgets/sharedChannelPickerWidget/sharedChannelPickerWidget.js index e9b34d5..27e6b22 100644 --- a/Resources/public/apps/ikApp/shared/widgets/sharedChannelPickerWidget/sharedChannelPickerWidget.js +++ b/Resources/public/apps/ikShared/widgets/sharedChannelPickerWidget/sharedChannelPickerWidget.js @@ -24,7 +24,7 @@ return { restrict: 'E', replace: true, - templateUrl: 'bundles/os2displayadmin/apps/ikApp/shared/widgets/sharedChannelPickerWidget/shared-channel-picker-widget.html?' + window.config.version, + templateUrl: 'bundles/os2displayadmin/apps/ikShared/widgets/sharedChannelPickerWidget/shared-channel-picker-widget.html?' + window.config.version, scope: { screen: '=', region: '=' diff --git a/Resources/public/apps/ikApp/shared/widgets/textAreaWidget/textAreaWidget.js b/Resources/public/apps/ikShared/widgets/textAreaWidget/textAreaWidget.js similarity index 100% rename from Resources/public/apps/ikApp/shared/widgets/textAreaWidget/textAreaWidget.js rename to Resources/public/apps/ikShared/widgets/textAreaWidget/textAreaWidget.js diff --git a/Resources/public/apps/ikApp/shared/widgets/textWidget/textWidget.js b/Resources/public/apps/ikShared/widgets/textWidget/textWidget.js similarity index 100% rename from Resources/public/apps/ikApp/shared/widgets/textWidget/textWidget.js rename to Resources/public/apps/ikShared/widgets/textWidget/textWidget.js diff --git a/Resources/public/apps/mainModule/controller/baseApiController.js b/Resources/public/apps/mainModule/controller/baseApiController.js index 878ab9c..8f1be71 100644 --- a/Resources/public/apps/mainModule/controller/baseApiController.js +++ b/Resources/public/apps/mainModule/controller/baseApiController.js @@ -3,7 +3,7 @@ * Base Api controller. */ -angular.module('adminApp').controller('BaseApiController', [ +angular.module('mainModule').controller('BaseApiController', [ 'busService', '$scope', '$controller', '$timeout', '$q', function (busService, $scope, $controller, $timeout, $q) { 'use strict'; diff --git a/Resources/public/apps/menuApp/directive/subMenuDirective.js b/Resources/public/apps/menuApp/directive/subMenuDirective.js index 1c3b329..51c7ef8 100644 --- a/Resources/public/apps/menuApp/directive/subMenuDirective.js +++ b/Resources/public/apps/menuApp/directive/subMenuDirective.js @@ -2,97 +2,102 @@ * Sub menu directive. */ angular.module('menuApp') - .directive('subMenu', ['$location', 'busService', - function ($location, busService) { - 'use strict'; +.directive('subMenu', [ + '$location', 'busService', + function ($location, busService) { + 'use strict'; - return { - restrict: 'E', - templateUrl: 'bundles/os2displayadmin/apps/menuApp/directive/sub-menu.html?' + config.version, - scope: {}, - link: function (scope) { - scope.url = $location.url(); - var subMenus = []; - scope.subMenuItems = []; + return { + restrict: 'E', + templateUrl: 'bundles/os2displayadmin/apps/menuApp/directive/sub-menu.html?' + config.version, + scope: {}, + link: function (scope) { + scope.url = $location.url(); + var subMenus = []; + scope.subMenuItems = []; - // Listen for Sub menu items. - // Add all not already added menu items. - busService.$on('menuApp.returnSubMenuItems', function returnSubMenuItems(event, data) { - for (var i = 0; i < data.length; i++) { - var mainMenuItem = data[i].mainMenuItem; - var items = data[i].items; + // Listen for Sub menu items. + // Add all not already added menu items. + busService.$on('menuApp.returnSubMenuItems', function returnSubMenuItems (event, data) { + for (var i = 0; i < data.length; i++) { + var mainMenuItem = data[i].mainMenuItem; + var items = data[i].items; - // If mainMenuItem is not already there create it - if (!subMenus.hasOwnProperty(mainMenuItem)) { - subMenus[mainMenuItem] = []; - } + // If mainMenuItem is not already there create it + if (!subMenus.hasOwnProperty(mainMenuItem)) { + subMenus[mainMenuItem] = []; + } - // Iterate each item. - // Make sure they have not already been added to sub menu, - // else add it. - for (var j = 0; j < items.length; j++) { - var item = items[j]; + // Iterate each item. + // Make sure they have not already been added to sub menu, + // else add it. + for (var j = 0; j < items.length; j++) { + var item = items[j]; - var add = true; - for (var k = 0; k < subMenus[mainMenuItem].length; k++) { - if (subMenus[mainMenuItem][k].title === item.title) { - add = false; - break; - } + var add = true; + for (var k = 0; k < subMenus[mainMenuItem].length; k++) { + if (subMenus[mainMenuItem][k].title === item.title) { + add = false; + break; } + } - if (add) { - subMenus[mainMenuItem].push(item); - } + if (add) { + subMenus[mainMenuItem].push(item); } } + } - // Sort by weight. - for (var key in subMenus) { - subMenus[key].sort(function(a, b) { - return parseInt(a.weight) - parseInt(b.weight); - }); - } + // Sort by weight. + for (var key in subMenus) { + subMenus[key].sort(function (a, b) { + return parseInt(a.weight) - parseInt(b.weight); + }); + } - // Update what submenu is displayed. - updateSubMenu(); - }); + // Update what submenu is displayed. + updateSubMenu(); + }); - /** - * Set the submenu items according to what the url starts with. - * @TODO: Make this generic. - */ - var updateSubMenu = function () { - if (scope.url.indexOf('/channel') === 0 || scope.url.indexOf('/shared-channel') === 0) { - scope.subMenuItems = subMenus['channel']; - } - else if (scope.url.indexOf('/slide') === 0) { - scope.subMenuItems = subMenus['slide']; - } - else if (scope.url.indexOf('/screen') === 0) { - scope.subMenuItems = subMenus['screen']; - } - else if (scope.url.indexOf('/media') === 0) { - scope.subMenuItems = subMenus['media']; - } - else if (scope.url.indexOf('/admin') === 0) { - scope.subMenuItems = subMenus['admin']; + /** + * Set the submenu items according to what the url starts with. + * @TODO: Make this generic. + */ + var updateSubMenu = function () { + if (scope.url.indexOf('/channel') === 0 || scope.url.indexOf('/shared-channel') === 0) { + scope.subMenuItems = subMenus['channel']; + } + else if (scope.url.indexOf('/slide') === 0) { + scope.subMenuItems = subMenus['slide']; + } + else if (scope.url.indexOf('/screen') === 0) { + scope.subMenuItems = subMenus['screen']; + } + else if (scope.url.indexOf('/media') === 0) { + scope.subMenuItems = subMenus['media']; + } + else { + var split = scope.url.split('/'); + + if (split.length > 1) { + scope.subMenuItems = subMenus[split[1]]; } else { scope.subMenuItems = []; } - }; + } + }; - // Listen for location change - busService.$on('$locationChangeSuccess', function () { - scope.url = $location.url(); + // Listen for location change + busService.$on('$locationChangeSuccess', function () { + scope.url = $location.url(); - updateSubMenu(); - }); + updateSubMenu(); + }); - // Request Sub menu items - busService.$emit('menuApp.requestSubMenuItems'); - } - }; - } - ]); + // Request Sub menu items + busService.$emit('menuApp.requestSubMenuItems'); + } + }; + } +]); diff --git a/Resources/public/apps/messageApp/directive/messages.html b/Resources/public/apps/messageApp/directive/messages.html index 80f027c..c09fdc8 100644 --- a/Resources/public/apps/messageApp/directive/messages.html +++ b/Resources/public/apps/messageApp/directive/messages.html @@ -16,4 +16,4 @@ close
-
\ No newline at end of file +
diff --git a/Resources/public/apps/styleguideComponentsModule/modules/popup.js b/Resources/public/apps/styleguideComponentsModule/modules/popup.js index f1f338b..f4da21f 100644 --- a/Resources/public/apps/styleguideComponentsModule/modules/popup.js +++ b/Resources/public/apps/styleguideComponentsModule/modules/popup.js @@ -20,4 +20,4 @@ angular.module('styleguideComponentsModule').directive('popup', function(){ '
' + '
' } -}); \ No newline at end of file +}); diff --git a/Resources/public/assets/build/assets.min.js b/Resources/public/assets/build/assets.min.js index 9c5b7d4..62f3154 100644 --- a/Resources/public/assets/build/assets.min.js +++ b/Resources/public/assets/build/assets.min.js @@ -1,15 +1 @@ -!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=e.length,n=ie.type(e);return"function"!==n&&!ie.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e))}function r(e,t,n){if(ie.isFunction(t))return ie.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return ie.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(de.test(t))return ie.filter(t,e,n);t=ie.filter(t,e)}return ie.grep(e,function(e){return ie.inArray(e,t)>=0!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t=be[e]={};return ie.each(e.match($e)||[],function(e,n){t[n]=!0}),t}function a(){pe.addEventListener?(pe.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1)):(pe.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(pe.addEventListener||"load"===event.type||"complete"===pe.readyState)&&(a(),ie.ready())}function u(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(Ce,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Se.test(n)?ie.parseJSON(n):n)}catch(i){}ie.data(e,t,n)}else n=void 0}return n}function l(e){var t;for(t in e)if(("data"!==t||!ie.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(ie.acceptData(e)){var i,o,a=ie.expando,s=e.nodeType,u=s?ie.cache:e,l=s?e[a]:e[a]&&a;if(l&&u[l]&&(r||u[l].data)||void 0!==n||"string"!=typeof t)return l||(l=s?e[a]=G.pop()||ie.guid++:a),u[l]||(u[l]=s?{}:{toJSON:ie.noop}),("object"==typeof t||"function"==typeof t)&&(r?u[l]=ie.extend(u[l],t):u[l].data=ie.extend(u[l].data,t)),o=u[l],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[ie.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[ie.camelCase(t)])):i=o,i}}function f(e,t,n){if(ie.acceptData(e)){var r,i,o=e.nodeType,a=o?ie.cache:e,s=o?e[ie.expando]:ie.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){ie.isArray(t)?t=t.concat(ie.map(t,ie.camelCase)):t in r?t=[t]:(t=ie.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!l(r):!ie.isEmptyObject(r))return}(n||(delete a[s].data,l(a[s])))&&(o?ie.cleanData([e],!0):ne.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}function d(){return!0}function h(){return!1}function p(){try{return pe.activeElement}catch(e){}}function m(e){var t=Fe.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function g(e,t){var n,r,i=0,o=typeof e.getElementsByTagName!==_e?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==_e?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||ie.nodeName(r,t)?o.push(r):ie.merge(o,g(r,t));return void 0===t||t&&ie.nodeName(e,t)?ie.merge([e],o):o}function v(e){Ee.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t){return ie.nodeName(e,"table")&&ie.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function $(e){return e.type=(null!==ie.find.attr(e,"type"))+"/"+e.type,e}function b(e){var t=Be.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function x(e,t){for(var n,r=0;null!=(n=e[r]);r++)ie._data(n,"globalEval",!t||ie._data(t[r],"globalEval"))}function w(e,t){if(1===t.nodeType&&ie.hasData(e)){var n,r,i,o=ie._data(e),a=ie._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)ie.event.add(t,n,s[n][r])}a.data&&(a.data=ie.extend({},a.data))}}function _(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!ne.noCloneEvent&&t[ie.expando]){i=ie._data(t);for(r in i.events)ie.removeEvent(t,r,i.handle);t.removeAttribute(ie.expando)}"script"===n&&t.text!==e.text?($(t).text=e.text,b(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),ne.html5Clone&&e.innerHTML&&!ie.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ee.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function S(t,n){var r,i=ie(n.createElement(t)).appendTo(n.body),o=e.getDefaultComputedStyle&&(r=e.getDefaultComputedStyle(i[0]))?r.display:ie.css(i[0],"display");return i.detach(),o}function C(e){var t=pe,n=Qe[e];return n||(n=S(e,t),"none"!==n&&n||(Ke=(Ke||ie("