fixed a bug in url history dialog...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-12-13 04:55:57 +04:00
parent f4536cb584
commit 024f4255de
2 changed files with 13 additions and 7 deletions

View File

@ -732,8 +732,8 @@ var FIELD_TYPES = {
var values = field.find('.value')
.attr('name', t)
// set the default...
if(values.filter(':checked').length == 0){
values.first()
if(values.filter(':checked:not([disabled])').length == 0){
values.filter(':not([disabled])').first()
.prop('checked', true)
}
},

View File

@ -185,16 +185,22 @@ function recentlyOpenedDialog(){
cfg[title] = BASE_URL_HISTORY.map(function(e){
// cleanup the urls...
var ee = e.replace('file:///', '')
var disabled = not_available.indexOf(e) >= 0
// mark disabled...
if(not_available.indexOf(e) >= 0){
if(disabled){
ee = '<span class="disabled-text">'+ee+'</span>'
if(e == BASE_URL){
dict[ee] = e
return ee + ' | disabled | Currently loaded, path not available.'
} else {
dict[ee] = e
return ee + ' | disabled | Not available.'
}
// mark the current path...
if(e == BASE_URL){
} else if(e == BASE_URL){
ee = ee.italics()
dict[ee] = e
return ee + ' | default | Currently loaded data.'