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 +8 -8
- data/lib/SrBuj/version.rb +1 -1
- data/lib/assets/javascripts/SrBuj.js +11 -12
- data/lib/assets/stylesheets/SrBuj.css +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzM0MmI5ZGM2ZWUwMTlmMTdkZjVlZTYwNGQxZTNlMjUxMTIzNTU0Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
M2E4YjcxNDUxYTUzN2I5NTY5NmNlZWUxMTNhNjZmN2VkNGI4ZmFhOQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjY3NzhmYjQzZTA4MmVmYTU4YjRhNWVkOGFjZWZhOGJmOGE3YmZjNzVkNTM5
|
10
|
+
Nzg2OWY1NGE4YzQ2NzlhNDI5NWIxZGU3ODhjZTRjYTQ4ZWYwYWEzMjk5OThi
|
11
|
+
MmE0ZDUyMDQwYjFmNWE4ZWQyNmRiMjMwNTc1NGMxNjMyMGQ1ZGQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODEyN2FmNDJlM2JiZGViMTNiZmYyZDBkNzg5MWIzMDU0ZThlYTMwNmVhMWE0
|
14
|
+
MzRiYTRmNDc0OGQxMWM0OTRhZTJlMWE3ZWIwMmMyODllMjkxMmYwZWMxNjM4
|
15
|
+
ZTJhZmJjODYzMDE5ZWVjNTMzYWM5NWY1MzUyY2NkNWRjYjVkYmE=
|
data/lib/SrBuj/version.rb
CHANGED
@@ -19,7 +19,7 @@
|
|
19
19
|
};
|
20
20
|
var SrBuj;
|
21
21
|
$.SrBuj = SrBuj = {
|
22
|
-
version: '0.9.
|
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
|
-
|
198
|
-
var
|
199
|
-
|
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
|
-
|
201
|
+
gMsg.className = (/^(info|warning|error)$/).test( options.type ) ?
|
202
202
|
['alert', '-' , options.type ].join('') : options.type;
|
203
203
|
}else{
|
204
|
-
|
204
|
+
gMsg.className = 'alert-info';
|
205
205
|
}
|
206
|
-
|
207
|
-
$('body').append(
|
208
|
-
|
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').
|
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
|