crimagify 0.0.3.6 → 0.0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/images/crimagify/no_selected_image.jpg +0 -0
- data/app/assets/javascripts/crimagify/actions_cropper.js.erb +38 -16
- data/app/assets/stylesheets/crimagify/{cropper.css.scss → cropify_cropper.css.scss} +2 -2
- data/app/assets/stylesheets/crimagify/cropify_mixin.css.scss +85 -0
- data/app/helpers/crimagify/application_helper.rb +17 -8
- data/app/views/crimagify/crop_partials/_fields_cropper.html.erb +4 -4
- data/app/views/crimagify/crop_partials/_nested_cropper.html.erb +4 -3
- data/app/views/crimagify/cropper/params_cropper.js.erb +5 -6
- data/lib/crimagify/engine.rb +0 -1
- data/lib/crimagify/image_functions.rb +13 -16
- data/lib/crimagify/version.rb +1 -1
- data/lib/generators/crimagify/install/install_generator.rb +3 -3
- data/lib/generators/crimagify/install/templates/{cropper.css.scss → cropify_cropper.css.scss} +3 -2
- data/lib/generators/crimagify/install/templates/cropify_mixin.css.scss +107 -0
- data/lib/generators/crimagify/install/templates/{jquery.Jcrop.css → jquery.cropify.Jcrop.css} +1 -1
- data/test/dummy/app/assets/stylesheets/application.css +1 -1
- data/test/dummy/app/assets/stylesheets/cropify_cropper.css.scss +69 -0
- data/test/dummy/app/assets/stylesheets/cropify_mixin.css.scss +107 -0
- data/test/dummy/app/assets/stylesheets/jquery.cropify.Jcrop.css +165 -0
- data/test/dummy/app/views/products/_form.html.erb +1 -1
- data/test/dummy/app/views/users/_product_fields.html.erb +1 -1
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/schema.rb +46 -0
- metadata +18 -12
- data/app/assets/images/crimagify/no_selected.png +0 -0
- data/app/assets/stylesheets/crimagify/mixin.css.scss +0 -191
- data/lib/generators/crimagify/install/templates/mixin.css.scss +0 -191
- data/test/dummy/app/assets/stylesheets/products.css.scss +0 -3
- data/test/dummy/app/assets/stylesheets/users.css +0 -4
- /data/app/assets/stylesheets/crimagify/{jquery.Jcrop.css → jquery.cropify.Jcrop.css} +0 -0
Binary file
|
@@ -13,21 +13,44 @@ $(function(){
|
|
13
13
|
|
14
14
|
// Events only for crimagify without nested models
|
15
15
|
$(".uploader").on("change", function(evt){
|
16
|
-
//this variable is used for identify on what section pu the resultant image
|
17
16
|
var $this = $(this);
|
17
|
+
var $cropper = $("#cropper_div");
|
18
18
|
var parent_element_id = $this.closest('.global_parent').attr("id");
|
19
19
|
var name_version = $this.closest('.global_parent').attr("name");
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
20
|
+
|
21
|
+
/**/
|
22
|
+
if($cropper.length){
|
23
|
+
$cropper.hide('slow', function(){
|
24
|
+
//$cropper.closest('div.global_parent').find('.uploader').val('');
|
25
|
+
$cropper.hide('slow', function(){
|
26
|
+
$cropper.remove();
|
27
|
+
});
|
28
|
+
|
29
|
+
if (validate_image(evt) == true) {
|
30
|
+
var reader = new FileReader();
|
31
|
+
reader.onloadend = function(e){
|
32
|
+
render_image_temporal(e.target.result, parent_element_id, name_version);
|
33
|
+
render_image = e.target.result;
|
34
|
+
};
|
35
|
+
reader.readAsDataURL(evt.target.files[0]);
|
36
|
+
}else{
|
37
|
+
$this.val('');
|
38
|
+
};
|
39
|
+
});
|
27
40
|
}else{
|
28
|
-
|
29
|
-
|
30
|
-
|
41
|
+
if (validate_image(evt) == true) {
|
42
|
+
var reader = new FileReader();
|
43
|
+
reader.onloadend = function(e){
|
44
|
+
render_image_temporal(e.target.result, parent_element_id, name_version);
|
45
|
+
render_image = e.target.result;
|
46
|
+
};
|
47
|
+
reader.readAsDataURL(evt.target.files[0]);
|
48
|
+
}else{
|
49
|
+
$this.val('');
|
50
|
+
};
|
51
|
+
}
|
52
|
+
/**/
|
53
|
+
});
|
31
54
|
|
32
55
|
// Events only for crimagify with nested models
|
33
56
|
$(".nested_crimagify_images").on("change",".nested_uploader",function(evt){
|
@@ -75,12 +98,12 @@ $(function(){
|
|
75
98
|
});
|
76
99
|
$(".nested_uploader").val('');
|
77
100
|
});
|
78
|
-
$("
|
101
|
+
$(".parent_image").on("click",'.cancel_crop',function(evt){
|
79
102
|
evt.preventDefault();
|
80
103
|
$("#cropper_div").hide("slow", function(){
|
81
104
|
$("#cropper_div").remove();
|
82
105
|
});
|
83
|
-
$(".
|
106
|
+
$(".uploader").val('');
|
84
107
|
});
|
85
108
|
/*====== Crop Image ========*/
|
86
109
|
|
@@ -89,7 +112,7 @@ $(function(){
|
|
89
112
|
parameters($(this));
|
90
113
|
});
|
91
114
|
|
92
|
-
$("
|
115
|
+
$(".parent_image").on("click",'.crop_image',function(){
|
93
116
|
//parent_element_id is filled with the value of DIV parent closest: "imgA","imgB","imgZ"
|
94
117
|
parameters($(this));
|
95
118
|
});
|
@@ -219,7 +242,6 @@ function load_partial_nested(parent_tag_id, name_version, type_img){
|
|
219
242
|
if (max_height_box == "") {
|
220
243
|
max_height_box = 500;
|
221
244
|
}
|
222
|
-
console.log(max_width_box+" "+max_height_box)
|
223
245
|
select = [0,0,ratio_vals.width,ratio_vals.height];
|
224
246
|
var ratio = ratio_vals.width/ratio_vals.height;
|
225
247
|
|
@@ -268,7 +290,7 @@ function parameters($crop){
|
|
268
290
|
"parent_element_id" : parent_tag_id
|
269
291
|
};
|
270
292
|
array_names.push(parent_tag_id);
|
271
|
-
}
|
293
|
+
}
|
272
294
|
$.ajax({
|
273
295
|
url: "/crimagify/params_cropper",
|
274
296
|
type: "POST",
|
@@ -0,0 +1,85 @@
|
|
1
|
+
@mixin opacity($n:1,$ie:100){
|
2
|
+
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity="$n")";
|
3
|
+
moz-opacity:$n;
|
4
|
+
filter: alpha(opacity=$ie);
|
5
|
+
opacity:$n;
|
6
|
+
}
|
7
|
+
@mixin textShadow($px:2px 1px 1px,$color:#000000){
|
8
|
+
text-shadow: $px $color;
|
9
|
+
filter: dropshadow(color=$color, offx=2, offy=2);
|
10
|
+
}
|
11
|
+
@mixin rounded($rounded:5px){
|
12
|
+
-webkit-border-radius:$rounded;
|
13
|
+
-khtml-border-radius:$rounded;
|
14
|
+
-moz-border-radius:$rounded;
|
15
|
+
-o-border-radius:$rounded;
|
16
|
+
border-radius:$rounded;
|
17
|
+
}
|
18
|
+
@mixin spriteImages($padding:10px,$position:-10px -10px,$color:transparent){
|
19
|
+
padding:$padding;
|
20
|
+
background:$color url('/assets/sprite.png') $position no-repeat;
|
21
|
+
}
|
22
|
+
|
23
|
+
@mixin sampleSprite($x){
|
24
|
+
background:transparent image-url('/assets/sprite.png') $x no-repeat;
|
25
|
+
}
|
26
|
+
|
27
|
+
/**/
|
28
|
+
@mixin backgroundImage($imageName:no-logo,$format:png, $repeat:no-repeat,$color:transparent){
|
29
|
+
background:$color url(/assets/system/$imageName$format) $repeat !important;
|
30
|
+
}
|
31
|
+
/*store.scc.scss*/
|
32
|
+
@mixin tableCell(){
|
33
|
+
display:table-cell;
|
34
|
+
vertical-align:middle;
|
35
|
+
text-align:center;
|
36
|
+
}
|
37
|
+
@mixin animation($position:all, $time:0.5s, $move:ease-in-out){
|
38
|
+
-webkit-transition: $position $time $move;
|
39
|
+
-moz-transition: $position $time $move;
|
40
|
+
-o-transition: $position $time $move;
|
41
|
+
-ms-transition: $position $time $move;
|
42
|
+
transition: $position $time $move;
|
43
|
+
}
|
44
|
+
@mixin transformAnimation($scale:1.2){
|
45
|
+
-webkit-transform: scale($scale);
|
46
|
+
-moz-transform: scale($scale);
|
47
|
+
-o-transform: scale($scale);
|
48
|
+
-ms-transform: scale($scale);
|
49
|
+
transform: scale($scale);
|
50
|
+
}
|
51
|
+
@mixin animationdelay($time:0.1s){
|
52
|
+
-webkit-transition-delay: $time;
|
53
|
+
-moz-transition-delay: $time;
|
54
|
+
-o-transition-delay: $time;
|
55
|
+
-ms-transition-delay: $time;
|
56
|
+
transition-delay: $time;
|
57
|
+
|
58
|
+
}
|
59
|
+
@mixin boxShadow($size:1px 1px 1px, $color:#333){
|
60
|
+
-webkit-box-shadow: $size $color;
|
61
|
+
-moz-box-shadow: $size $color;
|
62
|
+
box-shadow: $size $color;
|
63
|
+
}
|
64
|
+
@mixin rotate($rotate:-180deg){
|
65
|
+
-webkit-transform:rotate($rotate);
|
66
|
+
-moz-transform:rotate($rotate);
|
67
|
+
-o-transform:rotate($rotate);
|
68
|
+
-ms-transform:rotate($rotate);
|
69
|
+
transform:rotate($rotate);
|
70
|
+
}
|
71
|
+
@mixin boderRadius($rad){
|
72
|
+
-webkit-border-radius:$rad;
|
73
|
+
-moz-border-radius:$rad;
|
74
|
+
border-radius:$rad;
|
75
|
+
}
|
76
|
+
@mixin dropShadow($size:2px 2px 12px,$op:0.8){
|
77
|
+
filter: drop-shadow($size rgba(0,0,0,$op));
|
78
|
+
-webkit-filter: drop-shadow($size rgba(0,0,0,$op));
|
79
|
+
-moz-filter: drop-shadow($size rgba(0,0,0,$op));
|
80
|
+
-o-filter: drop-shadow($size rgba(0,0,0,$op));
|
81
|
+
ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=135, Color='rgba(0,0,0,"$op")')";
|
82
|
+
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=5,Direction=135,Color='rgba(0,0,0,$op)');
|
83
|
+
//filter: url(#drop-shadow);
|
84
|
+
}
|
85
|
+
/*Degradiants*/
|
@@ -1,19 +1,26 @@
|
|
1
1
|
module Crimagify
|
2
2
|
module ApplicationHelper
|
3
3
|
|
4
|
-
|
4
|
+
def image_cropper(object, options, image_options = {})
|
5
5
|
image_options[:class] = "#{image_options[:class]} img_start"
|
6
6
|
img = object.crimagify_images.where("image_name=?", options[:image_name])
|
7
7
|
version_name = options[:ratio]
|
8
|
+
if options[:label_title].nil?
|
9
|
+
options[:label_title] == "Image"
|
10
|
+
end
|
8
11
|
if img == []
|
9
|
-
url_image = "
|
12
|
+
url_image = "crimagify/no_selected_image.jpg"
|
10
13
|
else
|
11
14
|
url_image = img.first.image_url(options[:ratio]).to_s rescue ""
|
12
15
|
end
|
13
16
|
if url_image == ""
|
14
|
-
|
17
|
+
if ENV['DEFAULT_IMAGE'].nil?
|
18
|
+
url_image = "crimagify/no_selected_image.jpg"
|
19
|
+
else
|
20
|
+
url_image = ENV['DEFAULT_IMAGE'].to_s
|
21
|
+
end
|
15
22
|
end
|
16
|
-
render(:partial => "crimagify/crop_partials/fields_cropper", :locals => { id_image: options[:image_name], url_image: url_image, image_options: image_options, version_name: version_name })
|
23
|
+
render(:partial => "crimagify/crop_partials/fields_cropper", :locals => { id_image: options[:image_name], url_image: url_image, image_options: image_options, version_name: version_name, label_title: options[:label_title] })
|
17
24
|
end
|
18
25
|
|
19
26
|
def images_id(object)
|
@@ -28,9 +35,12 @@ module Crimagify
|
|
28
35
|
image_options[:class] = "#{image_options[:class]} img_start"
|
29
36
|
img = object.crimagify_images.where("image_name=?", options[:image_name])
|
30
37
|
version_name = options[:ratio]
|
38
|
+
if options[:label_title].nil?
|
39
|
+
options[:label_title] == "Image"
|
40
|
+
end
|
31
41
|
if img == []
|
32
42
|
if ENV['DEFAULT_IMAGE'].nil?
|
33
|
-
url_image = "crimagify/
|
43
|
+
url_image = "crimagify/no_selected_image.jpg"
|
34
44
|
else
|
35
45
|
url_image = ENV['DEFAULT_IMAGE'].to_s
|
36
46
|
end
|
@@ -39,13 +49,12 @@ module Crimagify
|
|
39
49
|
end
|
40
50
|
if url_image == ""
|
41
51
|
if ENV['DEFAULT_IMAGE'].nil?
|
42
|
-
url_image = "crimagify/no_selected.
|
52
|
+
url_image = "crimagify/no_selected.jpg"
|
43
53
|
else
|
44
54
|
url_image = ENV['DEFAULT_IMAGE'].to_s
|
45
55
|
end
|
46
56
|
end
|
47
|
-
|
48
|
-
render(:partial => "crimagify/crop_partials/nested_cropper", :locals => { id_image: options[:image_name], url_image: url_image, image_options: image_options, version_name: version_name })
|
57
|
+
render(:partial => "crimagify/crop_partials/nested_cropper", :locals => { id_image: options[:image_name], url_image: url_image, image_options: image_options, version_name: version_name, label_title: options[:label_title] })
|
49
58
|
end
|
50
59
|
|
51
60
|
def nested_images_id(object)
|
@@ -3,13 +3,13 @@
|
|
3
3
|
url_image ||= ''
|
4
4
|
image_options ||= {}
|
5
5
|
version_name ||= {}
|
6
|
-
|
6
|
+
label_title ||= "Image"
|
7
7
|
%>
|
8
|
-
<
|
8
|
+
<div class="crimagify_item">
|
9
9
|
<div id="<%= id_image %>" class="global_parent" name="<%= version_name %>">
|
10
10
|
<%= hidden_field_tag "image_temporal_#{id_image}", {}, :class => "image_temporal", :value => "" %>
|
11
11
|
<div class="number input optional numeric stringish refresh_image">
|
12
|
-
|
12
|
+
<label class="crimagify_label"><%= label_title %></label><br/>
|
13
13
|
<div id="parent_image" class="parent_image" style="display:block;float:left"></div>
|
14
14
|
<%= image_tag url_image, image_options %>
|
15
15
|
<div class="clear"></div>
|
@@ -19,4 +19,4 @@
|
|
19
19
|
<%= file_field_tag :image, :id => "uploader", :class => "uploader" %>
|
20
20
|
</div>
|
21
21
|
</div>
|
22
|
-
</
|
22
|
+
</div>
|
@@ -3,12 +3,13 @@
|
|
3
3
|
url_image ||= ''
|
4
4
|
image_options ||= {}
|
5
5
|
version_name ||= {}
|
6
|
+
label_title ||= "Image"
|
6
7
|
%>
|
7
|
-
<
|
8
|
+
<div class="crimagify_item">
|
8
9
|
<div data-img="<%= id_image %>" class="global_parent <%= id_image %>" name="<%= version_name %>">
|
9
10
|
<%= hidden_field_tag "image_temporal_#{id_image}", {}, :value => "", :name => "image_temporal_#{id_image}", :class => "image_temporal image_temporal_#{id_image}" %>
|
10
11
|
<div class="number input optional numeric stringish refresh_image">
|
11
|
-
|
12
|
+
<label class="crimagify_label"><%= label_title %></label><br/>
|
12
13
|
<div class="parent_image"></div>
|
13
14
|
<%= image_tag url_image, image_options %>
|
14
15
|
<div class="clear"></div>
|
@@ -18,4 +19,4 @@
|
|
18
19
|
<%= file_field_tag :image, :id => "nested_uploader", :class => "nested_uploader" %>
|
19
20
|
</div>
|
20
21
|
</div>
|
21
|
-
</
|
22
|
+
</div>
|
@@ -1,4 +1,3 @@
|
|
1
|
-
console.dir($.parseJSON("<%=j @img.to_json.html_safe %>"));
|
2
1
|
<% if @img.has_key?(:parent_fieldset) %>
|
3
2
|
if ($("#<%=j @img[:parent_fieldset] %>").find(".<%=j @img[:parent_element_id] %>").find(".parent_image").length) {
|
4
3
|
var $fieldset = $("#<%=j @img[:parent_fieldset] %>");
|
@@ -31,11 +30,11 @@ console.dir($.parseJSON("<%=j @img.to_json.html_safe %>"));
|
|
31
30
|
}
|
32
31
|
<% else %>
|
33
32
|
var $parent = $("#<%=j @img[:parent_element_id] %>");
|
34
|
-
if ($parent.find("
|
33
|
+
if ($parent.find(".parent_image").length) {
|
35
34
|
if ($parent.find(".image_profile").length) {
|
36
35
|
$parent.find(".image_profile").remove();
|
37
36
|
$parent.find(".parent_image").append("<%=j render :partial => 'crimagify/crop_partials/img_final', :object => @img, :locals => { :f => 'f' } %>");
|
38
|
-
$parent.find(".
|
37
|
+
$parent.find(".image_temporal").attr("value", "<%= @img[:path_image] %>");
|
39
38
|
$("#id_images").attr("value", array_names);
|
40
39
|
$parent.find("#<%=j @img[:parent_element_id] %>_crop_x").attr("value", "<%= @img[:crop_x] %>");
|
41
40
|
$parent.find("#<%=j @img[:parent_element_id] %>_crop_y").attr("value", "<%= @img[:crop_y] %>");
|
@@ -43,14 +42,14 @@ console.dir($.parseJSON("<%=j @img.to_json.html_safe %>"));
|
|
43
42
|
$parent.find("#<%=j @img[:parent_element_id] %>_crop_h").attr("value", "<%= @img[:crop_h] %>");
|
44
43
|
} else{
|
45
44
|
$parent.find(".img_start").hide("slow", function(){});
|
46
|
-
$parent.find("
|
47
|
-
$parent.find(".
|
45
|
+
$parent.find(".parent_image").append("<%=j render :partial => 'crimagify/crop_partials/img_final', :object => @img, :locals => { :f => 'f' } %>");
|
46
|
+
$parent.find(".image_temporal").attr("value", "<%= @img[:path_image] %>");
|
48
47
|
$("#id_images").attr("value", array_names);
|
49
48
|
$parent.find("#parent_image").append("<input id='<%=j @img[:parent_element_id] %>_crop_x' name='<%=j @img[:parent_element_id] %>_crop_x' type='hidden' value='<%= @img[:crop_x] %>'>");
|
50
49
|
$parent.find("#parent_image").append("<input id='<%=j @img[:parent_element_id] %>_crop_y' name='<%=j @img[:parent_element_id] %>_crop_y' type='hidden' value='<%= @img[:crop_y] %>'>");
|
51
50
|
$parent.find("#parent_image").append("<input id='<%=j @img[:parent_element_id] %>_crop_w' name='<%=j @img[:parent_element_id] %>_crop_w' type='hidden' value='<%= @img[:crop_w] %>'>");
|
52
51
|
$parent.find("#parent_image").append("<input id='<%=j @img[:parent_element_id] %>_crop_h' name='<%=j @img[:parent_element_id] %>_crop_h' type='hidden' value='<%= @img[:crop_h] %>'>");
|
53
52
|
}
|
54
|
-
$parent.find("
|
53
|
+
$parent.find(".uploader").val('');
|
55
54
|
}
|
56
55
|
<% end %>
|
data/lib/crimagify/engine.rb
CHANGED
@@ -11,7 +11,6 @@ module Crimagify
|
|
11
11
|
|
12
12
|
config.before_configuration do
|
13
13
|
config_setting_app = File.join(Rails.root, 'config', 'crimagify_settings.yml')
|
14
|
-
puts config_setting_app
|
15
14
|
YAML.load(File.open(config_setting_app)).each do |key, value|
|
16
15
|
ENV[key.to_s] = value.to_s
|
17
16
|
end if File.exists?(config_setting_app)
|
@@ -16,9 +16,6 @@ module Crimagify
|
|
16
16
|
path = "#{Rails.root}/app/assets/images/tmps_cropper/#{parent_type}/image_temporal/#{parent_id}/#{parent_fieldset}/#{image_name}"
|
17
17
|
end
|
18
18
|
|
19
|
-
puts "ruta creada para guardar"
|
20
|
-
puts path
|
21
|
-
|
22
19
|
if !File.exist?(path)
|
23
20
|
FileUtils.mkdir_p(path)
|
24
21
|
end
|
@@ -120,7 +117,6 @@ module Crimagify
|
|
120
117
|
else
|
121
118
|
if params[:id_images] != ""
|
122
119
|
id_array = params[:id_images].split(",")
|
123
|
-
|
124
120
|
id_array.map { |image_name|
|
125
121
|
path = params["image_temporal_#{image_name}"]
|
126
122
|
if !(path.to_s == "") && File.exist?(path.to_s)
|
@@ -128,22 +124,23 @@ module Crimagify
|
|
128
124
|
if !(image == [])
|
129
125
|
image.map { |img|
|
130
126
|
img.update_attributes(:image => File.open(path.to_s),
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
127
|
+
:crop_x => params["#{image_name}_crop_x"],
|
128
|
+
:crop_y => params["#{image_name}_crop_y"],
|
129
|
+
:crop_w => params["#{image_name}_crop_w"],
|
130
|
+
:crop_h => params["#{image_name}_crop_h"])
|
135
131
|
img.crop_avatar_real
|
136
132
|
}
|
137
133
|
else
|
138
134
|
img = save_new_image(path,
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
135
|
+
|
136
|
+
params["#{image_name}_crop_x"],
|
137
|
+
params["#{image_name}_crop_y"],
|
138
|
+
params["#{image_name}_crop_w"],
|
139
|
+
params["#{image_name}_crop_h"],
|
140
|
+
object.class.name,
|
141
|
+
object.id,
|
142
|
+
image_name,
|
143
|
+
false)
|
147
144
|
img.save!
|
148
145
|
img.crop_avatar_real
|
149
146
|
end
|
data/lib/crimagify/version.rb
CHANGED
@@ -7,9 +7,9 @@ module Crimagify
|
|
7
7
|
def copy_config_file
|
8
8
|
copy_file "crimagify_versions.yml", "config/crimagify_versions.yml"
|
9
9
|
copy_file "crimagify_settings.yml", "config/crimagify_settings.yml"
|
10
|
-
copy_file "
|
11
|
-
copy_file "jquery.Jcrop.css", "app/assets/stylesheets/jquery.Jcrop.css"
|
12
|
-
copy_file "
|
10
|
+
copy_file "cropify_cropper.css.scss", "app/assets/stylesheets/cropify_cropper.css.scss"
|
11
|
+
copy_file "jquery.cropify.Jcrop.css", "app/assets/stylesheets/jquery.cropify.Jcrop.css"
|
12
|
+
copy_file "cropify_mixin.css.scss", "app/assets/stylesheets/cropify_mixin.css.scss"
|
13
13
|
end
|
14
14
|
|
15
15
|
def copy_migrations
|
@@ -0,0 +1,107 @@
|
|
1
|
+
@mixin opacity($n:1,$ie:100){
|
2
|
+
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity="$n")";
|
3
|
+
moz-opacity:$n;
|
4
|
+
filter: alpha(opacity=$ie);
|
5
|
+
opacity:$n;
|
6
|
+
}
|
7
|
+
@mixin textShadow($px:2px 1px 1px,$color:#000000){
|
8
|
+
text-shadow: $px $color;
|
9
|
+
filter: dropshadow(color=$color, offx=2, offy=2);
|
10
|
+
}
|
11
|
+
@mixin rounded($rounded:5px){
|
12
|
+
-webkit-border-radius:$rounded;
|
13
|
+
-khtml-border-radius:$rounded;
|
14
|
+
-moz-border-radius:$rounded;
|
15
|
+
-o-border-radius:$rounded;
|
16
|
+
border-radius:$rounded;
|
17
|
+
}
|
18
|
+
@mixin spriteImages($padding:10px,$position:-10px -10px,$color:transparent){
|
19
|
+
padding:$padding;
|
20
|
+
background:$color url('/assets/sprite.png') $position no-repeat;
|
21
|
+
}
|
22
|
+
|
23
|
+
@mixin sampleSprite($x){
|
24
|
+
background:transparent image-url('/assets/sprite.png') $x no-repeat;
|
25
|
+
}
|
26
|
+
|
27
|
+
/**/
|
28
|
+
@mixin backgroundImage($imageName:no-logo,$format:png, $repeat:no-repeat,$color:transparent){
|
29
|
+
background:$color url(/assets/system/$imageName$format) $repeat !important;
|
30
|
+
}
|
31
|
+
/*store.scc.scss*/
|
32
|
+
@mixin tableCell(){
|
33
|
+
display:table-cell;
|
34
|
+
vertical-align:middle;
|
35
|
+
text-align:center;
|
36
|
+
}
|
37
|
+
@mixin animation($position:all, $time:0.5s, $move:ease-in-out){
|
38
|
+
-webkit-transition: $position $time $move;
|
39
|
+
-moz-transition: $position $time $move;
|
40
|
+
-o-transition: $position $time $move;
|
41
|
+
-ms-transition: $position $time $move;
|
42
|
+
transition: $position $time $move;
|
43
|
+
}
|
44
|
+
@mixin transformAnimation($scale:1.2){
|
45
|
+
-webkit-transform: scale($scale);
|
46
|
+
-moz-transform: scale($scale);
|
47
|
+
-o-transform: scale($scale);
|
48
|
+
-ms-transform: scale($scale);
|
49
|
+
transform: scale($scale);
|
50
|
+
}
|
51
|
+
@mixin animationdelay($time:0.1s){
|
52
|
+
-webkit-transition-delay: $time;
|
53
|
+
-moz-transition-delay: $time;
|
54
|
+
-o-transition-delay: $time;
|
55
|
+
-ms-transition-delay: $time;
|
56
|
+
transition-delay: $time;
|
57
|
+
|
58
|
+
}
|
59
|
+
@mixin boxShadow($size:1px 1px 1px, $color:#333){
|
60
|
+
-webkit-box-shadow: $size $color;
|
61
|
+
-moz-box-shadow: $size $color;
|
62
|
+
box-shadow: $size $color;
|
63
|
+
}
|
64
|
+
@mixin rotate($rotate:-180deg){
|
65
|
+
-webkit-transform:rotate($rotate);
|
66
|
+
-moz-transform:rotate($rotate);
|
67
|
+
-o-transform:rotate($rotate);
|
68
|
+
-ms-transform:rotate($rotate);
|
69
|
+
transform:rotate($rotate);
|
70
|
+
}
|
71
|
+
@mixin boderRadius($rad){
|
72
|
+
-webkit-border-radius:$rad;
|
73
|
+
-moz-border-radius:$rad;
|
74
|
+
border-radius:$rad;
|
75
|
+
}
|
76
|
+
@mixin dropShadow($size:2px 2px 12px,$op:0.8){
|
77
|
+
filter: drop-shadow($size rgba(0,0,0,$op));
|
78
|
+
-webkit-filter: drop-shadow($size rgba(0,0,0,$op));
|
79
|
+
-moz-filter: drop-shadow($size rgba(0,0,0,$op));
|
80
|
+
-o-filter: drop-shadow($size rgba(0,0,0,$op));
|
81
|
+
ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=135, Color='rgba(0,0,0,"$op")')";
|
82
|
+
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=5,Direction=135,Color='rgba(0,0,0,$op)');
|
83
|
+
//filter: url(#drop-shadow);
|
84
|
+
}
|
85
|
+
/*Degradiants*/
|
86
|
+
|
87
|
+
@mixin blue_skye_to_blue_hard_vert(){
|
88
|
+
background: #3399ff; /* Old browsers */
|
89
|
+
background: -moz-linear-gradient(top, #3399ff 0%, #2268ff 100%); /* FF3.6+ */
|
90
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3399ff), color-stop(100%,#2268ff)); /* Chrome,Safari4+ */
|
91
|
+
background: -webkit-linear-gradient(top, #3399ff 0%,#2268ff 100%); /* Chrome10+,Safari5.1+ */
|
92
|
+
background: -o-linear-gradient(top, #3399ff 0%,#2268ff 100%); /* Opera 11.10+ */
|
93
|
+
background: -ms-linear-gradient(top, #3399ff 0%,#2268ff 100%); /* IE10+ */
|
94
|
+
background: linear-gradient(to bottom, #3399ff 0%,#2268ff 100%); /* W3C */
|
95
|
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3399ff', endColorstr='#2268ff',GradientType=0 ); /* IE6-9 */
|
96
|
+
}
|
97
|
+
|
98
|
+
@mixin black_easy_to_black_dark(){
|
99
|
+
background: #828c95; /* Old browsers */
|
100
|
+
background: -moz-linear-gradient(top, #828c95 0%, #28343b 100%); /* FF3.6+ */
|
101
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#828c95), color-stop(100%,#28343b)); /* Chrome,Safari4+ */
|
102
|
+
background: -webkit-linear-gradient(top, #828c95 0%,#28343b 100%); /* Chrome10+,Safari5.1+ */
|
103
|
+
background: -o-linear-gradient(top, #828c95 0%,#28343b 100%); /* Opera 11.10+ */
|
104
|
+
background: -ms-linear-gradient(top, #828c95 0%,#28343b 100%); /* IE10+ */
|
105
|
+
background: linear-gradient(to bottom, #828c95 0%,#28343b 100%); /* W3C */
|
106
|
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#828c95', endColorstr='#28343b',GradientType=0 ); /* IE6-9 */
|
107
|
+
}
|
@@ -0,0 +1,69 @@
|
|
1
|
+
@import 'cropify_mixin.css.scss';
|
2
|
+
div#parent_image{
|
3
|
+
position:relative !important;
|
4
|
+
z-index:500 !important;
|
5
|
+
}
|
6
|
+
div#cropper_div{
|
7
|
+
position: absolute !important;
|
8
|
+
top: 0 !important;
|
9
|
+
left: 0 !important;
|
10
|
+
//display: none !important;
|
11
|
+
padding:0 0 85px 0 !important;
|
12
|
+
z-index:500 !important;
|
13
|
+
div.cropper_container{
|
14
|
+
position:relative !important;
|
15
|
+
div.image_cropper{
|
16
|
+
@include rounded(3px 3px 0 3px);
|
17
|
+
background:#FFF !important;
|
18
|
+
//@include boxShadow(0px 0px 6px,#222) !important;
|
19
|
+
z-index: 1000 !important;
|
20
|
+
@include dropShadow();
|
21
|
+
border:1px solid #777 !important;
|
22
|
+
padding:10px !important;
|
23
|
+
z-index:10 !important;
|
24
|
+
position:relative !important;
|
25
|
+
}
|
26
|
+
div.actions{
|
27
|
+
padding:8px 0 !important;
|
28
|
+
background:#FFF !important;
|
29
|
+
padding:10px !important;
|
30
|
+
margin-top:0 !important;
|
31
|
+
border:1px solid #777 !important;
|
32
|
+
border-top:none !important;
|
33
|
+
@include rounded(0 0 3px 3px);
|
34
|
+
//@include boxShadow(1px 4px 6px,#666) !important;
|
35
|
+
position:absolute !important;
|
36
|
+
right:-1px !important;
|
37
|
+
bottom:-57px !important;
|
38
|
+
z-index:15 !important;
|
39
|
+
a{
|
40
|
+
text-decoration:none !important;
|
41
|
+
font-size:12px !important;
|
42
|
+
font-weight:bold !important;
|
43
|
+
@include rounded(5px);
|
44
|
+
margin:0 10px 0 0 !important;
|
45
|
+
float:right !important;
|
46
|
+
}
|
47
|
+
a#crop_image{
|
48
|
+
color:#FFFFFF !important;
|
49
|
+
padding:7px 10px !important;
|
50
|
+
@include blue_skye_to_blue_hard_vert;
|
51
|
+
@include boxShadow(1px 1px 4px,#000);
|
52
|
+
}
|
53
|
+
a#cancel_crop{
|
54
|
+
color:#FFFFFF !important;
|
55
|
+
padding:7px 10px !important;
|
56
|
+
@include black_easy_to_black_dark;
|
57
|
+
@include boxShadow(1px 1px 4px,#000);
|
58
|
+
margin:0 !important;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
.cropper_element{
|
64
|
+
position: relative !important;
|
65
|
+
}
|
66
|
+
.refresh_image{
|
67
|
+
position: relative !important;
|
68
|
+
}
|
69
|
+
|