mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-30 10:50:08 +00:00
several more bugs fixed and some tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
f7e635c05f
commit
72a0003c5a
@ -73,6 +73,7 @@ var KEYBOARD_CONFIG = {
|
|||||||
//
|
//
|
||||||
'.viewer.overlay .overlay-block.dialog': {
|
'.viewer.overlay .overlay-block.dialog': {
|
||||||
title: 'Dialog',
|
title: 'Dialog',
|
||||||
|
ignore: '*',
|
||||||
|
|
||||||
Enter: doc('Accept dialog',
|
Enter: doc('Accept dialog',
|
||||||
function(){
|
function(){
|
||||||
|
|||||||
17
ui/modes.js
17
ui/modes.js
@ -181,11 +181,21 @@ var toggleSlideShowMode = createCSSClassToggler(
|
|||||||
|
|
||||||
// interval from user...
|
// interval from user...
|
||||||
//var interval = prompt('Slideshow interval (sec):', SLIDESHOW_INTERVAL/1000)
|
//var interval = prompt('Slideshow interval (sec):', SLIDESHOW_INTERVAL/1000)
|
||||||
prompt('Slideshow interval (sec):', SLIDESHOW_INTERVAL/1000)
|
formDialog($('.viewer'), 'Slideshow', {
|
||||||
.done(function(interval){
|
'Interval:': (SLIDESHOW_INTERVAL/1000) + 'sec',
|
||||||
interval = parseFloat(interval)
|
'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_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...')
|
showStatus('Slideshow: starting', SLIDESHOW_LOOP ? 'looped...' : 'unlooped...')
|
||||||
|
|
||||||
@ -220,6 +230,7 @@ var toggleSlideShowMode = createCSSClassToggler(
|
|||||||
} else {
|
} else {
|
||||||
window._slideshow_timer != null && clearInterval(_slideshow_timer)
|
window._slideshow_timer != null && clearInterval(_slideshow_timer)
|
||||||
showStatus('Slideshow: stopped...')
|
showStatus('Slideshow: stopped...')
|
||||||
|
hideOverlay($('.viewer'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
6
ui/ui.js
6
ui/ui.js
@ -383,7 +383,7 @@ var FIELD_TYPES = {
|
|||||||
type: 'text',
|
type: 'text',
|
||||||
text: null,
|
text: null,
|
||||||
default: '',
|
default: '',
|
||||||
html: '<div class="field checkbox">'+
|
html: '<div class="field string">'+
|
||||||
'<span class="text"></span>'+
|
'<span class="text"></span>'+
|
||||||
'<input type="text" class="value">'+
|
'<input type="text" class="value">'+
|
||||||
'</div>',
|
'</div>',
|
||||||
@ -401,7 +401,7 @@ var FIELD_TYPES = {
|
|||||||
type: 'bool',
|
type: 'bool',
|
||||||
text: null,
|
text: null,
|
||||||
default: false,
|
default: false,
|
||||||
html: '<div class="field string">'+
|
html: '<div class="field checkbox">'+
|
||||||
'<input type="checkbox" class="value">'+
|
'<input type="checkbox" class="value">'+
|
||||||
'<span class="text"></span>'+
|
'<span class="text"></span>'+
|
||||||
'</div>',
|
'</div>',
|
||||||
@ -528,7 +528,7 @@ function formDialog(root, message, config, btn, cls){
|
|||||||
})
|
})
|
||||||
|
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
form.find('.field').first()
|
form.find('.field input').first()
|
||||||
.focus()
|
.focus()
|
||||||
.select()
|
.select()
|
||||||
}, 100)
|
}, 100)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user