MyBB Community Forums

Full Version: make spinner skinnable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
for next release could be usefull to users make their own theme to give the ability to them to skin the spinner (the nice div that appears when some ajax is running) as they wanna.

To do it the javascript have not to set style elements as background and border as it do (now) here in general.js:

		this.spinner = document.createElement("div");
		this.spinner.style.border = "1px solid #000000";
		this.spinner.style.background = "#FFFFFF";
		this.spinner.style.color = "#000000";
		this.spinner.style.position = "absolute";
		this.spinner.style.zIndex = 1000;
		this.spinner.style.textAlign = "center";
		this.spinner.style.verticalAlign = "middle";
		this.spinner.style.fontSize = "13px";

		this.spinner.innerHTML = "<br />"+image+"<br /><br /><strong>"+loading_text+"</strong>";
		this.spinner.style.width = this.width + "px";
		this.spinner.style.height = this.height + "px";
		this.spinner.style.top = top + "px";
		this.spinner.style.left = left + "px";
		this.spinner.id = "spinner";

by removing this style settings (only border, background ect, not dimensions and positioning, of course) in javascript the spinner can be skinned in css directly, following user style Big Grin