c80_map_floors 0.1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.travis.yml +3 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +67 -0
- data/Rakefile +1 -0
- data/app/admin/c80_map_floors/floors.rb +57 -0
- data/app/admin/c80_map_floors/map_buildings.rb +49 -0
- data/app/admin/c80_map_floors/settings.rb +32 -0
- data/app/assets/javascripts/buttons/admin_buttons/button_area_link.js +91 -0
- data/app/assets/javascripts/buttons/admin_buttons/button_building_link.js +91 -0
- data/app/assets/javascripts/buttons/admin_buttons/button_cancel_create.js +21 -0
- data/app/assets/javascripts/buttons/admin_buttons/button_cancel_remove.js +23 -0
- data/app/assets/javascripts/buttons/admin_buttons/button_complete_create.js +22 -0
- data/app/assets/javascripts/buttons/admin_buttons/button_edit.js +96 -0
- data/app/assets/javascripts/buttons/admin_buttons/button_new.js +46 -0
- data/app/assets/javascripts/buttons/admin_buttons/button_remove.js +23 -0
- data/app/assets/javascripts/buttons/admin_buttons/button_save.js +111 -0
- data/app/assets/javascripts/buttons/button_back_to_map.js +84 -0
- data/app/assets/javascripts/buttons/zoom_buttons.js +78 -0
- data/app/assets/javascripts/c80_map_floors.js.coffee +23 -0
- data/app/assets/javascripts/events/app_event.js +15 -0
- data/app/assets/javascripts/map_objects/area.js +251 -0
- data/app/assets/javascripts/map_objects/building.js +294 -0
- data/app/assets/javascripts/map_objects/dot.js +14 -0
- data/app/assets/javascripts/map_objects/floor.js +10 -0
- data/app/assets/javascripts/src/main.js +1421 -0
- data/app/assets/javascripts/src/state_controller.js +322 -0
- data/app/assets/javascripts/src/utils/map_utils.js +23 -0
- data/app/assets/javascripts/src/utils/opacity_buttons_utils.js +15 -0
- data/app/assets/javascripts/src/utils/utils.js +140 -0
- data/app/assets/javascripts/svg_elements/area_label.js +25 -0
- data/app/assets/javascripts/svg_elements/building_label.js +65 -0
- data/app/assets/javascripts/svg_elements/helper.js +36 -0
- data/app/assets/javascripts/svg_elements/polygon.js +194 -0
- data/app/assets/javascripts/view/save_preloader.js +30 -0
- data/app/assets/stylesheets/c80_map_floors.scss +4 -0
- data/app/assets/stylesheets/map.scss +1464 -0
- data/app/assets/stylesheets/view/buttons/area_order_button.scss +16 -0
- data/app/assets/stylesheets/view/buttons/back_to_map_button.scss +28 -0
- data/app/assets/stylesheets/view/elems/building_info.scss +54 -0
- data/app/assets/stylesheets/view/elems/free_areas_label.scss +116 -0
- data/app/assets/stylesheets/view/elems/map_objects/map_object_image_bg.scss +10 -0
- data/app/assets/stylesheets/view/modal_window.scss +13 -0
- data/app/assets/stylesheets/view/save_preloader.scss +206 -0
- data/app/controllers/c80_map_floors/ajax_controller.rb +65 -0
- data/app/controllers/c80_map_floors/application_controller.rb +6 -0
- data/app/controllers/c80_map_floors/map_ajax_controller.rb +70 -0
- data/app/helpers/c80_map_floors/application_helper.rb +28 -0
- data/app/models/c80_map_floors/area.rb +20 -0
- data/app/models/c80_map_floors/area_representator.rb +75 -0
- data/app/models/c80_map_floors/base_map_object.rb +41 -0
- data/app/models/c80_map_floors/building_representator.rb +72 -0
- data/app/models/c80_map_floors/floor.rb +37 -0
- data/app/models/c80_map_floors/map_building.rb +45 -0
- data/app/models/c80_map_floors/map_json.rb +35 -0
- data/app/models/c80_map_floors/setting.rb +32 -0
- data/app/uploaders/c80_map_floors/building_image_uploader.rb +31 -0
- data/app/uploaders/c80_map_floors/floor_image_uploader.rb +33 -0
- data/app/uploaders/c80_map_floors/map_image_uploader.rb +31 -0
- data/app/views/c80_map_floors/_map_row_index.html.erb +40 -0
- data/app/views/c80_map_floors/ajax/fetch_unlinked_areas.js.erb +7 -0
- data/app/views/c80_map_floors/ajax/fetch_unlinked_buildings.js.erb +7 -0
- data/app/views/c80_map_floors/ajax/map_edit_buttons.js.erb +36 -0
- data/app/views/c80_map_floors/ajax/shared/_map_creating.html.erb +6 -0
- data/app/views/c80_map_floors/ajax/shared/_map_editing.html.erb +4 -0
- data/app/views/c80_map_floors/ajax/shared/_map_removing.html.erb +5 -0
- data/app/views/c80_map_floors/ajax/shared/_select_list_unlinked_areas.html.erb +6 -0
- data/app/views/c80_map_floors/ajax/shared/_select_list_unlinked_buildings.html.erb +10 -0
- data/app/views/c80_map_floors/shared/_modal_window.html.erb +28 -0
- data/app/views/c80_map_floors/shared/_save_preloader.html.erb +3 -0
- data/app/views/c80_map_floors/shared/map_row/_area_order_button.html.erb +7 -0
- data/app/views/c80_map_floors/shared/map_row/_building_info.html.erb +17 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/c80_map_floors.gemspec +28 -0
- data/config/routes.rb +4 -0
- data/db/migrate/20161015190000_create_c80_map_floors_settings.rb +8 -0
- data/db/migrate/20161015190001_create_c80_map_floors_map_buildings.rb +10 -0
- data/db/migrate/20161015190002_create_c80_map_floors_areas.rb +12 -0
- data/db/migrate/20161015190003_add_building_representator_to_c80_map_floors_buildings.rb +6 -0
- data/db/migrate/20161015190004_create_c80_map_floors_floors.rb +16 -0
- data/db/migrate/20161019111010_add_title_to_c80_map_floors_buildings.rb +5 -0
- data/db/migrate/20161020184040_add_coords_img_to_c80_map_floors_buildings.rb +5 -0
- data/db/seeds/c80_map_floors_01_fill_map_settings.rb +6 -0
- data/db/seeds/c80_map_floors_02_create_test_area.rb +7 -0
- data/lib/c80_map_floors.rb +8 -0
- data/lib/c80_map_floors/engine.rb +23 -0
- data/lib/c80_map_floors/version.rb +3 -0
- metadata +218 -0
@@ -0,0 +1,12 @@
|
|
1
|
+
class CreateC80MapFloorsAreas < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :c80_map_floors_areas, :options => 'COLLATE=utf8_unicode_ci' do |t|
|
4
|
+
t.text :tag
|
5
|
+
t.text :coords
|
6
|
+
t.references :floor, index: true
|
7
|
+
t.string :area_representator_type, :default => 'Rent::Area'
|
8
|
+
t.references :area_representator, index: true
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,6 @@
|
|
1
|
+
class AddBuildingRepresentatorToC80MapFloorsBuildings < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
add_reference :c80_map_floors_map_buildings, :building_representator, index: true
|
4
|
+
add_column :c80_map_floors_map_buildings, :building_representator_type, :string, :default => 'Rent::Building'
|
5
|
+
end
|
6
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateC80MapFloorsFloors < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :c80_map_floors_floors, :options => 'COLLATE=utf8_unicode_ci' do |t|
|
4
|
+
|
5
|
+
t.string :title
|
6
|
+
t.string :tag
|
7
|
+
t.integer :ord
|
8
|
+
t.text :coords
|
9
|
+
t.string :img_bg
|
10
|
+
t.string :img_overlay
|
11
|
+
t.references :map_building, index: true
|
12
|
+
t.timestamps
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module C80MapFloors
|
2
|
+
class Engine < ::Rails::Engine
|
3
|
+
isolate_namespace C80MapFloors
|
4
|
+
|
5
|
+
initializer :c80_map_floors do
|
6
|
+
if defined?(ActiveAdmin)
|
7
|
+
ActiveAdmin.application.load_paths += Dir["#{config.root}/app/models/**/"]
|
8
|
+
#ActiveAdmin.application.load_paths += Dir["#{config.root}/app/models/concerns/**/"]
|
9
|
+
ActiveAdmin.application.load_paths += Dir["#{config.root}/app/admin/c80_map_floors/**/"]
|
10
|
+
# ActiveAdmin.application.load_paths += Dir["#{config.root}/app/jobs/**/"]
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
initializer :append_migrations do |app|
|
15
|
+
unless app.root.to_s.match root.to_s
|
16
|
+
config.paths["db/migrate"].expanded.each do |expanded_path|
|
17
|
+
app.config.paths["db/migrate"] << expanded_path
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,218 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: c80_map_floors
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- C80609A
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-10-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.9'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.9'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: activesupport
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 3.0.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 3.0.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bootstrap-sass
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 3.3.4
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 3.3.4
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bootstrap-select-rails
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: historyjs-rails
|
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'
|
97
|
+
description: Map + map editor
|
98
|
+
email:
|
99
|
+
- c080609a@gmail.com
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- ".gitignore"
|
105
|
+
- ".travis.yml"
|
106
|
+
- CODE_OF_CONDUCT.md
|
107
|
+
- Gemfile
|
108
|
+
- LICENSE.txt
|
109
|
+
- README.md
|
110
|
+
- Rakefile
|
111
|
+
- app/admin/c80_map_floors/floors.rb
|
112
|
+
- app/admin/c80_map_floors/map_buildings.rb
|
113
|
+
- app/admin/c80_map_floors/settings.rb
|
114
|
+
- app/assets/javascripts/buttons/admin_buttons/button_area_link.js
|
115
|
+
- app/assets/javascripts/buttons/admin_buttons/button_building_link.js
|
116
|
+
- app/assets/javascripts/buttons/admin_buttons/button_cancel_create.js
|
117
|
+
- app/assets/javascripts/buttons/admin_buttons/button_cancel_remove.js
|
118
|
+
- app/assets/javascripts/buttons/admin_buttons/button_complete_create.js
|
119
|
+
- app/assets/javascripts/buttons/admin_buttons/button_edit.js
|
120
|
+
- app/assets/javascripts/buttons/admin_buttons/button_new.js
|
121
|
+
- app/assets/javascripts/buttons/admin_buttons/button_remove.js
|
122
|
+
- app/assets/javascripts/buttons/admin_buttons/button_save.js
|
123
|
+
- app/assets/javascripts/buttons/button_back_to_map.js
|
124
|
+
- app/assets/javascripts/buttons/zoom_buttons.js
|
125
|
+
- app/assets/javascripts/c80_map_floors.js.coffee
|
126
|
+
- app/assets/javascripts/events/app_event.js
|
127
|
+
- app/assets/javascripts/map_objects/area.js
|
128
|
+
- app/assets/javascripts/map_objects/building.js
|
129
|
+
- app/assets/javascripts/map_objects/dot.js
|
130
|
+
- app/assets/javascripts/map_objects/floor.js
|
131
|
+
- app/assets/javascripts/src/main.js
|
132
|
+
- app/assets/javascripts/src/state_controller.js
|
133
|
+
- app/assets/javascripts/src/utils/map_utils.js
|
134
|
+
- app/assets/javascripts/src/utils/opacity_buttons_utils.js
|
135
|
+
- app/assets/javascripts/src/utils/utils.js
|
136
|
+
- app/assets/javascripts/svg_elements/area_label.js
|
137
|
+
- app/assets/javascripts/svg_elements/building_label.js
|
138
|
+
- app/assets/javascripts/svg_elements/helper.js
|
139
|
+
- app/assets/javascripts/svg_elements/polygon.js
|
140
|
+
- app/assets/javascripts/view/save_preloader.js
|
141
|
+
- app/assets/stylesheets/c80_map_floors.scss
|
142
|
+
- app/assets/stylesheets/map.scss
|
143
|
+
- app/assets/stylesheets/view/buttons/area_order_button.scss
|
144
|
+
- app/assets/stylesheets/view/buttons/back_to_map_button.scss
|
145
|
+
- app/assets/stylesheets/view/elems/building_info.scss
|
146
|
+
- app/assets/stylesheets/view/elems/free_areas_label.scss
|
147
|
+
- app/assets/stylesheets/view/elems/map_objects/map_object_image_bg.scss
|
148
|
+
- app/assets/stylesheets/view/modal_window.scss
|
149
|
+
- app/assets/stylesheets/view/save_preloader.scss
|
150
|
+
- app/controllers/c80_map_floors/ajax_controller.rb
|
151
|
+
- app/controllers/c80_map_floors/application_controller.rb
|
152
|
+
- app/controllers/c80_map_floors/map_ajax_controller.rb
|
153
|
+
- app/helpers/c80_map_floors/application_helper.rb
|
154
|
+
- app/models/c80_map_floors/area.rb
|
155
|
+
- app/models/c80_map_floors/area_representator.rb
|
156
|
+
- app/models/c80_map_floors/base_map_object.rb
|
157
|
+
- app/models/c80_map_floors/building_representator.rb
|
158
|
+
- app/models/c80_map_floors/floor.rb
|
159
|
+
- app/models/c80_map_floors/map_building.rb
|
160
|
+
- app/models/c80_map_floors/map_json.rb
|
161
|
+
- app/models/c80_map_floors/setting.rb
|
162
|
+
- app/uploaders/c80_map_floors/building_image_uploader.rb
|
163
|
+
- app/uploaders/c80_map_floors/floor_image_uploader.rb
|
164
|
+
- app/uploaders/c80_map_floors/map_image_uploader.rb
|
165
|
+
- app/views/c80_map_floors/_map_row_index.html.erb
|
166
|
+
- app/views/c80_map_floors/ajax/fetch_unlinked_areas.js.erb
|
167
|
+
- app/views/c80_map_floors/ajax/fetch_unlinked_buildings.js.erb
|
168
|
+
- app/views/c80_map_floors/ajax/map_edit_buttons.js.erb
|
169
|
+
- app/views/c80_map_floors/ajax/shared/_map_creating.html.erb
|
170
|
+
- app/views/c80_map_floors/ajax/shared/_map_editing.html.erb
|
171
|
+
- app/views/c80_map_floors/ajax/shared/_map_removing.html.erb
|
172
|
+
- app/views/c80_map_floors/ajax/shared/_select_list_unlinked_areas.html.erb
|
173
|
+
- app/views/c80_map_floors/ajax/shared/_select_list_unlinked_buildings.html.erb
|
174
|
+
- app/views/c80_map_floors/shared/_modal_window.html.erb
|
175
|
+
- app/views/c80_map_floors/shared/_save_preloader.html.erb
|
176
|
+
- app/views/c80_map_floors/shared/map_row/_area_order_button.html.erb
|
177
|
+
- app/views/c80_map_floors/shared/map_row/_building_info.html.erb
|
178
|
+
- bin/console
|
179
|
+
- bin/setup
|
180
|
+
- c80_map_floors.gemspec
|
181
|
+
- config/routes.rb
|
182
|
+
- db/migrate/20161015190000_create_c80_map_floors_settings.rb
|
183
|
+
- db/migrate/20161015190001_create_c80_map_floors_map_buildings.rb
|
184
|
+
- db/migrate/20161015190002_create_c80_map_floors_areas.rb
|
185
|
+
- db/migrate/20161015190003_add_building_representator_to_c80_map_floors_buildings.rb
|
186
|
+
- db/migrate/20161015190004_create_c80_map_floors_floors.rb
|
187
|
+
- db/migrate/20161019111010_add_title_to_c80_map_floors_buildings.rb
|
188
|
+
- db/migrate/20161020184040_add_coords_img_to_c80_map_floors_buildings.rb
|
189
|
+
- db/seeds/c80_map_floors_01_fill_map_settings.rb
|
190
|
+
- db/seeds/c80_map_floors_02_create_test_area.rb
|
191
|
+
- lib/c80_map_floors.rb
|
192
|
+
- lib/c80_map_floors/engine.rb
|
193
|
+
- lib/c80_map_floors/version.rb
|
194
|
+
homepage: http://www.vorsa-park.ru
|
195
|
+
licenses:
|
196
|
+
- MIT
|
197
|
+
metadata: {}
|
198
|
+
post_install_message:
|
199
|
+
rdoc_options: []
|
200
|
+
require_paths:
|
201
|
+
- lib
|
202
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
203
|
+
requirements:
|
204
|
+
- - ">="
|
205
|
+
- !ruby/object:Gem::Version
|
206
|
+
version: '0'
|
207
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
208
|
+
requirements:
|
209
|
+
- - ">="
|
210
|
+
- !ruby/object:Gem::Version
|
211
|
+
version: '0'
|
212
|
+
requirements: []
|
213
|
+
rubyforge_project:
|
214
|
+
rubygems_version: 2.5.1
|
215
|
+
signing_key:
|
216
|
+
specification_version: 4
|
217
|
+
summary: Map
|
218
|
+
test_files: []
|