Attributes.onclick="return BaculaConfig.unset_config_items(this.id);"
Text="<strong><%=$this->Data['resource_type']%></strong>: <%=$this->Data['resource_name']%>"
Style="text-decoration: none"
- CommandParameter="show"
/>
<i class="fa fa-sync w3-spin" style="display: none"><i/>
</td>
'Volmgmt'
);
- public function loadConfig($sender, $param) {
+ public function loadConfig() {
$load_values = $this->getLoadValues();
$destinations = (array)$this->getData();
if (array_key_exists('Type', $destinations)) {
public $resource_names = array();
+ private $item_loaded = false;
+
public function onLoad($param) {
parent::onLoad($param);
- $this->createItemInternal();
+ if (!$this->item_loaded) {
+ $this->createItemInternal();
+ $this->item_loaded = true;
+ }
+ }
+
+ public function dataBind() {
+ if (!$this->item_loaded) {
+ $this->createItemInternal();
+ $this->item_loaded = true;
+ }
+ parent::dataBind();
}
public function createItemInternal() {
$item = $this->createItem($data);
$this->addParsedObject($item);
+ $cmd = $item->getCmdParam();
if ($item instanceof DirectiveTemplate) {
$item->createDirective();
- } elseif ($item instanceof DirectiveListTemplate) {
- $item->loadConfig(null, null);
+ } elseif ($item instanceof DirectiveListTemplate && $cmd === '') {
+ $item->loadConfig();
}
}
'DirectiveComboBox'
);
- public function loadConfig($sender, $param) {
+ public function loadConfig() {
$load_values = $this->getLoadValues();
$host = $this->getHost();
$component_type = $this->getComponentType();
'TimeMinHourly'
);
- public function loadConfig($sender, $param) {
+ public function loadConfig() {
$load_values = $this->getLoadValues();
$directives = $this->getData();
$host = $this->getHost();
<com:TActiveRepeater ID="RepeaterScheduleRuns" OnItemDataBound="createRunItem">
<prop:ItemTemplate>
<div class="w3-card-4 w3-padding w3-margin-bottom directive runscript">
- <h2><%[ Run ]%> #<%=($this->ItemIndex+1)%></h2>
+ <h2 class="schedule_options"><%[ Run ]%> #<%=($this->ItemIndex+1)%></h2>
<com:Application.Web.Portlets.DirectiveComboBox
ID="Level"
/>
ID="RunscriptItem"
OnCommand="Parent.SourceTemplateControl.newScheduleDirective"
CommandParameter="save"
- ClientSide.OnComplete="var el = $('#<%=$this->RunscriptItem->ClientID%>').parents('div').find('h2'); BaculaConfig.scroll_to_element(el[el.length-1]);"
+ ClientSide.OnComplete="var el = $('#<%=$this->RunscriptItem->ClientID%>').parents('div').find('h2.schedule_options'); BaculaConfig.scroll_to_element(el[el.length-1], -100);"
Text="Run"
Attributes.onclick="$(this).closest('div.config_new_schedule').hide();"
/>