ksk 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{vendor → app}/assets/javascripts/ksk/application.js +4 -10
- data/{vendor → app}/assets/javascripts/ksk/classes/NaviAdmin.js +0 -0
- data/{vendor → app}/assets/stylesheets/ksk/application.css.sass +0 -0
- data/app/helpers/ksk/{application_helper.rb → frontend_helper.rb} +1 -1
- data/app/views/bhf/entries/form/has_many/_assets.html.haml +2 -2
- data/app/views/bhf/entries/form/has_many/_upload.html.haml +3 -3
- data/app/views/bhf/pages/_navi.html.haml +7 -7
- data/config/routes.rb +7 -3
- data/lib/actives/static.rb +1 -0
- data/lib/ksk.rb +6 -6
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97b5b715bb7af5193329121359012da1cb78ef78
|
4
|
+
data.tar.gz: 9870ff9f1f46315745574d2922605ed6395c5836
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e09419e0e64ae4f8d42744950b1fb696bfe37f1b32ed8f3fc4014e03933376fabdb1dd8356bf47db0595f9ba6c11015800eb8cef1032c17c34451271c36c0662
|
7
|
+
data.tar.gz: 861ca03711665305bb055da29870805649a54992c04cf47c34399c6a925aa9fc1deed51a1c182d9055346365dfb08941518935bf2c2a661fc99cb0e457504fea
|
@@ -1,7 +1,7 @@
|
|
1
1
|
//= require_tree ./classes
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
initHelper(function(scope){
|
4
|
+
scope.getElements('.js_tree_holder').each(function(elem){
|
5
5
|
var naviA = new NaviAdmin({
|
6
6
|
elemTree: elem.getElement('.js_tree_list'),
|
7
7
|
onItemDropped: function(item, parent, itemId, parentId){
|
@@ -43,7 +43,7 @@ var kskInit = function(){
|
|
43
43
|
});
|
44
44
|
});
|
45
45
|
|
46
|
-
|
46
|
+
scope.getElements('.assets_list').each(function(elem){
|
47
47
|
new Sortables(elem, {
|
48
48
|
handle: '.handle',
|
49
49
|
onStart: function(element, clone){
|
@@ -58,10 +58,4 @@ var kskInit = function(){
|
|
58
58
|
}
|
59
59
|
});
|
60
60
|
});
|
61
|
-
};
|
62
|
-
|
63
|
-
window.addEvent('domready', kskInit);
|
64
|
-
|
65
|
-
if (document.addEventListener) {
|
66
|
-
document.addEventListener('page:load', kskInit);
|
67
|
-
}
|
61
|
+
});
|
File without changes
|
File without changes
|
@@ -3,7 +3,7 @@
|
|
3
3
|
- imgs = f.object.assets.only_images
|
4
4
|
- if imgs.any?
|
5
5
|
%h4= t('ksk.asset.list.headline.photos')
|
6
|
-
%ol.assets_list{:'data-sort-url' =>
|
6
|
+
%ol.assets_list{:'data-sort-url' => sort_entries_path('assets')}
|
7
7
|
- imgs.each do |asset|
|
8
8
|
%li{id: "#{asset.id}_images"}
|
9
9
|
= render partial: 'bhf/entries/form/has_many/upload', locals: {field: field, f: f, asset: asset, allow_position: !@quick_edit}
|
@@ -11,7 +11,7 @@
|
|
11
11
|
- files = f.object.assets.only_data_files
|
12
12
|
- if files.any?
|
13
13
|
%h4= t('ksk.asset.list.headline.files')
|
14
|
-
%ol.assets_list{:'data-sort-url' =>
|
14
|
+
%ol.assets_list{:'data-sort-url' => sort_entries_path('assets')}
|
15
15
|
- files.each do |asset|
|
16
16
|
%li{id: "#{asset.id}_data_files"}
|
17
17
|
= render partial: 'bhf/entries/form/has_many/upload', locals: {field: field, f: f, asset: asset, allow_position: !@quick_edit}
|
@@ -9,12 +9,12 @@
|
|
9
9
|
|
10
10
|
- if asset.is_image?
|
11
11
|
= image_tag(asset.file.url(:medium), class: 'uploaded_image float_left')
|
12
|
-
= link_to t('ksk.asset.image_preview.button.edit'),
|
12
|
+
= link_to t('ksk.asset.image_preview.button.edit'), edit_entry_path('assets', asset.id), class: 'alt_button float_right'
|
13
13
|
- else
|
14
14
|
= link_to asset.file_file_name, asset.file.url, class: 'uploaded_file float_left'
|
15
15
|
- if asset.has_preview?
|
16
|
-
= link_to t('ksk.asset.file_preview.button.edit'),
|
16
|
+
= link_to t('ksk.asset.file_preview.button.edit'), edit_entry_path('previews', asset.preview), class: 'alt_button float_right'
|
17
17
|
- else
|
18
|
-
= link_to t('ksk.asset.file_preview.button.create'),
|
18
|
+
= link_to t('ksk.asset.file_preview.button.create'), new_entry_path('previews', asset_id: asset.id), class: 'alt_button float_right'
|
19
19
|
|
20
20
|
.clear
|
@@ -2,8 +2,8 @@
|
|
2
2
|
def p_recursive_navi(navis, current_level = 0, max_level = 99, ul = 'ul', first_wrap = '')
|
3
3
|
a = "\n <#{ul}#{first_wrap}>\n"
|
4
4
|
navis.each do |navi|
|
5
|
-
x = link_to 'edit',
|
6
|
-
y = link_to 'delete',
|
5
|
+
x = link_to 'edit', edit_entry_path('navigation', navi), class: 'edit icon'
|
6
|
+
y = link_to 'delete', entry_path('navigation', navi), :method => :delete, :confirm => t('bhf.helpers.promts.confirm'), class: 'delete icon'
|
7
7
|
a += " <li id='navigation_#{navi.id}'><div><span class='title'>#{navi.title}</span> <span class='links'>#{x} #{y}</span></div>"
|
8
8
|
if current_level <= max_level and navi.children.any?
|
9
9
|
a += p_recursive_navi(navi.children, current_level+1, max_level, ul)
|
@@ -19,14 +19,14 @@
|
|
19
19
|
%h4= platform.title
|
20
20
|
%p.info= t('ksk.navigation_sort.info')
|
21
21
|
- unless platform.hide_create
|
22
|
-
%p.create= link_to new_t(platform),
|
22
|
+
%p.create= link_to new_t(platform), new_entry_path(platform.name), class: :alt_button
|
23
23
|
- unless platform.custom_partial
|
24
24
|
= render partial: 'search', locals: {platform: platform} if platform.search?
|
25
25
|
|
26
26
|
.content_box
|
27
|
-
.navi.js_tree_holder{data: {:'update-url' =>
|
27
|
+
.navi.js_tree_holder{data: {:'update-url' => ksk.sort_navigations_path}}
|
28
28
|
= p_recursive_navi(Navigation.top_level, 0, 99, 'ol', ' class="multi_grid js_tree_list"').html_safe
|
29
29
|
|
30
|
-
.template_data.hide{data: {:'update-path' =>
|
31
|
-
= link_to 'edit',
|
32
|
-
= link_to 'delete',
|
30
|
+
.template_data.hide{data: {:'update-path' => ksk.navigations_path, :'prompt-question' => I18n.t('ksk.navigation_sort.prompt_question')}}
|
31
|
+
= link_to 'edit', edit_entry_path('navigation', 'NAVIID'), class: 'edit icon'
|
32
|
+
= link_to 'delete', entry_path('navigation', 'NAVIID'), method: :delete, data: {confirm: t('bhf.helpers.promts.confirm')}, class: 'delete icon'
|
data/config/routes.rb
CHANGED
data/lib/actives/static.rb
CHANGED
data/lib/ksk.rb
CHANGED
@@ -3,16 +3,16 @@ require 'stringex'
|
|
3
3
|
module Ksk
|
4
4
|
class Engine < Rails::Engine
|
5
5
|
|
6
|
+
isolate_namespace Ksk
|
7
|
+
|
6
8
|
config.css << 'ksk/application'
|
7
9
|
config.js << 'ksk/application'
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
put :sort, on: :collection
|
13
|
-
end
|
11
|
+
initializer 'ksk.action_controller' do |app|
|
12
|
+
ActiveSupport.on_load :action_controller do
|
13
|
+
helper Ksk::FrontendHelper
|
14
14
|
end
|
15
|
-
|
15
|
+
end
|
16
16
|
|
17
17
|
end
|
18
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ksk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Pawlik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bhf
|
@@ -45,8 +45,11 @@ extensions: []
|
|
45
45
|
extra_rdoc_files:
|
46
46
|
- README.md
|
47
47
|
files:
|
48
|
+
- app/assets/javascripts/ksk/application.js
|
49
|
+
- app/assets/javascripts/ksk/classes/NaviAdmin.js
|
50
|
+
- app/assets/stylesheets/ksk/application.css.sass
|
48
51
|
- app/controllers/ksk/navigations_controller.rb
|
49
|
-
- app/helpers/ksk/
|
52
|
+
- app/helpers/ksk/frontend_helper.rb
|
50
53
|
- app/views/bhf/entries/form/column/_file.html.haml
|
51
54
|
- app/views/bhf/entries/form/column/_select_file_assets.html.haml
|
52
55
|
- app/views/bhf/entries/form/has_many/_assets.html.haml
|
@@ -67,9 +70,6 @@ files:
|
|
67
70
|
- lib/apdown.rb
|
68
71
|
- lib/ksk.rb
|
69
72
|
- lib/rails/generators/ksk/templates/initializer.rb
|
70
|
-
- vendor/assets/javascripts/ksk/application.js
|
71
|
-
- vendor/assets/javascripts/ksk/classes/NaviAdmin.js
|
72
|
-
- vendor/assets/stylesheets/ksk/application.css.sass
|
73
73
|
- README.md
|
74
74
|
homepage: http://github.com/antpaw/ksk
|
75
75
|
licenses:
|