add thumbnail generation

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1445 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg
2013-03-11 23:00:41 +00:00
parent ccf3cc1888
commit b2c7be03a4
13 changed files with 307 additions and 23 deletions

View File

@@ -271,7 +271,7 @@ function preparemenu(el, menu)
else
$(menu).disableContextMenuItems('#crop');
if (el.attr('bx') > 0 && el.attr('odencd') == 0)
if (el.attr('odencd') == 0)
$(menu).enableContextMenuItems('#thm');
else
$(menu).disableContextMenuItems('#thm');
@@ -449,14 +449,16 @@ var menuclick = function(action, el, pos)
break;
case 'thm':
confirm_action('re-generate the thumbnail for',
thumbnail_callback, file, dir, id);
window.location.href = '/browse/thumbnail/index.jim?file=' +
file;
break;
case 'vthm':
window.open('/browse/bmp.jim?file=' + file, 'hxwebifbmp',
'height=78,width=140,toolbar=no,' +
'scrollbars=no,menubar=no,location=no,titlebar=no');
// window.open('/browse/bmpw.jim?file=' + file, 'hxwebifbmp',
// 'height=156,width=280,toolbar=no,' +
// 'scrollbars=no,menubar=no,location=no,titlebar=no');
$('#thmbmp').attr('src', 'bmp.jim?file=' + file);
$('#bmpdialogue').dialog('open');
break;
case 'download':
@@ -783,6 +785,18 @@ var dmenuclick = function(action, el, pos)
close: function() { $('#savestream_name').val(''); }
});
$('#bmpdialogue').dialog({
autoOpen: false,
height: 'auto', width: 'auto',
modal: true,
buttons: {
"Close": function() {
$(this).dialog('close');
}
},
close: function() { $('#thmbmp').attr('src', 'about:blank'); }
});
// Create re-usable confirmation dialogue.
$confirm = $('#confirm').dialog({
modal: true, autoOpen: false,