1 <%@ MasterClass="Application.Portlets.SlideWindow" %>
2 <com:TContent ID="SlideWindowContent">
3 <com:TActivePanel ID="RepeaterShow" EnableViewState="false">
4 <com:TActiveRepeater ID="Repeater" EnableViewState="false">
6 <com:TPanel ID="JobElement" CssClass="slide-window-element">
7 <img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/job-icon.png" alt="" /> [<%=@$this->DataItem->jobid%>] <%=@$this->DataItem->name%>
8 <input type="hidden" name="<%=$this->ClientID%>" value="<%=isset($this->DataItem->jobid) ? $this->DataItem->jobid : ''%>" />
11 </com:TActiveRepeater>
13 <com:TActivePanel ID="DataGridShow">
16 EnableViewState="false"
17 AutoGenerateColumns="false"
19 OnSortCommand="sortDataGrid"
21 CssClass="window-section-detail"
22 ItemStyle.CssClass="slide-window-element"
23 AlternatingItemStyle.CssClass="slide-window-element-alternating"
25 <com:TActiveTemplateColumn HeaderText="<input type='checkbox' name='actions_checkbox' onclick=SlideWindow.getObj('JobWindow').markAllChecked(this.checked)>" ItemStyle.HorizontalAlign="Center">
27 <input type="checkbox" name="actions_checkbox" value="<%=$this->getParent()->Data['jobid']%>" id="<%=$this->getPage()->JobWindow->CheckedValues->ClientID%><%=$this->getParent()->Data['jobid']%>" rel="<%=$this->getPage()->JobWindow->CheckedValues->ClientID%>" onclick="SlideWindow.getObj('JobWindow').markChecked(this.getAttribute('rel'), this.checked, this.value, true);" />
29 </com:TActiveTemplateColumn>
30 <com:TActiveBoundColumn
31 SortExpression="jobid"
34 ItemStyle.HorizontalAlign="Center"
36 <com:TActiveTemplateColumn HeaderText="<%[ Job name ]%>" SortExpression="name">
38 <div title="<%=$this->getParent()->Data['name']%>"><%=$this->getPage()->JobWindow->formatJobName($this->getParent()->Data['name'])%></div>
39 <input type="hidden" name="<%=$this->getParent()->ClientID%>" value="<%=$this->getParent()->Data['jobid']%>" />
41 </com:TActiveTemplateColumn>
42 <com:TActiveTemplateColumn ItemTemplate="<%=isset($this->getPage()->JobWindow->jobTypes[$this->getParent()->Data['type']]) ? $this->getPage()->JobWindow->jobTypes[$this->getParent()->Data['type']] : ''%>" SortExpression="type">
44 <span title="<%=Prado::localize('Type')%>" style="cursor: help">T</span>
46 </com:TActiveTemplateColumn>
47 <com:TActiveTemplateColumn ItemTemplate="<%=array_key_exists($this->getParent()->Data['level'], $this->getPage()->JobWindow->jobLevels) ? $this->getPage()->JobWindow->jobLevels[$this->getParent()->Data['level']] : ''%>" SortExpression="level">
49 <span title="<%=Prado::localize('Level')%>" style="cursor: help">L</span>
51 </com:TActiveTemplateColumn>
52 <com:TActiveTemplateColumn HeaderText="<%[ Job status ]%>" SortExpression="jobstatus">
54 <div class="job-status-<%=isset($this->getParent()->Data['jobstatus']) ? $this->getParent()->Data['jobstatus'] : ''%>" title="<%=isset($this->getPage()->JobWindow->jobStates[$this->getParent()->Data['jobstatus']]['description']) ? $this->getPage()->JobWindow->jobStates[$this->getParent()->Data['jobstatus']]['description'] : ''%>"><%=isset($this->getPage()->JobWindow->jobStates[$this->getParent()->Data['jobstatus']]['value']) ? $this->getPage()->JobWindow->jobStates[$this->getParent()->Data['jobstatus']]['value'] : ''%></div>
56 </com:TActiveTemplateColumn>
57 <com:TActiveTemplateColumn HeaderText="<%[ Size ]%>" SortExpression="jobbytes">
59 <div class="size" rel="<%=$this->getParent()->Data['jobbytes']%>"><%=$this->getParent()->Data['jobbytes']%></div>
61 </com:TActiveTemplateColumn>
62 <com:TActiveBoundColumn SortExpression="jobfiles" HeaderText="<%[ Files ]%>" DataField="jobfiles" />
63 <com:TActiveTemplateColumn HeaderText="<%[ End time ]%>" SortExpression="endtime">
65 <%=$this->getParent()->Data['endtime']%>
66 <%=in_array($this->getParent()->Data['jobstatus'], $this->getPage()->JobWindow->runningJobStates) ? '<img src="' . $this->getPage()->getTheme()->getBaseUrl() . '/loader-alter.gif" />' : ''%>
68 </com:TActiveTemplateColumn>
69 </com:TActiveDataGrid>
70 <com:TActiveHiddenField ID="CheckedValues" />
72 <com:TCallback ID="DataElementCall" OnCallback="Page.JobWindow.configure">
73 <prop:ClientSide.OnComplete>
74 ConfigurationWindow.getObj('JobWindow').show();
75 ConfigurationWindow.getObj('JobWindow').progress(false);
76 status_callback_func();
77 </prop:ClientSide.OnComplete>
79 <com:TCallback ID="RunJobCall" OnCallback="Page.JobWindow.run_again">
80 <prop:ClientSide.OnLoading>
81 ConfigurationWindow.getObj('JobWindow').progress(true);
82 var img_btn = $('run_job_again_btn');
83 var img_src_path = img_btn.readAttribute('src').replace(/[^\/]+\S$/, '');
84 img_btn.writeAttribute('disabled', 'disabled');
85 img_btn.writeAttribute('src', img_src_path + 'loader.gif');
86 </prop:ClientSide.OnLoading>
87 <prop:ClientSide.OnComplete>
88 var img_btn = $('run_job_again_btn');
89 var img_src_path = img_btn.readAttribute('src').replace(/[^\/]+\S$/, '');
90 img_btn.writeAttribute('src', img_src_path + 'play.png');
91 img_btn.removeAttribute('disabled');
92 ConfigurationWindow.getObj('JobWindow').progress(false);
93 ConfigurationWindow.getObj('JobWindow').show();
94 ConfigurationWindow.getObj('JobWindow').switchTabByNo(2);
95 status_callback_func();
97 </prop:ClientSide.OnComplete>
99 <div class="actions_btn" style="display: none">
100 <input type="image" id="run_job_again_btn" title="<%[ Run job again ]%>" src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/play.png" onclick="return false" />