$book = $books[$p->id];
$root = WS_COLLECTIONS . '/versions/' . $id . '/' . $version . '/' . $os . '/' . $p->id;
$couv = $root . '/cover.jpg';
+ if (!file_exists($couv)) {
+ $couv = $root . '/data/thumbnails/p1.jpg';
+ }
$couvertures[$p->id] = base64_encode(file_get_contents($couv));
$composition[$k]->publications[$l]->width = $book->parametres->width;
$composition[$k]->publications[$l]->height = $book->parametres->height;
}
$d = array('id' => $id, 'res' => $resolution, 'ns' => $ns, 'langs' => $langs, 'langnames' => $langsnames, 'time' => $version, 'datas' => $composition, 'couvertures' => $couvertures, 'traductions' => $traductions, 'contents' => $contents);
- $d = array_merge($d, $this->_getManifest($publications, '/fluidbook/collections/versions/' . $id . '/' . $version . '/' . $os, $books, $resolution));
+ if (!$collection->settings['offline']) {
+ $d = array_merge($d, $this->_getManifest($publications, '/fluidbook/collections/versions/' . $id . '/' . $version . '/' . $os, $books, $resolution));
+ }
$dao = new wsDAOCollection($core->con);
$col = $dao->selectById($id);
$res .= '<tr><td class="min nowrap">' . __("Titre sur l'écran d'accueil") . '</td><td>' . form::field(array('contents[' . $l . '][titrehome]', 'contents_' . $l . '_titrehome'), 64, 64, $collection->contents[$l]['titrehome']) . '</td></tr>';
$res .= '<tr><td class="min nowrap">' . __('A propos') . '</td><td>' . form::textarea(array('contents[' . $l . '][apropos]', 'contents_' . $l . '_apropos'), 60, 10, $collection->contents[$l]['apropos']) . '</td></tr>';
//'splash' =>
- $res .= '<tr><td class="min nowrap">' . __('Ecran de lancement') . ' (2048x2048px)</td><td><input type="file" name="splash_' . $l . '" />' . form::hidden(array('theme[splash_' . $l . ']', 'splash_' . $l), $collection->theme['splash_' . $l]) . '</td></tr>';
- $res .= '<tr><td class="min nowrap">' . __('Panneau publicité') . ' (2048x2048px)</td><td><input type="file" name="ad_' . $l . '" />' . form::hidden(array('theme[ad_' . $l . ']', 'ad_' . $l), $collection->theme['ad_' . $l]) . '</td></tr>';
+ $res .= '<tr><td class="min nowrap">' . __('Ecran de lancement') . ' (2048x2048px)</td><td><input type="file" name="splash_' . $l . '" />' . form::hidden(array('theme[splash_' . $l . ']', 'splash_' . $l), $collection->theme['splash_' . $l]) . self::viewCollectionFile($collection->theme['splash_' . $l], $collection->collection_id) . '</td></tr>';
+ $res .= '<tr><td class="min nowrap">' . __('Panneau publicité') . '</td><td><input type="file" name="ad_' . $l . '" />' . form::hidden(array('theme[ad_' . $l . ']', 'ad_' . $l), $collection->theme['ad_' . $l]) . self::viewCollectionFile($collection->theme['ad_' . $l], $collection->collection_id) . '</td></tr>';
$res .= '<tr><td class="min nowrap">' . __('Lien publicité') . '</td><td>' . form::field(array('contents[' . $l . '][adlink]', 'adlink_' . $l), 64, 64, $collection->contents[$l]['adlink']) . '</td></tr>';
$res .= '</table>';
}
$res .= '<table class="max">';
$images = array('back' => __('Image de fond'), 'etagere' => __("Image de l'étagère"), 'icon' => __("Icône de l'application") . ' (1024x1024px)');
foreach ($images as $i => $label) {
- $res .= '<tr><td class="min nowrap">' . $label . '</td><td><input type="file" name="' . $i . '" />' . form::hidden(array('theme[' . $i . ']', 'theme_' . $i), $collection->theme[$i]) . '</td></tr>';
+ $res .= '<tr><td class="min nowrap">' . $label . '</td><td><input type="file" name="' . $i . '" />' . form::hidden(array('theme[' . $i . ']', 'theme_' . $i), $collection->theme[$i]) . self::viewCollectionFile($collection->theme[$i], $collection->collection_id) . '</td></tr>';
}
$res .= '<tr><td class="min nowrap">' . __('Couleur principale') . '</td><td>#' . form::field(array('settings[couleurA]', 'couleurA'), 6, 6, $collection->settings['couleurA']) . '</td></tr>';
$res .= '<tr><td class="min nowrap">' . __('Couleur secondaire') . '</td><td>#' . form::field(array('settings[couleurB]', 'couleurB'), 6, 6, $collection->settings['couleurB']) . '</td></tr>';
$res .= '<tr><td class="min nowrap">' . __('Couleur des textes') . '</td><td>#' . form::field(array('settings[couleurC]', 'couleurC'), 6, 6, $collection->settings['couleurC']) . '</td></tr>';
+ $res .= '<tr><td class="min nowrap">' . __('Couleur des titres de publication') . '</td><td>#' . form::field(array('settings[couleurE]', 'couleurC'), 6, 6, $collection->settings['couleurE']) . '</td></tr>';
$res .= '<tr><td class="min nowrap">' . __('Couleur de fond') . '</td><td>#' . form::field(array('settings[couleurD]', 'couleurD'), 6, 6, $collection->settings['couleurD']) . '</td></tr>';
$res .= '</table>';
return $res;
}
+ public static function viewCollectionFile($file, $collection_id) {
+ $res = '<a href="/fluidbook/collections/working/' . $collection_id . '/' . $file . '" target="_blank">';
+ $res .= cubeMedia::tango('actions/document-save.png');
+ $res .= '</a>';
+ return $res;
+ }
+
public static function getSelectVersions($versions) {
fb($versions);
$res = array('-----' => '');
return array('background' => '', 'etagere' => '');
}
-}
-
-?>
+}
\ No newline at end of file
$phonegap->setAppName($appNames);
$phonegap->setWWWDirectory($dir);
if ($os == 'ios') {
-
- $phonegap->setDistantCompiler(self::VINCENT, 'vincent', 'iquique', '/Phonegap/Projects/' . $d, '/mnt/macbox/Phonegap/Projects/' . $d, 22022, SSH_KEY);
+ $phonegap->setDistantCompiler(self::VINCENT, 'vincent', 'atacama', '/Phonegap/Projects/' . $d, '/mnt/macbox/Phonegap/Projects/' . $d, 22022, SSH_KEY);
} else if ($os == 'android') {
$manifestType = isset($collection->settings['offline']) ? 'Offline' : 'Online';
$phonegap->setManifest(WS_COMPILE_ASSETS . '/_html5app/_android/AndroidManifest' . $manifestType . '.xml');
protected function copyRecursive($source, $dest) {
if (is_dir($source)) {
$iterator = new RecursiveIteratorIterator(
- new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::SELF_FIRST
+ new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::SELF_FIRST
);
foreach ($iterator as $file) {
$config['couleurB'] = $this->collection->settings['couleurB'];
$config['couleurC'] = $this->collection->settings['couleurC'];
$config['couleurD'] = $this->collection->settings['couleurD'];
+ $config['couleurE'] = $this->collection->settings['couleurE'];
$config['offline'] = false;
if (isset($this->collection->settings['offline'])) {
$config['offline'] = $this->collection->settings['offline'];
$c[] = 'body{background-image:url("images/' . $this->collection->theme['back'] . '");}';
$c[] = '#shelves{background-image:url("images/' . $this->collection->theme['etagere'] . '");}';
+
// Menus
$menuColor = new CubeIT_Graphics_Color($this->collection->settings['couleurA']);
$textColor = new CubeIT_Graphics_Color($this->collection->settings['couleurC']);
background-image: linear-gradient(top bottom, $top 0%,$bottom 100%); /* W3C */
}";
- $caption.='#bar,.mview{color:' . $textColor->toCSS() . '}';
- $caption.=".mview .caption a{
+ $caption .= '#bar,.mview{color:' . $textColor->toCSS() . '}';
+ $caption .= ".mview .caption a{
border:1px solid $border;
color:$text;
}";
}
- $caption.="#bar{border-bottom:1px solid " . $border . "}";
+ $caption .= "#bar{border-bottom:1px solid " . $border . "}";
$c[] = $caption;
+ #Publications
+ $colorE = $this->collection->settings['couleurE'];
+ if (!$colorE) {
+ $colorE = '#ffffff';
+ }
+ $publicationsColor = new CubeIT_Graphics_Color($colorE);
+ $c[] = '.publication, .publication a, .publication .label{color:' . $publicationsColor->toCSS() . ';}';
+
# Chapters (menu lists)
$top = $menuColor->setAlpha(0.5)->toCSS();
$bottom = $menuMultiply->setAlpha(0.5)->toCSS();