diff --git a/controllers/grid/settings/plugins/SettingsPluginGridHandler.php b/controllers/grid/settings/plugins/SettingsPluginGridHandler.php index 2fd082b5a65..d2e8b877ecb 100644 --- a/controllers/grid/settings/plugins/SettingsPluginGridHandler.php +++ b/controllers/grid/settings/plugins/SettingsPluginGridHandler.php @@ -21,6 +21,7 @@ use PKP\controllers\grid\plugins\PluginGridHandler; use PKP\controllers\grid\plugins\PluginGridRow; use PKP\db\DAORegistry; +use PKP\security\authorization\CanAccessSettingsPolicy; use PKP\security\authorization\ContextAccessPolicy; use PKP\security\authorization\PluginAccessPolicy; use PKP\security\Role; @@ -110,6 +111,7 @@ public function authorize($request, &$args, $roleAssignments) } else { $this->addPolicy(new ContextAccessPolicy($request, $roleAssignments)); } + $this->addPolicy(new CanAccessSettingsPolicy()); return parent::authorize($request, $args, $roleAssignments); } } diff --git a/dbscripts/xml/upgrade.xml b/dbscripts/xml/upgrade.xml index 1a5e2bc1d10..6bf8b307cf6 100644 --- a/dbscripts/xml/upgrade.xml +++ b/dbscripts/xml/upgrade.xml @@ -128,6 +128,7 @@ + diff --git a/js/pkp.min.js b/js/pkp.min.js index 9c4c80a932f..79ad9e544dd 100644 --- a/js/pkp.min.js +++ b/js/pkp.min.js @@ -96,7 +96,7 @@ a.pkp.classes.Handler.getHandler(a(d[f])).handlerChildren_.push(e)});c.eventBrid null;a.pkp.classes.Handler.prototype.dataItems_=null;a.pkp.classes.Handler.prototype.publishedEvents_=null;a.pkp.classes.Handler.prototype.eventBridge_=null;a.pkp.classes.Handler.prototype.globalEventListeners_=null;a.pkp.classes.Handler.getHandler=function(b){b=b.data("pkp.handler");if(!(b instanceof a.pkp.classes.Handler))throw Error("There is no handler bound to this element!");return b};a.pkp.classes.Handler.hasHandler=function(b){return b.data("pkp.handler")instanceof a.pkp.classes.Handler}; a.pkp.classes.Handler.prototype.getHtmlElement=function(){a.pkp.classes.Handler.checkContext_(this);return this.$htmlElement_};a.pkp.classes.Handler.prototype.publishChangeEvents=function(){var b;for(b=0;b a[id*="addItem"]').unbind("mousedown");this.getHtmlElement().find('span[class="options"] > a[id*="addItem"]').mousedown(function(){return!1});this.getHtmlElement().find(".h3").addClass("spinner")};a.pkp.controllers.listbuilder.ListbuilderHandler.prototype.enableControls=function(){this.getHtmlElement().find('span[class="options"] > a[id*="addItem"]').mousedown(this.callbackWrapper(this.addItemHandler_)); -this.getHtmlElement().find(".h3").removeClass("spinner")}})(jQuery);(function(a){a.pkp.controllers.modal=a.pkp.controllers.modal||{};a.pkp.controllers.modal.ModalHandler=function(b,c){this.parent(b,c);if(!this.checkOptions(c))throw Error("Missing or invalid modal options!");c=a.extend(!0,{},c);this.options=this.mergeOptions(c);b.html(this.modalBuild()[0].outerHTML);this.modalOpen(b);b.find(".pkpModalCloseButton").click(this.callbackWrapper(this.modalClose));b.on("click keyup",this.callbackWrapper(this.handleWrapperEvents));this.publishEvent("redirectRequested");this.publishEvent("dataChanged"); -this.publishEvent("updateHeader");this.publishEvent("gridRefreshRequested");this.bind("notifyUser",this.redirectNotifyUserEventHandler_);this.bindGlobal("form-success",this.onFormSuccess_)};a.pkp.classes.Helper.inherits(a.pkp.controllers.modal.ModalHandler,a.pkp.classes.Handler);a.pkp.controllers.modal.ModalHandler.DEFAULT_OPTIONS_={autoOpen:!0,width:710,modal:!0,draggable:!1,resizable:!1,position:{my:"center",at:"center center-10%",of:window},canClose:!0,closeCallback:!1,closeCleanVueInstances:[]}; -a.pkp.controllers.modal.ModalHandler.options=null;a.pkp.controllers.modal.ModalHandler.prototype.checkOptions=function(b){return"object"===typeof b&&void 0===b.buttons};a.pkp.controllers.modal.ModalHandler.prototype.mergeOptions=function(b){return a.extend(!0,{},this.self("DEFAULT_OPTIONS_"),b)};a.pkp.controllers.modal.ModalHandler.prototype.modalBuild=function(){var b=a('
');"undefined"!==typeof this.options.title?b.append('
'+this.options.title+ -"
"):b.append('
');this.options.canClose&&b.append('\u00d7'+this.options.closeButtonText+"");b.append('
');b.attr("role","dialog").attr("aria-label",this.options.title);return b};a.pkp.controllers.modal.ModalHandler.prototype.modalOpen=function(b){a("body").append(b);setTimeout(function(){b.addClass("is_visible")},10);setTimeout(function(){b.focus()}, -300);b.trigger("pkpModalOpen",[b])};a.pkp.controllers.modal.ModalHandler.prototype.modalClose=function(b,c){var d=this,e=this.getHtmlElement();b=e.find("form").first();if(1==b.length&&(c={closePermitted:!0},b.trigger("containerClose",[c]),!c.closePermitted))return!1;e.removeClass("is_visible");this.trigger("pkpModalClose");setTimeout(function(){var f=d.options.closeCleanVueInstances,k;if(f.length)for(k=0;k'+this.options.okButton+"";b.addClass("pkp_modal_confirmation").find(".content").append('
'+ -this.options.dialogText+"
");this.options.cancelButton&&(c+='");b.append('");b.attr("role","dialog").attr("aria-label",this.options.title);return b};a.pkp.controllers.modal.ConfirmationModalHandler.prototype.modalConfirm=function(b,c){this.modalClose(b);this.callback_&&this.callback_.call(null,this.callbackArgs_)}})(jQuery);(function(a){a.pkp.controllers.modal.RedirectConfirmationModalHandler=function(b,c){this.parent(b,c);this.remoteUrl_=c.remoteUrl};a.pkp.classes.Helper.inherits(a.pkp.controllers.modal.RedirectConfirmationModalHandler,a.pkp.controllers.modal.ConfirmationModalHandler);a.pkp.controllers.modal.RedirectConfirmationModalHandler.prototype.remoteUrl_=null;a.pkp.controllers.modal.RedirectConfirmationModalHandler.prototype.checkOptions=function(b){return this.parent("checkOptions",b)?"string"===typeof b.cancelButton&& +this.getHtmlElement().find(".h3").removeClass("spinner")}})(jQuery);(function(a){a.pkp.controllers.modal=a.pkp.controllers.modal||{};a.pkp.controllers.modal.ModalHandler=function(b,c){this.parent(b,c);if(!this.checkOptions(c))throw Error("Missing or invalid modal options!");c=a.extend(!0,{},c);this.options=this.mergeOptions(c);this.modalOpen(b);this.publishEvent("redirectRequested");this.publishEvent("dataChanged");this.publishEvent("updateHeader");this.publishEvent("gridRefreshRequested");this.bind("notifyUser",this.redirectNotifyUserEventHandler_);this.bindGlobal("form-success", +this.onFormSuccess_)};a.pkp.classes.Helper.inherits(a.pkp.controllers.modal.ModalHandler,a.pkp.classes.Handler);a.pkp.controllers.modal.ModalHandler.DEFAULT_OPTIONS_={autoOpen:!0,width:710,modal:!0,draggable:!1,resizable:!1,position:{my:"center",at:"center center-10%",of:window},canClose:!0,closeCallback:!1,closeCleanVueInstances:[]};a.pkp.controllers.modal.ModalHandler.options=null;a.pkp.controllers.modal.ModalHandler.prototype.checkOptions=function(b){return"object"===typeof b&&void 0===b.buttons}; +a.pkp.controllers.modal.ModalHandler.prototype.mergeOptions=function(b){return a.extend(!0,{},this.self("DEFAULT_OPTIONS_"),b)};a.pkp.controllers.modal.ModalHandler.prototype.modalOpen=function(b){this.uniqueModalId="id"+Math.random().toString(16).slice(2);b.trigger("pkpModalOpen",[b])};a.pkp.controllers.modal.ModalHandler.prototype.modalClose=function(b,c){var d=this,e=this.getHtmlElement();e.find("form").first();this.trigger("pkpModalClose");this.dialogProps?pkp.eventBus.$emit("close-dialog-vue"): +pkp.eventBus.$emit("close-modal-vue",{modalId:this.uniqueModalId});setTimeout(function(){var f=d.options.closeCleanVueInstances,k;if(f.length)for(k=0;k');if a.pkp.classes.Helper.inherits(a.pkp.controllers.grid.queries.ReadQueryHandler,a.pkp.classes.Handler);a.pkp.controllers.grid.queries.ReadQueryHandler.prototype.fetchNoteFormUrl_=null;a.pkp.controllers.grid.queries.ReadQueryHandler.prototype.fetchParticipantsListUrl_=null;a.pkp.controllers.grid.queries.ReadQueryHandler.prototype.loadParticipantsList=function(){a.get(this.fetchParticipantsListUrl_,this.callbackWrapper(this.showFetchedParticipantsList_),"json")};a.pkp.controllers.grid.queries.ReadQueryHandler.prototype.showNoteFormHandler_= function(b){a(b).parents(".queryEditButtons").addClass("is_loading");a.get(this.fetchNoteFormUrl_,this.callbackWrapper(this.showFetchedNoteForm_),"json")};a.pkp.controllers.grid.queries.ReadQueryHandler.prototype.showFetchedNoteForm_=function(b,c){b=this.handleJson(c);c=a("#newNotePlaceholder",this.getHtmlElement());var d=a(".queryEditButtons.is_loading",this.getHtmlElement());this.unbindPartial(d);d.remove();this.unbindPartial(c);c.html(b.content)};a.pkp.controllers.grid.queries.ReadQueryHandler.prototype.showFetchedParticipantsList_= function(b,c){b=this.handleJson(c);c=a("#participantsListPlaceholder",this.getHtmlElement());var d=a(".leaveQueryForm",this.getHtmlElement());b.showLeaveQueryButton?d.show():d.hide();this.unbindPartial(c);c.children().remove();c.append(b.content)};a.pkp.controllers.grid.queries.ReadQueryHandler.prototype.reloadParticipantsList_=function(b,c,d){this.loadParticipantsList()}})(jQuery);(function(a){a.pkp.controllers.grid.queries=a.pkp.controllers.grid.queries||{};a.pkp.controllers.grid.queries.QueryFormHandler=function(b,c){this.parent(b,c);c.templateUrl&&(this.templateUrl_=c.templateUrl);b.find("#template").change(this.callbackWrapper(this.selectTemplateHandler_))};a.pkp.classes.Helper.inherits(a.pkp.controllers.grid.queries.QueryFormHandler,a.pkp.controllers.form.CancelActionAjaxFormHandler);a.pkp.controllers.grid.queries.QueryFormHandler.prototype.templateUrl_=null;a.pkp.controllers.grid.queries.QueryFormHandler.prototype.selectTemplateHandler_= -function(b,c){b=this.getHtmlElement();c=b.find('[name="template"]');b.find('[name="subject"]').val(c.find("option:selected").text());a.post(this.templateUrl_,c.serialize(),this.callbackWrapper(this.updateTemplate),"json")};a.pkp.controllers.grid.queries.QueryFormHandler.prototype.updateTemplate=function(b,c){var d=this.getHtmlElement();b=this.handleJson(c);c=c.content;d=d.find('textarea[name="comment"]');var e=tinyMCE.EditorManager.get(d.attr("id"));c.variables&&d.attr("data-variables",JSON.stringify(c.variables)); -e.setContent(c.body);return b.status}})(jQuery);(function(a){a.pkp.controllers.wizard.fileUpload=a.pkp.controllers.wizard.fileUpload||{};a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler=function(b,c){this.parent(b,c);this.csrfToken_=c.csrfToken;this.deleteUrl_=c.deleteUrl;this.metadataUrl_=c.metadataUrl;this.finishUrl_=c.finishUrl;this.bind("fileUploaded",this.handleFileUploaded);this.bind("filesRemoved",this.handleRemovedFiles);this.disableContinueButton()};a.pkp.classes.Helper.inherits(a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler, -a.pkp.controllers.wizard.WizardHandler);a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.csrfToken_="";a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.deleteUrl_="";a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.metadataUrl_="";a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.finishUrl_="";a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.uploadedFile_=null;a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.tabsBeforeActivate= -function(b,c,d){if(0c)throw Error("Trying to set an invalid wizard step!");e.tabs("enable",d);e.tabs("option","active",d);0===b&&e.tabs("disable",b);d===c&&(b=this.getContinueButton(),b.text(this.getFinishButtonText()),this.enableContinueButton())};a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.tabsLoad=function(b,c,d){var e=this.getHtmlElement(),f=this.getProgressIndicator();2===d.tab.index()&&(e=a("#newFile", -e),e.length&&e.bind("click",this.callbackWrapper(this.startWizard)));f.hide();return this.parent("tabsLoad",b,c,d)};a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.formValid=function(b,c){(0!==this.getCurrentStep()||0!==this.getHtmlElement().find("#uploadConfirmationForm").length||this.uploadedFile_)&&this.parent("formValid",b,c)};a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.wizardCancelRequested=function(b,c){if(this.parent("wizardCancelRequested",b, -c))if(this.uploadedFile_)this.uploadedFile_.csrfToken=this.csrfToken_,this.uploadedFile_.submissionFileId=this.uploadedFile_.id,a.post(this.deleteUrl_,this.uploadedFile_,a.pkp.classes.Helper.curry(this.wizardCancelSuccess,this,b,c),"json"),this.uploadedFile_=null,c.preventDefault();else return!0;return!1};a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.wizardCancelSuccess=function(b,c,d){!1!==this.handleJson(d)&&this.trigger("wizardCancel")};a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.handleFileUploaded= -function(b,c,d){this.uploadedFile_=d};a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.handleRemovedFiles=function(b,c,d,e){var f;if("undefined"!==typeof e&&e.length)for(f in e){if("undefined"===typeof e[f].storedData)break;e[f].storedData.csrfToken=this.csrfToken_;a.post(this.deleteUrl_,e[f].storedData)}};a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.startWizard=function(){this.uploadedFile_=null;this.parent("startWizard")}})(jQuery);(function(a){a.pkp.controllers.wizard.fileUpload.form=a.pkp.controllers.wizard.fileUpload.form||{};a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler=function(b,c){this.parent(b,c);this.hasFileSelector_=c.hasFileSelector;this.hasGenreSelector_=c.hasGenreSelector;c.presetRevisedFileId&&(this.presetRevisedFileId_=c.presetRevisedFileId);this.fileGenres_=c.fileGenres;this.$uploader_=c.$uploader;this.attachUploader_(this.$uploader_,c.uploaderOptions);this.uploaderSetup(c.$uploader);this.$revisedFileSelector_= +function(b,c){b=this.getHtmlElement().find('[name="template"]');a.post(this.templateUrl_,b.serialize(),this.callbackWrapper(this.updateTemplate),"json")};a.pkp.controllers.grid.queries.QueryFormHandler.prototype.updateTemplate=function(b,c){b=this.getHtmlElement();var d=this.handleJson(c);c=c.content;var e=b.find('textarea[name="comment"]'),f=tinyMCE.EditorManager.get(e.attr("id"));c.variables&&e.attr("data-variables",JSON.stringify(c.variables));f.setContent(c.body);b.find('[name="subject"]').val(c.subject); +return d.status}})(jQuery);(function(a){a.pkp.controllers.wizard.fileUpload=a.pkp.controllers.wizard.fileUpload||{};a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler=function(b,c){this.parent(b,c);this.csrfToken_=c.csrfToken;this.deleteUrl_=c.deleteUrl;this.metadataUrl_=c.metadataUrl;this.finishUrl_=c.finishUrl;this.cancelUrl_=c.cancelUrl;this.bind("fileUploaded",this.handleFileUploaded);this.bind("filesRemoved",this.handleRemovedFiles);this.disableContinueButton()};a.pkp.classes.Helper.inherits(a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler, +a.pkp.controllers.wizard.WizardHandler);a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.csrfToken_="";a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.deleteUrl_="";a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.metadataUrl_="";a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.finishUrl_="";a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.cancelUrl_="";a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.uploadedFile_= +null;a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.originalFile_=null;a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.tabsBeforeActivate=function(b,c,d){if(0c)throw Error("Trying to set an invalid wizard step!");e.tabs("enable",d);e.tabs("option","active",d);0===b&&e.tabs("disable",b);d===c&&(b=this.getContinueButton(),b.text(this.getFinishButtonText()),this.enableContinueButton())};a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.tabsLoad= +function(b,c,d){var e=this.getHtmlElement(),f=this.getProgressIndicator();2===d.tab.index()&&(e=a("#newFile",e),e.length&&e.bind("click",this.callbackWrapper(this.startWizard)));f.hide();return this.parent("tabsLoad",b,c,d)};a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.formValid=function(b,c){(0!==this.getCurrentStep()||0!==this.getHtmlElement().find("#uploadConfirmationForm").length||this.uploadedFile_)&&this.parent("formValid",b,c)};a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.wizardCancelRequested= +function(b,c){if(this.parent("wizardCancelRequested",b,c))if(this.uploadedFile_)this.uploadedFile_.csrfToken=this.csrfToken_,this.uploadedFile_.submissionFileId=this.uploadedFile_.id,this.uploadedFile_.originalFile=this.originalFile_,a.post(this.cancelUrl_,this.uploadedFile_,a.pkp.classes.Helper.curry(this.wizardCancelSuccess,this,b,c),"json"),this.uploadedFile_=null,c.preventDefault();else return!0;return!1};a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.wizardCancelSuccess= +function(b,c,d){!1!==this.handleJson(d)&&this.trigger("wizardCancel")};a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.handleFileUploaded=function(b,c,d){null===this.originalFile_&&(this.originalFile_=d.originalFile);delete d.originalFile;this.uploadedFile_=d};a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.handleRemovedFiles=function(b,c,d,e){var f;if("undefined"!==typeof e&&e.length)for(f in e){if("undefined"===typeof e[f].storedData)break;e[f].storedData.csrfToken= +this.csrfToken_;a.post(this.deleteUrl_,e[f].storedData)}};a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.startWizard=function(){this.uploadedFile_=this.originalFile_=null;this.parent("startWizard")}})(jQuery);(function(a){a.pkp.controllers.wizard.fileUpload.form=a.pkp.controllers.wizard.fileUpload.form||{};a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler=function(b,c){this.parent(b,c);this.hasFileSelector_=c.hasFileSelector;this.hasGenreSelector_=c.hasGenreSelector;c.presetRevisedFileId&&(this.presetRevisedFileId_=c.presetRevisedFileId);this.fileGenres_=c.fileGenres;this.$uploader_=c.$uploader;this.attachUploader_(this.$uploader_,c.uploaderOptions);this.uploaderSetup(c.$uploader);this.$revisedFileSelector_= b.find("#revisedFileId").change(this.callbackWrapper(this.revisedFileChange));this.hasGenreSelector_&&(this.$genreSelector=b.find("#genreId").change(this.callbackWrapper(this.genreChange)));this.setUploaderVisibility_()};a.pkp.classes.Helper.inherits(a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler,a.pkp.controllers.form.AjaxFormHandler);a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.hasFileSelector_=!1;a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.$revisedFileSelector_= null;a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.hasGenreSelector_=!1;a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.$genreSelector_=null;a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.presetRevisedFileId_=null;a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.fileGenres_=null;a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.$uploader_=null;a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.prototype.uploaderSetup= function(b){b=a.pkp.classes.Handler.getHandler(b);b.pluploader.bind("BeforeUpload",this.callbackWrapper(this.prepareFileUploadRequest));b.pluploader.bind("FileUploaded",this.callbackWrapper(this.handleUploadResponse));b.pluploader.bind("FilesRemoved",this.callbackWrapper(this.handleRemovedFiles))};a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.prototype.prepareFileUploadRequest=function(b,c){this.getHtmlElement();b={};this.hasFileSelector_?(this.$revisedFileSelector_.attr("disabled", -"disabled"),b.revisedFileId=this.$revisedFileSelector_.val()):b.revisedFileId=null!==this.presetRevisedFileId_?this.presetRevisedFileId_:0;this.hasGenreSelector_?(this.$genreSelector.attr("disabled","disabled"),b.genreId=this.$genreSelector.val()):b.genreId="";c.settings.multipart_params=b};a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.prototype.handleUploadResponse=function(b,c,d,e){b=this.handleJson(a.parseJSON(e.response));this.getHtmlElement();!1!==b&&(this.trigger("fileUploaded", +"disabled"),b.revisedFileId=this.$revisedFileSelector_.val()):b.revisedFileId=null!==this.presetRevisedFileId_?this.presetRevisedFileId_:0;this.hasGenreSelector_?(this.$genreSelector.attr("disabled","disabled"),b.genreId=this.$genreSelector.val()):b.genreId="";c.settings.multipart_params=b};a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.prototype.handleUploadResponse=function(b,c,d,e){b=this.handleJson(a.parseJSON(e.response));this.getHtmlElement();!1!==b&&(b.uploadedFile&&this.trigger("fileUploaded", b.uploadedFile),""!==b.content&&this.replaceWith(b.content));this.getHtmlElement().valid()};a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.prototype.handleRemovedFiles=function(b,c,d){this.trigger("filesRemoved",[c,d])};a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.prototype.submitForm=function(b,c){this.trigger("formSubmitted")};a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.prototype.revisedFileChange=function(b,c){this.$revisedFileSelector_.val()? (this.$genreSelector.val(this.fileGenres_[this.$revisedFileSelector_.val()]),this.$genreSelector.attr("disabled","disabled")):this.$genreSelector.removeAttr("disabled");this.setUploaderVisibility_();return!1};a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.prototype.genreChange=function(b,c){this.setUploaderVisibility_()};a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.prototype.attachUploader_=function(b,c){b.pkpHandler("$.pkp.controllers.UploaderHandler",c)};a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.prototype.setUploaderVisibility_= function(){this.hasGenreSelector_&&this.$genreSelector.val()||this.$revisedFileSelector_.val()?this.showUploader_():this.hasGenreSelector_||this.hasFileSelector_?this.hideUploader_():this.showUploader_()};a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.prototype.hideUploader_=function(){this.$uploader_.addClass("pkp_screen_reader")};a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.prototype.showUploader_=function(){this.$uploader_.removeClass("pkp_screen_reader");a.pkp.classes.Handler.getHandler(this.$uploader_).pluploader.refresh()}})(jQuery);(function(a){a.pkp.controllers.grid.notifications=a.pkp.controllers.grid.notifications||{};a.pkp.controllers.grid.notifications.NotificationsGridHandler=function(b,c){b.find('a[id*="markNew"]').click(this.callbackWrapper(this.markNewHandler_));b.find('a[id*="markRead"]').click(this.callbackWrapper(this.markReadHandler_));b.find('a[id*="deleteNotification"]').click(this.callbackWrapper(this.deleteHandler_));this.parent(b,c)};a.pkp.classes.Helper.inherits(a.pkp.controllers.grid.notifications.NotificationsGridHandler, @@ -346,17 +347,19 @@ var d=b.find("#notificationsPopover"),e=b.find("#notificationsToggle");d.toggle( this.getHtmlElement().find("#notificationsPopover"),c=a(window).height()-60;cthis.anonymousReviewerIds_.indexOf(b)||(b={titl this.getHtmlElement(),e=d.find("input[name='userGroupId']");c=d.find("input[id^='canChangeMetadata']");d=d.find(".submissionEditMetadataPermit");var f=!1;e=e.val();if("userGroupId"==a(b).prop("name"))c.attr("disabled","disabled"),c.removeAttr("checked"),d.hide();else if("userIdSelected"==a(b).prop("name")&&!d.is(":visible")){for(b=0;b - - - + + +