active_admin_pro 0.1.1 → 0.1.2

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: 3ff4310883bd2de581228f2b14f2a5d7aadef447
4
- data.tar.gz: 6501d65856d8887800c3672784f5c3146fbba0dc
3
+ metadata.gz: 2352d25e3fae68b6bf5e4e906a14e61d5207a868
4
+ data.tar.gz: 27f15efc18b3947b5fd51ac1de8dc56656a82aa3
5
5
  SHA512:
6
- metadata.gz: aaca17160b9a63f0df6167e803fba2fb78e0f17d72755254dee3021e019158b1e30c691d8619aa415bef1499cf7723b607c2743925f8e07093bd200702e54862
7
- data.tar.gz: 01930d18c14cebc4a2b0553631f0750cb42694b72d59205dd36b2587cdd1267897280374089090cd7793e9165b690e61f0dd79cee4fdd1d18d1bc4f4ffd8fc3d
6
+ metadata.gz: 4e8ce29e47e3762b2faeb0ebbe0ddf135989660373cc5c148bd58bcdd1cf1c37d24cbbd98693f637d8f9085acf15bbf95486e49c064a8f9e583f319d2ae832cb
7
+ data.tar.gz: 70a1e7d9c24c133f19c9cc022cb6c62ccd1c81c84831bc37cb303098063bd877f5a08b25920fbc4c14ae6f745232087ba74c326fc378570689b68748fdee67d4
@@ -26,6 +26,6 @@ App.ready(function() {
26
26
  }, 0);
27
27
  });
28
28
 
29
- activateBehavior('.input.country');
30
- activateBehavior('.input.select');
29
+ activateBehavior('.input.country:not(.filter_form_field)');
30
+ activateBehavior('.input.select:not(.filter_form_field)');
31
31
  });
@@ -5,7 +5,7 @@ App.ready(function() {
5
5
  "use strict";
6
6
 
7
7
  function activateBehavior() {
8
- $('.input.stringish:not(.phone), .input.text').each(function() {
8
+ $('.input.stringish:not(.phone):not(.filter_form_field), .input.text:not(.filter_form_field)').each(function() {
9
9
  var container = $(this);
10
10
  var input = container.find('input, textarea');
11
11
  var label = container.find('label');
@@ -6,7 +6,7 @@ App.ready(function() {
6
6
  var offset, option, select;
7
7
 
8
8
  function activateBehavior() {
9
- $('.input.time_zone select').each(function() {
9
+ $('.input.time_zone:not(.filter_form_field) select').each(function() {
10
10
  select = $(this);
11
11
  if (select.val().trim() === '') {
12
12
  option = select.find('.time-zone' + timeOffset());
@@ -1,4 +1,4 @@
1
- .input.boolean {
1
+ .input.boolean:not(.filter_form_field) {
2
2
  margin-bottom: 2em;
3
3
 
4
4
  label {
@@ -1,5 +1,5 @@
1
- .input.country,
2
- .input.select {
1
+ .input.country:not(.filter_form_field),
2
+ .input.select:not(.filter_form_field) {
3
3
  margin-bottom: 2em;
4
4
  position: relative;
5
5
 
@@ -1,5 +1,5 @@
1
1
  // Google Material Design inspired string input with floating label
2
- .input.stringish {
2
+ .input.stringish:not(.filter_form_field) {
3
3
  @include transform(translate3d(0, 0, 0));
4
4
  @include transition(all 100ms $transition-timing);
5
5
  border-bottom: 1px solid transparent;
@@ -1,4 +1,4 @@
1
- .input.text {
1
+ .input.text:not(.filter_form_field) {
2
2
  margin-bottom: 2em;
3
3
  position: relative;
4
4
 
@@ -30,21 +30,6 @@ ActiveAdmin.application.tap do |config|
30
30
  config.meta_tags["apple-mobile-web-app-title"] ||= "Admin"
31
31
  config.meta_tags["viewport"] ||= "initial-scale=1, maximum-scale=1, width=device-width"
32
32
 
33
- # Add default interfaces for AdminUser and User models in Active Admin if the models exist.
34
- admin_user_exists = File.exist?(File.join(Rails.root, "app", "models", "admin_user.rb"))
35
- admin_user_registration_exists = File.exist?(File.join(Rails.root, "app", "admin", "admin_user.rb"))
36
-
37
- if admin_user_exists && !admin_user_registration_exists
38
- config.load_paths.unshift File.join(File.expand_path("../../..", __FILE__), "lib", "activeadmin_pro", "admin_user")
39
- end
40
-
41
- user_exists = File.exist?(File.join(Rails.root, "app", "models", "user.rb"))
42
- user_registration_exists = File.exist?(File.join(Rails.root, "app", "admin", "user.rb"))
43
-
44
- if user_exists && !user_registration_exists
45
- config.load_paths.unshift File.join(File.expand_path("../../..", __FILE__), "lib", "activeadmin_pro", "user")
46
- end
47
-
48
33
  # Add route and controller for Summernote's image uploads
49
34
  config.load_paths.unshift File.join(File.expand_path("../../..", __FILE__), "lib", "activeadmin_pro", "summernote_image")
50
35
  end
@@ -20,36 +20,6 @@
20
20
  # available at http://guides.rubyonrails.org/i18n.html.
21
21
 
22
22
  en:
23
- activerecord:
24
- attributes:
25
- admin_user:
26
- created_at: Created
27
- current_sign_in_at: Current Session
28
- current_sign_in_ip: Current IP Address
29
- email: Email Address
30
- last_sign_in_at: Last Session
31
- last_sign_in_ip: Last IP Address
32
- name: Full Name
33
- sign_in_count: Number of Sessions
34
- updated_at: Updated
35
- user:
36
- created_at: Created
37
- current_sign_in_at: Current Session
38
- current_sign_in_ip: Current IP Address
39
- email: Email Address
40
- last_sign_in_at: Last Session
41
- last_sign_in_ip: Last IP Address
42
- name: Full Name
43
- sign_in_count: Number of Sessions
44
- updated_at: Updated
45
- models:
46
- admin_user:
47
- one: Admin User
48
- other: Admin Users
49
- user:
50
- one: User
51
- other: Users
52
-
53
23
  time:
54
24
  formats:
55
25
  short: "%h %e, %Y %l:%M %p"
@@ -1,3 +1,3 @@
1
1
  module ActiveAdminPro
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_admin_pro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Pattison
@@ -463,10 +463,8 @@ files:
463
463
  - config/initializers/active_admin.rb
464
464
  - config/locales/en.yml
465
465
  - lib/active_admin_pro.rb
466
- - lib/active_admin_pro/admin_user/admin_user.rb
467
466
  - lib/active_admin_pro/engine.rb
468
467
  - lib/active_admin_pro/summernote_image/summernote_image.rb
469
- - lib/active_admin_pro/user/user.rb
470
468
  - lib/active_admin_pro/version.rb
471
469
  - lib/generators/activeadmin_pro/install_generator.rb
472
470
  - lib/tasks/activeadmin_pro_tasks.rake
@@ -1,52 +0,0 @@
1
- ActiveAdmin.register AdminUser do
2
- permit_params :name, :email, :password
3
-
4
- filter :name
5
- filter :email
6
-
7
- index do
8
- selectable_column
9
- id_column
10
- column :name
11
- column :email
12
- actions
13
- end
14
-
15
- form do |f|
16
- inputs "#{t('activerecord.models.admin_user', count: 1)} Details" do
17
- input :name
18
- input :email
19
- input :password if f.object.new_record?
20
- end
21
- actions
22
- end
23
-
24
- show do
25
- attributes_table do
26
- row :name
27
- row :email
28
- row :sign_in_count
29
- row :current_sign_in_at
30
- row :last_sign_in_at
31
- row :current_sign_in_ip
32
- row :last_sign_in_ip
33
- row :created_at
34
- row :updated_at
35
- end
36
- active_admin_comments
37
- end
38
-
39
- member_action :sign_in_as, method: :get do
40
- sign_in(resource, bypass: true)
41
- redirect_to "/"
42
- end
43
-
44
- action_item :become_user, only: :show do
45
- # The path `sign_in_as_admin_admin_user_path` looks confusing as hell.
46
- # Here's what's up:
47
- # The member action is: `sign_in_as`
48
- # The namespace is: `admin`
49
- # The controller is: `admin_user`
50
- link_to("Become User", sign_in_as_admin_admin_user_path(admin_user))
51
- end
52
- end
@@ -1,53 +0,0 @@
1
- ActiveAdmin.register User do
2
- permit_params :name, :email, :password
3
-
4
- filter :name
5
- filter :email
6
-
7
- index do
8
- selectable_column
9
- id_column
10
- column :name
11
- column :email
12
- actions
13
- end
14
-
15
- form do |f|
16
- inputs "#{t('activerecord.models.user', count: 1)} Details" do
17
- input :name
18
- input :email
19
- input :password if f.object.new_record?
20
- end
21
- actions
22
- end
23
-
24
- show do
25
- attributes_table do
26
- row :name
27
- row :email
28
- row :sign_in_count
29
- row :current_sign_in_at
30
- row :last_sign_in_at
31
- row :current_sign_in_ip
32
- row :last_sign_in_ip
33
- row :created_at
34
- row :updated_at
35
- end
36
- active_admin_comments
37
- end
38
-
39
- member_action :become, method: :post do
40
- sign_in(resource, bypass: true)
41
- redirect_to "/"
42
- end
43
-
44
- action_item :become_user, only: :show do
45
- # The path `become_admin_user_path` is confusing as
46
- # hell because we're not signing in as an admin user.
47
- # Here's what's up:
48
- # The member action is: `become`
49
- # The namespace is: `admin`
50
- # The controller is: `user`
51
- link_to("Become User", become_admin_user_path(user), method: :post)
52
- end
53
- end