'+d.content+"");h.scrollTop(0);-1!==f&&(d=e.find("a[name="+this.currentTopic_.substr(f+1)+"]"),d.length&&h.scrollTop(d.offset().top-
50));this.getHtmlElement().removeClass("is_loading")};a.pkp.controllers.HelpPanelHandler.prototype.handleContentLinks_=function(b,c){var d=a(b).attr("href");c.preventDefault();"http"==d.substring(0,4)?window.open(d):(d=d.split("/"),this.loadHelpContent_(d.slice(1).join("/"),d[0]));return!1};a.pkp.controllers.HelpPanelHandler.prototype.closePanel_=function(){var b=this.getHtmlElement();b.removeClass("is_visible");a("body").removeClass("help_panel_is_visible");b.find(".content").empty();null!==this.caller_&&
this.caller_.focus();b.off("click.pkp.HelpPanel keyup.pkp.HelpPanel");b.off("click.pkp.HelpPanelContentLink",".content a");this.caller_=null};a.pkp.controllers.HelpPanelHandler.prototype.homePanel_=function(){this.loadHelpContent_(null,this.helpLocale_)};a.pkp.controllers.HelpPanelHandler.prototype.handleWrapperEvents=function(b,c){var d=this.getHtmlElement();"click"==c.type&&d.is(a(c.target))?d.trigger("pkp.HelpPanel.Close"):"keyup"==c.type&&27==c.which&&d.trigger("pkp.HelpPanel.Close")}})(jQuery);(function(a){a.pkp.controllers.form=a.pkp.controllers.form||{};a.pkp.controllers.form.FormHandler=function(b,c){var d;this.parent(b,c);if(!b.is("form"))throw Error("A form handler controller can only be bound to an HTML form element!");c.submitHandler&&(this.callerSubmitHandler_=c.submitHandler);a(".datepicker").each(function(){a(this).datepicker({altField:"#"+a(this).prop("id")+"-altField",altFormat:"yy-mm-dd",dateFormat:a("#"+a(this).prop("id")+"-altField").attr("data-date-format")});a(this).hasClass("hasDatepicker")||
a(this).prop("name",a(this).prop("name")+"-removed")});c.cancelRedirectUrl&&(this.cancelRedirectUrl_=c.cancelRedirectUrl);"undefined"!==typeof c.trackFormChanges&&(this.trackFormChanges=c.trackFormChanges);c.disableControlsOnSubmit&&(this.disableControlsOnSubmit=c.disableControlsOnSubmit);c.enableDisablePairs&&(this.enableDisablePairs_=c.enableDisablePairs,this.setupEnableDisablePairs());for(d in this.enableDisablePairs_)b.find("[id^='"+d+"']").trigger("updatePair");d=b.validate({onfocusout:this.callbackWrapper(this.onFocusOutValidation_),
errorClass:"error",highlight:function(b,c){a(b).parent().parent().addClass(c)},unhighlight:function(b,c){a(b).parent().parent().removeClass(c)},submitHandler:this.callbackWrapper(this.submitHandler_),showErrors:this.callbackWrapper(this.showErrors)});a("[id^='cancelFormButton-']",b).click(this.callbackWrapper(this.cancelForm));b.find(".showMore, .showLess").bind("click",this.switchViz);d.checkForm()?this.trigger("formValid"):this.trigger("formInvalid");a(".pkpEditableToggle",b).click(this.callbackWrapper(this.toggleEditableControl));
this.initializeTinyMCE();a("[id^='submitFormButton']",b).click(this.callbackWrapper(this.pushTinyMCEChanges_));a(":input",b).change(this.callbackWrapper(this.formChange));this.bind("formChange",this.callbackWrapper(this.formChange));b.click(this.callbackWrapper(this.hideDatepicker_));this.publishEvent("tinyMCEInitialized");this.bind("tinyMCEInitialized",this.tinyMCEInitHandler_);this.bind("containerClose",this.containerCloseHandler)};a.pkp.classes.Helper.inherits(a.pkp.controllers.form.FormHandler,
a.pkp.classes.Handler);a.pkp.controllers.form.FormHandler.prototype.disableControlsOnSubmit=!1;a.pkp.controllers.form.FormHandler.prototype.trackFormChanges=!0;a.pkp.controllers.form.FormHandler.prototype.callerSubmitHandler_=null;a.pkp.controllers.form.FormHandler.prototype.cancelRedirectUrl_=null;a.pkp.controllers.form.FormHandler.prototype.formChangesTracked=!1;a.pkp.controllers.form.FormHandler.prototype.enableDisablePairs_=null;a.pkp.controllers.form.FormHandler.prototype.showErrors=function(b){"undefined"!==
typeof tinyMCE&&tinyMCE.EditorManager.triggerSave();var c=a.extend(!0,{},b);setTimeout(this.callbackWrapper(function(){c.defaultShowErrors();c=null}),250);b.checkForm()?this.trigger("formValid"):(this.trigger("formInvalid"),this.enableFormControls())};a.pkp.controllers.form.FormHandler.prototype.formChange=function(){this.trackFormChanges&&!this.formChangesTracked&&(this.formChangesTracked=!0,this.trigger("formChanged"))};a.pkp.controllers.form.FormHandler.prototype.disableFormControls=function(){this.disableControlsOnSubmit&&
this.getHtmlElement().find(":submit").attr("disabled","disabled").addClass("ui-state-disabled");return!0};a.pkp.controllers.form.FormHandler.prototype.enableFormControls=function(){this.getHtmlElement().find(":submit").removeAttr("disabled").removeClass("ui-state-disabled");return!0};a.pkp.controllers.form.FormHandler.prototype.cancelForm=function(){this.unregisterForm();this.trigger("formCanceled");return!1};a.pkp.controllers.form.FormHandler.prototype.unregisterForm=function(){this.formChangesTracked=
!1;this.trigger("unregisterChangedForm")};a.pkp.controllers.form.FormHandler.prototype.setupEnableDisablePairs=function(){var b=this.getHtmlElement(),c;for(c in this.enableDisablePairs_)a(b).find("[id^='"+c+"']").bind("click updatePair",this.callbackWrapper(this.toggleDependentElement_));return!0};a.pkp.controllers.form.FormHandler.prototype.submitFormWithoutValidation=function(a){a.settings.submitHandler=null;this.disableFormControls();this.getHtmlElement().submit();this.formChangesTracked=!1};a.pkp.controllers.form.FormHandler.prototype.hideSpinner=
function(){this.getHtmlElement().find(".formButtons .pkp_spinner").removeClass("is_visible")};a.pkp.controllers.form.FormHandler.prototype.toggleEditableControl=function(b,c){c.preventDefault();var d=a(b).parents('[data-pkp-editable="true"]');d.length&&d.toggleClass("isEditing")};a.pkp.controllers.form.FormHandler.prototype.submitHandler_=function(b,c){var d=!1;a(c).find(".formWidget").each(function(){var b=new a.Event("formSubmitRequested");d||(a(this).trigger(b),d=b.isDefaultPrevented())});d||(this.showSpinner_(),
this.trigger("unregisterChangedForm"),null!==this.callerSubmitHandler_?(this.formChangesTracked=!1,this.callbackWrapper(this.callerSubmitHandler_).call(b,c)):this.submitFormWithoutValidation(b))};a.pkp.controllers.form.FormHandler.prototype.pushTinyMCEChanges_=function(){"undefined"!==typeof tinyMCE&&tinyMCE.EditorManager.triggerSave();return!0};a.pkp.controllers.form.FormHandler.prototype.toggleDependentElement_=function(b){var c,d;c=this.getHtmlElement();d=a(b).attr("id");c=a(c).find("[id^='"+this.enableDisablePairs_[d]+
"']");a(b).is(":checked")?a(c).prop("disabled",!1):a(c).prop("disabled",!0);return!0};a.pkp.controllers.form.FormHandler.prototype.tinyMCEInitHandler_=function(b,c,d){var e=d.id;d.on("blur",this.callbackWrapper(function(b){b.save();var b=this.getHtmlElement(),c=a("#"+a.pkp.classes.Helper.escapeJQuerySelector(e),b);b.validate().element(c)}))};a.pkp.controllers.form.FormHandler.prototype.containerCloseHandler=function(b,c,d){a(this.getHtmlElement()).find(".hasDatepicker").datepicker("hide");if(this.formChangesTracked)if(confirm(a.pkp.locale.form_dataHasChanged))this.trigger("unregisterAllForms");
else return d.closePermitted=!1;"undefined"!==typeof d&&(d.closePermitted=!0);return!0};a.pkp.controllers.form.FormHandler.prototype.onFocusOutValidation_=function(b,c){var d=this.getHtmlElement();a(c).parents("#"+d.attr("id")).length&&b.element(c);return!0};a.pkp.controllers.form.FormHandler.prototype.hideDatepicker_=function(b,c){var d,e;d=c.originalEvent;"undefined"!=typeof d&&(d=d.target,e=this.getHtmlElement(),!a(d).hasClass("hasDatepicker")&&(!a(d).hasClass("ui-datepicker")&&!a(d).hasClass("ui-icon")&&
!a(d).hasClass("ui-datepicker-next")&&!a(d).hasClass("ui-datepicker-prev")&&!a(d).parent().parents(".ui-datepicker").length)&&a(e).find(".hasDatepicker").datepicker("hide"))};a.pkp.controllers.form.FormHandler.prototype.showSpinner_=function(){this.getHtmlElement().find(".formButtons .pkp_spinner").addClass("is_visible")}})(jQuery);(function(a){a.pkp.controllers.form.DropdownHandler=function(a,c){this.parent(a,c);this.eventName_=c.eventName;this.defaultKey_=c.defaultKey;this.publishEvent(this.eventName_);this.getOptionsUrl_=c.getOptionsUrl;this.trackFormChanges=!1;a.find("select").change(this.callbackWrapper(this.selectOptionHandler_));this.loadOptions_();this.bind("containerReloadRequested",this.containerReloadHandler_)};a.pkp.classes.Helper.inherits(a.pkp.controllers.form.DropdownHandler,a.pkp.classes.Handler);a.pkp.controllers.form.DropdownHandler.prototype.eventName_=
null;a.pkp.controllers.form.DropdownHandler.prototype.defaultKey_=null;a.pkp.controllers.form.DropdownHandler.prototype.currentKey_=null;a.pkp.controllers.form.DropdownHandler.prototype.getOptionsUrl_=null;a.pkp.controllers.form.DropdownHandler.prototype.selectOptionHandler_=function(b){this.trigger(this.eventName_,[a(b).val()])};a.pkp.controllers.form.DropdownHandler.prototype.loadOptions_=function(){a.get(this.getOptionsUrl_,this.callbackWrapper(this.setOptionList_),"json")};a.pkp.controllers.form.DropdownHandler.prototype.setOptionList_=
function(b,c){var d=this.handleJson(c),e=this.getHtmlElement().find("select"),f,h;for(f in d.content){h=a("");h.attr("value",f);if(this.defaultKey_==f||this.currentKey_==f)h.attr("selected","selected"),this.trigger(this.eventName_,[f]);h.text(d.content[f]);e.append(h)}this.trigger("dropDownOptionSet")};a.pkp.controllers.form.DropdownHandler.prototype.containerReloadHandler_=function(){var a=this.getHtmlElement().find("select");this.currentKey_=a.find("option:selected").attr("value");a.find('option[value!="0"]').remove();
this.loadOptions_()}})(jQuery);(function(a){a.pkp.controllers.form.AjaxFormHandler=function(a,c){c.submitHandler=this.submitForm;this.parent(a,c);this.bind("refreshForm",this.refreshFormHandler_);this.publishEvent("containerReloadRequested")};a.pkp.classes.Helper.inherits(a.pkp.controllers.form.AjaxFormHandler,a.pkp.controllers.form.FormHandler);a.pkp.controllers.form.AjaxFormHandler.prototype.disableControlsOnSubmit=!0;a.pkp.controllers.form.AjaxFormHandler.prototype.submitForm=function(){var b=this.getHtmlElement();this.disableFormControls();
a.post(b.attr("action"),b.serialize(),this.callbackWrapper(this.handleResponse),"json")};a.pkp.controllers.form.AjaxFormHandler.prototype.refreshFormHandler_=function(a,c,d){d&&this.replaceWith(d)};a.pkp.controllers.form.AjaxFormHandler.prototype.handleResponse=function(b,c){var d,e;e=this.handleJson(c);if(!1!==e)if(""===e.content)d=new a.Event("formSubmitted"),a(this.getHtmlElement()).find(".formWidget").trigger(d),this.trigger("formSubmitted"),this.publishChangeEvents(),this.disableControlsOnSubmit&&
this.enableFormControls();else{if(void 0!==e.reloadContainer)return this.trigger("dataChanged"),this.trigger("containerReloadRequested",[e]),e.status;this.replaceWith(e.content)}else this.enableFormControls();this.trigger("notifyUser",[this.getHtmlElement()]);this.hideSpinner();return e.status}})(jQuery);(function(a){a.pkp.controllers.form.ClientFormHandler=function(a,c){c.submitHandler=this.submitForm;this.parent(a,c)};a.pkp.classes.Helper.inherits(a.pkp.controllers.form.ClientFormHandler,a.pkp.controllers.form.FormHandler);a.pkp.controllers.form.ClientFormHandler.prototype.submitForm=function(){var b;b=this.getHtmlElement().serializeArray();b.push({name:"clientSubmit",value:!0});this.trigger("formSubmitted",[a.param(b)])}})(jQuery);(function(a){a.pkp.controllers.form.ToggleFormHandler=function(a){this.parent(a,{trackFormChanges:!1});a.change(this.callbackWrapper(this.toggleHandler_))};a.pkp.classes.Helper.inherits(a.pkp.controllers.form.ToggleFormHandler,a.pkp.controllers.form.ClientFormHandler);a.pkp.controllers.form.ToggleFormHandler.prototype.toggleHandler_=function(){this.getHtmlElement().submit();return!0}})(jQuery);(function(a){a.pkp.controllers.form.FileUploadFormHandler=function(a,c){this.parent(a,c);if(void 0===c.readOnly||null===c.readOnly)void 0!==c.resetUploader&&(this.resetUploader_=c.resetUploader),void 0!==c.$preview&&c.$preview.length&&(this.$preview=c.$preview,this.bind("fileDeleted",this.callbackWrapper(this.fileDeleted))),this.attachUploader_(c.$uploader,c.uploaderOptions),this.uploaderSetup(c.$uploader)};a.pkp.classes.Helper.inherits(a.pkp.controllers.form.FileUploadFormHandler,a.pkp.controllers.form.AjaxFormHandler);
a.pkp.controllers.form.FileUploadFormHandler.prototype.resetUploader_=!1;a.pkp.controllers.form.FileUploadFormHandler.prototype.$preview=!1;a.pkp.controllers.form.FileUploadFormHandler.prototype.handleResponse=function(b,c){var d;this.resetUploader_&&(d=a("#plupload",this.getHtmlElement()).plupload("getUploader"),d.splice(),d.refresh(),a("#temporaryFileId",this.getHtmlElement()).val(""));return this.parent("handleResponse",b,c)};a.pkp.controllers.form.FileUploadFormHandler.prototype.uploaderSetup=
function(b){a.pkp.classes.Handler.getHandler(b).pluploader.bind("FileUploaded",this.callbackWrapper(this.handleUploadResponse))};a.pkp.controllers.form.FileUploadFormHandler.prototype.handleUploadResponse=function(b,c,d,e){b=this.handleJson(a.parseJSON(e.response));!1!==b&&(this.trigger("fileUploaded",[b.uploadedFile]),this.$preview&&this.$preview.hide(),""===b.content?(c=this.getHtmlElement(),c=c.find("#temporaryFileId"),c.val(b.temporaryFileId)):this.replaceWith(b.content))};a.pkp.controllers.form.FileUploadFormHandler.prototype.fileDeleted=
function(){this.$preview&&this.$preview.hide()};a.pkp.controllers.form.FileUploadFormHandler.prototype.attachUploader_=function(a,c){a.pkpHandler("$.pkp.controllers.UploaderHandler",c)}})(jQuery);(function(a){a.pkp.controllers.form.MultilingualInputHandler=function(a,c){this.parent(a,c);var d=null,d=a.hasClass("pkpTagit")?a.find(":input").filter(":visible"):a.find(":input").first();d.focus(this.callbackWrapper(this.focusHandler_));a.find(":input").blur(this.callbackWrapper(this.blurHandler_));this.publishEvent("tinyMCEInitialized");this.tinyMCEInitHandler_();setTimeout(this.callbackWrapper(this.isIncomplete_),500)};a.pkp.classes.Helper.inherits(a.pkp.controllers.form.MultilingualInputHandler,
a.pkp.classes.Handler);a.pkp.controllers.form.MultilingualInputHandler.prototype.focusHandler_=function(){this.showPopover_()};a.pkp.controllers.form.MultilingualInputHandler.prototype.blurHandler_=function(){setTimeout(this.callbackWrapper(function(){this.hasElementInFocus_()||this.hidePopover_()}),0);return!0};a.pkp.controllers.form.MultilingualInputHandler.prototype.hidePopover_=function(){var a=this.getHtmlElement();a.removeClass("localization_popover_container_focus");a.find(".localization_popover").hide();
this.isIncomplete_()};a.pkp.controllers.form.MultilingualInputHandler.prototype.showPopover_=function(){var a=this.getHtmlElement();a.addClass("localization_popover_container_focus");a.find(".localization_popover").width(a.width());a.find(".localization_popover").show()};a.pkp.controllers.form.MultilingualInputHandler.prototype.hasElementInFocus_=function(){return this.getHtmlElement().has(document.activeElement).length?!0:!1};a.pkp.controllers.form.MultilingualInputHandler.prototype.isIncomplete_=
function(){var b=this.getHtmlElement(),c=[],d=0;"undefined"!==typeof tinyMCE&&(this.getHtmlElement().find(".richContent").length?b.find("textarea").each(function(){a(this).attr("id");c.push(a(this));tinyMCE.EditorManager.get(a(this).attr("id")).getContent()&&d++}):(c=b.find(":input"),c.each(function(){a(this).val()&&d++})),0'),d.attr("name",e),this.getHtmlElement().append(d)),d.attr("value",b))};a.pkp.controllers.listbuilder.ListbuilderHandler.prototype.saveRow=
function(b){b.addClass("saveRowResponsePlaceholder");b=this.buildParamsFromInputs_(b.find(":input"));b.modify=!0;this.disableControls();a.ajax({url:this.getFetchRowUrl(),data:b,success:this.callbackWrapper(this.saveRowResponseHandler_,null),dataType:"json",async:!1})};a.pkp.controllers.listbuilder.ListbuilderHandler.prototype.getEmptyElement=function(){return this.getHtmlElement().find(".empty")};a.pkp.controllers.listbuilder.ListbuilderHandler.prototype.addItemHandler_=function(){this.availableOptions_&&
setTimeout(this.callbackWrapper(function(){this.closeEdits();this.disableControls();a.get(this.getFetchRowUrl(),{modify:!0},this.callbackWrapper(this.appendRowResponseHandler_,null),"json")}),0);return!1};a.pkp.controllers.listbuilder.ListbuilderHandler.prototype.deleteItemHandler_=function(b){this.closeEdits();var c=a(b),b=c.closest(".gridRow"),c=c.closest(".pkp_controllers_listbuilder").find(".deletions"),d=b.find('input[name="rowId"]').val();void 0!==d&&(c.val(c.val()+" "+d),this.getHtmlElement().trigger("formChange"));
this.deleteElement(b);this.availableOptions_=!0;return!1};a.pkp.controllers.listbuilder.ListbuilderHandler.prototype.appendRowResponseHandler_=function(b,c){var d=this.handleJson(c);!1!==d&&(d=a(d.content),this.getHtmlElement().find(".empty").hide().before(d),this.attachContentHandlers_(d),d.addClass("gridRowEdit"),d.find(":input").not('[type="hidden"]').first().focus(),this.sourceType_==a.pkp.cons.LISTBUILDER_SOURCE_TYPE_SELECT?(this.disableControls(),a.get(this.fetchOptionsUrl_,{},this.callbackWrapper(this.fetchOptionsResponseHandler_,
null),"json")):this.enableControls(),this.callFeaturesHook("addElement",d));return!1};a.pkp.controllers.listbuilder.ListbuilderHandler.prototype.fetchOptionsResponseHandler_=function(b,c){var d=this.handleJson(c),e=this.getHtmlElement(),f=[],h,j,i,n,k,q,p,s,m,u;if(!1!==d){e.find(".gridCellDisplay :input").each(function(b,c){f[b]=a(c).val()});e=e.find(".gridRowEdit:visible .selectMenu:input");h=0;for(j=e.length;h");m.attr("label",s);i.append(m);s=null;u=0;for(s in d.content[h][q])if(p=this.populatePulldown_(m,f,d.content[h][q][s],s))k++,u++;0===u&&m.remove()}}else(p=this.populatePulldown_(i,f,d.content[h][q],q))&&
k++;i=p;1===k&&i&&(i.attr("selected","selected"),this.availableOptions_=!1);0===k&&(n.find(".gridCellDisplay").show(),n.find(".gridCellEdit").hide())}}this.enableControls();return!1};a.pkp.controllers.listbuilder.ListbuilderHandler.prototype.populatePulldown_=function(b,c,d,e){var f=b.parents(".gridCellContainer").find(".gridCellDisplay :input").val(),h=!1,j;if(e!=f)for(j=0;j");c.attr("value",e);c.text(d);e==f&&c.attr("selected","selected");
b.append(c);return c};a.pkp.controllers.listbuilder.ListbuilderHandler.prototype.editItemHandler_=function(b){this.closeEdits();this.editItemCallingContext_=b;setTimeout(this.callbackWrapper(function(){var b=a(this.editItemCallingContext_).closest(".gridRow");b.addClass("gridRowEdit");b.find(":input").not('[type="hidden"]').first().focus();this.sourceType_==a.pkp.cons.LISTBUILDER_SOURCE_TYPE_SELECT&&(this.disableControls(),a.get(this.fetchOptionsUrl_,{},this.callbackWrapper(this.fetchOptionsResponseHandler_,
null),"json"))}),0);return!1};a.pkp.controllers.listbuilder.ListbuilderHandler.prototype.buildParamsFromInputs_=function(b){var c={};a.each(b.serializeArray(),function(b,e){var f=e.name,h=e.value;c[f]=void 0===c[f]?h:a.isArray(c[f])?c[f].concat(h):[c[f],h]});return c};a.pkp.controllers.listbuilder.ListbuilderHandler.prototype.inputKeystrokeHandler_=function(b,c){var d,e,f;return 13==c.which?(d=a(b),e=d.parents(".gridRow"),f=e.find(":input:visible"),d=f.index(d),f.length==d+1?this.saveRow(e):f[d+1].focus(),
!1):!0};a.pkp.controllers.listbuilder.ListbuilderHandler.prototype.inputBlurHandler_=function(b){a(b).closest(".gridRow").addClass("editingRowPlaceholder");setTimeout(this.callbackWrapper(function(){var b=a(".editingRowPlaceholder"),d=!1;b.find(":input").each(function(a,b){b===document.activeElement&&(d=!0)});b.removeClass("editingRowPlaceholder");d||this.closeEdits()}),0);return!0};a.pkp.controllers.listbuilder.ListbuilderHandler.prototype.saveRowResponseHandler_=function(b,c){var d=this.handleJson(c),
e;!1!==d&&(d=a(d.content),e=this.getHtmlElement().find(".saveRowResponsePlaceholder").attr("id"),this.getHtmlElement().find(".saveRowResponsePlaceholder").replaceWith(d),d.attr("id",e),this.attachContentHandlers_(d),this.callFeaturesHook("replaceElement",d));this.getHtmlElement().trigger("formChange");this.enableControls()};a.pkp.controllers.listbuilder.ListbuilderHandler.prototype.saveResponseHandler_=function(){};a.pkp.controllers.listbuilder.ListbuilderHandler.prototype.attachContentHandlers_=
function(a){a.find(".gridCellDisplay").click(this.callbackWrapper(this.editItemHandler_));a.find(":input").keypress(this.callbackWrapper(this.inputKeystrokeHandler_)).blur(this.callbackWrapper(this.inputBlurHandler_));a.find(".pkp_linkaction_delete").click(this.callbackWrapper(this.deleteItemHandler_))};a.pkp.controllers.listbuilder.ListbuilderHandler.prototype.formSubmitHandler_=function(){this.save();this.getHtmlElement().find(".gridRow :input").attr("disabled","disabled");return!0};a.pkp.controllers.listbuilder.ListbuilderHandler.prototype.formSubmittedHandler_=
function(){this.getHtmlElement().find(".gridRow :input").removeAttr("disabled")};a.pkp.controllers.listbuilder.ListbuilderHandler.prototype.disableControls=function(){this.getHtmlElement().find('span[class="options"] > 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.listbuilder.MultipleListsListbuilderHandler=function(a,c){this.parent(a,c)};a.pkp.classes.Helper.inherits(a.pkp.controllers.listbuilder.MultipleListsListbuilderHandler,a.pkp.controllers.listbuilder.ListbuilderHandler);a.pkp.controllers.listbuilder.MultipleListsListbuilderHandler.prototype.$lists_=null;a.pkp.controllers.listbuilder.MultipleListsListbuilderHandler.prototype.getRowsByList=function(a){return a.find(".gridRow")};a.pkp.controllers.listbuilder.MultipleListsListbuilderHandler.prototype.getLists=
function(){return this.$lists_};a.pkp.controllers.listbuilder.MultipleListsListbuilderHandler.prototype.setLists=function(b){jQuery();var c,d;if(!a.isArray(b))throw Error("Lists id must be passed using an array object!");for(c in b)d=this.getListById(b[c]),this.$lists_=this.$lists_?this.$lists_.add(d):d};a.pkp.controllers.listbuilder.MultipleListsListbuilderHandler.prototype.getListById=function(b){b=this.getGridIdPrefix()+"-table-"+b;return a("#"+b,this.getHtmlElement())};a.pkp.controllers.listbuilder.MultipleListsListbuilderHandler.prototype.getListByRow=
function(a){return a.parents("table:first")};a.pkp.controllers.listbuilder.MultipleListsListbuilderHandler.prototype.getListIdByRow=function(a){a=this.getListByRow(a);return this.getListId(a)};a.pkp.controllers.listbuilder.MultipleListsListbuilderHandler.prototype.getListId=function(a){var c=this.getGridIdPrefix()+"-table-";return a.attr("id").slice(c.length)};a.pkp.controllers.listbuilder.MultipleListsListbuilderHandler.prototype.getListNoItemsRow=function(a){return a.find("tr.empty")};a.pkp.controllers.listbuilder.MultipleListsListbuilderHandler.prototype.initialize=
function(a){this.parent("initialize",a);this.setLists(a.listsId)};a.pkp.controllers.listbuilder.MultipleListsListbuilderHandler.prototype.toggleListNoItemsRow=function(a,c,d){var e=this.getListNoItemsRow(a),f=this.getRowsByList(a);d&&(f=f.not(d));f.length==c?(e.detach(),a.append(e),e.show()):(e.detach(),a.append(e),e.hide())}})(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!");var d=a.extend(!0,{},c);this.options=this.mergeOptions(d);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("containerReloadRequested");this.publishEvent("updateHeader");this.publishEvent("gridRefreshRequested");this.bind("notifyUser",this.redirectNotifyUserEventHandler_)};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};
a.pkp.controllers.modal.ModalHandler.options=null;a.pkp.controllers.modal.ModalHandler.prototype.checkOptions=function(a){return"object"===typeof a&&void 0===a.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"!==this.options.title&&b.append('");
this.options.canClose&&b.append(''+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(){var a=this,c=this.getHtmlElement(),d=c.find("form").first(),e;if(1==d.length&&(e={closePermitted:!0},d.trigger("containerClose",[e]),!e.closePermitted))return!1;c.removeClass("is_visible");this.trigger("pkpModalClose");setTimeout(function(){a.unbindPartial(c);c.empty();a.remove();"function"===typeof a.options.closeCallback&&a.options.closeCallback.call()},300);return!1};a.pkp.controllers.modal.ModalHandler.prototype.handleWrapperEvents=function(b,c){"click"==c.type&&b==c.target?a.pkp.classes.Handler.getHandler(a(b)).modalClose():
"keyup"==c.type&&27==c.which&&a.pkp.classes.Handler.getHandler(a(b)).modalClose()};a.pkp.controllers.modal.ModalHandler.prototype.redirectNotifyUserEventHandler_=function(b,c,d){a.pkp.classes.notification.NotificationHelper.redirectNotifyUserEvent(this,d)}})(jQuery);(function(a){a.pkp.controllers.modal.ConfirmationModalHandler=function(a,c){this.parent(a,c);this.callback_=c.callback||null;this.callbackArgs_=c.callbackArgs||null;a.find(".pkpModalConfirmButton").on("click",this.callbackWrapper(this.modalConfirm))};a.pkp.classes.Helper.inherits(a.pkp.controllers.modal.ConfirmationModalHandler,a.pkp.controllers.modal.ModalHandler);a.pkp.controllers.modal.ConfirmationModalHandler.prototype.callback_=null;a.pkp.controllers.modal.ConfirmationModalHandler.prototype.callbackArgs_=
null;a.pkp.controllers.modal.ConfirmationModalHandler.prototype.checkOptions=function(a){return!this.parent("checkOptions",a)?!1:"string"===typeof a.okButton&&(!1===a.cancelButton||"string"===typeof a.cancelButton)&&"string"===typeof a.dialogText};a.pkp.controllers.modal.ConfirmationModalHandler.prototype.modalBuild=function(){var a=this.parent("modalBuild"),c=''+this.options.okButton+"";a.addClass("pkp_modal_confirmation").find(".content").append(''+
this.options.dialogText+"
");this.options.cancelButton&&(c+=''+this.options.cancelButton+"");a.append('");a.attr("role","dialog").attr("aria-label",this.options.title);return a};a.pkp.controllers.modal.ConfirmationModalHandler.prototype.modalConfirm=function(a){this.modalClose(a);this.callback_&&this.callback_.call(null,this.callbackArgs_)}})(jQuery);(function(a){a.pkp.controllers.modal.RedirectConfirmationModalHandler=function(a,c){this.parent(a,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(a){return!this.parent("checkOptions",a)?!1:"string"===typeof a.cancelButton&&
"string"===typeof a.remoteUrl};a.pkp.controllers.modal.RedirectConfirmationModalHandler.prototype.modalConfirm=function(){document.location=this.remoteUrl_}})(jQuery);(function(a){a.pkp.controllers.modal.RemoteActionConfirmationModalHandler=function(a,c){this.parent(a,c);this.remoteAction_=c.remoteAction;this.postData_=c.postData||{};this.postData_.csrfToken=c.csrfToken};a.pkp.classes.Helper.inherits(a.pkp.controllers.modal.RemoteActionConfirmationModalHandler,a.pkp.controllers.modal.ConfirmationModalHandler);a.pkp.controllers.modal.RemoteActionConfirmationModalHandler.prototype.remoteAction_=null;a.pkp.controllers.modal.RemoteActionConfirmationModalHandler.prototype.postData_=
null;a.pkp.controllers.modal.RemoteActionConfirmationModalHandler.prototype.checkOptions=function(a){return!this.parent("checkOptions",a)?!1:"string"===typeof a.cancelButton&&"string"===typeof a.remoteAction};a.pkp.controllers.modal.RemoteActionConfirmationModalHandler.prototype.modalConfirm=function(b,c){c.preventDefault();a.post(this.remoteAction_,this.postData_,this.callbackWrapper(this.remoteResponse),"json")};a.pkp.controllers.modal.RemoteActionConfirmationModalHandler.prototype.remoteResponse=
function(a,c){!1!==this.parent("remoteResponse",a,c)&&this.modalClose(a);return!1}})(jQuery);(function(a){a.pkp.controllers.modal.ButtonConfirmationModalHandler=function(a,c){this.parent(a,c)};a.pkp.classes.Helper.inherits(a.pkp.controllers.modal.ButtonConfirmationModalHandler,a.pkp.controllers.modal.ConfirmationModalHandler);a.pkp.controllers.modal.ButtonConfirmationModalHandler.prototype.checkOptions=function(a){return!this.parent("checkOptions",a)?!1:"object"==typeof a.$button&&1==a.$button.length};a.pkp.controllers.modal.ButtonConfirmationModalHandler.prototype.modalConfirm=function(a){var c=
this.options.$button;this.modalClose(a);"submit"==c.attr("type")?c.trigger("submit"):c.click()}})(jQuery);(function(a){a.pkp.controllers.modal.JsEventConfirmationModalHandler=function(a,c){this.parent(a,c);this.jsEvent_=c.jsEvent;this.extraArguments_=c.extraArguments};a.pkp.classes.Helper.inherits(a.pkp.controllers.modal.JsEventConfirmationModalHandler,a.pkp.controllers.modal.ConfirmationModalHandler);a.pkp.controllers.modal.JsEventConfirmationModalHandler.prototype.jsEvent_=null;a.pkp.controllers.modal.JsEventConfirmationModalHandler.prototype.extraArguments_=null;a.pkp.controllers.modal.JsEventConfirmationModalHandler.prototype.checkOptions=
function(a){return!this.parent("checkOptions",a)?!1:"string"===typeof a.cancelButton&&"string"===typeof a.jsEvent};a.pkp.controllers.modal.JsEventConfirmationModalHandler.prototype.modalConfirm=function(a){this.trigger(this.jsEvent_,this.extraArguments_);this.modalClose(a)}})(jQuery);(function(a){a.pkp.controllers.modal.AjaxModalHandler=function(a,c){this.parent(a,c);this.bind("formSubmitted",this.formSubmitted);this.bind("formCanceled",this.modalClose);this.bind("ajaxHtmlError",this.modalClose);this.bind("modalFinished",this.modalClose)};a.pkp.classes.Helper.inherits(a.pkp.controllers.modal.AjaxModalHandler,a.pkp.controllers.modal.ModalHandler);a.pkp.controllers.modal.AjaxModalHandler.prototype.checkOptions=function(a){return!this.parent("checkOptions",a)?!1:"string"===typeof a.url};
a.pkp.controllers.modal.AjaxModalHandler.prototype.mergeOptions=function(a){return this.parent("mergeOptions",a)};a.pkp.controllers.modal.AjaxModalHandler.prototype.modalOpen=function(a){this.parent("modalOpen",a);a.find(".content").pkpAjaxHtml(this.options.url)};a.pkp.controllers.modal.AjaxModalHandler.prototype.formSubmitted=function(){this.getHtmlElement().parent().trigger("notifyUser");this.modalClose()}})(jQuery);(function(a){a.pkp.controllers.modal.WizardModalHandler=function(a,c){this.parent(a,c);this.bind("wizardClose",this.wizardClose);this.bind("wizardCancel",this.wizardClose)};a.pkp.classes.Helper.inherits(a.pkp.controllers.modal.WizardModalHandler,a.pkp.controllers.modal.AjaxModalHandler);a.pkp.controllers.modal.WizardModalHandler.prototype.modalClose=function(b,c,d){d?this.parent("modalClose",b,c):(d=new a.Event("wizardCancelRequested"),d.stopPropagation(),this.getHtmlElement().children().first().trigger(d),
d.isDefaultPrevented()||this.parent("modalClose",b,c));return!1};a.pkp.controllers.modal.WizardModalHandler.prototype.wizardClose=function(a,c){this.modalClose(a,c,!0)}})(jQuery);(function(a){a.pkp.controllers.modals=a.pkp.controllers.modals||{editorDecision:{form:{}}};a.pkp.controllers.modals.editorDecision.form.EditorDecisionFormHandler=function(b,c){this.parent(b,c);null!==c.peerReviewUrl&&(this.peerReviewUrl_=c.peerReviewUrl,a("#importPeerReviews",b).click(this.callbackWrapper(this.importPeerReviews)));null!==c.revisionsEmail&&(this.revisionsEmail_=c.revisionsEmail);null!==c.resubmitEmail&&(this.resubmitEmail_=c.resubmitEmail);a("#skipEmail-send, #skipEmail-skip, #skipDiscussion-send, #skipDiscussion-skip",
b).change(this.callbackWrapper(this.toggleEmailDisplay));a('input[name="decision"]',b).change(this.callbackWrapper(this.toggleDecisionEmail));this.setStep("email");var d=this;a(".promoteForm-step-btn",b).click(function(b){b.preventDefault();b.stopPropagation();b=a(b.target).data("step");d.setStep(b)})};a.pkp.classes.Helper.inherits(a.pkp.controllers.modals.editorDecision.form.EditorDecisionFormHandler,a.pkp.controllers.form.AjaxFormHandler);a.pkp.controllers.modals.editorDecision.form.EditorDecisionFormHandler.peerReviewUrl_=
null;a.pkp.controllers.modals.editorDecision.form.EditorDecisionFormHandler.revisionsEmail_=null;a.pkp.controllers.modals.editorDecision.form.EditorDecisionFormHandler.resubmitEmail_=null;a.pkp.controllers.modals.editorDecision.form.EditorDecisionFormHandler.prototype.importPeerReviews=function(){a.getJSON(this.peerReviewUrl_,this.callbackWrapper(this.insertPeerReviews));return!1};a.pkp.controllers.modals.editorDecision.form.EditorDecisionFormHandler.prototype.insertPeerReviews=function(b,c){var d=
this.handleJson(c),e=this.getHtmlElement(),e=a('textarea[id^="personalMessage"]',e),e=tinyMCE.get(e.attr("id")),f=e.getContent();!1!==d&&e.setContent(f+d.content+"
");this.trigger("notifyUser",[this.getHtmlElement()])};a.pkp.controllers.modals.editorDecision.form.EditorDecisionFormHandler.prototype.toggleEmailDisplay=function(){var b=a("#sendReviews-emailContent"),c=this.getHtmlElement(),d=!1,e=!1,f=a("#libraryFileAttachments");a("#skipEmail-send, #skipEmail-skip",c).each(function(){"skipEmail-send"===
a(this).attr("id")&&a(this).prop("checked")?d=!0:"skipEmail-skip"===a(this).attr("id")&&a(this).prop("checked")&&(d=!1)});c=a("#skipDiscussion-send, #skipDiscussion-skip",c);c.length&&c.each(function(){"skipDiscussion-send"===a(this).attr("id")&&a(this).prop("checked")?e=!0:"skipDiscussion-skip"===a(this).attr("id")&&a(this).prop("checked")&&(e=!1)});!d&&!e?(b.fadeOut(),f.fadeOut()):(b.fadeIn(),f.fadeIn())};a.pkp.controllers.modals.editorDecision.form.EditorDecisionFormHandler.prototype.toggleDecisionEmail=
function(){var b="",c=a("#skipEmail-send").prop("checked"),d=a("#sendReviews-emailContent"),e=a('textarea[id^="personalMessage"]').attr("id"),f=this;a('input[name="decision"]').each(function(){"decisionRevisions"===a(this).attr("id")&&a(this).prop("checked")?b=f.revisionsEmail_:"decisionResubmit"===a(this).attr("id")&&a(this).prop("checked")&&(b=f.resubmitEmail_)});tinyMCE.get(e).setContent(b);c&&d.hide().fadeIn()};a.pkp.controllers.modals.editorDecision.form.EditorDecisionFormHandler.prototype.setStep=
function(b){var c=a('#promoteForm-step1, .promoteForm-step-btn[data-step="files"]'),d=a('#promoteForm-step2, #promoteForm-complete-btn, .promoteForm-step-btn[data-step="email"]');"files"===b?(d.show(),c.hide()):(c.show(),d.hide())}})(jQuery);(function(a){jQuery.pkp.controllers.linkAction=jQuery.pkp.controllers.linkAction||{};a.pkp.controllers.linkAction.LinkActionHandler=function(b,c){this.parent(b,c);this.staticId_=c.staticId?c.staticId:b.attr("id");if(!c.actionRequest||!c.actionRequestOptions)throw Error('The "actionRequest" and "actionRequestOptions"settings are required in a LinkActionHandler');c.actionRequestOptions.finishCallback=this.callbackWrapper(this.enableLink);this.linkActionRequest_=a.pkp.classes.Helper.objectFactory(c.actionRequest,
[b,c.actionRequestOptions]);this.bindActionRequest();this.publishEvent("dataChanged");this.bind("dataChanged",this.dataChangedHandler_);this.bind("pkpModalClose",this.removeDisabledAttribute_);c.selfActivate&&this.trigger("click")};a.pkp.classes.Helper.inherits(a.pkp.controllers.linkAction.LinkActionHandler,a.pkp.classes.Handler);a.pkp.controllers.linkAction.LinkActionHandler.prototype.linkActionRequest_=null;a.pkp.controllers.linkAction.LinkActionHandler.prototype.staticId_=null;a.pkp.controllers.linkAction.LinkActionHandler.prototype.getStaticId=
function(){return this.staticId_};a.pkp.controllers.linkAction.LinkActionHandler.prototype.getUrl=function(){return this.linkActionRequest_.getUrl()};a.pkp.controllers.linkAction.LinkActionHandler.prototype.activateAction=function(a,c){this.linkActionRequest_.shouldDebounce()&&this.disableLink();return this.linkActionRequest_.activate.call(this.linkActionRequest_,a,c)};a.pkp.controllers.linkAction.LinkActionHandler.prototype.bindActionRequest=function(){this.bind("click",this.activateAction)};a.pkp.controllers.linkAction.LinkActionHandler.prototype.enableLink=
function(){var b,c;b=a(this.getHtmlElement());this.getHtmlElement().is(":submit")||this.removeDisabledAttribute_();c=this.getUrl();this.getHtmlElement().is("a")&&c&&b.attr("href",c);this.unbind("click",this.noAction_);this.bindActionRequest()};a.pkp.controllers.linkAction.LinkActionHandler.prototype.disableLink=function(){var b=a(this.getHtmlElement());b.attr("disabled","disabled");this.getHtmlElement().is("a")&&b.attr("href","#");this.unbind("click",this.activateAction);this.bind("click",this.noAction_)};
a.pkp.controllers.linkAction.LinkActionHandler.prototype.removeDisabledAttribute_=function(){a(this.getHtmlElement()).removeAttr("disabled")};a.pkp.controllers.linkAction.LinkActionHandler.prototype.dataChangedHandler_=function(a,c,d){0===this.getHtmlElement().parents(".pkp_controllers_grid").length&&this.trigger("redirectDataChangedToGrid",[d]);this.trigger("notifyUser",[this.getHtmlElement()])};a.pkp.controllers.linkAction.LinkActionHandler.prototype.noAction_=function(){return!1}})(jQuery);(function(a){a.pkp.controllers.wizard=a.pkp.controllers.wizard||{};a.pkp.controllers.wizard.WizardHandler=function(a,c){this.parent(a,c);this.addWizardButtons_(a,c);this.enforceLinear_=c.hasOwnProperty("enforceLinear")?c.enforceLinear:!0;this.startWizard();this.bindWizardEvents();this.bind("formValid",this.formValid);this.bind("formInvalid",this.formInvalid);this.bind("formSubmitted",this.formSubmitted)};a.pkp.classes.Helper.inherits(a.pkp.controllers.wizard.WizardHandler,a.pkp.controllers.TabHandler);
a.pkp.controllers.wizard.WizardHandler.prototype.$continueButton_=null;a.pkp.controllers.wizard.WizardHandler.prototype.$progressIndicator_=null;a.pkp.controllers.wizard.WizardHandler.prototype.continueButtonText_=null;a.pkp.controllers.wizard.WizardHandler.prototype.finishButtonText_=null;a.pkp.controllers.wizard.WizardHandler.prototype.enforceLinear_=null;a.pkp.controllers.wizard.WizardHandler.prototype.showProgressIndicator_=function(){this.getProgressIndicator().css("opacity",1)};a.pkp.controllers.wizard.WizardHandler.prototype.hideProgressIndicator_=
function(){this.getProgressIndicator().css("opacity",0)};a.pkp.controllers.wizard.WizardHandler.prototype.continueRequest=function(){var b=new a.Event("wizardAdvanceRequested");this.getCurrentTab().children().first().trigger(b);b.isDefaultPrevented()||this.advanceOrClose_();return!1};a.pkp.controllers.wizard.WizardHandler.prototype.formValid=function(){this.enableContinueButton()};a.pkp.controllers.wizard.WizardHandler.prototype.formInvalid=function(){this.disableContinueButton()};a.pkp.controllers.wizard.WizardHandler.prototype.formSubmitted=
function(){this.advanceOrClose_()};a.pkp.controllers.wizard.WizardHandler.prototype.cancelRequest=function(){this.checkForm_(!1);var b=new a.Event("wizardCancelRequested");this.getCurrentTab().children().first().trigger(b);b.isDefaultPrevented()||this.trigger("wizardCancel");return!1};a.pkp.controllers.wizard.WizardHandler.prototype.wizardCancelRequested=function(){return this.checkForm_(!0)?!1:!0};a.pkp.controllers.wizard.WizardHandler.prototype.wizardAdvanceRequested=function(a,c){var d=this.getForm_();
d&&(d.submit()&&(this.disableContinueButton(),this.showProgressIndicator_()),c.preventDefault())};a.pkp.controllers.wizard.WizardHandler.prototype.wizardAdvance=function(){var a=this.getCurrentStep(),c=this.getNumberOfSteps()-1,d=a+1,e;if(d>c)throw Error("Trying to set an invalid wizard step!");e=this.getHtmlElement();e.tabs("enable",d);e.tabs("option","active",d);this.enforceLinear_&&e.tabs("disable",a);a=this.getContinueButton();d===c&&a.text(this.getFinishButtonText());this.hideProgressIndicator_();
this.enableContinueButton()};a.pkp.controllers.wizard.WizardHandler.prototype.startWizard=function(){var a=this.getHtmlElement(),c,d;0!==this.getCurrentStep()&&(a.tabs("enable",0),a.tabs("option","active",0),c=this.getContinueButton(),c.text(this.getContinueButtonText()));if(this.enforceLinear_){c=[];for(d=1;d'),e,f;c.continueButtonText&&(e=a('').text(c.continueButtonText),d.append(e),f=a(''),d.append(f),e.bind("click",this.callbackWrapper(this.continueRequest)),this.$continueButton_=e,this.$progressIndicator_=f,this.continueButtonText_=c.continueButtonText,this.finishButtonText_=c.finishButtonText?c.finishButtonText:c.continueButtonText);c.cancelButtonText&&
(e=a('').text(c.cancelButtonText),d.append(e),e.bind("click",this.callbackWrapper(this.cancelRequest)));b.after(d)};a.pkp.controllers.wizard.WizardHandler.prototype.disableContinueButton=function(){this.getContinueButton().attr("disabled","disabled")};a.pkp.controllers.wizard.WizardHandler.prototype.enableContinueButton=function(){this.getContinueButton().removeAttr("disabled")}})(jQuery);(function(a){a.pkp.controllers.grid.queries=a.pkp.controllers.grid.queries||{};a.pkp.controllers.grid.queries.ReadQueryHandler=function(a,c){this.fetchNoteFormUrl_=c.fetchNoteFormUrl;this.fetchParticipantsListUrl_=c.fetchParticipantsListUrl;a.find(".openNoteForm a").click(this.callbackWrapper(this.showNoteFormHandler_));a.bind("dataChanged",this.callbackWrapper(this.reloadParticipantsList_));this.loadParticipantsList()};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(".openNoteForm").addClass("is_loading");
a.get(this.fetchNoteFormUrl_,this.callbackWrapper(this.showFetchedNoteForm_),"json")};a.pkp.controllers.grid.queries.ReadQueryHandler.prototype.showFetchedNoteForm_=function(b,c){var d=this.handleJson(c),e=a("#newNotePlaceholder",this.getHtmlElement()),f=a(".openNoteForm.is_loading",this.getHtmlElement());this.unbindPartial(f);f.remove();this.unbindPartial(e);e.html(d.content)};a.pkp.controllers.grid.queries.ReadQueryHandler.prototype.showFetchedParticipantsList_=function(b,c){var d=this.handleJson(c),
e=a("#participantsListPlaceholder",this.getHtmlElement());this.unbindPartial(e);e.children().remove();e.append(d.content)};a.pkp.controllers.grid.queries.ReadQueryHandler.prototype.reloadParticipantsList_=function(){this.loadParticipantsList()}})(jQuery);(function(a){a.pkp.controllers.wizard.fileUpload=a.pkp.controllers.wizard.fileUpload||{};a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler=function(a,c){this.parent(a,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(a,c,d){if(0c)throw Error("Trying to set an invalid wizard step!");e.tabs("enable",d);e.tabs("option","active",d);0===a&&e.tabs("disable",a);d===c&&(a=this.getContinueButton(),a.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(a,c){0===this.getCurrentStep()&&0===this.getHtmlElement().find("#uploadConfirmationForm").length&&!this.uploadedFile_||this.parent("formValid",a,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_,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(a,c,d){!1!==this.handleJson(d)&&this.trigger("wizardCancel")};a.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler.prototype.handleFileUploaded=function(a,
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(a,c){this.parent(a,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_=
a.find("#revisedFileId").change(this.callbackWrapper(this.revisedFileChange));this.hasGenreSelector_&&(this.$genreSelector=a.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(a,c){this.getHtmlElement();var d={};this.hasFileSelector_?(this.$revisedFileSelector_.attr("disabled",
"disabled"),d.revisedFileId=this.$revisedFileSelector_.val()):d.revisedFileId=null!==this.presetRevisedFileId_?this.presetRevisedFileId_:0;this.hasGenreSelector_?(this.$genreSelector.attr("disabled","disabled"),d.genreId=this.$genreSelector.val()):d.genreId="";c.settings.multipart_params=d};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",
b.uploadedFile),""!==b.content&&this.replaceWith(b.content));this.getHtmlElement().valid()};a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.prototype.handleRemovedFiles=function(a,c,d){this.trigger("filesRemoved",[c,d])};a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.prototype.submitForm=function(){this.trigger("formSubmitted")};a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.prototype.revisedFileChange=function(){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(){this.setUploaderVisibility_()};a.pkp.controllers.wizard.fileUpload.form.FileUploadFormHandler.prototype.attachUploader_=function(a,c){a.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.showUploader_():this.hideUploader_()};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.wizard.fileUpload.form.RevisionConfirmationHandler=function(a,c){this.parent(a,c);a.find("#possibleRevision").show("slide");this.trigger("unregisterChangedForm");this.bind("wizardAdvanceRequested",this.wizardAdvanceRequested);this.trackFormChanges=!1};a.pkp.classes.Helper.inherits(a.pkp.controllers.wizard.fileUpload.form.RevisionConfirmationHandler,a.pkp.controllers.form.AjaxFormHandler);a.pkp.controllers.wizard.fileUpload.form.RevisionConfirmationHandler.prototype.wizardAdvanceRequested=
function(a,c){var d=this.getHtmlElement();0 li").each(function(){var c=a(this).children("ul"),d=c.children(),e=d.find("li");c.length?d.length?(e.length&&e.each(function(){a(this).appendTo(c)}),a(this).find("> .item > .item_buttons .btnSubmenuWarning").length||a(this).find("> .item > .item_buttons").prepend(a("").addClass("btnSubmenuWarning").append(a("").addClass("fa fa-exclamation-triangle")).append(a("").addClass("-screenReader").text(b.submenuWarning_)))):
c.replaceWith(""):a(this).append("")});a("#pkpNavUnassigned > li").each(function(){var b=a(this).children("ul");b.length&&b.find("li").each(function(){a(this).appendTo(a("#pkpNavUnassigned"))});b.remove()});a("#pkpNavManagement ul").sortable({placeholder:"pkp_nav_item_placeholder",delay:250,connectWith:"#pkpNavManagement ul",update:this.callbackWrapper(this.updateSorting),start:function(){a("#pkpNavAssigned").addClass("pkp_is_sorting")},stop:function(){a("#pkpNavAssigned").removeClass("pkp_is_sorting")}})};
a.pkp.controllers.grid.navigationMenus.form.NavigationMenuFormHandler.prototype.updateSorting=function(){var b=a("#pkpNavManagement"),c=0,d="";this.initSorting();a("input",b).remove();a("#pkpNavAssigned > li").each(function(){d="menuTree["+a(this).data("id")+"]";b.append('');c++;var e=a(this).data("id");a(this).find("li").each(function(){d="menuTree["+a(this).data("id")+"]";b.append('');b.append('');c++})})};a.pkp.controllers.grid.navigationMenus.form.NavigationMenuFormHandler.prototype.showConditionalDisplayWarning=function(b){var b=a(b).closest("li").data("type"),c={title:this.warningModalTitle_,okButton:this.okButton_,cancelButton:!1,dialogText:this.itemTypeConditionalWarnings_[b]};null!==this.itemTypeConditionalWarnings_[b]&&a('').pkpHandler("$.pkp.controllers.modal.ConfirmationModalHandler",
c);return!1};a.pkp.controllers.grid.navigationMenus.form.NavigationMenuFormHandler.prototype.showSubmenuWarning=function(){var b={title:this.warningModalTitle_,okButton:this.okButton_,cancelButton:!1,dialogText:this.submenuWarning_};a('').pkpHandler("$.pkp.controllers.modal.ConfirmationModalHandler",b);return!1}})(jQuery);(function(a){a.pkp.controllers.grid.navigationMenus.form.NavigationMenuItemsFormHandler=function(b,c){this.parent(b,c);this.previewUrl_=c.previewUrl;this.itemTypeDescriptions_=c.itemTypeDescriptions;this.itemTypeConditionalWarnings_=c.itemTypeConditionalWarnings;a("#previewButton",b).click(this.callbackWrapper(this.showPreview_)).hide();a("#menuItemType",b).change(this.callbackWrapper(this.setType));a("#menuItemType",b).trigger("change")};a.pkp.classes.Helper.inherits(a.pkp.controllers.grid.navigationMenus.form.NavigationMenuItemsFormHandler,
a.pkp.controllers.form.AjaxFormHandler);a.pkp.controllers.grid.navigationMenus.form.NavigationMenuItemsFormHandler.prototype.previewUrl_=null;a.pkp.controllers.grid.navigationMenus.form.NavigationMenuItemsFormHandler.prototype.itemTypeDescriptions_=null;a.pkp.controllers.grid.navigationMenus.form.NavigationMenuItemsFormHandler.prototype.itemTypeConditionalWarnings_=null;a.pkp.controllers.grid.navigationMenus.form.NavigationMenuItemsFormHandler.prototype.showPreview_=function(){var b=this.getHtmlElement();
a.post(this.previewUrl_,b.serialize(),function(a){var b=window.open("about:blank");b.document.open();b.document.write(a);b.document.close()});return!0};a.pkp.controllers.grid.navigationMenus.form.NavigationMenuItemsFormHandler.prototype.setType=function(){var b=a("#menuItemType",this.getHtmlElement()).val(),c=a("#customPageOptions, #previewButton"),d=a("#remoteUrlTarget"),e=a('#menuItemTypeSection [for="menuItemType"]');c.hide();d.hide();"NMI_TYPE_CUSTOM"===b?c.fadeIn():"NMI_TYPE_REMOTE_URL"===b&&
d.fadeIn();"undefined"!==typeof this.itemTypeDescriptions_[b]&&e.text(this.itemTypeDescriptions_[b])}})(jQuery);(function(a){a.pkp.controllers.grid.representations=a.pkp.controllers.grid.representations||{form:{}};a.pkp.controllers.grid.representations.form.RepresentationFormHandler=function(b,c){this.parent(b,c);(this.remoteRepresentation_=c.remoteRepresentation)?(a("#remotelyHostedContent").prop("checked",!0),a("#remote").show(20)):(a("#remotelyHostedContent").prop("checked",!1),a("#remote").hide(20));a("#remotelyHostedContent").change(this.callbackWrapper(this.toggleRemote_))};a.pkp.classes.Helper.inherits(a.pkp.controllers.grid.representations.form.RepresentationFormHandler,
a.pkp.controllers.form.AjaxFormHandler);a.pkp.controllers.grid.representations.form.RepresentationFormHandler.prototype.toggleRemote_=function(){a("#remotelyHostedContent").prop("checked")?a("#remote").show(20):(a("#remote").hide(20),a('input[id^="remoteURL"]').val(""));return!0}})(jQuery);(function(a){a.pkp.controllers.grid.settings=a.pkp.controllers.grid.settings||{user:{form:{}}};a.pkp.controllers.grid.settings.user.form.UserDetailsFormHandler=function(b,c){this.parent(b,c);a('[id^="generatePassword"]',b).click(this.callbackWrapper(this.setGenerateRandom));a('[id^="generatePassword"]',b).attr("checked")&&this.setGenerateRandom('[id^="generatePassword"]')};a.pkp.classes.Helper.inherits(a.pkp.controllers.grid.settings.user.form.UserDetailsFormHandler,a.pkp.controllers.form.UserFormHandler);
a.pkp.controllers.grid.settings.user.form.UserDetailsFormHandler.prototype.submitForm=function(b,c){var d=this.getHtmlElement();a(":password",d).removeAttr("disabled");this.parent("submitForm",b,c)};a.pkp.controllers.grid.settings.user.form.UserDetailsFormHandler.prototype.setGenerateRandom=function(b){var b=a(b),c=this.getHtmlElement(),d="",e=0;b.prop("checked")?(d="********",e="disabled"):e=d="";a(":password",c).prop("disabled",e).val(d);a('[id^="sendNotify"]',c).attr("disabled",e).prop("checked",
e)}})(jQuery);(function(a){a.pkp.controllers.grid.settings.roles=a.pkp.controllers.grid.settings.roles||{form:{}};a.pkp.controllers.grid.settings.roles.form.UserGroupFormHandler=function(b,c){var d=a('[id^="roleId"]',b);this.parent(b,c);c.selfRegistrationRoleIds&&(this.selfRegistrationRoleIds_=c.selfRegistrationRoleIds);c.recommendOnlyRoleIds&&(this.recommendOnlyRoleIds_=c.recommendOnlyRoleIds);this.roleForbiddenStages_=c.roleForbiddenStagesJSON.content;this.stagesSelector_=c.stagesSelector;this.updatePermitSelfRegistration(d.val());
this.updateStageOptions(d.val());this.updateRecommendOnly(d.val());d.change(this.callbackWrapper(this.changeRoleId))};a.pkp.classes.Helper.inherits(a.pkp.controllers.grid.settings.roles.form.UserGroupFormHandler,a.pkp.controllers.form.AjaxFormHandler);a.pkp.controllers.grid.settings.roles.form.UserGroupFormHandler.prototype.selfRegistrationRoleIds_=null;a.pkp.controllers.grid.settings.roles.form.UserGroupFormHandler.prototype.roleForbiddenStages_=null;a.pkp.controllers.grid.settings.roles.form.UserGroupFormHandler.prototype.stagesSelector_=
null;a.pkp.controllers.grid.settings.roles.form.UserGroupFormHandler.prototype.changeRoleId=function(b){b=a(b).val();this.updatePermitSelfRegistration(b);this.updateStageOptions(b);this.updateRecommendOnly(b)};a.pkp.controllers.grid.settings.roles.form.UserGroupFormHandler.prototype.updatePermitSelfRegistration=function(b){var c=a('[id^="permitSelfRegistration"]');this.getHtmlElement();var d,e=!1;for(d=0;d").val(f[h].id).text(f[h].name))}return!1};a.pkp.controllers.statistics.ReportGeneratorFormHandler.prototype.currentTimeElementsClickHandler_=
function(){this.dateRangeElementsWrapper_.hide();return!0};a.pkp.controllers.statistics.ReportGeneratorFormHandler.prototype.rangeTimeElementsClickHandler_=function(b){var c=a(this.startDayElementSelector_).add(this.endDayElementSelector_);this.dateRangeElementsWrapper_.show();"#"+a(b).attr("id")==this.rangeByDaySelector_&&c.show();"#"+a(b).attr("id")==this.rangeByMonthSelector_&&c.hide();return!0};a.pkp.controllers.statistics.ReportGeneratorFormHandler.prototype.aggregationOptionsChangeHandler_=
function(b){var c;c=a(this.columnsSelector_);b=a(b);c=c.find('option[value="'+b.attr("value")+'"]');b.is(":checked")?c.attr("selected","selected"):c.removeAttr("selected");return!1};a.pkp.controllers.statistics.ReportGeneratorFormHandler.prototype.addOptionalColumnsClass_=function(){var b,c,d,e;d=a(this.columnsSelector_);e=a(this.aggregationOptionsSelector_);c=a("#orderByFormArea select",this.getHtmlElement());d=d.add(c);c=this.optionalColumns_;for(b in c)d.find('option[value="'+b+'"]').addClass("optionalColumn"),
e.filter('input[value="'+b+'"]').parent().addClass("optionalColumn")}})(jQuery);(function(a){a.pkp.controllers.dashboard=a.pkp.controllers.dashboard||{form:{}};a.pkp.controllers.dashboard.form.DashboardTaskFormHandler=function(b,c){this.parent(b,c);this.singleContextSubmissionUrl_=c.singleContextSubmissionUrl;a("#singleContext",b).click(this.callbackWrapper(this.startSingleContextSubmission_));a("#multipleContext",b).change(this.callbackWrapper(this.startMultipleContextSubmission_))};a.pkp.classes.Helper.inherits(a.pkp.controllers.dashboard.form.DashboardTaskFormHandler,a.pkp.controllers.form.FormHandler);
a.pkp.controllers.dashboard.form.DashboardTaskFormHandler.prototype.singleContextSubmissionUrl_=null;a.pkp.controllers.dashboard.form.DashboardTaskFormHandler.prototype.startSingleContextSubmission_=function(){window.location.href=this.singleContextSubmissionUrl_};a.pkp.controllers.dashboard.form.DashboardTaskFormHandler.prototype.startMultipleContextSubmission_=function(){var a=this.getHtmlElement().find("#multipleContext").val();0!=a&&(window.location.href=a)}})(jQuery);(function(a){a.pkp.pages=a.pkp.pages||{header:{}};a.pkp.pages.header.HeaderHandler=function(a,c){this.options_=c;this.parent(a,c)};a.pkp.classes.Helper.inherits(a.pkp.pages.header.HeaderHandler,a.pkp.classes.Handler);a.pkp.pages.header.HeaderHandler.prototype.options_=null})(jQuery);(function(a){a.pkp.pages.header.TasksHandler=function(b,c){this.options_=c;this.parent(b,c);a("#notificationsToggle").click(this.callbackWrapper(this.appendToggleIndicator_));this.bind("updateUnreadNotificationsCount",this.fetchUnreadNotificationsCountHandler_)};a.pkp.classes.Helper.inherits(a.pkp.pages.header.TasksHandler,a.pkp.classes.Handler);a.pkp.pages.header.TasksHandler.prototype.options_=null;a.pkp.pages.header.TasksHandler.prototype.appendToggleIndicator_=function(){var a=this.getHtmlElement(),
c=a.find("#notificationsPopover"),d=a.find("#notificationsToggle");c.toggle();d.toggleClass("expandedIndicator");d.hasClass("expandedIndicator")?(this.trigger("callWhenClickOutside",[{container:a,callback:this.callbackWrapper(this.appendToggleIndicator_)}]),setTimeout(this.callbackWrapper(this.setPopoverSize_),500)):c.css("height","").css("overflow-y","")};a.pkp.pages.header.TasksHandler.prototype.setPopoverSize_=function(){var b=this.getHtmlElement().find("#notificationsPopover"),c=a(window).height()-
60;cthis.blindReviewerIds_.indexOf(b)))b=
{title:"",okButton:this.blindReviewerWarningOk_,cancelButton:!1,dialogText:this.blindReviewerWarning_},a('').pkpHandler("$.pkp.controllers.modal.ConfirmationModalHandler",b)};a.pkp.controllers.grid.users.stageParticipant.form.StageParticipantNotifyHandler.prototype.handleResponse=function(b,c){a.pkp.classes.Handler.getHandler(a("#queriesGrid .pkp_controllers_grid")).trigger("dataChanged");return this.parent("handleResponse",
b,c)}})(jQuery);(function(a){a.pkp.controllers.grid.users.stageParticipant.form.AddParticipantFormHandler=function(b,c){this.parent(b,c);a("select[name^='filterUserGroupId']",b).change(this.callbackWrapper(this.addUserGroupId));a("input[name='userId']").click(function(){var b=a("input[name='userId']:checked").val();a("input[name='userIdSelected']").val(b).trigger("change")});this.addUserGroupId()};a.pkp.classes.Helper.inherits(a.pkp.controllers.grid.users.stageParticipant.form.AddParticipantFormHandler,a.pkp.controllers.form.ClientFormHandler);
a.pkp.controllers.grid.users.stageParticipant.form.AddParticipantFormHandler.prototype.addUserGroupId=function(){var b=this.getHtmlElement().find("select[name^='filterUserGroupId']").val();a("input[name='userGroupId']").val(b).trigger("change")}})(jQuery);(function(a){a.pkp.pages.reviewer=a.pkp.pages.reviewer||{};a.pkp.pages.reviewer.ReviewerTabHandler=function(a,c){this.parent(a,c);this.reviewStep_=c.reviewStep;this.bind("setStep",this.setStepHandler);this.getHtmlElement().tabs("option","disabled",this.getDisabledSteps(this.reviewStep_))};a.pkp.classes.Helper.inherits(a.pkp.pages.reviewer.ReviewerTabHandler,a.pkp.controllers.TabHandler);a.pkp.pages.reviewer.ReviewerTabHandler.prototype.reviewStep_=null;a.pkp.pages.reviewer.ReviewerTabHandler.prototype.setStepHandler=
function(a,c,d){this.getHtmlElement().tabs("option","disabled",this.getDisabledSteps(d));this.getHtmlElement().tabs("option","active",d-1)};a.pkp.pages.reviewer.ReviewerTabHandler.prototype.getDisabledSteps=function(a){switch(a){case 1:return[1,2,3];case 2:return[2,3];case 3:return[3];case 4:return[]}throw Error("Illegal review step number.");}})(jQuery);(function(a){a.pkp.pages.authorDashboard=a.pkp.pages.authorDashboard||{};a.pkp.pages.authorDashboard.SubmissionEmailHandler=function(a,c){this.parent(a,c);a.find('a[id^="submissionEmail"]').click(this.callbackWrapper(this.activateAction))};a.pkp.classes.Helper.inherits(a.pkp.pages.authorDashboard.SubmissionEmailHandler,a.pkp.controllers.linkAction.LinkActionHandler)})(jQuery);(function(a){a.pkp.controllers.grid.articleGalleys=a.pkp.controllers.grid.articleGalleys||{};a.pkp.controllers.grid.articleGalleys.ArticleGalleyGridHandler=function(a,c){this.parent(a,c);a.bind("uploadFile",this.callbackWrapper(this.uploadFileHandler_))};a.pkp.classes.Helper.inherits(a.pkp.controllers.grid.articleGalleys.ArticleGalleyGridHandler,a.pkp.controllers.grid.GridHandler);a.pkp.controllers.grid.articleGalleys.ArticleGalleyGridHandler.prototype.uploadFileHandler_=function(b,c,d){setTimeout(function(){a('a[id^="component-grid-articlegalleys-articlegalleygrid-row-'+
d+'-addFile-button-"]').click()},0)}})(jQuery);(function(a){a.pkp.controllers.grid.issues=a.pkp.controllers.grid.issues||{};a.pkp.controllers.grid.issues.BackIssueGridHandler=function(a,c){this.parent(a,c);this.bindGlobal("issuePublished",this.refreshGridHandler)};a.pkp.classes.Helper.inherits(a.pkp.controllers.grid.issues.BackIssueGridHandler,a.pkp.controllers.grid.GridHandler)})(jQuery);(function(a){a.pkp.controllers.grid.issues.FutureIssueGridHandler=function(a,c){this.parent(a,c);this.bindGlobal("issueUnpublished",this.refreshGridHandler)};a.pkp.classes.Helper.inherits(a.pkp.controllers.grid.issues.FutureIssueGridHandler,a.pkp.controllers.grid.GridHandler)})(jQuery);(function(a){a.pkp.controllers.tab.issueEntry=a.pkp.controllers.tab.issueEntry||{};a.pkp.controllers.tab.issueEntry.IssueEntryTabHandler=function(a,c){c.selectedGalleyId&&(c.selected=this.getTabPositionByGalleyId_(c.selectedGalleyId,a));this.parent(a,c);this.bind("gridRefreshRequested",this.gridRefreshRequested);c.tabsUrl&&(this.tabsUrl_=c.tabsUrl);c.tabContentUrl&&(this.tabContentUrl_=c.tabContentUrl);this.bind("gridInitialized",this.addGalleysGridRowActionHandlers_);this.publishEvent("gridInitialized")};
a.pkp.classes.Helper.inherits(a.pkp.controllers.tab.issueEntry.IssueEntryTabHandler,a.pkp.controllers.TabHandler);a.pkp.controllers.tab.issueEntry.IssueEntryTabHandler.prototype.tabContentUrl_=null;a.pkp.controllers.tab.issueEntry.IssueEntryTabHandler.prototype.gridRefreshRequested=function(b,c){a(c.target).attr("id").match(/^galleysGridContainer/)&&(this.tabsUrl_&&this.tabContentUrl_)&&(this.getHtmlElement(),a.get(this.tabsUrl_,null,this.callbackWrapper(this.updateTabsHandler_),"json"))};a.pkp.controllers.tab.issueEntry.IssueEntryTabHandler.prototype.updateTabsHandler_=
function(a,c){var d=this.handleJson(c),e=this.getHtmlElement(),f=e.find("li a"),h={},j=/galley(\d+)/,i,n,k;for(n=0;n");
return this}})(jQuery);