1 <com:TActivePanel ID="Tools" Style="text-align: left; display: none; width: 492px; margin: 0 auto;">
2 <com:TValidationSummary
4 CssClass="validation-error-summary"
5 ValidationGroup="VolumesActionGroup"
8 HeaderText="<%[ There is not possible to run selected action because: ]%>" />
9 <com:TActiveCustomValidator ID="LabelNameValidator" ValidationGroup="VolumesActionGroup" ControlToValidate="LabelName" ErrorMessage="<%[ Label name have to contain string value from set [0-9a-zA-Z_-]. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="labelNameValidator" />
10 <com:TActiveCustomValidator ID="SlotsLabelValidator" ValidationGroup="VolumesActionGroup" ControlToValidate="SlotsLabel" ErrorMessage="<%[ Slots for label have to contain string value from set [0-9-,]. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="slotsLabelValidator" />
11 <com:TActiveCustomValidator ID="DriveLabelValidator" ValidationGroup="VolumesActionGroup" ControlToValidate="DriveLabel" ErrorMessage="<%[ Drive has to contain digit value from set [0-9]. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="driveLabelValidator" />
12 <com:TActiveCustomValidator ID="SlotsUpdateSlotsValidator" ValidationGroup="VolumesActionGroup" ControlToValidate="SlotsUpdateSlots" ErrorMessage="<%[ Slots for update have to contain string value from set [0-9-,]. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="slotsUpdateSlotsValidator" />
13 <com:TActiveCustomValidator ID="DriveUpdateSlotsValidator" ValidationGroup="VolumesActionGroup" ControlToValidate="DriveUpdateSlots" ErrorMessage="<%[ Drive has to contain digit value from set [0-9]. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="driveUpdateSlotsValidator" />
14 <com:TActiveCustomValidator ID="SlotsUpdateSlotsScanValidator" ValidationGroup="VolumesActionGroup" ControlToValidate="SlotsUpdateSlotsScan" ErrorMessage="<%[ Slots for update have to contain string value from set [0-9-,]. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="slotsUpdateSlotsScanValidator" />
15 <com:TActiveCustomValidator ID="DriveUpdateSlotsScanValidator" ValidationGroup="VolumesActionGroup" ControlToValidate="DriveUpdateSlotsScan" ErrorMessage="<%[ Drive has to contain digit value from set [0-9]. ]%>" ControlCssClass="validation-error" Display="None" OnServerValidate="driveUpdateSlotsScanValidator" />
16 <div class="line"><com:TActiveRadioButton ID="LabelVolume" GroupName="VolumeAction" OnCallback="setLabelVolume" ActiveControl.ClientSide.OnComplete="window.scrollTo(0, document.body.scrollHeight);" /><com:TLabel ForControl="LabelVolume" Text="<%[ Label volume(s) ]%>" /></div>
17 <com:TActivePanel ID="Labeling" Display="None" Style="margin-left: 20px">
19 <div class="text"><com:TLabel ForControl="Barcodes" Text="<%[ Use barcodes as label: ]%>" /></div>
20 <div class="field"><com:TActiveCheckBox ID="Barcodes" OnCallback="setBarcodes" /></div>
22 <com:TActivePanel ID="LabelNameField">
24 <div class="text"><com:TLabel ForControl="LabelName" Text="<%[ Label name: ]%>" /></div>
25 <div class="field"><com:TActiveTextBox ID="LabelName" CssClass="textbox" /></div>
28 <com:TActivePanel ID="BarcodeSlotsField" Display="None">
30 <div class="text"><com:TLabel ForControl="SlotsLabel" Text="<%[ Slots for label: ]%>" /></div>
31 <div class="field"><com:TActiveTextBox ID="SlotsLabel" CssClass="textbox" /></div>
35 <div class="text"><com:TLabel ForControl="StorageLabel" Text="<%[ Storage: ]%>" /></div>
36 <div class="field"><com:TActiveDropDownList ID="StorageLabel" CssClass="textbox" /></div>
39 <div class="text"><com:TLabel ForControl="DriveLabel" Text="<%[ Drive number: ]%>" /></div>
40 <div class="field"><com:TActiveTextBox ID="DriveLabel" CssClass="textbox" Text="0" /></div>
43 <div class="text"><com:TLabel ForControl="PoolLabel" Text="<%[ Pool: ]%>" /></div>
44 <div class="field"><com:TActiveDropDownList ID="PoolLabel" CssClass="textbox" /></div>
46 <div class="button" style="margin-top: 10px;">
47 <com:BActiveButton ID="LabelButton" Text="<%[ Label ]%>" CausesValidation="true" ValidationGroup="VolumesActionGroup" OnClick="labelVolume" />
50 <div class="line"><com:TActiveRadioButton ID="UpdateSlots" GroupName="VolumeAction" OnCallback="setUpdateSlots" ActiveControl.ClientSide.OnComplete="window.scrollTo(0, document.body.scrollHeight);" /><com:TLabel ForControl="UpdateSlots" Text="<%[ Update slots using barcodes ]%>" /></div>
51 <com:TActivePanel ID="UpdatingSlots" Display="None" Style="margin-left: 20px">
53 <div class="text"><com:TLabel ForControl="StorageUpdateSlots" Text="<%[ Storage: ]%>" /></div>
54 <div class="field"><com:TActiveDropDownList ID="StorageUpdateSlots" CssClass="textbox" /></div>
57 <div class="text"><com:TLabel ForControl="DriveUpdateSlots" Text="<%[ Drive number: ]%>" /></div>
58 <div class="field"><com:TActiveTextBox ID="DriveUpdateSlots" CssClass="textbox" Text="0" /></div>
61 <div class="text"><com:TLabel ForControl="SlotsUpdateSlots" Text="<%[ Slots for update: ]%>" /></div>
62 <div class="field"><com:TActiveTextBox ID="SlotsUpdateSlots" CssClass="textbox" /></div>
64 <div class="button" style="margin-top: 10px;">
65 <com:BActiveButton ID="UpdateSlotsButton" Text="<%[ Update barcodes slots ]%>" CausesValidation="true" ValidationGroup="VolumesActionGroup" OnClick="updateSlots" />
68 <div class="line"><com:TActiveRadioButton ID="UpdateSlotsScan" GroupName="VolumeAction" OnCallback="setUpdateSlotsScan" ActiveControl.ClientSide.OnComplete="window.scrollTo(0, document.body.scrollHeight);" /><com:TLabel ForControl="UpdateSlotsScan" Text="<%[ Update slots without barcodes ]%>" /></div>
69 <com:TActivePanel ID="UpdatingSlotsScan" Display="None" Style="margin-left: 20px">
71 <div class="text"><com:TLabel ForControl="StorageUpdateSlotsScan" Text="<%[ Storage: ]%>" /></div>
72 <div class="field"><com:TActiveDropDownList ID="StorageUpdateSlotsScan" CssClass="textbox" /></div>
75 <div class="text"><com:TLabel ForControl="DriveUpdateSlotsScan" Text="<%[ Drive number: ]%>" /></div>
76 <div class="field"><com:TActiveTextBox ID="DriveUpdateSlotsScan" CssClass="textbox" Text="0" /></div>
79 <div class="text"><com:TLabel ForControl="SlotsUpdateSlotsScan" Text="<%[ Slots for update: ]%>" /></div>
80 <div class="field"><com:TActiveTextBox ID="SlotsUpdateSlotsScan" CssClass="textbox" /></div>
82 <div class="button" style="margin-top: 10px;">
83 <com:BActiveButton ID="UpdateSlotsScanButton" Text="<%[ Update slots scan ]%>" CausesValidation="true" ValidationGroup="VolumesActionGroup" OnClick="updateSlotsScan" />
87 <script type="text/javascript">
88 $$('#volumes_tools_launcher', '#<%=$this->LabelButton->ClientID%>', '#<%=$this->UpdateSlotsButton->ClientID%>', '#<%=$this->UpdateSlotsScanButton->ClientID%>').each(function(el){
89 el.observe('click', function(){
90 if(VolumesToolsValidation(el) === true) {
91 $('<%=$this->getPage()->Console->ConsoleContainer->ClientID%>').hide();
92 $('console_launcher').down('span').innerHTML = '<%[ show console ]%>';
93 Effect.toggle('<%=$this->Tools->ClientID%>', 'slide', {'duration': 0.2, afterFinish: function(){
94 window.scrollTo(0, document.body.scrollHeight);
97 if(el.id != 'volumes_tools_launcher') {
98 Effect.toggle('<%=$this->getPage()->Console->ConsoleContainer->ClientID%>', 'slide', {'duration': 0.3, afterFinish: function(){
99 window.scrollTo(0, document.body.scrollHeight);
106 function VolumesToolsValidation(el) {
107 var validation = true;
108 var slotsPattern = new RegExp("<%=$this->slotsPattern%>");
109 var drivePattern = new RegExp("<%=$this->drivePattern%>");
110 var labelNamePattern = new RegExp("<%=$this->labelVolumePattern%>");
111 if(el.id == '<%=$this->LabelButton->ClientID%>') {
112 if($('<%=$this->Barcodes->ClientID%>').checked === true) {
113 if(slotsPattern.test($('<%=$this->SlotsLabel->ClientID%>').value) === false) {
114 var validation = false;
117 if(labelNamePattern.test($('<%=$this->LabelName->ClientID%>').value) === false) {
118 var validation = false;
121 if(drivePattern.test($('<%=$this->DriveLabel->ClientID%>').value) === false) {
122 var validation = false;
124 } else if(el.id == '<%=$this->UpdateSlotsButton->ClientID%>') {
125 if(drivePattern.test($('<%=$this->DriveUpdateSlots->ClientID%>').value) === false || slotsPattern.test($('<%=$this->SlotsUpdateSlots->ClientID%>').value) === false) {
126 var validation = false;
128 } else if(el.id == '<%=$this->UpdateSlotsScanButton->ClientID%>') {
129 if(drivePattern.test($('<%=$this->DriveUpdateSlotsScan->ClientID%>').value) === false || slotsPattern.test($('<%=$this->SlotsUpdateSlotsScan->ClientID%>').value) === false) {
130 var validation = false;