From: Marcin Haba Date: Wed, 30 Oct 2019 05:09:03 +0000 (+0100) Subject: baculum: Tweak improve schedule fields size X-Git-Tag: Release-9.6.0~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=612b513b9f150750799e143f500705c9512bb334;p=thirdparty%2Fbacula.git baculum: Tweak improve schedule fields size --- diff --git a/gui/baculum/protected/Web/Portlets/DirectiveComboBox.php b/gui/baculum/protected/Web/Portlets/DirectiveComboBox.php index 6609a3178..2c1a2001e 100644 --- a/gui/baculum/protected/Web/Portlets/DirectiveComboBox.php +++ b/gui/baculum/protected/Web/Portlets/DirectiveComboBox.php @@ -82,6 +82,11 @@ class DirectiveComboBox extends DirectiveTemplate { $this->Directive->dataBind(); $validate = $this->getRequired(); $this->DirectiveValidator->setVisible($validate); + $cssclass = $this->getCssClass(); + if ($cssclass) { + $cssclass .= ' ' . $this->Directive->getCssClass(); + $this->Directive->setCssClass($cssclass); + } } } ?> diff --git a/gui/baculum/protected/Web/Portlets/DirectiveSchedule.tpl b/gui/baculum/protected/Web/Portlets/DirectiveSchedule.tpl index 2dbe03823..e38e9499b 100644 --- a/gui/baculum/protected/Web/Portlets/DirectiveSchedule.tpl +++ b/gui/baculum/protected/Web/Portlets/DirectiveSchedule.tpl @@ -68,6 +68,7 @@ Label="<%[ Month ]%>" InConfig="true" Show="true" + CssClass="smallbox" />
@@ -76,12 +77,14 @@ Label="<%[ From month ]%>" InConfig="true" Show="true" + CssClass="smallbox" />

@@ -110,6 +113,7 @@ Label="<%[ Week ]%>" InConfig="true" Show="true" + CssClass="smallbox" />
@@ -118,12 +122,14 @@ Label="<%[ From week ]%>" InConfig="true" Show="true" + CssClass="smallbox" />
@@ -153,6 +159,7 @@ Label="<%[ Day ]%>" InConfig="true" Show="true" + CssClass="smallbox" />
@@ -161,12 +168,14 @@ Label="<%[ From day ]%>" InConfig="true" Show="true" + CssClass="smallbox" />

@@ -195,6 +204,7 @@ Label="<%[ Day of week ]%>" InConfig="true" Show="true" + CssClass="smallbox" />
@@ -203,12 +213,14 @@ Label="<%[ From day of week ]%>" InConfig="true" Show="true" + CssClass="smallbox" />

@@ -237,12 +249,14 @@ Label="<%[ Hour ]%>" InConfig="true" Show="true" + CssClass="smallbox" />
@@ -251,6 +265,7 @@ Label="<%[ Minute ]%>" InConfig="true" Show="true" + CssClass="smallbox" />
diff --git a/gui/baculum/protected/Web/Portlets/DirectiveTemplate.php b/gui/baculum/protected/Web/Portlets/DirectiveTemplate.php index b103a869a..c4ea96166 100644 --- a/gui/baculum/protected/Web/Portlets/DirectiveTemplate.php +++ b/gui/baculum/protected/Web/Portlets/DirectiveTemplate.php @@ -45,6 +45,7 @@ class DirectiveTemplate extends DirectiveControlTemplate implements IDirectiveFi const GROUP_NAME = 'GroupName'; const IS_DIRECTIVE_CREATED = 'IsDirectiveCreated'; const VALIDATION_GROUP = 'ValidationGroup'; + const CSSCLASS = 'CssClass'; public $display_directive; @@ -253,5 +254,13 @@ class DirectiveTemplate extends DirectiveControlTemplate implements IDirectiveFi public function setValidationGroup($validation_group) { $this->setViewState(self::VALIDATION_GROUP, $validation_group); } + + public function getCssClass() { + return $this->getViewState(self::CSSCLASS); + } + + public function setCssClass($cssclass) { + $this->setViewState(self::CSSCLASS, $cssclass); + } } ?> diff --git a/gui/baculum/protected/Web/Portlets/DirectiveTextBox.php b/gui/baculum/protected/Web/Portlets/DirectiveTextBox.php index 5f98bf4db..f72d86d8d 100644 --- a/gui/baculum/protected/Web/Portlets/DirectiveTextBox.php +++ b/gui/baculum/protected/Web/Portlets/DirectiveTextBox.php @@ -48,6 +48,11 @@ class DirectiveTextBox extends DirectiveTemplate { $this->Directive->setText($directive_value); $validate = $this->getRequired(); $this->DirectiveValidator->setVisible($validate); + $cssclass = $this->getCssClass(); + if ($cssclass) { + $cssclass .= ' ' . $this->Directive->getCssClass(); + $this->Directive->setCssClass($cssclass); + } } } ?> diff --git a/gui/baculum/themes/Baculum-v2/css/baculum.css b/gui/baculum/themes/Baculum-v2/css/baculum.css index a5ea9ebc2..b01035364 100644 --- a/gui/baculum/themes/Baculum-v2/css/baculum.css +++ b/gui/baculum/themes/Baculum-v2/css/baculum.css @@ -262,3 +262,7 @@ table.status_table td, table.status_table td i { font-weight: bold; text-shadow: 1px 1px 0 #fff; } + +.smallbox { + width: 160px; +}