SrBuj 0.9.0alpha3 → 0.9.0alpha4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDc2MmRiNTJjNjM5NGM4OWVhYjc2Njk3NGQ1MWQ4YmRiZDRmYzlhYw==
4
+ MzM0MmI5ZGM2ZWUwMTlmMTdkZjVlZTYwNGQxZTNlMjUxMTIzNTU0Mg==
5
5
  data.tar.gz: !binary |-
6
- OWI4NjM0YjM0MTUzYmVjMGM4NmNhYjExMjAyMGI0ZDJkMGFhMmQ5Yg==
6
+ M2E4YjcxNDUxYTUzN2I5NTY5NmNlZWUxMTNhNjZmN2VkNGI4ZmFhOQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NTE5OWIyNTExMTA3YTAwMmRkZGVhNjI5ZDJmNjJmYmEyZDYzYzIyNTdkZTA0
10
- NjdjYmEzNDFhMDVkOTczM2U0NTRiNGY4Y2QzNWU4NGIyMzc3ZmU3Y2FmMWUz
11
- OGNlMjc2NzgyZmJlYzljZTc1YjFkNTg5ZWNiM2ZiYmI4ODc4Y2E=
9
+ MjY3NzhmYjQzZTA4MmVmYTU4YjRhNWVkOGFjZWZhOGJmOGE3YmZjNzVkNTM5
10
+ Nzg2OWY1NGE4YzQ2NzlhNDI5NWIxZGU3ODhjZTRjYTQ4ZWYwYWEzMjk5OThi
11
+ MmE0ZDUyMDQwYjFmNWE4ZWQyNmRiMjMwNTc1NGMxNjMyMGQ1ZGQ=
12
12
  data.tar.gz: !binary |-
13
- NTY4NThkNGEwNzBhYjgxODQ2MmYxZjk4Zjk0ZDNlZmQ2MjdlZGE5YmI2OTE2
14
- MGJiMDY1MDFhMGM1YmU5NGQ1OGY5NDdmYzQwMTE1NmEwYmI3ZDcxOGVjZGZk
15
- Y2RkMWM4NTRiNjI1NThhNjA4ZjQ3NjY1NjkwZTViMDIzZjY3MDc=
13
+ ODEyN2FmNDJlM2JiZGViMTNiZmYyZDBkNzg5MWIzMDU0ZThlYTMwNmVhMWE0
14
+ MzRiYTRmNDc0OGQxMWM0OTRhZTJlMWE3ZWIwMmMyODllMjkxMmYwZWMxNjM4
15
+ ZTJhZmJjODYzMDE5ZWVjNTMzYWM5NWY1MzUyY2NkNWRjYjVkYmE=
@@ -1,3 +1,3 @@
1
1
  module SrBuj
2
- VERSION = '0.9.0alpha3'
2
+ VERSION = '0.9.0alpha4'
3
3
  end
@@ -19,7 +19,7 @@
19
19
  };
20
20
  var SrBuj;
21
21
  $.SrBuj = SrBuj = {
22
- version: '0.9.0alpha3',
22
+ version: '0.9.0alpha4',
23
23
  selector: '[data-remote][data-target]',
24
24
  notifyHeaders: { message: 'X-SRBUJ-MSG', type: 'X-SRBUJ-TYPE', side: 'X-SRBUJ-SIDE', position: 'X-SRBUJ-POS', time: 'X-SRBUJ-TIME' },
25
25
  defaults: {
@@ -194,24 +194,23 @@
194
194
  * <s id=_growlingMsg class=info>This is Madness</s>
195
195
  */
196
196
  var options = options || {};
197
- if( options.message ){
198
- var _growlingMsg = document.createElement('s');
199
- _growlingMsg.id = '_growlingMsg';
197
+ if ($.SrBuj.gMsg_interval){ window.clearInterval($.SrBuj.gMsg_interval) }
198
+ var gMsg = document.getElementById('_growlingMsg')|| document.createElement('s');
199
+ gMsg.id = '_growlingMsg';
200
200
  if ( options.type ){
201
- _growlingMsg.className = (/^(info|warning|error)$/).test( options.type ) ?
201
+ gMsg.className = (/^(info|warning|error)$/).test( options.type ) ?
202
202
  ['alert', '-' , options.type ].join('') : options.type;
203
203
  }else{
204
- _growlingMsg.className = 'alert-info';
204
+ gMsg.className = 'alert-info';
205
205
  }
206
- _growlingMsg.textContent = options.message;
207
- $('body').append(_growlingMsg);
208
- _growlingMsg.className += [' alert', options.side || 'right', options.position || 'bottom', 'srbuj-notify' ].join(' ').toLowerCase();
206
+ gMsg.textContent = options.message;
207
+ $('body').append(gMsg);
208
+ gMsg.className += [' alert', options.side || 'right', options.position || 'bottom', 'srbuj-notify' ].join(' ').toLowerCase();
209
209
  options.time = Number( options.time ) > 0 ? options.time : 2000;
210
- setInterval($.SrBuj.Util.removeNotify, options.time);
211
- }
210
+ $.SrBuj.gMsg_interval = window.setInterval( $.SrBuj.Util.removeNotify, options.time );
212
211
  },
213
212
  removeNotify: function(){
214
- $('#_growlingMsg').remove();
213
+ $('#_growlingMsg').removeClass('srbuj-notify');
215
214
  },
216
215
  link: function (user_options){
217
216
  /* This function will create a link with options, trigger it and remove the link afterwards
@@ -21,7 +21,7 @@ s#_growlingMsg{
21
21
  display: block;
22
22
  position: fixed;
23
23
  margin: 0;
24
- z-index: 1000;
24
+ z-index: 10000;
25
25
  text-decoration: none;
26
26
  }
27
27
  s#_growlingMsg.srbuj-notify{
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: SrBuj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0alpha3
4
+ version: 0.9.0alpha4
5
5
  platform: ruby
6
6
  authors:
7
7
  - gagoar