ng-toaster-rails 0.4.10.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.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +57 -0
- data/Rakefile +2 -0
- data/lib/generators/ng-toaster/install/install_generator.rb +38 -0
- data/lib/ng-toaster-rails.rb +8 -0
- data/lib/ng-toaster-rails/engine.rb +6 -0
- data/lib/ng-toaster-rails/version.rb +6 -0
- data/ng-toaster-rails.gemspec +18 -0
- data/vendor/assets/javascripts/toaster.js +290 -0
- data/vendor/assets/stylesheets/toaster.css +239 -0
- metadata +57 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 697ccecb4ea4a58a6b1831a6b004847a998fa4eb
|
4
|
+
data.tar.gz: 7bc8efe62722bca0d03a3d4d930ed62a5012f1b4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6c23cb27c01ca38cef99f3bf303120565d83b2a9bc2a1704a4dd4382babbbfb1df1615663f47cb096ece77da00ebafed953c0d1963212f71431fc25875f936e0
|
7
|
+
data.tar.gz: 395425932fe7ed9b4d27bb01a385f8ff0c1eaba6e65a02fecf90b69b1505eab7146be5ee88751ec3122318560cddcb9df8ced640bd3d9f1b4eda7144cadadfc9
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Fernando Di Bartolo
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
# ng-toaster-rails
|
2
|
+
|
3
|
+
ng-toaster-rails wraps the [AngularJS-Toaster](https://github.com/jirikavi/AngularJS-Toaster) library in a rails engine for simple use with the asset pipeline provided by Rails 3.1 and higher. The gem includes the development (non-minified) source for ease of exploration. The asset pipeline will minify in production.
|
4
|
+
|
5
|
+
For more info on customizing the library, please refer to the [doc](https://github.com/jirikavi/AngularJS-Toaster)
|
6
|
+
|
7
|
+
## Usage
|
8
|
+
|
9
|
+
Add the following to your gemfile:
|
10
|
+
|
11
|
+
gem 'ng-toaster-rails'
|
12
|
+
|
13
|
+
Add the following directive to your Javascript manifest file (application.js):
|
14
|
+
|
15
|
+
//= require toaster
|
16
|
+
|
17
|
+
If not present, also require ngAnimate module
|
18
|
+
|
19
|
+
//= require angular-animate
|
20
|
+
|
21
|
+
And the following directive to your Stylesheet manifest file (appliaction.css):
|
22
|
+
|
23
|
+
*= require toaster
|
24
|
+
|
25
|
+
Then, just follow the [doc](https://github.com/jirikavi/AngularJS-Toaster).
|
26
|
+
Add toaster container directive:
|
27
|
+
|
28
|
+
```html
|
29
|
+
<toaster-container></toaster-container>
|
30
|
+
```
|
31
|
+
|
32
|
+
Prepare the call of toaster method:
|
33
|
+
|
34
|
+
```js
|
35
|
+
angular.module('main', ['toaster'])
|
36
|
+
.controller('myController', function($scope, toaster) {
|
37
|
+
$scope.pop = function(){
|
38
|
+
toaster.pop('success', "title", "text");
|
39
|
+
};
|
40
|
+
});
|
41
|
+
```
|
42
|
+
|
43
|
+
Call controller method on button click:
|
44
|
+
|
45
|
+
```html
|
46
|
+
<div ng-controller="myController">
|
47
|
+
<button ng-click="pop()">Show a Toaster</button>
|
48
|
+
</div>
|
49
|
+
```
|
50
|
+
|
51
|
+
## Versioning
|
52
|
+
|
53
|
+
ng-toaster-rails 0.4.10 == AngularJS-Toaster 0.4.10
|
54
|
+
|
55
|
+
Every attempt is made to mirror the currently shipping AngularJS-Toaster version number wherever possible.
|
56
|
+
The major, minor, and patch version numbers will always represent the AngularJS-Toaster version. Should a gem
|
57
|
+
bug be discovered, a 4th version identifier will be added and incremented.
|
data/Rakefile
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'rails'
|
2
|
+
|
3
|
+
# Supply generator for Rails 3.0.x or if asset pipeline is not enabled
|
4
|
+
if ::Rails.version < "3.1" || ::Rails.application.config.assets.enabled == false
|
5
|
+
module NgToaster
|
6
|
+
module Generators
|
7
|
+
class InstallGenerator < ::Rails::Generators::Base
|
8
|
+
desc "This generator installs NgToaster #{NgToaster::Rails::TOASTER_VERSION}"
|
9
|
+
source_root File.expand_path('../../../../../vendor/assets/javascripts', __FILE__)
|
10
|
+
source_root File.expand_path('../../../../../vendor/assets/stylesheets', __FILE__)
|
11
|
+
|
12
|
+
def copy_marked
|
13
|
+
say_status("copying js", "NgToaster (#{NgToaster::Rails::TOASTER_VERSION})", :green)
|
14
|
+
copy_file "toaster.js", "public/javascripts/toaster.js"
|
15
|
+
say_status("copying css", "NgToaster (#{NgToaster::Rails::TOASTER_VERSION})", :green)
|
16
|
+
copy_file "toaster.css", "public/stylesheets/toaster.css"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
else
|
22
|
+
module NgToaster
|
23
|
+
module Generators
|
24
|
+
class InstallGenerator < ::Rails::Generators::Base
|
25
|
+
desc "Just show instructions so people will know what to do when mistakenly using generator for Rails 3.1 apps with the asset pipeline enabled"
|
26
|
+
|
27
|
+
def do_nothing
|
28
|
+
say_status("deprecated", "You are using Rails >= 3.1 with the asset pipeline enabled, so this generator is not needed.")
|
29
|
+
say_status("", "The necessary files are already in your asset pipeline.")
|
30
|
+
say_status("", "Just add `//= require toaster` to your app/assets/javascripts/application.js")
|
31
|
+
say_status("", "Just add `*= require toaster` to your app/assets/stylesheets/application.css")
|
32
|
+
say_status("", "If you upgraded your app from Rails < 3.1 and still have toaster.js/css in your assets, be sure to remove them.")
|
33
|
+
say_status("", "If you do not want the asset pipeline enabled, you may turn it off in application.rb and re-run this generator.")
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/ng-toaster-rails/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["fdibartolo"]
|
6
|
+
gem.email = ["fernando.di.bartolo@gmail.com"]
|
7
|
+
gem.description = 'Rails engine for jirikavi/AngularJS-Toaster: "AngularJS Toaster is a customized version of "toastr" non-blocking notification javascript library"'
|
8
|
+
gem.summary = 'Rails engine for jirikavi/AngularJS-Toaster'
|
9
|
+
gem.homepage = "https://github.com/fdibartolo/ng-toaster-rails"
|
10
|
+
gem.licenses = ['MIT']
|
11
|
+
|
12
|
+
gem.files = `git ls-files`.split($\)
|
13
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
14
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
15
|
+
gem.name = "ng-toaster-rails"
|
16
|
+
gem.require_paths = ["lib"]
|
17
|
+
gem.version = NgToaster::Rails::VERSION
|
18
|
+
end
|
@@ -0,0 +1,290 @@
|
|
1
|
+
(function () {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
/*
|
5
|
+
* AngularJS Toaster
|
6
|
+
* Version: 0.4.10
|
7
|
+
*
|
8
|
+
* Copyright 2013 Jiri Kavulak.
|
9
|
+
* All Rights Reserved.
|
10
|
+
* Use, reproduction, distribution, and modification of this code is subject to the terms and
|
11
|
+
* conditions of the MIT license, available at http://www.opensource.org/licenses/mit-license.php
|
12
|
+
*
|
13
|
+
* Author: Jiri Kavulak
|
14
|
+
* Related to project of John Papa and Hans Fjällemark
|
15
|
+
*/
|
16
|
+
|
17
|
+
angular.module('toaster', ['ngAnimate'])
|
18
|
+
.constant('toasterConfig', {
|
19
|
+
'limit': 0, // limits max number of toasts
|
20
|
+
'tap-to-dismiss': true,
|
21
|
+
'close-button': false,
|
22
|
+
'newest-on-top': true,
|
23
|
+
//'fade-in': 1000, // done in css
|
24
|
+
//'on-fade-in': undefined, // not implemented
|
25
|
+
//'fade-out': 1000, // done in css
|
26
|
+
// 'on-fade-out': undefined, // not implemented
|
27
|
+
//'extended-time-out': 1000, // not implemented
|
28
|
+
'time-out': 5000, // Set timeOut and extendedTimeout to 0 to make it sticky
|
29
|
+
'icon-classes': {
|
30
|
+
error: 'toast-error',
|
31
|
+
info: 'toast-info',
|
32
|
+
wait: 'toast-wait',
|
33
|
+
success: 'toast-success',
|
34
|
+
warning: 'toast-warning'
|
35
|
+
},
|
36
|
+
'body-output-type': '',// Options: '', 'trustedHtml', 'template', 'templateWithData'
|
37
|
+
'body-template': 'toasterBodyTmpl.html',
|
38
|
+
'icon-class': 'toast-info',
|
39
|
+
'position-class': 'toast-top-right',
|
40
|
+
'title-class': 'toast-title',
|
41
|
+
'message-class': 'toast-message',
|
42
|
+
'mouseover-timer-stop': true // stop timeout on mouseover and restart timer on mouseout
|
43
|
+
})
|
44
|
+
.service('toaster', ['$rootScope', 'toasterConfig', function ($rootScope, toasterConfig) {
|
45
|
+
this.pop = function (type, title, body, timeout, bodyOutputType, clickHandler) {
|
46
|
+
if (angular.isObject(type)) {
|
47
|
+
var params = type; // NOTE: anable parameters as pop argument
|
48
|
+
this.toast = {
|
49
|
+
type: params.type,
|
50
|
+
title: params.title,
|
51
|
+
body: params.body,
|
52
|
+
timeout: params.timeout,
|
53
|
+
bodyOutputType: params.bodyOutputType,
|
54
|
+
clickHandler: params.clickHandler
|
55
|
+
};
|
56
|
+
}
|
57
|
+
else {
|
58
|
+
this.toast = {
|
59
|
+
type: type,
|
60
|
+
title: title,
|
61
|
+
body: body,
|
62
|
+
timeout: timeout,
|
63
|
+
bodyOutputType: bodyOutputType,
|
64
|
+
clickHandler: clickHandler
|
65
|
+
};
|
66
|
+
}
|
67
|
+
$rootScope.$emit('toaster-newToast');
|
68
|
+
};
|
69
|
+
|
70
|
+
this.clear = function () {
|
71
|
+
$rootScope.$emit('toaster-clearToasts');
|
72
|
+
};
|
73
|
+
|
74
|
+
for (var type in toasterConfig['icon-classes']) {
|
75
|
+
this[type] = (function (toasterType){
|
76
|
+
return function(title, body, timeout, bodyOutputType, clickHandler) {
|
77
|
+
if (angular.isString(title))
|
78
|
+
this.pop(toasterType, title, body, timeout, bodyOutputType, clickHandler);
|
79
|
+
else
|
80
|
+
this.pop(angular.extend(title, {type: toasterType}));
|
81
|
+
}
|
82
|
+
})(type);
|
83
|
+
}
|
84
|
+
}])
|
85
|
+
.factory('toasterRegisterEvents', function() {
|
86
|
+
|
87
|
+
var toasterFactory = {
|
88
|
+
_NewToastEvent: false,
|
89
|
+
_ClearAllToastsEvent: false,
|
90
|
+
registerNewToastEvent: function(){
|
91
|
+
this._NewToastEvent = true;
|
92
|
+
},
|
93
|
+
registerClearAllToastsEvent: function(){
|
94
|
+
this._ClearAllToastsEvent = true;
|
95
|
+
},
|
96
|
+
deregisterNewToastEvent: function(){
|
97
|
+
this._NewToastEvent = false;
|
98
|
+
},
|
99
|
+
deregisterClearAllToastsEvent: function(){
|
100
|
+
this._ClearAllToastsEvent = false;
|
101
|
+
},
|
102
|
+
isRegisteredNewToastEvent: function(){
|
103
|
+
return this._NewToastEvent;
|
104
|
+
},
|
105
|
+
isRegisteredClearAllToastsEvent: function(){
|
106
|
+
return this._ClearAllToastsEvent;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
return {
|
110
|
+
registerNewToastEvent: toasterFactory.registerNewToastEvent,
|
111
|
+
registerClearAllToastsEvent: toasterFactory.registerClearAllToastsEvent,
|
112
|
+
deregisterNewToastEvent: toasterFactory.deregisterNewToastEvent,
|
113
|
+
deregisterClearAllToastsEvent: toasterFactory.deregisterClearAllToastsEvent,
|
114
|
+
isRegisteredNewToastEvent: toasterFactory.isRegisteredNewToastEvent,
|
115
|
+
isRegisteredClearAllToastsEvent: toasterFactory.isRegisteredClearAllToastsEvent
|
116
|
+
}
|
117
|
+
})
|
118
|
+
.directive('toasterContainer', ['$parse', '$rootScope', '$interval', '$sce', 'toasterConfig', 'toaster', 'toasterRegisterEvents',
|
119
|
+
function ($parse, $rootScope, $interval, $sce, toasterConfig, toaster, toasterRegisterEvents) {
|
120
|
+
return {
|
121
|
+
replace: true,
|
122
|
+
restrict: 'EA',
|
123
|
+
scope: true, // creates an internal scope for this directive
|
124
|
+
link: function (scope, elm, attrs) {
|
125
|
+
var id = 0,
|
126
|
+
mergedConfig;
|
127
|
+
|
128
|
+
mergedConfig = angular.extend({}, toasterConfig, scope.$eval(attrs.toasterOptions));
|
129
|
+
|
130
|
+
scope.config = {
|
131
|
+
position: mergedConfig['position-class'],
|
132
|
+
title: mergedConfig['title-class'],
|
133
|
+
message: mergedConfig['message-class'],
|
134
|
+
tap: mergedConfig['tap-to-dismiss'],
|
135
|
+
closeButton: mergedConfig['close-button'],
|
136
|
+
animation: mergedConfig['animation-class'],
|
137
|
+
mouseoverTimer: mergedConfig['mouseover-timer-stop']
|
138
|
+
};
|
139
|
+
|
140
|
+
scope.deregClearToasts = null;
|
141
|
+
scope.deregNewToast = null;
|
142
|
+
|
143
|
+
scope.$on("$destroy",function () {
|
144
|
+
if (scope.deregClearToasts) scope.deregClearToasts();
|
145
|
+
if (scope.deregNewToast) scope.deregNewToast();
|
146
|
+
scope.deregClearToasts=null;
|
147
|
+
scope.deregNewToast=null;
|
148
|
+
toasterRegisterEvents.deregisterNewToastEvent();
|
149
|
+
toasterRegisterEvents.deregisterClearAllToastsEvent();
|
150
|
+
});
|
151
|
+
|
152
|
+
scope.configureTimer = function configureTimer(toast) {
|
153
|
+
var timeout = typeof (toast.timeout) == "number" ? toast.timeout : mergedConfig['time-out'];
|
154
|
+
if (timeout > 0)
|
155
|
+
setTimeout(toast, timeout);
|
156
|
+
};
|
157
|
+
|
158
|
+
function addToast(toast) {
|
159
|
+
toast.type = mergedConfig['icon-classes'][toast.type];
|
160
|
+
if (!toast.type)
|
161
|
+
toast.type = mergedConfig['icon-class'];
|
162
|
+
|
163
|
+
id++;
|
164
|
+
angular.extend(toast, { id: id });
|
165
|
+
|
166
|
+
// Set the toast.bodyOutputType to the default if it isn't set
|
167
|
+
toast.bodyOutputType = toast.bodyOutputType || mergedConfig['body-output-type'];
|
168
|
+
switch (toast.bodyOutputType) {
|
169
|
+
case 'trustedHtml':
|
170
|
+
toast.html = $sce.trustAsHtml(toast.body);
|
171
|
+
break;
|
172
|
+
case 'template':
|
173
|
+
toast.bodyTemplate = toast.body || mergedConfig['body-template'];
|
174
|
+
break;
|
175
|
+
case 'templateWithData':
|
176
|
+
var fcGet = $parse(toast.body || mergedConfig['body-template']);
|
177
|
+
var templateWithData = fcGet(scope);
|
178
|
+
toast.bodyTemplate = templateWithData.template;
|
179
|
+
toast.data = templateWithData.data;
|
180
|
+
break;
|
181
|
+
}
|
182
|
+
|
183
|
+
scope.configureTimer(toast);
|
184
|
+
|
185
|
+
if (mergedConfig['newest-on-top'] === true) {
|
186
|
+
scope.toasters.unshift(toast);
|
187
|
+
if (mergedConfig['limit'] > 0 && scope.toasters.length > mergedConfig['limit']) {
|
188
|
+
scope.toasters.pop();
|
189
|
+
}
|
190
|
+
} else {
|
191
|
+
scope.toasters.push(toast);
|
192
|
+
if (mergedConfig['limit'] > 0 && scope.toasters.length > mergedConfig['limit']) {
|
193
|
+
scope.toasters.shift();
|
194
|
+
}
|
195
|
+
}
|
196
|
+
|
197
|
+
toast.mouseover = false;
|
198
|
+
}
|
199
|
+
|
200
|
+
function setTimeout(toast, time) {
|
201
|
+
toast.timeout = $interval(function () {
|
202
|
+
if (!toast.mouseover)
|
203
|
+
scope.removeToast(toast.id);
|
204
|
+
}, time);
|
205
|
+
}
|
206
|
+
|
207
|
+
scope.toasters = [];
|
208
|
+
|
209
|
+
if(!toasterRegisterEvents.isRegisteredNewToastEvent()){
|
210
|
+
toasterRegisterEvents.registerNewToastEvent();
|
211
|
+
scope.deregNewToast = $rootScope.$on('toaster-newToast', function () {
|
212
|
+
addToast(toaster.toast);
|
213
|
+
});
|
214
|
+
}
|
215
|
+
|
216
|
+
if(!toasterRegisterEvents.isRegisteredClearAllToastsEvent()){
|
217
|
+
toasterRegisterEvents.registerClearAllToastsEvent();
|
218
|
+
scope.deregClearToasts = $rootScope.$on('toaster-clearToasts', function () {
|
219
|
+
scope.toasters.splice(0, scope.toasters.length);
|
220
|
+
});
|
221
|
+
}
|
222
|
+
},
|
223
|
+
controller: ['$scope', '$element', '$attrs', function ($scope, $element, $attrs) {
|
224
|
+
|
225
|
+
$scope.stopTimer = function (toast) {
|
226
|
+
toast.mouseover = true;
|
227
|
+
if ($scope.config.mouseoverTimer === true) {
|
228
|
+
if (toast.timeout) {
|
229
|
+
$interval.cancel(toast.timeout);
|
230
|
+
toast.timeout = null;
|
231
|
+
}
|
232
|
+
}
|
233
|
+
};
|
234
|
+
|
235
|
+
$scope.restartTimer = function (toast) {
|
236
|
+
toast.mouseover = false;
|
237
|
+
if ($scope.config.mouseoverTimer === true) {
|
238
|
+
if (!toast.timeout)
|
239
|
+
$scope.configureTimer(toast);
|
240
|
+
}
|
241
|
+
else if (toast.timeout === null) {
|
242
|
+
$scope.removeToast(toaster.id);
|
243
|
+
}
|
244
|
+
};
|
245
|
+
|
246
|
+
$scope.removeToast = function (id) {
|
247
|
+
var i = 0;
|
248
|
+
for (i; i < $scope.toasters.length; i++) {
|
249
|
+
if ($scope.toasters[i].id === id)
|
250
|
+
break;
|
251
|
+
}
|
252
|
+
$scope.toasters.splice(i, 1);
|
253
|
+
};
|
254
|
+
|
255
|
+
$scope.click = function (toaster, isCloseButton) {
|
256
|
+
if ($scope.config.tap === true || isCloseButton == true) {
|
257
|
+
var removeToast = true;
|
258
|
+
if (toaster.clickHandler) {
|
259
|
+
if (angular.isFunction(toaster.clickHandler)) {
|
260
|
+
removeToast = toaster.clickHandler(toaster, isCloseButton);
|
261
|
+
}
|
262
|
+
else if (angular.isFunction($scope.$parent.$eval(toaster.clickHandler))) {
|
263
|
+
removeToast = $scope.$parent.$eval(toaster.clickHandler)(toaster, isCloseButton);
|
264
|
+
}
|
265
|
+
else {
|
266
|
+
console.log("TOAST-NOTE: Your click handler is not inside a parent scope of toaster-container.");
|
267
|
+
}
|
268
|
+
}
|
269
|
+
if (removeToast) {
|
270
|
+
$scope.removeToast(toaster.id);
|
271
|
+
}
|
272
|
+
}
|
273
|
+
};
|
274
|
+
}],
|
275
|
+
template:
|
276
|
+
'<div id="toast-container" ng-class="[config.position, config.animation]">' +
|
277
|
+
'<div ng-repeat="toaster in toasters" class="toast" ng-class="toaster.type" ng-click="click(toaster)" ng-mouseover="stopTimer(toaster)" ng-mouseout="restartTimer(toaster)">' +
|
278
|
+
'<button class="toast-close-button" ng-show="config.closeButton" ng-click="click(toaster, true)">×</button>' +
|
279
|
+
'<div ng-class="config.title">{{toaster.title}}</div>' +
|
280
|
+
'<div ng-class="config.message" ng-switch on="toaster.bodyOutputType">' +
|
281
|
+
'<div ng-switch-when="trustedHtml" ng-bind-html="toaster.html"></div>' +
|
282
|
+
'<div ng-switch-when="template"><div ng-include="toaster.bodyTemplate"></div></div>' +
|
283
|
+
'<div ng-switch-when="templateWithData"><div ng-include="toaster.bodyTemplate"></div></div>' +
|
284
|
+
'<div ng-switch-default >{{toaster.body}}</div>' +
|
285
|
+
'</div>' +
|
286
|
+
'</div>' +
|
287
|
+
'</div>'
|
288
|
+
};
|
289
|
+
}]);
|
290
|
+
})(window, document);
|
@@ -0,0 +1,239 @@
|
|
1
|
+
/*
|
2
|
+
* Toastr
|
3
|
+
* Version 2.0.1
|
4
|
+
* Copyright 2012 John Papa and Hans Fjallemark.
|
5
|
+
* All Rights Reserved.
|
6
|
+
* Use, reproduction, distribution, and modification of this code is subject to the terms and
|
7
|
+
* conditions of the MIT license, available at http://www.opensource.org/licenses/mit-license.php
|
8
|
+
*
|
9
|
+
* Author: John Papa and Hans Fjallemark
|
10
|
+
* Project: https://github.com/CodeSeven/toastr
|
11
|
+
*/
|
12
|
+
.toast-title {
|
13
|
+
font-weight: bold;
|
14
|
+
}
|
15
|
+
.toast-message {
|
16
|
+
-ms-word-wrap: break-word;
|
17
|
+
word-wrap: break-word;
|
18
|
+
}
|
19
|
+
.toast-message a,
|
20
|
+
.toast-message label {
|
21
|
+
color: #ffffff;
|
22
|
+
}
|
23
|
+
.toast-message a:hover {
|
24
|
+
color: #cccccc;
|
25
|
+
text-decoration: none;
|
26
|
+
}
|
27
|
+
|
28
|
+
.toast-close-button {
|
29
|
+
position: relative;
|
30
|
+
right: -0.3em;
|
31
|
+
top: -0.3em;
|
32
|
+
float: right;
|
33
|
+
font-size: 20px;
|
34
|
+
font-weight: bold;
|
35
|
+
color: #ffffff;
|
36
|
+
-webkit-text-shadow: 0 1px 0 #ffffff;
|
37
|
+
text-shadow: 0 1px 0 #ffffff;
|
38
|
+
opacity: 0.8;
|
39
|
+
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
|
40
|
+
filter: alpha(opacity=80);
|
41
|
+
}
|
42
|
+
.toast-close-button:hover,
|
43
|
+
.toast-close-button:focus {
|
44
|
+
color: #000000;
|
45
|
+
text-decoration: none;
|
46
|
+
cursor: pointer;
|
47
|
+
opacity: 0.4;
|
48
|
+
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
|
49
|
+
filter: alpha(opacity=40);
|
50
|
+
}
|
51
|
+
|
52
|
+
/*Additional properties for button version
|
53
|
+
iOS requires the button element instead of an anchor tag.
|
54
|
+
If you want the anchor version, it requires `href="#"`.*/
|
55
|
+
button.toast-close-button {
|
56
|
+
padding: 0;
|
57
|
+
cursor: pointer;
|
58
|
+
background: transparent;
|
59
|
+
border: 0;
|
60
|
+
-webkit-appearance: none;
|
61
|
+
}
|
62
|
+
.toast-top-full-width {
|
63
|
+
top: 0;
|
64
|
+
right: 0;
|
65
|
+
width: 100%;
|
66
|
+
}
|
67
|
+
.toast-bottom-full-width {
|
68
|
+
bottom: 0;
|
69
|
+
right: 0;
|
70
|
+
width: 100%;
|
71
|
+
}
|
72
|
+
.toast-top-left {
|
73
|
+
top: 12px;
|
74
|
+
left: 12px;
|
75
|
+
}
|
76
|
+
.toast-top-center {
|
77
|
+
top: 12px;
|
78
|
+
}
|
79
|
+
.toast-top-right {
|
80
|
+
top: 12px;
|
81
|
+
right: 12px;
|
82
|
+
}
|
83
|
+
.toast-bottom-right {
|
84
|
+
right: 12px;
|
85
|
+
bottom: 12px;
|
86
|
+
}
|
87
|
+
.toast-bottom-center {
|
88
|
+
bottom: 12px;
|
89
|
+
}
|
90
|
+
.toast-bottom-left {
|
91
|
+
bottom: 12px;
|
92
|
+
left: 12px;
|
93
|
+
}
|
94
|
+
.toast-center {
|
95
|
+
top: 45%;
|
96
|
+
}
|
97
|
+
#toast-container {
|
98
|
+
position: fixed;
|
99
|
+
z-index: 999999;
|
100
|
+
/*overrides*/
|
101
|
+
|
102
|
+
}
|
103
|
+
#toast-container.toast-center,
|
104
|
+
#toast-container.toast-top-center,
|
105
|
+
#toast-container.toast-bottom-center{
|
106
|
+
width: 100%;
|
107
|
+
pointer-events: none;
|
108
|
+
}
|
109
|
+
#toast-container.toast-center > div,
|
110
|
+
#toast-container.toast-top-center > div,
|
111
|
+
#toast-container.toast-bottom-center > div{
|
112
|
+
margin: auto;
|
113
|
+
pointer-events: auto;
|
114
|
+
}
|
115
|
+
#toast-container.toast-center > button,
|
116
|
+
#toast-container.toast-top-cente > button,
|
117
|
+
#toast-container.toast-bottom-center > button{
|
118
|
+
pointer-events: auto;
|
119
|
+
}
|
120
|
+
#toast-container * {
|
121
|
+
-moz-box-sizing: border-box;
|
122
|
+
-webkit-box-sizing: border-box;
|
123
|
+
box-sizing: border-box;
|
124
|
+
}
|
125
|
+
#toast-container > div {
|
126
|
+
margin: 0 0 6px;
|
127
|
+
padding: 15px 15px 15px 50px;
|
128
|
+
width: 300px;
|
129
|
+
-moz-border-radius: 3px 3px 3px 3px;
|
130
|
+
-webkit-border-radius: 3px 3px 3px 3px;
|
131
|
+
border-radius: 3px 3px 3px 3px;
|
132
|
+
background-position: 15px center;
|
133
|
+
background-repeat: no-repeat;
|
134
|
+
-moz-box-shadow: 0 0 12px #999999;
|
135
|
+
-webkit-box-shadow: 0 0 12px #999999;
|
136
|
+
box-shadow: 0 0 12px #999999;
|
137
|
+
color: #ffffff;
|
138
|
+
opacity: 0.8;
|
139
|
+
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
|
140
|
+
filter: alpha(opacity=80);
|
141
|
+
}
|
142
|
+
#toast-container > :hover {
|
143
|
+
-moz-box-shadow: 0 0 12px #000000;
|
144
|
+
-webkit-box-shadow: 0 0 12px #000000;
|
145
|
+
box-shadow: 0 0 12px #000000;
|
146
|
+
opacity: 1;
|
147
|
+
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
|
148
|
+
filter: alpha(opacity=100);
|
149
|
+
cursor: pointer;
|
150
|
+
}
|
151
|
+
#toast-container > .toast-info {
|
152
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important;
|
153
|
+
}
|
154
|
+
#toast-container > .toast-wait {
|
155
|
+
background-image: url("data:image/gif;base64,R0lGODlhIAAgAIQAAAQCBISGhMzKzERCROTm5CQiJKyurHx+fPz+/ExOTOzu7Dw+PIyOjCwqLFRWVAwKDIyKjMzOzOzq7CQmJLy6vFRSVPTy9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCQAXACwAAAAAIAAgAAAF3eAljmRpnmh6VRSVqLDpIDTixOdUlFSNUDhSQUAT7ES9GnD0SFQAKWItMqr4bqKHVPDI+WiTkaOFFVlrFe83rDrT0qeI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yNLy6vBQWFHRydDw6PPz+/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXXICaOZHkcZaquIjVd10SxtFrAcFGrVhBYIwoON9uNAsOA6DCEFTEKBEKxEjQvAtELNxkpGrAGNfW4Plpb2QgxRKjKzfPoVGLj3CnLNUv7hscpSDhKOxJSgDwPP0ZGAACMjAQFDQYFBJA0BAZDBpeYGBQVFUU3TV2YFAMwAzNgTQ2PkBVDFRiuQ7CYszi1pUOnkKmrM5qcnqiiTwQTDQ2Wn9DR0tPUfRKQEBEREDQSFw3XRhEwEd3f4TvjF+XWKgJ8JNnb0QkwCdUlCzAL+CQODAwc9BtIMAQAOw==") !important;
|
156
|
+
}
|
157
|
+
#toast-container > .toast-error {
|
158
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important;
|
159
|
+
}
|
160
|
+
#toast-container > .toast-success {
|
161
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important;
|
162
|
+
}
|
163
|
+
#toast-container > .toast-warning {
|
164
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important;
|
165
|
+
}
|
166
|
+
#toast-container.toast-top-full-width > div,
|
167
|
+
#toast-container.toast-bottom-full-width > div {
|
168
|
+
width: 96%;
|
169
|
+
margin: auto;
|
170
|
+
}
|
171
|
+
.toast {
|
172
|
+
background-color: #030303;
|
173
|
+
}
|
174
|
+
.toast-success {
|
175
|
+
background-color: #51a351;
|
176
|
+
}
|
177
|
+
.toast-error {
|
178
|
+
background-color: #bd362f;
|
179
|
+
}
|
180
|
+
.toast-info {
|
181
|
+
background-color: #2f96b4;
|
182
|
+
}
|
183
|
+
.toast-wait {
|
184
|
+
background-color: #2f96b4;
|
185
|
+
}
|
186
|
+
.toast-warning {
|
187
|
+
background-color: #f89406;
|
188
|
+
}
|
189
|
+
/*Responsive Design*/
|
190
|
+
@media all and (max-width: 240px) {
|
191
|
+
#toast-container > div {
|
192
|
+
padding: 8px 8px 8px 50px;
|
193
|
+
width: 11em;
|
194
|
+
}
|
195
|
+
#toast-container .toast-close-button {
|
196
|
+
right: -0.2em;
|
197
|
+
top: -0.2em;
|
198
|
+
}
|
199
|
+
}
|
200
|
+
@media all and (min-width: 241px) and (max-width: 480px) {
|
201
|
+
#toast-container > div {
|
202
|
+
padding: 8px 8px 8px 50px;
|
203
|
+
width: 18em;
|
204
|
+
}
|
205
|
+
#toast-container .toast-close-button {
|
206
|
+
right: -0.2em;
|
207
|
+
top: -0.2em;
|
208
|
+
}
|
209
|
+
}
|
210
|
+
@media all and (min-width: 481px) and (max-width: 768px) {
|
211
|
+
#toast-container > div {
|
212
|
+
padding: 15px 15px 15px 50px;
|
213
|
+
width: 25em;
|
214
|
+
}
|
215
|
+
}
|
216
|
+
|
217
|
+
/*
|
218
|
+
* AngularJS-Toaster
|
219
|
+
* Version 0.3
|
220
|
+
*/
|
221
|
+
:not(.no-enter)#toast-container > div.ng-enter,
|
222
|
+
:not(.no-leave)#toast-container > div.ng-leave
|
223
|
+
{
|
224
|
+
-webkit-transition: 1000ms cubic-bezier(0.250, 0.250, 0.750, 0.750) all;
|
225
|
+
-moz-transition: 1000ms cubic-bezier(0.250, 0.250, 0.750, 0.750) all;
|
226
|
+
-ms-transition: 1000ms cubic-bezier(0.250, 0.250, 0.750, 0.750) all;
|
227
|
+
-o-transition: 1000ms cubic-bezier(0.250, 0.250, 0.750, 0.750) all;
|
228
|
+
transition: 1000ms cubic-bezier(0.250, 0.250, 0.750, 0.750) all;
|
229
|
+
}
|
230
|
+
|
231
|
+
:not(.no-enter)#toast-container > div.ng-enter.ng-enter-active,
|
232
|
+
:not(.no-leave)#toast-container > div.ng-leave {
|
233
|
+
opacity: 0.8;
|
234
|
+
}
|
235
|
+
|
236
|
+
:not(.no-leave)#toast-container > div.ng-leave.ng-leave-active,
|
237
|
+
:not(.no-enter)#toast-container > div.ng-enter {
|
238
|
+
opacity: 0;
|
239
|
+
}
|
metadata
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ng-toaster-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.4.10.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- fdibartolo
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-02-19 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: 'Rails engine for jirikavi/AngularJS-Toaster: "AngularJS Toaster is a
|
14
|
+
customized version of "toastr" non-blocking notification javascript library"'
|
15
|
+
email:
|
16
|
+
- fernando.di.bartolo@gmail.com
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- .gitignore
|
22
|
+
- Gemfile
|
23
|
+
- LICENSE
|
24
|
+
- README.md
|
25
|
+
- Rakefile
|
26
|
+
- lib/generators/ng-toaster/install/install_generator.rb
|
27
|
+
- lib/ng-toaster-rails.rb
|
28
|
+
- lib/ng-toaster-rails/engine.rb
|
29
|
+
- lib/ng-toaster-rails/version.rb
|
30
|
+
- ng-toaster-rails.gemspec
|
31
|
+
- vendor/assets/javascripts/toaster.js
|
32
|
+
- vendor/assets/stylesheets/toaster.css
|
33
|
+
homepage: https://github.com/fdibartolo/ng-toaster-rails
|
34
|
+
licenses:
|
35
|
+
- MIT
|
36
|
+
metadata: {}
|
37
|
+
post_install_message:
|
38
|
+
rdoc_options: []
|
39
|
+
require_paths:
|
40
|
+
- lib
|
41
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
42
|
+
requirements:
|
43
|
+
- - '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - '>='
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '0'
|
51
|
+
requirements: []
|
52
|
+
rubyforge_project:
|
53
|
+
rubygems_version: 2.1.8
|
54
|
+
signing_key:
|
55
|
+
specification_version: 4
|
56
|
+
summary: Rails engine for jirikavi/AngularJS-Toaster
|
57
|
+
test_files: []
|