}
content_params.new_tab = function(a,b,c) { return obj.new_tab(a,b,c); };
content_params.set_tab = function(a,b,c) { return obj.set_tab(a,b,c); };
+ content_params.open_external = function(a) { return obj.open_external(a); };
content_params.close_tab = function() { return obj.close_tab(); };
content_params.new_patron_tab = function(a,b) { return obj.new_patron_tab(a,b); };
content_params.set_patron_tab = function(a,b) { return obj.set_patron_tab(a,b); };
return frame;
},
+ 'open_external' : function(url) {
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+ // first construct an nsIURI object using the ioservice
+ var ioservice = Components.classes["@mozilla.org/network/io-service;1"]
+ .getService(Components.interfaces.nsIIOService);
+
+ var uriToOpen = ioservice.newURI(url, null, null);
+
+ var extps = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"]
+ .getService(Components.interfaces.nsIExternalProtocolService);
+
+ // now, open it!
+ extps.loadURI(uriToOpen, null);
+ },
+
'get_barcode' : function(window, context, barcode) {
JSAN.use('util.network');
JSAN.use('util.sound');
pref("extensions.getMoreExtensionsURL", "chrome://mozapps/locale/extensions/extensions.properties");
pref("extensions.getMoreThemesURL", "chrome://mozapps/locale/extensions/extensions.properties");
+// Allow opening of web stuff in external apps
+// suppress external-load warning for standard browser schemes
+pref("network.protocol-handler.warn-external.http", false);
+pref("network.protocol-handler.warn-external.https", false);
+pref("network.protocol-handler.warn-external.ftp", false);
//Place your helpdesk link here
function helpdesk(newtab) {
- loc = "http://evergreen-ils.org/communicate.php";
- var params = {'tab_name':'Evergreen Project Website'};
-
- if(newtab)
- xulG.new_tab(loc, params, {});
- else
- xulG.set_tab(loc, params, {});
+ xulG.open_external("http://evergreen-ils.org/communicate.php");
}
//A good place for a Google map. Evergreen Indiana uses GIS data to create a Google map to verify if a library is within district boundaries
onclick="try { helpdesk(false); } catch(E) { alert(E); }" alt=
"Submit A Helpdesk Ticket" /></td>
- <td><img class="newtabimg" src="skin/media/images/portal/newtab2.PNG" alt="Open in a new tab"
- onclick="try { helpdesk(true); } catch(E) { alert(E); }" /> <a href="#"
+ <td><a href="#"
onclick="try { helpdesk(false); } catch(E) { alert(E); }">&staff.client.portal.helpdesk;</a></td>
</tr>