grokus 1.0.0.3 → 1.0.0.5

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: 75821d85a7aa6406e273ee87e711df835bdeb626
4
- data.tar.gz: ff04078e294225ad869692d6ee04651d214f4e76
3
+ metadata.gz: bec13a2504c3b3e12b54a9dc8ac168e9e0ed990d
4
+ data.tar.gz: a398a358becb750c3d51aada28a6d7cbd9d59672
5
5
  SHA512:
6
- metadata.gz: 6c6e4b59fd24d9263f5daca2c3ef9e3d0a4d6c0529c9e75ed56dd4255c2b500f38927958a5529e2e8f09a5f1796b7bae7ec31a8383655cf83f4233cf87755309
7
- data.tar.gz: b21082280aa2e809e85cda26a6921f3cb5eca3d2d5e48ee2c9d5d1beca80be008e6c7ad27e4987685f6cd8f1065759b835867f47f21e59fb07a96a7f35ae0250
6
+ metadata.gz: b9f319451237d995088644299ae643c5f73104df085f76b76de61e90e643ebbe6947bd91c7b442e4201ae12a61148cefcb1faa83c279f4621c970959a6de5223
7
+ data.tar.gz: ecce49cd092df26428425611be6be9dd478251984a84b4d942287bc050f9b268279335312c369221bdee8c5e42ab2ed93efa4d22c611884584abbebc8988ea6e
data/README.md CHANGED
@@ -5,19 +5,13 @@
5
5
  [![Dependency Status](https://gemnasium.com/calagator/calagator.svg)](https://gemnasium.com/calagator/calagator)
6
6
 
7
7
 
8
- My calagator fork
8
+ Calagator
9
9
  =========
10
10
 
11
11
 
12
12
  About
13
13
  -----
14
14
 
15
- Mainly I just need:
16
-
17
- * Multi colored markers, depending on venue instance
18
- * Devise, only some can edit
19
- * Expand beyond Portland, this will be the tricky part
20
-
21
15
  Calagator is an open source community calendaring platform:
22
16
 
23
17
  * [Calagator.org](http://calagator.org/) is the flagship website running this software.
@@ -1,6 +1,6 @@
1
1
  //= require leaflet.awesome-markers
2
2
 
3
- var map = function(layer_constructor, map_tiles, div_id, center, zoom, rawMarkers, should_fit_bounds) {
3
+ var map = function(layer_constructor, map_tiles, div_id, center, zoom, marker_color, rawMarkers, should_fit_bounds) {
4
4
  klass = eval(layer_constructor)
5
5
  var layer = new klass(map_tiles);
6
6
  var map = new L.Map(div_id, {
@@ -15,13 +15,13 @@ var map = function(layer_constructor, map_tiles, div_id, center, zoom, rawMarker
15
15
 
16
16
  map.addLayer(layer);
17
17
 
18
- var markers = rawMarkers.map(function(m) {
19
- var venueIcon = L.AwesomeMarkers.icon({
20
- icon: 'star',
21
- prefix: 'fa',
22
- markerColor: m.marker_color
23
- })
18
+ var venueIcon = L.AwesomeMarkers.icon({
19
+ icon: 'star',
20
+ prefix: 'fa',
21
+ markerColor: marker_color
22
+ })
24
23
 
24
+ var markers = rawMarkers.map(function(m) {
25
25
  return L.marker([m.latitude, m.longitude], { title: m.title, icon: venueIcon}).bindPopup(m.popup);
26
26
  });
27
27
  var markerGroup = L.featureGroup(markers);
@@ -46,6 +46,7 @@ module MappingHelper
46
46
  div_id,
47
47
  center,
48
48
  zoom,
49
+ marker_color,
49
50
  markers,
50
51
  should_fit_bounds
51
52
  ]
@@ -78,12 +79,15 @@ module MappingHelper
78
79
  latitude: location[0],
79
80
  longitude: location[1],
80
81
  title: locatable_item.title,
81
- popup: context.link_to(locatable_item.title, locatable_item),
82
- marker_color: locatable_item.marker_color
82
+ popup: context.link_to(locatable_item.title, locatable_item)
83
83
  }
84
84
  end.compact
85
85
  end
86
86
 
87
+ def marker_color
88
+ Calagator.mapping_marker_color
89
+ end
90
+
87
91
  def locatable_items
88
92
  @locatable_items ||= Array(items).select {|i| i.location.present? }
89
93
  end
@@ -83,10 +83,6 @@ class Venue < ActiveRecord::Base
83
83
  super UrlPrefixer.prefix(value)
84
84
  end
85
85
 
86
- def marker_color
87
- Calagator.mapping_marker_color
88
- end
89
-
90
86
  # Display a single line address.
91
87
  def full_address
92
88
  full_address = "#{street_address}, #{locality} #{region} #{postal_code} #{country}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grokus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.3
4
+ version: 1.0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Calagator Team
@@ -1021,7 +1021,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1021
1021
  version: '0'
1022
1022
  requirements: []
1023
1023
  rubyforge_project:
1024
- rubygems_version: 2.5.1
1024
+ rubygems_version: 2.4.5.1
1025
1025
  signing_key:
1026
1026
  specification_version: 4
1027
1027
  summary: A calendar for communities