active_admin_sidebar 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e7e3d5cb495dbf0506cf8d8b1e3f83c433836b7883447283e479f09b9d50701
4
- data.tar.gz: c41d31e107f4812b8c5677caab159093039eab0bd206e13a2d09d79956b3810a
3
+ metadata.gz: f55645489211ca09002e03dd6977f56eeb979d4dcbd68f0b4d60d627664f80ff
4
+ data.tar.gz: 21a35646bb671f8821e5b415199409368754c406db2116e4013df4a424a65a13
5
5
  SHA512:
6
- metadata.gz: 8e442e3d986f52fc2415a979d1488fd64e056a362704292bf59d73252eddfff5efb1096cc148ddaabd39c79e195e74e5236f877d07e5b63b50cf96725c79cdd7
7
- data.tar.gz: 49e1113d722386ee9098e69d8f04a4befa1420d58e1aebea33aed97a6c6d99c2114fb9ac1a758d41ce87502f3bfa5457bb39c7614ab94cf9c77ff563ecb637fa
6
+ metadata.gz: 75731133efbd4445416da16d9718ccfe11e94c40f406c23dcddd97052842be59212d780002b40f0fd9173461ec081b92f07166aeff7ca0edd5addba472b14080
7
+ data.tar.gz: fee2ed9c92dcbdaabe40d0bb7e4b05284876e055f2d8bb94c0b11189f0ec8ca51761a26a8b45f081385e45565f11a5864cd0405c692f2559b4a8273c76483cbe
@@ -1,19 +1,21 @@
1
1
  sudo: required
2
+
2
3
  language: ruby
4
+
3
5
  addons:
4
6
  chrome: stable
5
7
 
6
- before_install: gem install bundler -v 1.17.1
8
+ before_install:
9
+ - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
10
+ - gem install bundler -v '< 2'
7
11
 
8
12
  script: bundle exec rspec
9
13
 
10
14
  env:
11
15
  matrix:
12
16
  - RAILS=5.1.6 AA=1.1.0
13
- - RAILS=5.1.6 AA=1.2.1
14
- - RAILS=5.2.1 AA=1.3.1
15
- - RAILS=5.2.1 AA=1-4-stable
17
+ - RAILS=5.2.1 AA=1.4.0
16
18
 
17
19
  rvm:
18
- - 2.3
19
- - 2.5
20
+ - 2.4
21
+ - 2.6
data/Gemfile CHANGED
@@ -4,15 +4,11 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  group :test do
7
- gem 'rails', "#{ENV['RAILS'] || '5.2.1'}"
8
- if ENV['AA'] == '1-4-stable'
9
- gem 'activeadmin', git: 'https://github.com/activeadmin/activeadmin.git', branch: '1-4-stable'
10
- else
11
- gem 'activeadmin', "#{ENV['AA'] || '1.3.1'}"
12
- end
7
+ gem 'rails', "~> #{ENV['RAILS'] || '5.2.1'}"
8
+ gem 'activeadmin', "~> #{ENV['AA'] || '1.3.1'}"
13
9
 
14
10
  gem 'rspec-rails'
15
- gem 'sqlite3'
11
+ gem 'sqlite3', '~> 1.3.6'
16
12
  gem 'database_cleaner'
17
13
  gem 'capybara'
18
14
  gem 'selenium-webdriver'
data/README.md CHANGED
@@ -4,34 +4,25 @@ Provides ability to manipulate sidebar position for ActiveAdmin (tested with Act
4
4
 
5
5
  ## Install
6
6
 
7
+ Add following line to the `Gemfile`
8
+
7
9
  ```ruby
8
10
  gem 'active_admin_sidebar'
9
- # or latest from GitHub
10
- gem 'active_admin_sidebar', git: 'https://github.com/activeadmin-plugins/active_admin_sidebar.git'
11
11
  ```
12
12
 
13
- Add including of CSS file
13
+ Add following line to the `app/assets/stylesheets/active_admin.css.scss`
14
14
 
15
15
  ```scss
16
16
  @import "active_admin_sidebar";
17
17
  ```
18
18
 
19
- to the
20
- ```
21
- app/assets/stylesheets/active_admin.css.scss
22
- ```
23
-
24
- And including of coffee file (optional, need only for collapsed sidebar)
19
+ If you want to use collapsing feature, add following line
25
20
 
26
- ```coffeescript
27
- #= require active_admin_sidebar
21
+ ```javascripts
22
+ //= require active_admin_sidebar
28
23
  ```
29
24
 
30
- to the
31
-
32
- ```scss
33
- app/assets/javascripts/active_admin.js
34
- ```
25
+ to the `app/assets/javascripts/active_admin.js`
35
26
 
36
27
  # Configuration per resource
37
28
 
@@ -0,0 +1,29 @@
1
+ (function() {
2
+ $(document).ready(function() {
3
+ var $aa_content, set_collapsed_sidebar;
4
+ if ($('body').hasClass('index') && ($('#active_admin_content').hasClass('collapsible_sidebar'))) {
5
+ $aa_content = $('#active_admin_content');
6
+ $aa_content.find('.sidebar_section:first>h3').append('<span class="collapse_btn icono-caret-left" title="Hide sidebar"></span>');
7
+ $aa_content.prepend('<span class="uncollapse_btn icono-caret-right" title="Show sidebar"></span>');
8
+ set_collapsed_sidebar = function(value) {
9
+ return $.getJSON(this.href, {
10
+ collapsed_sidebar: value
11
+ });
12
+ };
13
+ return $aa_content.on('click', '.collapse_btn, .uncollapse_btn', function(e) {
14
+ if (!$aa_content.hasClass('collapsed_sidebar')) {
15
+ set_collapsed_sidebar(true);
16
+ $aa_content.removeClass('left_sidebar');
17
+ $aa_content.addClass('collapsed_sidebar');
18
+ return $aa_content.trigger('collapsible_sidebar:collapsed');
19
+ } else {
20
+ set_collapsed_sidebar(false);
21
+ $aa_content.removeClass('collapsed_sidebar');
22
+ $aa_content.addClass('left_sidebar');
23
+ return $aa_content.trigger('collapsible_sidebar:uncollapsed');
24
+ }
25
+ });
26
+ }
27
+ });
28
+
29
+ }).call(this);
@@ -1,3 +1,3 @@
1
1
  module ActiveAdminSidebar
2
- VERSION = "1.1.0"
2
+ VERSION = '1.2.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_admin_sidebar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-19 00:00:00.000000000 Z
11
+ date: 2019-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeadmin
@@ -37,7 +37,7 @@ files:
37
37
  - README.md
38
38
  - Rakefile
39
39
  - active_admin_sidebar.gemspec
40
- - app/assets/javascripts/active_admin_sidebar.coffee
40
+ - app/assets/javascripts/active_admin_sidebar.js
41
41
  - app/assets/stylesheets/active_admin_sidebar.scss
42
42
  - app/assets/stylesheets/active_admin_sidebar_pure_icons.scss
43
43
  - lib/active_admin_sidebar.rb
@@ -69,8 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubyforge_project:
73
- rubygems_version: 2.7.7
72
+ rubygems_version: 3.0.2
74
73
  signing_key:
75
74
  specification_version: 4
76
75
  summary: active_admin_sidebar gem
@@ -1,25 +0,0 @@
1
- $(document).ready ->
2
- if $('body').hasClass('index') && ($('#active_admin_content').hasClass('collapsible_sidebar'))
3
-
4
- $aa_content = $('#active_admin_content')
5
-
6
- $aa_content.find('.sidebar_section:first>h3').append(
7
- '<span class="collapse_btn icono-caret-left" title="Hide sidebar"></span>')
8
-
9
- $aa_content.prepend(
10
- '<span class="uncollapse_btn icono-caret-right" title="Show sidebar"></span>')
11
-
12
- set_collapsed_sidebar = (value) ->
13
- $.getJSON(this.href, {collapsed_sidebar: value})
14
-
15
- $aa_content.on 'click', '.collapse_btn, .uncollapse_btn', (e) ->
16
- if !$aa_content.hasClass('collapsed_sidebar')
17
- set_collapsed_sidebar(true)
18
- $aa_content.removeClass('left_sidebar')
19
- $aa_content.addClass('collapsed_sidebar')
20
- $aa_content.trigger('collapsible_sidebar:collapsed')
21
- else
22
- set_collapsed_sidebar(false)
23
- $aa_content.removeClass('collapsed_sidebar')
24
- $aa_content.addClass('left_sidebar')
25
- $aa_content.trigger('collapsible_sidebar:uncollapsed')