From abaeb6724c084f1f9891553ee17c03dacf0907ee Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Sun, 4 Aug 2019 10:50:27 +0200 Subject: [PATCH] baculum: Fix scrolling to new runscript subresource on add new runscript action --- gui/baculum/protected/Web/Portlets/JobRunscriptRenderer.php | 2 +- gui/baculum/protected/Web/Portlets/NewRunscriptMenu.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/baculum/protected/Web/Portlets/JobRunscriptRenderer.php b/gui/baculum/protected/Web/Portlets/JobRunscriptRenderer.php index 7f972099a..c0727a5f7 100644 --- a/gui/baculum/protected/Web/Portlets/JobRunscriptRenderer.php +++ b/gui/baculum/protected/Web/Portlets/JobRunscriptRenderer.php @@ -34,7 +34,7 @@ class JobRunscriptRenderer extends DirectiveRenderer { public function render($writer) { if (self::$index % 7 === 0) { - $writer->write('

Runscript #' . ((self::$index/7) + 1) . '


'); + $writer->write('

Runscript #' . ((self::$index/7) + 1) . '


'); } self::$index++; diff --git a/gui/baculum/protected/Web/Portlets/NewRunscriptMenu.tpl b/gui/baculum/protected/Web/Portlets/NewRunscriptMenu.tpl index 392fe3c6c..26b16dad3 100644 --- a/gui/baculum/protected/Web/Portlets/NewRunscriptMenu.tpl +++ b/gui/baculum/protected/Web/Portlets/NewRunscriptMenu.tpl @@ -5,7 +5,7 @@ ID="RunscriptItem" OnCommand="Parent.SourceTemplateControl.newRunscriptDirective" CommandParameter="save" - ClientSide.OnComplete="var el = $('#<%=$this->RunscriptItem->ClientID%>').parents('div').find('h3.options'); BaculaConfig.scroll_to_element(el[el.length-1]);" + ClientSide.OnComplete="var el = $('#<%=$this->RunscriptItem->ClientID%>').parents('div').find('h3.runscript_options'); console.log(el); BaculaConfig.scroll_to_element(el[el.length-1]);" Attributes.onclick="$(this).closest('div.config_new_runscript').hide();" >  Runscript -- 2.47.3