commenteux 1.0.5 → 1.0.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 892fde76ee554ef94a2904ab0a9397c45cc0e3c1
4
- data.tar.gz: 59d018b920fe295b3d1d79fe6e520ba789365440
3
+ metadata.gz: ce67b0dec2ad29f8c63f4c20f49274b5b2406497
4
+ data.tar.gz: 3f169565a30557ac83e7fd2b8f77d9af98b71dcb
5
5
  SHA512:
6
- metadata.gz: 2a2951ff5eab327cabe0ce5998c24e41b70f7d402fff3f08add2cbc96a4575dbbbf77ac2edff7cc892ff6b485f0248b4cbfbb6da438e278d2f977afc9ee84e37
7
- data.tar.gz: 6fa504f681e58735c481637ce018ffd879c6b8ffe60ab314021bdc77c93c5c83ede19726a6079c173846c992e98d6ca47f48eefa0bb40f8d0c185ed21fbc7183
6
+ metadata.gz: 9ed29bd318eb230830307edf9b134157a61065b1be54719d61e7058f4a198517174b413ad1ecd37177a44b1afacf86cbbd4f74986021c869c657ee07cdb4129b
7
+ data.tar.gz: bea142817eab50bb1058c0942d33b77b99fdb2c5242012c3dd57bc990f04b54085d70641e7af4e74eec451af3056a4d04c794a30933a522469631782ffc31560
@@ -2,15 +2,15 @@
2
2
  $ () ->
3
3
 
4
4
  $(document).delegate '#new_notes_link', 'click', (e) ->
5
- console.log('new_notes_link click')
5
+ #console.log('new_notes_link click')
6
6
  event.stopPropagation()
7
7
  event.preventDefault()
8
8
  parent= $(@).data('parent')
9
9
  resource = $(@).data('resource')
10
10
  id = $(@).data('id')
11
- console.log('parent_div = ' + parent)
12
- console.log('resource = ' + resource)
13
- console.log('resource_id = ' + id)
11
+ #console.log('parent_div = ' + parent)
12
+ #console.log('resource = ' + resource)
13
+ #console.log('resource_id = ' + id)
14
14
  $.ajax
15
15
  url: "/commenteux/" + resource + "/" + id + "/new"
16
16
  type: "get"
@@ -18,9 +18,9 @@ $ () ->
18
18
  data:
19
19
  "parent_div": parent
20
20
  success: (returnData) ->
21
- console.log('success')
22
- console.log("#" + parent)
23
- console.log(returnData)
21
+ #console.log('success')
22
+ #console.log("#" + parent)
23
+ #console.log(returnData)
24
24
  if parent
25
25
  $("#" + parent ).html(returnData)
26
26
  else
@@ -33,23 +33,37 @@ $ () ->
33
33
  @
34
34
 
35
35
  $(document).delegate '#new_comments', 'ajax:success', (e, data, status, xhr) ->
36
- console.log('new_comments ajax success')
36
+
37
+ event.stopPropagation()
38
+ event.preventDefault()
39
+ #console.log('new_comments ajax success')
40
+
41
+ #TODO SS
42
+ #alert(e);
37
43
  parent = $('#new_comments').attr('data-parent')
44
+ parent = data.substring(data.indexOf('data-parent') + 12, data.indexOf('data-resource'));
45
+ parent = parent.replace('"', '')
46
+ parent = parent.replace('"', '')
47
+ parent = parent.replace(' ', '')
48
+
49
+ #console.log('parent = ' + parent)
50
+ #console.log('data = ' + data)
51
+ #console.log('xhr.getresponseHeader = ' + xhr.responseXML)
38
52
  if parent
39
53
  $('#' + parent).html(xhr.responseText)
40
54
  else
41
55
  $('body').html(xhr.responseText)
42
56
 
43
57
  $(document).delegate '#new_notes_cancelled', 'click', (e) ->
44
- console.log('new_notes_cancelled click')
58
+ #console.log('new_notes_cancelled click')
45
59
  event.stopPropagation()
46
60
  event.preventDefault()
47
61
  parent= $(@).data('parent')
48
62
  resource = $(@).data('resource')
49
63
  id = $(@).data('id')
50
- console.log('parent_div = ' + parent)
51
- console.log('resource = ' + resource)
52
- console.log('resource_id = ' + id)
64
+ #console.log('parent_div = ' + parent)
65
+ #console.log('resource = ' + resource)
66
+ #console.log('resource_id = ' + id)
53
67
  $.ajax
54
68
  url: "/commenteux/" + resource + "/" + id + "?parent_div=" + parent
55
69
  type: "get"
@@ -57,13 +71,13 @@ $ () ->
57
71
  data:
58
72
  "parent_div": parent
59
73
  success: (returnData) ->
60
- console.log('success')
61
- console.log("#" + parent)
62
- console.log(returnData)
74
+ #console.log('success')
75
+ #console.log("#" + parent)
76
+ #console.log(returnData)
63
77
  if parent
64
78
  $("#" + parent ).html(returnData)
65
79
  else
66
- console.log('no parent')
80
+ #console.log('no parent')
67
81
  $('body').html(returnData)
68
82
  @
69
83
  error: (e) ->
@@ -1,3 +1,3 @@
1
1
  module Commenteux
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
@@ -0,0 +1,83 @@
1
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT `schema_migrations`.* FROM `schema_migrations`
2
+  (0.2ms) BEGIN
3
+ Processing by Commenteux::NotesController#create as HTML
4
+ Parameters: {"parent_div"=>"parent_div", "comments"=>{"title"=>"Titre", "comment"=>"Commentaire"}, "resource"=>"dummy_model", "resource_id"=>"1"}
5
+ Redirected to http://test.host/commenteux/dummy_model/1?parent_div=parent_div
6
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
7
+  (0.2ms) ROLLBACK
8
+  (0.1ms) BEGIN
9
+ Processing by Commenteux::NotesController#index as HTML
10
+ Parameters: {"resource"=>"dummy_model", "resource_id"=>"1"}
11
+ Completed 200 OK in 9ms (Views: 9.0ms | ActiveRecord: 0.0ms)
12
+  (0.2ms) ROLLBACK
13
+  (0.1ms) BEGIN
14
+ Processing by Commenteux::NotesController#index as JS
15
+ Parameters: {"resource"=>"dummy_model", "resource_id"=>"1"}
16
+ Completed 200 OK in 8ms (Views: 7.1ms | ActiveRecord: 0.0ms)
17
+  (0.2ms) ROLLBACK
18
+  (0.2ms) BEGIN
19
+ Processing by Commenteux::NotesController#new as HTML
20
+ Parameters: {"resource"=>"dummy_model", "resource_id"=>"1"}
21
+ Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.0ms)
22
+  (0.1ms) ROLLBACK
23
+  (0.1ms) BEGIN
24
+ Processing by Commenteux::NotesController#new as JS
25
+ Parameters: {"resource"=>"dummy_model", "resource_id"=>"1"}
26
+ Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.0ms)
27
+  (0.2ms) ROLLBACK
28
+  (0.1ms) BEGIN
29
+  (0.2ms) ROLLBACK
30
+  (0.1ms) BEGIN
31
+  (0.1ms) ROLLBACK
32
+  (0.2ms) BEGIN
33
+  (0.2ms) ROLLBACK
34
+  (0.1ms) BEGIN
35
+  (0.1ms) COMMIT
36
+  (0.1ms) BEGIN
37
+ SQL (0.3ms) INSERT INTO `dummy_models` (`created_at`, `id`, `text`, `updated_at`) VALUES ('2014-03-21 14:06:33', 1, 'blah', '2014-03-21 14:06:33')
38
+ Started GET "/commenteux/dummy_model/1" for 127.0.0.1 at 2014-03-21 10:06:33 -0400
39
+ Processing by Commenteux::NotesController#index as HTML
40
+ Parameters: {"resource"=>"dummy_model", "resource_id"=>"1"}
41
+ DummyModel Load (0.3ms) SELECT `dummy_models`.* FROM `dummy_models` WHERE `dummy_models`.`id` = 1 LIMIT 1
42
+ Comment Load (0.4ms) SELECT `comments`.* FROM `comments` WHERE `comments`.`commentable_id` = 1 AND `comments`.`commentable_type` = 'DummyModel' ORDER BY created_at ASC
43
+ Rendered /Users/seurdge/projects/commenteux/app/views/commenteux/notes/index.html.erb within layouts/application (307.0ms)
44
+ Completed 200 OK in 433ms (Views: 372.7ms | ActiveRecord: 2.6ms)
45
+  (2.2ms) ROLLBACK
46
+  (0.1ms) BEGIN
47
+  (0.1ms) COMMIT
48
+  (0.1ms) BEGIN
49
+ SQL (0.2ms) INSERT INTO `dummy_models` (`created_at`, `id`, `text`, `updated_at`) VALUES ('2014-03-21 14:06:34', 1, 'blah', '2014-03-21 14:06:34')
50
+ Started GET "/commenteux/dummy_model/1" for 127.0.0.1 at 2014-03-21 10:06:34 -0400
51
+ Processing by Commenteux::NotesController#index as HTML
52
+ Parameters: {"resource"=>"dummy_model", "resource_id"=>"1"}
53
+ DummyModel Load (0.4ms) SELECT `dummy_models`.* FROM `dummy_models` WHERE `dummy_models`.`id` = 1 LIMIT 1
54
+ Comment Load (0.3ms) SELECT `comments`.* FROM `comments` WHERE `comments`.`commentable_id` = 1 AND `comments`.`commentable_type` = 'DummyModel' ORDER BY created_at ASC
55
+ Rendered /Users/seurdge/projects/commenteux/app/views/commenteux/notes/index.html.erb within layouts/application (0.5ms)
56
+ Completed 200 OK in 6ms (Views: 1.4ms | ActiveRecord: 0.7ms)
57
+  (0.5ms) ROLLBACK
58
+  (0.1ms) BEGIN
59
+  (0.1ms) COMMIT
60
+  (0.1ms) BEGIN
61
+ SQL (0.3ms) INSERT INTO `dummy_models` (`created_at`, `id`, `text`, `updated_at`) VALUES ('2014-03-21 14:06:34', 1, 'blah', '2014-03-21 14:06:34')
62
+ Started GET "/commenteux/dummy_model/1/new" for 127.0.0.1 at 2014-03-21 10:06:34 -0400
63
+ Processing by Commenteux::NotesController#new as HTML
64
+ Parameters: {"resource"=>"dummy_model", "resource_id"=>"1"}
65
+ DummyModel Load (0.3ms) SELECT `dummy_models`.* FROM `dummy_models` WHERE `dummy_models`.`id` = 1 LIMIT 1
66
+ Rendered /Users/seurdge/projects/commenteux/app/views/commenteux/notes/new.html.erb within layouts/application (71.8ms)
67
+ Completed 200 OK in 114ms (Views: 73.9ms | ActiveRecord: 0.8ms)
68
+ Started POST "/commenteux/dummy_model/1?parent_div=" for 127.0.0.1 at 2014-03-21 10:06:34 -0400
69
+ Processing by Commenteux::NotesController#create as HTML
70
+ Parameters: {"utf8"=>"✓", "comments"=>{"title"=>"", "comment"=>"Ceci est un commentaire"}, "parent_div"=>"", "resource"=>"dummy_model", "resource_id"=>"1"}
71
+ DummyModel Load (0.3ms) SELECT `dummy_models`.* FROM `dummy_models` WHERE `dummy_models`.`id` = 1 LIMIT 1
72
+ SQL (0.3ms) INSERT INTO `comments` (`comment`, `commentable_id`, `commentable_type`, `created_at`, `updated_at`) VALUES ('Ceci est un commentaire', 1, 'DummyModel', '2014-03-21 14:06:34', '2014-03-21 14:06:34')
73
+ Redirected to http://www.example.com/commenteux/dummy_model/1?parent_div=
74
+ Completed 302 Found in 6ms (ActiveRecord: 0.6ms)
75
+ Started GET "/commenteux/dummy_model/1?parent_div=" for 127.0.0.1 at 2014-03-21 10:06:34 -0400
76
+ Processing by Commenteux::NotesController#index as HTML
77
+ Parameters: {"parent_div"=>"", "resource"=>"dummy_model", "resource_id"=>"1"}
78
+ DummyModel Load (0.3ms) SELECT `dummy_models`.* FROM `dummy_models` WHERE `dummy_models`.`id` = 1 LIMIT 1
79
+ Comment Load (0.3ms) SELECT `comments`.* FROM `comments` WHERE `comments`.`commentable_id` = 1 AND `comments`.`commentable_type` = 'DummyModel' ORDER BY created_at ASC
80
+ Rendered /Users/seurdge/projects/commenteux/app/views/commenteux/notes/index.html.erb within layouts/application (0.5ms)
81
+ Completed 200 OK in 5ms (Views: 1.4ms | ActiveRecord: 0.6ms)
82
+ Comment Load (0.5ms) SELECT `comments`.* FROM `comments` WHERE `comments`.`commentable_id` = 1 ORDER BY created_at ASC LIMIT 1
83
+  (1.2ms) ROLLBACK
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commenteux
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Groupe Fungo inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-19 00:00:00.000000000 Z
11
+ date: 2014-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -131,10 +131,24 @@ files:
131
131
  - spec/dummy/db/migrate/20140311235439_create_dummy_models.rb
132
132
  - spec/dummy/db/migrate/20140312000846_create_comments.rb
133
133
  - spec/dummy/db/schema.rb
134
+ - spec/dummy/log/test.log
134
135
  - spec/dummy/public/404.html
135
136
  - spec/dummy/public/422.html
136
137
  - spec/dummy/public/500.html
137
138
  - spec/dummy/public/favicon.ico
139
+ - spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
140
+ - spec/dummy/tmp/cache/assets/test/sprockets/1957ff8c0d834428d5beca5bf51669b2
141
+ - spec/dummy/tmp/cache/assets/test/sprockets/1961e9a889917e26f9b92f7e3678b9d8
142
+ - spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
143
+ - spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
144
+ - spec/dummy/tmp/cache/assets/test/sprockets/6e1da15bffb0094059fbe56ddb206c07
145
+ - spec/dummy/tmp/cache/assets/test/sprockets/9fbd3d6762f09cbefd55f6775cf9bebe
146
+ - spec/dummy/tmp/cache/assets/test/sprockets/af00b28760a09c0a6fd6fe584cbb839d
147
+ - spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
148
+ - spec/dummy/tmp/cache/assets/test/sprockets/d72f8bdb1dcb7ea80d1869cb2c6ebbd3
149
+ - spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
150
+ - spec/dummy/tmp/cache/assets/test/sprockets/db2a42fb4a2ea58dddbe086ea7cbd8c3
151
+ - spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
138
152
  - spec/fabricators/dummy_models_fabricator.rb
139
153
  - spec/helpers/commenteux/notes_helper_spec.rb
140
154
  - spec/spec_helper.rb
@@ -194,12 +208,26 @@ test_files:
194
208
  - spec/dummy/db/migrate/20140311235439_create_dummy_models.rb
195
209
  - spec/dummy/db/migrate/20140312000846_create_comments.rb
196
210
  - spec/dummy/db/schema.rb
211
+ - spec/dummy/log/test.log
197
212
  - spec/dummy/public/404.html
198
213
  - spec/dummy/public/422.html
199
214
  - spec/dummy/public/500.html
200
215
  - spec/dummy/public/favicon.ico
201
216
  - spec/dummy/Rakefile
202
217
  - spec/dummy/README.rdoc
218
+ - spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
219
+ - spec/dummy/tmp/cache/assets/test/sprockets/1957ff8c0d834428d5beca5bf51669b2
220
+ - spec/dummy/tmp/cache/assets/test/sprockets/1961e9a889917e26f9b92f7e3678b9d8
221
+ - spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
222
+ - spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
223
+ - spec/dummy/tmp/cache/assets/test/sprockets/6e1da15bffb0094059fbe56ddb206c07
224
+ - spec/dummy/tmp/cache/assets/test/sprockets/9fbd3d6762f09cbefd55f6775cf9bebe
225
+ - spec/dummy/tmp/cache/assets/test/sprockets/af00b28760a09c0a6fd6fe584cbb839d
226
+ - spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
227
+ - spec/dummy/tmp/cache/assets/test/sprockets/d72f8bdb1dcb7ea80d1869cb2c6ebbd3
228
+ - spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
229
+ - spec/dummy/tmp/cache/assets/test/sprockets/db2a42fb4a2ea58dddbe086ea7cbd8c3
230
+ - spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
203
231
  - spec/fabricators/dummy_models_fabricator.rb
204
232
  - spec/helpers/commenteux/notes_helper_spec.rb
205
233
  - spec/spec_helper.rb