kadmin 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/kadmin/select2.js +2 -2
- data/lib/kadmin/presenter.rb +11 -0
- data/lib/kadmin/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b0ddcea024bf2bca89931a5c5514aa6dacc092c
|
4
|
+
data.tar.gz: af07f000396fada0a9e66db94f1019a7d0b6fa6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3858f2768f2bf50eb5bcbb5a41226c8b3c49962f17ccb562e0bf7fbb205736005f1e55ade5919489ba584f43f8aa8c951f6cad46dfb8eaec72f03da0389a2fa6
|
7
|
+
data.tar.gz: '09cf4b1d2d340547f9fe135846462f71a23742cfbc488cf8257e16e61182dd5629a4e078ee638da66e069e1e10a821740db11bf4e46cabc3eea36343c0762228'
|
@@ -12,11 +12,11 @@ jQuery(document).ready(function() {
|
|
12
12
|
jQuery.fn.select2.defaults.set("allowClear", true);
|
13
13
|
|
14
14
|
function transformRequest(params) {
|
15
|
-
var page = params.page ||
|
15
|
+
var page = params.page || 1;
|
16
16
|
var page_size = this.data("kadmin--page-size") || 10;
|
17
17
|
var filter_param = this.data("kadmin--filter-param") || null;
|
18
18
|
var options = {
|
19
|
-
page_offset: page * page_size,
|
19
|
+
page_offset: (page - 1) * page_size,
|
20
20
|
page_size: page_size
|
21
21
|
};
|
22
22
|
|
data/lib/kadmin/presenter.rb
CHANGED
@@ -30,6 +30,17 @@ module Kadmin
|
|
30
30
|
return rendered
|
31
31
|
end
|
32
32
|
|
33
|
+
# Updates the context of the presenter with the given view
|
34
|
+
# This is mostly to provide a consistent interface between
|
35
|
+
# Presentable and Presenter, so you don't have to check if you should
|
36
|
+
# present something or not.
|
37
|
+
# @param [ActiveView::Base] view render in a different view
|
38
|
+
# @return [self] returns itself, as it is already presented
|
39
|
+
def present(view)
|
40
|
+
@view = view
|
41
|
+
return self
|
42
|
+
end
|
43
|
+
|
33
44
|
protected
|
34
45
|
|
35
46
|
# Generates the representation of the wrapped object.
|
data/lib/kadmin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kadmin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolas Pepin-Perreault
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-09-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|