var show = !child_container.is(':visible');
this.show_item(child_container, show);
this.loader_stop(id);
+ /**
+ * This initialization has to be here because on Configure page buttons to save/cancel/delete
+ * resources are available after unfolding selected resource, not before.
+ * It means that without it these buttons are not adjusted well to the page.
+ */
+ W3SideBar.init();
},
unset_config_items: function(id) {
var child_container = this.get_child_container(id);
var W3SideBar = {
ids: {
sidebar: 'sidebar',
- overlay_bg: 'overlay_bg',
- page_main: 'page_main'
+ overlay_bg: 'overlay_bg'
+ },
+ css: {
+ page_main: '.page_main_el'
},
cookies: {
side_bar_hide: 'baculum_side_bar_hide'
init: function() {
this.sidebar = document.getElementById(this.ids.sidebar);
this.overlay_bg = document.getElementById(this.ids.overlay_bg);
- this.page_main = document.getElementById(this.ids.page_main);
+ this.page_main = $(this.css.page_main);
var hide = Cookies.get_cookie(this.cookies.side_bar_hide);
if (hide == 1) {
this.close();
Cookies.set_cookie('baculum_side_bar_hide', 1);
this.sidebar.style.display = 'none';
this.overlay_bg.style.display = 'none';
- this.page_main.style.marginLeft = 0;
+ this.page_main.css({'margin-left': '0', 'width': '100%'});
} else {
Cookies.set_cookie('baculum_side_bar_hide', 0);
this.sidebar.style.display = 'block';
this.overlay_bg.style.display = 'block';
- this.page_main.style.marginLeft = '300px';
+ this.page_main.css({'margin-left': '300px', 'width': 'calc(100% - 300px)'});
}
},
close: function() {
Cookies.set_cookie('baculum_side_bar_hide', 1);
this.sidebar.style.display = 'none';
this.overlay_bg.style.display = 'none';
- this.page_main.style.marginLeft = 0;
+ this.page_main.css({'margin-left': '0', 'width': '100%'});
}
};
msgid "Edit"
msgstr "Edit"
-msgid "Show/hide all resource directives"
-msgstr "Show/hide all resource directives"
+msgid "Show/hide all directives"
+msgstr "Show/hide all directives"
msgid "Show the resource raw config"
msgstr "Show the resource raw config"
msgid "Show the resource raw config"
msgstr "Show the resource raw config"
-msgid "Show/hide all resource directives"
-msgstr "Show/hide all resource directives"
+msgid "Show/hide all directives"
+msgstr "Show/hide all directives"
msgid "Size"
msgstr "サイズ"
msgid "Edit"
msgstr "Edytuj"
-msgid "Show/hide all resource directives"
-msgstr "Pokaż/ukryj wszystkie dyrektywy w zasobie"
+msgid "Show/hide all directives"
+msgstr "Pokaż/ukryj wszystkie dyrektywy"
msgid "Show the resource raw config"
msgstr "Pokaż surową konfigurację zasobu"
msgid "Edit"
msgstr "Editar"
-msgid "Show/hide all resource directives"
+msgid "Show/hide all directives"
msgstr "Mostrar/ocultar todas as diretivas de recursos"
msgid "Show the resource raw config"
</div>
<com:Application.Web.Portlets.MainSideBar />
<!-- !PAGE CONTENT! -->
- <div class="w3-main" id="page_main" style="margin-left:300px; margin-top:43px;">
+ <div class="w3-main page_main_el" id="page_main" style="margin-left:300px; margin-top:43px;">
<span class="w3-tag w3-large w3-purple w3-right w3-padding-small w3-margin-top w3-margin-right">
<i class="fa fa-cogs w3-large"></i> <%[ Running jobs: ]%> <span id="running_jobs"></span>
</span>
</div>
</div>
<com:TActivePanel ID="ConfigDirectives">
- <com:Application.Web.Portlets.DirectiveSetting
- ID="DirectiveSetting"
- Resource="<%=$this->getResource()%>"
- OnLoadDirectives="loadDirectives"
- Visible="<%=$this->LoadValues%>"
- />
- <com:TActiveLinkButton
- CssClass="w3-button w3-green w3-margin-bottom"
- Attributes.onclick="$(this).parent().prev('div.resource_remove_confirm').show();"
- Visible="<%=$this->ShowRemoveButton && $this->LoadValues%>"
- >
- <prop:Text><i class="fa fa-trash-alt"></i> <%=Prado::localize('Remove resource')%></prop:Text>
- </com:TActiveLinkButton>
<com:TActiveRepeater
ID="RepeaterDirectives"
ItemRenderer="Application.Web.Portlets.DirectiveRenderer"
>
</com:TActiveRepeater>
- <div class="w3-row w3-center">
+ <div class="w3-row w3-center w3-border bottom_buttons page_main_el" style="margin-left: 300px">
+ <com:Application.Web.Portlets.DirectiveSetting
+ ID="DirectiveSetting"
+ Resource="<%=$this->getResource()%>"
+ OnLoadDirectives="loadDirectives"
+ Visible="<%=$this->LoadValues%>"
+ />
+ <com:TActiveLinkButton
+ CssClass="w3-button w3-red w3-right"
+ Attributes.onclick="$(this).parent().parent().prev('div.resource_remove_confirm').show();"
+ Visible="<%=$this->ShowRemoveButton && $this->LoadValues%>"
+ >
+ <prop:Text><i class="fa fa-trash-alt"></i> <%=Prado::localize('Remove resource')%></prop:Text>
+ </com:TActiveLinkButton>
<com:TActiveLinkButton
ID="Cancel"
CssClass="w3-button w3-red"
<i class="fa fa-save"></i> <%=$this->getLoadValues() ? Prado::localize('Save') : Prado::localize('Create')%>
</prop:Text>
<prop:ClientSide.OnLoading>
- $('.save_progress').show();
- $('.save_done').hide();
+ $('.save_progress').css('visibility', 'visible');
+ $('.save_done').css('visibility', 'hidden');
</prop:ClientSide.OnLoading>
<prop:ClientSide.OnComplete>
- $('.save_progress').hide();
- $('.save_done').show();
+ $('.save_progress').css('visibility', 'hidden');
+ $('.save_done').css('visibility', 'visible');
var err_el = '<%=$this->SaveDirectiveError->ClientID%>';
if (document.getElementById(err_el).style.display == 'none') {
<%=$this->SaveDirectiveActionOk%>
}
</prop:ClientSide.OnComplete>
<prop:ClientSide.OnFailure>
- $('.save_progress').hide();
- $('.save_done').show();
+ $('.save_progress').css('visibility', 'hidden');
+ $('.save_done').css('visibility', 'visible');
</prop:ClientSide.OnFailure>
</com:TActiveLinkButton>
- <i class="fa fa-sync-alt w3-spin save_progress" style="display: none"></i>
- <com:TActiveLabel ID="SaveDirectiveOk" Display="None" CssClass="w3-text-green"><i class="fa fa-check save_done"></i> <%[ OK ]%></com:TActiveLabel>
- <com:TActiveLabel ID="SaveDirectiveError" Display="None" CssClass="w3-text-red"><i class="fa fa-times-circle save_done"></i> <%[ Error ]%></com:TActiveLabel>
- <br />
- <com:TActiveLabel ID="SaveDirectiveErrMsg" Display="None" CssClass="w3-text-red" />
+ <span class="save_progress" style="width: 10px; visibility: hidden"><i class="fa fa-sync-alt w3-spin"></i></span>
+ <div class="save_done" style="display: inline-block; min-width: 70px;">
+ <com:TActiveLabel ID="SaveDirectiveOk" Display="None" CssClass="w3-text-green"><i class="fa fa-check save_done"></i> <%[ OK ]%></com:TActiveLabel>
+ <com:TActiveLabel ID="SaveDirectiveError" Display="None" CssClass="w3-text-red"><i class="fa fa-times-circle save_done"></i> <%[ Error ]%></com:TActiveLabel>
+ <com:TActiveLabel ID="SaveDirectiveErrMsg" Display="None" CssClass="w3-text-red" />
+ </div>
</div>
</com:TActivePanel>
<com:TLabel ID="DirectiveOptions" CssClass="directive_setting">
- <button type="button" class="w3-button w3-green w3-margin-bottom" rel="show_all_directives"><i class="fa fa-expand-arrows-alt"></i> <%[ Show/hide all resource directives ]%></button>
+ <button type="button" class="w3-button w3-green" rel="show_all_directives"><i class="fa fa-expand-arrows-alt"></i> <%[ Show/hide all directives ]%></button>
<!--li rel="show_raw_config"><%[ Show the resource raw config ]%></li>
<li rel="save_multiple_hosts"><%[ Save the resource on multiple hosts ]%></li>
<li rel="save_addition_path"><%[ Save the resource to additional path ]%></li>
vertical-align: sub;
padding-top: 11px;
}
+
+.bottom_buttons {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ padding: 5px 0;
+ min-height: 48px;
+ background-color: rgba(255, 255, 255, 0.5);
+ width: calc(100% - 300px);
+}
+
+.bottom_buttons a, .bottom_buttons button {
+ margin: 0 3px;
+}