maj setup
This commit is contained in:
@@ -4,6 +4,19 @@
|
||||
"use strict";
|
||||
var towns = towns || {};
|
||||
|
||||
towns.lauch =()=>{
|
||||
|
||||
}
|
||||
towns.loadtpldata = () => {
|
||||
// adapte tpldata to template tpl
|
||||
const dataowner = apx.data.tpldata.setup;
|
||||
dataowner.alias=apx.data.headers.xalias;
|
||||
dataowner.auth = dataowner.alias=="anonymous";
|
||||
dataowner.devtown = dataowner.townId == "devfarm";
|
||||
if (dataowner.mayorid) dataowner.owner = dataowner.mayorid == dataowner.alias;
|
||||
console.log('Data return to template',dataowner)
|
||||
return dataowner;
|
||||
};
|
||||
towns.owntown = () => {
|
||||
|
||||
|
||||
// only the owner can give ownership to someone else
|
||||
|
||||
};
|
||||
|
@@ -0,0 +1,19 @@
|
||||
/*eslint no-undef:0*/
|
||||
/*eslint-env browser*/
|
||||
|
||||
"use strict";
|
||||
var tribes = tribes || {};
|
||||
|
||||
tribes.loadtpldata = () => {
|
||||
// adapte tpldata to template tpl
|
||||
const datahost = apx.data.tpldata.setup;
|
||||
datahost.offers=[{offerid:"Z",title:" Offre gratuite Max space 1Mo public"},{offerid:"A",title:" Max space 5Mo public"},{offerid:"B",title:" Max space 5Mo private for less than 100 Persons"},{offerid:"C",title:" Max space 500 Mo private for less than 100 Persons"},{offerid:"D",title:" Max space 2 Go private for less than 1000 Persons"}],
|
||||
datahost.alias=apx.data.headers.xalias;
|
||||
datahost.auth = datahost.alias=="anonymous";
|
||||
console.log('Data return to template',datahost)
|
||||
return datahost;
|
||||
};
|
||||
tribes.addspaceweb = ( offer,domain, appname,msg) => {
|
||||
// Request to a druid to host space web accessible from a domain to share tribes data /persons / ...
|
||||
alert('Under construction to send notification to druid to get an access')
|
||||
};
|
||||
|
Reference in New Issue
Block a user