several more bugs fixed and some tweaking...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-06-13 02:02:24 +04:00
parent f7e635c05f
commit 72a0003c5a
3 changed files with 18 additions and 6 deletions

View File

@ -73,6 +73,7 @@ var KEYBOARD_CONFIG = {
//
'.viewer.overlay .overlay-block.dialog': {
title: 'Dialog',
ignore: '*',
Enter: doc('Accept dialog',
function(){

View File

@ -181,11 +181,21 @@ var toggleSlideShowMode = createCSSClassToggler(
// interval from user...
//var interval = prompt('Slideshow interval (sec):', SLIDESHOW_INTERVAL/1000)
prompt('Slideshow interval (sec):', SLIDESHOW_INTERVAL/1000)
.done(function(interval){
interval = parseFloat(interval)
formDialog($('.viewer'), 'Slideshow', {
'Interval:': (SLIDESHOW_INTERVAL/1000) + 'sec',
'Looping:': SLIDESHOW_LOOP ? true : false,
'Reverse direction:': SLIDESHOW_DIRECTION == 'prev' ? true : false
}, 'Start')
.done(function(data){
var interval = parseFloat(data['Interval:'])
var looping = data['Looping:']
var reverse = data['Reverse direction:']
SLIDESHOW_INTERVAL = isNaN(interval) ? 3000 : interval*1000
SLIDESHOW_LOOP = looping
SLIDESHOW_DIRECTION = reverse == true ? 'prev' : 'next'
console.log('>>>', data)
showStatus('Slideshow: starting', SLIDESHOW_LOOP ? 'looped...' : 'unlooped...')
@ -220,6 +230,7 @@ var toggleSlideShowMode = createCSSClassToggler(
} else {
window._slideshow_timer != null && clearInterval(_slideshow_timer)
showStatus('Slideshow: stopped...')
hideOverlay($('.viewer'))
}
})

View File

@ -383,7 +383,7 @@ var FIELD_TYPES = {
type: 'text',
text: null,
default: '',
html: '<div class="field checkbox">'+
html: '<div class="field string">'+
'<span class="text"></span>'+
'<input type="text" class="value">'+
'</div>',
@ -401,7 +401,7 @@ var FIELD_TYPES = {
type: 'bool',
text: null,
default: false,
html: '<div class="field string">'+
html: '<div class="field checkbox">'+
'<input type="checkbox" class="value">'+
'<span class="text"></span>'+
'</div>',
@ -528,7 +528,7 @@ function formDialog(root, message, config, btn, cls){
})
setTimeout(function(){
form.find('.field').first()
form.find('.field input').first()
.focus()
.select()
}, 100)