ultimate-flash 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
###*
|
2
|
-
* Ultimate Flash 0.6.
|
2
|
+
* Ultimate Flash 0.6.1 - Ruby on Rails oriented jQuery plugin
|
3
3
|
*
|
4
4
|
* Copyright 2011-2012 Karpunin Dmitry (KODer) / Evrone.com
|
5
5
|
*
|
@@ -32,12 +32,12 @@
|
|
32
32
|
# TODO improve English
|
33
33
|
# TODO jGrowl features
|
34
34
|
|
35
|
-
#= require ultimate/
|
36
|
-
#= require ultimate/
|
35
|
+
#= require ultimate/jquery-plugin-class
|
36
|
+
#= require ultimate/jquery-plugin-adapter
|
37
37
|
|
38
|
-
Ultimate.
|
38
|
+
Ultimate.Plugins ||= {}
|
39
39
|
|
40
|
-
class Ultimate.
|
40
|
+
class Ultimate.Plugins.Flash extends Ultimate.Plugin
|
41
41
|
|
42
42
|
el: ".l-page__flashes"
|
43
43
|
|
@@ -79,13 +79,13 @@ class Ultimate.Backbone.Plugins.Flash extends Ultimate.Backbone.View
|
|
79
79
|
@$el.ajaxError =>
|
80
80
|
if @showAjaxErrors
|
81
81
|
a = @_ajaxSuccessParseArguments(arguments)
|
82
|
-
Ultimate.
|
82
|
+
Ultimate.debug(".Plugins.Flash.ajaxError", a) if _.isFunction(Ultimate.debug)
|
83
83
|
@ajaxError a.data, a.jqXHR
|
84
84
|
# binding hook ajaxSuccess handler
|
85
85
|
@$el.ajaxSuccess =>
|
86
86
|
if @showAjaxSuccesses
|
87
87
|
a = @_ajaxSuccessParseArguments(arguments)
|
88
|
-
Ultimate.
|
88
|
+
Ultimate.debug(".Plugins.Flash.ajaxSuccess", a) if _.isFunction(Ultimate.debug)
|
89
89
|
@ajaxSuccess a.data, a.jqXHR
|
90
90
|
|
91
91
|
# delegate event for hide on click
|
@@ -143,7 +143,7 @@ class Ultimate.Backbone.Plugins.Flash extends Ultimate.Backbone.View
|
|
143
143
|
# detect event as first element
|
144
144
|
if successArgs[0] instanceof jQuery.Event
|
145
145
|
# convert arguments to Array
|
146
|
-
successArgs =
|
146
|
+
successArgs = _.toArray(successArgs)
|
147
147
|
# remove event
|
148
148
|
successArgs.shift()
|
149
149
|
# arrange arguments
|
@@ -215,16 +215,16 @@ class Ultimate.Backbone.Plugins.Flash extends Ultimate.Backbone.View
|
|
215
215
|
if jqXHR.status >= 400 and jqXHR.responseText
|
216
216
|
# try detect Rails raise message
|
217
217
|
if raiseMatches = jqXHR.responseText.match(/<\/h1>\n<pre>(.+?)<\/pre>/)
|
218
|
-
Ultimate.
|
218
|
+
Ultimate.debug("replace thrownError = \"#{thrownError}\" with raiseMatches[1] = \"#{raiseMatches[1]}\"") if _.isFunction(Ultimate.debug)
|
219
219
|
thrownError = raiseMatches[1]
|
220
220
|
else
|
221
221
|
# try detect short text message as error
|
222
222
|
if jqXHR.responseText.length <= @detectPlainTextMaxLength
|
223
|
-
Ultimate.
|
223
|
+
Ultimate.debug("replace thrownError = \"#{thrownError}\" with jqXHR.responseText = \"#{jqXHR.responseText}\"") if _.isFunction(Ultimate.debug)
|
224
224
|
thrownError = jqXHR.responseText
|
225
225
|
else
|
226
226
|
if _.isString(thrownError) and not _.isBlank(thrownError)
|
227
|
-
Ultimate.
|
227
|
+
Ultimate.debug("replace thrownError = \"#{thrownError}\" with @translations.defaultThrownError = \"#{@translations.defaultThrownError}\"") if _.isFunction(Ultimate.debug)
|
228
228
|
thrownError = @translations.defaultThrownError
|
229
229
|
text += ": " if text
|
230
230
|
text += "#{thrownError} [#{jqXHR.status}]"
|
@@ -232,4 +232,4 @@ class Ultimate.Backbone.Plugins.Flash extends Ultimate.Backbone.View
|
|
232
232
|
|
233
233
|
|
234
234
|
|
235
|
-
Ultimate.
|
235
|
+
Ultimate.createJQueryPlugin "ultimateFlash", Ultimate.Plugins.Flash
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ultimate-flash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-09-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ultimate-base
|
16
|
-
requirement: &
|
16
|
+
requirement: &22612840 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0.2'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *22612840
|
25
25
|
description: Ruby on Rails oriented jQuery plugin for smart notifications
|
26
26
|
email:
|
27
27
|
- koderfunk@gmail.com
|