diff --git a/js/controllers/grid/articleGalleys/ArticleGalleyGridHandler.js b/js/controllers/grid/articleGalleys/ArticleGalleyGridHandler.js index 835afdb6b4e..f43d5893d54 100644 --- a/js/controllers/grid/articleGalleys/ArticleGalleyGridHandler.js +++ b/js/controllers/grid/articleGalleys/ArticleGalleyGridHandler.js @@ -56,10 +56,13 @@ prototype.uploadFileHandler_ = function(sourceElement, event, rowId) { // FIXME: Inter-widget messaging is needed here. - setTimeout(function() { - $('a[id^="component-grid-articlegalleys-articlegalleygrid-row-' + rowId + - '-addFile-button-"]').click(); - }, 0); + var selector = 'a[id^="component-grid-articlegalleys-articlegalleygrid-row-' + + rowId + '-addFile-button-"]'; + $.when($(selector)).then(function() { + $(function() { + $(selector).click(); + }); + }); }; diff --git a/js/pkp.min.js b/js/pkp.min.js index 6f2ab52dd48..0108a5b457f 100644 --- a/js/pkp.min.js +++ b/js/pkp.min.js @@ -197,7 +197,7 @@ c);return!0};a.pkp.controllers.SiteHandler.prototype.processOutsideClickCheck_=f for(d in b.unsavedFormElements_)d&&c++;if(0e?(d=Math.ceil(d+a.height()-c.height()),0"):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, +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_));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.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('#menuItemTypeSection [for="menuItemType"]');a(".NMI_TYPE_CUSTOM_EDIT",this.getHtmlElement()).hide();a("#"+b).fadeIn();"undefined"!==typeof this.itemTypeDescriptions_[b]&&c.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()); @@ -428,8 +428,8 @@ a(b).prop("name")&&!c.is(":visible"))for(b=0;b').pkpHandler("$.pkp.controllers.modal.ConfirmationModalHandler",b)};a.pkp.controllers.grid.users.stageParticipant.form.StageParticipantNotifyHandler.prototype.handleResponse=function(b,c){var d=a("#queriesGrid .pkp_controllers_grid");a.pkp.classes.Handler.hasHandler(d)&&a.pkp.classes.Handler.getHandler(d).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")}; +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){var e='a[id^="component-grid-articlegalleys-articlegalleygrid-row-'+ +d+'-addFile-button-"]';a.when(a(e)).then(function(){a(function(){a(e).click()})})}})(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;nA ________________________________________________________________________
-{$ldelim} $contextName {$rdelim}]]>
+{$ldelim}$contextName{$rdelim}]]> diff --git a/plugins/importexport/crossref/filter/ArticleCrossrefXmlFilter.inc.php b/plugins/importexport/crossref/filter/ArticleCrossrefXmlFilter.inc.php index 5d9143dd9ff..5c6da6ae074 100644 --- a/plugins/importexport/crossref/filter/ArticleCrossrefXmlFilter.inc.php +++ b/plugins/importexport/crossref/filter/ArticleCrossrefXmlFilter.inc.php @@ -117,6 +117,7 @@ function createJournalArticleNode($doc, $submission) { $personNameNode->appendChild($node = $doc->createElementNS($deployment->getNamespace(), 'ORCID', $author->getData('orcid'))); } $contributorsNode->appendChild($personNameNode); + $isFirst = false; } $journalArticleNode->appendChild($contributorsNode); diff --git a/plugins/themes/default/DefaultThemePlugin.inc.php b/plugins/themes/default/DefaultThemePlugin.inc.php index 878629b12bd..f2f911554ca 100644 --- a/plugins/themes/default/DefaultThemePlugin.inc.php +++ b/plugins/themes/default/DefaultThemePlugin.inc.php @@ -153,8 +153,8 @@ public function init() { $jqueryUI = '//ajax.googleapis.com/ajax/libs/jqueryui/' . CDN_JQUERY_UI_VERSION . '/jquery-ui' . $min . '.js'; } else { // Use OJS's built-in jQuery files - $jquery = $request->getBaseUrl() . '/lib/pkp/lib/components/jquery/jquery' . $min . '.js'; - $jqueryUI = $request->getBaseUrl() . '/lib/pkp/lib/components/jquery-ui/jquery-ui' . $min . '.js'; + $jquery = $request->getBaseUrl() . '/lib/pkp/lib/vendor/components/jquery/jquery' . $min . '.js'; + $jqueryUI = $request->getBaseUrl() . '/lib/pkp/lib/vendor/components/jqueryui/jquery-ui' . $min . '.js'; } // Use an empty `baseUrl` argument to prevent the theme from looking for // the files within the theme directory