ksk 0.3.0 → 0.3.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 +4 -4
- data/VERSION +1 -1
- data/app/assets/javascripts/ksk/application.js +4 -19
- data/app/models/concerns/ksk/asset.rb +3 -3
- data/app/views/bhf/{entries/form → form}/column/_crop_thumbs.html.haml +0 -1
- data/app/views/bhf/{entries/form → form}/has_many/_assets.html.haml +4 -4
- data/app/views/bhf/{entries/form → form}/has_many/_upload.html.haml +3 -2
- data/app/views/bhf/{entries/form → form}/has_one/_asset.html.haml +1 -1
- data/ksk.gemspec +11 -11
- metadata +10 -10
- /data/app/views/bhf/{entries/form → form}/column/_file.html.haml +0 -0
- /data/app/views/bhf/{entries/form → form}/column/_select_file_assets.html.haml +0 -0
- /data/app/views/bhf/{pages → platform}/_navi.html.haml +0 -0
- /data/app/views/bhf/{pages/macro → table}/column/_extern_link.haml +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3c4d598578b73bdcfb5dcbfdaef592c31c541af9
|
|
4
|
+
data.tar.gz: a69d61eb6855cf795d67afb31dd53436cd2079fb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8dd2524833aac95cafc845239bab5ea7f6f0f800f07de8246d4209177d0887be79a418b9d1d7bd1839142af3fd8b428d10fdabf0eee5cbe5cb4255e367f84427
|
|
7
|
+
data.tar.gz: 0d2ba23d5e1b59cf027caba237713cab29be1599b95455b44c0a86f39b3ef0223eaaac6f7d097ca5547bfdcbed5fd53f3b31f11968686e17746217d48745c92c
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.3.
|
|
1
|
+
0.3.2
|
|
@@ -41,24 +41,7 @@ initHelper(function(scope){
|
|
|
41
41
|
}
|
|
42
42
|
}).post(queryParams);
|
|
43
43
|
});
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
scope.getElements('.assets_list').each(function(elem){
|
|
47
|
-
new Sortables(elem, {
|
|
48
|
-
handle: '.handle',
|
|
49
|
-
onStart: function(element, clone){
|
|
50
|
-
element.addClass('dragged');
|
|
51
|
-
},
|
|
52
|
-
onComplete: function(element){
|
|
53
|
-
element.removeClass('dragged');
|
|
54
|
-
new Request({
|
|
55
|
-
method: 'put',
|
|
56
|
-
url: this.element.getParent('ol').get('data-sort-url')
|
|
57
|
-
}).send({data: {order: this.serialize()}});
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
|
|
44
|
+
});
|
|
62
45
|
|
|
63
46
|
cropImages = scope.getElements('.js_crop_image');
|
|
64
47
|
if (cropImages.length) {
|
|
@@ -67,7 +50,9 @@ initHelper(function(scope){
|
|
|
67
50
|
jQuery('.js_crop_image').each(function(){
|
|
68
51
|
var $cropImg = jQuery(this);
|
|
69
52
|
$cropImg.Jcrop({
|
|
70
|
-
|
|
53
|
+
boxWidth: 800,
|
|
54
|
+
boxHeight: 800,
|
|
55
|
+
onSelect: function(c){
|
|
71
56
|
$cropImg.parent().find('.js_cords_x').val(c.x);
|
|
72
57
|
$cropImg.parent().find('.js_cords_y').val(c.y);
|
|
73
58
|
$cropImg.parent().find('.js_cords_w').val(c.w);
|
|
@@ -14,11 +14,11 @@ module Ksk::Asset
|
|
|
14
14
|
|
|
15
15
|
do_not_validate_attachment_file_type :file
|
|
16
16
|
|
|
17
|
-
scope :only_images, -> {where(file_content_type: Bhf
|
|
17
|
+
scope :only_images, -> {where(file_content_type: Bhf.configuration.paperclip_image_types)}
|
|
18
18
|
scope :first_image, -> {only_images.limit(1)}
|
|
19
19
|
scope :other_images, -> {only_images.offset(1)}
|
|
20
20
|
|
|
21
|
-
scope :only_data_files, -> {where('file_content_type not in (?)', Bhf
|
|
21
|
+
scope :only_data_files, -> {where('file_content_type not in (?)', Bhf.configuration.paperclip_image_types)}
|
|
22
22
|
scope :first_data_files, -> {only_data_files.limit(1)}
|
|
23
23
|
|
|
24
24
|
before_file_post_process :is_image?
|
|
@@ -66,7 +66,7 @@ module Ksk::Asset
|
|
|
66
66
|
end
|
|
67
67
|
|
|
68
68
|
def is_image?
|
|
69
|
-
Bhf
|
|
69
|
+
Bhf.configuration.paperclip_image_types.include?(file.content_type)
|
|
70
70
|
end
|
|
71
71
|
|
|
72
72
|
def has_preview?
|
|
@@ -3,18 +3,18 @@
|
|
|
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{:
|
|
6
|
+
%ol.assets_list.js_sortable{data: {sort_url: sort_entries_path('assets')}}
|
|
7
7
|
- imgs.each do |asset|
|
|
8
8
|
%li{id: "#{asset.id}_images"}
|
|
9
|
-
= render partial: 'bhf/
|
|
9
|
+
= render partial: 'bhf/form/has_many/upload', locals: {field: field, f: f, asset: asset, allow_position: !@quick_edit}
|
|
10
10
|
|
|
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{:
|
|
14
|
+
%ol.assets_list.js_sortable{data: {sort_url: sort_entries_path('assets')}}
|
|
15
15
|
- files.each do |asset|
|
|
16
16
|
%li{id: "#{asset.id}_data_files"}
|
|
17
|
-
= render partial: 'bhf/
|
|
17
|
+
= render partial: 'bhf/form/has_many/upload', locals: {field: field, f: f, asset: asset, allow_position: !@quick_edit}
|
|
18
18
|
|
|
19
19
|
.clear
|
|
20
20
|
- unless @quick_edit
|
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
= a.check_box :_destroy
|
|
8
8
|
= a.label :_destroy, t(asset.is_image? ? 'bhf.helpers.image.delete' : 'bhf.helpers.file.delete')
|
|
9
9
|
|
|
10
|
-
- return_to = {return_to:
|
|
10
|
+
- return_to = {return_to: edit_entry_path(@platform.name, f.object)}
|
|
11
11
|
- if asset.is_image?
|
|
12
|
-
=
|
|
12
|
+
= link_to asset.file.url, target: :blank do
|
|
13
|
+
= image_tag(find_smallest_size_url_for_file(asset.file), class: 'uploaded_image float_left')
|
|
13
14
|
= link_to t('ksk.asset.image_preview.button.edit'), edit_entry_path('assets', asset.id, return_to), class: 'alt_button float_right'
|
|
14
15
|
- else
|
|
15
16
|
= link_to asset.file_file_name, asset.file.url, class: 'uploaded_file float_left'
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
= node f, field do
|
|
3
3
|
= f.fields_for field.name, Asset.new do |a|
|
|
4
4
|
- if ! f.object.send(field.name).nil?
|
|
5
|
-
= render partial: 'bhf/
|
|
5
|
+
= render partial: 'bhf/form/has_many/upload', locals: {field: field, f: f, asset: f.object.send(field.name), allow_position: false}
|
|
6
6
|
%div
|
|
7
7
|
= a.file_field :file
|
|
8
8
|
%hr
|
data/ksk.gemspec
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
|
-
# stub: ksk 0.3.
|
|
5
|
+
# stub: ksk 0.3.2 ruby lib
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |s|
|
|
8
8
|
s.name = "ksk"
|
|
9
|
-
s.version = "0.3.
|
|
9
|
+
s.version = "0.3.2"
|
|
10
10
|
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
12
12
|
s.require_paths = ["lib"]
|
|
13
13
|
s.authors = ["Anton Pawlik"]
|
|
14
|
-
s.date = "2014-
|
|
14
|
+
s.date = "2014-07-02"
|
|
15
15
|
s.description = "Fast and friendly"
|
|
16
16
|
s.email = "anton.pawlik@gmail.com"
|
|
17
17
|
s.extra_rdoc_files = [
|
|
@@ -38,14 +38,14 @@ Gem::Specification.new do |s|
|
|
|
38
38
|
"app/models/concerns/ksk/post.rb",
|
|
39
39
|
"app/models/concerns/ksk/preview.rb",
|
|
40
40
|
"app/models/concerns/ksk/static.rb",
|
|
41
|
-
"app/views/bhf/
|
|
42
|
-
"app/views/bhf/
|
|
43
|
-
"app/views/bhf/
|
|
44
|
-
"app/views/bhf/
|
|
45
|
-
"app/views/bhf/
|
|
46
|
-
"app/views/bhf/
|
|
47
|
-
"app/views/bhf/
|
|
48
|
-
"app/views/bhf/
|
|
41
|
+
"app/views/bhf/form/column/_crop_thumbs.html.haml",
|
|
42
|
+
"app/views/bhf/form/column/_file.html.haml",
|
|
43
|
+
"app/views/bhf/form/column/_select_file_assets.html.haml",
|
|
44
|
+
"app/views/bhf/form/has_many/_assets.html.haml",
|
|
45
|
+
"app/views/bhf/form/has_many/_upload.html.haml",
|
|
46
|
+
"app/views/bhf/form/has_one/_asset.html.haml",
|
|
47
|
+
"app/views/bhf/platform/_navi.html.haml",
|
|
48
|
+
"app/views/bhf/table/column/_extern_link.haml",
|
|
49
49
|
"config/locales/de.yml",
|
|
50
50
|
"config/locales/en.yml",
|
|
51
51
|
"config/routes.rb",
|
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.3.
|
|
4
|
+
version: 0.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Anton Pawlik
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-07-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bhf
|
|
@@ -149,14 +149,14 @@ files:
|
|
|
149
149
|
- app/models/concerns/ksk/post.rb
|
|
150
150
|
- app/models/concerns/ksk/preview.rb
|
|
151
151
|
- app/models/concerns/ksk/static.rb
|
|
152
|
-
- app/views/bhf/
|
|
153
|
-
- app/views/bhf/
|
|
154
|
-
- app/views/bhf/
|
|
155
|
-
- app/views/bhf/
|
|
156
|
-
- app/views/bhf/
|
|
157
|
-
- app/views/bhf/
|
|
158
|
-
- app/views/bhf/
|
|
159
|
-
- app/views/bhf/
|
|
152
|
+
- app/views/bhf/form/column/_crop_thumbs.html.haml
|
|
153
|
+
- app/views/bhf/form/column/_file.html.haml
|
|
154
|
+
- app/views/bhf/form/column/_select_file_assets.html.haml
|
|
155
|
+
- app/views/bhf/form/has_many/_assets.html.haml
|
|
156
|
+
- app/views/bhf/form/has_many/_upload.html.haml
|
|
157
|
+
- app/views/bhf/form/has_one/_asset.html.haml
|
|
158
|
+
- app/views/bhf/platform/_navi.html.haml
|
|
159
|
+
- app/views/bhf/table/column/_extern_link.haml
|
|
160
160
|
- config/locales/de.yml
|
|
161
161
|
- config/locales/en.yml
|
|
162
162
|
- config/routes.rb
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|