historiqueux 1.0.0 → 1.0.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32b71fa0c0cc70cd4e90e131d678b305eba258eb
|
4
|
+
data.tar.gz: 3a0375c53d9173d76ebb4d9ec7adfcad8c4d5f2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bf7e33506d874ac0fe139283ca0f154f7afe9f880c2f637ef28ce9b7f12c304846d0a8b3862039e0f73809da44308b805cf239e135127546c4b09521b8d3ba7
|
7
|
+
data.tar.gz: 35389dfbd3013bb0cdbea7efbebfe001431af43da53a26b994de99ad10a57150a2658722d97c4d79af406507341ef801278cc43282eef8df86b19c3bf2044841
|
data/README.rdoc
CHANGED
@@ -36,6 +36,24 @@ where :resource is the name of your model (you can use namespace)
|
|
36
36
|
==== CoffeeScript
|
37
37
|
#= require historiqueux/history
|
38
38
|
|
39
|
+
Call url of historiqueux screens, for exemple, like that:
|
40
|
+
|
41
|
+
<%= link_to "<i class='icon-time text-blue'></i> Historique".html_safe,
|
42
|
+
"/historiqueux/client::customer/#{@customer.id}?parent_div=ajax_target",
|
43
|
+
:id => "history_tab", :data => {:remote => true} %>
|
44
|
+
|
45
|
+
With a binding like that in your application.js.coffee
|
46
|
+
|
47
|
+
$(document).delegate '#history_tab', 'ajax:success', (e, data, status, xhr) ->
|
48
|
+
$('.tab_header').removeClass('active')
|
49
|
+
$('#history_tab_header').addClass('active')
|
50
|
+
$('#ajax_target').html(xhr.responseText)
|
51
|
+
|
52
|
+
|
53
|
+
== Credits
|
54
|
+
|
55
|
+
{Andy Stewart}[http://github.com/airblade] - The creator of papertrail.
|
56
|
+
|
39
57
|
== Contributors
|
40
58
|
|
41
59
|
{Serge Savoie}[http://github.com/seurdge]
|
@@ -44,4 +62,4 @@ where :resource is the name of your model (you can use namespace)
|
|
44
62
|
|
45
63
|
== More
|
46
64
|
|
47
|
-
http://www.groupefungo.ca
|
65
|
+
http://www.groupefungo.ca
|
@@ -1,16 +1,11 @@
|
|
1
1
|
$ () ->
|
2
2
|
$(document).delegate '.event_open_relation', 'click', (e) ->
|
3
|
-
console.log('event_open_relation')
|
4
3
|
event.stopPropagation()
|
5
4
|
event.preventDefault()
|
6
5
|
parent = $(@).data('parent')
|
7
6
|
resource = $(@).data('resource')
|
8
7
|
id = $(@).data('id')
|
9
8
|
relation = $(@).data('relation')
|
10
|
-
console.log('parent_div = ' + parent)
|
11
|
-
console.log('resource = ' + resource)
|
12
|
-
console.log('resource_id = ' + id)
|
13
|
-
console.log('relation = ' + relation)
|
14
9
|
$.ajax
|
15
10
|
url: '/historiqueux/' + resource + '/' + id + '/relations/' + relation
|
16
11
|
type: "get"
|
@@ -18,13 +13,9 @@ $ () ->
|
|
18
13
|
data:
|
19
14
|
"parent_div": parent
|
20
15
|
success: (returnData) ->
|
21
|
-
console.log('success')
|
22
|
-
console.log("#" + parent)
|
23
|
-
console.log(returnData)
|
24
16
|
if parent
|
25
17
|
$("#" + parent).html(returnData)
|
26
18
|
else
|
27
|
-
console.log('no parent')
|
28
19
|
$('body').html(returnData)
|
29
20
|
@
|
30
21
|
error: (e) ->
|
@@ -33,15 +24,11 @@ $ () ->
|
|
33
24
|
@
|
34
25
|
|
35
26
|
$(document).delegate '#event_back', 'click', (e) ->
|
36
|
-
console.log('event_back click')
|
37
27
|
event.stopPropagation()
|
38
28
|
event.preventDefault()
|
39
29
|
parent = $(@).data('parent')
|
40
30
|
resource = $(@).data('resource')
|
41
31
|
id = $(@).data('id')
|
42
|
-
console.log('parent_div = ' + parent)
|
43
|
-
console.log('resource = ' + resource)
|
44
|
-
console.log('resource_id = ' + id)
|
45
32
|
$.ajax
|
46
33
|
url: "/historiqueux/" + resource + "/" + id + "?parent_div=" + parent
|
47
34
|
type: "get"
|
@@ -49,13 +36,9 @@ $ () ->
|
|
49
36
|
data:
|
50
37
|
"parent_div": parent
|
51
38
|
success: (returnData) ->
|
52
|
-
console.log('success')
|
53
|
-
console.log("#" + parent)
|
54
|
-
console.log(returnData)
|
55
39
|
if parent
|
56
40
|
$("#" + parent).html(returnData)
|
57
41
|
else
|
58
|
-
console.log('no parent')
|
59
42
|
$('body').html(returnData)
|
60
43
|
@
|
61
44
|
error: (e) ->
|
@@ -64,18 +47,12 @@ $ () ->
|
|
64
47
|
@
|
65
48
|
|
66
49
|
$(document).delegate '.event_open_details', 'click', (e) ->
|
67
|
-
console.log('event_open_details click')
|
68
50
|
event.stopPropagation()
|
69
51
|
event.preventDefault()
|
70
52
|
event_id = $(@).data('event-id')
|
71
|
-
console.log('event-id = ' + event_id)
|
72
53
|
parent = $(@).data('parent-div')
|
73
54
|
resource = $(@).data('resource')
|
74
55
|
id = $(@).data('resource-id')
|
75
|
-
console.log('parent_div = ' + parent)
|
76
|
-
console.log('resource = ' + resource)
|
77
|
-
console.log('resource_id = ' + id)
|
78
|
-
console.log('url = ' + "/historiqueux/" + resource + "/" + id + "/" + event_id)
|
79
56
|
$.ajax
|
80
57
|
url: "/historiqueux/" + resource + "/" + id + "/" + event_id
|
81
58
|
type: "get"
|
@@ -83,13 +60,9 @@ $ () ->
|
|
83
60
|
data:
|
84
61
|
"parent_div": parent
|
85
62
|
success: (returnData) ->
|
86
|
-
console.log('success')
|
87
|
-
console.log("#" + parent)
|
88
|
-
console.log(returnData)
|
89
63
|
if parent
|
90
64
|
$("#" + parent).html(returnData)
|
91
65
|
else
|
92
|
-
console.log('no parent')
|
93
66
|
$('body').html(returnData)
|
94
67
|
@
|
95
68
|
error: (e) ->
|
data/lib/historiqueux/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: historiqueux
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
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
|
11
|
+
date: 2014-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 4.0.3
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '5'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 4.0.3
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '5'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: rspec-rails
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -64,7 +70,6 @@ files:
|
|
64
70
|
- MIT-LICENSE
|
65
71
|
- README.rdoc
|
66
72
|
- Rakefile
|
67
|
-
- app/assets/javascripts/historiqueux/application.js.coffee
|
68
73
|
- app/assets/javascripts/historiqueux/history.js.coffee
|
69
74
|
- app/controllers/historiqueux/application_controller.rb
|
70
75
|
- app/controllers/historiqueux/history_controller.rb
|
File without changes
|