Subversion Repositories DevTools

Rev

Rev 151 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 151 Rev 1326
Line 180... Line 180...
180
 
180
 
181
      if (buildType == "M")
181
      if (buildType == "M")
182
      {
182
      {
183
         Visible ('divVersionNumber','inline', 'divAutoVersion','none');
183
         Visible ('divVersionNumber','inline', 'divAutoVersion','none');
184
         typeButtons[1].checked = true;
184
         typeButtons[1].checked = true;
185
         addCots();
185
         showCots();
186
      }
186
      }
187
      else if (buildType == "A")
187
      else if (buildType == "A")
188
      {
188
      {
189
         Visible ('divVersionNumber','none', 'divAutoVersion','inline');
189
         Visible ('divVersionNumber','none', 'divAutoVersion','inline');
190
         typeButtons[0].checked = true;
190
         typeButtons[0].checked = true;
191
         removeCots();
191
         hideCots();
192
      }
192
      }
193
   }
193
   }
194
 
194
 
195
   // Add .cots extension to the list of extensions as it's not included in the intial query results.
195
   // Show the .cots extension. It's not included in the intial query results.
196
   function addCots()
196
   function showCots()
197
   {
197
   {
198
      var exts = document.getElementsByName('v_ext')[0];
198
      var exts = document.getElementsByName('v_ext')[0];
199
 
199
 
200
      for (index = 0; index < exts.length - 1; index++)
200
      for (index = 0; index < exts.length; index++)
201
      {
201
      {
202
         // Loop through extensions to see where .cots should go and insert it there
-
 
203
         if (exts.options[index].value.toLowerCase() < '.cots' && exts.options[index + 1].value.toLowerCase() > '.cots')
202
         if (exts.options[index].value == '.cots')
204
         {
203
         {
205
            var newOption = document.createElement('option');
204
            exts.options[index].style.display = "inline";
206
            newOption.text = '.cots';
-
 
207
            newOption.value = '.cots';
-
 
208
 
-
 
209
            try
-
 
210
            {
-
 
211
               exts.add(newOption, exts.options[index + 1]); // standards compliant
-
 
212
            }
-
 
213
            catch(ex)
-
 
214
            {
-
 
215
               exts.add(newOption, index + 1); // IE only
205
            exts.options[index].disabled=false;
216
            }
-
 
217
         }
206
         }
218
      }
207
      }
219
   }
208
   }
220
 
209
 
221
   // Remove the .cots extension from the list of extensions.
210
   // Hide the .cots extension from the list of extensions.
-
 
211
   // IE does not honor .style.display - so just disable it.
222
   function removeCots()
212
   function hideCots()
223
   {
213
   {
224
      var exts = document.getElementsByName('v_ext')[0];
214
      var exts = document.getElementsByName('v_ext')[0];
225
 
215
 
226
      for (index = 0; index < exts.length; index++)
216
      for (index = 0; index < exts.length; index++)
227
      {
217
      {
228
         if (exts.options[index].value == '.cots')
218
         if (exts.options[index].value == '.cots')
229
         {
219
         {
-
 
220
            exts.options[index].style.display = "none";
230
            exts.remove(index);
221
            exts.options[index].disabled=true;
231
         }
222
         }
232
      }
223
      }
233
   }
224
   }
234
 
225
 
235
   // Change the selected extensions in the list to the existing package extension.
226
   // Change the selected extensions in the list to the existing package extension.