Cleanup main scripts
This commit is contained in:
@@ -116,7 +116,7 @@ function on_dialog_action(data)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function get_cal(y,m)
|
function get_cal(y,m)
|
||||||
local color = ui:colors()
|
local color = aio:colors()
|
||||||
local events = get_my_events(y,m,0)
|
local events = get_my_events(y,m,0)
|
||||||
local from = os.time{year=y,month=m,day=1}
|
local from = os.time{year=y,month=m,day=1}
|
||||||
local tab = {
|
local tab = {
|
||||||
@@ -151,7 +151,7 @@ function get_cal(y,m)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function format_day(y,m,d,events)
|
function format_day(y,m,d,events)
|
||||||
local color = ui:colors()
|
local color = aio:colors()
|
||||||
local from = os.time{year=y,month=m,day=d,hour=0,min=0,sec=0}
|
local from = os.time{year=y,month=m,day=d,hour=0,min=0,sec=0}
|
||||||
local to = os.time{year=y,month=m,day=d,hour=23,min=59,sec=59}
|
local to = os.time{year=y,month=m,day=d,hour=23,min=59,sec=59}
|
||||||
local yes = false
|
local yes = false
|
||||||
@@ -261,7 +261,7 @@ function get_day_tab(events)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function get_lines(events)
|
function get_lines(events)
|
||||||
local color = ui:colors()
|
local color = aio:colors()
|
||||||
local lines = {}
|
local lines = {}
|
||||||
for i,v in ipairs(events) do
|
for i,v in ipairs(events) do
|
||||||
table.insert(lines,"<font color = \""..v[9].."\">•</font>")
|
table.insert(lines,"<font color = \""..v[9].."\">•</font>")
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ end
|
|||||||
|
|
||||||
function on_network_result(result, code)
|
function on_network_result(result, code)
|
||||||
if code >= 200 and code < 299 then
|
if code >= 200 and code < 299 then
|
||||||
text = ajson:get_value(result, "object string:text")
|
text = ajson:read(result, "object string:text")
|
||||||
ui:show_lines{ text }
|
ui:show_lines{ text }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function on_click()
|
function on_click()
|
||||||
if text ~= nil then
|
if text ~= nil then
|
||||||
system:copy_to_clipboard(text)
|
system:to_clipboard(text)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ function on_alarm()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function redraw()
|
function redraw()
|
||||||
local color = ui:colors()
|
local color = aio:colors()
|
||||||
if unit == "temperature" then
|
if unit == "temperature" then
|
||||||
sum = round(f[units[unit][unit_from]..units[unit][unit_to]](amount),3)
|
sum = round(f[units[unit][unit_from]..units[unit][unit_to]](amount),3)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user