ultimate-flash 0.6.0 → 0.6.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.
data/Gemfile.lock CHANGED
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ultimate-flash (0.6.0)
4
+ ultimate-flash (0.6.1)
5
5
  ultimate-base (~> 0.2)
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
- ultimate-base (0.2.4)
10
+ ultimate-base (0.3.1)
11
11
 
12
12
  PLATFORMS
13
13
  ruby
@@ -1,5 +1,5 @@
1
1
  ###*
2
- * Ultimate Flash 0.6.0 - Ruby on Rails oriented jQuery plugin based on Ultimate Backbone
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/backbone/view
36
- #= require ultimate/backbone/extra/jquery-plugin-adapter
35
+ #= require ultimate/jquery-plugin-class
36
+ #= require ultimate/jquery-plugin-adapter
37
37
 
38
- Ultimate.Backbone.Plugins ||= {}
38
+ Ultimate.Plugins ||= {}
39
39
 
40
- class Ultimate.Backbone.Plugins.Flash extends Ultimate.Backbone.View
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.Backbone.debug ".Plugins.Flash.ajaxError", a
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.Backbone.debug ".Plugins.Flash.ajaxSuccess", a
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 = args(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.Backbone.debug "replace thrownError = \"#{thrownError}\" with raiseMatches[1] = \"#{raiseMatches[1]}\""
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.Backbone.debug "replace thrownError = \"#{thrownError}\" with jqXHR.responseText = \"#{jqXHR.responseText}\""
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.Backbone.debug "replace thrownError = \"#{thrownError}\" with @translations.defaultThrownError = \"#{@translations.defaultThrownError}\""
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.Backbone.createJQueryPlugin "ultimateFlash", Ultimate.Backbone.Plugins.Flash
235
+ Ultimate.createJQueryPlugin "ultimateFlash", Ultimate.Plugins.Flash
@@ -1,3 +1,12 @@
1
+ // Usage:
2
+ // .l-page__flashes {
3
+ // @include ultimate-flash($background-alpha: 0.7);
4
+ // @include font_custom;
5
+ // > .flash {
6
+ // &.custom-type { }
7
+ // }
8
+ // }
9
+
1
10
  @mixin ultimate-flash(
2
11
  $notice-background: #393,
3
12
  $notice-border-color: #6c6,
@@ -1,5 +1,5 @@
1
1
  module Ultimate
2
2
  module Flash
3
- VERSION = "0.6.0"
3
+ VERSION = "0.6.1"
4
4
  end
5
5
  end
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.0
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-08-17 00:00:00.000000000 Z
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: &17170900 !ruby/object:Gem::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: *17170900
24
+ version_requirements: *22612840
25
25
  description: Ruby on Rails oriented jQuery plugin for smart notifications
26
26
  email:
27
27
  - koderfunk@gmail.com