Skip to content

Cosmetic changes #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions mostrami/resources/ecs/mostrami.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ L2:
set the style of Right to `flex:1;height:100%;display:flex;flex-direction: column`

create Controls in Left
set the style of Controls to `flex:1;background:lightgray`
set the style of Controls to `flex:1;background:lightgray;padding:0 0.5em`

create Buttons in Controls
set the style of Buttons to `width:100%;padding:0.5em`
set the style of Buttons to `width:100%;padding:0.5em 0`

create ContentDiv in Left
set the style of ContentDiv to `width:100%;height:100%;position:relative`
Expand Down Expand Up @@ -140,11 +140,11 @@ L2:
set attribute `title` of Cycle to `Cycle screens`

create Status in Buttons
if Mobile set the style of Status to `height:1em;color:green`
else set the style of Status to `float:right;margin:0.5em 2em 0 0;color:green`
if Mobile set the style of Status to `height:1em`
else set the style of Status to `float:right;margin:0.5em 0 0 0;color:green`

create ScriptName in Controls
set the style of ScriptName to `display:flex;margin:0.5em 0;padding:0.5em`
set the style of ScriptName to `display:flex`
if Mobile set style `display` of ScriptName to `none`
create Span in ScriptName
set the style of Span to `flex:15`
Expand All @@ -153,7 +153,7 @@ L2:
set the style of NameEditor to `flex:85;display:inline-block`

create Tabs in Controls
set the style of Tabs to `width:100%;padding-bottom:0.5em;text-align:center`
set the style of Tabs to `width:100%;padding:0.5em 0;text-align:center`
put the width of Tabs into N
divide N by 4
set the elements of SectionButton to 4
Expand Down Expand Up @@ -229,6 +229,7 @@ L2:
put the content of NameEditor into Name
if Name is empty
begin
gosub to SetStatusRed
set the content of Status to `No script name has been given`
go to ResetStatus
end
Expand All @@ -252,6 +253,7 @@ L2:
put the content of NameEditor into Name
if Name is empty
begin
gosub to SetStatusRed
set the content of Status to `No script name has been given`
go to ResetStatus
end
Expand All @@ -264,12 +266,14 @@ L2:
if PasswordValid rest post Presentation to `_save/json/` cat Name
else put Presentation into storage as Name
put Presentation into Current
gosub to SetStatusGreen
set the content of Status to `Presentation '` cat Name cat `' saved`
put Name into CurrentScriptName
fork to ResetStatus
end
else
begin
gosub to SetStatusGreen
set the content of Status to `Nothing has changed`
fork to ResetStatus
end
Expand All @@ -281,13 +285,15 @@ L2:
put the content of NameEditor into Name
if Name is empty
begin
alert `Nothing to delete.`
stop
gosub to SetStatusGreen
set the content of Status to `Nothing to delete`
go to ResetStatus
end
if confirm `Are you sure you want to delete "` cat Name cat `"?`
begin
if PasswordValid rest post to `_delete/json/` cat Name
else remove Name from storage
gosub to SetStatusGreen
set the content of Status to `Script "` cat Name cat `" deleted`
set the content of NameEditor to empty
put empty into CurrentScriptName
Expand Down Expand Up @@ -487,6 +493,14 @@ CloseBrowser:
set style `display` of Media to `none`
stop

SetStatusRed:
set style `color` of Status to `red`
return

SetStatusGreen:
set style `color` of Status to `green`
return

ResetStatus:
wait 2
set the content of Status to ``
Expand Down