-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor changes to make mozilla validator happy.
- Loading branch information
Showing
3 changed files
with
75 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,90 @@ | ||
noojeeClick.ns(function() { with (noojeeClick.LIB) { | ||
|
||
theApp.quickpicks = | ||
noojeeClick.ns(function() | ||
{ | ||
|
||
this.reloadQuickPicks = function() | ||
with (noojeeClick.LIB) | ||
{ | ||
setBoolValue("clidquickpick.reload", true); | ||
} | ||
|
||
this.retrieveQuickPicks = function() | ||
{ | ||
if (getBoolValue("clidquickpick.reload")) | ||
theApp.quickpicks = | ||
{ | ||
setBoolValue("clidquickpick.reload", false); | ||
var quickPickUrl = getValue("clidquickpick.url"); | ||
|
||
ns_debug("quickpicks", "retrieving CLID quickpicks: url=" + quickPickUrl); | ||
var xmlhttp; | ||
xmlhttp = new XMLHttpRequest(); | ||
|
||
// setup the call back handler | ||
xmlhttp.onreadystatechange = function() | ||
|
||
reloadQuickPicks : function() | ||
{ | ||
try | ||
setBoolValue("clidquickpick.reload", true); | ||
}, | ||
|
||
retrieveQuickPicks : function() | ||
{ | ||
if (getBoolValue("clidquickpick.reload")) | ||
{ | ||
ns_debug("quickpicks", "readstate changed state=" + xmlhttp.readyState); | ||
|
||
if (xmlhttp.readyState == 4) | ||
setBoolValue("clidquickpick.reload", false); | ||
var quickPickUrl = getValue("clidquickpick.url"); | ||
|
||
ns_debug("quickpicks", "retrieving CLID quickpicks: url=" + quickPickUrl); | ||
var xmlhttp; | ||
xmlhttp = new XMLHttpRequest(); | ||
|
||
// setup the call back handler | ||
xmlhttp.onreadystatechange = function() | ||
{ | ||
if (xmlhttp.status == 200) | ||
try | ||
{ | ||
// We have a success so lets load the pick list and save | ||
// it to properties. | ||
|
||
var xmlResponse = xmlhttp.responseXML; | ||
ns_debug("quickpicks", "quickpicks recieved: data=" + xmlResponse); | ||
|
||
var quickPicks = xmlResponse.getElementsByTagName('clid-quick-pick'); | ||
|
||
var count = quickPicks.length; | ||
ns_debug("quickpicks", "quickpicks count: " + count); | ||
setValue("clidquickpick.count", count); | ||
|
||
for ( var i = 0; i < count; i++) | ||
ns_debug("quickpicks", "readstate changed state=" + xmlhttp.readyState); | ||
|
||
if (xmlhttp.readyState == 4) | ||
{ | ||
var name = quickPicks[i].getAttribute("name"); | ||
var clid = quickPicks[i].getAttribute("clid"); | ||
|
||
ns_debug("quickpicks", "received quickpick: " + name + ", " + clid); | ||
setValue("clidquickpick.pick-" + i + "-name", name); | ||
setValue("clidquickpick.pick-" + i + "-clid", clid); | ||
if (xmlhttp.status == 200) | ||
{ | ||
// We have a success so lets load the pick list and | ||
// save | ||
// it to properties. | ||
|
||
var xmlResponse = xmlhttp.responseXML; | ||
ns_debug("quickpicks", "quickpicks recieved: data=" + xmlResponse); | ||
|
||
var quickPicks = xmlResponse.getElementsByTagName('clid-quick-pick'); | ||
|
||
var count = quickPicks.length; | ||
ns_debug("quickpicks", "quickpicks count: " + count); | ||
setValue("clidquickpick.count", count); | ||
|
||
for ( var i = 0; i < count; i++) | ||
{ | ||
var name = quickPicks[i].getAttribute("name"); | ||
var clid = quickPicks[i].getAttribute("clid"); | ||
|
||
ns_debug("quickpicks", "received quickpick: " + name + ", " + clid); | ||
setValue("clidquickpick.pick-" + i + "-name", name); | ||
setValue("clidquickpick.pick-" + i + "-clid", clid); | ||
} | ||
} | ||
else | ||
{ | ||
ns_debug("quickpicks", "An error occured attempting to retrieve the CLID Quick Pick list. " + xmlhttp.responseXML); | ||
} | ||
|
||
ns_debug("quickpicks", "exiting state=" + xmlhttp.readyState); | ||
// Flag that the menu needs to be reloaded. | ||
setBoolValue("clidquickpick.reset", "true"); | ||
} | ||
} | ||
else | ||
} catch (e) | ||
{ | ||
ns_debug("quickpicks", "An error occured attempting to retrieve the CLID Quick Pick list. " + xmlhttp.responseXML); | ||
ns_debug("quickpicks", "exception " + e); | ||
} | ||
|
||
ns_debug("quickpicks", "exiting state=" + xmlhttp.readyState); | ||
// Flag that the menu needs to be reloaded. | ||
setBoolValue("clidquickpick.reset", "true"); | ||
} | ||
} catch (e) | ||
{ | ||
ns_debug("quickpicks", "exception " + e); | ||
}; | ||
|
||
ns_debug("quickpicks", "calling open on url"); | ||
xmlhttp.open("GET", quickPickUrl, true); | ||
|
||
// xmlhttp.open("GET", quickPickUrl + ((/\?/).test(url) ? "&" : "?") | ||
// + | ||
// (new Date()).getTime(), true); | ||
// xmlhttp.withCredentials = "true"; | ||
ns_debug("quickpicks", "calling send on url"); | ||
xmlhttp.send(); | ||
ns_debug("quickpicks", "calling send complete"); | ||
} | ||
}; | ||
|
||
ns_debug("quickpicks", "calling open on url"); | ||
xmlhttp.open("GET", quickPickUrl, true); | ||
|
||
// xmlhttp.open("GET", quickPickUrl + ((/\?/).test(url) ? "&" : "?") + | ||
// (new Date()).getTime(), true); | ||
// xmlhttp.withCredentials = "true"; | ||
ns_debug("quickpicks", "calling send on url"); | ||
xmlhttp.send(); | ||
ns_debug("quickpicks", "calling send complete"); | ||
} | ||
}; | ||
|
||
|
||
}; | ||
|
||
|
||
}; | ||
|
||
}}); |