mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
opt some
This commit is contained in:
parent
20b03f623b
commit
3495b8ac4d
9
frame.js
9
frame.js
@ -595,13 +595,16 @@ Volcanos(chat.ONMOTION, {_init: function(can, target) {
|
|||||||
|
|
||||||
move: function(can, target, layout, cb) { var begin; layout = layout||{}
|
move: function(can, target, layout, cb) { var begin; layout = layout||{}
|
||||||
can.page.style(can, target, layout), target.onmousedown = function(event) {
|
can.page.style(can, target, layout), target.onmousedown = function(event) {
|
||||||
if (can.page.tagis(event.target, html.BUTTON, html.SELECT)) { return }
|
if (event.target != target && !event.ctrlKey) { return }
|
||||||
if (!event.ctrlKey && !can.page.tagis(target, html.FIELDSET)) { return }
|
can.onkeymap.prevent(event)
|
||||||
|
// if (can.page.tagis(event.target, html.BUTTON, html.SELECT)) { return }
|
||||||
|
// if (!event.ctrlKey && !can.page.tagis(target, html.FIELDSET)) { return }
|
||||||
layout.height = target.offsetHeight, layout.width = target.offsetWidth
|
layout.height = target.offsetHeight, layout.width = target.offsetWidth
|
||||||
layout.left = target.offsetLeft, layout.top = target.offsetTop
|
layout.left = target.offsetLeft, layout.top = target.offsetTop
|
||||||
begin = can.base.Copy({x: event.x, y: event.y}, layout)
|
begin = can.base.Copy({x: event.x, y: event.y}, layout)
|
||||||
}, target.onmouseup = function(event) { begin = null }, target.onmousemove = function(event) { if (!begin) { return }
|
}, target.onmouseup = function(event) { begin = null }, target.onmousemove = function(event) { if (!begin) { return }
|
||||||
if (can.page.tagis(event.target, html.BUTTON, html.SELECT)) { return }
|
// if (event.target != target) { return }
|
||||||
|
// if (can.page.tagis(event.target, html.BUTTON, html.SELECT)) { return }
|
||||||
if (event.shiftKey) {
|
if (event.shiftKey) {
|
||||||
layout.height = begin.height + event.y - begin.y, layout.width = begin.width + event.x - begin.x
|
layout.height = begin.height + event.y - begin.y, layout.width = begin.width + event.x - begin.x
|
||||||
can.page.style(can, target, html.HEIGHT, layout.height, html.WIDTH, layout.width)
|
can.page.style(can, target, html.HEIGHT, layout.height, html.WIDTH, layout.width)
|
||||||
|
@ -113,7 +113,7 @@ Volcanos("misc", {Message: function(event, can) { var msg = {}
|
|||||||
xhr.upload.onprogress = function(event) { can.base.isFunc(msg._progress) && msg._progress(event, parseInt(event.loaded*100/event.total), event.total, event.loaded) }
|
xhr.upload.onprogress = function(event) { can.base.isFunc(msg._progress) && msg._progress(event, parseInt(event.loaded*100/event.total), event.total, event.loaded) }
|
||||||
} else if (can.user.isMailMaster) {
|
} else if (can.user.isMailMaster) {
|
||||||
var data = can.core.ItemForm(form, function(value, index, key) { return key+ice.EQ+encodeURIComponent(value) }).join("&")
|
var data = can.core.ItemForm(form, function(value, index, key) { return key+ice.EQ+encodeURIComponent(value) }).join("&")
|
||||||
if (data) { url += (url.indexOf(url, "?") == -1? "?": "&")+data }
|
if (data) { xhr.open(msg._method||web.POST, url += (url.indexOf(url, "?") == -1? "?": "&")+data) }
|
||||||
} else {
|
} else {
|
||||||
var data = can.core.ItemForm(form, function(v, i, k) { return k+ice.EQ+encodeURIComponent(v) }).join("&")
|
var data = can.core.ItemForm(form, function(v, i, k) { return k+ice.EQ+encodeURIComponent(v) }).join("&")
|
||||||
xhr.setRequestHeader(web.ContentType, web.ContentFORM)
|
xhr.setRequestHeader(web.ContentType, web.ContentFORM)
|
||||||
@ -177,7 +177,7 @@ Volcanos("misc", {Message: function(event, can) { var msg = {}
|
|||||||
if (can.base.isUndefined(key)) { return args } else if (can.base.isObject(key)) {
|
if (can.base.isUndefined(key)) { return args } else if (can.base.isObject(key)) {
|
||||||
can.core.Item(key, function(k, v) { args[k] === ""? delete(args[k]): (args[k] = v) })
|
can.core.Item(key, function(k, v) { args[k] === ""? delete(args[k]): (args[k] = v) })
|
||||||
} else if (can.base.isUndefined(value)) { return args[key] } else {
|
} else if (can.base.isUndefined(value)) { return args[key] } else {
|
||||||
args[key] == ""? delete(args[key]): (args[key] = value)
|
value === ""? delete(args[key]): (args[key] = value)
|
||||||
}
|
}
|
||||||
var search = can.base.Args(args); return search? location.search = search: location.href = location.pathname
|
var search = can.base.Args(args); return search? location.search = search: location.href = location.pathname
|
||||||
},
|
},
|
||||||
|
@ -81,7 +81,7 @@ Volcanos("user", {info: {}, agent: {
|
|||||||
close: function(event) { can.page.Remove(can, action._target), action.timer.stop = true },
|
close: function(event) { can.page.Remove(can, action._target), action.timer.stop = true },
|
||||||
timer: can.core.Timer({interval: 100, length: (meta.duration||1000)/100}, function(event, interval, index) {
|
timer: can.core.Timer({interval: 100, length: (meta.duration||1000)/100}, function(event, interval, index) {
|
||||||
if (index > 30) { ui.duration.innerHTML = index/10+"s..." }
|
if (index > 30) { ui.duration.innerHTML = index/10+"s..." }
|
||||||
}, function() { action.close() }), _target: ui._target, ui: ui,
|
}, function() { action.close() }), _target: ui._target,
|
||||||
}); can.onmotion.story.auto(can, ui._target), meta.resize && can.onmotion.delayResize(can, ui._target, meta.resize)
|
}); can.onmotion.story.auto(can, ui._target), meta.resize && can.onmotion.delayResize(can, ui._target, meta.resize)
|
||||||
return can._toast && (can._toast.close(), delete(can._toast)), can._toast = action
|
return can._toast && (can._toast.close(), delete(can._toast)), can._toast = action
|
||||||
},
|
},
|
||||||
@ -213,7 +213,7 @@ Volcanos("user", {info: {}, agent: {
|
|||||||
})
|
})
|
||||||
}))])
|
}))])
|
||||||
},
|
},
|
||||||
}, can.base.Obj(method, can.user.isMobile? ["密码登录"]: ["扫码授权"]), can.page.Append(can, document.body, [{view: "input login"}])._target); layout()
|
}, can.base.Obj(method, can.user.isMobile? ["密码登录"]: ["扫码授权"]), can.page.Append(can, document.body, [{view: "input login float"}])._target); layout()
|
||||||
},
|
},
|
||||||
logout: function(can, force) { if (force||can.user.confirm("logout?")) { can.runAction({}, aaa.LOGOUT, [], function(msg) {
|
logout: function(can, force) { if (force||can.user.confirm("logout?")) { can.runAction({}, aaa.LOGOUT, [], function(msg) {
|
||||||
can.misc.Search(can, chat.SHARE)? can.misc.Search(can, chat.SHARE, ""): can.user.reload(true)
|
can.misc.Search(can, chat.SHARE)? can.misc.Search(can, chat.SHARE, ""): can.user.reload(true)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
body { background-color:black; color:cyan; font-size:16px; }
|
body { background-color:black; color:cyan; font-size:16px; }
|
||||||
legend { background-color:cadetblue; color:white; padding:0 20px; margin-right:5px; }
|
legend { background-color:cadetblue; color:white; padding:0 20px; margin-right:5px; }
|
||||||
select { background-color:black; color:cyan; padding:0 10px; margin-right:5px; }
|
select { background-color:black; color:cyan; padding:0 10px; margin-right:5px; }
|
||||||
textarea { background-color:cyan; padding:5px; width:400px; }
|
textarea { background-color:cyan; padding:5px; width:400px; resize:vertical; }
|
||||||
input { background-color:cyan; padding:0 5px; margin-right:5px; }
|
input { background-color:cyan; padding:0 5px; margin-right:5px; }
|
||||||
input:not([type=button]) { width:120px; }
|
input:not([type=button]) { width:120px; }
|
||||||
input[name=text] { width:160px; }
|
input[name=text] { width:160px; }
|
||||||
@ -98,7 +98,7 @@ body>div.carte div.item { background-color:#0e3369b3; padding:3px 12px; }
|
|||||||
body>div.carte div.space { border-bottom:solid 1px gray; }
|
body>div.carte div.space { border-bottom:solid 1px gray; }
|
||||||
body>div.input div.content { overflow:auto; }
|
body>div.input div.content { overflow:auto; }
|
||||||
body>div.input td { padding:5px; }
|
body>div.input td { padding:5px; }
|
||||||
body>div.input select { width:181px; }
|
body>div.input select { width:171px; }
|
||||||
body>div.input input[type=text] { width:171px; }
|
body>div.input input[type=text] { width:171px; }
|
||||||
body>div.input input[name=password] { padding:5px; border:0; width:171px; }
|
body>div.input input[name=password] { padding:5px; border:0; width:171px; }
|
||||||
body>div.input input[name=username] { padding:5px; border:0; width:171px; }
|
body>div.input input[name=username] { padding:5px; border:0; width:171px; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user