From c91b962226bd00e59c043d0e398a8db9d050415d Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Mon, 28 Dec 2009 00:39:21 +0100 Subject: First attempt to get HTML5 working; no luck! --- bugzillaBugTriage.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'bugzillaBugTriage.js') diff --git a/bugzillaBugTriage.js b/bugzillaBugTriage.js index 1bfb563..4c23b90 100644 --- a/bugzillaBugTriage.js +++ b/bugzillaBugTriage.js @@ -4,7 +4,8 @@ // http://www.opensource.org/licenses/mit-license.php /* FIXME - - password dialog for password prompt + - settings to https://wiki.mozilla.org/Labs/Jetpack/JEP/24 instead of + jetpack.storage.simple; make conversion from the current system */ "use strict"; @@ -31,11 +32,22 @@ var myConfig = jetpack.storage.simple; var badMIMEArray = ["application/octet-stream","text/x-log","undefined"]; //============================================================== -// CONFIGURE: The easiest method how to set up the configuration +// FIXME CONFIGURE: The easiest method how to set up the configuration // value is to uncomment the following line with proper URL as // the second parameter. Then reload the bug page and comment out // again. -// myConfig.JSONURL = "URL-somewhere-with-your-JSON"; +var manifest = { + settings: [ + { name: "BZpassword", type: "password", label: "Bugzilla password" }, + { name: "JSONURL", type: "text", label: "Configuration file URL", + default: "http://mcepl.fedorapeople.org/scripts/BugZappers_data.json" } + ] +}; +jetpack.future.import("storage.settings"); +//if (!jetpack.storage.settings.BZpassword) { +// jetpack.settings.open(); +//} + var jsonDataURL = myConfig.JSONURL ? myConfig.JSONURL : "http://mcepl.fedorapeople.org/scripts/BugZappers_data.json"; var PCIIDsURL = "http://mcepl.fedorapeople.org/scripts/drm_pciids.json"; @@ -996,7 +1008,7 @@ BzPage.prototype.callBack = function(data,textStatus) { * @param login string with login * @param password string with password * @param attachID Number with the attachment ID# - * @param mimeType string with MIME type, optional and defaults to text/plain + * @param mimeType stri ng with MIME type, optional and defaults to text/plain * @param email Boolean whether we should send email or not * @return string with the XML-RPC message -- cgit