Go to top on a page change
This commit is contained in:
parent
3c9ae628e8
commit
96cd3405aa
@ -164,6 +164,7 @@ angular.module('OpenSlidesApp.agenda.site', [
|
||||
$scope.limitBegin = 0;
|
||||
$scope.pageChanged = function() {
|
||||
$scope.limitBegin = ($scope.currentPage - 1) * $scope.itemsPerPage;
|
||||
$scope.gotoTop();
|
||||
};
|
||||
|
||||
// parse duration for inline editing
|
||||
|
@ -128,18 +128,26 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="spacer-top-lg italic">
|
||||
<span os-perms="agenda.can_see_hidden_items">{{ itemsFiltered.length }} /</span>
|
||||
{{ items.length }} {{ "items" | translate }}<span ng-if="(items|filter:{selected:true}).length > 0">,
|
||||
{{(items|filter:{selected:true}).length}} {{ "selected" | translate }}</span>
|
||||
<span os-perms="agenda.can_see_hidden_items" class="optional">
|
||||
<span ng-if="sumDurations() > 0">·
|
||||
<translate>Duration</translate>:
|
||||
{{ sumDurations() | osMinutesToTime }}h
|
||||
<span ng-if="config('agenda_start_event_date_time')">
|
||||
(<translate>Estimated end:</translate> {{ calculateEndTime() }})
|
||||
<div class="spacer-top-lg italic row">
|
||||
<div class="col-md-6">
|
||||
<span os-perms="agenda.can_see_hidden_items">{{ itemsFiltered.length }} /</span>
|
||||
{{ items.length }} {{ "items" | translate }}<span ng-if="(items|filter:{selected:true}).length > 0">,
|
||||
{{(items|filter:{selected:true}).length}} {{ "selected" | translate }}</span>
|
||||
<span os-perms="agenda.can_see_hidden_items" class="optional">
|
||||
<span ng-if="sumDurations() > 0">·
|
||||
<translate>Duration</translate>:
|
||||
{{ sumDurations() | osMinutesToTime }}h
|
||||
<span ng-if="config('agenda_start_event_date_time')">
|
||||
(<translate>Estimated end:</translate> {{ calculateEndTime() }})
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-6" ng-show="itemsFiltered.length > itemsPerPage">
|
||||
<span class="pull-right">
|
||||
<translate>Page</translate> {{ currentPage }} / {{ Math.ceil(itemsFiltered.length/itemsPerPage) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="agenda-table" class="os-table container-fluid">
|
||||
|
@ -351,6 +351,7 @@ angular.module('OpenSlidesApp.assignments.site', [
|
||||
$scope.limitBegin = 0;
|
||||
$scope.pageChanged = function() {
|
||||
$scope.limitBegin = ($scope.currentPage - 1) * $scope.itemsPerPage;
|
||||
$scope.gotoTop();
|
||||
};
|
||||
|
||||
// update phase
|
||||
|
@ -71,10 +71,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="spacer-top-lg italic">
|
||||
{{ assignmentsFiltered.length }} /
|
||||
{{ assignments.length }} {{ "elections" | translate }}<span ng-if="(assignments|filter:{selected:true}).length > 0">,
|
||||
{{(assignments|filter:{selected:true}).length}} {{ "selected" | translate }}</span>
|
||||
<div class="spacer-top-lg italic row">
|
||||
<div class="col-md-6">
|
||||
{{ assignmentsFiltered.length }} /
|
||||
{{ assignments.length }} {{ "elections" | translate }}<span ng-if="(assignments|filter:{selected:true}).length > 0">,
|
||||
{{(assignments|filter:{selected:true}).length}} {{ "selected" | translate }}</span>
|
||||
</div>
|
||||
<div class="col-md-6" ng-show="assignmentsFiltered.length > itemsPerPage">
|
||||
<span class="pull-right">
|
||||
<translate>Page</translate> {{ currentPage }} / {{ Math.ceil(assignmentsFiltered.length/itemsPerPage) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="os-table container-fluid">
|
||||
|
@ -526,6 +526,14 @@ angular.module('OpenSlidesApp.core', [
|
||||
}
|
||||
])
|
||||
|
||||
// Put the Math object into every scope.
|
||||
.run([
|
||||
'$rootScope',
|
||||
function ($rootScope) {
|
||||
$rootScope.Math = window.Math;
|
||||
}
|
||||
])
|
||||
|
||||
// Template hooks
|
||||
// 2 possible uses:
|
||||
// - { Id: 'myHookId', template: '<button>click me</button>' }
|
||||
|
@ -1008,7 +1008,14 @@ angular.module('OpenSlidesApp.core.site', [
|
||||
$scope.show = ($window.pageYOffset >= 150);
|
||||
});
|
||||
});
|
||||
$scope.gotoTop = function () {
|
||||
}
|
||||
])
|
||||
|
||||
.run([
|
||||
'$rootScope',
|
||||
'$window',
|
||||
function ($rootScope, $window) {
|
||||
$rootScope.gotoTop = function () {
|
||||
$window.scrollTo(0, 0);
|
||||
};
|
||||
}
|
||||
|
@ -1055,6 +1055,7 @@ angular.module('OpenSlidesApp.motions.site', [
|
||||
$scope.limitBegin = 0;
|
||||
$scope.pageChanged = function() {
|
||||
$scope.limitBegin = ($scope.currentPage - 1) * $scope.itemsPerPage;
|
||||
$scope.gotoTop();
|
||||
};
|
||||
|
||||
|
||||
|
@ -119,10 +119,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="spacer-top-lg italic">
|
||||
{{ motionsFiltered.length }} /
|
||||
{{ motions.length }} {{ "motions" | translate }}<span ng-if="(motions|filter:{selected:true}).length > 0">,
|
||||
{{(motions|filter:{selected:true}).length}} {{ "selected" | translate }}</span>
|
||||
<div class="spacer-top-lg italic row">
|
||||
<div class="col-md-6">
|
||||
{{ motionsFiltered.length }} /
|
||||
{{ motions.length }} {{ "motions" | translate }}<span ng-if="(motions|filter:{selected:true}).length > 0">,
|
||||
{{(motions|filter:{selected:true}).length}} {{ "selected" | translate }}</span>
|
||||
</div>
|
||||
<div class="col-md-6" ng-show="motionsFiltered.length > itemsPerPage">
|
||||
<span class="pull-right">
|
||||
<translate>Page</translate> {{ currentPage }} / {{ Math.ceil(motionsFiltered.length/itemsPerPage) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="os-table container-fluid">
|
||||
|
@ -623,6 +623,7 @@ angular.module('OpenSlidesApp.users.site', [
|
||||
$scope.limitBegin = 0;
|
||||
$scope.pageChanged = function() {
|
||||
$scope.limitBegin = ($scope.currentPage - 1) * $scope.itemsPerPage;
|
||||
$scope.gotoTop();
|
||||
};
|
||||
|
||||
// Toggle group from user
|
||||
|
@ -126,10 +126,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="spacer-top-lg italic">
|
||||
{{ usersFiltered.length }} /
|
||||
{{ users.length }} {{ "participants" | translate }}<span ng-if="(users|filter:{selected:true}).length > 0">,
|
||||
{{(users|filter:{selected:true}).length}} {{ "selected" | translate }}</span>
|
||||
<div class="spacer-top-lg italic row">
|
||||
<div class="col-md-6">
|
||||
{{ usersFiltered.length }} /
|
||||
{{ users.length }} {{ "participants" | translate }}<span ng-if="(users|filter:{selected:true}).length > 0">,
|
||||
{{(users|filter:{selected:true}).length}} {{ "selected" | translate }}</span>
|
||||
</div>
|
||||
<div class="col-md-6" ng-show="usersFiltered.length > itemsPerPage">
|
||||
<span class="pull-right">
|
||||
<translate>Page</translate> {{ currentPage }} / {{ Math.ceil(usersFiltered.length/itemsPerPage) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- filter users (for user with 'can_see_extra_data' permission) - consider present filter -->
|
||||
|
Loading…
Reference in New Issue
Block a user