notifly 0.1.0 → 0.1.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 +4 -4
- data/README.md +6 -6
- data/app/assets/javascripts/notifly/get_notifications.js.erb +1 -1
- data/app/assets/javascripts/notifly/more_notifications.js.erb +4 -4
- data/app/assets/javascripts/notifly/read_notifications.js.erb +1 -1
- data/app/assets/javascripts/notifly/seen_notifications.js.erb +1 -1
- data/app/assets/javascripts/notifly.js +0 -1
- data/app/assets/javascripts/notifly_dropdown.js +1 -0
- data/app/helpers/notifly/view_helper.rb +1 -1
- data/app/views/notifly/layouts/_counter.html.erb +1 -1
- data/app/views/notifly/notifications/index.js.erb +2 -2
- data/app/views/notifly/notifications/seen.js.erb +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65940f99d804f1a248f21de334ca2cfd2eb749c3
|
4
|
+
data.tar.gz: d4b365df60e2712776ee90b72eed3feee96e0905
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 231ce6dc564754be301b7e682e42e4c26bea55fa2bac4676a8dfe9fefb7469edd720565ccd22051ea3c8d645471b41372139e282c6bbf59a724695ab7671ccdd
|
7
|
+
data.tar.gz: c6f8ae0734c6162cbcbe13c92ccfbe3fd91528294e89cdd088d2cfe3e0c598b8d93ef5387759f445db032698f6b8b14deede3b810fc1e2c0de230ac95efad179
|
data/README.md
CHANGED
@@ -103,21 +103,21 @@ class TicketOrder < ActiveRecord::Base
|
|
103
103
|
belongs_to :owner
|
104
104
|
|
105
105
|
before_destroy do
|
106
|
-
owner.notifly! template: :destroy, sender:
|
106
|
+
owner.notifly! template: :destroy, sender: buyer, data: attributes
|
107
107
|
end
|
108
108
|
|
109
109
|
def send_gift!
|
110
110
|
# code here
|
111
111
|
|
112
112
|
if completed?
|
113
|
-
owner.notifly! template: :ticket_gift, sender:
|
113
|
+
owner.notifly! template: :ticket_gift, sender: buyer, target: ticket
|
114
114
|
end
|
115
115
|
end
|
116
116
|
|
117
117
|
def accept_gift
|
118
118
|
# code here
|
119
119
|
|
120
|
-
buyer.notifly! sender:
|
120
|
+
buyer.notifly! sender: owner, target: ticket
|
121
121
|
end
|
122
122
|
end
|
123
123
|
```
|
@@ -138,11 +138,11 @@ class TicketOrder < ActiveRecord::Base
|
|
138
138
|
notifly default_values: { receiver: :owner }
|
139
139
|
|
140
140
|
notifly before: :destroy, template: :destroy_order_notification, sender: :buyer,
|
141
|
-
data: :attributes,
|
141
|
+
data: :attributes, mail: { template: :destroy_order_mail }
|
142
142
|
notifly after: :send_gift!, template: :ticket_gift, sender: :buyer,
|
143
|
-
target: :ticket,
|
143
|
+
target: :ticket, mail: true, if: -> { completed? }
|
144
144
|
notifly after: :accept_gift, sender: :owner, receiver: :buyer, target: :ticket,
|
145
|
-
template: :accept_gift,
|
145
|
+
template: :accept_gift, mail: { only: true }
|
146
146
|
|
147
147
|
def send_gift!
|
148
148
|
# code here
|
@@ -1,16 +1,16 @@
|
|
1
1
|
<% notifly = Notifly::Engine.routes.url_helpers %>
|
2
2
|
|
3
3
|
var _notiflyMoreNotifications = function () {
|
4
|
-
var $notifly = $('#notifly');
|
4
|
+
var $notifly = $('#notifly-notifications-content');
|
5
5
|
|
6
|
-
if($notifly
|
7
|
-
$
|
6
|
+
if($notifly.length !== 0) {
|
7
|
+
$('#notifly-more-notifications-link').click(function () {
|
8
8
|
$.ajax({
|
9
9
|
url: '<%= notifly.notifications_path %>',
|
10
10
|
data: {
|
11
11
|
scope: 'older',
|
12
12
|
reference_notification_id: notiflyLastNotification,
|
13
|
-
mark_as_seen:
|
13
|
+
mark_as_seen: true
|
14
14
|
},
|
15
15
|
type: 'GET'
|
16
16
|
});
|
@@ -4,7 +4,6 @@
|
|
4
4
|
//= require 'notifly/seen_notifications'
|
5
5
|
//= require 'notifly/read_notifications'
|
6
6
|
//= require 'notifly/more_notifications'
|
7
|
-
//= require 'twitter/bootstrap'
|
8
7
|
|
9
8
|
$(document).ready(function() {
|
10
9
|
$(document).on('click', '#notifly-notifications-panel.dropdown-menu', function (e) {
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require 'twitter/bootstrap'
|
@@ -29,5 +29,5 @@
|
|
29
29
|
$('#notifly-more-notifications-link').remove();
|
30
30
|
<% end %>
|
31
31
|
|
32
|
-
$('#notifly-counter').
|
33
|
-
$('#notifly-icon').
|
32
|
+
$('#notifly-counter').replaceWith("<%= j(render 'notifly/layouts/counter', counter: @counter)%>");
|
33
|
+
$('#notifly-icon').replaceWith("<%= j notifly_icon(@counter > 0) %>")
|
@@ -1,2 +1,2 @@
|
|
1
|
-
$('#notifly-counter').
|
2
|
-
$('#notifly-icon').
|
1
|
+
$('#notifly-counter').replaceWith("<%= j(render 'notifly/layouts/counter', counter: @counter)%>");
|
2
|
+
$('#notifly-icon').replaceWith("<%= j notifly_icon(@counter > 0) %>")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notifly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pedro Passalini
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-12-
|
12
|
+
date: 2014-12-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -245,6 +245,7 @@ files:
|
|
245
245
|
- app/assets/javascripts/notifly/more_notifications.js.erb
|
246
246
|
- app/assets/javascripts/notifly/read_notifications.js.erb
|
247
247
|
- app/assets/javascripts/notifly/seen_notifications.js.erb
|
248
|
+
- app/assets/javascripts/notifly_dropdown.js
|
248
249
|
- app/assets/stylesheets/notifly.css
|
249
250
|
- app/assets/stylesheets/notifly/layout.css
|
250
251
|
- app/controllers/notifly/application_controller.rb
|