Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
tuj committed Jul 3, 2018
2 parents 027d546 + 0c5115d commit 317661f
Show file tree
Hide file tree
Showing 98 changed files with 2,568 additions and 1,432 deletions.
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
94 changes: 51 additions & 43 deletions Resources/config/angular.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -189,6 +196,7 @@ apps:
- itkDateComponent
- itkDigitalClockComponent
- toolsModule
- ikShared

timelineApp:
container: true
Expand Down
4 changes: 2 additions & 2 deletions Resources/public/apps/adminApp/adminApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
Expand All @@ -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
});
Expand Down
175 changes: 175 additions & 0 deletions Resources/public/apps/datetimePicker/datetimepicker.js
Original file line number Diff line number Diff line change
@@ -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();
});
});

}
};
});
Original file line number Diff line number Diff line change
@@ -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) {
Expand All @@ -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;

Expand All @@ -35,7 +35,7 @@ angular.module('ikApp').controller('AdminTemplatesController', ['busService', 't
});
}
);
templateFactory.getAllSlideTemplates().then(
templateFactory.getSlideTemplates().then(
function success(data) {
$scope.slideTemplates = data;

Expand Down Expand Up @@ -75,4 +75,4 @@ angular.module('ikApp').controller('AdminTemplatesController', ['busService', 't
);
}
}
]);
]);
Loading

0 comments on commit 317661f

Please sign in to comment.