Skip to content

Commit

Permalink
Merge pull request #1351 from publishpress/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
agapetry authored Sep 25, 2024
2 parents 516e5aa + c0d3151 commit 6b10cfc
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 9 deletions.
26 changes: 19 additions & 7 deletions admin/rvy_post-block-edit.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,32 @@ jQuery(document).ready( function($) {

var rvyCreationDisabled = false;

$(document).on('click', 'div.postbox-container', function() {
$(document).on('click', 'div.postbox-container,div.acf-postbox', function() {
rvyCreationDisabled = true;
$('button.revision-approve').prop('disabled', 'disabled');
$('button.revision-schedule').prop('disabled', 'disabled');
$('a.revision-approve').attr('title', rvyObjEdit.actionDisabledTitle);
$('a.revision-schedule').attr('title', rvyObjEdit.scheduleDisabledTitle);
});

$(document).on('click', 'button.editor-post-publish-button', function() {
rvyCreationDisabled = false;
$('button.revision-approve').prop('disabled', false);
$('button.revision-schedule').prop('disabled', false);
$('a.revision-approve').attr('title', rvyObjEdit.actionTitle);
$('a.revision-schedule').attr('title', rvyObjEdit.scheduleTitle);
var intSaveWatch = setInterval(() => {
if (wp.data.select('core/editor').isSavingPost()) {
rvyCreationDisabled = false;
$('button.revision-approve').prop('disabled', false);
$('button.revision-schedule').prop('disabled', false);
$('a.revision-approve').attr('title', rvyObjEdit.actionTitle);
$('a.revision-schedule').attr('title', rvyObjEdit.scheduleTitle);
}
}, 5000);

$(document).on('click', 'button.editor-post-publish-button,button.editor-post-save-draft', function() {
setInterval(() => {
rvyCreationDisabled = false;
$('button.revision-approve').prop('disabled', false);
$('button.revision-schedule').prop('disabled', false);
$('a.revision-approve').attr('title', rvyObjEdit.actionTitle);
$('a.revision-schedule').attr('title', rvyObjEdit.scheduleTitle);
}, 2000);
});

var rvyIsAutosaveStarted = false;
Expand Down
2 changes: 1 addition & 1 deletion admin/rvy_post-block-edit.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions admin/rvy_revision-block-edit.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,24 @@ jQuery(document).ready(function ($) {
);
}

$(document).on('click', 'div.postbox-container,div.acf-postbox', function() {
rvyCreationDisabled = true;
$('button.revision-approve').prop('disabled', 'disabled');
$('button.revision-schedule').prop('disabled', 'disabled');
$('a.revision-approve').attr('title', rvyObjEdit.actionDisabledTitle);
$('a.revision-schedule').attr('title', rvyObjEdit.scheduleDisabledTitle);
});

var intSaveWatch = setInterval(() => {
if (wp.data.select('core/editor').isSavingPost()) {
rvyCreationDisabled = false;
$('button.revision-approve').prop('disabled', false);
$('button.revision-schedule').prop('disabled', false);
$('a.revision-approve').attr('title', rvyObjEdit.actionTitle);
$('a.revision-schedule').attr('title', rvyObjEdit.scheduleTitle);
}
}, 5000);

var rvyRedirectURL = '';

$(document).on('click', 'button.revision-approve', function () {
Expand Down
2 changes: 1 addition & 1 deletion admin/rvy_revision-block-edit.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6b10cfc

Please sign in to comment.