
// ￼?uri=sc:sm:appMake￼
Components.utils.import("chrome://scenariCommons/content/commons/actions.jsm");
Components.utils.import("chrome://scenariWsp/content/commons/servers.jsm");




var actionProxyCfg = new actions.Action("actionProxyCfg").setGroup("adminApp").setDisplayScore(0).setLabel("￼Paramétrer la connexion à internet￼");
actionProxyCfg.execute = function(pEvent, pContext){
	var vLaunchContext = {
		prefCdList : "pref:prefDesk.xul:connexion",
		windowTitle : "￼Paramètres de connexion￼"
    };
	ui.openDialog(pContext.window, "chrome://scenariCore/content/desks/prefDesk/prefDesk.xul", "scenari:preferences", "chrome,centerscreen,titlebar,toolbar,alwaysRaised", vLaunchContext).focus();
};
extPoints.registerSvcByInst("actionProxyCfg", 21, actionProxyCfg);
extPoints.addSvcToList("tools:homeDesk:app", "actionProxyCfg", 11, "actionProxyCfg", 1);


var actionAddSrv = new actions.Action("actionAddSrv").setGroup("adminApp").setLabel("￼Ajouter un entrepôt distant￼").setIcon("chrome://scenariWsp/content/views/serversView/ico16/addSrv.png");
actionAddSrv.execute = function(pEvent, pContext){
	var vLaunchContext = {
		svcClass : "ScServer",
		callbackOnCreate : function(pServer) {
			if(pServer) {
				var vSrvControler = pContext.window.desk.getController("ServersViewController");
				if(vSrvControler) vSrvControler.showServer(pServer);
			}
		},
		thisForCbOnCreate : this
    };
	ui.openDialog(pContext.window, "chrome://scenariWspAdmin/content/desks/createServerDesk/createServerDesk.xul", "", "chrome, resizable, centerscreen, dialog=no", vLaunchContext);
	
};
actionAddSrv.findDisplayScore = function(pContext, pCb, pCbThis){
	var vScServer = servers.getRegistry().findServers(function(pServer){
		return pServer.getServerClassName()=="ScServer";
	});
	if(pCb) pCb.call(pCbThis, vScServer==0 ? 90 : 0);
};
extPoints.registerSvcByInst("actionAddSrv", 21, actionAddSrv);
extPoints.addSvcToList("tools:homeDesk:app", "actionAddSrv", 11, "actionAddSrv", 1);
// ￼￼