From 2301f12006ea3db899bae123dd7154905159d95d Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Sat, 9 Aug 2014 22:27:22 +0200 Subject: [PATCH] baculum: Improvement loader for dynamic contents --- .../protected/JavaScript/configuration-window.js | 4 ++-- gui/baculum/protected/JavaScript/slide-window.js | 6 ++++-- gui/baculum/protected/Pages/Home.page | 3 +++ gui/baculum/protected/Portlets/ClientList.tpl | 12 ++++++------ .../protected/Portlets/ConfigurationPanel.tpl | 3 +-- gui/baculum/protected/Portlets/JobList.tpl | 12 ++++++------ gui/baculum/protected/Portlets/JobRunList.tpl | 12 ++++++------ gui/baculum/protected/Portlets/PoolList.tpl | 12 ++++++------ gui/baculum/protected/Portlets/StorageList.tpl | 12 ++++++------ gui/baculum/protected/Portlets/VolumeList.tpl | 12 ++++++------ gui/baculum/themes/Baculum-v1/style.css | 14 +++++++++----- 11 files changed, 55 insertions(+), 47 deletions(-) diff --git a/gui/baculum/protected/JavaScript/configuration-window.js b/gui/baculum/protected/JavaScript/configuration-window.js index 2bb7c6a17e..eb70900521 100644 --- a/gui/baculum/protected/JavaScript/configuration-window.js +++ b/gui/baculum/protected/JavaScript/configuration-window.js @@ -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 +}); diff --git a/gui/baculum/protected/JavaScript/slide-window.js b/gui/baculum/protected/JavaScript/slide-window.js index 209ba34f9a..ce8b0cef32 100644 --- a/gui/baculum/protected/JavaScript/slide-window.js +++ b/gui/baculum/protected/JavaScript/slide-window.js @@ -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 +}); diff --git a/gui/baculum/protected/Pages/Home.page b/gui/baculum/protected/Pages/Home.page index 29a41b401d..f622c8a03f 100644 --- a/gui/baculum/protected/Pages/Home.page +++ b/gui/baculum/protected/Pages/Home.page @@ -24,6 +24,9 @@
+
+
+
diff --git a/gui/baculum/protected/Portlets/ClientList.tpl b/gui/baculum/protected/Portlets/ClientList.tpl index 8de08df9d4..2b169c485e 100644 --- a/gui/baculum/protected/Portlets/ClientList.tpl +++ b/gui/baculum/protected/Portlets/ClientList.tpl @@ -10,9 +10,6 @@ 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(); - } \ No newline at end of file + diff --git a/gui/baculum/protected/Portlets/JobList.tpl b/gui/baculum/protected/Portlets/JobList.tpl index 0a9e4f3cb1..b076da81df 100644 --- a/gui/baculum/protected/Portlets/JobList.tpl +++ b/gui/baculum/protected/Portlets/JobList.tpl @@ -10,9 +10,6 @@ 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(); - }