edit_mode 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2ef772b53060ed9462710632dc8b81f33d663826
4
+ data.tar.gz: 2100c2413828a1d7409b991b2868194660f7f7b2
5
+ SHA512:
6
+ metadata.gz: d5e38434f308510ecb6e06daa0925dc809f3b0d3dc92c5821f7318f7031956b1c265899ca17d6f694bafabcfdad954d5f53e2e74a6d5a40860bdc216910310e3
7
+ data.tar.gz: d7d0a75c01f7e58af5a76c071e5fde07c64b38bef3ed8f6e3e57ccf46efebfcee9a8d2ec4bff90c9b260e1ee1c98afaaeb8ed5ce6ce608dd5e4aacdfaf1a3ce9
data/.travis.yml CHANGED
@@ -1,8 +1,9 @@
1
1
  rvm:
2
2
  - 1.9.2
3
+ - 2.0.0
3
4
 
4
- env: "RAILS_ENV=test DISPLAY=:99.0"
5
+ #env: "RAILS_ENV=test DISPLAY=:99.0"
5
6
 
6
7
  before_script:
7
8
  - "sh -c 'cd test_app && bundle && bundle exec rake db:drop db:migrate'"
8
- - "sh -e /etc/init.d/xvfb start"
9
+ # - "sh -e /etc/init.d/xvfb start"
data/Gemfile CHANGED
@@ -16,8 +16,8 @@ group :test, :development do
16
16
  gem 'guard', '1.0.1'
17
17
  gem 'rspec-rails', '2.10.0'
18
18
  gem 'guard-rspec', '0.5.5'
19
- # gem 'poltergeist'
20
- gem 'selenium-webdriver', '>=2.29.0'
19
+ gem 'poltergeist'
20
+ # gem 'selenium-webdriver', '>=2.29.0'
21
21
  # gem 'capybara-webkit'
22
22
  end
23
23
 
@@ -28,5 +28,7 @@ group :test do
28
28
  end
29
29
 
30
30
  gem 'jquery-rails', '>=2.2.0'
31
+ gem 'jquery-ui-rails'
32
+
31
33
  gem 'coffee-rails'
32
34
  gem 'sqlite3'
data/README.md CHANGED
@@ -152,3 +152,5 @@ http://rubydoc.info/github/fiedl/edit_mode/frames
152
152
  4. Push to the branch (`git push origin my-new-feature`)
153
153
  5. Create new Pull Request
154
154
 
155
+
156
+
@@ -1,6 +1,9 @@
1
- jQuery ->
1
+ ready = ->
2
2
  jQuery.fn.apply_edit_mode = ->
3
3
  this.apply_initial_auto_hide()
4
4
  this.apply_show_only_in_edit_mode()
5
5
  this.find( ".best_in_place" ).apply_best_in_place()
6
- return this
6
+ return this
7
+
8
+ $(document).ready(ready)
9
+ $(document).on('page:load', ready)
@@ -1,4 +1,4 @@
1
- jQuery ->
1
+ ready = ->
2
2
 
3
3
  jQuery.fn.apply_best_in_place = ->
4
4
  this.best_in_place()
@@ -31,3 +31,5 @@ jQuery ->
31
31
  unless $( event.target ).is( "textarea" )
32
32
  $( this ).closest( ".edit_mode_group" ).trigger( "save" )
33
33
 
34
+ $(document).ready(ready)
35
+ $(document).on('page:load', ready)
@@ -1,5 +1,5 @@
1
1
 
2
- jQuery ->
2
+ ready = ->
3
3
 
4
4
  # The <span class="edit_mode_group"></span> elements receive 'edit', 'save' and 'cancel' events,
5
5
  # when the user clicks the corresponding buttons '.edit_button', '.save_button' or '.cancel_button'.
@@ -36,7 +36,9 @@ jQuery ->
36
36
 
37
37
  )
38
38
 
39
+ button_effect = ( button, callback ) ->
40
+ button.effect( "pulsate", { times: 2 }, "fast", callback )
39
41
 
40
42
 
41
- button_effect = ( button, callback ) ->
42
- button.effect( "pulsate", { times: 2 }, "fast", callback )
43
+ $(document).ready(ready)
44
+ $(document).on('page:load', ready)
@@ -1,5 +1,5 @@
1
1
 
2
- jQuery ->
2
+ ready = ->
3
3
 
4
4
  jQuery.fn.apply_initial_auto_hide = ->
5
5
 
@@ -10,4 +10,7 @@ jQuery ->
10
10
 
11
11
  return this
12
12
 
13
- $( document ).apply_initial_auto_hide()
13
+ $( document ).apply_initial_auto_hide()
14
+
15
+ $(document).ready(ready)
16
+ $(document).on('page:load', ready)
@@ -1,5 +1,5 @@
1
1
 
2
- jQuery ->
2
+ ready = ->
3
3
 
4
4
  # The <span class="edit_mode_group"></span> elements should be modal when in edit mode.
5
5
  # That means that everything else should be greyed out.
@@ -25,4 +25,7 @@ jQuery ->
25
25
  $( ".modal" ).removeClass( "modal animating" )
26
26
  )
27
27
  , 300 )
28
- )
28
+ )
29
+
30
+ $(document).ready(ready)
31
+ $(document).on('page:load', ready)
@@ -1,5 +1,5 @@
1
1
 
2
- jQuery ->
2
+ ready = ->
3
3
 
4
4
  jQuery.fn.apply_show_only_in_edit_mode = ->
5
5
 
@@ -29,4 +29,7 @@ jQuery ->
29
29
  return this
30
30
 
31
31
  # Apply this to the whole document in the beginning.
32
- $( document ).apply_show_only_in_edit_mode()
32
+ $( document ).apply_show_only_in_edit_mode()
33
+
34
+ $(document).ready(ready)
35
+ $(document).on('page:load', ready)
@@ -1,5 +1,5 @@
1
1
 
2
- jQuery ->
2
+ ready = ->
3
3
 
4
4
  # The 'save' and the 'cancel' button are only to be shown in edit mode.
5
5
  # In order to receive the proper 'edit', 'save', 'cancel' events, they also have to be .editable.
@@ -22,3 +22,5 @@ jQuery ->
22
22
  e.preventDefault()
23
23
  )
24
24
 
25
+ $(document).ready(ready)
26
+ $(document).on('page:load', ready)
@@ -1,3 +1,3 @@
1
1
  module EditMode
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -7,13 +7,14 @@ require File.expand_path('../../test_app/config/environment', __FILE__)
7
7
  require "rspec/rails"
8
8
  require "nokogiri"
9
9
 
10
- Capybara.javascript_driver = :selenium
10
+ #Capybara.javascript_driver = :selenium
11
11
  #Capybara.javascript_driver = :webkit
12
12
 
13
- # changing back to selenium-webdriver, since phantom js (poltergeist) keeps crashing.
14
- # SF 2013-01-21
15
- #require 'capybara/poltergeist'
16
- #Capybara.javascript_driver = :poltergeist
13
+
14
+ # use at least phantomjs version 1.8.2
15
+ require 'capybara/poltergeist'
16
+ Capybara.javascript_driver = :poltergeist
17
+
17
18
 
18
19
  # Load support files
19
20
  #Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each{|f| require f}
data/test_app/README.md CHANGED
@@ -152,3 +152,5 @@ http://rubydoc.info/github/fiedl/edit_mode/frames
152
152
  4. Push to the branch (`git push origin my-new-feature`)
153
153
  5. Create new Pull Request
154
154
 
155
+
156
+
@@ -11,7 +11,7 @@
11
11
  // GO AFTER THE REQUIRES BELOW.
12
12
  //
13
13
  //= require jquery
14
- //= require jquery-ui
14
+ //= require jquery.ui.all
15
15
  //= require jquery_ujs
16
16
  //= require best_in_place
17
17
  //= require edit_mode
metadata CHANGED
@@ -1,82 +1,99 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edit_mode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
5
- prerelease:
4
+ version: 0.0.8
6
5
  platform: ruby
7
6
  authors:
8
7
  - Sebastian Fiedlschuster
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-01-23 00:00:00.000000000 Z
11
+ date: 2013-06-08 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
16
- requirement: &75473480 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '3.2'
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *75473480
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '3.2'
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: jquery-rails
27
- requirement: &75473270 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
- - - ! '>='
31
+ - - '>='
31
32
  - !ruby/object:Gem::Version
32
33
  version: '0'
33
34
  type: :runtime
34
35
  prerelease: false
35
- version_requirements: *75473270
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
36
41
  - !ruby/object:Gem::Dependency
37
42
  name: rake
38
- requirement: &75473040 !ruby/object:Gem::Requirement
39
- none: false
43
+ requirement: !ruby/object:Gem::Requirement
40
44
  requirements:
41
- - - ! '>='
45
+ - - '>='
42
46
  - !ruby/object:Gem::Version
43
47
  version: '0'
44
48
  type: :development
45
49
  prerelease: false
46
- version_requirements: *75473040
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
47
55
  - !ruby/object:Gem::Dependency
48
56
  name: rspec-rails
49
- requirement: &75472790 !ruby/object:Gem::Requirement
50
- none: false
57
+ requirement: !ruby/object:Gem::Requirement
51
58
  requirements:
52
- - - ! '>='
59
+ - - '>='
53
60
  - !ruby/object:Gem::Version
54
61
  version: 2.8.0
55
62
  type: :development
56
63
  prerelease: false
57
- version_requirements: *75472790
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: 2.8.0
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: nokogiri
60
- requirement: &75472540 !ruby/object:Gem::Requirement
61
- none: false
71
+ requirement: !ruby/object:Gem::Requirement
62
72
  requirements:
63
- - - ! '>='
73
+ - - '>='
64
74
  - !ruby/object:Gem::Version
65
75
  version: 1.5.0
66
76
  type: :development
67
77
  prerelease: false
68
- version_requirements: *75472540
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: 1.5.0
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: capybara
71
- requirement: &75472350 !ruby/object:Gem::Requirement
72
- none: false
85
+ requirement: !ruby/object:Gem::Requirement
73
86
  requirements:
74
- - - ! '>='
87
+ - - '>='
75
88
  - !ruby/object:Gem::Version
76
89
  version: '0'
77
90
  type: :development
78
91
  prerelease: false
79
- version_requirements: *75472350
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
80
97
  description: The edit mode is activated by pressing an 'edit' button on a show view.
81
98
  This shows additional editing tools and switches on the best_in_place form fields.
82
99
  When editing is finished, use 'save' or 'cancel' buttons to quit the edit mode and
@@ -185,27 +202,26 @@ files:
185
202
  - test_app/vendor/plugins/.gitkeep
186
203
  homepage: https://github.com/fiedl/edit_mode
187
204
  licenses: []
205
+ metadata: {}
188
206
  post_install_message:
189
207
  rdoc_options: []
190
208
  require_paths:
191
209
  - lib
192
210
  required_ruby_version: !ruby/object:Gem::Requirement
193
- none: false
194
211
  requirements:
195
- - - ! '>='
212
+ - - '>='
196
213
  - !ruby/object:Gem::Version
197
214
  version: '0'
198
215
  required_rubygems_version: !ruby/object:Gem::Requirement
199
- none: false
200
216
  requirements:
201
- - - ! '>='
217
+ - - '>='
202
218
  - !ruby/object:Gem::Version
203
219
  version: '0'
204
220
  requirements: []
205
221
  rubyforge_project:
206
- rubygems_version: 1.8.11
222
+ rubygems_version: 2.0.0
207
223
  signing_key:
208
- specification_version: 3
224
+ specification_version: 4
209
225
  summary: Toggle an edit mode on a show view. Think of it as a grouped in-place editing.
210
226
  test_files:
211
227
  - spec/helpers/edit_mode_helpers_spec.rb