SrBuj 0.5.2 → 0.5.3
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 +14 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjA1ZjZhYjIyYTRiYTEzZDgyMTg5ZjUyOTEwNGJhNzY0NjU5OGEzMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzJkMWIzMGE5Zjc3YTA2YzZjZTg1ZjBiMjUwOTViYWNjZWQzYTA1Nw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzFiZjZhMjc3MmYzYWNlZTQ1Y2E0N2M4YjQwN2Q3MWQxYzhhYjY3NDUwOThm
|
10
|
+
YTZlZTJiZmVmZTg1ZDVkMzBkNDI2OTAzYTk2NDg5MWRmZmZhMjk4NzliMzdh
|
11
|
+
OGYxZTFkZjM2NTVhYTJlOTA5MTA3MTdiNzRiMjQ1NGI0MGQzNTU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZGI5ZjhhOTg5NGYyZjBkNDkxMDAyMmJhZmFhNTk4ZDM3MDJhZGQ1ODM2OWNh
|
14
|
+
MDYzNzYwYzgzMDRiMWViMmZiMDZmZjFjZjJkMDA2YmZkMDE5YjQ4OTQ4NDYy
|
15
|
+
ZWI5ZGVkZmI4MWY0NDBhMTEzNTA1NjIzNGVlYjY1YzYxOTgxMTM=
|
data/lib/SrBuj/version.rb
CHANGED
@@ -13,6 +13,7 @@
|
|
13
13
|
};
|
14
14
|
var SrBuj;
|
15
15
|
$.SrBuj = SrBuj = {
|
16
|
+
version: '0.5.3',
|
16
17
|
selector: '[data-remote][data-target]',
|
17
18
|
defaults: {
|
18
19
|
'$el': undefined,
|
@@ -81,19 +82,22 @@
|
|
81
82
|
$el = options['$el'],
|
82
83
|
$target = options['jqueryselector'] ? $(options['target']).present() : $(document.getElementById(options['target'])) ,
|
83
84
|
$wrapper = options['jqueryselector'] ? $(options['wrapper']) : $(document.getElementById(options['wrapper']));
|
84
|
-
|
85
|
-
|
86
|
-
if(options['
|
87
|
-
|
88
|
-
|
85
|
+
if($target.present()){
|
86
|
+
e.stopPropagation();
|
87
|
+
if(!options['custom']){
|
88
|
+
if(options['change'])
|
89
|
+
$.SrBuj.changeDom(options['method'],$target,data);
|
90
|
+
if(options['modal'])
|
89
91
|
options['wrapper'] ? $wrapper.modal('toggle') : $target.modal('toggle');
|
90
|
-
|
91
|
-
|
92
|
-
|
92
|
+
}
|
93
|
+
if(options['callback'])
|
94
|
+
callback = (typeof options['callback'] == 'function') ? options['callback'] : window[options['callback']],
|
93
95
|
callback.apply(this,[e, data, status]);
|
96
|
+
}
|
94
97
|
},
|
95
98
|
fail: function(e, data, status, user_options){
|
96
|
-
|
99
|
+
e.stopPropagation();
|
100
|
+
var $el = $(e.target).present(),
|
97
101
|
error = $el.data('error'),
|
98
102
|
jqueryselector = $el.data('jqueryselector'),
|
99
103
|
$error = jqueryselector ? $(error) :$(document.getElementById(error));
|
@@ -101,7 +105,7 @@
|
|
101
105
|
$.SrBuj.changeDom('ERROR', $error, data.responseText);
|
102
106
|
}
|
103
107
|
else
|
104
|
-
throw 'cant find data-error on element';
|
108
|
+
throw 'cant find data-error on element' + e.target;
|
105
109
|
},
|
106
110
|
bind: function(selector){
|
107
111
|
var selector = selector || this.selector;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: SrBuj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gagoar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|