Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated styling of the search and replace fields to match the rest of the script #373

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -669,19 +669,18 @@ public function ui() {
<div class="fields fields-large">
<div class="sr-boxes">
<div class="sr-box-0">
<div class="field field-medium">
<label for="search-0"><span class="label-text">replace</span> <span
class="hide-if-regex-off regex-left">/</span><input id="search-0" type="text"
placeholder="search for&hellip;"
value="<?php $this->esc_html_attr( $this->search,
true ); ?>"
name="search-0"/><span
class="hide-if-regex-off regex-right">/</span></label>
<label for="replace-0"><span class="label-text">with</span> <input id="replace-0"
type="text"
placeholder="replace with&hellip;"
value="<?php $this->esc_html_attr( $this->replace,
true ); ?>"
name="replace-0"/></label>
</div>
<div class="field field-medium">
<label for="replace-0"><span class="label-text">with</span>
<input id="replace-0" type="text" placeholder="replace with&hellip;" value="<?php $this->esc_html_attr( $this->replace, true ); ?>" name="replace-0"/></label></div>
</div>
</div>

Expand Down Expand Up @@ -1359,7 +1358,7 @@ public function html( $body ) {

@media only screen and (min-width: 1110px) {
.label-text {
display: inline;
display: block;
}

.fields-large label {
Expand Down Expand Up @@ -4692,16 +4691,16 @@ function containsSerialisedString(text) {
add_search: function () {
var $row = $('.sr-boxes');
$new_search = $('<div class="sr-box-' + t.searches + '"></div>').appendTo($row);
$('<label for="search-' + t.searches + '"><span class="label-text">replace</span> ' +
$('<div class="field field-medium"><label for="search-' + t.searches + '"><span class="label-text">replace</span> ' +
'<span class="hide-if-regex-off regex-left">/</span>' +
'<input id="search-' + t.searches + '" type="text" placeholder="search for&hellip;" ' +
'value="<?php $this->esc_html_attr( $this->search,
true ); ?>" name="search-' + t.searches + '"/> ' +
'<span class="hide-if-regex-off regex-right">/</span></label> ' +
'<span class="hide-if-regex-off regex-right">/</span></label> ' + '</div><div class="field field-medium">' +
'<label for="replace-' + t.searches + '"><span class="label-text">with </span>' +
'<input id="replace-' + t.searches + '" type="text" placeholder="replace with&hellip;"' +
'value="<?php $this->esc_html_attr( $this->replace,
true ); ?>" name="replace-' + t.searches + '"/></label>').appendTo($new_search);
true ); ?>" name="replace-' + t.searches + '"/></label></div>').appendTo($new_search);

if (t.searches == 1)
dom.removeClass('multisearch-off');
Expand Down