mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
menu more and tools
- 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
This commit is contained in:
37
static/widgets/searchbox/searchbox.js
Normal file
37
static/widgets/searchbox/searchbox.js
Normal file
@@ -0,0 +1,37 @@
|
||||
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";
|
||||
}
|
||||
Reference in New Issue
Block a user