Merge pull request #3348 from FinnStutzenstein/Issue3344
Default sorting for users, mediafiles and assignments (fixes #3344)
This commit is contained in:
commit
76ff708e0e
@ -66,6 +66,8 @@ Core:
|
|||||||
- Delay the 'could not load projector' error 3 seconds to not irritate users
|
- Delay the 'could not load projector' error 3 seconds to not irritate users
|
||||||
with a slow internet connection [#3323].
|
with a slow internet connection [#3323].
|
||||||
- Added config value for standard font size in PDF [#3332].
|
- Added config value for standard font size in PDF [#3332].
|
||||||
|
- Added default sorting for agenda, motions, elections, mediafiles and
|
||||||
|
users [#3334, 3348].
|
||||||
|
|
||||||
Mediafiles:
|
Mediafiles:
|
||||||
- Fixed reloading of PDF on page change [#3274].
|
- Fixed reloading of PDF on page change [#3274].
|
||||||
|
@ -273,7 +273,11 @@ angular.module('OpenSlidesApp.assignments.site', [
|
|||||||
'AssignmentPdfExport',
|
'AssignmentPdfExport',
|
||||||
function($scope, ngDialog, AssignmentForm, Assignment, Tag, Agenda, Projector, ProjectionDefault,
|
function($scope, ngDialog, AssignmentForm, Assignment, Tag, Agenda, Projector, ProjectionDefault,
|
||||||
gettextCatalog, User, osTableFilter, osTableSort, gettext, AssignmentPhases, AssignmentPdfExport) {
|
gettextCatalog, User, osTableFilter, osTableSort, gettext, AssignmentPhases, AssignmentPdfExport) {
|
||||||
Assignment.bindAll({}, $scope, 'assignments');
|
$scope.$watch(function () {
|
||||||
|
return Assignment.lastModified();
|
||||||
|
}, function () {
|
||||||
|
$scope.assignments = _.orderBy(Assignment.getAll(), ['title']);
|
||||||
|
});
|
||||||
Tag.bindAll({}, $scope, 'tags');
|
Tag.bindAll({}, $scope, 'tags');
|
||||||
$scope.$watch(function () {
|
$scope.$watch(function () {
|
||||||
return Projector.lastModified();
|
return Projector.lastModified();
|
||||||
|
@ -25,17 +25,17 @@ angular.module('OpenSlidesApp.mediafiles.list', [
|
|||||||
'Logos',
|
'Logos',
|
||||||
function ($http, $scope, gettext, ngDialog, osTableFilter, osTableSort,
|
function ($http, $scope, gettext, ngDialog, osTableFilter, osTableSort,
|
||||||
ProjectionDefault, Projector, User, Mediafile, MediafileForm, Logos) {
|
ProjectionDefault, Projector, User, Mediafile, MediafileForm, Logos) {
|
||||||
Mediafile.bindAll({}, $scope, 'mediafiles');
|
$scope.$watch(function () {
|
||||||
|
return Mediafile.lastModified();
|
||||||
|
}, function () {
|
||||||
|
$scope.mediafiles = _.orderBy(Mediafile.getAll(), ['title']);
|
||||||
|
});
|
||||||
User.bindAll({}, $scope, 'users');
|
User.bindAll({}, $scope, 'users');
|
||||||
$scope.$watch(function() {
|
$scope.$watch(function() {
|
||||||
return Projector.lastModified();
|
return Projector.lastModified();
|
||||||
}, function() {
|
}, function() {
|
||||||
$scope.projectors = Projector.getAll();
|
$scope.projectors = Projector.getAll();
|
||||||
updatePresentedMediafiles();
|
updatePresentedMediafiles();
|
||||||
});
|
|
||||||
$scope.$watch(function () {
|
|
||||||
return Projector.lastModified();
|
|
||||||
}, function () {
|
|
||||||
var projectiondefault = ProjectionDefault.filter({name: 'mediafiles'})[0];
|
var projectiondefault = ProjectionDefault.filter({name: 'mediafiles'})[0];
|
||||||
if (projectiondefault) {
|
if (projectiondefault) {
|
||||||
$scope.defaultProjectorId = projectiondefault.projector_id;
|
$scope.defaultProjectorId = projectiondefault.projector_id;
|
||||||
|
@ -895,9 +895,8 @@ angular.module('OpenSlidesApp.motions.site', [
|
|||||||
$scope.$watch(function () {
|
$scope.$watch(function () {
|
||||||
return Motion.lastModified();
|
return Motion.lastModified();
|
||||||
}, function () {
|
}, function () {
|
||||||
$scope.motions = Motion.getAll();
|
|
||||||
// always order by identifier (after custom ordering)
|
// always order by identifier (after custom ordering)
|
||||||
$scope.motions = _.orderBy($scope.motions, ['identifier']);
|
$scope.motions = _.orderBy(Motion.getAll(), ['identifier']);
|
||||||
_.forEach($scope.motions, function (motion) {
|
_.forEach($scope.motions, function (motion) {
|
||||||
motion.personalNote = PersonalNoteManager.getNote(motion);
|
motion.personalNote = PersonalNoteManager.getNote(motion);
|
||||||
// For filtering, we cannot filter for .personalNote.star
|
// For filtering, we cannot filter for .personalNote.star
|
||||||
|
@ -537,7 +537,11 @@ angular.module('OpenSlidesApp.users.site', [
|
|||||||
'ErrorMessage',
|
'ErrorMessage',
|
||||||
function($scope, $state, $http, $q, ngDialog, UserForm, User, Group, PasswordGenerator, Projector, ProjectionDefault,
|
function($scope, $state, $http, $q, ngDialog, UserForm, User, Group, PasswordGenerator, Projector, ProjectionDefault,
|
||||||
Config, gettextCatalog, UserCsvExport, osTableFilter, osTableSort, gettext, UserPdfExport, ErrorMessage) {
|
Config, gettextCatalog, UserCsvExport, osTableFilter, osTableSort, gettext, UserPdfExport, ErrorMessage) {
|
||||||
User.bindAll({}, $scope, 'users');
|
$scope.$watch(function () {
|
||||||
|
return User.lastModified();
|
||||||
|
}, function () {
|
||||||
|
$scope.users = _.orderBy(User.getAll(), ['first_name']);
|
||||||
|
});
|
||||||
Group.bindAll({where: {id: {'>': 1}}}, $scope, 'groups');
|
Group.bindAll({where: {id: {'>': 1}}}, $scope, 'groups');
|
||||||
$scope.$watch(function () {
|
$scope.$watch(function () {
|
||||||
return Projector.lastModified();
|
return Projector.lastModified();
|
||||||
|
Loading…
Reference in New Issue
Block a user