]> git.sur5r.net Git - bacula/bacula/commitdiff
baculum: Added window elements count
authorMarcin Haba <marcin.haba@bacula.pl>
Thu, 14 Aug 2014 19:50:19 +0000 (21:50 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Thu, 14 Aug 2014 19:50:19 +0000 (21:50 +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/JobList.tpl
gui/baculum/protected/Portlets/JobRunList.tpl
gui/baculum/protected/Portlets/PoolList.tpl
gui/baculum/protected/Portlets/SlideWindow.tpl
gui/baculum/protected/Portlets/StorageList.tpl
gui/baculum/protected/Portlets/VolumeList.tpl

index eb7090052107b0dfa88487837a0f769a4182bf19..d6cd0847f6be925dbb5303b66538c4ecee735813 100644 (file)
@@ -35,5 +35,15 @@ var ConfigurationWindowClass = new Class.create({
 
        is_progress: function() {
                return $(this.progress_id).getStyle('display') == 'block';
+       },
+       openConfigurationWindow: function(request, slideWindowObj) {
+               if(this.is_progress() === false) {
+                       this.progress(true);
+                       if(slideWindowObj.isFullSize() === true) {
+                               slideWindowObj.resetSize();
+                       }
+                       request.dispatch();
+               }
        }
 });
+
index 7c2f6fcff2379860e80b1e32e865bfb3a310c4c8..869d7c5234ec96f8bab66f75eb6a428a97d48b3e 100644 (file)
@@ -24,11 +24,11 @@ var SlideWindowClass = Class.create({
                contentItems : 'slide-window-element',
                contentAlternatingItems : 'slide-window-element-alternating',
                toolsButtonSuffix : '-slide-window-tools',
-               toolbarSuffix : '-slide-window-toolbar'
+               toolbarSuffix : '-slide-window-toolbar',
+               titleSuffix : '-slide-window-title'
        },
 
        initialize: function(windowId, data) {
-
                this.windowId = windowId;
                this.window = $(this.windowId + this.elements.containerSuffix);
                this.tools = $(this.windowId + this.elements.toolsButtonSuffix);
@@ -60,7 +60,6 @@ var SlideWindowClass = Class.create({
                        alert('slide-window.js - "search" property does not exists.');
                        return false;
                }
-
                this.setEvents();
        },
 
@@ -168,7 +167,7 @@ var SlideWindowClass = Class.create({
 
        setSearch: function() {
                var search_pattern = new RegExp(this.search.value)
-               $$('div[id=' + this.windowId + this.elements.containerSuffix + '] div.' + this.elements.contentItems).each(function(value){
+               $$('div[id="' + this.windowId + this.elements.containerSuffix + '"] div.' + this.elements.contentItems).each(function(value){
                                
                                if(search_pattern.match(value.childNodes[2].textContent) == false) {
                                        value.setStyle({'display' : 'none'});
@@ -177,7 +176,7 @@ var SlideWindowClass = Class.create({
                                }
                        }.bind(search_pattern));
                        
-                       $$('div[id=' + this.windowId + this.elements.containerSuffix + '] tr.' + this.elements.contentItems + ', div[id=' + this.windowId + this.elements.containerSuffix + '] tr.' + this.elements.contentAlternatingItems).each(function(value){
+                       $$('div[id="' + this.windowId + this.elements.containerSuffix + '"] tr.' + this.elements.contentItems + ', div[id="' + this.windowId + this.elements.containerSuffix + '"] tr.' + this.elements.contentAlternatingItems).each(function(value){
                                if(search_pattern.match(value.down('div').innerHTML) == false) {
                                        value.setStyle({'display' : 'none'});
                                } else {
@@ -185,7 +184,12 @@ var SlideWindowClass = Class.create({
                                }
                        }.bind(search_pattern));
        },
-
+       setElementsCount : function() {
+               var title_el = $(this.windowId + this.elements.titleSuffix);
+               var elements_count = $$('div[id="' + this.windowId + this.elements.containerSuffix + '"] div.' + this.elements.contentItems).length || $$('div[id="' + this.windowId + this.elements.containerSuffix + '"] tr.' + this.elements.contentItems + ', div[id="' + this.windowId + this.elements.containerSuffix + '"] tr.' + this.elements.contentAlternatingItems).length;
+               var count_el = $(this.windowId + this.elements.titleSuffix).getElementsByTagName('span')[0];
+               $(count_el).update(' (' + elements_count + ')');
+       },
        toggleToolbar: function() {
                Effect.toggle($(this.windowId + this.elements.toolbarSuffix), 'slide', { duration: 0.2});
        }
index f622c8a03f80b40703b87e666526f8b8ec59a783..8e7ca3221b7d81c02e1e264c43fc76f875b95683 100644 (file)
@@ -6,12 +6,12 @@
                <div id="directors"><com:TLabel ForControl="Director" Text="<%[ Director: ]%>" /> <com:TActiveDropDownList ID="Director" OnTextChanged="director" /></div>
                </div>
                <div id="menu-left">
-                       <com:TActiveButton ID="StorageBtn" CssClass="storage-btn" Attributes.onmouseover="javascript:showTip(this, 'Storage Daemons', 'Configuration of storage daemons.');" ClientSide.OnLoading="$('<%=$this->StorageWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'block'});" ClientSide.OnComplete="$('<%=$this->StorageWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'none'});" />
-                       <com:TActiveButton ID="ClientBtn" CssClass="client-btn" Attributes.onmouseover="javascript:showTip(this, 'Clients', 'Configuration of clients daemons.');" ClientSide.OnLoading="$('<%=$this->ClientWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'block'});" ClientSide.OnComplete="$('<%=$this->ClientWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'none'});" />
-                       <com:TActiveButton ID="MediaBtn" CssClass="media-btn" Attributes.onmouseover="javascript:showTip(this, 'Volumes', 'Management of volumes.');" ClientSide.OnLoading="$('<%=$this->VolumeWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'block'});" ClientSide.OnComplete="$('<%=$this->VolumeWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'none'});" />
-                       <com:TActiveButton ID="PoolBtn" CssClass="pool-btn" Attributes.onmouseover="javascript:showTip(this, 'Pools', 'Management of volumes pools.');" ClientSide.OnLoading="$('<%=$this->PoolWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'block'});" ClientSide.OnComplete="$('<%=$this->PoolWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'none'});" />
-                       <com:TActiveButton ID="JobBtn" CssClass="job-btn" Attributes.onmouseover="javascript:showTip(this, 'Jobs', 'Jobs settings.');" ClientSide.OnLoading="$('<%=$this->JobWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'block'});" ClientSide.OnComplete="$('<%=$this->JobWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'none'});" />
-                       <com:TActiveButton ID="JobRunBtn" CssClass="jobrun-btn" Attributes.onmouseover="javascript:showTip(this, 'Run job', 'Starting jobs.');" ClientSide.OnLoading="$('<%=$this->JobRunWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'block'});" ClientSide.OnComplete="$('<%=$this->JobRunWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'none'});" />
+                       <com:TActiveButton ID="StorageBtn" CssClass="storage-btn" Attributes.onmouseover="javascript:showTip(this, 'Storage Daemons', 'Configuration of storage daemons.');" ClientSide.OnLoading="$('<%=$this->StorageWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'block'});" ClientSide.OnComplete="$('<%=$this->StorageWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'none'});<%=$this->StorageBtn->ClientID%>SlideWindow.setElementsCount();" />
+                       <com:TActiveButton ID="ClientBtn" CssClass="client-btn" Attributes.onmouseover="javascript:showTip(this, 'Clients', 'Configuration of clients daemons.');" ClientSide.OnLoading="$('<%=$this->ClientWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'block'});" ClientSide.OnComplete="$('<%=$this->ClientWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'none'});<%=$this->ClientBtn->ClientID%>SlideWindow.setElementsCount();" />
+                       <com:TActiveButton ID="MediaBtn" CssClass="media-btn" Attributes.onmouseover="javascript:showTip(this, 'Volumes', 'Management of volumes.');" ClientSide.OnLoading="$('<%=$this->VolumeWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'block'});" ClientSide.OnComplete="$('<%=$this->VolumeWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'none'});<%=$this->MediaBtn->ClientID%>SlideWindow.setElementsCount();" />
+                       <com:TActiveButton ID="PoolBtn" CssClass="pool-btn" Attributes.onmouseover="javascript:showTip(this, 'Pools', 'Management of volumes pools.');" ClientSide.OnLoading="$('<%=$this->PoolWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'block'});" ClientSide.OnComplete="$('<%=$this->PoolWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'none'});<%=$this->PoolBtn->ClientID%>SlideWindow.setElementsCount();" />
+                       <com:TActiveButton ID="JobBtn" CssClass="job-btn" Attributes.onmouseover="javascript:showTip(this, 'Jobs', 'Jobs settings.');" ClientSide.OnLoading="$('<%=$this->JobWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'block'});" ClientSide.OnComplete="$('<%=$this->JobWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'none'});<%=$this->JobBtn->ClientID%>SlideWindow.setElementsCount();" />
+                       <com:TActiveButton ID="JobRunBtn" CssClass="jobrun-btn" Attributes.onmouseover="javascript:showTip(this, 'Run job', 'Starting jobs.');" ClientSide.OnLoading="$('<%=$this->JobRunWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'block'});" ClientSide.OnComplete="$('<%=$this->JobRunWindow->Controls[0]->UniqueID%>-slide-window-progress').setStyle({'display': 'none'});<%=$this->JobRunBtn->ClientID%>SlideWindow.setElementsCount();" />
                        <com:TActiveButton CssClass="restore-btn" OnClick="restore" Attributes.onmouseover="javascript:showTip(this, 'Restore', 'Restore wizard.');" />
                        <com:TActiveButton ID="SettingsWizardBtn" CssClass="setting-btn" OnClick="configuration" Attributes.onmouseover="javascript:showTip(this, 'Settings', 'Management settings wizard.');" />
                </div>
index 2b169c485e0ec165601864a1fe41517380cb8a26..8142c24c1b3731ae39e7a6c10ffa26f989194761 100644 (file)
@@ -1,6 +1,12 @@
 <%@ MasterClass="Application.Portlets.SlideWindow"%>
 <com:TContent ID="SlideWindowContent">
        <com:TActivePanel ID="RepeaterShow">
+               <script type="text/javascript">
+                       document.observe("dom:loaded", function() {
+                               clientConfigurationWindow = ConfigurationWindow<%=$this->getPage()->ClientConfiguration->getMaster()->ClientID%>;
+                               clientSlideWindowObj = <%=$this->getPage()->ClientWindow->ShowID%>SlideWindow;
+                       });
+               </script>
                <com:TActiveRepeater ID="Repeater">
                        <prop:ItemTemplate>
                                <com:TPanel ID="ClientElement" CssClass="slide-window-element" ToolTip="<%=@$this->DataItem['uname']%>">
                                </com:TPanel>
                                <com:TCallback ID="ClientElementCall" OnCallback="Page.ClientWindow.configure" ActiveControl.CallbackParameter="<%=@$this->DataItem['clientid']%>">
                                        <prop:ClientSide.OnComplete>
-                                               ConfigurationWindow<%=$this->getPage()->ClientConfiguration->getMaster()->ClientID%>.show();
-                                               ConfigurationWindow<%=$this->getPage()->ClientConfiguration->getMaster()->ClientID%>.progress(false);
+                                               clientConfigurationWindow.show();
+                                               clientConfigurationWindow.progress(false);
                                        </prop:ClientSide.OnComplete>
                                </com:TCallback>
                                <script type="text/javascript">
                                        $('<%=$this->ClientElement->ClientID%>').observe('click', function() {
                                                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();
-                                               }
+                                               clientConfigurationWindow.openConfigurationWindow(request, clientSlideWindowObj);
                                        });
                                </script>
                        </prop:ItemTemplate>
                                        <com:TPanel ID="ClientTableElement"><%=$this->getParent()->Data['name']%></com:TPanel>
                                        <com:TCallback ID="ClientTableElementCall" OnCallback="Page.ClientWindow.configure" ActiveControl.CallbackParameter="<%=$this->getParent()->Data['clientid']%>">
                                                <prop:ClientSide.OnComplete>
-                                                       ConfigurationWindow<%=$this->getPage()->ClientConfiguration->getMaster()->ClientID%>.show();
-                                                       ConfigurationWindow<%=$this->getPage()->ClientConfiguration->getMaster()->ClientID%>.progress(false);
+                                                       clientConfigurationWindow.show();
+                                                       clientConfigurationWindow.progress(false);
                                                </prop:ClientSide.OnComplete>
                                        </com:TCallback>
                                        <script type="text/javascript">
                                                $('<%=$this->ClientTableElement->ClientID%>').up('tr').observe('click', function() {
                                                        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();
-                                                       }
+                                                       clientConfigurationWindow.openConfigurationWindow(request, clientSlideWindowObj);
                                                });
                                        </script>
                                </prop:ItemTemplate>
index b076da81df50f397931e91ce6421f0118720c038..d20d0ddc41c63f09a5cb395c4a4fc56762da2bef 100644 (file)
@@ -1,6 +1,12 @@
 <%@ MasterClass="Application.Portlets.SlideWindow" %>
 <com:TContent ID="SlideWindowContent">
        <com:TActivePanel ID="RepeaterShow">
+               <script type="text/javascript">
+                       document.observe("dom:loaded", function() {
+                               jobConfigurationWindow = ConfigurationWindow<%=$this->getPage()->JobConfiguration->getMaster()->ClientID%>;
+                               jobSlideWindowObj = <%=$this->getPage()->JobWindow->ShowID%>SlideWindow;
+                       });
+               </script>
        <com:TActiveRepeater ID="Repeater">
                <prop:ItemTemplate>
                        <com:TPanel ID="JobElement" CssClass="slide-window-element">
                        </com:TPanel>
                        <com:TCallback ID="JobElementCall" OnCallback="Page.JobWindow.configure" ActiveControl.CallbackParameter="<%=@$this->DataItem->jobid%>">
                                <prop:ClientSide.OnComplete>
-                                       ConfigurationWindow<%=$this->getPage()->JobConfiguration->getMaster()->ClientID%>.show();
-                                       ConfigurationWindow<%=$this->getPage()->JobConfiguration->getMaster()->ClientID%>.progress(false);
+                                       jobConfigurationWindow.show();
+                                       jobConfigurationWindow.progress(false);
                                </prop:ClientSide.OnComplete>
                        </com:TCallback>
                        <script type="text/javascript">
                                $('<%=$this->JobElement->ClientID%>').observe('click', function() {
                                        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();
-                                       }
+                                       jobConfigurationWindow.openConfigurationWindow(request, jobSlideWindowObj);
                                });
                        </script>
                </prop:ItemTemplate>
                                <com:TPanel ID="JobTableElement"><%=$this->getParent()->Data['name']%></com:TPanel>
                                <com:TCallback ID="JobTableElementCall" OnCallback="Page.JobWindow.configure" ActiveControl.CallbackParameter="<%=$this->getParent()->Data['jobid']%>">
                                        <prop:ClientSide.OnComplete>
-                                               ConfigurationWindow<%=$this->getPage()->JobConfiguration->getMaster()->ClientID%>.show();
-                                               ConfigurationWindow<%=$this->getPage()->JobConfiguration->getMaster()->ClientID%>.progress(false);
+                                               jobConfigurationWindow.show();
+                                               jobConfigurationWindow.progress(false);
                                        </prop:ClientSide.OnComplete>
                                </com:TCallback>
                                <script type="text/javascript">
                                        $('<%=$this->JobTableElement->ClientID%>').up('tr').observe('click', function() {
                                                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();
-                                               }
+                                               jobConfigurationWindow.openConfigurationWindow(request, jobSlideWindowObj);
                                        });
                                </script>
                        </prop:ItemTemplate>
index cc649925fd0f694bc0c39645c82701baa9d8d288..e7b8066c9376225dfacb9fda35f1bb03f5d9587c 100644 (file)
@@ -1,28 +1,28 @@
 <%@ MasterClass="Application.Portlets.SlideWindow" %>
 <com:TContent ID="SlideWindowContent">
        <com:TActivePanel ID="RepeaterShow">
+               <script type="text/javascript">
+                       document.observe("dom:loaded", function() {
+                               jobRunConfigurationWindow = ConfigurationWindow<%=$this->getPage()->JobRunConfiguration->getMaster()->ClientID%>;
+                               jobRunSlideWindowObj = <%=$this->getPage()->JobRunWindow->ShowID%>SlideWindow;
+                       });
+               </script>
        <com:TActiveRepeater ID="Repeater">
                <prop:ItemTemplate>
                        <%=($this->getPage()->JobRunWindow->oldDirector != $this->DataItem['director']) ? '<div class="window-section"><span>Director: ' . $this->DataItem['director']  . '<span></div>': ''%>
-                       <com:TPanel ID="JobElement" CssClass="slide-window-element" >
+                       <com:TPanel ID="JobRunElement" CssClass="slide-window-element" >
                                <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/job-icon.png" alt="" /> <%=@$this->DataItem['name']%>
                        </com:TPanel>
-                       <com:TCallback ID="JobElementCall" OnCallback="Page.JobRunWindow.configure" ActiveControl.CallbackParameter="<%=@$this->DataItem['name']%>">
+                       <com:TCallback ID="JobRunElementCall" OnCallback="Page.JobRunWindow.configure" ActiveControl.CallbackParameter="<%=@$this->DataItem['name']%>">
                                <prop:ClientSide.OnComplete>
-                                       ConfigurationWindow<%=$this->getPage()->JobRunConfiguration->getMaster()->ClientID%>.show();
-                                       ConfigurationWindow<%=$this->getPage()->JobRunConfiguration->getMaster()->ClientID%>.progress(false);
+                                       jobRunConfigurationWindow.show();
+                                       jobRunConfigurationWindow.progress(false);
                                </prop:ClientSide.OnComplete>
                        </com:TCallback>
                        <script type="text/javascript">
-                               $('<%=$this->JobElement->ClientID%>').observe('click', function() {
-                                       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();
-                                       }
+                               $('<%=$this->JobRunElement->ClientID%>').observe('click', function() {
+                                       var request = <%= $this->JobRunElementCall->ActiveControl->Javascript %>;
+                                       jobRunConfigurationWindow.openConfigurationWindow(request, jobRunSlideWindowObj);
                                });
                        </script>
                        <%=!($this->getPage()->JobRunWindow->oldDirector = $this->DataItem['director'])%>
        >
                <com:TActiveTemplateColumn HeaderText="Job name" SortExpression="name">
                        <prop:ItemTemplate>
-                               <com:TPanel ID="JobTableElement"><%=$this->getParent()->DataItem['name']%></com:TPanel>
-                               <com:TCallback ID="JobTableElementCall" OnCallback="Page.JobRunWindow.configure" ActiveControl.CallbackParameter="<%=$this->getParent()->DataItem['name']%>">
+                               <com:TPanel ID="JobRunTableElement"><%=$this->getParent()->DataItem['name']%></com:TPanel>
+                               <com:TCallback ID="JobRunTableElementCall" OnCallback="Page.JobRunWindow.configure" ActiveControl.CallbackParameter="<%=$this->getParent()->DataItem['name']%>">
                                        <prop:ClientSide.OnComplete>
-                                               ConfigurationWindow<%=$this->getPage()->JobRunConfiguration->getMaster()->ClientID%>.show();
-                                               ConfigurationWindow<%=$this->getPage()->JobRunConfiguration->getMaster()->ClientID%>.progress(false);
+                                               jobRunConfigurationWindow.show();
+                                               jobRunConfigurationWindow.progress(false);
                                        </prop:ClientSide.OnComplete>
                                </com:TCallback>
                                <script type="text/javascript">
-                                       $('<%=$this->JobTableElement->ClientID%>').up('tr').observe('click', function() {
-                                               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();
-                                               }
+                                       $('<%=$this->JobRunTableElement->ClientID%>').up('tr').observe('click', function() {
+                                               var request = <%= $this->JobRunTableElementCall->ActiveControl->Javascript %>;
+                                               jobRunConfigurationWindow.openConfigurationWindow(request, jobRunSlideWindowObj);
                                        });
                                </script>
                        </prop:ItemTemplate>
index 326ca8115697745129b2f3a937318793e363ae02..cc261164c02418e04742da53e11bff6d3c960337 100644 (file)
@@ -1,6 +1,12 @@
 <%@ MasterClass="Application.Portlets.SlideWindow"%>
 <com:TContent ID="SlideWindowContent">
        <com:TActivePanel ID="RepeaterShow">
+               <script type="text/javascript">
+                       document.observe("dom:loaded", function() {
+                               poolConfigurationWindow = ConfigurationWindow<%=$this->getPage()->PoolConfiguration->getMaster()->ClientID%>;
+                               poolSlideWindowObj = <%=$this->getPage()->PoolWindow->ShowID%>SlideWindow;
+                       });
+               </script>
                <com:TActiveRepeater ID="Repeater">
                        <prop:ItemTemplate>
                                <com:TPanel ID="PoolElement" CssClass="slide-window-element">
                                </com:TPanel>
                                <com:TCallback ID="PoolElementCall" OnCallback="Page.PoolWindow.configure" ActiveControl.CallbackParameter="<%=@$this->DataItem->poolid%>">
                                        <prop:ClientSide.OnComplete>
-                                               ConfigurationWindow<%=$this->getPage()->PoolConfiguration->getMaster()->ClientID%>.show();
-                                               ConfigurationWindow<%=$this->getPage()->PoolConfiguration->getMaster()->ClientID%>.progress(false);
+                                               poolConfigurationWindow.show();
+                                               poolConfigurationWindow.progress(false);
                                        </prop:ClientSide.OnComplete>
                                </com:TCallback>
                                <script type="text/javascript">
                                        $('<%=$this->PoolElement->ClientID%>').observe('click', function() {
                                                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();
-                                               }
+                                               poolConfigurationWindow.openConfigurationWindow(request, poolSlideWindowObj);
                                        });
                                </script>
                        </prop:ItemTemplate>
                                        <com:TPanel ID="PoolTableElement"><%=$this->getParent()->Data['name']%></com:TPanel>
                                        <com:TCallback ID="PoolTableElementCall" OnCallback="Page.PoolWindow.configure" ActiveControl.CallbackParameter="<%=$this->getParent()->Data['poolid']%>">
                                                <prop:ClientSide.OnComplete>
-                                                       ConfigurationWindow<%=$this->getPage()->PoolConfiguration->getMaster()->ClientID%>.show();
-                                                       ConfigurationWindow<%=$this->getPage()->PoolConfiguration->getMaster()->ClientID%>.progress(false);
+                                                       poolConfigurationWindow.show();
+                                                       poolConfigurationWindow.progress(false);
                                                </prop:ClientSide.OnComplete>
                                        </com:TCallback>
                                        <script type="text/javascript">
                                                $('<%=$this->PoolTableElement->ClientID%>').up('tr').observe('click', function() {
                                                        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();
-                                                       }
+                                                       poolConfigurationWindow.openConfigurationWindow(request, poolSlideWindowObj);
                                                });
                                        </script>
                                </prop:ItemTemplate>
index faec0e304e4c92b18701e67a1fbe9771fa1538c3..875ab8bb21d509c8e80db1d398ea8e3750ae47ee 100644 (file)
@@ -6,7 +6,7 @@
                        <com:TImageButton ImageUrl="<%=$this->getPage()->getTheme()->getBaseUrl()%>/close.png" Style="margin: 5px 5px 0 0;float: right;" Attributes.onclick="<%=$this->ShowID%>SlideWindow.toggleToolbar(); return false;" Attributes.alt="<%[ Close ]%>" ToolTip="<%[ Close ]%>" />
                        <table>
                                <tr>
-                                       <td><%[ Limit: ]%></td><td><com:TActiveDropDownList ID="Limit" /></td>
+                                       <td><%[ Limit: ]%></td><td><com:TActiveDropDownList ID="Limit" ClientSide.OnComplete="<%=$this->ShowID%>SlideWindow.setElementsCount();" /></td>
                                </tr>
                                <tr>
                                        <td><%[ Search: ]%></td><td><com:TActiveTextBox ID="Search" /></td>
@@ -18,7 +18,7 @@
                </div>
        </div>
        <div class="slide-window-bar">
-               <div class="slide-window-bar-title"><%=$this->getParent()->windowTitle%></div>
+               <div id="<%=$this->UniqueID%>-slide-window-title" class="slide-window-bar-title"><%=$this->getParent()->windowTitle%><span></span></div>
                <div id="<%=$this->UniqueID%>-slide-window-close" title="Close the window" class="slide-window-close"></div>
                <div id="<%=$this->UniqueID%>-slide-window-fullsize" title="Change the window size" class="slide-window-fullsize"></div>
                <div id="<%=$this->UniqueID%>-slide-window-tools" title="<%[ Switch the window view (normal/details) ]%>" class="slide-window-sort"></div>
@@ -42,4 +42,4 @@
 </div>
 <script type="text/javascript">
        var <%=$this->ShowID%>SlideWindow = new SlideWindowClass('<%=$this->UniqueID%>', {'showId' : '<%=$this->ShowID%>', 'hideId': '<%=$this->UniqueID%>-slide-window-close', 'fullSizeId' : '<%=$this->UniqueID%>-slide-window-fullsize', 'search' : '<%=$this->Search->ClientID%>'});
-</script>
\ No newline at end of file
+</script>
index 425643c33f89d6353535977b9de6e0a7f62d3f40..cac63cf395d08e3aa5f88ecac66927636d010942 100644 (file)
@@ -1,6 +1,12 @@
 <%@ MasterClass="Application.Portlets.SlideWindow" %>
 <com:TContent ID="SlideWindowContent">
        <com:TActivePanel ID="RepeaterShow">
+               <script type="text/javascript">
+                       document.observe("dom:loaded", function() {
+                               storageConfigurationWindow = ConfigurationWindow<%=$this->getPage()->StorageConfiguration->getMaster()->ClientID%>;
+                               storageSlideWindowObj = <%=$this->getPage()->StorageWindow->ShowID%>SlideWindow;
+                       });
+               </script>
                <com:TActiveRepeater ID="Repeater">
                        <prop:ItemTemplate>
                                <com:TPanel ID="StorageElement" CssClass="slide-window-element">
                                </com:TPanel>
                                <com:TCallback ID="StorageElementCall" OnCallback="Page.StorageWindow.configure" ActiveControl.CallbackParameter="<%=@$this->DataItem->storageid%>">
                                        <prop:ClientSide.OnComplete>
-                                               ConfigurationWindow<%=$this->getPage()->StorageConfiguration->getMaster()->ClientID%>.show();
-                                               ConfigurationWindow<%=$this->getPage()->StorageConfiguration->getMaster()->ClientID%>.progress(false);
+                                               storageConfigurationWindow.show();
+                                               storageConfigurationWindow.progress(false);
                                        </prop:ClientSide.OnComplete>
                                </com:TCallback>
                                <script type="text/javascript">
                                        $('<%=$this->StorageElement->ClientID%>').observe('click', function() {
                                                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();
-                                               }
+                                               storageConfigurationWindow.openConfigurationWindow(request, storageSlideWindowObj);
                                        });
                                </script>
                        </prop:ItemTemplate>
                                        <com:TPanel ID="StorageTableElement"><%=$this->getParent()->Data['name']%></com:TPanel>
                                        <com:TCallback ID="StorageTableElementCall" OnCallback="Page.StorageWindow.configure" ActiveControl.CallbackParameter="<%=$this->getParent()->Data['storageid']%>">
                                                <prop:ClientSide.OnComplete>
-                                                       ConfigurationWindow<%=$this->getPage()->StorageConfiguration->getMaster()->ClientID%>.show();
-                                                       ConfigurationWindow<%=$this->getPage()->StorageConfiguration->getMaster()->ClientID%>.progress(false);
+                                                       storageConfigurationWindow.show();
+                                                       storageConfigurationWindow.progress(false);
                                                </prop:ClientSide.OnComplete>
                                        </com:TCallback>
                                        <script type="text/javascript">
                                                $('<%=$this->StorageTableElement->ClientID%>').up('tr').observe('click', function() {
                                                        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();
-                                                       }
+                                                       storageConfigurationWindow.openConfigurationWindow(request, storageSlideWindowObj);
                                                });
                                        </script>
                                </prop:ItemTemplate>
index 27e8209c58c1a35c51f663f72f1addd1bc109fcc..0c0de85d4e1c92a4c2e42da9c5b0613c3c9c08e4 100644 (file)
@@ -1,6 +1,12 @@
 <%@ MasterClass="Application.Portlets.SlideWindow" %>
 <com:TContent ID="SlideWindowContent">
        <com:TActivePanel ID="RepeaterShow">
+       <script type="text/javascript">
+               document.observe("dom:loaded", function() {
+                       volumeConfigurationWindow = ConfigurationWindow<%=$this->getPage()->VolumeConfiguration->getMaster()->ClientID%>;
+                       volumeSlideWindowObj = <%=$this->getPage()->VolumeWindow->ShowID%>SlideWindow;
+               });
+       </script>
        <com:TActiveRepeater ID="Repeater">
                <prop:ItemTemplate>
                        <%=(isset($this->DataItem->pool->name) && $this->getPage()->VolumeWindow->oldPool != $this->DataItem->pool->name) ? '<div class="window-section"><span>Pool: ' . $this->DataItem->pool->name  . '<span></div>': ''%>
                        </com:TPanel>
                        <com:TCallback ID="VolumeElementCall" OnCallback="Page.VolumeWindow.configure" ActiveControl.CallbackParameter="<%=@$this->DataItem->mediaid%>">
                                <prop:ClientSide.OnComplete>
-                                       ConfigurationWindow<%=$this->getPage()->VolumeConfiguration->getMaster()->ClientID%>.show();
-                                       ConfigurationWindow<%=$this->getPage()->VolumeConfiguration->getMaster()->ClientID%>.progress(false);
+                                       volumeConfigurationWindow.show();
+                                       volumeConfigurationWindow.progress(false);
                                </prop:ClientSide.OnComplete>
                        </com:TCallback>
                        <script type="text/javascript">
                                $('<%=$this->VolumeElement->ClientID%>').observe('click', function() {
                                        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();
-                                       }
+                                       volumeConfigurationWindow.openConfigurationWindow(request, volumeSlideWindowObj);
                                });
                        </script>
                        <%=!(isset($this->DataItem->pool->name) ? ($this->getPage()->VolumeWindow->oldPool = $this->DataItem->pool->name) : false)%>
                                <com:TPanel ID="VolumeTableElement"><%=$this->getParent()->Data['volumename']%></com:TPanel>
                                <com:TCallback ID="VolumeTableElementCall" OnCallback="Page.VolumeWindow.configure" ActiveControl.CallbackParameter="<%=$this->getParent()->Data['mediaid']%>">
                                        <prop:ClientSide.OnComplete>
-                                               ConfigurationWindow<%=$this->getPage()->VolumeConfiguration->getMaster()->ClientID%>.show();
-                                               ConfigurationWindow<%=$this->getPage()->VolumeConfiguration->getMaster()->ClientID%>.progress(false);
+                                               volumeConfigurationWindow.show();
+                                               volumeConfigurationWindow.progress(false);
                                        </prop:ClientSide.OnComplete>
                                </com:TCallback>
                                <script type="text/javascript">
                                        $('<%=$this->VolumeTableElement->ClientID%>').up('tr').observe('click', function() {
                                                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();
-                                               }
+                                               volumeConfigurationWindow.openConfigurationWindow(request, volumeSlideWindowObj);
                                        });
                                </script>
                        </prop:ItemTemplate>