x-editable-rails-bs4 1.5.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +22 -0
  3. data/README.md +221 -0
  4. data/lib/generators/x_editable_rails/install_generator.rb +12 -0
  5. data/lib/generators/x_editable_rails/templates/x-editable.yml +19 -0
  6. data/lib/x-editable-rails.rb +15 -0
  7. data/lib/x-editable-rails/configuration.rb +62 -0
  8. data/lib/x-editable-rails/version.rb +7 -0
  9. data/lib/x-editable-rails/view_helpers.rb +167 -0
  10. data/vendor/assets/images/editable/clear.png +0 -0
  11. data/vendor/assets/images/editable/loading.gif +0 -0
  12. data/vendor/assets/javascripts/editable/bootstrap-editable.js +6722 -0
  13. data/vendor/assets/javascripts/editable/bootstrap2-editable.js +7007 -0
  14. data/vendor/assets/javascripts/editable/bootstrap3-editable.js +6807 -0
  15. data/vendor/assets/javascripts/editable/inputs-ext/address.js +170 -0
  16. data/vendor/assets/javascripts/editable/inputs-ext/bootstrap-wysihtml5.js +499 -0
  17. data/vendor/assets/javascripts/editable/inputs-ext/typeahead-editable.js +86 -0
  18. data/vendor/assets/javascripts/editable/inputs-ext/typeahead.js +1139 -0
  19. data/vendor/assets/javascripts/editable/inputs-ext/wysihtml5-editable.js +146 -0
  20. data/vendor/assets/javascripts/editable/inputs-ext/wysihtml5.js +9521 -0
  21. data/vendor/assets/javascripts/editable/jquery-editable-poshytip.js +5118 -0
  22. data/vendor/assets/javascripts/editable/jqueryui-editable.js +5065 -0
  23. data/vendor/assets/javascripts/editable/rails.js.coffee +3 -0
  24. data/vendor/assets/javascripts/editable/rails/data_classes.js.coffee +23 -0
  25. data/vendor/assets/javascripts/editable/rails/editable_form.js.coffee +51 -0
  26. data/vendor/assets/javascripts/editable/rails/error_handling.js.coffee +4 -0
  27. data/vendor/assets/stylesheets/editable/bootstrap-editable.scss +674 -0
  28. data/vendor/assets/stylesheets/editable/bootstrap2-editable.scss +655 -0
  29. data/vendor/assets/stylesheets/editable/bootstrap3-editable.scss +655 -0
  30. data/vendor/assets/stylesheets/editable/inputs-ext/address.css +9 -0
  31. data/vendor/assets/stylesheets/editable/inputs-ext/bootstrap-typeahead.css +49 -0
  32. data/vendor/assets/stylesheets/editable/inputs-ext/bootstrap-wysihtml5.css +102 -0
  33. data/vendor/assets/stylesheets/editable/inputs-ext/wysiwyg-color.css +67 -0
  34. data/vendor/assets/stylesheets/editable/jquery-editable.scss +205 -0
  35. data/vendor/assets/stylesheets/editable/jqueryui-editable.scss +205 -0
  36. metadata +121 -0
@@ -0,0 +1,9 @@
1
+ .editable-address {
2
+ display: block;
3
+ margin-bottom: 5px;
4
+ }
5
+
6
+ .editable-address span {
7
+ width: 70px;
8
+ display: inline-block;
9
+ }
@@ -0,0 +1,49 @@
1
+ .twitter-typeahead .tt-query,
2
+ .twitter-typeahead .tt-hint {
3
+ margin-bottom: 0;
4
+ }
5
+
6
+ .tt-dropdown-menu {
7
+ min-width: 160px;
8
+ margin-top: 2px;
9
+ padding: 5px 0;
10
+ background-color: #fff;
11
+ border: 1px solid #ccc;
12
+ border: 1px solid rgba(0,0,0,.2);
13
+ *border-right-width: 2px;
14
+ *border-bottom-width: 2px;
15
+ -webkit-border-radius: 6px;
16
+ -moz-border-radius: 6px;
17
+ border-radius: 6px;
18
+ -webkit-box-shadow: 0 5px 10px rgba(0,0,0,.2);
19
+ -moz-box-shadow: 0 5px 10px rgba(0,0,0,.2);
20
+ box-shadow: 0 5px 10px rgba(0,0,0,.2);
21
+ -webkit-background-clip: padding-box;
22
+ -moz-background-clip: padding;
23
+ background-clip: padding-box;
24
+ }
25
+
26
+ .tt-suggestion {
27
+ display: block;
28
+ padding: 3px 20px;
29
+ }
30
+
31
+ .tt-suggestion.tt-is-under-cursor {
32
+ color: #fff;
33
+ background-color: #0081c2;
34
+ background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
35
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
36
+ background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
37
+ background-image: -o-linear-gradient(top, #0088cc, #0077b3);
38
+ background-image: linear-gradient(to bottom, #0088cc, #0077b3);
39
+ background-repeat: repeat-x;
40
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0)
41
+ }
42
+
43
+ .tt-suggestion.tt-is-under-cursor a {
44
+ color: #fff;
45
+ }
46
+
47
+ .tt-suggestion p {
48
+ margin: 0;
49
+ }
@@ -0,0 +1,102 @@
1
+ ul.wysihtml5-toolbar {
2
+ margin: 0;
3
+ padding: 0;
4
+ display: block;
5
+ }
6
+
7
+ ul.wysihtml5-toolbar::after {
8
+ clear: both;
9
+ display: table;
10
+ content: "";
11
+ }
12
+
13
+ ul.wysihtml5-toolbar > li {
14
+ float: left;
15
+ display: list-item;
16
+ list-style: none;
17
+ margin: 0 5px 10px 0;
18
+ }
19
+
20
+ ul.wysihtml5-toolbar a[data-wysihtml5-command=bold] {
21
+ font-weight: bold;
22
+ }
23
+
24
+ ul.wysihtml5-toolbar a[data-wysihtml5-command=italic] {
25
+ font-style: italic;
26
+ }
27
+
28
+ ul.wysihtml5-toolbar a[data-wysihtml5-command=underline] {
29
+ text-decoration: underline;
30
+ }
31
+
32
+ ul.wysihtml5-toolbar a.btn.wysihtml5-command-active {
33
+ background-image: none;
34
+ -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
35
+ -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
36
+ box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
37
+ background-color: #E6E6E6;
38
+ background-color: #D9D9D9;
39
+ outline: 0;
40
+ }
41
+
42
+ ul.wysihtml5-commands-disabled .dropdown-menu {
43
+ display: none !important;
44
+ }
45
+
46
+ ul.wysihtml5-toolbar div.wysihtml5-colors {
47
+ display:block;
48
+ width: 50px;
49
+ height: 20px;
50
+ margin-top: 2px;
51
+ margin-left: 5px;
52
+ position: absolute;
53
+ pointer-events: none;
54
+ }
55
+
56
+ ul.wysihtml5-toolbar a.wysihtml5-colors-title {
57
+ padding-left: 70px;
58
+ }
59
+
60
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="black"] {
61
+ background: black !important;
62
+ }
63
+
64
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="silver"] {
65
+ background: silver !important;
66
+ }
67
+
68
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="gray"] {
69
+ background: gray !important;
70
+ }
71
+
72
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="maroon"] {
73
+ background: maroon !important;
74
+ }
75
+
76
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="red"] {
77
+ background: red !important;
78
+ }
79
+
80
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="purple"] {
81
+ background: purple !important;
82
+ }
83
+
84
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="green"] {
85
+ background: green !important;
86
+ }
87
+
88
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="olive"] {
89
+ background: olive !important;
90
+ }
91
+
92
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="navy"] {
93
+ background: navy !important;
94
+ }
95
+
96
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="blue"] {
97
+ background: blue !important;
98
+ }
99
+
100
+ ul.wysihtml5-toolbar div[data-wysihtml5-command-value="orange"] {
101
+ background: orange !important;
102
+ }
@@ -0,0 +1,67 @@
1
+ .wysiwyg-color-black {
2
+ color: black;
3
+ }
4
+
5
+ .wysiwyg-color-silver {
6
+ color: silver;
7
+ }
8
+
9
+ .wysiwyg-color-gray {
10
+ color: gray;
11
+ }
12
+
13
+ .wysiwyg-color-white {
14
+ color: white;
15
+ }
16
+
17
+ .wysiwyg-color-maroon {
18
+ color: maroon;
19
+ }
20
+
21
+ .wysiwyg-color-red {
22
+ color: red;
23
+ }
24
+
25
+ .wysiwyg-color-purple {
26
+ color: purple;
27
+ }
28
+
29
+ .wysiwyg-color-fuchsia {
30
+ color: fuchsia;
31
+ }
32
+
33
+ .wysiwyg-color-green {
34
+ color: green;
35
+ }
36
+
37
+ .wysiwyg-color-lime {
38
+ color: lime;
39
+ }
40
+
41
+ .wysiwyg-color-olive {
42
+ color: olive;
43
+ }
44
+
45
+ .wysiwyg-color-yellow {
46
+ color: yellow;
47
+ }
48
+
49
+ .wysiwyg-color-navy {
50
+ color: navy;
51
+ }
52
+
53
+ .wysiwyg-color-blue {
54
+ color: blue;
55
+ }
56
+
57
+ .wysiwyg-color-teal {
58
+ color: teal;
59
+ }
60
+
61
+ .wysiwyg-color-aqua {
62
+ color: aqua;
63
+ }
64
+
65
+ .wysiwyg-color-orange {
66
+ color: orange;
67
+ }
@@ -0,0 +1,205 @@
1
+ /*! X-editable - v1.5.0
2
+ * In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
3
+ * http://github.com/vitalets/x-editable
4
+ * Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */
5
+ .editableform {
6
+ margin-bottom: 0; /* overwrites bootstrap margin */
7
+ }
8
+
9
+ .editableform .control-group {
10
+ margin-bottom: 0; /* overwrites bootstrap margin */
11
+ white-space: nowrap; /* prevent wrapping buttons on new line */
12
+ line-height: 20px; /* overwriting bootstrap line-height. See #133 */
13
+ }
14
+
15
+ .editable-buttons {
16
+ display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
17
+ vertical-align: top;
18
+ margin-left: 7px;
19
+ /* inline-block emulation for IE7*/
20
+ zoom: 1;
21
+ *display: inline;
22
+ }
23
+
24
+ .editable-buttons.editable-buttons-bottom {
25
+ display: block;
26
+ margin-top: 7px;
27
+ margin-left: 0;
28
+ }
29
+
30
+ .editable-input {
31
+ vertical-align: top;
32
+ display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
33
+ width: auto; /* bootstrap-responsive has width: 100% that breakes layout */
34
+ white-space: normal; /* reset white-space decalred in parent*/
35
+ /* display-inline emulation for IE7*/
36
+ zoom: 1;
37
+ *display: inline;
38
+ }
39
+
40
+ .editable-buttons .editable-cancel {
41
+ margin-left: 7px;
42
+ }
43
+
44
+ /*for jquery-ui buttons need set height to look more pretty*/
45
+ .editable-buttons button.ui-button-icon-only {
46
+ height: 24px;
47
+ width: 30px;
48
+ }
49
+
50
+ .editableform-loading {
51
+ background: image-url('editable/loading.gif') center center no-repeat;
52
+ height: 25px;
53
+ width: auto;
54
+ min-width: 25px;
55
+ }
56
+
57
+ .editable-inline .editableform-loading {
58
+ background-position: left 5px;
59
+ }
60
+
61
+ .editable-error-block {
62
+ max-width: 300px;
63
+ margin: 5px 0 0 0;
64
+ width: auto;
65
+ white-space: normal;
66
+ }
67
+
68
+ /*add padding for jquery ui*/
69
+ .editable-error-block.ui-state-error {
70
+ padding: 3px;
71
+ }
72
+
73
+ .editable-error {
74
+ color: red;
75
+ }
76
+
77
+ /* ---- For specific types ---- */
78
+
79
+ .editableform .editable-date {
80
+ padding: 0;
81
+ margin: 0;
82
+ float: left;
83
+ }
84
+
85
+ /* move datepicker icon to center of add-on button. See https://github.com/vitalets/x-editable/issues/183 */
86
+ .editable-inline .add-on .icon-th {
87
+ margin-top: 3px;
88
+ margin-left: 1px;
89
+ }
90
+
91
+
92
+ /* checklist vertical alignment */
93
+ .editable-checklist label input[type="checkbox"],
94
+ .editable-checklist label span {
95
+ vertical-align: middle;
96
+ margin: 0;
97
+ }
98
+
99
+ .editable-checklist label {
100
+ white-space: nowrap;
101
+ }
102
+
103
+ /* set exact width of textarea to fit buttons toolbar */
104
+ .editable-wysihtml5 {
105
+ width: 566px;
106
+ height: 250px;
107
+ }
108
+
109
+ /* clear button shown as link in date inputs */
110
+ .editable-clear {
111
+ clear: both;
112
+ font-size: 0.9em;
113
+ text-decoration: none;
114
+ text-align: right;
115
+ }
116
+
117
+ /* IOS-style clear button for text inputs */
118
+ .editable-clear-x {
119
+ background: image-url('editable/clear.png') center center no-repeat;
120
+ display: block;
121
+ width: 13px;
122
+ height: 13px;
123
+ position: absolute;
124
+ opacity: 0.6;
125
+ z-index: 100;
126
+
127
+ top: 50%;
128
+ right: 6px;
129
+ margin-top: -6px;
130
+
131
+ }
132
+
133
+ .editable-clear-x:hover {
134
+ opacity: 1;
135
+ }
136
+
137
+ .editable-pre-wrapped {
138
+ white-space: pre-wrap;
139
+ }
140
+ .editable-container.editable-popup {
141
+ max-width: none !important; /* without this rule poshytip/tooltip does not stretch */
142
+ }
143
+
144
+ .editable-container.popover {
145
+ width: auto; /* without this rule popover does not stretch */
146
+ }
147
+
148
+ .editable-container.editable-inline {
149
+ display: inline-block;
150
+ vertical-align: middle;
151
+ width: auto;
152
+ /* inline-block emulation for IE7*/
153
+ zoom: 1;
154
+ *display: inline;
155
+ }
156
+
157
+ .editable-container.ui-widget {
158
+ font-size: inherit; /* jqueryui widget font 1.1em too big, overwrite it */
159
+ z-index: 9990; /* should be less than select2 dropdown z-index to close dropdown first when click */
160
+ }
161
+ .editable-click,
162
+ a.editable-click,
163
+ a.editable-click:hover {
164
+ text-decoration: none;
165
+ border-bottom: dashed 1px #0088cc;
166
+ }
167
+
168
+ .editable-click.editable-disabled,
169
+ a.editable-click.editable-disabled,
170
+ a.editable-click.editable-disabled:hover {
171
+ color: #585858;
172
+ cursor: default;
173
+ border-bottom: none;
174
+ }
175
+
176
+ .editable-empty, .editable-empty:hover, .editable-empty:focus{
177
+ font-style: italic;
178
+ color: #DD1144;
179
+ /* border-bottom: none; */
180
+ text-decoration: none;
181
+ }
182
+
183
+ .editable-unsaved {
184
+ font-weight: bold;
185
+ }
186
+
187
+ .editable-unsaved:after {
188
+ /* content: '*'*/
189
+ }
190
+
191
+ .editable-bg-transition {
192
+ -webkit-transition: background-color 1400ms ease-out;
193
+ -moz-transition: background-color 1400ms ease-out;
194
+ -o-transition: background-color 1400ms ease-out;
195
+ -ms-transition: background-color 1400ms ease-out;
196
+ transition: background-color 1400ms ease-out;
197
+ }
198
+
199
+ /*see https://github.com/vitalets/x-editable/issues/139 */
200
+ .form-horizontal .editable
201
+ {
202
+ padding-top: 5px;
203
+ display:inline-block;
204
+ }
205
+
@@ -0,0 +1,205 @@
1
+ /*! X-editable - v1.5.0
2
+ * In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
3
+ * http://github.com/vitalets/x-editable
4
+ * Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */
5
+ .editableform {
6
+ margin-bottom: 0; /* overwrites bootstrap margin */
7
+ }
8
+
9
+ .editableform .control-group {
10
+ margin-bottom: 0; /* overwrites bootstrap margin */
11
+ white-space: nowrap; /* prevent wrapping buttons on new line */
12
+ line-height: 20px; /* overwriting bootstrap line-height. See #133 */
13
+ }
14
+
15
+ .editable-buttons {
16
+ display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
17
+ vertical-align: top;
18
+ margin-left: 7px;
19
+ /* inline-block emulation for IE7*/
20
+ zoom: 1;
21
+ *display: inline;
22
+ }
23
+
24
+ .editable-buttons.editable-buttons-bottom {
25
+ display: block;
26
+ margin-top: 7px;
27
+ margin-left: 0;
28
+ }
29
+
30
+ .editable-input {
31
+ vertical-align: top;
32
+ display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
33
+ width: auto; /* bootstrap-responsive has width: 100% that breakes layout */
34
+ white-space: normal; /* reset white-space decalred in parent*/
35
+ /* display-inline emulation for IE7*/
36
+ zoom: 1;
37
+ *display: inline;
38
+ }
39
+
40
+ .editable-buttons .editable-cancel {
41
+ margin-left: 7px;
42
+ }
43
+
44
+ /*for jquery-ui buttons need set height to look more pretty*/
45
+ .editable-buttons button.ui-button-icon-only {
46
+ height: 24px;
47
+ width: 30px;
48
+ }
49
+
50
+ .editableform-loading {
51
+ background: image-url('editable/loading.gif') center center no-repeat;
52
+ height: 25px;
53
+ width: auto;
54
+ min-width: 25px;
55
+ }
56
+
57
+ .editable-inline .editableform-loading {
58
+ background-position: left 5px;
59
+ }
60
+
61
+ .editable-error-block {
62
+ max-width: 300px;
63
+ margin: 5px 0 0 0;
64
+ width: auto;
65
+ white-space: normal;
66
+ }
67
+
68
+ /*add padding for jquery ui*/
69
+ .editable-error-block.ui-state-error {
70
+ padding: 3px;
71
+ }
72
+
73
+ .editable-error {
74
+ color: red;
75
+ }
76
+
77
+ /* ---- For specific types ---- */
78
+
79
+ .editableform .editable-date {
80
+ padding: 0;
81
+ margin: 0;
82
+ float: left;
83
+ }
84
+
85
+ /* move datepicker icon to center of add-on button. See https://github.com/vitalets/x-editable/issues/183 */
86
+ .editable-inline .add-on .icon-th {
87
+ margin-top: 3px;
88
+ margin-left: 1px;
89
+ }
90
+
91
+
92
+ /* checklist vertical alignment */
93
+ .editable-checklist label input[type="checkbox"],
94
+ .editable-checklist label span {
95
+ vertical-align: middle;
96
+ margin: 0;
97
+ }
98
+
99
+ .editable-checklist label {
100
+ white-space: nowrap;
101
+ }
102
+
103
+ /* set exact width of textarea to fit buttons toolbar */
104
+ .editable-wysihtml5 {
105
+ width: 566px;
106
+ height: 250px;
107
+ }
108
+
109
+ /* clear button shown as link in date inputs */
110
+ .editable-clear {
111
+ clear: both;
112
+ font-size: 0.9em;
113
+ text-decoration: none;
114
+ text-align: right;
115
+ }
116
+
117
+ /* IOS-style clear button for text inputs */
118
+ .editable-clear-x {
119
+ background: image-url('editable/clear.png') center center no-repeat;
120
+ display: block;
121
+ width: 13px;
122
+ height: 13px;
123
+ position: absolute;
124
+ opacity: 0.6;
125
+ z-index: 100;
126
+
127
+ top: 50%;
128
+ right: 6px;
129
+ margin-top: -6px;
130
+
131
+ }
132
+
133
+ .editable-clear-x:hover {
134
+ opacity: 1;
135
+ }
136
+
137
+ .editable-pre-wrapped {
138
+ white-space: pre-wrap;
139
+ }
140
+ .editable-container.editable-popup {
141
+ max-width: none !important; /* without this rule poshytip/tooltip does not stretch */
142
+ }
143
+
144
+ .editable-container.popover {
145
+ width: auto; /* without this rule popover does not stretch */
146
+ }
147
+
148
+ .editable-container.editable-inline {
149
+ display: inline-block;
150
+ vertical-align: middle;
151
+ width: auto;
152
+ /* inline-block emulation for IE7*/
153
+ zoom: 1;
154
+ *display: inline;
155
+ }
156
+
157
+ .editable-container.ui-widget {
158
+ font-size: inherit; /* jqueryui widget font 1.1em too big, overwrite it */
159
+ z-index: 9990; /* should be less than select2 dropdown z-index to close dropdown first when click */
160
+ }
161
+ .editable-click,
162
+ a.editable-click,
163
+ a.editable-click:hover {
164
+ text-decoration: none;
165
+ border-bottom: dashed 1px #0088cc;
166
+ }
167
+
168
+ .editable-click.editable-disabled,
169
+ a.editable-click.editable-disabled,
170
+ a.editable-click.editable-disabled:hover {
171
+ color: #585858;
172
+ cursor: default;
173
+ border-bottom: none;
174
+ }
175
+
176
+ .editable-empty, .editable-empty:hover, .editable-empty:focus{
177
+ font-style: italic;
178
+ color: #DD1144;
179
+ /* border-bottom: none; */
180
+ text-decoration: none;
181
+ }
182
+
183
+ .editable-unsaved {
184
+ font-weight: bold;
185
+ }
186
+
187
+ .editable-unsaved:after {
188
+ /* content: '*'*/
189
+ }
190
+
191
+ .editable-bg-transition {
192
+ -webkit-transition: background-color 1400ms ease-out;
193
+ -moz-transition: background-color 1400ms ease-out;
194
+ -o-transition: background-color 1400ms ease-out;
195
+ -ms-transition: background-color 1400ms ease-out;
196
+ transition: background-color 1400ms ease-out;
197
+ }
198
+
199
+ /*see https://github.com/vitalets/x-editable/issues/139 */
200
+ .form-horizontal .editable
201
+ {
202
+ padding-top: 5px;
203
+ display:inline-block;
204
+ }
205
+