mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
add some
This commit is contained in:
parent
29d9275a65
commit
f893b961a6
5
frame.js
5
frame.js
@ -1298,7 +1298,9 @@ Volcanos(chat.ONMOTION, {
|
|||||||
can.page.style(can, target, html.LEFT, margin)
|
can.page.style(can, target, html.LEFT, margin)
|
||||||
can.core.Timer({interval: 10, length: 30}, function(timer, interval, index, list) {
|
can.core.Timer({interval: 10, length: 30}, function(timer, interval, index, list) {
|
||||||
can.page.style(can, target, html.LEFT, margin-(index+1)*(margin/list.length))
|
can.page.style(can, target, html.LEFT, margin-(index+1)*(margin/list.length))
|
||||||
}, function() {})
|
}, function() {
|
||||||
|
can.onmotion.delay(can, function() { can._root.Action.onlayout._init(can) })
|
||||||
|
})
|
||||||
},
|
},
|
||||||
slideOut: function(can, cb) { var margin = 100
|
slideOut: function(can, cb) { var margin = 100
|
||||||
var target = can._target
|
var target = can._target
|
||||||
@ -1307,6 +1309,7 @@ Volcanos(chat.ONMOTION, {
|
|||||||
can.page.style(can, target, html.LEFT, (index+1)*(margin/list.length))
|
can.page.style(can, target, html.LEFT, (index+1)*(margin/list.length))
|
||||||
}, function() {
|
}, function() {
|
||||||
can.page.Remove(can, target), cb && cb()
|
can.page.Remove(can, target), cb && cb()
|
||||||
|
can.onmotion.delay(can, function() { can._root.Action.onlayout._init(can) })
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
slideAction: function(can, target) {
|
slideAction: function(can, target) {
|
||||||
|
15
lib/user.js
15
lib/user.js
@ -277,6 +277,14 @@ Volcanos("user", {
|
|||||||
if (target.value && hidden) { can.onmotion.hidden(can, can.page.parentNode(can, target, html.TR)) }
|
if (target.value && hidden) { can.onmotion.hidden(can, can.page.parentNode(can, target, html.TR)) }
|
||||||
return target.value
|
return target.value
|
||||||
},
|
},
|
||||||
|
layout: function(event) {
|
||||||
|
if (event && event.target) { can.onlayout.figure(event, can, ui._target)
|
||||||
|
can.user.isMobile && can.page.style(can, ui._target, html.LEFT, (can.page.width()-ui._target.offsetWidth)/2, html.TOP, 40)
|
||||||
|
} else {
|
||||||
|
can.getActionSize(function(left, top, height) { can.page.style(can, ui._target, html.LEFT, left||0, html.TOP, (height/4||0)) })
|
||||||
|
} can.onmotion.resize(can, ui._target)
|
||||||
|
|
||||||
|
},
|
||||||
cancel: function(event, can, button) {
|
cancel: function(event, can, button) {
|
||||||
can.page.ClassList.del(can, can._fields||can._target, "_process")
|
can.page.ClassList.del(can, can._fields||can._target, "_process")
|
||||||
button == "cancel" && msg._cancel && msg._cancel(event), callback("afterInputs", button)
|
button == "cancel" && msg._cancel && msg._cancel(event), callback("afterInputs", button)
|
||||||
@ -300,13 +308,10 @@ Volcanos("user", {
|
|||||||
var onclick = target.onclick; target.onclick = function(event) { can.onengine.signal(can, "onevent", can.request(event, {_type: target.name})), onclick && onclick(event) }
|
var onclick = target.onclick; target.onclick = function(event) { can.onengine.signal(can, "onevent", can.request(event, {_type: target.name})), onclick && onclick(event) }
|
||||||
})
|
})
|
||||||
title && can.page.Select(can, action._target, "input[name=submit]", function(target) { target.value = can.user.trans(can, title) })
|
title && can.page.Select(can, action._target, "input[name=submit]", function(target) { target.value = can.user.trans(can, title) })
|
||||||
if (event && event.target) { can.onlayout.figure(event, can, ui._target)
|
action.layout(event), can.onmotion.delay(can, function() { action.focus() }, 300)
|
||||||
can.user.isMobile && can.page.style(can, ui._target, html.LEFT, (can.page.width()-ui._target.offsetWidth)/2, html.TOP, 40)
|
|
||||||
} else {
|
|
||||||
can.getActionSize(function(left, top, height) { can.page.style(can, ui._target, html.LEFT, left||0, html.TOP, (height/4||0)) })
|
|
||||||
} can.onmotion.resize(can, ui._target), can.onmotion.delay(can, function() { action.focus() }, 300)
|
|
||||||
function callback(key, button) { var sub = can._fields? can: can.sub; sub.onaction && sub.onaction[key] && sub.onaction[key](event, sub, button, action) }
|
function callback(key, button) { var sub = can._fields? can: can.sub; sub.onaction && sub.onaction[key] && sub.onaction[key](event, sub, button, action) }
|
||||||
callback("beforeInputs")
|
callback("beforeInputs")
|
||||||
|
// ui._target._layout = action.layout
|
||||||
return button === true && action.submit(event, can, html.SUBMIT), action
|
return button === true && action.submit(event, can, html.SUBMIT), action
|
||||||
},
|
},
|
||||||
select: function(event, can, type, fields, cb, cbs) {
|
select: function(event, can, type, fields, cb, cbs) {
|
||||||
|
@ -353,8 +353,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
sub.onimport._field = function(msg) { var sup = sub; can.onmotion.clear(can, sub._output)
|
sub.onimport._field = function(msg) { var sup = sub; can.onmotion.clear(can, sub._output)
|
||||||
msg.Table(function(value) { value.style = html.OUTPUT
|
msg.Table(function(value) { value.style = html.OUTPUT
|
||||||
can.onappend.plugin(can, value, function(sub) { can.onimport.myField(can, sub)
|
can.onappend.plugin(can, value, function(sub) { can.onimport.myField(can, sub)
|
||||||
sub.onexport.output = function(_sub, msg) {
|
sub.onexport.output = function(_sub, msg) { can.onimport.myOption(sub)
|
||||||
can.onimport.myOption(sub)
|
|
||||||
can.user.isMobile && sub.onimport.size(sub, window.innerHeight-ACTION_HEIGHT, window.innerWidth, false)
|
can.user.isMobile && sub.onimport.size(sub, window.innerHeight-ACTION_HEIGHT, window.innerWidth, false)
|
||||||
}
|
}
|
||||||
var run = sub.run; sub.run = function(event, cmds, cb) {
|
var run = sub.run; sub.run = function(event, cmds, cb) {
|
||||||
@ -371,6 +370,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
if (sub._history.length > 1) { sub.request(event, {_toast: "reload"}); return sub.onimport.back(event, sub), cb && cb() }
|
if (sub._history.length > 1) { sub.request(event, {_toast: "reload"}); return sub.onimport.back(event, sub), cb && cb() }
|
||||||
var _last = can._stacks_current.pop()
|
var _last = can._stacks_current.pop()
|
||||||
can.onmotion.slideOut(_last, function() { var last = can._stacks_current[can._stacks_current.length-1]; last._select()
|
can.onmotion.slideOut(_last, function() { var last = can._stacks_current[can._stacks_current.length-1]; last._select()
|
||||||
|
can.onmotion.delay(can, function() { can._root.Action.onlayout._init(can) })
|
||||||
last.request(event, {_toast: "reload"})
|
last.request(event, {_toast: "reload"})
|
||||||
if (last.ConfIndex().split(".").pop() == "message") { last.Update(event) }
|
if (last.ConfIndex().split(".").pop() == "message") { last.Update(event) }
|
||||||
can._stacks_current.length == 1 && last._output.innerHTML == "" && last.Update(event)
|
can._stacks_current.length == 1 && last._output.innerHTML == "" && last.Update(event)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user