tkh_admin_panel 0.9.27 → 0.10

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: efab535573e7194cf52653e0a8d75dce40d53918
4
- data.tar.gz: 83468897430cef117b8ebedec210ffc87f03864a
3
+ metadata.gz: d62fcd07cf95c3da9ebe04afd00718368890dec2
4
+ data.tar.gz: 1759c12830643a05cd36321ad960b45cc93222b5
5
5
  SHA512:
6
- metadata.gz: f41a18617100e91168bbd9190b4db6c230fa1a86f7b92ce636036001b3329cf377df4ba7018be1cffaaffe7ce9af03b04eb5b0bb50a3f8fd0dc1d7a302903df7
7
- data.tar.gz: c8b17b8438cba3f6014aa46303ec35723df3193853d71496e95b21bba97bf1eb3a876ad4dba0c58698ab22ecfb1bcd26d1262276fd9cfae7bfa296cc2a50e4bc
6
+ metadata.gz: 8e80da4bbd9be5177312ce723089e5628a801d3619c098a53a1176a4584a9261c03770e0a90aa5e65166e369f3b0a99fbee11ecb5840fcb06d7545ddfea86690
7
+ data.tar.gz: 19dd235d0315f7b40bbf0dbab7dde9340f86d37c2d0780dd5eec8b5516b879990ecac5f8d4b7ced06e6a505cf7131735d7f3205c70acd5629ded7256b36ccd17
@@ -2,6 +2,14 @@
2
2
 
3
3
 
4
4
 
5
+ ## 0.10
6
+
7
+ * Routes work with normal Rails apps as well as those with the route_translator gem
8
+ * Removed the tkh_authentication dependency
9
+ * Improved styling of admin panel
10
+ * The ckeditor gem for inline HTML editing has been moved from the tkh_content gem to this one.
11
+
12
+
5
13
  ## 0.9.27
6
14
 
7
15
  * Fixed deprecation warnings by changing extensions of stylesheets.
@@ -0,0 +1,24 @@
1
+ CKEDITOR.editorConfig = (config) ->
2
+ config.language = 'en'
3
+ config.uiColor = "#AADC6E"
4
+ config.width = '750'
5
+ config.height = '800'
6
+ config.forcePasteAsPlainText = true
7
+ config.allowedContent = true
8
+ # config.extraAllowedContent = true
9
+ config.htmlEncodeOutput = false;
10
+ config.entities = false;
11
+
12
+ config.toolbar_Pure = [
13
+ { name: 'styles', items: [ 'Format' ] },
14
+ { name: 'basicstyles', items: [ 'Bold','Italic','Strike','-','RemoveFormat' ] },
15
+ { name: 'paragraph', items: [ 'BulletedList','NumberedList','-','Outdent','Indent','-','Blockquote','-','JustifyLeft','JustifyCenter','JustifyRight' ] },
16
+ # { name: 'quoteauthor', items: [ element: 'p', attributes : { 'class' : 'author'} ] }, # tried but it did not work
17
+ '/',
18
+ { name: 'clipboard', items: [ 'Undo','Redo' ] },
19
+ { name: 'links', items: [ 'Link','Unlink' ] },
20
+ { name: 'insert', items: [ 'Image','Table','HorizontalRule','SpecialChar' ] },
21
+ { name: 'document', items: [ 'Source','-','Save' ] },
22
+ ]
23
+ config.toolbar = 'Pure'
24
+ true
@@ -56,7 +56,14 @@ input[type="button"], input[type="submit"] {
56
56
 
57
57
  .navbar-login-info { padding-right: 1.5em; }
58
58
 
59
- #admin-menu-tab { margin-bottom: 3em; }
59
+ .nav li.active a {
60
+ background-color: $purple;
61
+ color: #fff;
62
+ a {
63
+ color: #fff;
64
+ font-family: opensanssemibold, $font-family-sans-serif;
65
+ }
66
+ }
60
67
 
61
68
  .list-group {
62
69
  h3 {
@@ -129,12 +136,10 @@ margin: 0;
129
136
  }
130
137
 
131
138
  .pagination {
132
- border-bottom: 1px solid $gray-lighter;
133
- border-top: 1px solid $gray-lighter;
134
139
  display: block;
135
140
  padding: 0.2em;
136
141
  text-align: center;
137
- margin: 0 0 2.5em;
142
+ margin: 1.5rem 0;
138
143
  a { padding: 0 0.15em; }
139
144
  .current { font-style: normal; }
140
145
  .previous_page {
@@ -156,10 +161,10 @@ margin: 0;
156
161
 
157
162
  .draggable {
158
163
  list-style-type: none;
159
- margin: 2em 0 2em 4em;
164
+ margin: 2rem 0 2rem 1rem;
160
165
  li {
161
166
  cursor: move;
162
- margin: 0.5em 0;
167
+ margin: 0.5rem 0;
163
168
  }
164
169
  }
165
170
 
@@ -189,3 +194,17 @@ margin: 0;
189
194
  .admin-comment-body {
190
195
  font-size: 2.5rem;
191
196
  }
197
+
198
+ .badge {
199
+ font-family: opensanslight, "Helvetica Neue", Helvetica, Arial, sans-serif;
200
+ font-weight: normal;
201
+ }
202
+
203
+
204
+ #admin-menu-tab {
205
+ margin-bottom: 3em;
206
+ }
207
+
208
+ .nav-tabs > li > a {
209
+ border-radius: 12px 12px 0 0;
210
+ }
@@ -21,8 +21,10 @@
21
21
 
22
22
  <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
23
23
  <div class="container">
24
+ <div class="navbar-header">
25
+ <%= link_to Setting.first.try(:site_name), root_path, class: "navbar-brand" %>
26
+ </div>
24
27
  <ul class="nav navbar-nav">
25
- <%= content_tag :li, link_to(Setting.first.try(:site_name), root_path) %>
26
28
  <%= content_tag :li, link_to( 'blog', blog_path) unless Setting.first.disable_blog? %>
27
29
  </ul>
28
30
  <%= render 'shared/login_info_for_navbar' %>
@@ -0,0 +1,39 @@
1
+ Ckeditor::Rails.configure do |config|
2
+ # default is nil for all languages, or set as %w[en zh]
3
+ config.assets_languages = nil
4
+
5
+ # default is nil for all plugins,
6
+ # or set as white list: %w[image link liststyle table tabletools]
7
+ # or set as black list: config.default_plugins - %w[about a11yhelp]
8
+ config.assets_plugins = nil
9
+ # config.assets_plugins = %w[image link liststyle table tabletools]
10
+
11
+ # default is nil for all skins, or set as %w[moon]
12
+ config.assets_skins = nil
13
+ end
14
+
15
+ ###################### from old JS config which was working great
16
+ # CKEDITOR.editorConfig = (config) ->
17
+ # config.language = tkh_locale
18
+ # config.uiColor = "#AADC6E"
19
+ # config.width = '650'
20
+ # config.height = '450'
21
+ # config.forcePasteAsPlainText = true
22
+ # config.allowedContent = true
23
+ # # config.extraAllowedContent = true
24
+ # config.htmlEncodeOutput = false;
25
+ # config.entities = false;
26
+
27
+ # config.toolbar_Pure = [
28
+ # { name: 'styles', items: [ 'Format' ] },
29
+ # { name: 'basicstyles', items: [ 'Bold','Italic','Strike','-','RemoveFormat' ] },
30
+ # { name: 'paragraph', items: [ 'BulletedList','NumberedList','-','Outdent','Indent','-','Blockquote','-','JustifyLeft','JustifyCenter','JustifyRight' ] },
31
+ # # { name: 'quoteauthor', items: [ element: 'p', attributes : { 'class' : 'author'} ] }, # tried but it did not work
32
+ # '/',
33
+ # { name: 'clipboard', items: [ 'Undo','Redo' ] },
34
+ # { name: 'links', items: [ 'Link','Unlink' ] },
35
+ # { name: 'insert', items: [ 'Image','Table','HorizontalRule','SpecialChar' ] },
36
+ # { name: 'document', items: [ 'Source','-','Save' ] },
37
+ # ]
38
+ # config.toolbar = 'Pure'
39
+ # true
@@ -1,5 +1,17 @@
1
1
  Rails.application.routes.draw do
2
- scope "(:locale)" do
3
- resources :settings
2
+
3
+ if Gem::Specification::find_all_by_name('route_translator').any?
4
+
5
+ localized do
6
+ resources :settings
7
+ end
8
+
9
+ else # using normal Rails i18n routes
10
+
11
+ scope "(:locale)", locale: /#{I18n.available_locales.join("|")}/ do
12
+ resources :settings
13
+ end
14
+
4
15
  end
16
+
5
17
  end
@@ -1,5 +1,5 @@
1
1
  require 'rails/generators/migration'
2
-
2
+
3
3
  module TkhAdminPanel
4
4
  module Generators
5
5
  class CreateOrUpdateMigrationsGenerator < ::Rails::Generators::Base
@@ -14,13 +14,13 @@ module TkhAdminPanel
14
14
  end
15
15
  @prev_migration_nr.to_s
16
16
  end
17
-
17
+
18
18
  def copy_migrations
19
19
  puts 'creating or updating setting migrations'
20
20
  migration_template "create_settings.rb", "db/migrate/create_settings.rb"
21
21
  migration_template "add_contact_email_to_settings.rb", "db/migrate/add_contact_email_to_settings.rb"
22
22
  end
23
-
23
+
24
24
  end
25
25
  end
26
- end
26
+ end
@@ -8,14 +8,15 @@ require 'will_paginate'
8
8
  require 'twitter-typeahead-rails'
9
9
  require 'simple_form'
10
10
  require 'tkh_admin_panel/tkh_admin_panel_action_controller_extension'
11
- require 'tkh_authentication'
11
+ # require 'tkh_authentication'
12
12
  require 'jquery-ui-rails'
13
+ require 'ckeditor_rails'
13
14
 
14
15
  module TkhAdminPanel
15
16
  class Engine < ::Rails::Engine
16
17
  # debugging. this is not working. moving directive to host app
17
18
  initializer "TkhAdminPanel precompile hook", :group => :all do |app|
18
- app.config.assets.precompile += ['admin.js', 'admin.css', 'admin/pages.js', 'admin/illustrations.js', 'admin/menus.js']
19
+ app.config.assets.precompile += ['admin.js', 'admin.css', 'admin/pages.js', 'admin/illustrations.js', 'admin/menus.js', 'admin/ckeditor/config.js']
19
20
  end
20
21
 
21
22
  # to extend the application_controller in the host app
@@ -1,3 +1,3 @@
1
1
  module TkhAdminPanel
2
- VERSION = "0.9.27"
2
+ VERSION = "0.10"
3
3
  end
@@ -20,7 +20,8 @@ Gem::Specification.new do |gem|
20
20
  gem.add_dependency "bootstrap-sass"
21
21
  # following these instructions: https://github.com/twbs/bootstrap-sass
22
22
  gem.add_dependency 'sass-rails'
23
- gem.add_dependency 'autoprefixer-rails' # It is also recommended to use Autoprefixer with Bootstrap to add browser vendor prefixes automatically.
23
+ gem.add_dependency 'ckeditor_rails'
24
+ # gem.add_dependency 'autoprefixer-rails' # It is also recommended to use Autoprefixer with Bootstrap to add browser vendor prefixes automatically.
24
25
  gem.add_dependency "bootstrap-will_paginate"
25
26
  gem.add_dependency "will_paginate"
26
27
  # twitter-typeahead-rails is for autocomplete fields in forms
@@ -28,6 +29,6 @@ Gem::Specification.new do |gem|
28
29
  # I'll upgrade when I figure out the new API
29
30
  gem.add_dependency 'twitter-typeahead-rails', '~> 0.9.3'
30
31
  gem.add_dependency "simple_form"
31
- gem.add_dependency "tkh_authentication", '~> 0.9'
32
+ # gem.add_dependency "tkh_authentication", '~> 0.9'
32
33
  gem.add_dependency "jquery-ui-rails"
33
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tkh_admin_panel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.27
4
+ version: '0.10'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swami Atma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-21 00:00:00.000000000 Z
11
+ date: 2015-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: autoprefixer-rails
70
+ name: ckeditor_rails
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -136,20 +136,6 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: tkh_authentication
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: '0.9'
146
- type: :runtime
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: '0.9'
153
139
  - !ruby/object:Gem::Dependency
154
140
  name: jquery-ui-rails
155
141
  requirement: !ruby/object:Gem::Requirement
@@ -207,6 +193,7 @@ files:
207
193
  - app/assets/javascripts/admin/illustrations.js.coffee
208
194
  - app/assets/javascripts/admin/menus.js.coffee
209
195
  - app/assets/javascripts/admin/pages.js.coffee
196
+ - app/assets/javascripts/ckeditor/config.js.coffee
210
197
  - app/assets/stylesheets/admin.css.scss
211
198
  - app/assets/stylesheets/admin/bootstrap_and_overrides.scss
212
199
  - app/assets/stylesheets/admin/custom.scss
@@ -220,6 +207,7 @@ files:
220
207
  - app/views/settings/edit.html.erb
221
208
  - app/views/settings/show.html.erb
222
209
  - app/views/shared/_admin_sidebar.html.erb
210
+ - config/initializers/ckeditor_rails.rb
223
211
  - config/routes.rb
224
212
  - lib/generators/tkh_admin_panel/copy_files/copy_files_generator.rb
225
213
  - lib/generators/tkh_admin_panel/copy_files/templates/_admin_sidebar.html.erb