diff --git a/src/plugin/love/index.js b/src/plugin/love/index.js
index 69ec965b..cca761e7 100644
--- a/src/plugin/love/index.js
+++ b/src/plugin/love/index.js
@@ -1,15 +1,18 @@
-{init: function(run, field, option, output) {
- return {
- show: function(event) {
- run(event, ["", "", "cmd", "ssh.data", "show", "love"], function(msg) {
- ctx.Table(msg, function(value) {
- var ts = ".s"+value.when.split(" ")[0].split("-").join("")
- kit.Selector(output, ts, function(item) {
- item.parentNode.style.backgroundColor = "red"
- item.parentNode.title = value.where
- })
- })
+{init: function(run, field, option, output) {return {
+ show: function(event) {
+ run(event, ["", "", "cmd", "ssh.data", "show", option.table.value], function(msg) {ctx.Table(msg, function(value) {
+ kit.Selector(output, ".s"+value[option.when.value].split(" ")[0].split("-").join(""), function(item) {
+ item.parentNode.style.backgroundColor = "red"
+ item.parentNode.title = value[option.where.value]
})
- },
- }
-}}
+ })})
+ },
+ show_after: function(msg) {
+ var now = kit.format_date(new Date())
+ kit.Selector(output, ".s"+now.split(" ")[0].split("-").join(""), function(item) {
+ item.parentNode.style.backgroundColor = "red"
+ item.innerText = "TODAY"
+ item.parentNode.title = "today"
+ })
+ },
+}}}
diff --git a/src/plugin/love/index.shy b/src/plugin/love/index.shy
index 890dba7f..81509c18 100644
--- a/src/plugin/love/index.shy
+++ b/src/plugin/love/index.shy
@@ -3,7 +3,7 @@ kit imports "导入" "" "" private "ssh.data" "import" \
text "" name file \
button "导入"
-fun meets "第一眼" private \
+fun meet "第一眼" private \
text "love" name table imports plugin_table \
text "date" name when \
text "" name where \
@@ -16,9 +16,13 @@ fun meets "第一眼" private \
copy ssh.data insert _ when _ where __
end
-kit date "日历" "index.js" protected "cli.date" format '%s' "s20060102" space true _ nature _ \
+kit date "日历" "index.js" protected "cli.date" _ nature _ \
+ \ space true format '%s' "s20060102" \
text "2019-07-08" name "起始时间" \
text "date" name "截止时间" \
+ text "love" name "table" imports plugin_table \
+ text "when" name "when" \
+ text "where" name "where" \
button "查看" action auto \
button "显示" click show
diff --git a/usr/librarys/example.js b/usr/librarys/example.js
index 0df45816..001d2175 100644
--- a/usr/librarys/example.js
+++ b/usr/librarys/example.js
@@ -867,7 +867,9 @@ function Plugin(page, pane, field, runs) {
},
display: function(arg, cb) {
deal = arg, plugin.ondaemon[deal||"table"](plugin.msg, cb)
+ plugin.show_after(plugin.msg)
},
+ show_after: function(msg) {},
ondaemon: {
inner: function(msg, cb) {
output.style.maxWidth = pane.target.clientWidth-20+"px"