adminpanel 1.2.12 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +3 -4
  3. data/Gemfile +22 -20
  4. data/README.md +12 -9
  5. data/adminpanel.gemspec +29 -28
  6. data/app/assets/fonts/.keep +0 -0
  7. data/app/assets/javascripts/adminpanel/images_form.js +5 -2
  8. data/app/assets/javascripts/adminpanel/imagesloaded.js +5 -2
  9. data/app/assets/javascripts/adminpanel/tables.js +6 -3
  10. data/app/assets/javascripts/application-admin.js +2 -1
  11. data/app/assets/stylesheets/adminpanel/{_clearfix.css.scss → _clearfix.css} +0 -0
  12. data/app/assets/stylesheets/adminpanel/bootstrap.css +2 -2
  13. data/app/assets/stylesheets/adminpanel/medium-editor.css.scss +1 -1
  14. data/app/assets/stylesheets/application-admin.css +2 -1
  15. data/app/controllers/adminpanel/application_controller.rb +28 -21
  16. data/app/controllers/adminpanel/categories_controller.rb +16 -5
  17. data/app/controllers/adminpanel/galleries_controller.rb +11 -5
  18. data/app/controllers/adminpanel/sections_controller.rb +14 -0
  19. data/app/controllers/adminpanel/users_controller.rb +10 -80
  20. data/app/controllers/concerns/adminpanel/galleryzable_actions.rb +33 -0
  21. data/app/controllers/concerns/adminpanel/rest_actions.rb +109 -0
  22. data/app/helpers/adminpanel/application_helper.rb +0 -1
  23. data/app/helpers/adminpanel/custom_form_builder.rb +12 -13
  24. data/app/helpers/adminpanel/router_helper.rb +11 -2
  25. data/app/helpers/adminpanel/shared_pages_helper.rb +0 -1
  26. data/app/models/adminpanel/analytic.rb +3 -2
  27. data/app/models/adminpanel/gallery.rb +8 -4
  28. data/app/models/adminpanel/group.rb +1 -1
  29. data/app/models/adminpanel/image.rb +1 -2
  30. data/app/models/adminpanel/section.rb +19 -10
  31. data/app/models/adminpanel/user.rb +11 -3
  32. data/app/models/concerns/adminpanel/base.rb +149 -0
  33. data/app/models/concerns/adminpanel/galleryzation.rb +66 -0
  34. data/app/models/contact.rb +16 -9
  35. data/app/views/adminpanel/analytics/index.html.erb +2 -1
  36. data/app/views/adminpanel/categories/_categories_table.html.erb +6 -7
  37. data/app/views/adminpanel/categories/_category_form.html.erb +2 -2
  38. data/app/views/adminpanel/categories/create.js.erb +2 -2
  39. data/app/views/adminpanel/categories/index.html.erb +1 -1
  40. data/app/views/adminpanel/galleries/_galleries_table.html.erb +7 -7
  41. data/app/views/adminpanel/galleries/index.html.erb +6 -5
  42. data/app/views/adminpanel/sections/_sections_table.html.erb +2 -2
  43. data/app/views/adminpanel/sections/edit.html.erb +5 -3
  44. data/app/views/adminpanel/sections/show.html.erb +3 -3
  45. data/app/views/adminpanel/sessions/new.html.erb +1 -1
  46. data/app/views/layouts/_side_menu.html.erb +2 -2
  47. data/app/views/layouts/_top_bar.html.erb +3 -3
  48. data/app/views/layouts/admin-login.html.erb +0 -1
  49. data/app/views/layouts/admin.html.erb +3 -3
  50. data/app/views/shared/_delete_icon_button.html.erb +16 -0
  51. data/app/views/shared/_edit_icon_button.html.erb +14 -0
  52. data/app/views/shared/_error_messages.html.erb +1 -1
  53. data/app/views/shared/_form_fields.html.erb +15 -13
  54. data/app/views/shared/_gallery_entries.html.erb +2 -2
  55. data/app/views/shared/_init_editor.html.erb +5 -2
  56. data/app/views/shared/_new_resource_button.html.erb +18 -0
  57. data/app/views/shared/_remote_form_fields.html.erb +1 -1
  58. data/app/views/shared/_show_icon_button.html.erb +14 -0
  59. data/app/views/shared/edit.html.erb +3 -3
  60. data/app/views/shared/index.html.erb +13 -48
  61. data/app/views/shared/new.html.erb +3 -3
  62. data/app/views/shared/show.html.erb +5 -5
  63. data/config/initializers/pluralization_es.rb +16 -0
  64. data/config/locales/en.yml +89 -0
  65. data/config/locales/es.yml +4 -4
  66. data/config/routes.rb +15 -16
  67. data/lib/adminpanel.rb +8 -8
  68. data/lib/adminpanel/version.rb +1 -1
  69. data/lib/generators/adminpanel/gallery/gallery_generator.rb +12 -8
  70. data/lib/generators/adminpanel/gallery/templates/gallery_template.rb +2 -3
  71. data/lib/generators/adminpanel/initialize/templates/category_template.rb +2 -3
  72. data/lib/generators/adminpanel/resource/resource_generator.rb +24 -18
  73. data/lib/generators/adminpanel/resource/templates/controller.rb +5 -0
  74. data/lib/generators/adminpanel/resource/templates/resource.rb +3 -3
  75. data/lib/tasks/adminpanel/adminpanel.rake +43 -90
  76. data/spec/dummy/app/controllers/adminpanel/mugs_controller.rb +9 -0
  77. data/spec/dummy/app/controllers/adminpanel/products_controller.rb +12 -0
  78. data/spec/dummy/app/models/ability.rb +1 -1
  79. data/spec/dummy/app/models/adminpanel/categorization.rb +1 -2
  80. data/spec/dummy/app/models/adminpanel/category.rb +18 -19
  81. data/spec/dummy/app/models/adminpanel/mug.rb +37 -0
  82. data/spec/dummy/app/models/adminpanel/photo.rb +3 -3
  83. data/spec/dummy/app/models/adminpanel/product.rb +2 -2
  84. data/spec/dummy/config/application.rb +2 -11
  85. data/spec/dummy/config/database.yml +0 -6
  86. data/spec/dummy/config/environments/development.rb +11 -23
  87. data/spec/dummy/config/environments/production.rb +40 -32
  88. data/spec/dummy/config/environments/test.rb +13 -18
  89. data/spec/dummy/config/initializers/adminpanel_setup.rb +2 -1
  90. data/spec/dummy/config/locales/.keep +0 -0
  91. data/spec/dummy/db/schema.rb +68 -2
  92. data/spec/features/authentication_pages_spec.rb +15 -15
  93. data/spec/features/galleries_pages_spec.rb +30 -22
  94. data/spec/features/section_pages_spec.rb +15 -18
  95. data/spec/features/shared_pages_spec.rb +97 -127
  96. data/spec/generators/gallery_generator_spec.rb +2 -3
  97. data/spec/generators/resource_generator_spec.rb +20 -3
  98. data/spec/models/gallery_spec.rb +2 -2
  99. data/spec/models/section_spec.rb +8 -15
  100. data/spec/models/user_spec.rb +23 -39
  101. data/spec/spec_helper.rb +9 -1
  102. data/spec/support/factories.rb +52 -0
  103. data/spec/support/helper_methods.rb +25 -5
  104. data/spec/tasks/adminpanel_rake_spec.rb +11 -10
  105. metadata +361 -353
  106. data/app/assets/fonts/FontAwesome.otf +0 -0
  107. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  108. data/app/assets/fonts/fontawesome-webfont.svg +0 -255
  109. data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
  110. data/app/assets/fonts/fontawesome-webfont.woff +0 -0
  111. data/app/assets/stylesheets/adminpanel/colorpicker.css +0 -7
  112. data/app/assets/stylesheets/adminpanel/elfinder.min.css +0 -59
  113. data/app/assets/stylesheets/adminpanel/font-awesome.min.css +0 -34
  114. data/app/helpers/adminpanel/pluralizations_helper.rb +0 -25
  115. data/app/helpers/adminpanel/rest_actions_helper.rb +0 -128
  116. data/app/views/adminpanel/galleries/delete.html.erb +0 -2
  117. data/app/views/adminpanel/galleries/edit.html.erb +0 -19
  118. data/app/views/adminpanel/galleries/new.html.erb +0 -18
  119. data/app/views/adminpanel/galleries/show.html.erb +0 -18
  120. data/app/views/adminpanel/galleries/update.html.erb +0 -2
  121. data/lib/adminpanel/active_record/adminpanel_extension.rb +0 -187
  122. data/spec/dummy/config/locales/en.yml +0 -5
  123. data/spec/support/define_factory_models.rb +0 -45
  124. data/spec/support/submit_forms_without_button.rb +0 -17
  125. data/spec/support/test_database.rb +0 -76
  126. data/spec/uploaders/gallery_uploader_spec.rb +0 -37
  127. data/spec/uploaders/image_uploader_spec.rb +0 -31
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e50381828871733ebe974e0a8d515b321e82bfec
4
+ data.tar.gz: 5833b2fe17414dda412d4ae3028d93b5d5abaa26
5
+ SHA512:
6
+ metadata.gz: d3085bf34b6db6a59853ce06ba0509aaf3bf511ad18ad0dde5332d866bdf459c67a3b4bdb7c62e97527a538d907f50da924020d47c7386f9f75e3f7c629ec933
7
+ data.tar.gz: 71c109faf8afd1dff2b60ecfc742e9c39f19b1ea7bd3e6ea84a38d9c45bd03529a2c7d43a1cbdff4c0b0411f92bc2bd9d960da04dc1b59fea3340f8cd06f0981
data/.travis.yml CHANGED
@@ -1,7 +1,6 @@
1
1
  language: ruby
2
- before_install:
3
- - gem --version
4
2
  rvm:
5
- - "1.8.7"
3
+ - 2.0.0-p451
6
4
  env:
7
- - RAILS=3.2.12
5
+ - RAILS=4.0.4
6
+ - RAILS=4.1.0
data/Gemfile CHANGED
@@ -3,26 +3,28 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in adminpanel.gemspec
4
4
  # gemspec
5
5
 
6
- gem "rails", "~> 3.2.12"
7
- gem "carrierwave", "~> 0.9.0"
8
- gem "rmagick", "~> 2.13.2"
9
- gem "jquery-rails", "~> 3.1.0"
10
- gem "bcrypt-ruby", "~> 3.0.0"
11
- gem "rails-i18n", "~> 3.0.0"
12
- gem "inherited_resources", "~> 1.3.1"
13
- gem "google-api-client", "~> 0.7.1"
14
- gem "cancan", "~> 1.6.10"
6
+ gem 'rails', '>= 4.0.0'
7
+ gem 'carrierwave', '~> 0.10.0'
8
+ gem 'rmagick', '2.13.2', require: false
9
+ gem 'jquery-rails', '~> 3.1.0'
10
+ gem 'bcrypt', '~> 3.1.7'
11
+ gem 'rails-i18n', '~> 4.0.2'
12
+ gem 'inherited_resources', '~> 1.4.1'
13
+ gem 'google-api-client', '~> 0.7.1'
14
+ gem 'cancancan', '~> 1.7'
15
+ gem 'faker', '>= 1.3.0'
16
+ gem 'turbolinks', '>= 2.2.2'
17
+ gem 'font-awesome-rails', '>= 4.0.3.1'
18
+
19
+ group :assets do
20
+ gem 'sass-rails', '>= 4.0.3', require: true
21
+ end
15
22
 
16
23
  group :test do
17
- gem "bundler", "~> 1.3"
18
- gem "activerecord", "3.2.12"
19
- gem "rake", "~> 10.1.1"
20
- gem "factory_girl", "2.6.4"
21
- gem "rspec", "~> 2.14.0"
22
- gem "rspec-rails", "~> 2.14.0"
23
- gem "sqlite3", :platform => [:ruby, :mswin, :mingw]
24
- gem "capybara", "~> 1.1.4"
25
- gem "nokogiri", "~> 1.5.9"
26
- gem "rubyzip", "~> 0.9.9"
27
- gem "ammeter", "~> 0.2.9"
24
+ gem 'factory_girl_rails', '~> 4.4.1'
25
+ gem 'rspec', '~> 2.14.1'
26
+ gem 'rspec-rails', '~> 2.14.1'
27
+ gem 'sqlite3', :platform => [:ruby, :mswin, :mingw]
28
+ gem 'capybara', '~> 2.2.1'
29
+ gem 'ammeter', '~> 1.0.0'
28
30
  end
data/README.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # Adminpanel
2
2
 
3
- This gem is developed to be a CMS for Ruby 1.8.7 and Rails 3.2.12
3
+ CMS for Rails 4, for rails 3.x check the corresponding branch.
4
4
 
5
- [![Gem Version](https://badge.fury.io/rb/adminpanel.png)](http://badge.fury.io/rb/adminpanel@2x)
6
- [![Travis CI ](https://api.travis-ci.org/joseramonc/adminpanel.png) ](https://travis-ci.org/joseramonc/adminpanel)
5
+ [![Gem Version](https://badge.fury.io/rb/adminpanel.svg)](http://badge.fury.io/rb/adminpanel)
6
+ [![Build Status](https://travis-ci.org/joseramonc/adminpanel.svg?branch=master)](https://travis-ci.org/joseramonc/adminpanel)
7
+ [![Dependency Status](https://gemnasium.com/joseramonc/adminpanel.svg)](https://gemnasium.com/joseramonc/adminpanel)
7
8
 
8
9
  ## Installation
9
10
 
@@ -19,7 +20,7 @@ And then execute:
19
20
 
20
21
  In you application.rb
21
22
 
22
- config.default_locale = :es
23
+ config.default_locale = :es # or :en
23
24
 
24
25
  no other language is currently supported, but pull requests are welcome.
25
26
 
@@ -31,18 +32,20 @@ Then run:
31
32
  rake db:migrate
32
33
  to create the database that the adminpanel it's expecting, this will also seed the database with the default user.
33
34
 
34
- To create a new resource check the [resource generator wiki](https://github.com/joseramonc/adminpanel/wiki/Resource-Generator)
35
+ Make sure you read the wiki, there is the descriptions of every relevant part of the gem.
35
36
 
36
- You can seed the sections with help of the [Section wiki](https://github.com/joseramonc/adminpanel/wiki/Section-objects).
37
+ To create a new resource check the [Resource Generator.](https://github.com/joseramonc/adminpanel/wiki/Geneartor-adminpanel:resource)
38
+
39
+ You can seed the sections with help of the [Section task.](https://github.com/joseramonc/adminpanel/wiki/Rake-task-adminpanel:section)
37
40
 
38
41
  Then, mount the gem wherever you like!
39
42
 
40
- mount Adminpanel::Engine => "/CoDN"
43
+ mount Adminpanel::Engine => "/codn"
41
44
 
42
45
  Also make sure to include adminpanel assets in your application.rb if you need to precompile them:
43
46
 
44
47
  config.assets.precompile += ['application-admin.js', 'application-admin.css']
45
- Feel free to use it, any doubts, errors or requests you can open a new issue!
48
+ Feel free to use it, any doubts, errors or suggestions are welcome in the issues!
46
49
 
47
50
  ## Dependencies
48
51
 
@@ -83,4 +86,4 @@ For more information about using the Google API visit
83
86
 
84
87
  ## To Do:
85
88
 
86
- # Check the issues if you'd like to help or request a new feature.
89
+ #### Check the issues if you'd like to help or request a new feature.
data/adminpanel.gemspec CHANGED
@@ -4,40 +4,41 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'adminpanel/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "adminpanel"
7
+ spec.name = 'adminpanel'
8
8
  spec.version = Adminpanel::VERSION
9
- spec.authors = ["Jose Ramon Camacho", "Victor Camacho"]
10
- spec.email = ["joserracamacho@gmail.com"]
11
- spec.description = %q{Gem that makes the admin panel for a site a breeze!}
12
- spec.summary = %q{Developed with love for ruby 1.8.7}
13
- spec.homepage = "https://github.com/joseramonc/adminpanel"
14
- spec.license = "MIT"
9
+ spec.authors = ['Jose Ramon Camacho', 'Victor Camacho']
10
+ spec.email = ['joserracamacho@gmail.com']
11
+ spec.description = %q{Gem that makes the administrative panel for a site a breeze!}
12
+ spec.summary = %q{Developed with <3 by CoDN}
13
+ spec.homepage = 'https://github.com/joseramonc/adminpanel'
14
+ spec.license = 'MIT'
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib", "app/assets"]
19
+ spec.require_paths = ['lib', 'app/assets']
20
20
 
21
+ spec.required_ruby_version = '>= 1.9.3'
21
22
 
22
- spec.add_dependency "rails", "~> 3.2.12"
23
- spec.add_dependency "carrierwave", "~> 0.9.0"
24
- spec.add_dependency "rmagick", "~> 2.13.2"
25
- spec.add_dependency "jquery-rails", "~> 3.1.0"
26
- spec.add_dependency "bcrypt-ruby", "~> 3.0.0"
27
- spec.add_dependency "rails-i18n", "~> 3.0.0"
28
- spec.add_dependency "inherited_resources", "~> 1.3.1"
29
- spec.add_dependency "cancan", "~> 1.6.10"
30
- spec.add_dependency "google-api-client", "~> 0.7.1"
23
+ spec.add_dependency 'rails', '>= 4.0.0', '<= 4.1.0'
24
+ spec.add_dependency 'carrierwave', '>= 0.10.0', '<= 1.0.0'
25
+ spec.add_dependency 'rmagick', '2.13.2'
26
+ spec.add_dependency 'jquery-rails', '>= 3.1.0', '<= 4.0.0'
27
+ spec.add_dependency 'turbolinks', '>= 2.2.2', '<= 3.0.0'
28
+ spec.add_dependency 'bcrypt', '>= 3.1.7', '<= 4.0.0'
29
+ spec.add_dependency 'rails-i18n', '>= 4.0.2', '<= 4.1.0'
30
+ spec.add_dependency 'inherited_resources', '>= 1.4.1', '<= 2.0.0'
31
+ spec.add_dependency 'cancancan', '>= 1.7', '<= 2.0.0'
32
+ spec.add_dependency 'google-api-client', '>= 0.7.1', '<= 1.0.0'
33
+ spec.add_dependency 'faker', '>= 1.3.0', '<= 2.0.0'
34
+ spec.add_dependency 'sass-rails', '>= 4.0.3', '<= 4.1.0'
35
+ spec.add_dependency 'font-awesome-rails', '>= 4.0.3.1', '<= 4.1.0'
31
36
 
32
- spec.add_development_dependency "bundler", "~> 1.3"
33
- spec.add_development_dependency "activerecord", "~> 3.2.12"
34
- spec.add_development_dependency "rake", '10.1.1'
35
- spec.add_development_dependency "sqlite3"
36
- spec.add_development_dependency "factory_girl", "2.6.4"
37
- spec.add_development_dependency "rspec", "~> 2.14.0"
38
- spec.add_development_dependency "rspec-rails", "~> 2.14.0"
39
- spec.add_development_dependency "capybara", "1.1.4"
40
- spec.add_development_dependency "nokogiri", "1.5.9"
41
- spec.add_development_dependency "rubyzip", "0.9.9"
42
- spec.add_development_dependency "ammeter", "0.2.9"
37
+
38
+ spec.add_development_dependency 'sqlite3', '~> 0'
39
+ spec.add_development_dependency 'factory_girl_rails', '>= 4.4.1', '<= 5.0.0'
40
+ spec.add_development_dependency 'rspec', '>= 2.14.1', ' <= 3.0.0'
41
+ spec.add_development_dependency 'rspec-rails', '>= 2.14.1', '<= 3.0.0'
42
+ spec.add_development_dependency 'capybara', '2.2.1'
43
+ spec.add_development_dependency 'ammeter', '1.0.0'
43
44
  end
File without changes
@@ -1,4 +1,4 @@
1
- $(document).ready(function(){
1
+ var ready = function(){
2
2
  $('form').on('click', '.add_fields', function(e) {
3
3
  e.preventDefault();
4
4
  var $collectionContainer = $(this).closest('.file-collection-container');
@@ -17,4 +17,7 @@ $(document).ready(function(){
17
17
  $(this).parent().parent().parent().addClass('hidden');
18
18
  e.preventDefault();
19
19
  });
20
- });
20
+ }
21
+
22
+ $(document).ready(ready);
23
+ $(document).on('page:load', ready);
@@ -1,4 +1,4 @@
1
- $(document).ready(function(){
1
+ var ready = function(){
2
2
  $("#gallery-container").imagesLoaded(function(){
3
3
  $('#gallery-container').masonry({
4
4
  itemSelector: '.gallery-item',
@@ -10,4 +10,7 @@ $(document).ready(function(){
10
10
  }
11
11
  });
12
12
  });
13
- });
13
+ }
14
+
15
+ $(document).ready(ready);
16
+ $(document).on('page:load', ready);
@@ -106,7 +106,7 @@ function SwitchCalendars(startCalendar, endCalendar, e) {
106
106
  endCalendar.datepicker('show');
107
107
  }
108
108
 
109
- $(document).ready(function() {
109
+ var ready = function() {
110
110
  $('#information-table').dataTable( {
111
111
  "sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
112
112
  "sPaginationType": "bootstrap",
@@ -120,7 +120,10 @@ $(document).ready(function() {
120
120
  "oPaginate" : {
121
121
  "sPrevious": "Anterior",
122
122
  "sNext": "Siguiente"
123
- }
123
+ }
124
124
  }
125
125
  });
126
- } );
126
+ }
127
+
128
+ $(document).ready(ready);
129
+ $(document).on('page:load', ready);
@@ -12,5 +12,6 @@
12
12
  //
13
13
  //= require jquery
14
14
  //= require jquery_ujs
15
+ //= require turbolinks
15
16
  //= require adminpanel/bootstrap
16
- //= require_tree ./adminpanel/.
17
+ //= require_tree ./adminpanel/.
@@ -2368,7 +2368,7 @@ input[type="submit"].btn.btn-mini {
2368
2368
  *margin-right: .3em;
2369
2369
  line-height: 14px;
2370
2370
  vertical-align: text-top;
2371
- background-image: url("admin/glyphicons-halflings.png");
2371
+ background-image: url("glyphicons-halflings.png");
2372
2372
  background-position: 14px 14px;
2373
2373
  background-repeat: no-repeat;
2374
2374
  margin-top: 1px;
@@ -2387,7 +2387,7 @@ input[type="submit"].btn.btn-mini {
2387
2387
  .dropdown-menu > .active > a > [class*=" icon-"],
2388
2388
  .dropdown-submenu:hover > a > [class^="icon-"],
2389
2389
  .dropdown-submenu:hover > a > [class*=" icon-"] {
2390
- background-image: url("admin/glyphicons-halflings-white.png");
2390
+ background-image: url("glyphicons-halflings-white.png");
2391
2391
  }
2392
2392
  .icon-glass {
2393
2393
  background-position: 0 0;
@@ -1 +1 @@
1
- .clearfix:after{display:block;visibility:hidden;clear:both;height:0;content:" ";font-size:0}.medium-toolbar-arrow,.medium-toolbar-arrow-under:after,.medium-toolbar-arrow-over:before{content:"";display:block;position:absolute;left:50%;margin-left:-8px;width:0;height:0;border-style:solid}.medium-toolbar-arrow-under:after{top:50px;border-width:8px 8px 0 8px;border-color:#242424 transparent transparent transparent}.medium-toolbar-arrow-over:before{top:-8px;border-width:0 8px 8px 8px;border-color:transparent transparent #242424 transparent}.medium-editor-toolbar{position:absolute;top:0;left:0;z-index:600;visibility:hidden;background-color:#242424;border:1px solid #000;font-family:HelveticaNeue, Helvetica, Arial, sans-serif;font-size:16px;background:-webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, #242424), color-stop(100%, rgba(36,36,36,0.75)));background:-webkit-linear-gradient(bottom, #242424,rgba(36,36,36,0.75));background:-moz-linear-gradient(bottom, #242424,rgba(36,36,36,0.75));background:-o-linear-gradient(bottom, #242424,rgba(36,36,36,0.75));background:linear-gradient(bottom, #242424,rgba(36,36,36,0.75));-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px;-webkit-box-shadow:0 0 3px #000;-moz-box-shadow:0 0 3px #000;box-shadow:0 0 3px #000;-webkit-transition:top 0.075s ease-out,left 0.075s ease-out;-moz-transition:top 0.075s ease-out,left 0.075s ease-out;-o-transition:top 0.075s ease-out,left 0.075s ease-out;transition:top 0.075s ease-out,left 0.075s ease-out}.medium-editor-toolbar ul{margin:0;padding:0}.medium-editor-toolbar li{float:left;list-style:none}.medium-editor-toolbar li button{display:block;padding:15px;height:50px;width:50px;background-color:#242424;color:#fff;border:0;border-right:1px solid #000;border-left:1px solid #333;border-left:1px solid rgba(255,255,255,0.1);font-weight:bold;text-decoration:none;text-transform:uppercase;background:-webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, #242424), color-stop(100%, rgba(36,36,36,0.89)));background:-webkit-linear-gradient(bottom, #242424,rgba(36,36,36,0.89));background:-moz-linear-gradient(bottom, #242424,rgba(36,36,36,0.89));background:-o-linear-gradient(bottom, #242424,rgba(36,36,36,0.89));background:linear-gradient(bottom, #242424,rgba(36,36,36,0.89));-webkit-box-shadow:0 2px 2px rgba(0,0,0,0.3);-moz-box-shadow:0 2px 2px rgba(0,0,0,0.3);box-shadow:0 2px 2px rgba(0,0,0,0.3);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:background-color 0.2s ease-in;-moz-transition:background-color 0.2s ease-in;-o-transition:background-color 0.2s ease-in;transition:background-color 0.2s ease-in}.medium-editor-toolbar li button:hover{color:yellow;background-color:#000}.medium-editor-toolbar li .medium-editor-button-first{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;border-top-left-radius:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;border-bottom-left-radius:5px}.medium-editor-toolbar li .medium-editor-button-last{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;border-top-right-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;border-bottom-right-radius:5px}.medium-editor-toolbar li .medium-editor-button-active{background-color:#000;background:-webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, #242424), color-stop(100%, rgba(0,0,0,0.89)));background:-webkit-linear-gradient(bottom, #242424,rgba(0,0,0,0.89));background:-moz-linear-gradient(bottom, #242424,rgba(0,0,0,0.89));background:-o-linear-gradient(bottom, #242424,rgba(0,0,0,0.89));background:linear-gradient(bottom, #242424,rgba(0,0,0,0.89));color:#fff}.medium-editor-toolbar li .medium-editor-action-underline{text-decoration:underline}.medium-editor-toolbar li .medium-editor-action-pre{font-family:'Menlo', monospace;font-size:12px;font-weight:100;padding:15px 0}.medium-editor-toolbar-active{visibility:visible;-webkit-animation:pop-upwards 160ms forwards linear;-moz-animation:pop-upwards 160ms forwards linear;-ms-animation:pop-upwards 160ms forwards linear;-o-animation:pop-upwards 160ms forwards linear;animation:pop-upwards 160ms forwards linear;-webkit-transition:top 0.075s ease-out,left 0.075s ease-out;-moz-transition:top 0.075s ease-out,left 0.075s ease-out;-o-transition:top 0.075s ease-out,left 0.075s ease-out;transition:top 0.075s ease-out,left 0.075s ease-out}.medium-editor-action-bold{font-weight:bolder}.medium-editor-action-italic{font-style:italic}.medium-editor-toolbar-form-anchor{display:none;background:#242424;color:#999;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px}.medium-editor-toolbar-form-anchor input,.medium-editor-toolbar-form-anchor a{font-family:HelveticaNeue, Helvetica, Arial, sans-serif}.medium-editor-toolbar-form-anchor input{padding:6px;height:50px;width:316px;background:#242424;border:none;color:#ccc;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.medium-editor-toolbar-form-anchor input:focus{outline:0;-moz-appearance:none;-webkit-appearance:none}.medium-editor-toolbar-form-anchor a{color:#fff;font-weight:bolder;font-size:24px;display:inline-block;margin:0 10px;text-decoration:none}.medium-editor-placeholder{position:relative}.medium-editor-placeholder:after{position:absolute;top:0;left:0;content:attr(data-placeholder);color:#b3b3b1;font-style:italic}@-webkit-keyframes pop-upwards{0%{-webkit-transform:matrix(0.97, 0, 0, 1, 0, 12);-moz-transform:matrix(0.97, 0, 0, 1, 0, 12);-ms-transform:matrix(0.97, 0, 0, 1, 0, 12);-o-transform:matrix(0.97, 0, 0, 1, 0, 12);transform:matrix(0.97, 0, 0, 1, 0, 12);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0}20%{-webkit-transform:matrix(0.99, 0, 0, 1, 0, 2);-moz-transform:matrix(0.99, 0, 0, 1, 0, 2);-ms-transform:matrix(0.99, 0, 0, 1, 0, 2);-o-transform:matrix(0.99, 0, 0, 1, 0, 2);transform:matrix(0.99, 0, 0, 1, 0, 2);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);opacity:0.7}40%{-webkit-transform:matrix(1, 0, 0, 1, 0, -1);-moz-transform:matrix(1, 0, 0, 1, 0, -1);-ms-transform:matrix(1, 0, 0, 1, 0, -1);-o-transform:matrix(1, 0, 0, 1, 0, -1);transform:matrix(1, 0, 0, 1, 0, -1);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}70%{-webkit-transform:matrix(1, 0, 0, 1, 0, 0);-moz-transform:matrix(1, 0, 0, 1, 0, 0);-ms-transform:matrix(1, 0, 0, 1, 0, 0);-o-transform:matrix(1, 0, 0, 1, 0, 0);transform:matrix(1, 0, 0, 1, 0, 0);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}100%{-webkit-transform:matrix(1, 0, 0, 1, 0, 0);-moz-transform:matrix(1, 0, 0, 1, 0, 0);-ms-transform:matrix(1, 0, 0, 1, 0, 0);-o-transform:matrix(1, 0, 0, 1, 0, 0);transform:matrix(1, 0, 0, 1, 0, 0);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}}@-moz-keyframes pop-upwards{0%{-webkit-transform:matrix(0.97, 0, 0, 1, 0, 12);-moz-transform:matrix(0.97, 0, 0, 1, 0, 12);-ms-transform:matrix(0.97, 0, 0, 1, 0, 12);-o-transform:matrix(0.97, 0, 0, 1, 0, 12);transform:matrix(0.97, 0, 0, 1, 0, 12);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0}20%{-webkit-transform:matrix(0.99, 0, 0, 1, 0, 2);-moz-transform:matrix(0.99, 0, 0, 1, 0, 2);-ms-transform:matrix(0.99, 0, 0, 1, 0, 2);-o-transform:matrix(0.99, 0, 0, 1, 0, 2);transform:matrix(0.99, 0, 0, 1, 0, 2);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);opacity:0.7}40%{-webkit-transform:matrix(1, 0, 0, 1, 0, -1);-moz-transform:matrix(1, 0, 0, 1, 0, -1);-ms-transform:matrix(1, 0, 0, 1, 0, -1);-o-transform:matrix(1, 0, 0, 1, 0, -1);transform:matrix(1, 0, 0, 1, 0, -1);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}70%{-webkit-transform:matrix(1, 0, 0, 1, 0, 0);-moz-transform:matrix(1, 0, 0, 1, 0, 0);-ms-transform:matrix(1, 0, 0, 1, 0, 0);-o-transform:matrix(1, 0, 0, 1, 0, 0);transform:matrix(1, 0, 0, 1, 0, 0);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}100%{-webkit-transform:matrix(1, 0, 0, 1, 0, 0);-moz-transform:matrix(1, 0, 0, 1, 0, 0);-ms-transform:matrix(1, 0, 0, 1, 0, 0);-o-transform:matrix(1, 0, 0, 1, 0, 0);transform:matrix(1, 0, 0, 1, 0, 0);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}}@-o-keyframes pop-upwards{0%{-webkit-transform:matrix(0.97, 0, 0, 1, 0, 12);-moz-transform:matrix(0.97, 0, 0, 1, 0, 12);-ms-transform:matrix(0.97, 0, 0, 1, 0, 12);-o-transform:matrix(0.97, 0, 0, 1, 0, 12);transform:matrix(0.97, 0, 0, 1, 0, 12);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0}20%{-webkit-transform:matrix(0.99, 0, 0, 1, 0, 2);-moz-transform:matrix(0.99, 0, 0, 1, 0, 2);-ms-transform:matrix(0.99, 0, 0, 1, 0, 2);-o-transform:matrix(0.99, 0, 0, 1, 0, 2);transform:matrix(0.99, 0, 0, 1, 0, 2);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);opacity:0.7}40%{-webkit-transform:matrix(1, 0, 0, 1, 0, -1);-moz-transform:matrix(1, 0, 0, 1, 0, -1);-ms-transform:matrix(1, 0, 0, 1, 0, -1);-o-transform:matrix(1, 0, 0, 1, 0, -1);transform:matrix(1, 0, 0, 1, 0, -1);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}70%{-webkit-transform:matrix(1, 0, 0, 1, 0, 0);-moz-transform:matrix(1, 0, 0, 1, 0, 0);-ms-transform:matrix(1, 0, 0, 1, 0, 0);-o-transform:matrix(1, 0, 0, 1, 0, 0);transform:matrix(1, 0, 0, 1, 0, 0);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}100%{-webkit-transform:matrix(1, 0, 0, 1, 0, 0);-moz-transform:matrix(1, 0, 0, 1, 0, 0);-ms-transform:matrix(1, 0, 0, 1, 0, 0);-o-transform:matrix(1, 0, 0, 1, 0, 0);transform:matrix(1, 0, 0, 1, 0, 0);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}}@keyframes pop-upwards{0%{-webkit-transform:matrix(0.97, 0, 0, 1, 0, 12);-moz-transform:matrix(0.97, 0, 0, 1, 0, 12);-ms-transform:matrix(0.97, 0, 0, 1, 0, 12);-o-transform:matrix(0.97, 0, 0, 1, 0, 12);transform:matrix(0.97, 0, 0, 1, 0, 12);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0}20%{-webkit-transform:matrix(0.99, 0, 0, 1, 0, 2);-moz-transform:matrix(0.99, 0, 0, 1, 0, 2);-ms-transform:matrix(0.99, 0, 0, 1, 0, 2);-o-transform:matrix(0.99, 0, 0, 1, 0, 2);transform:matrix(0.99, 0, 0, 1, 0, 2);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);opacity:0.7}40%{-webkit-transform:matrix(1, 0, 0, 1, 0, -1);-moz-transform:matrix(1, 0, 0, 1, 0, -1);-ms-transform:matrix(1, 0, 0, 1, 0, -1);-o-transform:matrix(1, 0, 0, 1, 0, -1);transform:matrix(1, 0, 0, 1, 0, -1);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}70%{-webkit-transform:matrix(1, 0, 0, 1, 0, 0);-moz-transform:matrix(1, 0, 0, 1, 0, 0);-ms-transform:matrix(1, 0, 0, 1, 0, 0);-o-transform:matrix(1, 0, 0, 1, 0, 0);transform:matrix(1, 0, 0, 1, 0, 0);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}100%{-webkit-transform:matrix(1, 0, 0, 1, 0, 0);-moz-transform:matrix(1, 0, 0, 1, 0, 0);-ms-transform:matrix(1, 0, 0, 1, 0, 0);-o-transform:matrix(1, 0, 0, 1, 0, 0);transform:matrix(1, 0, 0, 1, 0, 0);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}}
1
+ .clearfix:after{display:block;visibility:hidden;clear:both;height:0;content:" ";font-size:0}.medium-toolbar-arrow,.medium-toolbar-arrow-under:after,.medium-toolbar-arrow-over:before{content:"";display:block;position:absolute;left:50%;margin-left:-8px;width:0;height:0;border-style:solid}.medium-toolbar-arrow-under:after{top:50px;border-width:8px 8px 0 8px;border-color:#242424 transparent transparent transparent}.medium-toolbar-arrow-over:before{top:-8px;border-width:0 8px 8px 8px;border-color:transparent transparent #242424 transparent}.medium-editor-toolbar{position:absolute;top:0;left:0;z-index:600;visibility:hidden;background-color:#242424;border:1px solid #000;font-family:HelveticaNeue, Helvetica, Arial, sans-serif;font-size:16px;background:-webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, #242424), color-stop(100%, rgba(36,36,36,0.75)));background:-webkit-linear-gradient(bottom, #242424,rgba(36,36,36,0.75));background:-moz-linear-gradient(bottom, #242424,rgba(36,36,36,0.75));background:-o-linear-gradient(bottom, #242424,rgba(36,36,36,0.75));background:linear-gradient(bottom, #242424,rgba(36,36,36,0.75));-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px;-webkit-box-shadow:0 0 3px #000;-moz-box-shadow:0 0 3px #000;box-shadow:0 0 3px #000;-webkit-transition:top 0.075s ease-out,left 0.075s ease-out;-moz-transition:top 0.075s ease-out,left 0.075s ease-out;-o-transition:top 0.075s ease-out,left 0.075s ease-out;transition:top 0.075s ease-out,left 0.075s ease-out}.medium-editor-toolbar ul{margin:0;padding:0}.medium-editor-toolbar li{float:left;list-style:none}.medium-editor-toolbar li button{display:block;padding:15px;height:50px;width:50px;background-color:#242424;color:#fff;border:0;border-right:1px solid #000;border-left:1px solid #333;border-left:1px solid rgba(255,255,255,0.1);font-weight:bold;text-decoration:none;text-transform:uppercase;background:-webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, #242424), color-stop(100%, rgba(36,36,36,0.89)));background:-webkit-linear-gradient(bottom, #242424,rgba(36,36,36,0.89));background:-moz-linear-gradient(bottom, #242424,rgba(36,36,36,0.89));background:-o-linear-gradient(bottom, #242424,rgba(36,36,36,0.89));background:linear-gradient(bottom, #242424,rgba(36,36,36,0.89));-webkit-box-shadow:0 2px 2px rgba(0,0,0,0.3);-moz-box-shadow:0 2px 2px rgba(0,0,0,0.3);box-shadow:0 2px 2px rgba(0,0,0,0.3);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:background-color 0.2s ease-in;-moz-transition:background-color 0.2s ease-in;-o-transition:background-color 0.2s ease-in;transition:background-color 0.2s ease-in}.medium-editor-toolbar li button:hover{color:yellow;background-color:#000}.medium-editor-toolbar li .medium-editor-button-first{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;border-top-left-radius:5px;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;border-bottom-left-radius:5px}.medium-editor-toolbar li .medium-editor-button-last{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;border-top-right-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;border-bottom-right-radius:5px}.medium-editor-toolbar li .medium-editor-button-active{background-color:#000;background:-webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, #242424), color-stop(100%, rgba(0,0,0,0.89)));background:-webkit-linear-gradient(bottom, #242424,rgba(0,0,0,0.89));background:-moz-linear-gradient(bottom, #242424,rgba(0,0,0,0.89));background:-o-linear-gradient(bottom, #242424,rgba(0,0,0,0.89));background:linear-gradient(bottom, #242424,rgba(0,0,0,0.89));color:#fff}.medium-editor-toolbar li .medium-editor-action-underline{text-decoration:underline}.medium-editor-toolbar li .medium-editor-action-pre{font-family:'Menlo', monospace;font-size:12px;font-weight:100;padding:15px 0}.medium-editor-toolbar-active{visibility:visible;-webkit-animation:pop-upwards 160ms forwards linear;-moz-animation:pop-upwards 160ms forwards linear;-ms-animation:pop-upwards 160ms forwards linear;-o-animation:pop-upwards 160ms forwards linear;animation:pop-upwards 160ms forwards linear;-webkit-transition:top 0.075s ease-out,left 0.075s ease-out;-moz-transition:top 0.075s ease-out,left 0.075s ease-out;-o-transition:top 0.075s ease-out,left 0.075s ease-out;transition:top 0.075s ease-out,left 0.075s ease-out}.medium-editor-action-bold{font-weight:bolder}.medium-editor-action-italic{font-style:italic}.medium-editor-toolbar-form-anchor{display:none;background:#242424;color:#999;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px}.medium-editor-toolbar-form-anchor input,.medium-editor-toolbar-form-anchor a{font-family:HelveticaNeue, Helvetica, Arial, sans-serif}.medium-editor-toolbar-form-anchor input{padding:6px;height:50px;width:316px;background:#242424;border:none;color:#ccc;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.medium-editor-toolbar-form-anchor input:focus{outline:0;-moz-appearance:none;-webkit-appearance:none}.medium-editor-toolbar-form-anchor a{color:#fff;font-weight:bolder;font-size:24px;display:inline-block;margin:0 10px;text-decoration:none}.medium-editor-placeholder{position:relative}.medium-editor-placeholder:after{position:absolute;top:0;left:0;content:attr(data-placeholder);color:#b3b3b1;font-style:italic}@-webkit-keyframes pop-upwards{0%{-webkit-transform:matrix(0.97, 0, 0, 1, 0, 12);-moz-transform:matrix(0.97, 0, 0, 1, 0, 12);-ms-transform:matrix(0.97, 0, 0, 1, 0, 12);-o-transform:matrix(0.97, 0, 0, 1, 0, 12);transform:matrix(0.97, 0, 0, 1, 0, 12);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0}20%{-webkit-transform:matrix(0.99, 0, 0, 1, 0, 2);-moz-transform:matrix(0.99, 0, 0, 1, 0, 2);-ms-transform:matrix(0.99, 0, 0, 1, 0, 2);-o-transform:matrix(0.99, 0, 0, 1, 0, 2);transform:matrix(0.99, 0, 0, 1, 0, 2);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);opacity:0.7}40%{-webkit-transform:matrix(1, 0, 0, 1, 0, -1);-moz-transform:matrix(1, 0, 0, 1, 0, -1);-ms-transform:matrix(1, 0, 0, 1, 0, -1);-o-transform:matrix(1, 0, 0, 1, 0, -1);transform:matrix(1, 0, 0, 1, 0, -1);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}70%{-webkit-transform:matrix(1, 0, 0, 1, 0, 0);-moz-transform:matrix(1, 0, 0, 1, 0, 0);-ms-transform:matrix(1, 0, 0, 1, 0, 0);-o-transform:matrix(1, 0, 0, 1, 0, 0);transform:matrix(1, 0, 0, 1, 0, 0);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}100%{-webkit-transform:matrix(1, 0, 0, 1, 0, 0);-moz-transform:matrix(1, 0, 0, 1, 0, 0);-ms-transform:matrix(1, 0, 0, 1, 0, 0);-o-transform:matrix(1, 0, 0, 1, 0, 0);transform:matrix(1, 0, 0, 1, 0, 0);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}}@-moz-keyframes pop-upwards{0%{-webkit-transform:matrix(0.97, 0, 0, 1, 0, 12);-moz-transform:matrix(0.97, 0, 0, 1, 0, 12);-ms-transform:matrix(0.97, 0, 0, 1, 0, 12);-o-transform:matrix(0.97, 0, 0, 1, 0, 12);transform:matrix(0.97, 0, 0, 1, 0, 12);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0}20%{-webkit-transform:matrix(0.99, 0, 0, 1, 0, 2);-moz-transform:matrix(0.99, 0, 0, 1, 0, 2);-ms-transform:matrix(0.99, 0, 0, 1, 0, 2);-o-transform:matrix(0.99, 0, 0, 1, 0, 2);transform:matrix(0.99, 0, 0, 1, 0, 2);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);opacity:0.7}40%{-webkit-transform:matrix(1, 0, 0, 1, 0, -1);-moz-transform:matrix(1, 0, 0, 1, 0, -1);-ms-transform:matrix(1, 0, 0, 1, 0, -1);-o-transform:matrix(1, 0, 0, 1, 0, -1);transform:matrix(1, 0, 0, 1, 0, -1);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}70%{-webkit-transform:matrix(1, 0, 0, 1, 0, 0);-moz-transform:matrix(1, 0, 0, 1, 0, 0);-ms-transform:matrix(1, 0, 0, 1, 0, 0);-o-transform:matrix(1, 0, 0, 1, 0, 0);transform:matrix(1, 0, 0, 1, 0, 0);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}100%{-webkit-transform:matrix(1, 0, 0, 1, 0, 0);-moz-transform:matrix(1, 0, 0, 1, 0, 0);-ms-transform:matrix(1, 0, 0, 1, 0, 0);-o-transform:matrix(1, 0, 0, 1, 0, 0);transform:matrix(1, 0, 0, 1, 0, 0);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}}@-o-keyframes pop-upwards{0%{-webkit-transform:matrix(0.97, 0, 0, 1, 0, 12);-moz-transform:matrix(0.97, 0, 0, 1, 0, 12);-ms-transform:matrix(0.97, 0, 0, 1, 0, 12);-o-transform:matrix(0.97, 0, 0, 1, 0, 12);transform:matrix(0.97, 0, 0, 1, 0, 12);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0}20%{-webkit-transform:matrix(0.99, 0, 0, 1, 0, 2);-moz-transform:matrix(0.99, 0, 0, 1, 0, 2);-ms-transform:matrix(0.99, 0, 0, 1, 0, 2);-o-transform:matrix(0.99, 0, 0, 1, 0, 2);transform:matrix(0.99, 0, 0, 1, 0, 2);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);opacity:0.7}40%{-webkit-transform:matrix(1, 0, 0, 1, 0, -1);-moz-transform:matrix(1, 0, 0, 1, 0, -1);-ms-transform:matrix(1, 0, 0, 1, 0, -1);-o-transform:matrix(1, 0, 0, 1, 0, -1);transform:matrix(1, 0, 0, 1, 0, -1);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}70%{-webkit-transform:matrix(1, 0, 0, 1, 0, 0);-moz-transform:matrix(1, 0, 0, 1, 0, 0);-ms-transform:matrix(1, 0, 0, 1, 0, 0);-o-transform:matrix(1, 0, 0, 1, 0, 0);transform:matrix(1, 0, 0, 1, 0, 0);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}100%{-webkit-transform:matrix(1, 0, 0, 1, 0, 0);-moz-transform:matrix(1, 0, 0, 1, 0, 0);-ms-transform:matrix(1, 0, 0, 1, 0, 0);-o-transform:matrix(1, 0, 0, 1, 0, 0);transform:matrix(1, 0, 0, 1, 0, 0);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}}@keyframes pop-upwards{0%{-webkit-transform:matrix(0.97, 0, 0, 1, 0, 12);-moz-transform:matrix(0.97, 0, 0, 1, 0, 12);-ms-transform:matrix(0.97, 0, 0, 1, 0, 12);-o-transform:matrix(0.97, 0, 0, 1, 0, 12);transform:matrix(0.97, 0, 0, 1, 0, 12);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0}20%{-webkit-transform:matrix(0.99, 0, 0, 1, 0, 2);-moz-transform:matrix(0.99, 0, 0, 1, 0, 2);-ms-transform:matrix(0.99, 0, 0, 1, 0, 2);-o-transform:matrix(0.99, 0, 0, 1, 0, 2);transform:matrix(0.99, 0, 0, 1, 0, 2);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);opacity:0.7}40%{-webkit-transform:matrix(1, 0, 0, 1, 0, -1);-moz-transform:matrix(1, 0, 0, 1, 0, -1);-ms-transform:matrix(1, 0, 0, 1, 0, -1);-o-transform:matrix(1, 0, 0, 1, 0, -1);transform:matrix(1, 0, 0, 1, 0, -1);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}70%{-webkit-transform:matrix(1, 0, 0, 1, 0, 0);-moz-transform:matrix(1, 0, 0, 1, 0, 0);-ms-transform:matrix(1, 0, 0, 1, 0, 0);-o-transform:matrix(1, 0, 0, 1, 0, 0);transform:matrix(1, 0, 0, 1, 0, 0);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}100%{-webkit-transform:matrix(1, 0, 0, 1, 0, 0);-moz-transform:matrix(1, 0, 0, 1, 0, 0);-ms-transform:matrix(1, 0, 0, 1, 0, 0);-o-transform:matrix(1, 0, 0, 1, 0, 0);transform:matrix(1, 0, 0, 1, 0, 0);filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}}
@@ -10,5 +10,6 @@
10
10
  *
11
11
  *= require_self
12
12
  *= require adminpanel/medium-editor
13
+ *= require font-awesome
13
14
  *= require_tree ./adminpanel/.
14
- */
15
+ */
@@ -1,32 +1,39 @@
1
1
  module Adminpanel
2
- class ApplicationController < ActionController::Base
3
- protect_from_forgery
2
+ class ApplicationController < ActionController::Base
3
+ protect_from_forgery
4
4
 
5
- inherit_resources
5
+ inherit_resources
6
6
 
7
- include SessionsHelper
8
- include RestActionsHelper
7
+ include SessionsHelper
8
+ include Adminpanel::RestActions
9
+ include Adminpanel::GalleryzableActions
9
10
 
10
- layout 'admin'
11
+ layout 'admin'
11
12
 
12
- before_filter :signed_in_user, :set_model
13
+ before_filter :signed_in_user, :set_model, :strong_params_for_cancan
13
14
 
14
- rescue_from CanCan::AccessDenied do |exception|
15
- sign_out
16
- redirect_to signin_path, :alert => I18n.t('authentication.not_authorized')
17
- end
15
+ def strong_params_for_cancan
16
+ resource = controller_name.singularize.to_sym
17
+ method = "#{resource}_params"
18
+ params[resource] &&= send(method) if respond_to?(method, true)
19
+ end
18
20
 
19
- def signed_in_user
20
- redirect_to signin_url, :notice => I18n.t("authentication.welcome") unless signed_in?
21
- end
21
+ rescue_from CanCan::AccessDenied do |exception|
22
+ sign_out
23
+ redirect_to signin_path, :alert => I18n.t('authentication.not_authorized')
24
+ end
22
25
 
23
- def set_model
24
- @model = params[:controller].classify.constantize
25
- end
26
+ def signed_in_user
27
+ redirect_to signin_url, :notice => I18n.t("authentication.welcome") unless signed_in?
28
+ end
29
+
30
+ def set_model
31
+ @model = params[:controller].classify.constantize
32
+ end
26
33
 
27
- def handle_unverified_request
28
- sign_out
29
- super
30
- end
34
+ def handle_unverified_request
35
+ sign_out
36
+ super
31
37
  end
38
+ end
32
39
  end
@@ -11,7 +11,7 @@ module Adminpanel
11
11
  new! do |format|
12
12
  format.html { render "shared/new" }
13
13
  format.js do
14
- render :locals => {:resource => resource}
14
+ render
15
15
  end
16
16
  end
17
17
  end
@@ -21,6 +21,7 @@ module Adminpanel
21
21
  params.merge({:model_name => params[:model_name]}) if params[:model_name].present?
22
22
  params.merge({:model => params[:model]}) if params[:model].present?
23
23
  params.merge({:currentcontroller => params[:currentcontroller]}) if params[:currentcontroller].present?
24
+ params.merge({:belongs_request => params[:belongs_request]}) if params[:belongs_request].present?
24
25
 
25
26
  create! do |success, failure|
26
27
  success.html do
@@ -29,18 +30,20 @@ module Adminpanel
29
30
  end
30
31
  failure.html do
31
32
  set_collections
32
- render "shared/new"
33
+ render 'shared/new'
33
34
  end
34
35
  success.js do
35
- if params[:currentcontroller] == 'adminpanel/categories'
36
+ if params[:currentcontroller].to_s == 'adminpanel/categories'
36
37
  render 'create', :locals => {:category => resource}
38
+ elsif params[:belongs_request].present?
39
+ render 'shared/create_belongs_to'
37
40
  else
38
- render 'shared/create_has_many', :locals => {:resource => resource}
41
+ render 'shared/create_has_many'
39
42
  end
40
43
  end
41
44
  failure.js do
42
45
  set_collections
43
- render "new", :locals => {:resource => resource }
46
+ render "new"
44
47
 
45
48
  end
46
49
  end
@@ -76,5 +79,13 @@ module Adminpanel
76
79
  end
77
80
  end
78
81
  end
82
+
83
+ private
84
+ def category_params
85
+ params.require(:category).permit(:name, :model)
86
+ # permitted.permit(:currentcontroller)
87
+ # params.require(:currentcontroller)
88
+
89
+ end
79
90
  end
80
91
  end
@@ -1,14 +1,14 @@
1
1
  module Adminpanel
2
2
  class GalleriesController < Adminpanel::ApplicationController
3
3
  load_and_authorize_resource
4
-
4
+
5
5
  def index
6
- @galleries = Gallery.find(:all)
6
+ @galleries = Gallery.all
7
7
  end
8
8
 
9
- def show
10
- @gallery = Gallery.find(params[:id])
11
- end
9
+ # def show
10
+ # @gallery = Gallery.find(params[:id])
11
+ # end
12
12
 
13
13
  # def edit
14
14
  # @gallery = Gallery.find(params[:id])
@@ -79,5 +79,11 @@ module Adminpanel
79
79
  # def new
80
80
  # @gallery = Gallery.new
81
81
  # end
82
+
83
+ private
84
+ def gallery_params
85
+ params.require(:gallery).permit(:file)
86
+
87
+ end
82
88
  end
83
89
  end
@@ -48,5 +48,19 @@ module Adminpanel
48
48
  def index
49
49
  @sections = Section.all
50
50
  end
51
+
52
+ private
53
+ def section_params
54
+ params.require(:section).permit(
55
+ :description,
56
+ :has_image,
57
+ :key,
58
+ :page,
59
+ :name,
60
+ :has_description,
61
+ :images_attributes => [:id, :file]
62
+ )
63
+
64
+ end
51
65
  end
52
66
  end