add wadoproxy package
This commit is contained in:
commit
5b92455620
16 files changed
+267
-68
No files matched your search
@@ -64,3 +64,4 @@ fastclick@1.0.12
|
|||||||
standard-minifier-css@1.1.8
|
standard-minifier-css@1.1.8
|
||||||
standard-minifier-js@1.1.8
|
standard-minifier-js@1.1.8
|
||||||
johdirr:meteor-git-rev
|
johdirr:meteor-git-rev
|
||||||
|
u2622:persistent-session
|
||||||
@@ -3,6 +3,7 @@ accounts-password@1.2.12
|
|||||||
aldeed:simple-schema@1.5.3
|
aldeed:simple-schema@1.5.3
|
||||||
aldeed:template-extension@4.0.0
|
aldeed:template-extension@4.0.0
|
||||||
allow-deny@1.0.5
|
allow-deny@1.0.5
|
||||||
|
amplify@1.0.0
|
||||||
anti:gagarin@0.4.11
|
anti:gagarin@0.4.11
|
||||||
anti:i18n@0.4.3
|
anti:i18n@0.4.3
|
||||||
arsnebula:reactive-promise@0.9.1
|
arsnebula:reactive-promise@0.9.1
|
||||||
@@ -124,6 +125,7 @@ tracker@1.1.0
|
|||||||
twbs:bootstrap@3.3.6
|
twbs:bootstrap@3.3.6
|
||||||
typ:accounts-ldap@1.0.1
|
typ:accounts-ldap@1.0.1
|
||||||
typ:ldapjs@0.7.3
|
typ:ldapjs@0.7.3
|
||||||
|
u2622:persistent-session@0.4.4
|
||||||
ui@1.0.11
|
ui@1.0.11
|
||||||
underscore@1.0.9
|
underscore@1.0.9
|
||||||
url@1.0.10
|
url@1.0.10
|
||||||
|
|||||||
@@ -42,3 +42,4 @@ standard-minifier-js@1.1.8
|
|||||||
aldeed:simple-schema
|
aldeed:simple-schema
|
||||||
johdirr:meteor-git-rev
|
johdirr:meteor-git-rev
|
||||||
wadoproxy
|
wadoproxy
|
||||||
|
aldeed:template-extension
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
aldeed:simple-schema@1.5.3
|
aldeed:simple-schema@1.5.3
|
||||||
|
aldeed:template-extension@4.0.0
|
||||||
allow-deny@1.0.5
|
allow-deny@1.0.5
|
||||||
arsnebula:reactive-promise@0.9.1
|
arsnebula:reactive-promise@0.9.1
|
||||||
autoupdate@1.3.11
|
autoupdate@1.3.11
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
Template.lastLoginModal.helpers({
|
|
||||||
lastLoginDate: function() {
|
|
||||||
var userLoginDate = ReactiveMethod.call('getPriorLoginDate');
|
|
||||||
if (userLoginDate && userLoginDate.priorLoginDate) {
|
|
||||||
return moment(userLoginDate.priorLoginDate).format("MMMM Do YYYY, HH:mm:ss A");
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
@@ -1,3 +1,10 @@
|
|||||||
|
import { Template } from 'meteor/templating';
|
||||||
|
import { ReactiveVar } from 'meteor/reactive-var';
|
||||||
|
import { Session } from 'meteor/session';
|
||||||
|
|
||||||
|
// Display the last login modal as default
|
||||||
|
Session.setDefault('displayLastLoginModal', true);
|
||||||
|
|
||||||
Template.userAccountMenu.helpers({
|
Template.userAccountMenu.helpers({
|
||||||
name: function() {
|
name: function() {
|
||||||
var nameSplit = Meteor.user().profile.fullName.split(' ');
|
var nameSplit = Meteor.user().profile.fullName.split(' ');
|
||||||
@@ -29,68 +36,87 @@ Template.userAccountMenu.events({
|
|||||||
$('#serverInformationModal').modal('show');
|
$('#serverInformationModal').modal('show');
|
||||||
},
|
},
|
||||||
'click #logoutButton': function() {
|
'click #logoutButton': function() {
|
||||||
// Remove reviewers info for the user
|
|
||||||
Meteor.call('removeUserFromReviewers', Meteor.userId());
|
|
||||||
|
|
||||||
Meteor.logout(function() {
|
Meteor.logout(function() {
|
||||||
Router.go('/entrySignIn');
|
Router.go('/entrySignIn');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.userAccountMenu.onRendered(function() {
|
Template.userAccountMenu.onCreated(function userAccountMenuCreated() {
|
||||||
var oldUserId;
|
const instance = Template.instance();
|
||||||
var lastLoginModalInterval;
|
|
||||||
|
|
||||||
this.autorun(function() {
|
// Create reactive last login date
|
||||||
// Hook login/logout
|
instance.lastLoginDate = new ReactiveVar();
|
||||||
var user = Meteor.user();
|
|
||||||
if (!user) {
|
// We need oldUser to remove Reviewers if the user logged out
|
||||||
|
let oldUser;
|
||||||
|
|
||||||
|
// Get last login date
|
||||||
|
Meteor.call('getPriorLoginDate', function(error, lastLoginDate){
|
||||||
|
if (error) {
|
||||||
|
console.log(error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var newUserId = user._id;
|
// Format the last login date
|
||||||
|
const formattedLastLoginDate = moment(lastLoginDate).format("MMMM Do YYYY, HH:mm:ss A");
|
||||||
|
|
||||||
if (oldUserId === null && newUserId) {
|
instance.lastLoginDate.set(formattedLastLoginDate);
|
||||||
Session.set('showLastLoginModal', true);
|
|
||||||
|
|
||||||
// Log
|
});
|
||||||
HipaaLogger.logEvent({
|
|
||||||
eventType: 'init',
|
|
||||||
userId: user._id,
|
|
||||||
userName: user.fullName
|
|
||||||
});
|
|
||||||
|
|
||||||
} else if (newUserId === null && oldUserId) {
|
instance.autorun(function() {
|
||||||
// Set showLastLoginModal as null
|
const lastLoginDate = instance.lastLoginDate.get();
|
||||||
Session.set('showLastLoginModal', null);
|
if (!lastLoginDate) {
|
||||||
|
return;
|
||||||
// Destroy interval for last login modal
|
|
||||||
Meteor.clearInterval(lastLoginModalInterval);
|
|
||||||
console.log('The user logged out');
|
|
||||||
|
|
||||||
// Log
|
|
||||||
// TODO: eventType is not defined for logout in hipaa-audit-log
|
|
||||||
/*HipaaLogger.logEvent({
|
|
||||||
eventType: 'logout',
|
|
||||||
userId: oldUserId,
|
|
||||||
userName: userName
|
|
||||||
});*/
|
|
||||||
|
|
||||||
// Remove the user from Reviewers
|
|
||||||
Meteor.call('removeUserFromReviewers', oldUserId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
oldUserId = Meteor.userId();
|
// Hook login/logout
|
||||||
|
var user = Meteor.user();
|
||||||
|
if (!user) {
|
||||||
|
// Display last login modal for the next login
|
||||||
|
Session.setPersistent('displayLastLoginModal', true);
|
||||||
|
|
||||||
|
if (oldUser) {
|
||||||
|
// Log Signout
|
||||||
|
// TODO: eventType for logout is not defined
|
||||||
|
// HipaaLogger.logEvent({
|
||||||
|
// eventType: 'logout',
|
||||||
|
// userId: oldUser._id,
|
||||||
|
// userName: oldUser.profile.fullName
|
||||||
|
// });
|
||||||
|
|
||||||
|
// Remove the user by oldUserId from Reviewers
|
||||||
|
Meteor.call('removeUserFromReviewers', oldUser._id);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set oldUser
|
||||||
|
oldUser = user;
|
||||||
|
|
||||||
// Trigger last login date popup
|
// Trigger last login date popup
|
||||||
if (Session.get('showLastLoginModal')) {
|
if (!Session.get('displayLastLoginModal')) {
|
||||||
Modal.show('lastLoginModal');
|
return;
|
||||||
|
|
||||||
lastLoginModalInterval = Meteor.setInterval(function() {
|
|
||||||
Modal.hide('lastLoginModal');
|
|
||||||
Session.set('showLastLoginModal', null);
|
|
||||||
}, 3000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Displaye the modal
|
||||||
|
Modal.show('lastLoginModal', {
|
||||||
|
lastLoginDate: lastLoginDate
|
||||||
|
});
|
||||||
|
|
||||||
|
// Hide the modal after 5sec
|
||||||
|
Meteor.setTimeout(() => {
|
||||||
|
Modal.hide('lastLoginModal');
|
||||||
|
Session.setPersistent('displayLastLoginModal', false);
|
||||||
|
}, 5000);
|
||||||
|
|
||||||
|
// Log signin
|
||||||
|
HipaaLogger.logEvent({
|
||||||
|
eventType: 'init',
|
||||||
|
userId: user._id,
|
||||||
|
userName: user.profile.fullName
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -197,7 +197,6 @@ Package.onUse(function(api) {
|
|||||||
api.addFiles('client/components/confirmRemoveTimepointAssociation/confirmRemoveTimepointAssociation.js', 'client');
|
api.addFiles('client/components/confirmRemoveTimepointAssociation/confirmRemoveTimepointAssociation.js', 'client');
|
||||||
|
|
||||||
api.addFiles('client/components/lastLoginModal/lastLoginModal.html', 'client');
|
api.addFiles('client/components/lastLoginModal/lastLoginModal.html', 'client');
|
||||||
api.addFiles('client/components/lastLoginModal/lastLoginModal.js', 'client');
|
|
||||||
|
|
||||||
api.addFiles('client/components/confirmDeleteDialog/confirmDeleteDialog.html', 'client');
|
api.addFiles('client/components/confirmDeleteDialog/confirmDeleteDialog.html', 'client');
|
||||||
api.addFiles('client/components/confirmDeleteDialog/confirmDeleteDialog.styl', 'client');
|
api.addFiles('client/components/confirmDeleteDialog/confirmDeleteDialog.styl', 'client');
|
||||||
|
|||||||
@@ -85,7 +85,13 @@ Meteor.methods({
|
|||||||
},
|
},
|
||||||
|
|
||||||
getPriorLoginDate: function() {
|
getPriorLoginDate: function() {
|
||||||
return Meteor.users.findOne({_id: Meteor.userId()}, {fields: {priorLoginDate: 1}});
|
return Meteor.users.findOne({
|
||||||
|
_id: Meteor.userId()
|
||||||
|
}, {
|
||||||
|
fields: {
|
||||||
|
priorLoginDate: 1
|
||||||
|
}
|
||||||
|
}).priorLoginDate;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
+2
-1
@@ -9,8 +9,9 @@ $distance = 12px
|
|||||||
bottom: - ($toolbarDrawerHeight + $distance)
|
bottom: - ($toolbarDrawerHeight + $distance)
|
||||||
height: $toolbarDrawerHeight
|
height: $toolbarDrawerHeight
|
||||||
left: 0
|
left: 0
|
||||||
|
min-width: 100%
|
||||||
position: absolute
|
position: absolute
|
||||||
width: 100%
|
white-space: nowrap
|
||||||
|
|
||||||
.toolbarSectionDrawer
|
.toolbarSectionDrawer
|
||||||
background-color: $uiGrayDarker
|
background-color: $uiGrayDarker
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<template name="worklistPagination">
|
||||||
|
<div class="worklistPagination">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-4 col-sm-3 col-md-3">
|
||||||
|
{{#with recordCount}}
|
||||||
|
<div class="form-inline form-group rows-per-page">
|
||||||
|
<label>
|
||||||
|
<span>Show</span>
|
||||||
|
<select class="js-select-rows-per-page">
|
||||||
|
<option value="25">25</option>
|
||||||
|
<option value="50">50</option>
|
||||||
|
<option value="100">100</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<span class="rows-per-page-label">rows per page</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
{{/with}}
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-8 col-sm-9 col-md-9">
|
||||||
|
<div class="form-inline form-group page-number">
|
||||||
|
<label>
|
||||||
|
<ul id="pagination" class="no-margins"></ul>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
import { Template } from 'meteor/templating';
|
||||||
|
|
||||||
|
import './worklistPagination.html';
|
||||||
|
|
||||||
|
const visiblePages = 10;
|
||||||
|
Template.worklistPagination.onCreated(function() {
|
||||||
|
let instance = Template.instance();
|
||||||
|
// replace parentVariable with the name of the instance variable
|
||||||
|
instance.parent = this.parent(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
Template.worklistPagination.onRendered(function() {
|
||||||
|
const instance = Template.instance();
|
||||||
|
const $paginationControl = instance.$('#pagination');
|
||||||
|
|
||||||
|
// Track changes on recordCount and rowsPerPage
|
||||||
|
instance.autorun(function() {
|
||||||
|
const recordCount = instance.parent.recordCount.get();
|
||||||
|
const rowsPerPage = instance.parent.rowsPerPage.get();
|
||||||
|
|
||||||
|
// Destroy plugin if exists
|
||||||
|
if ($paginationControl.data().twbsPagination) {
|
||||||
|
$paginationControl.twbsPagination('destroy');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (recordCount && rowsPerPage) {
|
||||||
|
const totalPageNumber = Math.ceil(recordCount / rowsPerPage);
|
||||||
|
|
||||||
|
// Initialize plugin
|
||||||
|
$paginationControl.twbsPagination({
|
||||||
|
totalPages: totalPageNumber,
|
||||||
|
visiblePages: visiblePages,
|
||||||
|
onPageClick: function (event, page) {
|
||||||
|
// Update currentPage
|
||||||
|
// Decrease page by 1 to set currentPage
|
||||||
|
// Since reactive table current page index starts by 0
|
||||||
|
instance.parent.currentPage.set(page - 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
Template.worklistPagination.helpers({
|
||||||
|
recordCount() {
|
||||||
|
const instance = Template.instance();
|
||||||
|
return instance.parent.recordCount.get();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Template.worklistPagination.events({
|
||||||
|
'change .js-select-rows-per-page'(event, instance) {
|
||||||
|
const rowsPerPage = $(event.currentTarget).val();
|
||||||
|
|
||||||
|
// Update rowsPerPage of parent
|
||||||
|
instance.parent.rowsPerPage.set(parseInt(rowsPerPage, 10));
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
@import "{design}/app"
|
||||||
|
|
||||||
|
.worklistPagination
|
||||||
|
font-size: 13px
|
||||||
|
font-weight: normal !important
|
||||||
|
|
||||||
|
.rows-per-page
|
||||||
|
padding-top: 20px
|
||||||
|
|
||||||
|
label
|
||||||
|
font-weight: normal
|
||||||
|
|
||||||
|
select
|
||||||
|
background-color: $primaryBackgroundColor
|
||||||
|
color: white
|
||||||
|
|
||||||
|
.page-number
|
||||||
|
text-align: right
|
||||||
|
|
||||||
|
label
|
||||||
|
font-weight: normal
|
||||||
|
|
||||||
|
ul#pagination
|
||||||
|
|
||||||
|
li
|
||||||
|
a
|
||||||
|
padding: 4px 8px
|
||||||
|
background-color: $primaryBackgroundColor
|
||||||
|
color: white
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
color: $activeColor
|
||||||
|
|
||||||
|
.active
|
||||||
|
|
||||||
|
a
|
||||||
|
background-color: $uiGrayDarker
|
||||||
|
color: white
|
||||||
|
|
||||||
@@ -92,6 +92,10 @@
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<!-- Pagination -->
|
||||||
|
{{> worklistPagination }}
|
||||||
|
|
||||||
{{#if session "showLoadingText"}}
|
{{#if session "showLoadingText"}}
|
||||||
{{>loadingText}}
|
{{>loadingText}}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
|||||||
@@ -6,19 +6,37 @@ Template.worklistResult.helpers({
|
|||||||
* by Patient name and Study Date in Ascending order.
|
* by Patient name and Study Date in Ascending order.
|
||||||
*/
|
*/
|
||||||
studies() {
|
studies() {
|
||||||
const sortOption = Session.get('sortOption');
|
const instance = Template.instance();
|
||||||
if (sortOption) {
|
let studies;
|
||||||
return WorklistStudies.find({}, {
|
let sortOption = {
|
||||||
sort: sortOption
|
patientName: 1,
|
||||||
});
|
studyDate: 1
|
||||||
|
};
|
||||||
|
|
||||||
|
// Update sort option if session is defined
|
||||||
|
if (Session.get('sortOption')) {
|
||||||
|
sortOption = Session.get('sortOption');
|
||||||
}
|
}
|
||||||
|
|
||||||
return WorklistStudies.find({}, {
|
// Pagination parameters
|
||||||
sort: {
|
const rowsPerPage = instance.rowsPerPage.get();
|
||||||
patientName: 1,
|
const currentPage = instance.currentPage.get();
|
||||||
studyDate: 1
|
const offset = rowsPerPage * currentPage;
|
||||||
}
|
const limit = offset + rowsPerPage;
|
||||||
});
|
|
||||||
|
studies = WorklistStudies.find({}, {
|
||||||
|
sort: sortOption
|
||||||
|
}).fetch();
|
||||||
|
|
||||||
|
if (!studies) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update record count
|
||||||
|
instance.recordCount.set(studies.length);
|
||||||
|
|
||||||
|
// Limit studies
|
||||||
|
return studies.slice(offset, limit);
|
||||||
},
|
},
|
||||||
|
|
||||||
numberOfStudies() {
|
numberOfStudies() {
|
||||||
@@ -163,6 +181,15 @@ Template.worklistResult.onCreated(() => {
|
|||||||
instance.sortOption = new ReactiveVar();
|
instance.sortOption = new ReactiveVar();
|
||||||
instance.sortingColumns = new ReactiveDict();
|
instance.sortingColumns = new ReactiveDict();
|
||||||
|
|
||||||
|
// Pagination parameters
|
||||||
|
|
||||||
|
// Rows per page is 25 as default
|
||||||
|
instance.rowsPerPage = new ReactiveVar(25);
|
||||||
|
|
||||||
|
// Set currentPage indexed 0
|
||||||
|
instance.currentPage = new ReactiveVar(0);
|
||||||
|
instance.recordCount = new ReactiveVar();
|
||||||
|
|
||||||
// Set sortOption
|
// Set sortOption
|
||||||
const sortOptionSession = Session.get('sortOption');
|
const sortOptionSession = Session.get('sortOption');
|
||||||
if (sortOptionSession) {
|
if (sortOptionSession) {
|
||||||
|
|||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
/*
|
||||||
|
* jQuery Bootstrap Pagination v1.3.1
|
||||||
|
* https://github.com/esimakin/twbs-pagination
|
||||||
|
*
|
||||||
|
* Copyright 2014-2015 Eugene Simakin <eugenesimakin@mail.ru>
|
||||||
|
* Released under Apache 2.0 license
|
||||||
|
* http://apache.org/licenses/LICENSE-2.0.html
|
||||||
|
*/
|
||||||
|
!function(a,b,c,d){"use strict";var e=a.fn.twbsPagination,f=function(c,d){if(this.$element=a(c),this.options=a.extend({},a.fn.twbsPagination.defaults,d),this.options.startPage<1||this.options.startPage>this.options.totalPages)throw new Error("Start page option is incorrect");if(this.options.totalPages=parseInt(this.options.totalPages),isNaN(this.options.totalPages))throw new Error("Total pages option is not correct!");if(this.options.visiblePages=parseInt(this.options.visiblePages),isNaN(this.options.visiblePages))throw new Error("Visible pages option is not correct!");if(this.options.totalPages<this.options.visiblePages&&(this.options.visiblePages=this.options.totalPages),this.options.onPageClick instanceof Function&&this.$element.first().on("page",this.options.onPageClick),this.options.href){var e,f=this.options.href.replace(/[-\/\\^$*+?.|[\]]/g,"\\$&");f=f.replace(this.options.hrefVariable,"(\\d+)"),null!=(e=new RegExp(f,"i").exec(b.location.href))&&(this.options.startPage=parseInt(e[1],10))}var g="function"==typeof this.$element.prop?this.$element.prop("tagName"):this.$element.attr("tagName");return"UL"===g?this.$listContainer=this.$element:this.$listContainer=a("<ul></ul>"),this.$listContainer.addClass(this.options.paginationClass),"UL"!==g&&this.$element.append(this.$listContainer),this.render(this.getPages(this.options.startPage)),this.setupEvents(),this.options.initiateStartPageClick&&this.$element.trigger("page",this.options.startPage),this};f.prototype={constructor:f,destroy:function(){return this.$element.empty(),this.$element.removeData("twbs-pagination"),this.$element.off("page"),this},show:function(a){if(1>a||a>this.options.totalPages)throw new Error("Page is incorrect.");return this.render(this.getPages(a)),this.setupEvents(),this.$element.trigger("page",a),this},buildListItems:function(a){var b=[];if(this.options.first&&b.push(this.buildItem("first",1)),this.options.prev){var c=a.currentPage>1?a.currentPage-1:this.options.loop?this.options.totalPages:1;b.push(this.buildItem("prev",c))}for(var d=0;d<a.numeric.length;d++)b.push(this.buildItem("page",a.numeric[d]));if(this.options.next){var e=a.currentPage<this.options.totalPages?a.currentPage+1:this.options.loop?1:this.options.totalPages;b.push(this.buildItem("next",e))}return this.options.last&&b.push(this.buildItem("last",this.options.totalPages)),b},buildItem:function(b,c){var d=a("<li></li>"),e=a("<a></a>"),f=null;switch(b){case"page":f=c,d.addClass(this.options.pageClass);break;case"first":f=this.options.first,d.addClass(this.options.firstClass);break;case"prev":f=this.options.prev,d.addClass(this.options.prevClass);break;case"next":f=this.options.next,d.addClass(this.options.nextClass);break;case"last":f=this.options.last,d.addClass(this.options.lastClass)}return d.data("page",c),d.data("page-type",b),d.append(e.attr("href",this.makeHref(c)).html(f)),d},getPages:function(a){var b=[],c=Math.floor(this.options.visiblePages/2),d=a-c+1-this.options.visiblePages%2,e=a+c;0>=d&&(d=1,e=this.options.visiblePages),e>this.options.totalPages&&(d=this.options.totalPages-this.options.visiblePages+1,e=this.options.totalPages);for(var f=d;e>=f;)b.push(f),f++;return{currentPage:a,numeric:b}},render:function(b){var c=this;this.$listContainer.children().remove(),this.$listContainer.append(this.buildListItems(b)),this.$listContainer.children().each(function(){var d=a(this),e=d.data("page-type");switch(e){case"page":d.data("page")===b.currentPage&&d.addClass(c.options.activeClass);break;case"first":d.toggleClass(c.options.disabledClass,1===b.currentPage);break;case"last":d.toggleClass(c.options.disabledClass,b.currentPage===c.options.totalPages);break;case"prev":d.toggleClass(c.options.disabledClass,!c.options.loop&&1===b.currentPage);break;case"next":d.toggleClass(c.options.disabledClass,!c.options.loop&&b.currentPage===c.options.totalPages)}})},setupEvents:function(){var b=this;this.$listContainer.find("li").each(function(){var c=a(this);return c.off(),c.hasClass(b.options.disabledClass)||c.hasClass(b.options.activeClass)?void c.on("click",!1):void c.click(function(a){!b.options.href&&a.preventDefault(),b.show(parseInt(c.data("page")))})})},makeHref:function(a){return this.options.href?this.options.href.replace(this.options.hrefVariable,a):"#"}},a.fn.twbsPagination=function(b){var c,e=Array.prototype.slice.call(arguments,1),g=a(this),h=g.data("twbs-pagination"),i="object"==typeof b&&b;return h||g.data("twbs-pagination",h=new f(this,i)),"string"==typeof b&&(c=h[b].apply(h,e)),c===d?g:c},a.fn.twbsPagination.defaults={totalPages:0,startPage:1,visiblePages:5,initiateStartPageClick:!0,href:!1,hrefVariable:"{{number}}",first:"First",prev:"Previous",next:"Next",last:"Last",loop:!1,onPageClick:null,paginationClass:"pagination",nextClass:"next",prevClass:"prev",lastClass:"last",firstClass:"first",pageClass:"page",activeClass:"active",disabledClass:"disabled"},a.fn.twbsPagination.Constructor=f,a.fn.twbsPagination.noConflict=function(){return a.fn.twbsPagination=e,tLine truncated
|
||||||
@@ -70,6 +70,10 @@ Package.onUse(function (api) {
|
|||||||
api.addFiles('client/components/progressDialog/progressDialog.styl', 'client');
|
api.addFiles('client/components/progressDialog/progressDialog.styl', 'client');
|
||||||
api.addFiles('client/components/progressDialog/progressDialog.js', 'client');
|
api.addFiles('client/components/progressDialog/progressDialog.js', 'client');
|
||||||
|
|
||||||
|
api.addFiles('client/components/worklistPagination/worklistPagination.html', 'client');
|
||||||
|
api.addFiles('client/components/worklistPagination/worklistPagination.styl', 'client');
|
||||||
|
api.addFiles('client/components/worklistPagination/worklistPagination.js', 'client');
|
||||||
|
|
||||||
// Client-side library functions
|
// Client-side library functions
|
||||||
api.addFiles('client/lib/getStudyMetadata.js', 'client');
|
api.addFiles('client/lib/getStudyMetadata.js', 'client');
|
||||||
api.addFiles('client/lib/getStudiesMetadata.js', 'client');
|
api.addFiles('client/lib/getStudiesMetadata.js', 'client');
|
||||||
@@ -79,6 +83,7 @@ Package.onUse(function (api) {
|
|||||||
api.addFiles('client/lib/worklist.js', 'client');
|
api.addFiles('client/lib/worklist.js', 'client');
|
||||||
api.addFiles('client/lib/queryStudies.js', 'client');
|
api.addFiles('client/lib/queryStudies.js', 'client');
|
||||||
api.addFiles('client/lib/importStudies.js', 'client');
|
api.addFiles('client/lib/importStudies.js', 'client');
|
||||||
|
api.addFiles('client/lib/jquery.twbsPagination/jquery.twbsPagination.min.js', 'client');
|
||||||
|
|
||||||
// Server-side functions
|
// Server-side functions
|
||||||
api.addFiles('server/publications.js', 'server');
|
api.addFiles('server/publications.js', 'server');
|
||||||
|
|||||||
Reference in new issue
Block a user