main.cgi.svn-base

来自「嵌入式无线路由系统openwrt的web配置工具」· SVN-BASE 代码 · 共 71 行

SVN-BASE
71
字号
#!/usr/bin/haserl# Copyright (C) 2008 OpenRB.comcontent-type: text/html(function(){  var moduleId = 'backup';  var elems = FlashSYS.getCache( moduleId );  if (!elems) {    var window = FlashSYS.newWindow({      id: moduleId,      title: $TR( moduleId ),      padding: 5,      width: 300,      height: 180    });        var table = new FlashSYS.Table(window.contentEl, {      click: function(params) {        if (params.file) {          document.window.open('/backups/' + params.file);        }      },      trPrefix: 'backup_',      tableHead: {        'filename': { width: 80 },        'restore': { width: 10, blank: true, confirm: 'backup_restore_confirm', params: { module: moduleId, action: 'restore' } },        'delete': { width: 10, blank: true, confirm: 'del_confirm', params: { module: moduleId, action: 'delete', reload: moduleId } }      }    });    FlashSYS.Control.addButton(window.footerEl, {      'params': { 'module': moduleId, 'action': 'form' },      'cls': 'Add',      'title': $TR('backup_create')    });    FlashSYS.Control.addButton(window.footerEl, {      'params': { 'module': moduleId, 'action': 'formupload' },      'cls': 'Upload',      'title': $TR('backup_upload')    });    elems = FlashSYS.setCache( moduleId, {      window: window,      table: table    });  }    var tableValues = {}, tableData = <? /lib/flashsys/modules/backup/main.lua ?>,      downTitle = $TR('title_download'), resTitle = $TR('title_restore'), delTitle = $TR('title_delete');  if ($type(tableData) != 'array') {    return;  }  for (var i = 0, j = tableData.length; i < j; i++) {    var id = 'entry' + i, value = tableData[i];    tableValues[ id ] = {      'params': { 'file': value },      'cells': [        { 'cls': 'DLoad', 'value': value, 'title': downTitle },        { 'cls': 'Icon Restore', 'data': value, 'title': resTitle },        { 'cls': 'Icon Delete', 'data': value, 'title': delTitle }      ]    };  }  elems.table.loadValues(tableValues);})();

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?