Sha256: 27f09f889a071beea60e72442f16d86a4ecf284951e6e97ba38a968d25becd6d
Contents?: true
Size: 1.62 KB
Versions: 4
Compression:
Stored size: 1.62 KB
Contents
// Once, javascript is written in a modular format, all initialization // code should be called from here. Sufia = { initialize: function () { this.saveWorkControl(); this.saveWorkFixed(); this.popovers(); this.permissions(); this.notifications(); this.transfers(); }, saveWorkControl: function () { var sw = require('sufia/save_work/save_work_control'); new sw.SaveWorkControl($("#form-progress")).activate(); }, saveWorkFixed: function () { // Setting test to false to skip native and go right to polyfill FixedSticky.tests.sticky = false; $('#savewidget').fixedsticky(); }, // initialize popover helpers popovers: function () { $("a[data-toggle=popover]").popover({html: true}) .click(function () { return false; }); }, permissions: function () { var perm = require('sufia/permissions/control'); new perm.PermissionsControl($("#share"), 'generic_work', 'tmpl-work-grant'); new perm.PermissionsControl($("#permission"), 'file_set', 'tmpl-file-set-grant'); }, notifications: function () { var note = require('sufia/notifications'); $('[data-update-poll-url]').each(function () { var interval = $(this).data('update-poll-interval'); var url = $(this).data('update-poll-url'); new note.Notifications(url, interval); }); }, transfers: function () { $("#proxy_deposit_request_transfer_to").userSearch(); } }; Blacklight.onLoad(function () { Sufia.initialize(); });
Version data entries
4 entries across 4 versions & 1 rubygems