mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
- items: allow 'upg' to be an array - filter: fixed logic error in checks - Markup: prevent handling of [menu], as PageTemplate is nyi - Power: advanced features (hide reagents or sellprice; recoloring, renaming, iconizing of links) - search: side-icon for titles - smarty: added template-vars to cache (has to be fixed sooner or later) - identify as HTML5 (fixed a strange bug with displaced list-pegs) - removed several typos
38 lines
802 B
JavaScript
38 lines
802 B
JavaScript
var SearchBox = new function () {
|
|
function bindEvents() {
|
|
$("form.search").submit(onSubmit);
|
|
$("form.search a").attr("href", "javascript:;").click(onClick);
|
|
}
|
|
|
|
function onSubmit() {
|
|
var val = this.elements.search.value;
|
|
if (!$.trim(val)) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
function onClick() {
|
|
$("form.search").submit();
|
|
return false;
|
|
}
|
|
|
|
$(document).ready(bindEvents);
|
|
};
|
|
|
|
if (!Function.prototype.bind) {
|
|
Function.prototype.bind = function () {
|
|
var
|
|
c = this,
|
|
a = $WH.$A(arguments),
|
|
b = a.shift();
|
|
|
|
return function () {
|
|
return c.apply(b, a.concat($WH.$A(arguments)))
|
|
};
|
|
}
|
|
}
|
|
|
|
function isset(a) {
|
|
return typeof window[a] != "undefined";
|
|
}
|