Files
aowow/setup/tools/filegen/templates/searchbox.js.in
Sarjuuk feaee59cd0 - converted articles for MorePages to use STATIC_URL (also neutralized some self-references)
- added config-option to restrict available locales
- fixed opensearch suggestions by generating strict json
- include TalentCalc.css as lowerCase (fixes display under *nix)
- some minor formating
- Setup:
 * added some additional files to be generated (they required STATIC_URL or HOST_URL to be set)
 * moved class Locale from global.js to own template and generate it with CFG_LOCALES
 * changed urlParam (?build=script): may be empty (builds everything) or specific scriptNames chained together with ; (?build=script1;script2)

you are required to run the following command to regenerate files affected by these cahnges
?build=demo;power;realmMenu;searchboxBody;searchboxScript;searchplugin;locales
2014-09-13 23:26:01 +02:00

36 lines
963 B
JavaScript

(function () {
function create(w, h) {
var body = 'STATIC_URL/widgets/searchbox/searchbox.html';;
var buff = '<iframe src="' + body + '" width="' + w + '" height="' + h + '" frameborder="0" class="aowow-searchbox"';
buff += "></iframe>";
document.write(buff);
}
function init() {
var formats = {
"160x200": { width: 160, height: 200 },
"160x120": { width: 160, height: 120 },
"120x200": { width: 120, height: 200 },
"120x120": { width: 120, height: 120 },
"150x120": { width: 150, height: 120 }
};
var dim;
if (typeof aowow_searchbox_format != "undefined") {
if (formats[aowow_searchbox_format]) {
dim = formats[aowow_searchbox_format];
}
}
if (!dim) {
dim = formats["160x200"];
}
create(dim.width, dim.height);
}
init();
})();