Skip to content

Commit 802ac33

Browse files
committed
add text area support (#17)
1 parent 35d4bfc commit 802ac33

File tree

4 files changed

+114
-110
lines changed

4 files changed

+114
-110
lines changed

dist/css/brutusin-json-forms.css

+109-109
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,109 @@
1-
/*
2-
* Copyright 2015 brutusin.org
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*
16-
* @author Ignacio del Valle Alles [email protected]
17-
*/
18-
.loading-layer{
19-
position: absolute;
20-
top:0px;
21-
left:0px;
22-
z-index : 10;
23-
width: 100%;
24-
height: 100%;
25-
opacity: 0.7;
26-
background-color: white;
27-
}
28-
.loading-icon{
29-
position: absolute;
30-
top:14px;
31-
left:50%;
32-
z-index : 11;
33-
}
34-
.loading-icon-select{
35-
position: absolute;
36-
top:14px;
37-
left:50%;
38-
z-index : 11;
39-
}
40-
.loading-icon-checkbox{
41-
position: absolute;
42-
top:7px;
43-
left:3px;
44-
z-index : 11;
45-
}
46-
.glyphicon-refresh-animate {
47-
animation: spin .7s infinite linear;
48-
-webkit-animation: spin2 .7s infinite linear;
49-
}
50-
51-
@-webkit-keyframes spin2 {
52-
from { -webkit-transform: rotate(0deg);}
53-
to { -webkit-transform: rotate(360deg);}
54-
}
55-
56-
@keyframes spin {
57-
from { transform: scale(1) rotate(0deg);}
58-
to { transform: scale(1) rotate(360deg);}
59-
}
60-
form.brutusin-form table, form.brutusin-form input, form.brutusin-form select, form.brutusin-form textarea{
61-
width: 100% !important;
62-
min-width: 80px;
63-
}
64-
form.brutusin-form input[type=checkbox]{
65-
width: auto !important;
66-
min-width: auto !important;
67-
}
68-
form.brutusin-form textarea{
69-
height: 8em;
70-
}
71-
form.brutusin-form table table{
72-
border-left: solid 1px;
73-
border-color: lightgray;
74-
margin: 4px;
75-
}
76-
form.brutusin-form td {
77-
vertical-align: top;
78-
padding: 4px;
79-
white-space: nowrap;
80-
}
81-
form.brutusin-form td.prop-name {
82-
text-align: right;
83-
}
84-
form.brutusin-form td.add-prop-name table {
85-
text-align: right;
86-
border: none;
87-
}
88-
form.brutusin-form td.add-prop-name table td {
89-
vertical-align: middle;
90-
}
91-
form.brutusin-form td.prop-value {
92-
width: 100%;
93-
text-align: left;
94-
}
95-
form.brutusin-form td.item-index{
96-
font-size: 0.8em;
97-
color: lightgray;
98-
width: 25px;
99-
text-align: right;
100-
}
101-
form.brutusin-form td.item-action{
102-
width: 30px;
103-
}
104-
form.brutusin-form .error {
105-
border-color: red;
106-
}
107-
form.brutusin-form .error-message {
108-
color: red;
109-
}
1+
/*
2+
* Copyright 2015 brutusin.org
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
* @author Ignacio del Valle Alles [email protected]
17+
*/
18+
.loading-layer{
19+
position: absolute;
20+
top:0px;
21+
left:0px;
22+
z-index : 10;
23+
width: 100%;
24+
height: 100%;
25+
opacity: 0.7;
26+
background-color: white;
27+
}
28+
.loading-icon{
29+
position: absolute;
30+
top:14px;
31+
left:50%;
32+
z-index : 11;
33+
}
34+
.loading-icon-select{
35+
position: absolute;
36+
top:14px;
37+
left:50%;
38+
z-index : 11;
39+
}
40+
.loading-icon-checkbox{
41+
position: absolute;
42+
top:7px;
43+
left:3px;
44+
z-index : 11;
45+
}
46+
.glyphicon-refresh-animate {
47+
animation: spin .7s infinite linear;
48+
-webkit-animation: spin2 .7s infinite linear;
49+
}
50+
51+
@-webkit-keyframes spin2 {
52+
from { -webkit-transform: rotate(0deg);}
53+
to { -webkit-transform: rotate(360deg);}
54+
}
55+
56+
@keyframes spin {
57+
from { transform: scale(1) rotate(0deg);}
58+
to { transform: scale(1) rotate(360deg);}
59+
}
60+
form.brutusin-form table, form.brutusin-form input, form.brutusin-form select, form.brutusin-form textarea{
61+
width: 100% !important;
62+
min-width: 80px;
63+
}
64+
form.brutusin-form input[type=checkbox]{
65+
width: auto !important;
66+
min-width: auto !important;
67+
}
68+
form.brutusin-form textarea{
69+
height: 8em;
70+
}
71+
form.brutusin-form table table{
72+
border-left: solid 1px;
73+
border-color: lightgray;
74+
margin: 4px;
75+
}
76+
form.brutusin-form td {
77+
vertical-align: top;
78+
padding: 4px;
79+
white-space: nowrap;
80+
}
81+
form.brutusin-form td.prop-name {
82+
text-align: right;
83+
}
84+
form.brutusin-form td.add-prop-name table {
85+
text-align: right;
86+
border: none;
87+
}
88+
form.brutusin-form td.add-prop-name table td {
89+
vertical-align: middle;
90+
}
91+
form.brutusin-form td.prop-value {
92+
width: 100%;
93+
text-align: left;
94+
}
95+
form.brutusin-form td.item-index{
96+
font-size: 0.8em;
97+
color: lightgray;
98+
width: 25px;
99+
text-align: right;
100+
}
101+
form.brutusin-form td.item-action{
102+
width: 30px;
103+
}
104+
form.brutusin-form .error {
105+
border-color: red;
106+
}
107+
form.brutusin-form .error-message {
108+
color: red;
109+
}

dist/js/brutusin-json-forms.js

+2
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ if (typeof brutusin === "undefined") {
196196
}
197197
} else if (s.format === "email") {
198198
input.type = "email";
199+
} else if (s.format === "text") {
200+
input = document.createElement("textarea");
199201
} else {
200202
input.type = "text";
201203
}

0 commit comments

Comments
 (0)