]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Tweak improve schedule fields size
authorMarcin Haba <marcin.haba@bacula.pl>
Wed, 30 Oct 2019 05:09:03 +0000 (06:09 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Sat, 14 Dec 2019 14:58:00 +0000 (15:58 +0100)
gui/baculum/protected/Web/Portlets/DirectiveComboBox.php
gui/baculum/protected/Web/Portlets/DirectiveSchedule.tpl
gui/baculum/protected/Web/Portlets/DirectiveTemplate.php
gui/baculum/protected/Web/Portlets/DirectiveTextBox.php
gui/baculum/themes/Baculum-v2/css/baculum.css

index 6609a3178584a832997d63b099f2e3f8852a8846..2c1a2001ec472d57cb651f8775c172d6cac1e410 100644 (file)
@@ -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);
+               }
        }
 }
 ?>
index 2dbe038238fde5426e0d3d1369b7c8165d3324f5..e38e9499b76be438b4c6c2a91ee28dceac319a1c 100644 (file)
@@ -68,6 +68,7 @@
                                Label="<%[ Month ]%>"
                                InConfig="true"
                                Show="true"
+                               CssClass="smallbox"
                        />
                </div>
                <div id="month_range<%=$this->MonthSingle->ClientID%>" class="w3-margin month<%=$this->MonthSingle->ClientID%>" style="display: <%=$this->MonthRange->Checked ? 'block' : 'none'%>">
                                Label="<%[ From month ]%>"
                                InConfig="true"
                                Show="true"
+                               CssClass="smallbox"
                        />
                        <com:Application.Web.Portlets.DirectiveComboBox
                                ID="MonthRangeTo"
                                Label="<%[ To month ]%>"
                                InConfig="true"
                                Show="true"
+                               CssClass="smallbox"
                        />
                </div>
                <hr />
                                Label="<%[ Week ]%>"
                                InConfig="true"
                                Show="true"
+                               CssClass="smallbox"
                        />
                </div>
                <div id="week_range<%=$this->WeekSingle->ClientID%>" class="w3-margin week<%=$this->WeekSingle->ClientID%>" style="display: <%=$this->WeekRange->Checked ? 'block' : 'none'%>">
                                Label="<%[ From week ]%>"
                                InConfig="true"
                                Show="true"
+                               CssClass="smallbox"
                        />
                        <com:Application.Web.Portlets.DirectiveComboBox
                                ID="WeekRangeTo"
                                Label="<%[ To week ]%>"
                                InConfig="true"
                                Show="true"
+                               CssClass="smallbox"
                        />
                </div>
 
                                Label="<%[ Day ]%>"
                                InConfig="true"
                                Show="true"
+                               CssClass="smallbox"
                        />
                </div>
                <div id="day_range<%=$this->DaySingle->ClientID%>" class="w3-margin day<%=$this->DaySingle->ClientID%>" style="display: <%=$this->DayRange->Checked ? 'block' : 'none'%>">
                                Label="<%[ From day ]%>"
                                InConfig="true"
                                Show="true"
+                               CssClass="smallbox"
                        />
                        <com:Application.Web.Portlets.DirectiveComboBox
                                ID="DayRangeTo"
                                Label="<%[ To day ]%>"
                                InConfig="true"
                                Show="true"
+                               CssClass="smallbox"
                        />
                </div>
                <hr />
                                Label="<%[ Day of week ]%>"
                                InConfig="true"
                                Show="true"
+                               CssClass="smallbox"
                        />
                </div>
                <div id="day_range<%=$this->WdaySingle->ClientID%>" class="w3-margin day<%=$this->WdaySingle->ClientID%>" style="display: <%=$this->WdayRange->Checked ? 'block' : 'none'%>">
                                Label="<%[ From day of week ]%>"
                                InConfig="true"
                                Show="true"
+                               CssClass="smallbox"
                        />
                        <com:Application.Web.Portlets.DirectiveComboBox
                                ID="WdayRangeTo"
                                Label="<%[ To day of week ]%>"
                                InConfig="true"
                                Show="true"
+                               CssClass="smallbox"
                        />
                </div>
                <hr />
                                Label="<%[ Hour ]%>"
                                InConfig="true"
                                Show="true"
+                               CssClass="smallbox"
                        />
                        <com:Application.Web.Portlets.DirectiveTextBox
                                ID="TimeMinAt"
                                Label="<%[ Minute ]%>"
                                InConfig="true"
                                Show="true"
+                               CssClass="smallbox"
                        />
                </div>
                <div id="day_range<%=$this->TimeAt->ClientID%>" class="w3-margin day<%=$this->TimeAt->ClientID%>" style="display: <%=$this->TimeHourly->Checked ? 'block' : 'none'%>">
                                Label="<%[ Minute ]%>"
                                InConfig="true"
                                Show="true"
+                               CssClass="smallbox"
                        />
                </div>
        </div>
index b103a869a558499fd3827c57e8767aef837f58f4..c4ea961666825b6256ace066f061011f1719cf1c 100644 (file)
@@ -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);
+       }
 }
 ?>
index 5f98bf4dbe6dc534e90cd135232437f8116f1b62..f72d86d8d7314f620994c12c15cf81e15f3f1e78 100644 (file)
@@ -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);
+               }
        }
 }
 ?>
index a5ea9ebc2c9fc630147292361d37105f0fd669be..b01035364e4094b21f106b735adf055e3290c71e 100644 (file)
@@ -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;
+}