diff options
author | Simon Rettberg | 2016-05-18 18:04:56 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-05-18 18:04:56 +0200 |
commit | 2e18b36a287ad9b25619f9e2a073dcedf6d620ee (patch) | |
tree | 96d802fdc1c21ee9aa9b4d89a6611db7d8502433 /modules-available/sysconfig | |
parent | Modularized baseconfig fetching (api) (diff) | |
download | slx-admin-2e18b36a287ad9b25619f9e2a073dcedf6d620ee.tar.gz slx-admin-2e18b36a287ad9b25619f9e2a073dcedf6d620ee.tar.xz slx-admin-2e18b36a287ad9b25619f9e2a073dcedf6d620ee.zip |
MORE WMORK
Diffstat (limited to 'modules-available/sysconfig')
8 files changed, 56 insertions, 30 deletions
diff --git a/modules-available/sysconfig/addmodule_branding.inc.php b/modules-available/sysconfig/addmodule_branding.inc.php index cb5609e6..84602614 100644 --- a/modules-available/sysconfig/addmodule_branding.inc.php +++ b/modules-available/sysconfig/addmodule_branding.inc.php @@ -9,7 +9,6 @@ class Branding_Start extends AddModule_Base protected function renderInternal() { - Render::addScriptBottom('fileselect'); Render::addDialog(Dictionary::translate('config-module', 'branding_title'), false, 'branding-start', array( 'step' => 'Branding_ProcessFile', 'edit' => $this->edit ? $this->edit->id() : false diff --git a/modules-available/sysconfig/addmodule_custommodule.inc.php b/modules-available/sysconfig/addmodule_custommodule.inc.php index d08cc5fb..3f112c95 100644 --- a/modules-available/sysconfig/addmodule_custommodule.inc.php +++ b/modules-available/sysconfig/addmodule_custommodule.inc.php @@ -12,7 +12,6 @@ class CustomModule_Start extends AddModule_Base protected function renderInternal() { Session::set('mod_temp', false); - Render::addScriptBottom('fileselect'); Render::addDialog(Dictionary::translate('config-module', 'custom_title'), false, 'custom-upload', array( 'step' => 'CustomModule_ProcessUpload', 'edit' => $this->edit ? $this->edit->id() : false diff --git a/modules-available/sysconfig/clientscript.js b/modules-available/sysconfig/clientscript.js new file mode 100644 index 00000000..2a133353 --- /dev/null +++ b/modules-available/sysconfig/clientscript.js @@ -0,0 +1,21 @@ + +function forceTable(t) +{ + var pwidth = t.parent().innerWidth(); + var rows = t.find('tr'); + var row = rows.first(); + pwidth = Math.round(pwidth); + t.width(pwidth); + var sum = 0; + row.find('td').each(function() { + if (!$(this).hasClass('slx-width-ignore')) + sum += $(this).outerWidth(true); + }); + var w = Math.round(pwidth - sum); + do { + rows.find('.slx-dyn-ellipsis').each(function() { + $(this).width(w).css('width', w + 'px').css('max-width', w + 'px'); + }); + w -= 3; + } while (t.width() > pwidth); +} diff --git a/modules-available/sysconfig/hooks/main-warning.inc.php b/modules-available/sysconfig/hooks/main-warning.inc.php new file mode 100644 index 00000000..e5bc592f --- /dev/null +++ b/modules-available/sysconfig/hooks/main-warning.inc.php @@ -0,0 +1,6 @@ +<?php + +if (!file_exists(CONFIG_HTTP_DIR . '/default/config.tgz')) { + Message::addError('sysconfig.no-noconfig-active', true); + $needSetup = true; +}
\ No newline at end of file diff --git a/modules-available/sysconfig/inc/configmodule.inc.php b/modules-available/sysconfig/inc/configmodule.inc.php index 7b92ff89..9fc3db21 100644 --- a/modules-available/sysconfig/inc/configmodule.inc.php +++ b/modules-available/sysconfig/inc/configmodule.inc.php @@ -118,7 +118,7 @@ abstract class ConfigModule * Get module instances from module type. * * @param int $moduleType module type to get - * @return array The requested modules from DB, or false on error + * @return \ConfigModule[] The requested modules from DB, or false on error */ public static function getAll($moduleType = false) { diff --git a/modules-available/sysconfig/lang/de/messages.json b/modules-available/sysconfig/lang/de/messages.json index 7993babd..e6203d3d 100644 --- a/modules-available/sysconfig/lang/de/messages.json +++ b/modules-available/sysconfig/lang/de/messages.json @@ -1,20 +1,21 @@ { + "config-activated": "Konfiguration {{0}} wurde aktiviert", + "config-invalid": "Konfiguration mit ID {{0}} existiert nicht", "invalid-action": "Ung\u00fcltige Aktion: {{0}}", + "missing-file": "Es wurde keine Datei ausgew\u00e4hlt!", "missing-title": "Kein Titel eingegeben", - "module-edited": "Modul wurde aktualisiert", "module-added": "Modul erfolgreich hinzugef\u00fcgt", - "replacing-config": "Ersetzen von Konfiguration {{0}}", - "missing-file": "Es wurde keine Datei ausgew\u00e4hlt!", - "unsuccessful-action": "Nicht erfolgreich", - "upload-failed": "Upload schlug fehl: {{0}}", - "remote-timeout": "Konnte Ressource {{0}} nicht herunterladen ({{1}})", - "no-image": "Unter der angegebenen URL konnte kein SVG-Bild gefunden werden", - "replacing-module": "Ersetzen von Modul {{0}}", - "config-invalid": "Konfiguration mit ID {{0}} existiert nicht", - "config-activated": "Konfiguration {{0}} wurde aktiviert", - "module-rebuilt": "Modul wurde neu generiert", + "module-deleted": "Modul {{0}} wurde gel\u00f6scht", + "module-edited": "Modul wurde aktualisiert", + "module-in-use": "Modul {{0}} wird noch durch Konfiguration {{1}} verwendet", "module-rebuild-failed": "Neubau des Moduls fehlgeschlagen", "module-rebuilding": "Modul wird neu generiert", - "module-in-use": "Modul {{0}} wird noch durch Konfiguration {{1}} verwendet", - "module-deleted": "Modul {{0}} wurde gel\u00f6scht" + "module-rebuilt": "Modul wurde neu generiert", + "no-image": "Unter der angegebenen URL konnte kein SVG-Bild gefunden werden", + "no-noconfig-active": "Es wurde noch keine Systemkonfiguration ausgew\u00e4hlt.", + "remote-timeout": "Konnte Ressource {{0}} nicht herunterladen ({{1}})", + "replacing-config": "Ersetzen von Konfiguration {{0}}", + "replacing-module": "Ersetzen von Modul {{0}}", + "unsuccessful-action": "Nicht erfolgreich", + "upload-failed": "Upload schlug fehl: {{0}}" }
\ No newline at end of file diff --git a/modules-available/sysconfig/lang/en/messages.json b/modules-available/sysconfig/lang/en/messages.json index fc3c1160..a4aa8dc1 100644 --- a/modules-available/sysconfig/lang/en/messages.json +++ b/modules-available/sysconfig/lang/en/messages.json @@ -1,20 +1,21 @@ { + "config-activated": "Configuration {{0}} has been activated", + "config-invalid": "Configuration with id {{0}} does not exist", "invalid-action": "Invalid action: {{0}}", + "missing-file": "There was no file selected!", "missing-title": "No title given", - "module-edited": "Module has been edited", "module-added": "Module successfully added", - "replacing-config": "Replace config {{0}}", - "missing-file": "There was no file selected!", - "unsuccessful-action": "Not successful", - "upload-failed": "Upload failed: {{0}}", - "remote-timeout": "Could not download resource {{0}} ({{1}})", - "no-image": "Could not find an SVG-image at the given URL", - "replacing-module": "Replace module {{0}}", - "config-invalid": "Configuration with id {{0}} does not exist", - "config-activated": "Configuration {{0}} has been activated", - "module-rebuilt": "Module was rebuilt", + "module-deleted": "Module {{0}} was deleted", + "module-edited": "Module has been edited", + "module-in-use": "Module {{0}} is still used by Configuration {{1}}", "module-rebuild-failed": "Rebuilding module failed", "module-rebuilding": "Module is rebuilding...", - "module-in-use": "Module {{0}} is still used by Configuration {{1}}", - "module-deleted": "Module {{0}} was deleted" + "module-rebuilt": "Module was rebuilt", + "no-image": "Could not find an SVG-image at the given URL", + "no-noconfig-active": "No system configuration created\/selected yet.", + "remote-timeout": "Could not download resource {{0}} ({{1}})", + "replacing-config": "Replace config {{0}}", + "replacing-module": "Replace module {{0}}", + "unsuccessful-action": "Not successful", + "upload-failed": "Upload failed: {{0}}" }
\ No newline at end of file diff --git a/modules-available/sysconfig/page.inc.php b/modules-available/sysconfig/page.inc.php index 3f14a95d..efe34136 100644 --- a/modules-available/sysconfig/page.inc.php +++ b/modules-available/sysconfig/page.inc.php @@ -175,7 +175,6 @@ class Page_SysConfig extends Page 'modules' => $modules, 'havemodules' => (count($modules) > 0) )); - Render::addScriptTop('custom'); Render::addFooter('<script> $(window).load(function (e) { forceTable($("#modtable")); forceTable($("#conftable")); |