smart_listing 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ce2c7ca9fc4d41156fec07c92a1c9cca87c31d49
4
- data.tar.gz: 77aa5bdd86f016a2252c0e42c2fd2fc68e981b28
3
+ metadata.gz: 1ec44fc0c5fafd591a4980ce79662010683d707d
4
+ data.tar.gz: dbd5d450845dd1910e63f7e8e251070632d91edd
5
5
  SHA512:
6
- metadata.gz: 6383baf287499b38bf6c4216c52883ce29b223d4168f57f700f2e89d1cb11936232d13e6c0895622d8cb86fd3e64b5b839255097c810afdaf2b0d2bd04832adf
7
- data.tar.gz: cfc2fd5a53332a3546e26f70b2f72943392989e7828bf2a5b4843a28639b42b0789d21d1ddd923e4a9028c7ad4e07f0b36e8beeb16cbcdf8d5fe2d35a642d05d
6
+ metadata.gz: dc49ee300e56d870674b49ca922d24771f0bafefa87ef36497450019f31276bf9be99360f24c4e577e38b732361653c7d62a150ce9f78175be7178206bdf4d9e
7
+ data.tar.gz: 8abbb0b78f672f177234356bd54f626a7c0afd679563cdd6fd463d70c24f2841b23abf73e157d491963c72413ebfce6041c1aa698b23fb882c74236fdce4f980
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- smart_listing
1
+ SmartListing
2
2
  ==========
3
3
 
4
- Smart listing utility gem
4
+ SmartListing helps creating sortable lists of ActiveRecord collections with pagination, filtering and inline editing.
@@ -60,7 +60,7 @@ class SmartListing
60
60
  )
61
61
  )
62
62
 
63
- @container.on 'ajax:before', () =>
63
+ @container.on 'ajax:before', (e) =>
64
64
  @fadeLoading()
65
65
 
66
66
  @container.on 'ajax:success', (e) =>
@@ -292,17 +292,14 @@ $.fn.handleSmartListingFilter = () ->
292
292
 
293
293
  field.observeField(
294
294
  onFilled: ->
295
- console.log('onfilled')
296
295
  icon.removeClass('icon-search')
297
296
  icon.addClass('icon-remove')
298
297
  button.removeClass('disabled')
299
298
  onEmpty: ->
300
- console.log('onempty')
301
299
  icon.addClass('icon-search')
302
300
  icon.removeClass('icon-remove')
303
301
  button.addClass('disabled')
304
302
  onChange: ->
305
- console.log('onchange')
306
303
  form.submit()
307
304
  )
308
305
 
@@ -47,7 +47,7 @@ module SmartListing
47
47
  per_page_sizes.each do |p|
48
48
  name = p == 0 ? @template.t('views.pagination.unlimited') : p
49
49
  if @smart_listing.per_page.to_i != p
50
- @template.concat(@template.link_to(name, sanitize_params(@template.params.merge(@smart_listing.param_names[:per_page] => p, @smart_listing.param_names[:page] => 1)), :remote => true))
50
+ @template.concat(@template.link_to(name, @template.url_for(sanitize_params(@template.params.merge(@smart_listing.param_names[:per_page] => p, @smart_listing.param_names[:page] => 1))), :remote => true))
51
51
  else
52
52
  @template.concat(@template.content_tag(:span, name))
53
53
  end
@@ -69,7 +69,7 @@ module SmartListing
69
69
  @smart_listing.param_names[:sort_extra] => extra
70
70
  }
71
71
 
72
- @template.link_to(sanitize_params(@template.params.merge(sort_params)), :class => "sortable", :data => {:attr => attribute}, :remote => true) do
72
+ @template.link_to(@template.url_for(sanitize_params(@template.params.merge(sort_params))), :class => "sortable", :data => {:attr => attribute}, :remote => true) do
73
73
  @template.concat(title)
74
74
  if @smart_listing.sort_attr == attribute && (!@smart_listing.sort_extra || @smart_listing.sort_extra == extra.to_s)
75
75
  @template.concat(@template.content_tag(:span, "", :class => (@smart_listing.sort_order == "asc" ? "glyphicon glyphicon-chevron-up" : "glyphicon glyphicon-chevron-down")))
@@ -0,0 +1,2 @@
1
+ var smart_listing = $('#<%= name %>').smart_listing();
2
+ smart_listing.update_list("<%= escape_javascript(render(:partial => part, :locals => {:smart_listing => smart_listing})) %>", <%= smart_listing_data.to_json.html_safe %>);
@@ -1,3 +1,3 @@
1
1
  module SmartListing
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_listing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sology
@@ -66,13 +66,14 @@ dependencies:
66
66
  - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description: Description of SmartList.
69
+ description:
70
70
  email:
71
71
  - contact@sology.eu
72
72
  executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
+ - app/views/smart_listing/_update_list.js.erb
76
77
  - app/assets/stylesheets/smart_listing/application.css
77
78
  - app/assets/javascripts/smart_listing/smart_listing.coffee
78
79
  - app/assets/javascripts/smart_listing/application.js
@@ -86,7 +87,7 @@ files:
86
87
  - LICENSE
87
88
  - Rakefile
88
89
  - README.md
89
- homepage: http://www.sology.eu
90
+ homepage: https://github.com/Sology/smart_listing
90
91
  licenses:
91
92
  - MIT
92
93
  metadata: {}
@@ -109,5 +110,6 @@ rubyforge_project:
109
110
  rubygems_version: 2.1.10
110
111
  signing_key:
111
112
  specification_version: 4
112
- summary: Summary of SmartList.
113
+ summary: SmartListing helps creating sortable lists of ActiveRecord collections with
114
+ pagination, filtering and inline editing.
113
115
  test_files: []