From 566b995bab45355d814ac5a8bfbf18e3a59c14ba Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Wed, 14 Aug 2019 10:23:53 +0200 Subject: Change : externaljs become customhead --- app/class/art2.php | 14 +++++++------- app/class/modelrender.php | 5 ++--- app/view/templates/editleftbar.php | 17 ++++------------- assets/css/edit.css | 6 +++++- composer.json | 2 +- 5 files changed, 19 insertions(+), 25 deletions(-) diff --git a/app/class/art2.php b/app/class/art2.php index 81b6569..56bc74e 100644 --- a/app/class/art2.php +++ b/app/class/art2.php @@ -20,7 +20,7 @@ class Art2 protected $aside; protected $footer; protected $externalcss; - protected $externalscript; + protected $customhead; protected $renderhead; protected $renderbody; protected $secure; @@ -91,7 +91,7 @@ class Art2 $this->setaside(''); $this->setfooter(''); $this->setexternalcss([]); - $this->setexternalscript([]); + $this->setcustomhead(''); $this->setrenderhead(''); $this->setrenderbody(''); $this->setsecure(Config::defaultprivacy()); @@ -294,9 +294,9 @@ class Art2 return $this->externalcss; } - public function externalscript($type = "array") + public function customhead($type = "string") { - return $this->externalscript; + return $this->customhead; } public function footer($type = "string") @@ -609,10 +609,10 @@ class Art2 } } - public function setexternalscript(array $externalscript) + public function setcustomhead(string $customhead) { - if(is_array($externalscript)) { - $this->externalscript = array_values(array_filter($externalscript)); + if(is_string($customhead)) { + $this->customhead = $customhead; } } diff --git a/app/class/modelrender.php b/app/class/modelrender.php index fb6e002..aa444f0 100644 --- a/app/class/modelrender.php +++ b/app/class/modelrender.php @@ -225,9 +225,8 @@ class Modelrender extends Modelart } } - foreach ($this->art->externalscript() as $externalscript) { - $head .= '' . PHP_EOL; - } + $head .= PHP_EOL . $this->art->customhead() . PHP_EOL; + $head .= '' . PHP_EOL; $head .= '' . PHP_EOL; diff --git a/app/view/templates/editleftbar.php b/app/view/templates/editleftbar.php index 7b4986d..b8f4d4d 100644 --- a/app/view/templates/editleftbar.php +++ b/app/view/templates/editleftbar.php @@ -152,7 +152,7 @@ -
externalcss()) || !empty($art->externalscript()) ? 'open' : '' ?>> +
externalcss()) || !empty($art->customhead()) ? 'open' : '' ?>> Advanced @@ -173,18 +173,9 @@ } ?> - - - externalscript() as $script) { - ?> -
- - -
- + + +
diff --git a/assets/css/edit.css b/assets/css/edit.css index 54616ff..1821878 100644 --- a/assets/css/edit.css +++ b/assets/css/edit.css @@ -199,7 +199,11 @@ html { width: 100%; } -.editor .panel input {width: 100%;} + + +.editor .panel textarea {resize: vertical;} + +.editor .panel input, .editor .panel textarea {width: 100%;} diff --git a/composer.json b/composer.json index e8ba552..69d5a98 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "w-cms", "description": "point'n think", - "version": "1.4.1", + "version": "1.4.2", "require": { "michelf/php-markdown": "^1.8", "league/plates": "3.*", -- cgit v1.2.3