/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ function openScreen(id) { $('#content-frame').fadeOut('fast', function () { $('#content-frame').load("pages/" + id + ".html", function () { $('#content-frame').fadeIn('fast', function () { }); }); }); } function getApps(callback) { $.post(accounthubapi, { key: apikey, action: "listapps" }, function (resp) { if (resp.status == "OK") { callback(resp.apps); } else { alert(resp.msg); } }, "json"); } var msgtimeout = null; function showmsg(text, style, details, timeout) { if (timeout == null) { timeout = 5 * 1000; } if (details == null) { details = ""; } else { details = "

" + details + "

"; } if (style == null) { style = "info"; } $("#alert-box") .hide() .html('') .fadeIn("fast"); clearTimeout(msgtimeout); if (timeout !== false) { msgtimeout = setTimeout(function () { $("#alert-box").fadeOut("fast"); }, timeout); } }