From 2b8b6f51d81efca41db7956ce933453cd308a435 Mon Sep 17 00:00:00 2001 From: shaoying Date: Thu, 12 Dec 2019 19:53:32 +0800 Subject: [PATCH] opt some --- src/plugin/story/index.shy | 2 +- src/plugin/vim/index.shy | 12 ++++++------ src/plugin/zsh/index.shy | 8 ++++---- usr/librarys/toolkit.js | 3 ++- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/plugin/story/index.shy b/src/plugin/story/index.shy index 34e06320..9b13bd68 100644 --- a/src/plugin/story/index.shy +++ b/src/plugin/story/index.shy @@ -4,7 +4,7 @@ kit share "共享" public "web.chat.share" \ button "共享" kit note "记事本" public "_:web.wiki.note" "@you" \ - text "volcano.md" name story imports path view long action auto \ + text "miss.md" name story imports path view long action auto \ button "查看" action auto \ button "返回" cb Last \ exports story file \ diff --git a/src/plugin/vim/index.shy b/src/plugin/vim/index.shy index 21055881..1a1b0164 100644 --- a/src/plugin/vim/index.shy +++ b/src/plugin/vim/index.shy @@ -20,7 +20,7 @@ kit favor "收藏" private "_:web.code.favor" "@you" post \ button "添加" kit editor "编辑器" private "web.code.login" list vim \ - text "" name sid imports plugin_vim_sid action auto \ + text "" name vim_sid action auto \ text "" name dream imports plugin_you \ text "" name topic imports plugin_see \ feature detail "prune" "复制" "下载" \ @@ -53,35 +53,35 @@ kit txts "插入记录" private "web.code.trend" list "vim.txts" \ button "返回" cb Last kit bufs "文件缓存" private "web.code.state" list vim bufs \ - text "" name sid imports plugin_vim_sid action auto \ + text "" name vim_sid action auto \ text "tag" name match view tiny \ text "" name value view tiny \ exports vim_file file "" vim_line line \ button "查看" action auto kit regs "粘贴缓存" private "web.code.state" list vim regs \ - text "" name sid imports plugin_vim_sid action auto \ + text "" name vim_sid action auto \ text "reg" name match view tiny \ text "" name value view tiny \ exports vim_word word \ button "查看" action auto kit marks "文件标记" private "web.code.state" list vim marks \ - text "" name sid imports plugin_vim_sid action auto \ + text "" name vim_sid action auto \ text "mark" name match view tiny \ text "" name value view tiny \ exports vim_file file "" vim_line line "" vim_col col "" \ button "查看" action auto kit tags "语法标记" private "web.code.state" list vim tags \ - text "" name sid imports plugin_vim_sid action auto \ + text "" name vim_sid action auto \ text "tag" name match view tiny \ text "" name value view tiny \ exports vim_file file "" vim_line line "" vim_word tag "" \ button "查看" action auto kit fixs "项目索引" private "web.code.state" list vim fixs \ - text "" name sid imports plugin_vim_sid action auto \ + text "" name vim_sid action auto \ text "files" name value view tiny \ text "" name value view tiny \ exports vim_file file "" vim_line line "" vim_word word "" \ diff --git a/src/plugin/zsh/index.shy b/src/plugin/zsh/index.shy index e2b5404f..f2cd8303 100644 --- a/src/plugin/zsh/index.shy +++ b/src/plugin/zsh/index.shy @@ -26,7 +26,7 @@ kit favor "收藏" private "_:web.code.favor" "@you" post \ button "添加" kit terminal "终端" private "web.code.login" list zsh \ - text "" name sid imports plugin_zsh_sid action auto \ + text "" name zsh_sid action auto \ text "" name dream imports plugin_you \ text "" name topic imports plugin_see \ feature detail "prune" "修改" "复制" "下载" \ @@ -51,19 +51,19 @@ kit free "内存" private "web.code.trend" list "zsh.free" \ button "返回" cb Last kit env "环境" private "web.code.state" list zsh env \ - text "" name sid imports plugin_zsh_sid action auto \ + text "" name zsh_sid action auto \ text "name" name match view tiny \ text "" name value view tiny \ button "查看" action auto kit ps "进程" private "web.code.state" list zsh ps \ - text "" name sid imports plugin_zsh_sid action auto \ + text "" name zsh_sid action auto \ text "PPID" name match view tiny \ text "" name value view tiny \ button "查看" action auto kit df "磁盘" private "web.code.state" list zsh df \ - text "" name sid imports plugin_zsh_sid action auto \ + text "" name zsh_sid action auto \ text "fs" name match view tiny \ text "" name value view tiny \ button "查看" action auto diff --git a/usr/librarys/toolkit.js b/usr/librarys/toolkit.js index 92482b8e..b3a6313c 100644 --- a/usr/librarys/toolkit.js +++ b/usr/librarys/toolkit.js @@ -370,7 +370,8 @@ kit = toolkit = (function() {var kit = {__proto__: document, OrderTable: function(table, field, cb, cbs) {if (!table) {return} table.oncontextmenu = table.onclick = function(event) {var target = event.target target.parentElement.childNodes.forEach(function(item, i) {if (item != target) {return} - if (target.tagName == "TH") {var dataset = target.dataset + if (target.tagName == "TH") { + var dataset = target.dataset dataset["sort_asc"] = (dataset["sort_asc"] == "1") ? 0: 1 kit.RangeTable(table, i, dataset["sort_asc"] == "1") } else if (target.tagName == "TD") {var index = 0