mirror of
https://github.com/kenzok8/small-package
synced 2025-01-08 11:17:34 +08:00
update 2024-07-04 04:17:58
This commit is contained in:
parent
e527b8af23
commit
ee87e7ccca
@ -19,7 +19,7 @@ String.prototype.replaceAll = function(search, replacement) {
|
||||
function removePath(filename, isdir) {
|
||||
var c = confirm('你确定要删除 ' + filename + ' 吗?');
|
||||
if (c) {
|
||||
iwxhr.get('/cgi-bin/luci/admin/nas/fileassistant/delete',
|
||||
iwxhr.get('/cgi-bin/luci/admin/system/fileassistant/delete',
|
||||
{
|
||||
path: concatPath(currentPath, filename),
|
||||
isdir: isdir
|
||||
@ -44,7 +44,7 @@ String.prototype.replaceAll = function(search, replacement) {
|
||||
}
|
||||
var c = confirm('你确定要安装 ' + filename + ' 吗?');
|
||||
if (c) {
|
||||
iwxhr.get('/cgi-bin/luci/admin/nas/fileassistant/install',
|
||||
iwxhr.get('/cgi-bin/luci/admin/system/fileassistant/install',
|
||||
{
|
||||
filepath: concatPath(currentPath, filename),
|
||||
isdir: isdir
|
||||
@ -76,7 +76,7 @@ String.prototype.replaceAll = function(search, replacement) {
|
||||
newname = newname.trim();
|
||||
if (newname != filename) {
|
||||
var newpath = concatPath(currentPath, newname);
|
||||
iwxhr.get('/cgi-bin/luci/admin/nas/fileassistant/rename',
|
||||
iwxhr.get('/cgi-bin/luci/admin/system/fileassistant/rename',
|
||||
{
|
||||
filepath: concatPath(currentPath, filename),
|
||||
newpath: newpath
|
||||
@ -93,7 +93,7 @@ String.prototype.replaceAll = function(search, replacement) {
|
||||
|
||||
function openpath(filename, dirname) {
|
||||
dirname = dirname || currentPath;
|
||||
window.open('/cgi-bin/luci/admin/nas/fileassistant/open?path='
|
||||
window.open('/cgi-bin/luci/admin/system/fileassistant/open?path='
|
||||
+ encodeURIComponent(dirname) + '&filename='
|
||||
+ encodeURIComponent(filename));
|
||||
}
|
||||
@ -210,7 +210,7 @@ String.prototype.replaceAll = function(search, replacement) {
|
||||
opt = opt || {};
|
||||
path = concatPath(path, '');
|
||||
if (currentPath != path) {
|
||||
iwxhr.get('/cgi-bin/luci/admin/nas/fileassistant/list',
|
||||
iwxhr.get('/cgi-bin/luci/admin/system/fileassistant/list',
|
||||
{path: path},
|
||||
function (x, res) {
|
||||
if (res.ec === 0) {
|
||||
@ -255,7 +255,7 @@ String.prototype.replaceAll = function(search, replacement) {
|
||||
formData.append('upload-dir', concatPath(currentPath, ''));
|
||||
formData.append('upload-file', uploadinput.files[0]);
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", "/cgi-bin/luci/admin/nas/fileassistant/upload", true);
|
||||
xhr.open("POST", "/cgi-bin/luci/admin/system/fileassistant/upload", true);
|
||||
xhr.onload = function() {
|
||||
if (xhr.status == 200) {
|
||||
var res = JSON.parse(xhr.responseText);
|
||||
|
Loading…
Reference in New Issue
Block a user