From 8434cd9505a9672743908076896e417eddc47693 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 19 Nov 2014 19:46:19 +0100 Subject: Several minor fixes - Removed common share setting for now (until properly supported) - Remove extra container div in message display - Support multiline translation strings - Add "next" button on top of file list when creating custom config module --- inc/defaultdata.inc.php | 6 ++-- inc/message.inc.php | 2 -- modules/translation.inc.php | 2 ++ templates/sysconfig/custom-fileselect.html | 6 +++- templates/translation/edit.html | 48 +++++++++++++++++++----------- 5 files changed, 42 insertions(+), 22 deletions(-) diff --git a/inc/defaultdata.inc.php b/inc/defaultdata.inc.php index fd3b3d92..c31d4ae4 100644 --- a/inc/defaultdata.inc.php +++ b/inc/defaultdata.inc.php @@ -24,7 +24,7 @@ class DefaultData 2 => 20, // Internet access 3 => 100, // Timesync 4 => 10, // System config - 5 => 15, // Public Shared folder + //5 => 15, // Public Shared folder 6 => 20000, // Unassigned/no category ); foreach ($cats as $cat => $sort) { @@ -109,7 +109,7 @@ class DefaultData 'catid' => '2', 'defaultvalue' => 'socks5', 'permissions' => '2', - 'validator' => '' + 'validator' => 'list:socks4|socks5|http-connect|http-relay' ), array( 'setting' => 'SLX_REMOTE_LOG_SESSIONS', @@ -139,6 +139,7 @@ class DefaultData 'permissions' => '2', 'validator' => 'regex:/^\d*$/' ), + /* array( 'setting' => 'SLX_COMMON_SHARE_PATH', 'catid' => '5', @@ -153,6 +154,7 @@ class DefaultData 'permissions' => '2', 'validator' => 'list:guest|user' ), + */ array( 'setting' => 'SLX_BENCHMARK_VM', 'catid' => '6', diff --git a/inc/message.inc.php b/inc/message.inc.php index 0e054846..2fccb0a0 100644 --- a/inc/message.inc.php +++ b/inc/message.inc.php @@ -65,7 +65,6 @@ class Message return; } // Non-Ajax - if (!self::$flushed) Render::openTag('div', array('class' => 'container')); foreach (self::$list as $item) { $message = Dictionary::getMessage($item['id']); foreach ($item['params'] as $index => $text) { @@ -74,7 +73,6 @@ class Message Render::addTemplate('messagebox-' . $item['type'], array('message' => $message)); self::$alreadyDisplayed[] = $item; } - if (!self::$flushed) Render::closeTag('div'); self::$list = array(); self::$flushed = true; } diff --git a/modules/translation.inc.php b/modules/translation.inc.php index c10facb2..85524d92 100644 --- a/modules/translation.inc.php +++ b/modules/translation.inc.php @@ -324,6 +324,8 @@ class Page_Translation extends Page foreach ($jsonTags as $tag => $translation) { $tags[$tag]['langs'][$lang]['translation'] = $translation; $tags[$tag]['langs'][$lang]['lang'] = $lang; + if (strpos($translation, "\n") !== false) + $tags[$tag]['langs'][$lang]['big'] = true; $tags[$tag]['tag'] = $tag; if (!isset($tags[$tag]['missing'])) $tags[$tag]['missing'] = 0; diff --git a/templates/sysconfig/custom-fileselect.html b/templates/sysconfig/custom-fileselect.html index de99c2f9..0c2d88e9 100644 --- a/templates/sysconfig/custom-fileselect.html +++ b/templates/sysconfig/custom-fileselect.html @@ -5,7 +5,11 @@ {{lang_moduleName}} -
+
+ +
+
+

{{lang_checkFileContent}}

{{#files}} diff --git a/templates/translation/edit.html b/templates/translation/edit.html index 5fd2ef19..dc01deb6 100644 --- a/templates/translation/edit.html +++ b/templates/translation/edit.html @@ -19,24 +19,29 @@ {{#langs}} - + {{/langs}} {{#tags}} - - - {{#langs}} - - {{/langs}} - - + + + {{#langs}} + + {{/langs}} + + {{/tags}} @@ -49,9 +54,18 @@ - -- cgit v1.2.3-55-g7522
Mustache Tag{{lang}}{{name}}
{{tag}} - - - -
{{tag}} + {{^big}} + + {{/big}} + {{#big}} + + {{/big}} + + +