From 7bcfb818763c6ffbd5cd59e734bdd03de6319a2e Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Fri, 7 Apr 2017 18:11:41 +0000 Subject: [PATCH] #1328 --- inc/ws/Controlleur/class.ws.ajax.php | 5 +++++ inc/ws/Controlleur/class.ws.url.php | 2 ++ inc/ws/Util/class.ws.exporter.php | 1 + inc/ws/Util/html5/app/class.ws.html5.app.compiler.php | 4 ++++ 4 files changed, 12 insertions(+) diff --git a/inc/ws/Controlleur/class.ws.ajax.php b/inc/ws/Controlleur/class.ws.ajax.php index d4cadc4e8..b05f4f745 100644 --- a/inc/ws/Controlleur/class.ws.ajax.php +++ b/inc/ws/Controlleur/class.ws.ajax.php @@ -232,6 +232,11 @@ class wsAjax extends cubeAjax { $ext = CubeIT_Files::getExtension($_FILES[$t]['name']); move_uploaded_file($_FILES[$t]['tmp_name'], $wdir . '/' . $t . '.' . $ext); $save['theme'][$t] = $t . '.' . $ext; + + if ($t == 'filesalt') { + CubeIT_Files::rmdir($wdir . '/filesalt'); + $unzip = CubeIT_Util_Zip::extract($wdir . '/' . $t . '.' . $ext, $wdir . '/filesalt'); + } } } diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index 1fd96e2eb..f00478e93 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -332,6 +332,8 @@ class wsUrl { $res .= '' . __('Couleur des titres de publication') . '#' . form::field(array('settings[couleurE]', 'couleurC'), 6, 6, $collection->settings['couleurE']) . ''; $res .= '' . __('Couleur de fond') . '#' . form::field(array('settings[couleurD]', 'couleurD'), 6, 6, $collection->settings['couleurD']) . ''; $res .= '' . __('Nombre de publication par ligne') . '' . form::field(array('settings[perline]', 'perline'), 1, 1, $collection->settings['perline']) . ''; + $res .= '' . __('Contenu HTML alternatif') . '' . form::textArea(array('settings[htmlalt]', 'htmlalt'), 100, 30, $collection->settings['htmlalt']) . ''; + $res .= '' . __('Fichiers pour le contenu alternatif') . '' . form::hidden(array('theme[filesalt]', 'theme_' . $i), $collection->theme['filesalt']) . self::viewCollectionFile($collection->theme['filesalt'], $collection->collection_id) . ''; $res .= ''; diff --git a/inc/ws/Util/class.ws.exporter.php b/inc/ws/Util/class.ws.exporter.php index da67ff7ca..e395b803b 100644 --- a/inc/ws/Util/class.ws.exporter.php +++ b/inc/ws/Util/class.ws.exporter.php @@ -104,6 +104,7 @@ class wsExporter { ); if ($os == 'ios') { $phonegap->addFeature(CubeIT_Mobile_Phonegap::FEATURE_EXTERNALFILEUTIL); + $phonegap->addFeature(CubeIT_Mobile_Phonegap_IOS::FEATURE_WKWEBVIEW); } else if ($os == 'android') { $phonegap->addFeature(CubeIT_Mobile_Phonegap::FEATURE_WEBINTENT); } diff --git a/inc/ws/Util/html5/app/class.ws.html5.app.compiler.php b/inc/ws/Util/html5/app/class.ws.html5.app.compiler.php index fc83274e0..846b7c804 100644 --- a/inc/ws/Util/html5/app/class.ws.html5.app.compiler.php +++ b/inc/ws/Util/html5/app/class.ws.html5.app.compiler.php @@ -149,6 +149,7 @@ class wsHTML5AppCompiler { $config['couleurC'] = $this->collection->settings['couleurC']; $config['couleurD'] = $this->collection->settings['couleurD']; $config['couleurE'] = $this->collection->settings['couleurE']; + $config['htmlAlt'] = $this->collection->settings['htmlalt']; $config['offline'] = false; if (isset($this->collection->settings['offline'])) { $config['offline'] = $this->collection->settings['offline']; @@ -184,6 +185,9 @@ class wsHTML5AppCompiler { $this->copy($this->wdir . '/' . $this->collection->theme['back'], $imagesdir . '/' . $this->collection->theme['back']); $this->copy($this->wdir . '/' . $this->collection->theme['etagere'], $imagesdir . '/' . $this->collection->theme['etagere']); + if (file_exists($this->wdir . '/filesalt')) { + $this->copyRecursive($this->wdir . '/filesalt', $this->vdir); + } $c[] = 'body{background-image:url("images/' . $this->collection->theme['back'] . '");}'; $c[] = '#shelves{background-image:url("images/' . $this->collection->theme['etagere'] . '");}'; -- 2.39.5