x-editable-rails 0.0.3 → 1.0.0

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 (30) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +1 -1
  3. data/README.md +31 -14
  4. data/lib/x-editable-rails.rb +5 -1
  5. data/lib/x-editable-rails/version.rb +1 -1
  6. data/lib/x-editable-rails/view_helpers.rb +20 -0
  7. data/vendor/assets/images/editable/clear.png +0 -0
  8. data/vendor/assets/images/{loading.gif → editable/loading.gif} +0 -0
  9. data/vendor/assets/javascripts/{bootstrap-editable.js → editable/bootstrap-editable.js} +3816 -1425
  10. data/vendor/assets/javascripts/{jquery-editable-poshytip.js → editable/jquery-editable-poshytip.js} +2171 -541
  11. data/vendor/assets/javascripts/{jqueryui-editable.js → editable/jqueryui-editable.js} +2080 -478
  12. data/vendor/assets/javascripts/{rails-editable.js.coffee → editable/rails.js.coffee} +3 -0
  13. data/vendor/assets/stylesheets/editable/bootstrap-editable.css +495 -0
  14. data/vendor/assets/stylesheets/{jquery-editable.css → editable/jquery-editable.css} +63 -18
  15. data/vendor/assets/stylesheets/{jqueryui-editable.css → editable/jqueryui-editable.css} +63 -18
  16. metadata +79 -66
  17. data/.gitignore +0 -19
  18. data/Gemfile +0 -4
  19. data/Rakefile +0 -1
  20. data/vendor/assets/javascripts/bootstrap-editable-inline.js +0 -3769
  21. data/vendor/assets/javascripts/bootstrap-editable-inline.min.js +0 -5
  22. data/vendor/assets/javascripts/bootstrap-editable.min.js +0 -5
  23. data/vendor/assets/javascripts/jquery-editable-inline.js +0 -2892
  24. data/vendor/assets/javascripts/jquery-editable-inline.min.js +0 -5
  25. data/vendor/assets/javascripts/jquery-editable-poshytip.min.js +0 -5
  26. data/vendor/assets/javascripts/jqueryui-editable-inline.js +0 -2916
  27. data/vendor/assets/javascripts/jqueryui-editable-inline.min.js +0 -5
  28. data/vendor/assets/javascripts/jqueryui-editable.min.js +0 -5
  29. data/vendor/assets/stylesheets/bootstrap-editable.css +0 -434
  30. data/x-editable-rails.gemspec +0 -19
@@ -1,8 +1,8 @@
1
- /*! X-editable - v1.3.0
2
- * In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
3
- * http://github.com/vitalets/x-editable
4
- * Copyright (c) 2012 Vitaliy Potapov; Licensed MIT */
5
-
1
+ /*! X-editable - v1.4.4
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
+
6
6
  .editableform {
7
7
  margin-bottom: 0; /* overwrites bootstrap margin */
8
8
  }
@@ -10,18 +10,23 @@
10
10
  .editableform .control-group {
11
11
  margin-bottom: 0; /* overwrites bootstrap margin */
12
12
  white-space: nowrap; /* prevent wrapping buttons on new line */
13
+ line-height: 20px; /* overwriting bootstrap line-height. See #133 */
13
14
  }
14
15
 
15
16
  .editable-buttons {
16
17
  display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
17
18
  vertical-align: top;
18
19
  margin-left: 7px;
19
- /* display-inline emulation for IE7*/
20
+ /* inline-block emulation for IE7*/
20
21
  zoom: 1;
21
22
  *display: inline;
22
23
  }
23
24
 
24
-
25
+ .editable-buttons.editable-buttons-bottom {
26
+ display: block;
27
+ margin-top: 7px;
28
+ margin-left: 0;
29
+ }
25
30
 
26
31
  .editable-input {
27
32
  vertical-align: top;
@@ -44,7 +49,7 @@
44
49
  }
45
50
 
46
51
  .editableform-loading {
47
- background: url('img/loading.gif') center center no-repeat;
52
+ background: url('/assets/editable/loading.gif') center center no-repeat;
48
53
  height: 25px;
49
54
  width: auto;
50
55
  min-width: 25px;
@@ -70,9 +75,7 @@
70
75
  color: red;
71
76
  }
72
77
 
73
- .editableform textarea {
74
- height: 150px; /*default height for textarea*/
75
- }
78
+ /* ---- For specific types ---- */
76
79
 
77
80
  .editableform .editable-date {
78
81
  padding: 0;
@@ -80,6 +83,12 @@
80
83
  float: left;
81
84
  }
82
85
 
86
+ /* move datepicker icon to center of add-on button. See https://github.com/vitalets/x-editable/issues/183 */
87
+ .editable-inline .add-on .icon-th {
88
+ margin-top: 3px;
89
+ margin-left: 1px;
90
+ }
91
+
83
92
 
84
93
  /* checklist vertical alignment */
85
94
  .editable-checklist label input[type="checkbox"],
@@ -92,30 +101,59 @@
92
101
  white-space: nowrap;
93
102
  }
94
103
 
104
+ /* set exact width of textarea to fit buttons toolbar */
105
+ .editable-wysihtml5 {
106
+ width: 566px;
107
+ height: 250px;
108
+ }
109
+
110
+ /* clear button shown as link in date inputs */
95
111
  .editable-clear {
96
112
  clear: both;
97
113
  font-size: 0.9em;
98
114
  text-decoration: none;
99
115
  text-align: right;
100
- }
101
- .editable-container {
116
+ }
117
+
118
+ /* IOS-style clear button for text inputs */
119
+ .editable-clear-x {
120
+ background: url('/assets/editable/clear.png') center center no-repeat;
121
+ display: block;
122
+ width: 13px;
123
+ height: 13px;
124
+ position: absolute;
125
+ opacity: 0.6;
126
+ z-index: 100;
127
+
128
+ top: 50%;
129
+ right: 6px;
130
+ margin-top: -6px;
131
+
132
+ }
133
+
134
+ .editable-clear-x:hover {
135
+ opacity: 1;
136
+ }
137
+ .editable-container.editable-popup {
102
138
  max-width: none !important; /* without this rule poshytip/tooltip does not stretch */
103
139
  }
104
140
 
105
141
  .editable-container.popover {
106
- /* width: 300px;*/ /* debug */
107
142
  width: auto; /* without this rule popover does not stretch */
108
143
  }
109
144
 
110
145
  .editable-container.editable-inline {
111
- /* display: inline; */ /* display: inline does not correctly work with show()/hide() in jquery <= 1.7.2 */
112
146
  display: inline-block;
113
147
  vertical-align: middle;
148
+ width: auto;
149
+ /* inline-block emulation for IE7*/
150
+ zoom: 1;
151
+ *display: inline;
114
152
  }
115
153
 
116
154
  .editable-container.ui-widget {
117
155
  font-size: inherit; /* jqueryui widget font 1.1em too big, overwrite it */
118
- }
156
+ }
119
157
  .editable-click,
120
158
  a.editable-click,
121
159
  a.editable-click:hover {
@@ -131,10 +169,10 @@ a.editable-click.editable-disabled:hover {
131
169
  border-bottom: none;
132
170
  }
133
171
 
134
- .editable-empty, .editable-empty:hover{
172
+ .editable-empty, .editable-empty:hover, .editable-empty:focus{
135
173
  font-style: italic;
136
174
  color: #DD1144;
137
- border-bottom: none;
175
+ /* border-bottom: none; */
138
176
  text-decoration: none;
139
177
  }
140
178
 
@@ -146,3 +184,10 @@ a.editable-click.editable-disabled:hover {
146
184
  /* content: '*'*/
147
185
  }
148
186
 
187
+ /*see https://github.com/vitalets/x-editable/issues/139 */
188
+ .form-horizontal .editable
189
+ {
190
+ padding-top: 5px;
191
+ display:inline-block;
192
+ }
193
+
@@ -1,8 +1,8 @@
1
- /*! X-editable - v1.3.0
2
- * In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
3
- * http://github.com/vitalets/x-editable
4
- * Copyright (c) 2012 Vitaliy Potapov; Licensed MIT */
5
-
1
+ /*! X-editable - v1.4.4
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
+
6
6
  .editableform {
7
7
  margin-bottom: 0; /* overwrites bootstrap margin */
8
8
  }
@@ -10,18 +10,23 @@
10
10
  .editableform .control-group {
11
11
  margin-bottom: 0; /* overwrites bootstrap margin */
12
12
  white-space: nowrap; /* prevent wrapping buttons on new line */
13
+ line-height: 20px; /* overwriting bootstrap line-height. See #133 */
13
14
  }
14
15
 
15
16
  .editable-buttons {
16
17
  display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
17
18
  vertical-align: top;
18
19
  margin-left: 7px;
19
- /* display-inline emulation for IE7*/
20
+ /* inline-block emulation for IE7*/
20
21
  zoom: 1;
21
22
  *display: inline;
22
23
  }
23
24
 
24
-
25
+ .editable-buttons.editable-buttons-bottom {
26
+ display: block;
27
+ margin-top: 7px;
28
+ margin-left: 0;
29
+ }
25
30
 
26
31
  .editable-input {
27
32
  vertical-align: top;
@@ -44,7 +49,7 @@
44
49
  }
45
50
 
46
51
  .editableform-loading {
47
- background: url('img/loading.gif') center center no-repeat;
52
+ background: url('/assets/editable/loading.gif') center center no-repeat;
48
53
  height: 25px;
49
54
  width: auto;
50
55
  min-width: 25px;
@@ -70,9 +75,7 @@
70
75
  color: red;
71
76
  }
72
77
 
73
- .editableform textarea {
74
- height: 150px; /*default height for textarea*/
75
- }
78
+ /* ---- For specific types ---- */
76
79
 
77
80
  .editableform .editable-date {
78
81
  padding: 0;
@@ -80,6 +83,12 @@
80
83
  float: left;
81
84
  }
82
85
 
86
+ /* move datepicker icon to center of add-on button. See https://github.com/vitalets/x-editable/issues/183 */
87
+ .editable-inline .add-on .icon-th {
88
+ margin-top: 3px;
89
+ margin-left: 1px;
90
+ }
91
+
83
92
 
84
93
  /* checklist vertical alignment */
85
94
  .editable-checklist label input[type="checkbox"],
@@ -92,30 +101,59 @@
92
101
  white-space: nowrap;
93
102
  }
94
103
 
104
+ /* set exact width of textarea to fit buttons toolbar */
105
+ .editable-wysihtml5 {
106
+ width: 566px;
107
+ height: 250px;
108
+ }
109
+
110
+ /* clear button shown as link in date inputs */
95
111
  .editable-clear {
96
112
  clear: both;
97
113
  font-size: 0.9em;
98
114
  text-decoration: none;
99
115
  text-align: right;
100
- }
101
- .editable-container {
116
+ }
117
+
118
+ /* IOS-style clear button for text inputs */
119
+ .editable-clear-x {
120
+ background: url('/assets/editable/clear.png') center center no-repeat;
121
+ display: block;
122
+ width: 13px;
123
+ height: 13px;
124
+ position: absolute;
125
+ opacity: 0.6;
126
+ z-index: 100;
127
+
128
+ top: 50%;
129
+ right: 6px;
130
+ margin-top: -6px;
131
+
132
+ }
133
+
134
+ .editable-clear-x:hover {
135
+ opacity: 1;
136
+ }
137
+ .editable-container.editable-popup {
102
138
  max-width: none !important; /* without this rule poshytip/tooltip does not stretch */
103
139
  }
104
140
 
105
141
  .editable-container.popover {
106
- /* width: 300px;*/ /* debug */
107
142
  width: auto; /* without this rule popover does not stretch */
108
143
  }
109
144
 
110
145
  .editable-container.editable-inline {
111
- /* display: inline; */ /* display: inline does not correctly work with show()/hide() in jquery <= 1.7.2 */
112
146
  display: inline-block;
113
147
  vertical-align: middle;
148
+ width: auto;
149
+ /* inline-block emulation for IE7*/
150
+ zoom: 1;
151
+ *display: inline;
114
152
  }
115
153
 
116
154
  .editable-container.ui-widget {
117
155
  font-size: inherit; /* jqueryui widget font 1.1em too big, overwrite it */
118
- }
156
+ }
119
157
  .editable-click,
120
158
  a.editable-click,
121
159
  a.editable-click:hover {
@@ -131,10 +169,10 @@ a.editable-click.editable-disabled:hover {
131
169
  border-bottom: none;
132
170
  }
133
171
 
134
- .editable-empty, .editable-empty:hover{
172
+ .editable-empty, .editable-empty:hover, .editable-empty:focus{
135
173
  font-style: italic;
136
174
  color: #DD1144;
137
- border-bottom: none;
175
+ /* border-bottom: none; */
138
176
  text-decoration: none;
139
177
  }
140
178
 
@@ -146,3 +184,10 @@ a.editable-click.editable-disabled:hover {
146
184
  /* content: '*'*/
147
185
  }
148
186
 
187
+ /*see https://github.com/vitalets/x-editable/issues/139 */
188
+ .form-horizontal .editable
189
+ {
190
+ padding-top: 5px;
191
+ display:inline-block;
192
+ }
193
+
metadata CHANGED
@@ -1,87 +1,100 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: x-editable-rails
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 3
9
- version: 0.0.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
10
5
  platform: ruby
11
- authors:
6
+ authors:
12
7
  - Jiri Kolarik
13
8
  autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
-
17
- date: 2012-12-29 00:00:00 +01:00
18
- default_executable:
19
- dependencies: []
20
-
11
+ date: 2013-07-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: railties
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
21
55
  description: X-editable for Rails
22
- email:
56
+ email:
23
57
  - jiri.kolarik@imin.cz
24
58
  executables: []
25
-
26
59
  extensions: []
27
-
28
60
  extra_rdoc_files: []
29
-
30
- files:
31
- - .gitignore
32
- - Gemfile
61
+ files:
62
+ - lib/x-editable-rails/version.rb
63
+ - lib/x-editable-rails/view_helpers.rb
64
+ - lib/x-editable-rails.rb
65
+ - vendor/assets/images/editable/clear.png
66
+ - vendor/assets/images/editable/loading.gif
67
+ - vendor/assets/javascripts/editable/bootstrap-editable.js
68
+ - vendor/assets/javascripts/editable/jquery-editable-poshytip.js
69
+ - vendor/assets/javascripts/editable/jqueryui-editable.js
70
+ - vendor/assets/javascripts/editable/rails.js.coffee
71
+ - vendor/assets/stylesheets/editable/bootstrap-editable.css
72
+ - vendor/assets/stylesheets/editable/jquery-editable.css
73
+ - vendor/assets/stylesheets/editable/jqueryui-editable.css
33
74
  - LICENSE.txt
34
75
  - README.md
35
- - Rakefile
36
- - lib/x-editable-rails.rb
37
- - lib/x-editable-rails/version.rb
38
- - vendor/assets/images/loading.gif
39
- - vendor/assets/javascripts/bootstrap-editable-inline.js
40
- - vendor/assets/javascripts/bootstrap-editable-inline.min.js
41
- - vendor/assets/javascripts/bootstrap-editable.js
42
- - vendor/assets/javascripts/bootstrap-editable.min.js
43
- - vendor/assets/javascripts/jquery-editable-inline.js
44
- - vendor/assets/javascripts/jquery-editable-inline.min.js
45
- - vendor/assets/javascripts/jquery-editable-poshytip.js
46
- - vendor/assets/javascripts/jquery-editable-poshytip.min.js
47
- - vendor/assets/javascripts/jqueryui-editable-inline.js
48
- - vendor/assets/javascripts/jqueryui-editable-inline.min.js
49
- - vendor/assets/javascripts/jqueryui-editable.js
50
- - vendor/assets/javascripts/jqueryui-editable.min.js
51
- - vendor/assets/javascripts/rails-editable.js.coffee
52
- - vendor/assets/stylesheets/bootstrap-editable.css
53
- - vendor/assets/stylesheets/jquery-editable.css
54
- - vendor/assets/stylesheets/jqueryui-editable.css
55
- - x-editable-rails.gemspec
56
- has_rdoc: true
57
- homepage: ""
58
- licenses: []
59
-
76
+ homepage: https://github.com/werein/x-editable-rails
77
+ licenses:
78
+ - MIT
79
+ metadata: {}
60
80
  post_install_message:
61
81
  rdoc_options: []
62
-
63
- require_paths:
82
+ require_paths:
64
83
  - lib
65
- required_ruby_version: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- segments:
70
- - 0
71
- version: "0"
72
- required_rubygems_version: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- segments:
77
- - 0
78
- version: "0"
84
+ required_ruby_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - '>='
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
79
94
  requirements: []
80
-
81
95
  rubyforge_project:
82
- rubygems_version: 1.3.6
96
+ rubygems_version: 2.0.3
83
97
  signing_key:
84
- specification_version: 3
98
+ specification_version: 4
85
99
  summary: X-editable for Rails
86
100
  test_files: []
87
-