aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2019-01-08 19:59:56 +0100
committervincent-peugnet <v.peugnet@free.fr>2019-01-08 19:59:56 +0100
commit7de50d7cc8722d229564488152bfb242adc2c80c (patch)
treecb00364b49d76f9b9881b6d3399135b7ed0dc046 /app
parentefab4af451c4759d4ea860741c6a27a997137fb6 (diff)
downloadwcms-7de50d7cc8722d229564488152bfb242adc2c80c.tar.gz
wcms-7de50d7cc8722d229564488152bfb242adc2c80c.zip
add edit script for improved edition comfort
Diffstat (limited to 'app')
-rw-r--r--app/class/model.php6
-rw-r--r--app/view/templates/edit.php2
2 files changed, 8 insertions, 0 deletions
diff --git a/app/class/model.php b/app/class/model.php
index da5e8bc..b3d5274 100644
--- a/app/class/model.php
+++ b/app/class/model.php
@@ -4,6 +4,7 @@ abstract class Model
const CONFIG_FILE = 'config.json';
const CSS_DIR = 'assets' . DIRECTORY_SEPARATOR .'css' . DIRECTORY_SEPARATOR;
+ const JS_DIR = 'assets' . DIRECTORY_SEPARATOR .'js' . DIRECTORY_SEPARATOR;
const FONT_DIR = 'fonts' . DIRECTORY_SEPARATOR;
const MEDIA_DIR = 'media' . DIRECTORY_SEPARATOR;
const FAVICON_DIR = 'media' . DIRECTORY_SEPARATOR . 'favicon' . DIRECTORY_SEPARATOR;
@@ -49,6 +50,11 @@ abstract class Model
return self::dirtopath(Model::CSS_DIR);
}
+ public static function jspath()
+ {
+ return self::dirtopath(Model::JS_DIR);
+ }
+
public static function mediapath()
{
return self::dirtopath(Model::MEDIA_DIR);
diff --git a/app/view/templates/edit.php b/app/view/templates/edit.php
index c220678..e01846e 100644
--- a/app/view/templates/edit.php
+++ b/app/view/templates/edit.php
@@ -23,6 +23,8 @@
</form>
</main>
+
+<script src="<?= Model::jspath() ?>edit.js"></script>
</body>
<?php $this->stop('page') ?> \ No newline at end of file