Bug 7607: (follow-up) Disable rather than remove inputs
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
cc970464ec
commit
a508d3fcbe
|
|
@ -131,15 +131,16 @@ $.fn.selectTabByID = function (tabID) {
|
|||
/* Search results browsing */
|
||||
/* forms with action leading to search */
|
||||
$("form[action*='search.pl']").submit(function(){
|
||||
var removedPrior = false;
|
||||
var disabledPrior = false;
|
||||
$(".search_set").each(function(){
|
||||
if( removedPrior ){
|
||||
$(this).find('select[name="op"]').remove();
|
||||
removedPrior = false;
|
||||
if( disabledPrior ){
|
||||
$(this).find('select[name="op"]').prop("disabled","disabled");
|
||||
disabledPrior = false;
|
||||
}
|
||||
if( $(this).find('input[name="q"]').val() == "" ){
|
||||
$(this).remove();
|
||||
removedPrior = true;
|
||||
$(this).find('input').prop("disabled","disabled");
|
||||
$(this).find('select').prop("disabled","disabled");
|
||||
disabledPrior = true;
|
||||
}
|
||||
});
|
||||
resetSearchContext();
|
||||
|
|
|
|||
Loading…
Reference in New Issue