050cb611bf
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@209 2a923420-c742-0410-a762-8d5b09965624
48 lines
1.1 KiB
JavaScript
Executable File
48 lines
1.1 KiB
JavaScript
Executable File
|
|
function reset_results()
|
|
{
|
|
$('#dresults').empty().val('Running package command, please wait...');
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
$('button').button();
|
|
|
|
var $dialog = $('#dialogue').dialog({
|
|
title: "Package Management Results",
|
|
modal: false, autoOpen: false,
|
|
height: 500, width: 700,
|
|
show: 'scale', hide: 'fade',
|
|
draggable: true, resizable: true,
|
|
buttons: { "Close":
|
|
function() {$(this).dialog('close');}},
|
|
close: function(e,u) { reset_results(); }
|
|
});
|
|
reset_results();
|
|
|
|
var opkg = '/cgi-bin/opkg.jim?cmd=';
|
|
|
|
$('#opkgupdate').click(function() {
|
|
$('#result_txt').load(opkg + 'update');
|
|
$('#results').show('slow');
|
|
});
|
|
|
|
$('button.remove').click(function() {
|
|
$('#dresults').load(opkg +
|
|
encodeURIComponent('remove ' + $(this).attr('id')));
|
|
$dialog.dialog('open');
|
|
});
|
|
|
|
$('button.install').click(function() {
|
|
$('#dresults').load(opkg +
|
|
encodeURIComponent('install ' + $(this).attr('id')));
|
|
$dialog.dialog('open');
|
|
});
|
|
|
|
$('button.upgrade').click(function() {
|
|
$('#dresults').load(opkg +
|
|
encodeURIComponent('upgrade ' + $(this).attr('id')));
|
|
$dialog.dialog('open');
|
|
});
|
|
});
|
|
|