Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 2dd5d57f

Přidáno uživatelem Jakub Vašta před asi 4 roky(ů)

+ select box reset fast fix

Zobrazit rozdíly:

website/public/js/zcu-heatmap.js
220 220
  });
221 221
}
222 222

  
223
var allOptionsDisabled = false;
224

  
223 225
function updateAvailableDataSets(available) {
224 226
  
225 227
  var isOptionEnabled = true;
226 228
  $("#type > option").each(function() {
227 229
    if((this.value in available) == false) {
228
      $(this).prop('disabled', true)
229
      $(this).prop('selected', false)  
230
      $(this).prop('disabled', true);
231
      $(this).prop('selected', false);  
230 232
    }
231 233
    else {
232 234
      $(this).prop('disabled', false)
233
      if (isOptionEnabled) {
234
        $(this).prop('selected', true)
235
      } 
235
      if (allOptionsDisabled) {
236
        $(this).prop('selected', true);
237
        allOptionsDisabled = false;
238
      }
236 239
      isOptionEnabled = false;
237 240
    }
238 241
  });
242
  allOptionsDisabled = isOptionEnabled;
239 243

  
240 244
  $('#submit-btn').prop('disabled', isOptionEnabled);
241 245

  

Také k dispozici: Unified diff