--- /dev/null
+[{"label":"Porter la vie","publications":[{"id":"11461","label":"Porter la vie","online":false},{"id":"11556","label":"Nieuw leven dragen","online":false}]},{"label":"Premi\u00e8re ann\u00e9e","publications":[{"id":"11558","label":"Premi\u00e8re ann\u00e9e","online":false},{"id":"11559","label":"Mijn eerste levensjaar","online":false}]},{"label":"Guide sant\u00e9","publications":[{"id":"11652","label":"Guide sant\u00e9","online":false},{"id":"11653","label":"De gezondheidsgids","online":false}]}]
\ No newline at end of file
\r
$res.='<h3>' . __('Paramètres avancés') . '</h3>';\r
$res.='<table class="max">';\r
+ $res.='<tr><td class="min nowrap">' . __('Full offline') . '</td><td>' . form::checkbox(array('settings[offline]', 'offline'), 1, $collection->settings['offline']) . '</td></tr>';\r
$res.='<tr><td class="min nowrap">' . __('Version phonegap') . '</td><td>' . form::combo(array('settings[phonegap]', 'phonegap'), $phonegapVersions, $collection->settings['phonegap']) . '</td></tr>';\r
$res.='<tr><td class="min nowrap">' . __('Identifiant de l\'application') . '</td><td>' . form::field(array('settings[namespace]', 'namespace'), 64, 64, $collection->settings['namespace']) . '</td></tr>';\r
$res.='<tr><td class="min nowrap">' . __('Certificat APNS') . ' Dev (' . __('Fichier .pem') . ')</td><td><input type="file" name="apns_dev" /></td></tr>';\r
public $collectionId, $collection;
public $assets;
- public $dir, $vdir, $wdir, $sdir;
+ public $dir, $vdir, $wdir, $sdir, $verdir;
public $os;
public $phonegapVersion;
public $langs;
$this->vdir = $this->dir = WS_COLLECTIONS . '/app/' . $this->collectionId . '/';
$this->wdir = WS_COLLECTIONS . '/working/' . $this->collectionId;
$this->sdir = WS_COMPILE_ASSETS . '/_html5app/';
-
- if(file_exists($this->vdir)){
+ $this->verdir = WS_COLLECTIONS . '/versions/';
+
+ if (file_exists($this->vdir)) {
}
$config['couleurA'] = $this->collection->settings['couleurA'];
$config['couleurB'] = $this->collection->settings['couleurB'];
$config['couleurC'] = $this->collection->settings['couleurC'];
+ $config['offline'] = false;
+ if (isset($this->collection->settings['offline'])) {
+ $config['offline'] = $this->collection->settings['offline'];
+ }
+
+ if ($config['offline']) {
+ $c = json_decode(file_get_contents('http://workshop.fluidbook.com/services/collection/' . $this->collectionId . '/' . $this->os));
+ unset($c->manifest);
+ unset($c->manifestPub);
+ }
+ $config['collection'] = $c;
file_put_contents($this->vdir . '/data/app.js', 'DATAS = ' . CubeIT_Util_Json::encode($config) . ';');
}
}
- function writeConfig(){
- $xml=new simplexml_load_string('');
+ function writeConfig() {
+ $xml = new simplexml_load_string('');
}
-
+
function writeStyle() {
$c = array();
file_put_contents($this->vdir . '/data/app.css', implode("\n", $c));
}
+ public function getPublishedVersionPath($os) {
+ global $core;
+ $r = $core->con->select('SELECT compile_date FROM book_collection_compile WHERE collection_id=\'' . $this->collectionId . '\' AND online_' . $os . '=1');
+ while ($r->fetch()) {
+ return WS_COLLECTIONS . '/versions/' . $this->collectionId . '/' . $r->compile_date . '/' . $os . '/';
+ }
+ }
+
}
?>