Quellcode durchsuchen

Made inputs identical

j8
Ilya Daynatovich vor 8 Jahren
Ursprung
Commit
5b0777d4db

+ 16
- 78
css/_base.scss Datei anzeigen

@@ -29,36 +29,6 @@ html, body, input, textarea, keygen, select, button {
29 29
     color: #636363;
30 30
 }
31 31
 
32
-input[type='text'], input[type='password'], textarea {
33
-    display: inline-block;
34
-    width: 100%;
35
-    padding: 5px 7px;
36
-    color: $inputColor;
37
-    border-radius: $borderRadius;
38
-    line-height: 32px;
39
-    height: 32px;
40
-    text-align: left;
41
-    border:1px solid $inputBorderColor;
42
-    background-color: $inputBackground;
43
-    outline: none; /* removes the default outline */
44
-    resize: none; /* prevents the user-resizing, adjust to taste */
45
-}
46
-
47
-@include placeholder {
48
-    color: $placeHolderColor;
49
-}
50
-
51
-textarea {
52
-    overflow: hidden;
53
-    word-wrap: break-word;
54
-    resize: none;
55
-    line-height: 1.5em;
56
-}
57
-
58
-button.no-icon {
59
-    padding: 0 1em;
60
-}
61
-
62 32
 button, input, select, textarea {
63 33
     margin: 0;
64 34
     vertical-align: baseline;
@@ -75,10 +45,26 @@ input[type="reset"], input[type="submit"] {
75 45
     cursor: pointer;
76 46
 }
77 47
 
48
+textarea {
49
+    overflow: hidden;
50
+    word-wrap: break-word;
51
+    resize: none;
52
+    line-height: 1.5em;
53
+}
54
+
55
+input[type='text'], input[type='password'], textarea {
56
+    outline: none; /* removes the default outline */
57
+    resize: none; /* prevents the user-resizing, adjust to taste */
58
+}
59
+
78 60
 button {
79 61
     color: #FFF;
80 62
     background-color: $buttonBackground;
81 63
     border-radius: $borderRadius;
64
+
65
+    &.no-icon {
66
+        padding: 0 1em;
67
+    }
82 68
 }
83 69
 
84 70
 button,
@@ -132,42 +118,6 @@ form {
132 118
     font-size: 12px;
133 119
 }
134 120
 
135
-/**
136
- * Hides an element.
137
- */
138
-.hide {
139
-    display: none !important;
140
-}
141
-
142
-/**
143
- * Shows an element.
144
- */
145
-.show {
146
-    display: block !important;
147
-}
148
-
149
-/**
150
- * Shows an inline element.
151
- */
152
-.show-inline {
153
-    display: inline-block !important;
154
-}
155
-
156
-.show-list-item {
157
-    display: list-item !important;
158
-}
159
-
160
-/**
161
- * Shows a flex element.
162
- */
163
-.show-flex {
164
-    display: -webkit-box !important;
165
-    display: -moz-box !important;
166
-    display: -ms-flexbox !important;
167
-    display: -webkit-flex !important;
168
-    display: flex !important;
169
-}
170
-
171 121
 /**
172 122
 * Tooltips
173 123
 **/
@@ -189,18 +139,6 @@ form {
189 139
     visibility: visible;
190 140
 }
191 141
 
192
-.link {
193
-    cursor: pointer;
194
-    color: $linkFontColor;
195
-    @include transition(color .1s ease-out);
196
-
197
-    &:hover {
198
-        color: $linkHoverFontColor;
199
-        text-decoration: underline;
200
-        @include transition(color .1s ease-in);
201
-    }
202
-}
203
-
204 142
 #inviteLinkRef {
205 143
     -webkit-user-select: text;
206 144
     user-select: text;

+ 0
- 10
css/_side_toolbar_container.scss Datei anzeigen

@@ -30,16 +30,6 @@
30 30
         width: 80%;
31 31
     }
32 32
 
33
-    /**
34
-     * Specify colors for edit elements.
35
-     */
36
-    select, input[type="button"], input[type="text"], input[type="reset"],
37
-    input[type="submit"] {
38
-        color: $inputColor;
39
-        background: $inputBackground;
40
-        border: none;
41
-    }
42
-
43 33
     /**
44 34
      * Specify styling of elements inside a block.
45 35
      */

+ 38
- 0
css/_utils.scss Datei anzeigen

@@ -0,0 +1,38 @@
1
+/**
2
+ * Hides an element.
3
+ */
4
+.hide {
5
+    display: none !important;
6
+}
7
+
8
+/**
9
+ * Shows an element.
10
+ */
11
+.show {
12
+    display: block !important;
13
+}
14
+
15
+/**
16
+ * Shows an inline element.
17
+ */
18
+.show-inline {
19
+    display: inline-block !important;
20
+}
21
+
22
+/**
23
+* Shows as a list item
24
+**/
25
+.show-list-item {
26
+    display: list-item !important;
27
+}
28
+
29
+/**
30
+ * Shows a flex element.
31
+ */
32
+.show-flex {
33
+    display: -webkit-box !important;
34
+    display: -moz-box !important;
35
+    display: -ms-flexbox !important;
36
+    display: -webkit-flex !important;
37
+    display: flex !important;
38
+}

+ 0
- 18
css/components/_form-control.scss Datei anzeigen

@@ -19,24 +19,6 @@
19 19
         font-weight: $labelFontWeight;
20 20
     }
21 21
 
22
-    &__input {
23
-        margin-bottom: 8px;
24
-        @include transition(all .2s ease-in);
25
-
26
-        &:last-child {
27
-            margin-bottom: inherit;
28
-        }
29
-
30
-        &::selection {
31
-            background-color: $defaultDarkSelectionColor;
32
-        }
33
-
34
-        &.error {
35
-            color: $errorColor;
36
-            border-color: $errorColor;
37
-        }
38
-    }
39
-
40 22
     &__em {
41 23
         color: $inputControlEmColor;
42 24
     }

+ 30
- 1
css/components/_input-control.scss Datei anzeigen

@@ -1,3 +1,32 @@
1 1
 .input-control {
2
-    
2
+    @include transition(all .2s ease-in);
3
+    display: inline-block;
4
+    width: 100%;
5
+    padding: 5px 7px;
6
+    color: $inputColor;
7
+    border-radius: $borderRadius;
8
+    line-height: 32px;
9
+    height: 32px;
10
+    text-align: left;
11
+    border:1px solid $inputBorderColor;
12
+    background-color: $inputBackground;
13
+    margin-bottom: 8px;
14
+
15
+    &:last-child {
16
+        margin-bottom: inherit;
17
+    }
18
+
19
+    &::selection {
20
+        background-color: $defaultDarkSelectionColor;
21
+    }
22
+
23
+
24
+    &.error {
25
+        color: $errorColor;
26
+        border-color: $errorColor;
27
+    }
28
+}
29
+
30
+@include placeholder {
31
+    color: $placeHolderColor;
3 32
 }

+ 11
- 0
css/components/_link.scss Datei anzeigen

@@ -0,0 +1,11 @@
1
+.link {
2
+    cursor: pointer;
3
+    color: $linkFontColor;
4
+    @include transition(color .1s ease-out);
5
+
6
+    &:hover {
7
+        color: $linkHoverFontColor;
8
+        text-decoration: underline;
9
+        @include transition(color .1s ease-in);
10
+    }
11
+}

+ 3
- 0
css/main.scss Datei anzeigen

@@ -33,6 +33,7 @@
33 33
 
34 34
 @import 'toastr';
35 35
 @import 'base';
36
+@import 'utils';
36 37
 @import 'overlay/overlay';
37 38
 @import 'inlay';
38 39
 @import 'reload_overlay/reload_overlay';
@@ -56,8 +57,10 @@
56 57
 @import 'keyboard-shortcuts';
57 58
 @import 'redirect_page';
58 59
 @import 'components/form-control';
60
+@import 'components/link';
59 61
 @import 'shortcuts/main';
60 62
 @import 'components/button-control';
63
+@import 'components/_input-control.scss';
61 64
 @import "modals/invite/invite";
62 65
 @import "connection-info";
63 66
 @import 'aui-components/dropdown';

+ 4
- 3
modules/UI/UI.js Datei anzeigen

@@ -84,8 +84,7 @@ function promptDisplayName() {
84 84
             <label data-i18n="${labelKey}" class="form-control__label"></label>
85 85
             <input name="displayName" type="text"
86 86
                data-i18n="[placeholder]defaultNickname"
87
-               class="form-control__input"
88
-               autofocus>
87
+               class="input-control" autofocus>
89 88
          </div>`
90 89
     );
91 90
 
@@ -742,9 +741,11 @@ UI.showLoginPopup = function(callback) {
742 741
 
743 742
     let message = (
744 743
         `<input name="username" type="text"
745
-                placeholder="user@domain.net" autofocus>
744
+                placeholder="user@domain.net"
745
+                class="input-control" autofocus>
746 746
          <input name="password" type="password"
747 747
                 data-i18n="[placeholder]dialog.userPassword"
748
+                class="input-control"
748 749
                 placeholder="user password">`
749 750
     );
750 751
 

+ 2
- 2
modules/UI/authentication/LoginDialog.js Datei anzeigen

@@ -11,10 +11,10 @@ function getPasswordInputHtml() {
11 11
 
12 12
     return `
13 13
         <input name="username" type="text" 
14
-               class="form-control__input"
14
+               class="input-control"
15 15
                placeholder=${placeholder} autofocus>
16 16
         <input name="password" type="password"
17
-               class="form-control__input"
17
+               class="input-control"
18 18
                data-i18n="[placeholder]dialog.userPassword">`;
19 19
 }
20 20
 

+ 1
- 1
modules/UI/feedback/FeedbackWindow.js Datei anzeigen

@@ -66,7 +66,7 @@ function createRateFeedbackHTML() {
66 66
                 </div>
67 67
             </div>
68 68
             <div class="details">
69
-                <textarea id="feedbackTextArea" class="form-control__input" 
69
+                <textarea id="feedbackTextArea" class="input-control" 
70 70
                     data-i18n="[placeholder]dialog.feedbackHelp"></textarea>
71 71
             </div>
72 72
         </form>`;

+ 3
- 2
modules/UI/invite/InviteDialogView.js Datei anzeigen

@@ -124,7 +124,7 @@ export default class InviteDialogView {
124 124
                 <label class="form-control__label" for="inviteLinkRef"
125 125
                     data-i18n="${this.dialog.titleKey}"></label>
126 126
                 <div class="form-control__container">
127
-                    <input class="form-control__input inviteLink"
127
+                    <input class="input-control inviteLink"
128 128
                            id="inviteLinkRef" type="text"
129 129
                            ${this.inviteAttributes} readonly>
130 130
                     <button data-i18n="dialog.copy" class="${classes}"></button>
@@ -155,7 +155,8 @@ export default class InviteDialogView {
155 155
                        for="newPasswordInput" data-i18n="dialog.addPassword">
156 156
                </label>
157 157
                 <div class="form-control__container">
158
-                    <input class="form-control__input" id="newPasswordInput"
158
+                    <input class="input-control"
159
+                           id="newPasswordInput"
159 160
                            type="text" 
160 161
                            data-i18n="[placeholder]dialog.createPassword">
161 162
                     <button id="addPasswordBtn" id="inviteDialogAddPassword"

+ 4
- 3
modules/UI/invite/RequirePasswordDialog.js Datei anzeigen

@@ -33,13 +33,14 @@ export default class RequirePasswordDialog {
33 33
      */
34 34
     _getBodyMessage() {
35 35
         return (
36
-            `<div class="input-control">
36
+            `<div class="form-control">
37 37
                 <label class="input-control__label"
38 38
                        data-i18n="${this.labelKey}"></label>
39
-                <input class="input-control__input" name="lockKey" type="text"
39
+                <input class="input-control__input input-control"
40
+                       name="lockKey" type="text"
40 41
                    data-i18n="[placeholder]dialog.password"
41 42
                    autofocus id="${this.inputId}">
42
-                <p class="input-control__hint input-control__hint_error hide"
43
+                <p class="form-control__hint form-control__hint_error hide"
43 44
                    id="${this.errorId}"
44 45
                    data-i18n="${this.errorKey}"></p>
45 46
             </div>`

+ 3
- 1
modules/UI/recording/Recording.js Datei anzeigen

@@ -55,7 +55,8 @@ function _requestLiveStreamId() {
55 55
             state0: {
56 56
                 titleKey: "dialog.liveStreaming",
57 57
                 html:
58
-                    `<input name="streamId" type="text"
58
+                    `<input  class="input-control"
59
+                    name="streamId" type="text"
59 60
                     data-i18n="[placeholder]dialog.streamKey"
60 61
                     autofocus>`,
61 62
                 persistent: false,
@@ -123,6 +124,7 @@ function _requestRecordingToken () {
123 124
     let messageString = (
124 125
         `<input name="recordingToken" type="text"
125 126
                 data-i18n="[placeholder]dialog.token"
127
+                class="input-control"
126 128
                 autofocus>`
127 129
     );
128 130
     return new Promise(function (resolve, reject) {

+ 1
- 0
modules/UI/shared_video/SharedVideo.js Datei anzeigen

@@ -765,6 +765,7 @@ function requestVideoLink() {
765 765
                 titleKey: "dialog.shareVideoTitle",
766 766
                 html:  `
767 767
                     <input name="sharedVideoUrl" type="text"
768
+                           class="input-control"
768 769
                            data-i18n="[placeholder]defaultLink"
769 770
                            autofocus>`,
770 771
                 persistent: false,

+ 2
- 1
modules/UI/side_pannels/chat/Chat.js Datei anzeigen

@@ -17,7 +17,8 @@ const htmlStr = `
17 17
         <div id="nickname">
18 18
             <span data-i18n="chat.nickname.title"></span>
19 19
             <form>
20
-                <input type='text' id="nickinput" autofocus 
20
+                <input type='text'
21
+                       class="input-control" id="nickinput" autofocus
21 22
                     data-i18n="[placeholder]chat.nickname.popover">
22 23
             </form>
23 24
         </div>

+ 2
- 2
modules/UI/side_pannels/profile/Profile.js Datei anzeigen

@@ -10,12 +10,12 @@ const htmlStr = `
10 10
         <div class="sideToolbarBlock first">
11 11
             <label class="first" data-i18n="profile.setDisplayNameLabel">
12 12
             </label>
13
-            <input type="text" id="setDisplayName"
13
+            <input class="input-control" type="text" id="setDisplayName"
14 14
                 data-i18n="[placeholder]settings.name">
15 15
         </div>
16 16
         <div class="sideToolbarBlock">
17 17
             <label data-i18n="profile.setEmailLabel"></label>
18
-            <input id="setEmail" type="text" 
18
+            <input id="setEmail" type="text" class="input-control" 
19 19
                 data-i18n="[placeholder]profile.setEmailInput">
20 20
         </div>
21 21
         <div id="authenticationContainer" 

+ 2
- 1
modules/UI/toolbars/Toolbar.js Datei anzeigen

@@ -311,7 +311,8 @@ function showSipNumberInput () {
311 311
         : '';
312 312
     let titleKey = "dialog.sipMsg";
313 313
     let msgString = (`
314
-            <input name="sipNumber" type="text"
314
+            <input class="input-control"
315
+                   name="sipNumber" type="text"
315 316
                    value="${defaultNumber}" autofocus>`);
316 317
 
317 318
     APP.UI.messageHandler.openTwoButtonDialog({

Laden…
Abbrechen
Speichern