humane-rails 2.7.1.0.1.1 → 2.8.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.
@@ -1,3 +1,3 @@
1
1
  module HumaneRails
2
- VERSION = "2.7.1.0.1.1"
2
+ VERSION = "2.8.0.0.1.1"
3
3
  end
@@ -39,7 +39,7 @@
39
39
  }
40
40
 
41
41
  function getConfig(type, config) {
42
- return win.humane[type][config] !== void 0 ? win.humane[type][config] : win.humane[config];
42
+ return currentMessage.instance[config] !== void 0 ? currentMessage.instance[config] : win.humane[config];
43
43
  }
44
44
 
45
45
  on (win,'load', setup);
@@ -72,7 +72,7 @@
72
72
  }
73
73
 
74
74
  var next = queue.shift();
75
- currentMessage = { type: next[0], message: next[1], callback: next[2] };
75
+ currentMessage = { type: next[0], message: next[1], instance: next[2], callback: next[3] };
76
76
  var content = currentMessage.message,
77
77
  type = currentMessage.type;
78
78
 
@@ -141,7 +141,7 @@
141
141
  ? function (opacity) { humaneEl.filters.item('DXImageTransform.Microsoft.Alpha').Opacity = opacity*100; }
142
142
  : function (opacity) { humaneEl.style.opacity = String(opacity); }
143
143
 
144
- function jsAnimateOpacity (level,type) {
144
+ function jsAnimateOpacity (level, type) {
145
145
  var interval;
146
146
  var opacity;
147
147
 
@@ -181,9 +181,9 @@
181
181
  }
182
182
 
183
183
  function notifier (type) {
184
- return function (message, cb) {
185
- queue.push( [type, message, cb] );
186
- events['add'](type,message,'add');
184
+ return function instance (message, cb) {
185
+ queue.push( [type, message, instance, cb] );
186
+ events['add'](type, message, 'add');
187
187
  if (isSetup) run();
188
188
  }
189
189
  }
@@ -196,6 +196,14 @@
196
196
  humane.success = notifier('success');
197
197
  humane.remove = remove;
198
198
 
199
+ humane.create = function (options) {
200
+ var type = notifier(options.type || 'log');
201
+ type.timeout = options.timeout || 2500;
202
+ type.waitForMove = options.waitForMove || false;
203
+ type.clickToClose = options.clickToClose || false;
204
+ return type;
205
+ }
206
+
199
207
  // options
200
208
  humane.timeout = 2500;
201
209
  humane.waitForMove = false;
@@ -10,6 +10,7 @@ body {
10
10
  -o-transition: all 0.3s ease-out;
11
11
  transition: all 0.3s ease-out;
12
12
  z-index: 100000;
13
+ display: none;
13
14
  }
14
15
  .humane {
15
16
  font-family: Ubuntu, Verdana, sans-serif;
@@ -10,6 +10,7 @@ body {
10
10
  -o-transition: all 0.3s ease-out;
11
11
  transition: all 0.3s ease-out;
12
12
  z-index: 100000;
13
+ display: none;
13
14
  }
14
15
  .humane {
15
16
  font-family: Ubuntu, Verdana, sans-serif;
@@ -10,6 +10,7 @@ body {
10
10
  -o-transition: all 0.6s ease-in-out;
11
11
  transition: all 0.6s ease-in-out;
12
12
  z-index: 100000;
13
+ display: none;
13
14
  }
14
15
  .humane {
15
16
  font-family: Helvetica Neue, Helvetica, san-serif;
@@ -10,6 +10,7 @@ body {
10
10
  -o-transition: all 0.3s ease-out;
11
11
  transition: all 0.3s ease-out;
12
12
  z-index: 100000;
13
+ display: none;
13
14
  }
14
15
  .humane {
15
16
  font-family: Ubuntu, Arial, sans-serif;
@@ -10,6 +10,7 @@ body {
10
10
  -o-transition: all 0.2s ease-out;
11
11
  transition: all 0.2s ease-out;
12
12
  z-index: 100000;
13
+ display: none;
13
14
  }
14
15
  .humane {
15
16
  font-family: Ubuntu, Verdana, sans-serif;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: humane-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.1.0.1.1
4
+ version: 2.8.0.0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-08 00:00:00.000000000 Z
12
+ date: 2012-03-22 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A gemified version of Marc Harter's humane-js.
15
15
  email:
@@ -46,12 +46,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
46
46
  - - ! '>='
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
+ segments:
50
+ - 0
51
+ hash: -4419876461642728285
49
52
  required_rubygems_version: !ruby/object:Gem::Requirement
50
53
  none: false
51
54
  requirements:
52
55
  - - ! '>='
53
56
  - !ruby/object:Gem::Version
54
57
  version: '0'
58
+ segments:
59
+ - 0
60
+ hash: -4419876461642728285
55
61
  requirements: []
56
62
  rubyforge_project: humane-rails
57
63
  rubygems_version: 1.8.11
@@ -59,4 +65,3 @@ signing_key:
59
65
  specification_version: 3
60
66
  summary: A gemified version of Marc Harter's humane-js.
61
67
  test_files: []
62
- has_rdoc: