]> git.sur5r.net Git - bacula/bacula/commitdiff
baculum: Improvement loader for dynamic contents
authorMarcin Haba <marcin.haba@bacula.pl>
Sat, 9 Aug 2014 20:27:22 +0000 (22:27 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Sat, 9 Aug 2014 20:27:22 +0000 (22:27 +0200)
gui/baculum/protected/JavaScript/configuration-window.js
gui/baculum/protected/JavaScript/slide-window.js
gui/baculum/protected/Pages/Home.page
gui/baculum/protected/Portlets/ClientList.tpl
gui/baculum/protected/Portlets/ConfigurationPanel.tpl
gui/baculum/protected/Portlets/JobList.tpl
gui/baculum/protected/Portlets/JobRunList.tpl
gui/baculum/protected/Portlets/PoolList.tpl
gui/baculum/protected/Portlets/StorageList.tpl
gui/baculum/protected/Portlets/VolumeList.tpl
gui/baculum/themes/Baculum-v1/style.css

index 2bb7c6a17ebbb427482b5b0363811760320575d8..eb7090052107b0dfa88487837a0f769a4182bf19 100644 (file)
@@ -1,7 +1,7 @@
 var ConfigurationWindowClass = new Class.create({
        initialize: function(id) {
                this.window_id = id + 'configuration';
-               this.progress_id = id + 'configuration-progress';
+               this.progress_id = 'configuration-progress';
                this.lock = false;
        },
 
@@ -36,4 +36,4 @@ var ConfigurationWindowClass = new Class.create({
        is_progress: function() {
                return $(this.progress_id).getStyle('display') == 'block';
        }
-});
\ No newline at end of file
+});
index 209ba34f9ae5cb20ceaf4ea3eac7872bb29558ca..ce8b0cef3265c747adc00d1e0ecae607dc982770 100644 (file)
@@ -20,6 +20,7 @@ var SlideWindowClass = Class.create({
        elements : {
                containerSuffix : '-slide-window-container',
                configurationWindows : 'div.configuration',
+               configurationProgress: 'div.configuration-progress',
                contentItems : 'slide-window-element',
                contentAlternatingItems : 'slide-window-element-alternating',
                toolsButtonSuffix : '-slide-window-tools',
@@ -156,7 +157,8 @@ var SlideWindowClass = Class.create({
 
        isConfigurationOpen: function() {
                var is_open = false;
-               $$(this.elements.configurationWindows).each(function(el) {
+               $$(this.elements.configurationWindows, this.elements.configurationProgress).each(function(el) {
+                       console.log(el);
                        if(el.getStyle('display') == 'block') {
                                is_open = true;
                                throw $break;
@@ -198,4 +200,4 @@ document.observe("dom:loaded", function() {
                        }.bind(el));
                });
        }
-});
\ No newline at end of file
+});
index 29a41b401d573eebbc9d18b985426bedc3e5d03d..f622c8a03f80b40703b87e666526f8b8ec59a783 100644 (file)
@@ -24,6 +24,9 @@
                                <com:Application.Portlets.JobList ID="JobWindow" ShowID="<%=$this->JobBtn->ClientID%>" WindowTitle="<%[ Jobs ]%>" />
                                <com:Application.Portlets.JobRunList ID="JobRunWindow" ShowID="<%=$this->JobRunBtn->ClientID%>" WindowTitle="<%[ Jobs for run ]%>" />
                                <div id="configuration">
+                                       <div id="configuration-box">
+                                               <div id="configuration-progress" class="configuration-progress"></div>
+                                       </div>
                                        <com:Application.Portlets.VolumeConfiguration ID="VolumeConfiguration" />
                                        <com:Application.Portlets.StorageConfiguration ID="StorageConfiguration" />
                                        <com:Application.Portlets.ClientConfiguration ID="ClientConfiguration" />
index 8de08df9d481b9aa83b4fadf4876cc00a2651ee3..2b169c485e0ec165601864a1fe41517380cb8a26 100644 (file)
@@ -10,9 +10,6 @@
                                        <prop:ClientSide.OnComplete>
                                                ConfigurationWindow<%=$this->getPage()->ClientConfiguration->getMaster()->ClientID%>.show();
                                                ConfigurationWindow<%=$this->getPage()->ClientConfiguration->getMaster()->ClientID%>.progress(false);
-                                               if(<%=$this->getPage()->ClientWindow->ShowID%>SlideWindow.isFullSize()) {
-                                                       <%=$this->getPage()->ClientWindow->ShowID%>SlideWindow.resetSize();
-                                               }
                                        </prop:ClientSide.OnComplete>
                                </com:TCallback>
                                <script type="text/javascript">
@@ -20,6 +17,9 @@
                                                var request = <%= $this->ClientElementCall->ActiveControl->Javascript %>;
                                                if(ConfigurationWindow<%=$this->getPage()->ClientConfiguration->getMaster()->ClientID%>.is_progress() == false) {
                                                        ConfigurationWindow<%=$this->getPage()->ClientConfiguration->getMaster()->ClientID%>.progress(true);
+                                                       if(<%=$this->getPage()->ClientWindow->ShowID%>SlideWindow.isFullSize()) {
+                                                               <%=$this->getPage()->ClientWindow->ShowID%>SlideWindow.resetSize();
+                                                       }
                                                        request.dispatch();
                                                }
                                        });
@@ -45,9 +45,6 @@
                                                <prop:ClientSide.OnComplete>
                                                        ConfigurationWindow<%=$this->getPage()->ClientConfiguration->getMaster()->ClientID%>.show();
                                                        ConfigurationWindow<%=$this->getPage()->ClientConfiguration->getMaster()->ClientID%>.progress(false);
-                                                       if(<%=$this->getPage()->ClientWindow->ShowID%>SlideWindow.isFullSize()) {
-                                                               <%=$this->getPage()->ClientWindow->ShowID%>SlideWindow.resetSize();
-                                                       }
                                                </prop:ClientSide.OnComplete>
                                        </com:TCallback>
                                        <script type="text/javascript">
@@ -55,6 +52,9 @@
                                                        var request = <%= $this->ClientTableElementCall->ActiveControl->Javascript %>;
                                                        if(ConfigurationWindow<%=$this->getPage()->ClientConfiguration->getMaster()->ClientID%>.is_progress() == false) {
                                                                ConfigurationWindow<%=$this->getPage()->ClientConfiguration->getMaster()->ClientID%>.progress(true);
+                                                               if(<%=$this->getPage()->ClientWindow->ShowID%>SlideWindow.isFullSize()) {
+                                                                       <%=$this->getPage()->ClientWindow->ShowID%>SlideWindow.resetSize();
+                                                               }
                                                                request.dispatch();
                                                        }
                                                });
index caafffa8c12f46e0cd99a62f16119cc88b7a2684..103618d39040ffaa5f51e6e04991c92981f4b24f 100644 (file)
@@ -1,5 +1,4 @@
 <div id="<%=$this->ClientID%>configuration" class="configuration">
-       <div id="<%=$this->ClientID%>configuration-progress" class="configuration-progress"></div>
        <div id="<%=$this->ClientID%>configuration-window-container" class="configuration-window-container">
                <com:TActivePanel DefaultButton="ApplyChanges" CssClass="configuration-window-content">
                        <com:TImageButton ImageUrl="<%=$this->getPage()->getTheme()->getBaseUrl()%>/icon_close.png" ImageAlign="right" Attributes.onclick="ConfigurationWindow<%=$this->ClientID%>.hide(); return false;" ToolTip="<%[ Close]%>" />
@@ -9,4 +8,4 @@
 </div>
 <script type="text/javascript">
        var ConfigurationWindow<%=$this->ClientID%> = new ConfigurationWindowClass('<%=$this->ClientID%>');
-</script>
\ No newline at end of file
+</script>
index 0a9e4f3cb196274764fd23ef6e0a9cf4e478f35a..b076da81df50f397931e91ce6421f0118720c038 100644 (file)
@@ -10,9 +10,6 @@
                                <prop:ClientSide.OnComplete>
                                        ConfigurationWindow<%=$this->getPage()->JobConfiguration->getMaster()->ClientID%>.show();
                                        ConfigurationWindow<%=$this->getPage()->JobConfiguration->getMaster()->ClientID%>.progress(false);
-                                       if(<%=$this->getPage()->JobWindow->ShowID%>SlideWindow.isFullSize()) {
-                                               <%=$this->getPage()->JobWindow->ShowID%>SlideWindow.resetSize();
-                                       }
                                </prop:ClientSide.OnComplete>
                        </com:TCallback>
                        <script type="text/javascript">
@@ -20,6 +17,9 @@
                                        var request = <%= $this->JobElementCall->ActiveControl->Javascript %>;
                                        if(ConfigurationWindow<%=$this->getPage()->JobConfiguration->getMaster()->ClientID%>.is_progress() == false) {
                                                ConfigurationWindow<%=$this->getPage()->JobConfiguration->getMaster()->ClientID%>.progress(true);
+                                               if(<%=$this->getPage()->JobWindow->ShowID%>SlideWindow.isFullSize()) {
+                                                       <%=$this->getPage()->JobWindow->ShowID%>SlideWindow.resetSize();
+                                               }
                                                request.dispatch();
                                        }
                                });
@@ -51,9 +51,6 @@
                                        <prop:ClientSide.OnComplete>
                                                ConfigurationWindow<%=$this->getPage()->JobConfiguration->getMaster()->ClientID%>.show();
                                                ConfigurationWindow<%=$this->getPage()->JobConfiguration->getMaster()->ClientID%>.progress(false);
-                                               if(<%=$this->getPage()->JobWindow->ShowID%>SlideWindow.isFullSize()) {
-                                                       <%=$this->getPage()->JobWindow->ShowID%>SlideWindow.resetSize();
-                                               }
                                        </prop:ClientSide.OnComplete>
                                </com:TCallback>
                                <script type="text/javascript">
@@ -61,6 +58,9 @@
                                                var request = <%= $this->JobTableElementCall->ActiveControl->Javascript %>;
                                                if(ConfigurationWindow<%=$this->getPage()->JobConfiguration->getMaster()->ClientID%>.is_progress() == false) {
                                                        ConfigurationWindow<%=$this->getPage()->JobConfiguration->getMaster()->ClientID%>.progress(true);
+                                                       if(<%=$this->getPage()->JobWindow->ShowID%>SlideWindow.isFullSize()) {
+                                                               <%=$this->getPage()->JobWindow->ShowID%>SlideWindow.resetSize();
+                                                       }
                                                        request.dispatch();
                                                }
                                        });
index 525a03a49157edf87a08f8df5207b25c93f00000..cc649925fd0f694bc0c39645c82701baa9d8d288 100644 (file)
@@ -11,9 +11,6 @@
                                <prop:ClientSide.OnComplete>
                                        ConfigurationWindow<%=$this->getPage()->JobRunConfiguration->getMaster()->ClientID%>.show();
                                        ConfigurationWindow<%=$this->getPage()->JobRunConfiguration->getMaster()->ClientID%>.progress(false);
-                                       if(<%=$this->getPage()->JobRunWindow->ShowID%>SlideWindow.isFullSize()) {
-                                               <%=$this->getPage()->JobRunWindow->ShowID%>SlideWindow.resetSize();
-                                       }
                                </prop:ClientSide.OnComplete>
                        </com:TCallback>
                        <script type="text/javascript">
@@ -21,6 +18,9 @@
                                        var request = <%= $this->JobElementCall->ActiveControl->Javascript %>;
                                        if(ConfigurationWindow<%=$this->getPage()->JobRunConfiguration->getMaster()->ClientID%>.is_progress() == false) {
                                                ConfigurationWindow<%=$this->getPage()->JobRunConfiguration->getMaster()->ClientID%>.progress(true);
+                                               if(<%=$this->getPage()->JobRunWindow->ShowID%>SlideWindow.isFullSize()) {
+                                                       <%=$this->getPage()->JobRunWindow->ShowID%>SlideWindow.resetSize();
+                                               }
                                                request.dispatch();
                                        }
                                });
@@ -47,9 +47,6 @@
                                        <prop:ClientSide.OnComplete>
                                                ConfigurationWindow<%=$this->getPage()->JobRunConfiguration->getMaster()->ClientID%>.show();
                                                ConfigurationWindow<%=$this->getPage()->JobRunConfiguration->getMaster()->ClientID%>.progress(false);
-                                               if(<%=$this->getPage()->JobRunWindow->ShowID%>SlideWindow.isFullSize()) {
-                                                       <%=$this->getPage()->JobRunWindow->ShowID%>SlideWindow.resetSize();
-                                               }
                                        </prop:ClientSide.OnComplete>
                                </com:TCallback>
                                <script type="text/javascript">
@@ -57,6 +54,9 @@
                                                var request = <%= $this->JobTableElementCall->ActiveControl->Javascript %>;
                                                if(ConfigurationWindow<%=$this->getPage()->JobRunConfiguration->getMaster()->ClientID%>.is_progress() == false) {
                                                        ConfigurationWindow<%=$this->getPage()->JobRunConfiguration->getMaster()->ClientID%>.progress(true);
+                                                       if(<%=$this->getPage()->JobRunWindow->ShowID%>SlideWindow.isFullSize()) {
+                                                               <%=$this->getPage()->JobRunWindow->ShowID%>SlideWindow.resetSize();
+                                                       }
                                                        request.dispatch();
                                                }
                                        });
index add1ca8b6180f5686d64294afc0532a1ec5d492a..326ca8115697745129b2f3a937318793e363ae02 100644 (file)
@@ -10,9 +10,6 @@
                                        <prop:ClientSide.OnComplete>
                                                ConfigurationWindow<%=$this->getPage()->PoolConfiguration->getMaster()->ClientID%>.show();
                                                ConfigurationWindow<%=$this->getPage()->PoolConfiguration->getMaster()->ClientID%>.progress(false);
-                                               if(<%=$this->getPage()->PoolWindow->ShowID%>SlideWindow.isFullSize()) {
-                                                       <%=$this->getPage()->PoolWindow->ShowID%>SlideWindow.resetSize();
-                                               }
                                        </prop:ClientSide.OnComplete>
                                </com:TCallback>
                                <script type="text/javascript">
@@ -20,6 +17,9 @@
                                                var request = <%= $this->PoolElementCall->ActiveControl->Javascript %>;
                                                if(ConfigurationWindow<%=$this->getPage()->PoolConfiguration->getMaster()->ClientID%>.is_progress() == false) {
                                                        ConfigurationWindow<%=$this->getPage()->PoolConfiguration->getMaster()->ClientID%>.progress(true);
+                                                       if(<%=$this->getPage()->PoolWindow->ShowID%>SlideWindow.isFullSize()) {
+                                                               <%=$this->getPage()->PoolWindow->ShowID%>SlideWindow.resetSize();
+                                                       }
                                                        request.dispatch();
                                                }
                                        });
@@ -46,9 +46,6 @@
                                                <prop:ClientSide.OnComplete>
                                                        ConfigurationWindow<%=$this->getPage()->PoolConfiguration->getMaster()->ClientID%>.show();
                                                        ConfigurationWindow<%=$this->getPage()->PoolConfiguration->getMaster()->ClientID%>.progress(false);
-                                                       if(<%=$this->getPage()->PoolWindow->ShowID%>SlideWindow.isFullSize()) {
-                                                               <%=$this->getPage()->PoolWindow->ShowID%>SlideWindow.resetSize();
-                                                       }
                                                </prop:ClientSide.OnComplete>
                                        </com:TCallback>
                                        <script type="text/javascript">
@@ -56,6 +53,9 @@
                                                        var request = <%= $this->PoolTableElementCall->ActiveControl->Javascript %>;
                                                        if(ConfigurationWindow<%=$this->getPage()->PoolConfiguration->getMaster()->ClientID%>.is_progress() == false) {
                                                                ConfigurationWindow<%=$this->getPage()->PoolConfiguration->getMaster()->ClientID%>.progress(true);
+                                                               if(<%=$this->getPage()->PoolWindow->ShowID%>SlideWindow.isFullSize()) {
+                                                                       <%=$this->getPage()->PoolWindow->ShowID%>SlideWindow.resetSize();
+                                                               }
                                                                request.dispatch();
                                                        }
                                                });
index 5cd44854909557e473822d8e88e7d0023df29faa..425643c33f89d6353535977b9de6e0a7f62d3f40 100644 (file)
@@ -10,9 +10,6 @@
                                        <prop:ClientSide.OnComplete>
                                                ConfigurationWindow<%=$this->getPage()->StorageConfiguration->getMaster()->ClientID%>.show();
                                                ConfigurationWindow<%=$this->getPage()->StorageConfiguration->getMaster()->ClientID%>.progress(false);
-                                               if(<%=$this->getPage()->StorageWindow->ShowID%>SlideWindow.isFullSize()) {
-                                                       <%=$this->getPage()->StorageWindow->ShowID%>SlideWindow.resetSize();
-                                               }
                                        </prop:ClientSide.OnComplete>
                                </com:TCallback>
                                <script type="text/javascript">
@@ -20,6 +17,9 @@
                                                var request = <%= $this->StorageElementCall->ActiveControl->Javascript %>;
                                                if(ConfigurationWindow<%=$this->getPage()->StorageConfiguration->getMaster()->ClientID%>.is_progress() == false) {
                                                        ConfigurationWindow<%=$this->getPage()->StorageConfiguration->getMaster()->ClientID%>.progress(true);
+                                                       if(<%=$this->getPage()->StorageWindow->ShowID%>SlideWindow.isFullSize()) {
+                                                               <%=$this->getPage()->StorageWindow->ShowID%>SlideWindow.resetSize();
+                                                       }
                                                        request.dispatch();
                                                }
                                        });
@@ -45,9 +45,6 @@
                                                <prop:ClientSide.OnComplete>
                                                        ConfigurationWindow<%=$this->getPage()->StorageConfiguration->getMaster()->ClientID%>.show();
                                                        ConfigurationWindow<%=$this->getPage()->StorageConfiguration->getMaster()->ClientID%>.progress(false);
-                                                       if(<%=$this->getPage()->StorageWindow->ShowID%>SlideWindow.isFullSize()) {
-                                                               <%=$this->getPage()->StorageWindow->ShowID%>SlideWindow.resetSize();
-                                                       }
                                                </prop:ClientSide.OnComplete>
                                        </com:TCallback>
                                        <script type="text/javascript">
@@ -55,6 +52,9 @@
                                                        var request = <%= $this->StorageTableElementCall->ActiveControl->Javascript %>;
                                                        if(ConfigurationWindow<%=$this->getPage()->StorageConfiguration->getMaster()->ClientID%>.is_progress() == false) {
                                                                ConfigurationWindow<%=$this->getPage()->StorageConfiguration->getMaster()->ClientID%>.progress(true);
+                                                               if(<%=$this->getPage()->StorageWindow->ShowID%>SlideWindow.isFullSize()) {
+                                                                       <%=$this->getPage()->StorageWindow->ShowID%>SlideWindow.resetSize();
+                                                               }
                                                                request.dispatch();
                                                        }
                                                });
index f85e7a9218db5246365924147e270c4b113492f3..27e8209c58c1a35c51f663f72f1addd1bc109fcc 100644 (file)
@@ -12,9 +12,6 @@
                                <prop:ClientSide.OnComplete>
                                        ConfigurationWindow<%=$this->getPage()->VolumeConfiguration->getMaster()->ClientID%>.show();
                                        ConfigurationWindow<%=$this->getPage()->VolumeConfiguration->getMaster()->ClientID%>.progress(false);
-                                       if(<%=$this->getPage()->VolumeWindow->ShowID%>SlideWindow.isFullSize()) {
-                                               <%=$this->getPage()->VolumeWindow->ShowID%>SlideWindow.resetSize();
-                                       }
                                </prop:ClientSide.OnComplete>
                        </com:TCallback>
                        <script type="text/javascript">
@@ -22,6 +19,9 @@
                                        var request = <%= $this->VolumeElementCall->ActiveControl->Javascript %>;
                                        if(ConfigurationWindow<%=$this->getPage()->VolumeConfiguration->getMaster()->ClientID%>.is_progress() == false) {
                                                ConfigurationWindow<%=$this->getPage()->VolumeConfiguration->getMaster()->ClientID%>.progress(true);
+                                               if(<%=$this->getPage()->VolumeWindow->ShowID%>SlideWindow.isFullSize()) {
+                                                       <%=$this->getPage()->VolumeWindow->ShowID%>SlideWindow.resetSize();
+                                               }
                                                request.dispatch();
                                        }
                                });
@@ -48,9 +48,6 @@
                                        <prop:ClientSide.OnComplete>
                                                ConfigurationWindow<%=$this->getPage()->VolumeConfiguration->getMaster()->ClientID%>.show();
                                                ConfigurationWindow<%=$this->getPage()->VolumeConfiguration->getMaster()->ClientID%>.progress(false);
-                                               if(<%=$this->getPage()->VolumeWindow->ShowID%>SlideWindow.isFullSize()) {
-                                                       <%=$this->getPage()->VolumeWindow->ShowID%>SlideWindow.resetSize();
-                                               }
                                        </prop:ClientSide.OnComplete>
                                </com:TCallback>
                                <script type="text/javascript">
@@ -58,6 +55,9 @@
                                                var request = <%= $this->VolumeTableElementCall->ActiveControl->Javascript %>;
                                                if(ConfigurationWindow<%=$this->getPage()->VolumeConfiguration->getMaster()->ClientID%>.is_progress() == false) {
                                                        ConfigurationWindow<%=$this->getPage()->VolumeConfiguration->getMaster()->ClientID%>.progress(true);
+                                                       if(<%=$this->getPage()->VolumeWindow->ShowID%>SlideWindow.isFullSize()) {
+                                                               <%=$this->getPage()->VolumeWindow->ShowID%>SlideWindow.resetSize();
+                                                       }
                                                        request.dispatch();
                                                }
                                        });
index bdf99bf8bffd3f89d7997d36c0bcd806d52d4656..23052985a42dd683dd1052f40ccdc45e586348aa 100644 (file)
@@ -120,8 +120,8 @@ div.configuration {
        margin: 12px 0;
        z-index: 5;
        position: relative;
-       left: 447px;
-       top: 0;
+       left: 446px;
+       top: 0px;
        background-color: #898889;
        -webkit-border-radius: 10px;
        -moz-border-radius: 10px;
@@ -129,6 +129,10 @@ div.configuration {
        display: none;
 }
 
+#configuration {
+       position: absolute;
+}
+
 #configuration div.field select {
        width: 178px;
 }
@@ -143,8 +147,8 @@ div.configuration-progress {
        height: 575px;
        z-index: 10;
        position: absolute;
-       top: 0;
-       left: 0;
+       top: 12px;
+       left: 446px;
        display: none;
        border-radius: 10px;
 }
@@ -774,4 +778,4 @@ div.small {
        border-right: 1px solid black;
        border-top: 1px solid black;
        margin: 3px 0;
-}
\ No newline at end of file
+}