From 4c813b6667284a9f9748b93cd23db1c574cee5fb Mon Sep 17 00:00:00 2001 From: Kenneth Jao Date: Sun, 9 Oct 2016 22:57:04 -0400 Subject: [PATCH] Basic new input system --- hourglass/client/main/main.css | 121 +++++++++---- hourglass/client/main/main.html | 105 +++++++----- hourglass/client/main/main.js | 291 +++++++++++++------------------- hourglass/lib/constants.js | 39 +++-- 4 files changed, 293 insertions(+), 263 deletions(-) diff --git a/hourglass/client/main/main.css b/hourglass/client/main/main.css index 7e63165..c341a02 100644 --- a/hourglass/client/main/main.css +++ b/hourglass/client/main/main.css @@ -246,8 +246,7 @@ input, textarea { } #optionsContainer { - width: 200px; - padding: 40px; + padding: 40px 0 40px 40px; right: 0; } @@ -576,6 +575,29 @@ input, textarea { text-align: right; } +input.clickModify, textarea.clickModify { + font-size: 2.2vh; + font-weight: 200; + background-color: rgba(0,0,0,0); + border-color: rgba(0,0,0,0); + + -webkit-transition: background-color 0.4s ease, border-color 0.4s ease; + -moz-transition: background-color 0.4s ease, border-color 0.4s ease; + -ms-transition: background-color 0.4s ease, border-color 0.4s ease; + transition: background-color 0.4s ease, border-color 0.4s ease; +} + +input.clickModify:hover, textarea.clickModify:hover { + cursor: pointer; + background-color: rgba(255,255,255,0.1); + border-color: rgba(255,255,255,0.1);; +} + +textarea.clickModify { + font-size: 1.8vh; + width: 100%; +} + #editWork { min-height: 68vh; margin: auto; @@ -584,19 +606,6 @@ input, textarea { box-shadow: 2px 2px 5px 3px #333; } -#editWork input, #editWork textarea { - font-size: 2vh; - background-color: #FFF; -} - -#workDesca { - width: 15vw; -} - -#workDatea { - width: 17vw; -} - #editWorkCont { width: 100%; height: 100%; @@ -613,11 +622,12 @@ input, textarea { #workNameDiv { padding: 4% 4% 0 3.5%; -}f +} -#workName { +#wName { font-weight: 400; - font-size: 3vh; + font-size: 2.5vh; + width: 100%; } .workTitle, .prefTitle { @@ -632,6 +642,11 @@ input, textarea { margin-top: 5%; } +.prefWrapper { + width: 85%; + position: relative; +} + #workNamerestrict, #workDescrestrict, #commentrestrict { display: none; } @@ -641,7 +656,42 @@ input, textarea { float: right; } -.workOptions, .prefOptions { +.dropdown { + font-size: 2.5vh; + width: 100%; + height: 3vh; + padding: 3%; + + background-color: rgba(0,0,0,0.15); + cursor: pointer; + outline: 0; + + -webkit-transition: background-color 0.4s ease; + -moz-transition: background-color 0.4s ease; + -ms-transition: background-color 0.4s ease; + transition: background-color 0.4s ease; +} + +.dropdown:hover { + background-color: rgba(0,0,0,0.07); +} + +.dropdown span { + pointer-events: none; +} + +.fa-caret-down { + font-size: 1.8vh; + margin-right: 5%; + + line-height: 3vh; + float: right; + pointer-events: none; +} + +.optionHolder { + width: 100%; + box-shadow: 2px 2px 5px 3px #666; position: absolute; @@ -656,13 +706,16 @@ input, textarea { transition: opacity 0.4s ease; } -.workOptionText, .prefOptionText { +.optionHolder:hover { + background-color: rgba(255,255,255,0.05); +} + +.optionText { font-size: 150%; min-width: 10%; - padding: 20px; + padding: 5% 7% 5% 7%; margin: 0; - text-align: center; cursor: pointer; -webkit-transition: box-shadow 0.4s ease; @@ -671,6 +724,10 @@ input, textarea { transition: box-shadow 0.4s ease; } +.optionText:hover { + box-shadow: inset 0 0 0 99999px rgba(0,0,0,0.1); +} + .workOptions p:hover, .prefOptions p:hover { box-shadow: inset 0 0 0 99999px rgba(0,0,0,0.1); } @@ -695,12 +752,18 @@ input, textarea { #workInfoNmCont { padding: 3% 0 3% 7%; + position: relative; } #workInfoNmCont div { margin-bottom: 5%; } +#wType { + margin: 0 !important; + padding: 2%; +} + .datepicker { box-shadow: 2px 2px 5px 3px #666; color: #000; @@ -708,12 +771,12 @@ input, textarea { position: absolute; } -.inputRadio { - margin-bottom: 0 !important; -} - .type { - margin-left: 11%; + width: 95%; + margin-left: 1%; +} +.type p { + padding: 3% 5% 3% 5%; } #workComments h3 { @@ -1042,7 +1105,7 @@ input, textarea { } #prefCont { - padding: 5%; + margin-left: 5%; } #prefCont .changeInput { @@ -1144,7 +1207,7 @@ input, textarea { background-color: rgba(0,0,0,0.2); } -#done { +#doneUsers { height: 34vh; top: 0; overflow-y: auto; diff --git a/hourglass/client/main/main.html b/hourglass/client/main/main.html index cb5eca9..dc88f55 100644 --- a/hourglass/client/main/main.html +++ b/hourglass/client/main/main.html @@ -61,63 +61,70 @@

Preferences

-
-
-
+

Theme:

- {{themeName}} + -
-

Light

-

Dark

+
+ {{#each selectOptions 'theme'}} + {{> option}} + {{/each}}
-
-
+

Default Mode:

- {{pref 'mode'}} + -
-

Classes

-

Calendar

+
+ {{#each selectOptions 'mode'}} + {{> option}} + {{/each}}
-
-
+

Hide Homework:

- {{pref 'timeHide'}} + -
-

1 Day

-

2 Days

-

1 Week

-

1 Month

-

Never

+
+ {{#each selectOptions 'timeHide'}} + {{> option}} + {{/each}}
-
-
+

Hide Done:

- {{pref 'done'}} + -
-

Yes

-

No

+
+ {{#each selectOptions 'done'}} + {{> option}} + {{/each}}
-
-
+

Hide Reported:

- {{pref 'hideReport'}} + -
-

Yes

-

No

+
+ {{#each selectOptions 'hideReport'}} + {{> option}} + {{/each}}
+
{{#if currMode 'classes'}} @@ -141,29 +148,31 @@
{{commentLength}} - {{work 'name'}} + +
Due Date:
- {{work 'dueDate'}} + +
Description:
{{commentLength}} - {{work 'description'}} + +
-
Type: - {{work 'type'}} + -
-

Normal

-

Quiz

-

Test

-

Project

-

Other

+
+ {{#each selectOptions 'type'}} + {{> option}} + {{/each}}