c80_map 0.1.0.14 → 0.1.0.15

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d7686812f742adff8c59d9be8151320bcc0a2e4
4
- data.tar.gz: 5f9ddf71af71b5997b8d457192eee0c2ba108c22
3
+ metadata.gz: 5c21b38d6f69779edb81051a4470de447878450f
4
+ data.tar.gz: 20ba2d4f2ad1c69afa5fe771bab2813c1442ac08
5
5
  SHA512:
6
- metadata.gz: b374bd87626fa16d08e669f8985345ea8648364713749f16332b49bc23a8d102bc8de45b85e43367110fb26fb41e633b718e9927377cc0df12973e4d9f4c83be
7
- data.tar.gz: 5c49d966704c0caedb70a17ccf97aae599687666516186bf102278f3b2c0c1bd8373ace8b76c8cb8aee7e7317c21f6373fd5dec12648c79fd7851dd75858c300
6
+ metadata.gz: d13d44acbc3d2f0c5803d1840872768ea45cb49b4fc86badf64e89e731203f3ba26d14d7b1c6d30a7ab3061427db72cf593cab0a374f64628501d5f4a31cc494
7
+ data.tar.gz: 00dec2fb04b6cb7abbbb8221571f7224a360b39851badc59151b177cc43ee05f696d44846cbc32ec193a7a1717a395c7afcdbaaf58012d34d142c8dc2b046da5
@@ -976,10 +976,22 @@ var clog = function () {
976
976
  $building_info.css('display','block');
977
977
  $building_info.find("h2").text(building_hash["title"]);
978
978
 
979
- var v;
980
- for (var p in building_hash["props"]) {
979
+ var v, $ili, p;
980
+ for (p in building_hash["props"]) {
981
+
981
982
  v = building_hash["props"][p];
982
- $building_info.find("#" + p).find('span').text(v);
983
+ $ili = $building_info.find("#" + p);
984
+ $ili.find('span').text(v);
985
+ //console.log("."+v+".");
986
+
987
+ // Не показывать пользователю карты незаполненные поля
988
+ var li_css_display = 'block';
989
+ if (v == '' || v == '-1' || v === 'null' || v == null) {
990
+ li_css_display = 'none';
991
+ }
992
+ $ili.css('display',li_css_display);
993
+
994
+
983
995
  }
984
996
 
985
997
  $building_info.find("#square_free").css('height', 'auto');
@@ -1164,6 +1164,7 @@ g.mapplic-clickable:hover > * {
1164
1164
  background-color: #ededed;
1165
1165
  display: none;
1166
1166
  font-size: 14px;
1167
+ min-width: 417px;
1167
1168
 
1168
1169
  -webkit-transition: all 0.8s cubic-bezier(.25, .8, .25, 1);
1169
1170
  -moz-transition: all 0.8s cubic-bezier(.25, .8, .25, 1);
@@ -42,7 +42,7 @@ module C80Map
42
42
 
43
43
  module InstanceMethods
44
44
 
45
- def to_hash
45
+ def to_hash_a
46
46
  res = {
47
47
  id: id,
48
48
  title: title,
@@ -43,17 +43,21 @@ module C80Map
43
43
  module InstanceMethods
44
44
 
45
45
  def to_hash
46
+
47
+ Rails.logger.debug "<BuildingRepresentator.to_hash> self.free_square = #{self.free_square}"
48
+
46
49
  res = {
47
- id: id,
48
- title: title,
50
+ id: self.id,
51
+ title: self.title,
49
52
  props: {
50
- square: square,
51
- floor_height: floor_height,
52
- gate_type: gate_type,
53
- desc: desc,
54
- column_step: column_step,
55
- communications: communications,
56
- price: price_string
53
+ square: self.square,
54
+ free_square: self.free_square,
55
+ floor_height: self.floor_height,
56
+ gate_type: self.gate_type,
57
+ desc: self.desc,
58
+ column_step: self.column_step,
59
+ communications: self.communications,
60
+ price: self.price_string
57
61
  }
58
62
  }
59
63
  res
@@ -14,16 +14,18 @@ module C80Map
14
14
  # [{id, object_type=object_type, coords, building_hash, img, childs:[<areas>]},..]
15
15
  buildings_to_location_json = []
16
16
  Building.all.each do |b|
17
+ # Rails.logger.debug "[TRACE] <MapJson.update_json> building: #{b}; building_representator: #{b.building_representator}"
17
18
 
18
19
  # сначала соберём детей - Area
19
20
  childs = []
20
21
  b.areas.each do |area|
21
- # Rails.logger.debug "<MapJson.update_json> area #{area}"
22
+ # Rails.logger.debug "[TRACE] <MapJson.update_json> [1] area #{area}; area_representator: #{area.area_representator}"
22
23
 
23
24
  # соберём хэш привязанной к полигону площади
24
25
  har = {}
25
26
  if area.area_representator.present?
26
- har = area.area_representator.to_hash
27
+ # Rails.logger.debug "[TRACE] <MapJson.update_json> [2] area #{area}; area_representator: #{area.area_representator}"
28
+ har = area.area_representator.to_hash_a
27
29
  har["is_free"] = area.area_representator.is_free?
28
30
  end
29
31
 
@@ -1,3 +1,3 @@
1
1
  module C80Map
2
- VERSION = "0.1.0.14"
2
+ VERSION = "0.1.0.15"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: c80_map
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.14
4
+ version: 0.1.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - C80609A
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-05 00:00:00.000000000 Z
11
+ date: 2016-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler