webif/var/mongoose/html/diag/script.js
hummypkg 973a7cdacf improve diagnostics and file editor
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@755 2a923420-c742-0410-a762-8d5b09965624
2012-02-22 19:09:46 +00:00

46 lines
1.0 KiB
JavaScript

$(function() {
$('button').button();
$('#rundiag').click(function() {
$('#results')
.slideDown()
.text('\n\nRunning diagnostic, please wait...\n\n')
.load('rundiag.jim?diag=' +
encodeURIComponent($('#seq').val()), function() {
$('#results').wrapInner('<pre>');
});
});
$('#runfopkg').click(function() {
$('#results')
.slideDown()
.text('\n\nForcibly re-installing package, please wait...\n\n')
.load('/cgi-bin/opkg.jim?cmd=install+--force-reinstall+' +
encodeURIComponent($('#fopkg').val()), function() {
$('#results').wrapInner('<pre>');
$('#fopkg').val('');
});
});
$('a.log').click(function() {
$('#results')
.slideDown()
.text('\n\nLoading log, please wait...\n\n')
.load('/cgi-bin/cat.jim?file=' +
encodeURIComponent($(this).attr('file')), function() {
$('#results').wrapInner('<pre>');
});
});
$('#runedit').click(function(e) {
e.preventDefault();
window.location = '/edit/edit.jim';
});
$('#runreset').disable();
});