Store metatype in advanced search #32781
This commit is contained in:
parent
59030d5c46
commit
5693bcb77d
|
@ -445,6 +445,9 @@ function select_metatype(elem)
|
|||
/* install callbacks */
|
||||
|
||||
$('.metatypes input').change(function() {
|
||||
var state = history.state || {};
|
||||
state.metatype = $(this).attr("value");
|
||||
history.replaceState(state, document.title);
|
||||
select_metatype($(this));
|
||||
update_portaltypes();
|
||||
return false;
|
||||
|
@ -530,4 +533,13 @@ function select_metatype(elem)
|
|||
$('div.close', window.parent.document).click();
|
||||
});
|
||||
|
||||
var history_state = history.state;
|
||||
if (history_state !== null) {
|
||||
if (history_state.metatype !== undefined) {
|
||||
var metatype = $('.metatypes [value="' + history_state.metatype + '"]');
|
||||
metatype.prop('checked', true);
|
||||
metatype.trigger('change');
|
||||
}
|
||||
}
|
||||
|
||||
}(jQuery));
|
||||
|
|
Reference in New Issue