mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
opt macos
This commit is contained in:
parent
71462d8c0e
commit
ac6f14877c
14
frame.js
14
frame.js
@ -226,7 +226,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
|||||||
return can.onengine._plugin(event, can, msg, can, cmds, cb) || can.run(event, cmds, function(msg) {
|
return can.onengine._plugin(event, can, msg, can, cmds, cb) || can.run(event, cmds, function(msg) {
|
||||||
if (can.base.isFunc(cb)) { return cb(msg) } if (silent) { return }
|
if (can.base.isFunc(cb)) { return cb(msg) } if (silent) { return }
|
||||||
var _can = can._fields? can.sup: can; if (_can == (msg._can._fields? msg._can.sup: msg._can)) { if (can.core.CallFunc([_can, chat.ONIMPORT, ice.MSG_PROCESS], {can: _can, msg: msg})) { return } }
|
var _can = can._fields? can.sup: can; if (_can == (msg._can._fields? msg._can.sup: msg._can)) { if (can.core.CallFunc([_can, chat.ONIMPORT, ice.MSG_PROCESS], {can: _can, msg: msg})) { return } }
|
||||||
if (cmds && cmds[0] == ctx.ACTION) { if (can.base.isIn(cmds[1], mdb.CREATE, mdb.INSERT, mdb.IMPORT, mdb.EXPORT, "exports", "imports", nfs.TRASH) || msg.Length() == 0 && !msg.Result()) { return can.user.toastSuccess(can, cmds[1]), can.Update() } }
|
if (cmds && cmds[0] == ctx.ACTION) { if (can.base.isIn(cmds[1], mdb.CREATE, mdb.INSERT, mdb.PRUNES, mdb.IMPORT, mdb.EXPORT, "exports", "imports", nfs.TRASH) || msg.Length() == 0 && !msg.Result()) { return can.user.toastSuccess(can, cmds[1]), can.Update() } }
|
||||||
can.onappend._output(can, msg, meta.display||msg.Option(ice.MSG_DISPLAY)||meta.feature.display)
|
can.onappend._output(can, msg, meta.display||msg.Option(ice.MSG_DISPLAY)||meta.feature.display)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -680,9 +680,9 @@ Volcanos(chat.ONMOTION, {_init: function(can, target) {
|
|||||||
begin = {left: target.offsetLeft, top: target.offsetTop, width: target.offsetWidth, height: target.offsetHeight, x: event.x, y: event.y}
|
begin = {left: target.offsetLeft, top: target.offsetTop, width: target.offsetWidth, height: target.offsetHeight, x: event.x, y: event.y}
|
||||||
can.page.SelectChild(can, target.parentNode, html.FIELDSET, function(target) { can.page.style(can, target, "z-index") && can.page.style(can, target, "z-index", 9) }), can.page.style(can, target, "z-index", 10)
|
can.page.SelectChild(can, target.parentNode, html.FIELDSET, function(target) { can.page.style(can, target, "z-index") && can.page.style(can, target, "z-index", 9) }), can.page.style(can, target, "z-index", 10)
|
||||||
window._scroll = _window.onmousemove
|
window._scroll = _window.onmousemove
|
||||||
}, _window.onmouseup = function(event) { target = null, begin = {} }
|
}, _window.onmouseup = function(event) { target = null, begin = {}, delete(window._scroll) }
|
||||||
_window.onmousemove = function(event) {
|
_window.onmousemove = function(event) {
|
||||||
if (target) { can.onkeymap.prevent(event)
|
if (window._scroll) { can.onkeymap.prevent(event)
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case "left":
|
case "left":
|
||||||
can.page.style(can, target, html.LEFT, can.base.Min(begin.left + event.x - begin.x, 0, window.innerWidth-target.offsetWidth))
|
can.page.style(can, target, html.LEFT, can.base.Min(begin.left + event.x - begin.x, 0, window.innerWidth-target.offsetWidth))
|
||||||
@ -691,6 +691,10 @@ Volcanos(chat.ONMOTION, {_init: function(can, target) {
|
|||||||
case "right":
|
case "right":
|
||||||
cb? cb(target.offsetHeight, begin.width + event.x - begin.x): can.page.style(can, target, html.WIDTH, begin.width + event.x - begin.x);
|
cb? cb(target.offsetHeight, begin.width + event.x - begin.x): can.page.style(can, target, html.WIDTH, begin.width + event.x - begin.x);
|
||||||
break
|
break
|
||||||
|
case "top":
|
||||||
|
can.page.style(can, target, html.TOP, can.base.Min(begin.top + event.y - begin.y, top, window.innerHeight-target.offsetHeight))
|
||||||
|
cb? cb(begin.height + begin.y - event.y, target.offsetWidth): can.page.style(can, target, html.HEIGHT, begin.height + begin.y - event.y)
|
||||||
|
break
|
||||||
case "bottom":
|
case "bottom":
|
||||||
cb? cb(begin.height + event.y - begin.y, target.offsetWidth): can.page.style(can, target, html.HEIGHT, begin.height + event.y - begin.y)
|
cb? cb(begin.height + event.y - begin.y, target.offsetWidth): can.page.style(can, target, html.HEIGHT, begin.height + event.y - begin.y)
|
||||||
break
|
break
|
||||||
@ -701,7 +705,7 @@ Volcanos(chat.ONMOTION, {_init: function(can, target) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else { var _target = findTarget(event); if (!_target) { return }
|
} else { var _target = findTarget(event); if (!_target) { return }
|
||||||
var x = event.x - _target.offsetLeft, y = event.y - _target.offsetTop, margin = 32
|
var x = event.x - _target.offsetLeft, y = event.y - _target.offsetTop, margin = 20
|
||||||
if (-margin < x && x < margin) { action = "left"
|
if (-margin < x && x < margin) { action = "left"
|
||||||
can.page.style(can, _target, "cursor", "ew-resize")
|
can.page.style(can, _target, "cursor", "ew-resize")
|
||||||
} else if (_target.offsetWidth-margin < x && x < _target.offsetWidth+margin) { action = "right"
|
} else if (_target.offsetWidth-margin < x && x < _target.offsetWidth+margin) { action = "right"
|
||||||
@ -709,6 +713,8 @@ Volcanos(chat.ONMOTION, {_init: function(can, target) {
|
|||||||
} else if (_target.offsetHeight-margin < y && y < _target.offsetHeight+margin) { action = "bottom"
|
} else if (_target.offsetHeight-margin < y && y < _target.offsetHeight+margin) { action = "bottom"
|
||||||
can.page.style(can, _target, "cursor", "ns-resize")
|
can.page.style(can, _target, "cursor", "ns-resize")
|
||||||
} else if (-margin < y && y < margin) { action = "top"
|
} else if (-margin < y && y < margin) { action = "top"
|
||||||
|
can.page.style(can, _target, "cursor", "ns-resize")
|
||||||
|
} else if (margin < y && y < (can._fields? can.sup: can).onexport.actionHeight(can._fields? can.sup: can)) { action = "top"
|
||||||
can.page.style(can, _target, "cursor", "move")
|
can.page.style(can, _target, "cursor", "move")
|
||||||
} else { action = ""
|
} else { action = ""
|
||||||
can.page.style(can, _target, "cursor", "")
|
can.page.style(can, _target, "cursor", "")
|
||||||
|
@ -14,7 +14,7 @@ Volcanos(chat.ONFIGURE, {date: {
|
|||||||
MONTH, function(event, can, button, value) { now.setMonth(parseInt(value)-1), show(now) },
|
MONTH, function(event, can, button, value) { now.setMonth(parseInt(value)-1), show(now) },
|
||||||
mdb.NEXT, function() { now.setMonth(now.getMonth()+1), show(now) },
|
mdb.NEXT, function() { now.setMonth(now.getMonth()+1), show(now) },
|
||||||
chat._TRANS, kit.Dict(TODAY, "今天", mdb.NEXT, "下一月", mdb.PREV, "上一月"),
|
chat._TRANS, kit.Dict(TODAY, "今天", mdb.NEXT, "下一月", mdb.PREV, "上一月"),
|
||||||
)), can._table = can.page.Appends(can, can._output, [{view: [chat.CONTENT, html.TABLE]}])._target
|
)), can._table = can.page.Appends(can, can._output, [{view: [chat.CONTENT, html.TABLE], list: [{type: html.TBODY}]}]).tbody
|
||||||
target.value == "" && (now.setMinutes(now.getMinutes()>30? 30: 0), now.setSeconds(0))
|
target.value == "" && (now.setMinutes(now.getMinutes()>30? 30: 0), now.setSeconds(0))
|
||||||
function show(now) { can.Action(YEAR, now.getFullYear()), can.Action(MONTH, now.getMonth()+1)
|
function show(now) { can.Action(YEAR, now.getFullYear()), can.Action(MONTH, now.getMonth()+1)
|
||||||
can.Action(HOUR, now.getHours()), can.Action(MINUTE, parseInt(now.getMinutes()/5)*5), can.Action(SECOND, parseInt(now.getSeconds()/5)*5)
|
can.Action(HOUR, now.getHours()), can.Action(MINUTE, parseInt(now.getMinutes()/5)*5), can.Action(SECOND, parseInt(now.getSeconds()/5)*5)
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
Volcanos(chat.ONIMPORT, {_init: function(can, msg) {
|
Volcanos(chat.ONIMPORT, {_init: function(can, msg) {
|
||||||
can.current = msg.TableDetail(), can.onimport.layout(can)
|
can.current = msg.TableDetail(), can.onimport.layout(can)
|
||||||
},
|
},
|
||||||
layout: function(can) { var item = can.current; can.sup.onexport.title(can, item.name||item.link.split("?")[0])
|
layout: function(can) { var item = can.current; can.sup.onexport.title(can, item.name||item.link.split(mdb.QS)[0])
|
||||||
var target = can.page.Appends(can, can._output, [{type: html.IFRAME, src: item.link, height: can.ConfHeight(), width: can.ConfWidth(), style: {border: 0}}])._target
|
var target = can.page.Appends(can, can._output, [{type: html.IFRAME, src: item.link, height: can.ConfHeight(), width: can.ConfWidth(), style: {border: 0}}])._target
|
||||||
can.onmotion.delay(can, function() {
|
|
||||||
can.page.style(can, target.contentDocument.body, "background-color", "transparent")
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
Volcanos(chat.ONACTION, {open: function(event, can) { can.user.open(can.current.link) }})
|
Volcanos(chat.ONACTION, {open: function(event, can) { can.user.open(can.current.link) }})
|
||||||
|
@ -7,12 +7,12 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { can.onmotion.clear(
|
|||||||
},
|
},
|
||||||
_content: function(can, msg, head, list, key, get, set) { var begin_time = can.base.Date(can.Option(team.BEGIN_TIME)); can.sup.task && (can.sup.task._target = null)
|
_content: function(can, msg, head, list, key, get, set) { var begin_time = can.base.Date(can.Option(team.BEGIN_TIME)); can.sup.task && (can.sup.task._target = null)
|
||||||
var hash = {}; msg.Table(function(value, index) { var k = key(can.base.Date(value.begin_time)); hash[k] = (hash[k]||[]).concat([value]) })
|
var hash = {}; msg.Table(function(value, index) { var k = key(can.base.Date(value.begin_time)); hash[k] = (hash[k]||[]).concat([value]) })
|
||||||
can.ui.table = can.page.Append(can, can.ui.content, [{view: [[chat.CONTENT, team.PLAN], html.TABLE], list: can.core.List(list, function(hour, row) {
|
can.ui.table = can.page.Append(can, can.ui.content, [{view: [[chat.CONTENT, team.PLAN], html.TABLE], list: [{type: html.TBODY, list: can.core.List(list, function(hour, row) {
|
||||||
return {type: html.TR, list: can.core.List(head, function(week, col) {
|
return {type: html.TR, list: can.core.List(head, function(week, col) {
|
||||||
if (row == 0) { return {text: [can.user.trans(can, week), html.TH]} } if (col == 0) { return {text: [hour, html.TH]} }
|
if (row == 0) { return {text: [can.user.trans(can, week), html.TH]} } if (col == 0) { return {text: [hour, html.TH]} }
|
||||||
return can.onimport._task(can, msg, get(begin_time, col, row, hash), set(begin_time, col, row))
|
return can.onimport._task(can, msg, get(begin_time, col, row, hash), set(begin_time, col, row))
|
||||||
})}
|
})}
|
||||||
}) }])._target, can.onmotion.delay(can, function() { var target = can.sup.task && can.sup.task._target; target && target.click(), can.Status(mdb.COUNT, msg.Length()) })
|
}) }] }])._target, can.onmotion.delay(can, function() { var target = can.sup.task && can.sup.task._target; target && target.click(), can.Status(mdb.COUNT, msg.Length()) })
|
||||||
},
|
},
|
||||||
_task: function(can, msg, list, time) { return {type: html.TD, className: time == can.base.Time().slice(0, time.length)? html.SELECT: "",
|
_task: function(can, msg, list, time) { return {type: html.TD, className: time == can.base.Time().slice(0, time.length)? html.SELECT: "",
|
||||||
ondblclick: function(event) { can.onaction.insertTask(event, can, time+can.base.Time().slice(time.length)) },
|
ondblclick: function(event) { can.onaction.insertTask(event, can, time+can.base.Time().slice(time.length)) },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user