git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1398 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg
2013-02-09 22:46:15 +00:00
parent f116cc5801
commit 2ab6f7caa2
85 changed files with 180 additions and 492 deletions

View File

@@ -6,14 +6,7 @@ require settings.class pkg.class altrow
if {[[settings] pkgdev]} { set filter 0 } else { set filter 1 }
puts "Content-Type: text/html"
puts "Pragma: no-cache"
puts "Expires: Thu, 01 Jan 1970 00:00:00 GMT"
puts ""
cgi_input
#cgi_dump
if {![dict exists $_cgi type]} { set _cgi(type) avail }
httpheader
proc pkgrow {pkg} {
set name [$pkg get name]
@@ -60,7 +53,7 @@ proc pkgrow {pkg} {
pkg loadmeta
set type $_cgi(type)
set type [cgi_get type "avail"]
set pkgs [pkg $type]

View File

@@ -66,17 +66,19 @@ $(document).ready(function() {
function loaddata(data, isfinal)
{
//console.log('loaddata called, final=' + isfinal);
//console.log('Data: ' + data);
$('#dresults').append(data);
if (window.console)
{
console.log('loaddata called, final=' + isfinal);
console.log('Data: ' + data);
}
if (isfinal)
{
$('#dresults').text(data);
$('#dspinner').hide('slow');
if (!$('#dresults').text())
$('#dresults').append('Nothing to do.');
else
$('#complete').show('slow');
$('#complete').show('slow');
}
else
$('#dresults').append(data);
}
function execopkg(arg, pkg)
@@ -95,20 +97,16 @@ $(document).ready(function() {
$('#dialogue').attr('pkg', pkg);
$dialog.dialog('open');
// $('#dresults').load(opkg + arg, function() {
// $('#dspinner').hide('slow');
// });
$.ajax({
type: "GET",
url: opkg + arg,
progress: loaddata,
success: function(data) {
//console.log("ajax success");
loaddata(data, true);
},
error: function(_, _, e) {
//console.log("ajax error");
if (window.console)
console.log("ajax error");
alert(e);
}
});