c80_yax 0.1.0.1 → 0.1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/README.md +50 -13
- data/app/admin/c80_yax/cats.rb +47 -0
- data/app/admin/c80_yax/items.rb +36 -30
- data/app/admin/c80_yax/lib/custom_columns.rb +37 -0
- data/app/admin/c80_yax/prop_names.rb +13 -9
- data/app/admin/c80_yax/strsubcats.rb +114 -57
- data/app/admin/c80_yax/vendors.rb +39 -0
- data/app/assets/javascripts/backend/items.js +1 -1
- data/app/assets/javascripts/backend/strsubcats.js +26 -0
- data/app/assets/javascripts/c80_yax.js.coffee +3 -1
- data/app/assets/javascripts/lib_backend/custom_columns.js +73 -0
- data/app/assets/javascripts/lib_backend/init.js +28 -0
- data/app/assets/javascripts/lib_backend/loading.js +8 -0
- data/app/assets/stylesheets/c80_yax/_mixins/_colors.scss +1 -0
- data/app/assets/stylesheets/c80_yax/_mixins/color_button.scss +31 -0
- data/app/assets/stylesheets/c80_yax/_mixins/shdw.scss +10 -0
- data/app/assets/stylesheets/c80_yax/backend/active_admin/admin_items.scss +1 -1
- data/app/assets/stylesheets/c80_yax/backend/collapsed.scss +1 -1
- data/app/assets/stylesheets/c80_yax/elems/add_to_bucket.scss +11 -0
- data/app/assets/stylesheets/c80_yax/lib/bootstrap_checkboxes.scss +58 -0
- data/app/assets/stylesheets/c80_yax/lib_custom/bootstrap_checkboxes.scss +6 -0
- data/app/assets/stylesheets/c80_yax.scss +1 -0
- data/app/assets/stylesheets/c80_yax_backend.scss +2 -1
- data/app/helpers/c80_yax/items/asterix_helper.rb +13 -0
- data/app/helpers/c80_yax/items/buy_options_helper.rb +33 -0
- data/app/helpers/c80_yax/items/item_view_helper.rb +24 -0
- data/app/helpers/c80_yax/items/photos/item_photos_helper.rb +43 -0
- data/app/helpers/c80_yax/items/render_show_item_helper.rb +17 -0
- data/app/helpers/c80_yax/prop_name_helper.rb +11 -0
- data/app/helpers/c80_yax/strsubcats/props_helper.rb +81 -0
- data/app/helpers/c80_yax/uom_helper.rb +19 -0
- data/app/models/c80_yax/cat.rb +25 -0
- data/app/models/c80_yax/common_prop.rb +51 -0
- data/app/models/c80_yax/concerns/props/parsable.rb +129 -0
- data/app/models/c80_yax/item.rb +3 -1
- data/app/models/c80_yax/item_observer.rb +29 -0
- data/app/models/c80_yax/main_prop.rb +37 -0
- data/app/models/c80_yax/mixins/item/database/props.rb +66 -0
- data/app/models/c80_yax/mixins/strsubcat/database/prop_names_changed.rb +56 -0
- data/app/models/c80_yax/mixins/strsubcat/database/props.rb +37 -0
- data/app/models/c80_yax/prefix_prop.rb +35 -0
- data/app/models/c80_yax/price_prop.rb +47 -0
- data/app/models/c80_yax/prop_name.rb +4 -4
- data/app/models/c80_yax/strsubcat.rb +38 -23
- data/app/models/c80_yax/strsubcat_observer.rb +47 -0
- data/app/models/c80_yax/vendor.rb +16 -0
- data/app/views/admin/strsubcats/_view.html.erb +40 -0
- data/app/views/c80_yax/items/_buy_options.html.erb +9 -0
- data/c80_yax.gemspec +3 -0
- data/config/locales/ru.yml +33 -6
- data/db/migrate/20161030225354_create_c80_yax_items.rb +2 -0
- data/db/migrate/20170620111100_create_c80_yax_cats.rb +11 -0
- data/db/migrate/20170620111401_create_c80_yax_join_table_cats_strsubcats.rb +12 -0
- data/db/migrate/20170620164848_create_c80_yax_price_props.rb +9 -0
- data/db/migrate/20170620164949_create_c80_yax_join_table_price_props_prop_names.rb +12 -0
- data/db/migrate/20170620183838_create_c80_yax_main_props.rb +8 -0
- data/db/migrate/20170620195757_create_c80_yax_join_table_main_props_prop_names.rb +12 -0
- data/db/migrate/20170620200707_create_c80_yax_common_props.rb +8 -0
- data/db/migrate/20170620200808_create_c80_yax_join_table_common_props_prop_names.rb +12 -0
- data/db/migrate/20170621170202_create_c80_yax_prefix_props.rb +8 -0
- data/db/migrate/20170621170808_create_c80_yax_join_table_prefix_props_prop_names.rb +12 -0
- data/db/migrate/20170622193535_create_c80_yax_vendors.rb +11 -0
- data/db/migrate/20170622194040_create_c80_yax_join_table_items_vendors.rb +12 -0
- data/lib/c80_yax/engine.rb +2 -0
- data/lib/c80_yax/strsubcat_runtime_tables.rb +668 -0
- data/lib/c80_yax/version.rb +1 -1
- data/lib/c80_yax.rb +4 -2
- data/lib/generators/c80_yax/install_generator.rb +20 -0
- data/lib/generators/c80_yax/templates/app/helpers/c80_yax/items/show_item_helper.rb +21 -0
- metadata +98 -4
- data/app/assets/stylesheets/c80_yax/mixins.scss +0 -89
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'rails/generators/base'
|
2
|
+
require 'rails/generators/resource_helpers'
|
3
|
+
|
4
|
+
module C80Yax
|
5
|
+
module Generators
|
6
|
+
class InstallGenerator < Rails::Generators::Base
|
7
|
+
source_root File.expand_path('../templates', __FILE__)
|
8
|
+
|
9
|
+
def create_root_folder
|
10
|
+
empty_directory 'app/helpers/c80_yax'
|
11
|
+
end
|
12
|
+
|
13
|
+
def copy_template_file
|
14
|
+
template 'app/helpers/c80_yax/items/show_item_helper.rb',
|
15
|
+
File.join('app/helpers/c80_yax/items', 'show_item_helper.rb')
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module C80Yax
|
2
|
+
module Items
|
3
|
+
module ShowItemHelper
|
4
|
+
|
5
|
+
# напечатать название товара, завёрнутое в H1
|
6
|
+
# с помощью +do_render+ можно ничего не печатать
|
7
|
+
# переопределить в host приложении
|
8
|
+
def h1_item_title(item, do_render = true)
|
9
|
+
if do_render
|
10
|
+
title = item.title
|
11
|
+
"<h1>#{title}</h1>".html_safe
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def render_item_main_props(item)
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: c80_yax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- C80609A
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,6 +38,34 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rails
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '4.2'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '4.2'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: byebug
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
70
|
name: activesupport
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +80,20 @@ dependencies:
|
|
52
80
|
- - ">="
|
53
81
|
- !ruby/object:Gem::Version
|
54
82
|
version: 3.0.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rails-observers
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
55
97
|
description: Gem adds yax to site
|
56
98
|
email:
|
57
99
|
- c080609a@gmail.com
|
@@ -60,37 +102,74 @@ extensions: []
|
|
60
102
|
extra_rdoc_files: []
|
61
103
|
files:
|
62
104
|
- ".gitignore"
|
105
|
+
- ".ruby-gemset"
|
106
|
+
- ".ruby-version"
|
63
107
|
- CODE_OF_CONDUCT.md
|
64
108
|
- Gemfile
|
65
109
|
- LICENSE.txt
|
66
110
|
- README.md
|
67
111
|
- Rakefile
|
112
|
+
- app/admin/c80_yax/cats.rb
|
68
113
|
- app/admin/c80_yax/items.rb
|
114
|
+
- app/admin/c80_yax/lib/custom_columns.rb
|
69
115
|
- app/admin/c80_yax/prop_names.rb
|
70
116
|
- app/admin/c80_yax/strsubcats.rb
|
71
117
|
- app/admin/c80_yax/uoms.rb
|
118
|
+
- app/admin/c80_yax/vendors.rb
|
72
119
|
- app/admin/c80_yax/x_c80_yax.rb
|
73
120
|
- app/assets/javascripts/backend/items.js
|
121
|
+
- app/assets/javascripts/backend/strsubcats.js
|
74
122
|
- app/assets/javascripts/c80_yax.js.coffee
|
75
123
|
- app/assets/javascripts/lib_backend/collapsable-groups.js
|
124
|
+
- app/assets/javascripts/lib_backend/custom_columns.js
|
125
|
+
- app/assets/javascripts/lib_backend/init.js
|
76
126
|
- app/assets/javascripts/lib_backend/jalert.js
|
127
|
+
- app/assets/javascripts/lib_backend/loading.js
|
128
|
+
- app/assets/stylesheets/c80_yax.scss
|
129
|
+
- app/assets/stylesheets/c80_yax/_mixins/_colors.scss
|
130
|
+
- app/assets/stylesheets/c80_yax/_mixins/color_button.scss
|
131
|
+
- app/assets/stylesheets/c80_yax/_mixins/shdw.scss
|
77
132
|
- app/assets/stylesheets/c80_yax/backend/active_admin/admin_items.scss
|
78
133
|
- app/assets/stylesheets/c80_yax/backend/collapsed.scss
|
79
134
|
- app/assets/stylesheets/c80_yax/backend/jquery-my-dialog.scss
|
135
|
+
- app/assets/stylesheets/c80_yax/elems/add_to_bucket.scss
|
136
|
+
- app/assets/stylesheets/c80_yax/lib/bootstrap_checkboxes.scss
|
80
137
|
- app/assets/stylesheets/c80_yax/lib/loading.scss
|
81
|
-
- app/assets/stylesheets/c80_yax/
|
138
|
+
- app/assets/stylesheets/c80_yax/lib_custom/bootstrap_checkboxes.scss
|
82
139
|
- app/assets/stylesheets/c80_yax_backend.scss
|
83
140
|
- app/controllers/c80_yax/admin_data_controller.rb
|
84
141
|
- app/controllers/c80_yax/app_controller.rb
|
85
142
|
- app/helpers/c80_yax/data_helper.rb
|
143
|
+
- app/helpers/c80_yax/items/asterix_helper.rb
|
144
|
+
- app/helpers/c80_yax/items/buy_options_helper.rb
|
145
|
+
- app/helpers/c80_yax/items/item_view_helper.rb
|
146
|
+
- app/helpers/c80_yax/items/photos/item_photos_helper.rb
|
147
|
+
- app/helpers/c80_yax/items/render_show_item_helper.rb
|
148
|
+
- app/helpers/c80_yax/prop_name_helper.rb
|
149
|
+
- app/helpers/c80_yax/strsubcats/props_helper.rb
|
150
|
+
- app/helpers/c80_yax/uom_helper.rb
|
151
|
+
- app/models/c80_yax/cat.rb
|
152
|
+
- app/models/c80_yax/common_prop.rb
|
153
|
+
- app/models/c80_yax/concerns/props/parsable.rb
|
86
154
|
- app/models/c80_yax/iphoto.rb
|
87
155
|
- app/models/c80_yax/item.rb
|
156
|
+
- app/models/c80_yax/item_observer.rb
|
88
157
|
- app/models/c80_yax/item_prop.rb
|
158
|
+
- app/models/c80_yax/main_prop.rb
|
159
|
+
- app/models/c80_yax/mixins/item/database/props.rb
|
160
|
+
- app/models/c80_yax/mixins/strsubcat/database/prop_names_changed.rb
|
161
|
+
- app/models/c80_yax/mixins/strsubcat/database/props.rb
|
162
|
+
- app/models/c80_yax/prefix_prop.rb
|
163
|
+
- app/models/c80_yax/price_prop.rb
|
89
164
|
- app/models/c80_yax/prop.rb
|
90
165
|
- app/models/c80_yax/prop_name.rb
|
91
166
|
- app/models/c80_yax/strsubcat.rb
|
167
|
+
- app/models/c80_yax/strsubcat_observer.rb
|
92
168
|
- app/models/c80_yax/uom.rb
|
169
|
+
- app/models/c80_yax/vendor.rb
|
93
170
|
- app/uploaders/c80_yax/iphoto_uploader.rb
|
171
|
+
- app/views/admin/strsubcats/_view.html.erb
|
172
|
+
- app/views/c80_yax/items/_buy_options.html.erb
|
94
173
|
- bin/console
|
95
174
|
- bin/setup
|
96
175
|
- c80_yax.gemspec
|
@@ -104,10 +183,25 @@ files:
|
|
104
183
|
- db/migrate/20161108095950_create_c80_yax_prop_names.rb
|
105
184
|
- db/migrate/20161108100707_create_c80_yax_join_table_prop_names_strsubcats.rb
|
106
185
|
- db/migrate/20161108102828_create_c80_yax_item_props.rb
|
186
|
+
- db/migrate/20170620111100_create_c80_yax_cats.rb
|
187
|
+
- db/migrate/20170620111401_create_c80_yax_join_table_cats_strsubcats.rb
|
188
|
+
- db/migrate/20170620164848_create_c80_yax_price_props.rb
|
189
|
+
- db/migrate/20170620164949_create_c80_yax_join_table_price_props_prop_names.rb
|
190
|
+
- db/migrate/20170620183838_create_c80_yax_main_props.rb
|
191
|
+
- db/migrate/20170620195757_create_c80_yax_join_table_main_props_prop_names.rb
|
192
|
+
- db/migrate/20170620200707_create_c80_yax_common_props.rb
|
193
|
+
- db/migrate/20170620200808_create_c80_yax_join_table_common_props_prop_names.rb
|
194
|
+
- db/migrate/20170621170202_create_c80_yax_prefix_props.rb
|
195
|
+
- db/migrate/20170621170808_create_c80_yax_join_table_prefix_props_prop_names.rb
|
196
|
+
- db/migrate/20170622193535_create_c80_yax_vendors.rb
|
197
|
+
- db/migrate/20170622194040_create_c80_yax_join_table_items_vendors.rb
|
107
198
|
- db/seeds/c80_yax_01_fill_props.rb
|
108
199
|
- lib/c80_yax.rb
|
109
200
|
- lib/c80_yax/engine.rb
|
201
|
+
- lib/c80_yax/strsubcat_runtime_tables.rb
|
110
202
|
- lib/c80_yax/version.rb
|
203
|
+
- lib/generators/c80_yax/install_generator.rb
|
204
|
+
- lib/generators/c80_yax/templates/app/helpers/c80_yax/items/show_item_helper.rb
|
111
205
|
homepage: https://github.com/c080609a/c80_yax
|
112
206
|
licenses:
|
113
207
|
- MIT
|
@@ -128,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
222
|
version: '0'
|
129
223
|
requirements: []
|
130
224
|
rubyforge_project:
|
131
|
-
rubygems_version: 2.
|
225
|
+
rubygems_version: 2.6.11
|
132
226
|
signing_key:
|
133
227
|
specification_version: 4
|
134
228
|
summary: Yax gem
|
@@ -1,89 +0,0 @@
|
|
1
|
-
// тень
|
2
|
-
@mixin shdw($val) {
|
3
|
-
-webkit-box-shadow: 0 0 7px 0 rgba(0, 0, 0, $val);
|
4
|
-
-moz-box-shadow: 0 0 7px 0 rgba(0, 0, 0, $val);
|
5
|
-
box-shadow: 0 0 7px 0 rgba(0, 0, 0, $val);
|
6
|
-
/* For IE 8 */
|
7
|
-
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=$val, Direction=135, Color='#000000')";
|
8
|
-
/* For IE 5.5 - 7 */
|
9
|
-
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=$val, Direction=135, Color='#000000');
|
10
|
-
}
|
11
|
-
|
12
|
-
@mixin clearfx() {
|
13
|
-
&:before,
|
14
|
-
&:after {
|
15
|
-
content: " ";
|
16
|
-
display: table;
|
17
|
-
}
|
18
|
-
&:after {
|
19
|
-
clear: both;
|
20
|
-
}
|
21
|
-
}
|
22
|
-
|
23
|
-
// ссылка без подчёркивания и обводки
|
24
|
-
//@mixin nounder {
|
25
|
-
// text-decoration: none !important;
|
26
|
-
// border: none !important;
|
27
|
-
// outline: none !important;
|
28
|
-
//
|
29
|
-
// &:hover, &:active, &:focus {
|
30
|
-
// text-decoration: none !important;
|
31
|
-
// border: none !important;
|
32
|
-
// outline: none !important;
|
33
|
-
// }
|
34
|
-
//}
|
35
|
-
|
36
|
-
// анимированный переход цвета
|
37
|
-
//@mixin transition_color($sec) {
|
38
|
-
// -webkit-transition: color $sec ease-out;
|
39
|
-
// -moz-transition: color $sec ease-out;
|
40
|
-
// -ms-transition: color $sec ease-out;
|
41
|
-
// -o-transition: color $sec ease-out;
|
42
|
-
// transition: color $sec ease-out;
|
43
|
-
//}
|
44
|
-
|
45
|
-
// анимированный переход цвета границы
|
46
|
-
//@mixin transition_border_color($sec) {
|
47
|
-
// -webkit-transition: border-color $sec ease-in;
|
48
|
-
// -moz-transition: border-color $sec ease-in;
|
49
|
-
// -ms-transition: border-color $sec ease-in;
|
50
|
-
// -o-transition: border-color $sec ease-in;
|
51
|
-
// transition: border-color $sec ease-in;
|
52
|
-
//}
|
53
|
-
|
54
|
-
//@mixin transform_prop($prop_name,$sec) {
|
55
|
-
// -webkit-transition: $prop_name $sec ease-out;
|
56
|
-
// -moz-transition: $prop_name $sec ease-out;
|
57
|
-
// -ms-transition: $prop_name $sec ease-out;
|
58
|
-
// -o-transition: $prop_name $sec ease-out;
|
59
|
-
// transition: $prop_name $sec ease-out;
|
60
|
-
//}
|
61
|
-
|
62
|
-
// градиент сверху-вниз
|
63
|
-
//@mixin bg_tobottom_gradient($from,$to) {
|
64
|
-
// background-image: linear-gradient(to bottom, $from, $to) !important;
|
65
|
-
// background: -webkit-gradient(linear, left top, left bottom, from($from), to($to));
|
66
|
-
// filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='$from', endColorstr='$to', GradientType=0);
|
67
|
-
//}
|
68
|
-
|
69
|
-
//@mixin transform_scale($scale,$time) {
|
70
|
-
// -webkit-transform: scale($scale);
|
71
|
-
// -moz-transform: scale($scale);
|
72
|
-
// -ms-transform: scale($scale);
|
73
|
-
// -o-transform: scale($scale);
|
74
|
-
// transform: scale($scale);
|
75
|
-
//
|
76
|
-
// -webkit-transition: -webkit-transform $time ease-out;
|
77
|
-
// -moz-transition: -moz-transform $time ease-out;
|
78
|
-
// -ms-transition: -ms-transform $time ease-out;
|
79
|
-
// -o-transition: -o-transform $time ease-out;
|
80
|
-
// transition: transform $time ease-out;
|
81
|
-
//}
|
82
|
-
|
83
|
-
//@mixin opacity($val) {
|
84
|
-
// -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=$val)";
|
85
|
-
// filter: alpha(opacity=$val);
|
86
|
-
// -moz-opacity:$val;
|
87
|
-
// -khtml-opacity: $val;
|
88
|
-
// opacity: $val;
|
89
|
-
//}
|