Bug 14189: Use keep_text for the authority header
includes/authorities-search.inc already used the same behavior but with another method. For consistency it's better to have only 1 way to do that. Test plan: Go on the authority home page Fill the input in the header and click on tab 'search all headings' and 'keyword search' and confirm that the text you have filled is kept. I tested after applying the patch and the text is kept after removing the part from authorities-search.inc. I also tried applying that jQuery solution instead of my JS loop but could not get it to work for the other pages with a reasonable ammount of effort. Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Eivin Giske Skaaren <eskaaren@yahoo.no> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
c656cff676
commit
2d877b93d6
|
|
@ -14,11 +14,6 @@
|
|||
$("#header_search").tabs( "option", "selected", 2 );
|
||||
}
|
||||
}
|
||||
$("#header_search input[type='text'], #header_search select").change(function() {
|
||||
var myname = $(this).attr("name");
|
||||
var myval = $(this).val();
|
||||
$("#header_search [name='" + myname + "']").val(myval);
|
||||
});
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
|
|
@ -58,7 +53,7 @@
|
|||
<option value="is">is exactly</option>
|
||||
[% END %]
|
||||
</select>
|
||||
<input id="value_mainentry" type="text" name="value" value="[% value | html%]" />
|
||||
<input id="value_mainentry" type="text" name="value" value="[% value | html%]" class="head-searchbox" />
|
||||
<select name="orderby">
|
||||
[% IF ( orderby == 'HeadingAsc' ) %]
|
||||
<option value="HeadingAsc" selected="selected">Heading A-Z</option>
|
||||
|
|
@ -112,7 +107,7 @@
|
|||
<option value="is">is exactly</option>
|
||||
[% END %]
|
||||
</select>
|
||||
<input id="value_matchheading" type="text" name="value" value="[% value | html %]" />
|
||||
<input id="value_matchheading" type="text" name="value" value="[% value | html %]" class="head-searchbox" />
|
||||
<select name="orderby">
|
||||
[% IF ( orderby == 'HeadingAsc' ) %]
|
||||
<option value="HeadingAsc" selected="selected">Heading A-Z</option>
|
||||
|
|
@ -168,7 +163,7 @@
|
|||
<option value="is">is exactly</option>
|
||||
[% END %]
|
||||
</select>
|
||||
<input id="value_anywhere" type="text" name="value" value="[% value | html %]" />
|
||||
<input id="value_anywhere" type="text" name="value" value="[% value | html %]" class="head-searchbox" />
|
||||
<select name="orderby">
|
||||
[% IF ( orderby == 'HeadingAsc' ) %]
|
||||
<option value="HeadingAsc" selected="selected">Heading A-Z</option>
|
||||
|
|
@ -190,9 +185,9 @@
|
|||
</form>
|
||||
</div>
|
||||
<ul>
|
||||
<li><a href="#main_heading">Search main heading</a></li>
|
||||
<li><a href="#matchheading_search">Search all headings</a></li>
|
||||
<li><a href="#all_headings">Keyword search</a></li>
|
||||
<li><a onclick="keep_text(0)" href="#main_heading">Search main heading</a></li>
|
||||
<li><a onclick="keep_text(1)" href="#matchheading_search">Search all headings</a></li>
|
||||
<li><a onclick="keep_text(2)" href="#all_headings">Keyword search</a></li>
|
||||
</ul>
|
||||
</div><!-- /header_search -->
|
||||
</div><!-- /gradient -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue