mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-25 16:58:06 +08:00
fix wiki err
This commit is contained in:
parent
ab9ba1f46c
commit
28493d4ba5
@ -4,5 +4,5 @@ var version = struct {
|
||||
host string
|
||||
self int
|
||||
}{
|
||||
"2019-07-26 20:50:41", "ZYB-20190522USI", 272,
|
||||
"2019-07-27 05:58:32", "com", 218,
|
||||
}
|
||||
|
@ -80,9 +80,9 @@ func dir(m *ctx.Message, root string, name string, level int, deep bool, dir_typ
|
||||
}
|
||||
case "file":
|
||||
if f.IsDir() {
|
||||
m.Add("append", "name", f.Name()+"/")
|
||||
m.Add("append", "file", f.Name()+"/")
|
||||
} else {
|
||||
m.Add("append", "name", f.Name())
|
||||
m.Add("append", "file", f.Name())
|
||||
}
|
||||
case "name":
|
||||
m.Add("append", "name", f.Name())
|
||||
|
@ -66,11 +66,13 @@ var Index = &ctx.Context{Name: "wiki", Help: "文档中心",
|
||||
},
|
||||
Commands: map[string]*ctx.Command{
|
||||
"wiki_tree": &ctx.Command{Name: "wiki_tree", Help: "wiki_tree", Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) (e error) {
|
||||
m.Cmdy("nfs.dir", path.Join(m.Confx("wiki_level"), kit.Select(m.Option("wiki_class"), arg, 0)), "dir_sort", "time", "time_r")
|
||||
m.Cmdy("nfs.dir", path.Join(m.Confx("wiki_level"), kit.Select(m.Option("wiki_class"), arg, 0)),
|
||||
"time", "line", "size", "file", "dir_sort", "time", "time_r")
|
||||
return
|
||||
}},
|
||||
"wiki_text": &ctx.Command{Name: "wiki_text", Help: "wiki_text", Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) (e error) {
|
||||
which := m.Cmdx("nfs.path", path.Join(m.Confx("wiki_level"), m.Option("wiki_class"), m.Confx("wiki_favor", arg, 0)))
|
||||
which := m.Cmdx("nfs.path", path.Join(m.Confx("wiki_level"), m.Option("wiki_class"), m.Confx("wiki_favor", arg, 0)),
|
||||
"time", "line", "size", "file")
|
||||
|
||||
if ls, e := ioutil.ReadFile(which); e == nil {
|
||||
m.Conf("wiki_visit", []string{which, m.Option("access")},
|
||||
|
@ -49,7 +49,7 @@ fieldset>div.action>div.space {
|
||||
}
|
||||
fieldset>div.output {
|
||||
clear:both;
|
||||
max-height:800px;
|
||||
/* max-height:800px; */
|
||||
padding:6px;
|
||||
}
|
||||
fieldset>div.output div.item:hover {
|
||||
|
@ -64,13 +64,13 @@ var page = Page({
|
||||
})))
|
||||
|
||||
ui.tree.innerHTML = "", kit.AppendChild(ui.tree, ctx.Table(msg, function(value, index) {
|
||||
return value.filename.endsWith("/") && {"text": [value.filename, "div"], click: function(event, target) {
|
||||
location.hash = "", ctx.Search({"wiki_class": ctx.Search("wiki_class")+value.filename, "wiki_favor": ""})
|
||||
return value.file.endsWith("/") && {"text": [value.file, "div"], click: function(event, target) {
|
||||
location.hash = "", ctx.Search({"wiki_class": ctx.Search("wiki_class")+value.file, "wiki_favor": ""})
|
||||
}}
|
||||
}))
|
||||
ui.list.innerHTML = "", kit.AppendChild(ui.list, ctx.Table(msg, function(value, index) {
|
||||
return !value.filename.endsWith("/") && {"text": [value.time.substr(5, 5)+" "+value.filename, "div"], click: function(event, target) {
|
||||
location.hash = "", ctx.Search("wiki_favor", value.filename)
|
||||
return !value.file.endsWith("/") && {"text": [value.time.substr(5, 5)+" "+value.file, "div"], click: function(event, target) {
|
||||
location.hash = "", ctx.Search("wiki_favor", value.file)
|
||||
}}
|
||||
}))
|
||||
})
|
||||
@ -93,6 +93,9 @@ var page = Page({
|
||||
page.Conf("menu.display", value || (page.Conf("menu.display")? "": "none"))
|
||||
},
|
||||
Size: function(width, height) {
|
||||
if (kit.isMobile) {
|
||||
return
|
||||
}
|
||||
if (page.Conf("menu.float")) {
|
||||
ui.menu.className = "menu left"
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user