( 590, 'ADMIN_COPY_TAG_TYPES', oils_i18n_gettext( 590,
'Administer copy tag types', 'ppl', 'description' )),
( 591, 'ADMIN_COPY_TAG', oils_i18n_gettext( 591,
- 'Administer copy tag', 'ppl', 'description' ))
- ( 590,'CONTAINER_BATCH_UPDATE', oils_i18n_gettext( 590,
- 'Allow batch update via buckets', 'ppl', 'description' ))
+ 'Administer copy tag', 'ppl', 'description' )),
- ( 592, 'ADMIN_SERIAL_PATTERN_TEMPLATE', oils_i18n_gettext( 592,
++ ( 592,'CONTAINER_BATCH_UPDATE', oils_i18n_gettext( 592,
++ 'Allow batch update via buckets', 'ppl', 'description' )),
++ ( 593, 'ADMIN_SERIAL_PATTERN_TEMPLATE', oils_i18n_gettext( 593,
+ 'Administer serial prediction pattern templates', 'ppl', 'description' ))
++>>>>>>> working/collab/gmcharlt/lp1708291-webstaff-serials
;
SELECT SETVAL('permission.perm_list_id_seq'::TEXT, 1000);
<script src="[% ctx.media_prefix %]/js/ui/default/staff/marcrecord.js"></script>
<script src="[% ctx.media_prefix %]/js/ui/default/staff/services/grid.js"></script>
<script src="[% ctx.media_prefix %]/js/ui/default/staff/services/eframe.js"></script>
+<script src="[% ctx.media_prefix %]/js/ui/default/staff/services/patron_search.js"></script>
<script src="[% ctx.media_prefix %]/js/ui/default/staff/cat/services/record.js"></script>
<script src="[% ctx.media_prefix %]/js/ui/default/staff/cat/services/tagtable.js"></script>
+ [% INCLUDE 'staff/serials/share/serials_strings.tt2' %]
+ <script src="[% ctx.media_prefix %]/js/ui/default/staff/serials/app.js"></script>
+ <script src="[% ctx.media_prefix %]/js/ui/default/staff/serials/services/core.js"></script>
+ <script src="[% ctx.media_prefix %]/js/ui/default/staff/serials/directives/sub_selector.js"></script>
[% INCLUDE 'staff/cat/share/marcedit_strings.tt2' %]
<script src="[% ctx.media_prefix %]/js/ui/default/staff/cat/services/marcedit.js"></script>
<script src="[% ctx.media_prefix %]/js/ui/default/staff/circ/services/circ.js"></script>
*
*/
-angular.module('egCatalogApp', ['ui.bootstrap','ngRoute','ngLocationUpdate','egCoreMod','egGridMod', 'egMarcMod', 'egUserMod', 'egHoldingsMod', 'ngToast', 'egSerialsMod', 'egSerialsAppDep'])
+angular.module('egCatalogApp', ['ui.bootstrap','ngRoute','ngLocationUpdate','egCoreMod','egGridMod', 'egMarcMod', 'egUserMod', 'egHoldingsMod', 'ngToast','egPatronSearchMod'])
++angular.module('egCatalogApp', ['ui.bootstrap','ngRoute','ngLocationUpdate','egCoreMod','egGridMod', 'egMarcMod', 'egUserMod', 'egHoldingsMod', 'ngToast', 'egSerialsMod', 'egSerialsAppDep','egPatronSearchMod'])
.config(['ngToastProvider', function(ngToastProvider) {
ngToastProvider.configure({
};
})
+// 'date' filter
+// Overriding the core angular date filter with a moment-js based one for
+// better timezone and formatting support.
+.filter('date',function() {
+
+ var formatMap = {
+ short : 'l LT',
+ medium : 'lll',
+ long : 'LLL',
+ full : 'LLLL',
+
+ shortDate : 'l',
+ mediumDate : 'll',
+ longDate : 'LL',
+ fullDate : 'LL',
+
+ shortTime : 'LT',
+ mediumTime : 'LTS'
+ };
+
+ var formatReplace = [
+ [ /yyyy/g, 'YYYY' ],
+ [ /yy/g, 'YY' ],
+ [ /y/g, 'Y' ],
+ [ /ww/g, 'WW' ],
+ [ /w/g, 'W' ],
+ [ /dd/g, 'DD' ],
+ [ /d/g, 'D' ],
+ [ /sss/g, 'SSS' ],
+ [ /EEEE/g, 'dddd' ],
+ [ /EEE/g, 'ddd' ],
+ [ /Z/g, 'ZZ' ]
+ ];
+
+ return function (date, format, tz) {
+ if (!date) return '';
+
+ if (date == 'now')
+ date = new Date().toISOString();
+
+ if (format) {
+ var fmt = formatMap[format] || format;
+ angular.forEach(formatReplace, function (r) {
+ fmt = fmt.replace(r[0],r[1]);
+ });
+ }
+
+ var d = moment(date);
+ if (tz && tz !== '-') d.tz(tz);
+
+ return d.isValid() ? d.format(fmt) : '';
+ }
+
+})
+
+// 'egOrgDate' filter
+// Uses moment.js and moment-timezone.js to put dates into the most appropriate
+// timezone for a given (optional) org unit based on its lib.timezone setting
+.filter('egOrgDate',['$filter','egCore',
+ function($filter , egCore) {
+
+ var tzcache = {};
+
+ function eg_date_filter (date, fmt, ouID) {
+ if (ouID) {
+ if (angular.isObject(ouID)) {
+ if (angular.isFunction(ouID.id)) {
+ ouID = ouID.id();
+ } else {
+ ouID = ouID.id;
+ }
+ }
+
+ if (!tzcache[ouID]) {
+ tzcache[ouID] = '-';
+ egCore.org.settings('lib.timezone', ouID)
+ .then(function(s) {
+ tzcache[ouID] = s['lib.timezone'] || OpenSRF.tz;
+ });
+ }
+ }
+
+ return $filter('date')(date, fmt, tzcache[ouID]);
+ }
+
+ eg_date_filter.$stateful = true;
+
+ return eg_date_filter;
+}])
+
+// 'egOrgDateInContext' filter
+// Uses the egOrgDate filter to make time and date location aware, and further
+// modifies the format if one of [short, medium, long, full] to show only the
+// date if the optional interval parameter is day-granular. This is
+// particularly useful for due dates on circulations.
+.filter('egOrgDateInContext',['$filter','egCore',
+ function($filter , egCore) {
+
+ function eg_context_date_filter (date, format, orgID, interval) {
+ var fmt = format;
+ if (!fmt) fmt = 'shortDate';
+
+ // if this is a simple, one-word format, and it doesn't say "Date" in it...
+ if (['short','medium','long','full'].filter(function(x){return fmt == x}).length > 0 && interval) {
+ var secs = egCore.date.intervalToSeconds(interval);
+ if (secs !== null && secs % 86400 == 0) fmt += 'Date';
+ }
+
+ return $filter('egOrgDate')(date, fmt, orgID);
+ }
+
+ eg_context_date_filter.$stateful = true;
+
+ return eg_context_date_filter;
+}])
+
+// 'egDueDate' filter
+// Uses the egOrgDateInContext filter to make time and date location aware, but
+// only if the supplied interval is day-granular. This is as wrapper for
+// egOrgDateInContext to be used for circulation due date /only/.
+.filter('egDueDate',['$filter','egCore',
+ function($filter , egCore) {
+
+ function eg_context_due_date_filter (date, format, orgID, interval) {
+ if (interval) {
+ var secs = egCore.date.intervalToSeconds(interval);
+ if (secs === null || secs % 86400 != 0) {
+ orgID = null;
+ interval = null;
+ }
+ }
+ return $filter('egOrgDateInContext')(date, format, orgID, interval);
+ }
+
+ eg_context_due_date_filter.$stateful = true;
+
+ return eg_context_due_date_filter;
+}])
+
+ // 'join' filter
+ // TODO: perhaps this should live elsewhere
+ .filter('join', function() {
+ return function(arr,sep) {
+ if (typeof arr == 'object' && arr.constructor == Array) {
+ return arr.join(sep || ',');
+ } else {
+ return '';
+ }
+ };
+ })
+
/**
* Progress Dialog.
*