SrBuj 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +1 -1
- data/lib/SrBuj/version.rb +1 -1
- data/lib/assets/javascripts/SrBuj.js +9 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NGE1ZTk5OTFiZGU2YjM0MDJkYjBjNGQ5ZTBlNjE0ODgwODNhOGNiOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Y2UxMWUwNDgwMmM5OTdiYjIxOTg4N2YyNmNiOGQyNmM2ZjRhYzdkNA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTMwNTMwMDY4ZDhmZDI2YjI1OWFmZTcyYmMxN2M2ZTY2YTI2YzhiYTNiOTZi
|
10
|
+
YmQ0ZDQ5NWU3MDkzOTNlNjdlMzMwZTNjYzY2ODVkNjhhMGY5YmE5ZjQ5MmRm
|
11
|
+
MDdiNDIyZGUwNTRiY2NjMjY3ZTRhMTE1NDhiMzkzMzQ5YmI1ZjM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Y2Q5N2U5OTMwNjkzYzQ4ZDlmYWZlYzUwYjhiZjhlOTYyNjg0MTVkMWFhOTRm
|
14
|
+
YWYzYWIyNGMzZGMxOTE0NzA1ZDJmYjA5NzliNTdmNTYzZmNlMWQyNTc3YjJk
|
15
|
+
MzM5MzlkMjgxZWM2Y2RjNzQyMjU0MDc0YWZhYWRkOTY0NGZlNmY=
|
data/README.md
CHANGED
@@ -72,7 +72,7 @@ Use and Options
|
|
72
72
|
- callback(data[callback]) = after a successeded request, call this function.
|
73
73
|
- data[custom] = just proxy the response to my custom function in callback, nothing more.
|
74
74
|
- jqueryselector(data[jqueryselector]): Change the data[target] & data[error] for selectors in jquery and find the element!
|
75
|
-
|
75
|
+
- respond-as(data[respond-as]): We can alter the respond behavior without careing the method used on the request. values: GET/POST/PUT/PATCH/DELETE
|
76
76
|
You can use it with any element available. (links forms tables divs anything).
|
77
77
|
|
78
78
|
Example
|
data/lib/SrBuj/version.rb
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
};
|
14
14
|
var SrBuj;
|
15
15
|
$.SrBuj = SrBuj = {
|
16
|
-
version: '0.
|
16
|
+
version: '0.6.0',
|
17
17
|
selector: '[data-remote][data-target]',
|
18
18
|
defaults: {
|
19
19
|
'$el': undefined,
|
@@ -47,13 +47,17 @@
|
|
47
47
|
|
48
48
|
},
|
49
49
|
getVerb: function($el){
|
50
|
-
var
|
50
|
+
var respond_as = $el.data('respond-as'),
|
51
|
+
dataVerb = $el.data('method'),
|
51
52
|
replace = $el.data('replace'),
|
52
53
|
proto = $el.attr('method');
|
53
|
-
if(
|
54
|
-
|
54
|
+
if (respond_as)
|
55
|
+
return respond_as.toUpperCase();
|
55
56
|
else
|
56
|
-
if
|
57
|
+
if( dataVerb )
|
58
|
+
return dataVerb.toUpperCase();
|
59
|
+
else
|
60
|
+
if (proto) return replace ? 'PUT' : proto.toUpperCase();
|
57
61
|
},
|
58
62
|
getOptions: function(el, user_options){
|
59
63
|
var options = {},
|
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.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gagoar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-04-
|
11
|
+
date: 2013-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|