Skip to content

Commit

Permalink
Show live conf for non default tb themes
Browse files Browse the repository at this point in the history
  • Loading branch information
firstred committed May 12, 2017
1 parent b109f79 commit 12a2d97
Show file tree
Hide file tree
Showing 8 changed files with 866 additions and 827 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*themeconfigurator*.zip
25 changes: 0 additions & 25 deletions CHANGELOG.txt

This file was deleted.

25 changes: 25 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
CWD_BASENAME=${PWD##*/}

FILES+=("logo.gif")
FILES+=("logo.png")
FILES+=("${CWD_BASENAME}.php")
FILES+=("index.php")
FILES+=("controllers/**")
FILES+=("css/**")
FILES+=("img/**")
FILES+=("js/**")
FILES+=("sass/**")
FILES+=("upgrade/**")
FILES+=("views/**")

MODULE_VERSION="$(sed -ne "s/\\\$this->version *= *['\"]\([^'\"]*\)['\"] *;.*/\1/p" ${CWD_BASENAME}.php)"
MODULE_VERSION=${MODULE_VERSION//[[:space:]]}
ZIP_FILE="${CWD_BASENAME}/${CWD_BASENAME}-v${MODULE_VERSION}.zip"

echo "Going to zip ${CWD_BASENAME} version ${MODULE_VERSION}"

cd ..
for E in "${FILES[@]}"; do
find ${CWD_BASENAME}/${E} -type f -exec zip -9 ${ZIP_FILE} {} \;
done
19 changes: 0 additions & 19 deletions composer.json

This file was deleted.

12 changes: 0 additions & 12 deletions config.xml

This file was deleted.

6 changes: 3 additions & 3 deletions controllers/admin/AdminThemeConfiguratorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public function ajaxProcessUpdatePosition()
$total = count($items);
$success = true;
for ($i = 1; $i <= $total; $i++)
$success &= Db::getInstance()->update('themeconfigurator', array('item_order' => $i), '`id_item` = '.preg_replace('/(item-)([0-9]+)/', '${2}', $items[$i - 1]));
$success &= Db::getInstance()->update('themeconfigurator', ['item_order' => $i], '`id_item` = '.preg_replace('/(item-)([0-9]+)/', '${2}', $items[$i - 1]));
if (!$success)
die(Tools::jsonEncode(array('error' => 'Update Fail')));
die(Tools::jsonEncode(array('success' => 'Update Success !', 'error' => false)));
die(Tools::jsonEncode(['error' => 'Update Fail']));
die(Tools::jsonEncode(['success' => 'Update Success !', 'error' => false]));
}
}
Loading

0 comments on commit 12a2d97

Please sign in to comment.