]> git.sur5r.net Git - bacula/bacula/blob - gui/baculum/protected/Web/Portlets/SlideWindow.tpl
baculum: New Baculum API and Baculum Web
[bacula/bacula] / gui / baculum / protected / Web / Portlets / SlideWindow.tpl
1 <div id="<%=$this->getParent()->getID()%>-slide-window-container" class="slide-window-container" style="display: none">
2         <div id="<%=$this->getParent()->getID()%>-slide-window-progress" class="slide-window-progress"></div>
3         <div class="slide-window-content">
4                 <com:TContentPlaceHolder ID="SlideWindowContent" />
5                 <div id="<%=$this->getParent()->getID()%>-slide-window-options" class="slide-window-options"></div>
6                 <div id="<%=$this->getParent()->getID()%>-slide-window-toolbar" class="slide-window-toolbar" style="display: none">
7                         <com:TImageButton ImageUrl="<%=$this->getPage()->getTheme()->getBaseUrl()%>/close.png" Style="margin: 5px 5px 0 0;float: right;" Attributes.onclick="SlideWindow.getObj('<%=$this->getParent()->getID()%>').toggleToolbar(); return false;" Attributes.alt="<%[ Close ]%>" ToolTip="<%[ Close ]%>" />
8                         <table>
9                                 <tr>
10                                         <td><%[ Limit: ]%></td>
11                                         <td><com:TActiveDropDownList ID="Limit" ClientSide.OnComplete="SlideWindow.getObj('<%=$this->getParent()->getID()%>').setElementsCount();" /></td>
12                                 </tr>
13                                 <tr>
14                                         <td><%[ Search: ]%></td>
15                                         <td><com:TActiveTextBox ID="Search" /></td>
16                                 </tr>
17                                 <tr>
18                                         <td><%[ View mode: ]%></td>
19                                         <td><com:TLabel ForControl="Simple" Text="<%[ simple ]%>" /> <com:TActiveRadioButton ID="Simple" GroupName="views" ActiveControl.CallbackParameter="simple" /> <com:TLabel ForControl="Details" Text="<%[ details ]%>" /><com:TActiveRadioButton ID="Details" GroupName="views" ActiveControl.CallbackParameter="details" /></td>
20                                 </tr>
21                         </table>
22                 </div>
23                 <div id="<%=$this->getParent()->getID()%>-slide-window-actions" class="slide-window-actions" style="display: none">
24                         <table>
25                                 <tr>
26                                         <td><%[ Action: ]%></td>
27                                         <td>
28                                                 <com:TDropDownList ID="Actions"/>
29                                                 <com:TRequiredFieldValidator
30                                                         ID="ActionsValidator"
31                                                         ValidationGroup="ActionsGroup<%=$this->ApplyAction->ClientID%>"
32                                                         ControlToValidate="Actions"
33                                                         InitialValue="NoAction"
34                                                         ErrorMessage="Please select action."
35                                                         ClientSide.ObserveChanges="false"
36                                                         ClientSide.OnValidationSuccess="<%=$this->ApplyAction->ClientID%>_actions_func()"
37                                                  />
38                                         </td>
39                                 </tr>
40                                 <tr>
41                                         <td></td>
42                                         <td>
43                                                 <com:BActiveButton ID="ApplyAction" Text="<%[ Apply ]%>" OnClick="action" ValidationGroup="ActionsGroup<%=$this->ApplyAction->ClientID%>" Attributes.onclick="return SlideWindow.getObj('<%=$this->getParent()->getID()%>').checked.length > 50 ? confirm('<%=Prado::localize('Warning! You checked over 50 elements. Please note, that in case more time consuming actions, web browser request may timed out after 30 seconds. It this case action will be canceled and in consequence the action may not touch all selected elements. Are you sure you want to continue?')%>') : true;" ClientSide.OnSuccess="<%=$this->getParent()->getID()%>_refresh_window_func();" />
44                                                 <script type="text/javascript">
45                                                         var <%=$this->ApplyAction->ClientID%>_actions_func = function() {
46                                                                 var console_visible = $('#<%=$this->getPage()->Console->ConsoleContainer->ClientID%>').is(':visible');
47                                                                 if (console_visible === false) {
48                                                                         $('#console_launcher').click();
49                                                                 } else {
50                                                                         window.scrollTo(0, document.body.scrollHeight);
51                                                                 }
52                                                                 SlideWindow.getObj('<%=$this->getParent()->getID()%>').hideActions();
53                                                         }
54                                                 </script>
55                                         </td>
56                                 </tr>
57                                 <tr>
58                                         <td colspan="2" class="center"><a href="javascript:SlideWindow.getObj('<%=$this->getParent()->getID()%>').markAllChecked(false);"><%[ unmark all and close ]%></a></td>
59                                 </tr>
60                         </table>
61                 </div>
62         </div>
63         <div class="slide-window-bar">
64                 <div id="<%=$this->getParent()->getID()%>-slide-window-title" class="slide-window-bar-title"><%=$this->getParent()->getWindowTitle()%><span></span></div>
65                 <div id="<%=$this->getParent()->getID()%>-slide-window-close" title="<%[ Close the window ]%>" class="slide-window-close"></div>
66                 <div id="<%=$this->getParent()->getID()%>-slide-window-fullsize" title="<%[ Change the window size ]%>" class="slide-window-fullsize"></div>
67                 <div id="<%=$this->getParent()->getID()%>-slide-window-tools" title="<%[ Switch the window view (normal/details) ]%>" class="slide-window-sort"></div>
68                 <com:TCallback ID="DetailView" OnCallback="switchView">
69                         <prop:ClientSide.OnLoading>
70                                 $('#<%=$this->getParent()->getID()%>-slide-window-progress').css({'display': 'block'});
71                         </prop:ClientSide.OnLoading>
72                         <prop:ClientSide.OnComplete>
73                                 $('#<%=$this->getParent()->getID()%>-slide-window-progress').css({'display': 'none'});
74                                 SlideWindow.getObj('<%=$this->getParent()->getID()%>').setLoadRequest();
75                         </prop:ClientSide.OnComplete>
76                 </com:TCallback>
77                 <script type="text/javascript">
78                         var <%=$this->getParent()->getID()%>_refresh_window_func = function() {
79                                 var request = <%= $this->DetailView->ActiveControl->Javascript %>;
80                                 request.dispatch();
81                         }
82                         $('input[id=<%=$this->Simple->ClientID%>], input[id=<%=$this->Details->ClientID%>], select[id=<%=$this->Limit->ClientID%>]').each(function(index, el) {
83                                 $(el).on('change', <%=$this->getParent()->getID()%>_refresh_window_func);
84                         });
85                 </script>
86         </div>
87 </div>
88 <script type="text/javascript">
89         var id = '<%=$this->getParent()->getID()%>';
90
91         var windowObj = new SlideWindowClass(id, {
92                 'showId': '<%=$this->getParent()->getButtonID()%>',
93                 'hideId': id + '-slide-window-close',
94                 'fullSizeId': id + '-slide-window-fullsize',
95                 'search': '<%=$this->Search->ClientID%>'}
96         );
97         var configWindowObj = new ConfigurationWindowClass(id);
98
99         SlideWindow.registerObj(id, windowObj);
100         ConfigurationWindow.registerObj(id, configWindowObj);
101         SlideWindow.getObj(id).setConfigurationObj(configWindowObj);
102 </script>