From: vincent@cubedesigners.com Date: Tue, 9 Feb 2021 14:34:21 +0000 (+0000) Subject: wait #4248 @0.75 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=4b2ce7b4fe254ff5e615a7c81c878b3d1db6db7f;p=cubeextranet.git wait #4248 @0.75 --- diff --git a/inc/ws/Controlleur/class.ws.maintenance.php b/inc/ws/Controlleur/class.ws.maintenance.php index c45f815d8..390cc808c 100644 --- a/inc/ws/Controlleur/class.ws.maintenance.php +++ b/inc/ws/Controlleur/class.ws.maintenance.php @@ -1407,11 +1407,11 @@ class wsMaintenance if ($platform === 'windows') { $p = 'windows-x32'; $exe = 'workshop'; - $version='0.50.2'; + $version = '0.50.2'; } else if ($platform === 'mac') { $p = 'mac-x64'; $exe = 'Fluidbook Workshop'; - $version='0.50.2'; + $version = '0.50.2'; } $path = ROOT . '/desktop'; @@ -1426,7 +1426,7 @@ class wsMaintenance $cl->setArg('title', 'Fluidbook Workshop'); $cl->setArg('output-dir', $outpath); $cl->setArg('nw-version', $version); - $cl->setArg('sdk-build'); + //$cl->setArg('sdk-build'); $cl->setArg('main', 'index.html'); $cl->setArg('package-json'); //$cl->setArg('name', 'FluidbookWorkshop.exe'); @@ -1469,11 +1469,41 @@ class wsMaintenance } } - public static function themeParams(){ - $parent=new wsTheme(); - $t=new wsThemeParametres($parent); + public static function themeParams() + { + $parent = new wsTheme(); + $t = new wsThemeParametres($parent); $t->generateV3Form(false); } + + public static function processPage($args) + { + global $core; + + $book_id = $args[0]; + $page = $args[1]; + + $daoBook = new wsDAOBook($core->con); + $book = $daoBook->selectById($book_id); + + $files = [ + ['jpg', '300', true, true, 'html'], + ['jpg', '150', true, true, 'html'], + ['jpg', '150', false, true, 'html'], + ['jpg', '150', false, true, 'html'], + ['swf', '150', true, true, ''], + ['svg', '150', true, false, 'html'], + ['svg', '300', true, false, 'html'], + ['svg', '150', true, true, 'html'], + ['svg', '200', true, true, 'html'], + ]; + + + foreach ($files as $file) { + $book->getFile($page, $file[0], $file[1], $file[2], $file[3], $file[4], true); + } + + } } diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index 930e4fda2..5b35a5355 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -192,6 +192,9 @@ class wsBookParametres extends wsParametres $this->fields['mobileIconVector'] = array('type' => 'boolean', 'default' => true, 'editable' => false, 'label' => __('Utiliser les icônes vectorielles')); // $this->forms['mobile'] = array('label' => __('Version HTML5'), // 'fieldsnames' => array('alwaysHTML5', 'html5priority', 'flashBlockedWait', 'mobileIconVector', 'mobileServerConfig')); + $this->fields['externalArchivesBack'] = array('type' => 'freefile', 'default' => '', 'editable' => true, + 'label' => __('Image de fond'), 'grade' => 3, 'fileFilter' => $imageFilter); + $this->fields['archivesLink'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Lien'), 'grade' => 5); /** **/ $this->fields['version'] = array('type' => 'combo', 'default' => '2', 'editable' => true, 'label' => __('Version'), 'datas' => array('1' => '1', '2' => '2'), 'grade' => 3); @@ -620,13 +623,9 @@ class wsBookParametres extends wsParametres //. $this->fields['externalArchives'] = array('type' => 'freefile', 'default' => '', 'editable' => true, 'label' => __('Archives'), 'grade' => 3, 'fileFilter' => $imageFilter); - $this->fields['externalArchivesBack'] = array('type' => 'freefile', 'default' => '', 'editable' => true, - 'label' => __('Image de fond'), 'grade' => 3, 'fileFilter' => $imageFilter); - $this->fields['archivesLink'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Lien'), 'grade' => 5); $this->fields['archivesLabel'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Label'), 'grade' => 5); - $this->forms['archives'] = array('label' => __('Archives'), - 'fieldsnames' => array('externalArchives', 'externalArchivesBack', '|', 'archivesLink', 'archivesLabel')); + 'fieldsnames' => array('externalArchives', 'archivesLabel')); // . $this->fields['form'] = array('type' => 'combo', 'default' => '', 'editable' => true, 'grade' => 5, 'label' => __('Formulaire'), 'datas' => array(__('Aucun') => '', diff --git a/inc/ws/Metier/class.ws.book.php b/inc/ws/Metier/class.ws.book.php index b76a736c9..8f3d9f6f3 100644 --- a/inc/ws/Metier/class.ws.book.php +++ b/inc/ws/Metier/class.ws.book.php @@ -84,7 +84,7 @@ class wsBook extends cubeMetier return $this->$varname; } - public function getFile($page, $format = 'jpg', $resolution = 150, $withText = true, $withGraphics = true, $version = 'html') + public function getFile($page, $format = 'jpg', $resolution = 150, $withText = true, $withGraphics = true, $version = 'html',$force=false) { $p = wsDAOBook::getDocumentPage($this->book_id, $page); if (!isset($this->_docs[$p['document_id']])) { @@ -93,7 +93,7 @@ class wsBook extends cubeMetier $this->_docs[$p['document_id']] = $dao->selectById($p['document_id']); } $doc = $this->_docs[$p['document_id']]; - return $doc->getFile($p['document_page'], $format, $resolution, $withText, $withGraphics, $version); + return $doc->getFile($p['document_page'], $format, $resolution, $withText, $withGraphics, $version,$force); } public function getThumbFile($page, $format) diff --git a/inc/ws/Metier/class.ws.document.php b/inc/ws/Metier/class.ws.document.php index 9e57934d8..c5e195798 100644 --- a/inc/ws/Metier/class.ws.document.php +++ b/inc/ws/Metier/class.ws.document.php @@ -410,7 +410,7 @@ class wsDocument extends cubeMetier $file .= '-' . $resolution; } $file .= '.svg'; - $reffile = $this->makeSVGFile($page); + $reffile = $this->makeSVGFile($page, $force); $minsize = 100; } else if ($format === 'png' || $format === 'jpg') { $prefix = $withText ? 't' : 'h';