mirror of
https://shylinux.com/x/volcanos
synced 2025-04-26 01:04:06 +08:00
opt git
This commit is contained in:
parent
6857ebd13f
commit
976f76bd52
2
frame.js
2
frame.js
@ -413,7 +413,7 @@ Volcanos("onlayout", {help: "页面布局", list: [], _init: function(can, targe
|
||||
|
||||
can.page.Select(can, target, can.core.Keys(html.FIELDSET, chat.MAIN), function(field, index) {
|
||||
if (can.user.isMobile) {
|
||||
can.page.Modify(can, field, {style: {"padding-top": can.user.isLandscape? "0px": ""}})
|
||||
can.page.Modify(can, field, {style: {"padding-top": can.user.isLandscape()? "0px": ""}})
|
||||
} else {
|
||||
height -= can.page.Select(can, field, can.core.Keys(html.DIV, html.ACTION))[0].offsetHeight
|
||||
|
||||
|
@ -20,7 +20,7 @@ Volcanos("user", {help: "用户操作", agent: {
|
||||
},
|
||||
},
|
||||
isIE: navigator.userAgent.indexOf("MSIE") > -1,
|
||||
isLandscape: window.innerWidth > window.innerHeight,
|
||||
isLandscape: function() { return window.innerWidth > window.innerHeight },
|
||||
isWeiXin: navigator.userAgent.indexOf("MicroMessenger") > -1,
|
||||
isIPhone: navigator.userAgent.indexOf("iPhone") > -1,
|
||||
isMobile: navigator.userAgent.indexOf("Mobile") > -1,
|
||||
@ -50,7 +50,7 @@ Volcanos("user", {help: "用户操作", agent: {
|
||||
return text && (document.title = text), document.title
|
||||
},
|
||||
topic: function(can, name) {
|
||||
can.user.isMobile && (name += " mobile") && can.user.isLandscape && (name += " landscape")
|
||||
can.user.isMobile && (name += " mobile") && can.user.isLandscape() && (name += " landscape")
|
||||
can.page.Modify(can, document.body, {className: name})
|
||||
},
|
||||
language: function(can) {
|
||||
|
@ -180,6 +180,7 @@ fieldset {
|
||||
}
|
||||
fieldset>form.option {
|
||||
float:left;
|
||||
display:contents;
|
||||
}
|
||||
fieldset>form.option>div.item {
|
||||
float:left; margin-right:3px;
|
||||
|
@ -200,10 +200,13 @@ Volcanos("ondetail", {help: "用户交互", list: [],
|
||||
can.run(event, can.misc.Concat([ctx.ACTION, "inner"], cmds), function(msg) {
|
||||
msg.Option(ice.MSG_ACTION, cli.CLOSE)
|
||||
can.get("Action", "size", function(left, top, width, height) { left = left||0
|
||||
if (height > window.innerHeight) { height = window.innerHeight }
|
||||
var top = 120, margin = 20; if (can.user.isMobile) { margin = 0
|
||||
if (can.user.isLandscape) {
|
||||
if (can.user.isLandscape()) {
|
||||
height += (can.user.mod.isCmd? -20: 200)
|
||||
top = 24, sub.Conf(chat.HEIGHT, height-top)
|
||||
} else {
|
||||
height += (can.user.mod.isCmd? -80: 200)
|
||||
top = 48, sub.Conf(chat.HEIGHT, height-top)
|
||||
}
|
||||
} else {
|
||||
|
@ -4,7 +4,7 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg,
|
||||
can.onappend._status(can, ["from", "commit", "total", "max", "date", "text", "add", "del"])
|
||||
|
||||
can.msg = msg, can.data = msg.Table(), can.onimport._sum(can)
|
||||
can.Action(chat.HEIGHT, msg.Option(chat.HEIGHT)||can.user.mod.isCmd? "max": can.user.isMobile&&can.user.isLandscape? "200": "400")
|
||||
can.Action(chat.HEIGHT, msg.Option(chat.HEIGHT)||can.user.mod.isCmd? "max": can.user.isMobile&&can.user.isLandscape()? "200": "400")
|
||||
can.Action("speed", parseInt(msg.Option("speed")||"100"))
|
||||
|
||||
can.onappend.plugin(can, {type: chat.OUTPUT, index: "web.wiki.draw"}, function(sub) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user