-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #350 from 10up/feat/issue-98
Quick Edit and Bulk edit
- Loading branch information
Showing
5 changed files
with
120 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,4 +51,6 @@ | |
padding: 8px 16px; | ||
} | ||
|
||
|
||
.margin-top-0 { | ||
margin-top: 0 !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
(function ($) { | ||
$('[id^="cb-select-all-"]').on('click', function () { | ||
var isChecked = $(this).prop('checked'); | ||
|
||
// Check or uncheck all row checkboxes. | ||
$('tbody .check-column input[type="checkbox"]').prop('checked', isChecked); | ||
|
||
// Synchronize all the bulk select checkboxes. | ||
$('[id^="cb-select-all-"]').prop('checked', isChecked); | ||
}); | ||
}(jQuery)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
( function ($) { | ||
$( function () { | ||
const wpInlineEditor = inlineEditPost.edit; | ||
|
||
inlineEditPost.edit = function (id) { | ||
|
||
wpInlineEditor.apply(this, arguments); | ||
|
||
var postId = 0; | ||
if (typeof (id) === 'object') { | ||
postId = parseInt(this.getId(id)); | ||
} | ||
|
||
if (postId != 0) { | ||
var editRow = $('#edit-' + postId); | ||
var postRow = $('#post-' + postId); | ||
|
||
var statusCode = $('.srm_redirect_rule_status_code', postRow).text(); | ||
var forceHttps = $('.srm_redirect_rule_force_https', postRow).text(); | ||
|
||
$('select[name="srm_redirect_rule_status_code"]', editRow).val(statusCode); | ||
if ('x' !== forceHttps) { | ||
$('input[name="srm_redirect_rule_force_https"]', editRow).prop('checked', true); | ||
} | ||
} | ||
} | ||
} ); | ||
}(jQuery) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters