pwb 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -3
- data/app/assets/javascripts/pwb/{application.js → application.js.erb} +19 -2
- data/app/assets/javascripts/pwb/paloma/landing.js +10 -10
- data/app/assets/javascripts/pwb/paloma/prop.js +14 -22
- data/app/assets/javascripts/pwb/paloma/sections.js +15 -15
- data/app/assets/javascripts/pwb/shared/inmo-map.js +121 -0
- data/app/assets/javascripts/pwb/shared/select-picker.js +15 -0
- data/app/assets/javascripts/pwb/shared/slick-carousel.js +10 -0
- data/app/assets/javascripts/pwb/shared/vue-main.js +31 -0
- data/app/assets/javascripts/pwb/themes/{berlin.js → berlin.js.erb} +61 -5
- data/app/assets/stylesheets/pwb/themes/berlin.scss +3 -0
- data/app/assets/stylesheets/pwb/themes/default.scss +4 -2
- data/app/assets/stylesheets/pwb/themes/default/landing_general.scss +1 -1
- data/app/assets/stylesheets/pwb/themes/default/language_switcher.scss +20 -0
- data/app/assets/stylesheets/pwb/themes/default/prop.scss +0 -4
- data/app/assets/stylesheets/pwb/themes/default/shame.scss +0 -59
- data/app/assets/stylesheets/pwb/themes/shared/gmap.scss +38 -0
- data/app/assets/stylesheets/pwb/themes/shared/search_box.scss +62 -0
- data/app/assets/stylesheets/pwb/themes/shared/shame.scss +6 -1
- data/app/assets/stylesheets/pwb/themes/shared/social.scss +84 -0
- data/app/controllers/pwb/api_public/v1/props_controller.rb +47 -1
- data/app/controllers/pwb/props_controller.rb +32 -3
- data/app/controllers/pwb/search_controller.rb +35 -3
- data/app/controllers/pwb/sections_controller.rb +24 -7
- data/app/controllers/pwb/welcome_controller.rb +2 -0
- data/app/helpers/pwb/application_helper.rb +16 -31
- data/app/helpers/pwb/images_helper.rb +43 -0
- data/app/models/pwb/agency.rb +2 -2
- data/app/models/pwb/content.rb +3 -2
- data/app/models/pwb/content_photo.rb +1 -1
- data/app/models/pwb/feature.rb +2 -2
- data/app/models/pwb/message.rb +1 -1
- data/app/models/pwb/prop.rb +10 -1
- data/app/models/pwb/prop_photo.rb +1 -1
- data/app/models/pwb/section.rb +2 -1
- data/app/models/pwb/website.rb +1 -1
- data/app/themes/berlin/views/layouts/pwb/application.html.erb +9 -4
- data/app/themes/berlin/views/pwb/props/not_found.html.erb +37 -0
- data/app/themes/berlin/views/pwb/props/show.html.erb +44 -11
- data/app/themes/berlin/views/pwb/search/buy.html.erb +15 -8
- data/app/themes/berlin/views/pwb/search/rent.html.erb +13 -6
- data/app/themes/berlin/views/pwb/sections/about_us.html.erb +25 -34
- data/app/themes/berlin/views/pwb/sections/contact_us.html.erb +23 -24
- data/app/themes/berlin/views/pwb/sections/static.html.erb +26 -26
- data/app/themes/berlin/views/pwb/welcome/_landing_carousel.html.erb +27 -18
- data/app/themes/berlin/views/pwb/welcome/_service.html.erb +2 -2
- data/app/themes/berlin/views/pwb/welcome/index.html.erb +5 -2
- data/app/themes/default/views/layouts/pwb/application.html.erb +15 -12
- data/app/themes/default/views/pwb/props/show.html.erb +29 -8
- data/app/themes/default/views/pwb/search/buy.html.erb +44 -48
- data/app/themes/default/views/pwb/search/rent.html.erb +44 -48
- data/app/themes/default/views/pwb/sections/about_us.html.erb +1 -0
- data/app/themes/default/views/pwb/sections/contact_us.html.erb +4 -0
- data/app/themes/default/views/pwb/sections/static.html.erb +1 -0
- data/app/themes/default/views/pwb/welcome/index.html.erb +14 -4
- data/app/views/pwb/_meta_tags.html.erb +10 -0
- data/app/views/pwb/props/_meta_tags.html.erb +8 -0
- data/app/views/pwb/search/_search_form_for_rent.html.erb +19 -16
- data/app/views/pwb/search/_search_form_landing.html.erb +35 -0
- data/app/views/pwb/search/search_ajax.js.erb +3 -1
- data/config/client_setups/default.json +113 -55
- data/config/initializers/i18n.rb +1 -0
- data/config/locales/admin.en.yml +19 -10
- data/config/locales/admin.es.yml +18 -0
- data/config/locales/de.yml +9 -6
- data/config/locales/devise.tr.yml +135 -0
- data/config/locales/devise.vi.yml +137 -0
- data/config/locales/en.yml +151 -161
- data/config/locales/es.yml +37 -35
- data/config/locales/fr.yml +147 -184
- data/config/locales/pt.yml +10 -8
- data/config/locales/rails.tr.yml +211 -0
- data/config/locales/rails.vi.yml +203 -0
- data/config/locales/ru.yml +13 -12
- data/config/locales/tr.yml +160 -0
- data/config/locales/vi.yml +162 -0
- data/config/locales/zh-HK.yml +2 -0
- data/config/routes.rb +4 -3
- data/db/migrate/20170513221300_create_cms.rb +1 -1
- data/lib/pwb/seeder.rb +1 -1
- data/lib/pwb/version.rb +1 -1
- data/spec/dummy/config/routes.rb +3 -4
- data/spec/dummy/db/schema.rb +11 -10
- data/spec/dummy/log/test.log +0 -0
- data/spec/dummy/public/uploads/pwb/content_photo/image/1/carousel_windows.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/content_photo/image/2/carousel_deck_chair.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/content_photo/image/3/carousel_grass.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/content_photo/image/4/carousel_grass.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/1/flat_balcony.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/1/gdaje3atcct1gx2ngv9u.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/1/new_villa.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/2/flat_balcony.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/2/kitchen_modern.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/2/rxo23syongfydjpoizrd.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/3/mansion_front.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/3/vzlptgtccsk2d2ewp4id.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/4/mansion_bedroom.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/4/xwayprwnmmmhrzrgwvch.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/5/flat_window.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/5/ilxn2u37bak0v60u6f8q.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/6/kitchen_classic.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/7/flat_balcony.jpg +0 -0
- data/spec/dummy/public/uploads/pwb/prop_photo/image/8/lounge_cosy.jpg +0 -0
- data/spec/requests/pwb/themes_spec.rb +1 -0
- data/spec/views/pwb/welcome.html.erb_spec.rb +7 -0
- metadata +63 -6
- data/app/assets/javascripts/pwb/themes/berlin/jquery.min.js +0 -5
- data/app/assets/stylesheets/pwb/themes/default/search.scss +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74537789158bf92aa5c6e723f27e399e0914fd6f
|
4
|
+
data.tar.gz: da4abf4a2065c46b4b0b8209453fe4e0af43159e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 495d749a9c5ed1668f53c1bc343e710148fdd50f93a280bc2e1abf3f928917aca98dc520e96996048ea32c458363c9d8a68bdfbc54d2b98b096de94511ebdfe4
|
7
|
+
data.tar.gz: 3804b2504174c8187340bee22513c104b997eebb47f42244b175cf063d69541ba11d24c33e2f020620a0f5b1d8306f4684a75299bbaecfba5ea1bc7b930162fc
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# PropertyWebBuilder
|
2
2
|
|
3
|
-
[![Build Status](https://api.travis-ci.org/etewiah/property_web_builder.svg?branch=master)](https://api.travis-ci.org/etewiah/property_web_builder)
|
3
|
+
[![Backers on Open Collective](https://opencollective.com/property_web_builder/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/property_web_builder/sponsors/badge.svg)](#sponsors)[![Build Status](https://api.travis-ci.org/etewiah/property_web_builder.svg?branch=master)](https://api.travis-ci.org/etewiah/property_web_builder)
|
4
4
|
|
5
5
|
This project has been created to address a glaring gap in the rails ecosystem: the lack of an open source project for real estate websites.
|
6
6
|
|
@@ -18,7 +18,8 @@ To see the admin panel, login as user admin@example.com with a password of "pwb1
|
|
18
18
|
|
19
19
|
## Rails Version
|
20
20
|
|
21
|
-
PropertyWebBuilder runs with Rails >= 5.0
|
21
|
+
PropertyWebBuilder runs with Rails '>= 5.0.0', '< 5.1'
|
22
|
+
Support for Rails 5.1.0 will come soon
|
22
23
|
|
23
24
|
## Ruby Version
|
24
25
|
|
@@ -122,6 +123,19 @@ Thanks to the awesome [Locale](http://www.localeapp.com/) contributing to the tr
|
|
122
123
|
- The maintainer will then pull translations from the Locale project and push to Github.
|
123
124
|
|
124
125
|
|
126
|
+
## Contributors
|
127
|
+
|
128
|
+
This project exists thanks to all the people who contribute. [[Contribute]](CONTRIBUTING.md).
|
129
|
+
<a href="graphs/contributors"><img src="https://opencollective.com/property_web_builder/contributors.svg?width=890" /></a>
|
130
|
+
|
131
|
+
|
132
|
+
## Backers
|
133
|
+
|
134
|
+
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/property_web_builder#backer)]
|
135
|
+
|
136
|
+
<a href="https://opencollective.com/property_web_builder#backers" target="_blank"><img src="https://opencollective.com/property_web_builder/backers.svg?width=890"></a>
|
137
|
+
|
138
|
+
|
125
139
|
## Sponsors
|
126
140
|
|
127
141
|
PropertyWebBuilder is currently sponsored by Coddde, Ruby On Rails consultants based in Spain and Chile:
|
@@ -129,7 +143,20 @@ PropertyWebBuilder is currently sponsored by Coddde, Ruby On Rails consultants b
|
|
129
143
|
![Coddde](http://coddde.com/wp-content/uploads/2017/01/coddde_logo.png)
|
130
144
|
</a>
|
131
145
|
|
132
|
-
|
146
|
+
|
147
|
+
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/property_web_builder#sponsor)]
|
148
|
+
|
149
|
+
<a href="https://opencollective.com/property_web_builder/sponsor/0/website" target="_blank"><img src="https://opencollective.com/property_web_builder/sponsor/0/avatar.svg"></a>
|
150
|
+
<a href="https://opencollective.com/property_web_builder/sponsor/1/website" target="_blank"><img src="https://opencollective.com/property_web_builder/sponsor/1/avatar.svg"></a>
|
151
|
+
<a href="https://opencollective.com/property_web_builder/sponsor/2/website" target="_blank"><img src="https://opencollective.com/property_web_builder/sponsor/2/avatar.svg"></a>
|
152
|
+
<a href="https://opencollective.com/property_web_builder/sponsor/3/website" target="_blank"><img src="https://opencollective.com/property_web_builder/sponsor/3/avatar.svg"></a>
|
153
|
+
<a href="https://opencollective.com/property_web_builder/sponsor/4/website" target="_blank"><img src="https://opencollective.com/property_web_builder/sponsor/4/avatar.svg"></a>
|
154
|
+
<a href="https://opencollective.com/property_web_builder/sponsor/5/website" target="_blank"><img src="https://opencollective.com/property_web_builder/sponsor/5/avatar.svg"></a>
|
155
|
+
<a href="https://opencollective.com/property_web_builder/sponsor/6/website" target="_blank"><img src="https://opencollective.com/property_web_builder/sponsor/6/avatar.svg"></a>
|
156
|
+
<a href="https://opencollective.com/property_web_builder/sponsor/7/website" target="_blank"><img src="https://opencollective.com/property_web_builder/sponsor/7/avatar.svg"></a>
|
157
|
+
<a href="https://opencollective.com/property_web_builder/sponsor/8/website" target="_blank"><img src="https://opencollective.com/property_web_builder/sponsor/8/avatar.svg"></a>
|
158
|
+
<a href="https://opencollective.com/property_web_builder/sponsor/9/website" target="_blank"><img src="https://opencollective.com/property_web_builder/sponsor/9/avatar.svg"></a>
|
159
|
+
|
133
160
|
|
134
161
|
|
135
162
|
## License
|
@@ -15,9 +15,26 @@
|
|
15
15
|
// require jquery.turbolinks
|
16
16
|
//= require jquery_ujs
|
17
17
|
//= require paloma
|
18
|
-
|
19
|
-
|
18
|
+
// require_tree ./paloma
|
19
|
+
// require bootstrap-sprockets
|
20
20
|
//= require bootstrap-select
|
21
|
+
//= require lodash-4.16.4
|
22
|
+
// lodash used for google maps
|
23
|
+
<%
|
24
|
+
# ...
|
25
|
+
if Rails.env.development?
|
26
|
+
require_asset ("vue-2.4.2")
|
27
|
+
else
|
28
|
+
require_asset ("vue-2.4.2.prod")
|
29
|
+
end
|
30
|
+
|
31
|
+
require_asset ("vue-social-sharing")
|
32
|
+
require_asset ("vue-google-maps")
|
33
|
+
require_asset ("./shared/select-picker")
|
34
|
+
require_asset ("./shared/inmo-map")
|
35
|
+
require_asset ("./shared/vue-main")
|
36
|
+
%>
|
37
|
+
|
21
38
|
|
22
39
|
// $(document).on('page:change', function() {
|
23
40
|
// once turbolinks is activated, will have to change to above
|
@@ -1,14 +1,14 @@
|
|
1
1
|
var PwbWelcomeController = Paloma.controller('Pwb/Welcome');
|
2
2
|
|
3
3
|
PwbWelcomeController.prototype.index = function() {
|
4
|
-
$(".carousel-inner .item").click(function () {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
});
|
4
|
+
// $(".carousel-inner .item").click(function () {
|
5
|
+
// var carouselStatus = $('#homepageCarousel').data('status');
|
6
|
+
// if (carouselStatus && carouselStatus === "paused") {
|
7
|
+
// $('#homepageCarousel').carousel('cycle');
|
8
|
+
// $('#homepageCarousel').data('status', "cycling");
|
9
|
+
// } else{
|
10
|
+
// $('#homepageCarousel').carousel('pause');
|
11
|
+
// $('#homepageCarousel').data('status', "paused");
|
12
|
+
// }
|
13
|
+
// });
|
14
14
|
};
|
@@ -1,27 +1,19 @@
|
|
1
1
|
var PwbPropsController = Paloma.controller('Pwb/Props');
|
2
2
|
|
3
3
|
PwbPropsController.prototype.show = function() {
|
4
|
-
// Below for properties slider
|
5
|
-
// don't have something similar for main landing yet
|
6
|
-
$(".carousel-inner .item").click(function() {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
});
|
4
|
+
// // Below for properties slider
|
5
|
+
// // don't have something similar for main landing yet
|
6
|
+
// $(".carousel-inner .item").click(function() {
|
7
|
+
// var carouselStatus = $('#propCarousel').data('status');
|
8
|
+
// if (carouselStatus && carouselStatus === "paused") {
|
9
|
+
// $('#propCarousel').carousel('cycle');
|
10
|
+
// $('#propCarousel').data('status', "cycling");
|
11
|
+
// } else {
|
12
|
+
// $('#propCarousel').carousel('pause');
|
13
|
+
// $('#propCarousel').data('status', "paused");
|
14
|
+
// }
|
15
|
+
// });
|
16
|
+
|
17
|
+
// var currentItemForMap = this.params.property_details;
|
16
18
|
|
17
|
-
var currentItemForMap = this.params.property_details;
|
18
|
-
if (typeof google === "undefined") {
|
19
|
-
var self = this;
|
20
|
-
window.map_callback = function() {
|
21
|
-
INMOAPP.showMap(currentItemForMap);
|
22
|
-
};
|
23
|
-
$.getScript('https://maps.googleapis.com/maps/api/js?key=AIzaSyCPorm8YzIaUGhKfe5cvpgofZ_gdT8hdZw&v=3.exp&sensor=false&callback=map_callback&libraries=places');
|
24
|
-
} else {
|
25
|
-
INMOAPP.showMap(currentItemForMap);
|
26
|
-
}
|
27
19
|
};
|
@@ -2,20 +2,20 @@ var PwbSectionsController = Paloma.controller('Pwb/Sections');
|
|
2
2
|
|
3
3
|
PwbSectionsController.prototype.contact_us = function() {
|
4
4
|
|
5
|
-
var currentItemForMap = this.params.current_agency_primary_address;
|
6
|
-
// http://stackoverflow.com/questions/2647867/how-to-determine-if-variable-is-undefined-or-null
|
7
|
-
// if (currentItemForMap == null) {
|
8
|
-
if (!this.params.show_contact_map) {
|
9
|
-
|
10
|
-
}
|
11
|
-
if (typeof google === "undefined") {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
} else {
|
18
|
-
|
19
|
-
}
|
5
|
+
// var currentItemForMap = this.params.current_agency_primary_address;
|
6
|
+
// // http://stackoverflow.com/questions/2647867/how-to-determine-if-variable-is-undefined-or-null
|
7
|
+
// // if (currentItemForMap == null) {
|
8
|
+
// if (!this.params.show_contact_map) {
|
9
|
+
// return;
|
10
|
+
// }
|
11
|
+
// if (typeof google === "undefined") {
|
12
|
+
// var self = this;
|
13
|
+
// window.map_callback = function() {
|
14
|
+
// INMOAPP.showMap(currentItemForMap);
|
15
|
+
// };
|
16
|
+
// $.getScript('https://maps.googleapis.com/maps/api/js?key=AIzaSyCPorm8YzIaUGhKfe5cvpgofZ_gdT8hdZw&v=3.exp&sensor=false&callback=map_callback&libraries=places');
|
17
|
+
// } else {
|
18
|
+
// INMOAPP.showMap(currentItemForMap);
|
19
|
+
// }
|
20
20
|
};
|
21
21
|
|
@@ -0,0 +1,121 @@
|
|
1
|
+
Vue.component('inmo-map', {
|
2
|
+
template: '<gmap-map style="min-height: 600px;"' +
|
3
|
+
':zoom="15" :center="center" ref="mmm">' +
|
4
|
+
'<gmap-info-window ref="infwin" :options="infoOptions" :position="infoWindowPos"' +
|
5
|
+
':opened="infoWinOpen" @closeclick="infoWinOpen=false">' +
|
6
|
+
'</gmap-info-window>' +
|
7
|
+
'<gmap-marker v-for="(m,i) in mapkers" :key="m.id" :position="m.position" ' +
|
8
|
+
'@mouseover="toggleInfoWindow(m,i)" @mouseout="statusText = null"' +
|
9
|
+
':clickable="true" :draggable="true" @click=""></gmap-marker>' +
|
10
|
+
'</gmap-map>',
|
11
|
+
data: function() {
|
12
|
+
return {
|
13
|
+
newMarkers: [],
|
14
|
+
useNewMarkers: false,
|
15
|
+
infoContent: '',
|
16
|
+
statusText: '',
|
17
|
+
infoWindowPos: {
|
18
|
+
lat: 0,
|
19
|
+
lng: 0
|
20
|
+
},
|
21
|
+
infoWinOpen: false,
|
22
|
+
currentMidx: null,
|
23
|
+
//optional: offset infowindow so it visually sits nicely on top of our marker
|
24
|
+
infoOptions: {
|
25
|
+
content: "hey",
|
26
|
+
pixelOffset: {
|
27
|
+
width: 0,
|
28
|
+
height: -35
|
29
|
+
}
|
30
|
+
}
|
31
|
+
};
|
32
|
+
},
|
33
|
+
// created() {
|
34
|
+
// },
|
35
|
+
mounted: function() {
|
36
|
+
var that = this;
|
37
|
+
this.$refs.mmm.$mapCreated.then(function() {
|
38
|
+
if (that.mapkers.length > 1) {
|
39
|
+
var bounds = new google.maps.LatLngBounds();
|
40
|
+
that.mapkers.forEach(function(mapker){
|
41
|
+
bounds.extend(mapker.position);
|
42
|
+
});
|
43
|
+
// for (let m of that.mapkers) {
|
44
|
+
// bounds.extend(m.position)
|
45
|
+
// }
|
46
|
+
that.$refs.mmm.$mapObject.fitBounds(bounds);
|
47
|
+
// where markers are too close together, I need below
|
48
|
+
// to ensure they are not too zoomed in
|
49
|
+
that.$refs.mmm.$mapObject.setOptions({ maxZoom: that.$refs.mmm.$mapObject.getZoom() });
|
50
|
+
}
|
51
|
+
})
|
52
|
+
},
|
53
|
+
methods: {
|
54
|
+
resetMarkers: function(newMarkers) {
|
55
|
+
this.newMarkers = newMarkers;
|
56
|
+
this.useNewMarkers = true;
|
57
|
+
},
|
58
|
+
toggleInfoWindow: function(marker, idx) {
|
59
|
+
this.infoWindowPos = marker.position;
|
60
|
+
var display_price_html = "";
|
61
|
+
if (marker.display_price) {
|
62
|
+
display_price_html = '<div class="iw-subTitle">' + marker.display_price + '</div>';
|
63
|
+
}
|
64
|
+
var image_html = "";
|
65
|
+
if (marker.image_url) {
|
66
|
+
image_html = '<img src="' + marker.image_url + '" alt="" width="225">';
|
67
|
+
}
|
68
|
+
|
69
|
+
var infoWindowContent = '<div id="iw-container">' +
|
70
|
+
'<a href="' + marker.show_url + '" class="">' +
|
71
|
+
'<div class="iw-title">' + marker.title + '</div>' +
|
72
|
+
'<div class="iw-content">' +
|
73
|
+
display_price_html +
|
74
|
+
image_html +
|
75
|
+
'</div></a>' +
|
76
|
+
'</div>';
|
77
|
+
|
78
|
+
this.infoOptions.content = infoWindowContent;
|
79
|
+
//check if its the same marker that was selected if yes toggle
|
80
|
+
if (this.currentMidx == idx) {
|
81
|
+
this.infoWinOpen = !this.infoWinOpen;
|
82
|
+
}
|
83
|
+
//if different marker set infowindow to open and reset current marker index
|
84
|
+
else {
|
85
|
+
this.infoWinOpen = true;
|
86
|
+
this.currentMidx = idx;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
},
|
90
|
+
// watch: {
|
91
|
+
// mapkers(mapkers) {
|
92
|
+
// }
|
93
|
+
// },
|
94
|
+
computed: {
|
95
|
+
mapkers: function() {
|
96
|
+
if (this.useNewMarkers) {
|
97
|
+
return this.newMarkers;
|
98
|
+
} else {
|
99
|
+
return this.markers;
|
100
|
+
}
|
101
|
+
},
|
102
|
+
center: function() {
|
103
|
+
if (this.markers) {
|
104
|
+
var lat = this.markers[0].position.lat;
|
105
|
+
var lng = this.markers[0].position.lng;
|
106
|
+
return { lat: lat, lng: lng };
|
107
|
+
|
108
|
+
// if (this.mapkers.length < 2) {
|
109
|
+
// } else {
|
110
|
+
// // const bounds = new google.maps.LatLngBounds()
|
111
|
+
// // for (let m of mapkers) {
|
112
|
+
// // bounds.extend(m.latLng)
|
113
|
+
// // }
|
114
|
+
// // this.$refs.map.$mapObject.fitBounds(bounds)
|
115
|
+
// }
|
116
|
+
}
|
117
|
+
// `this` points to the vm instance
|
118
|
+
}
|
119
|
+
},
|
120
|
+
props: ['markers'],
|
121
|
+
});
|
@@ -0,0 +1,15 @@
|
|
1
|
+
Vue.component('select-picker', {
|
2
|
+
template: '<select class="" >' +
|
3
|
+
'<option v-for="option in selectOptions">{{ option }}</option>' +
|
4
|
+
'</select>',
|
5
|
+
mounted: function() {
|
6
|
+
var vm = this;
|
7
|
+
$(this.$el).selectpicker(this.selectPickerTexts);
|
8
|
+
// .trigger('change')
|
9
|
+
// // emit event on change.
|
10
|
+
// .on('change', function() {
|
11
|
+
// vm.$emit('input', this.value)
|
12
|
+
// });
|
13
|
+
},
|
14
|
+
props: ['selectOptions', 'selectPickerTexts', 'selected'],
|
15
|
+
});
|
@@ -0,0 +1,31 @@
|
|
1
|
+
var INMOAPP = INMOAPP || {};
|
2
|
+
|
3
|
+
|
4
|
+
window.onload = function() {
|
5
|
+
|
6
|
+
var pwbSS = Vue.component('social-sharing', SocialSharing);
|
7
|
+
// var pwbGM = Vue.component('gmap-map', VueGoogleMaps);
|
8
|
+
Vue.use(VueGoogleMaps, {
|
9
|
+
load: {
|
10
|
+
key: 'AIzaSyCPorm8YzIaUGhKfe5cvpgofZ_gdT8hdZw'
|
11
|
+
// v: '3.26', // Google Maps API version
|
12
|
+
// libraries: 'places', // If you want to use places input
|
13
|
+
}
|
14
|
+
});
|
15
|
+
var markers = INMOAPP.markers || [];
|
16
|
+
INMOAPP.pwbVue = new Vue({
|
17
|
+
el: '#main-vue',
|
18
|
+
data: {
|
19
|
+
// markers: markers,
|
20
|
+
// selected: 2,
|
21
|
+
// selectoptions: [
|
22
|
+
// 2, 3, 4
|
23
|
+
// ],
|
24
|
+
// options: [
|
25
|
+
// { id: 1, text: 'Hello' },
|
26
|
+
// { id: 2, text: 'World' }
|
27
|
+
// ]
|
28
|
+
}
|
29
|
+
});
|
30
|
+
|
31
|
+
}
|
@@ -15,14 +15,35 @@
|
|
15
15
|
//= require jquery_ujs
|
16
16
|
//= require paloma
|
17
17
|
//= require_tree ../paloma
|
18
|
-
|
18
|
+
// require bootstrap-sprockets
|
19
19
|
//= require bootstrap-select
|
20
20
|
//= require berlin/slick
|
21
21
|
|
22
|
-
//
|
23
|
-
|
24
|
-
// require berlin/
|
25
|
-
|
22
|
+
// below needed for bootstrap-select to work
|
23
|
+
//= require berlin/bootstrap
|
24
|
+
// require berlin/custom
|
25
|
+
|
26
|
+
//= require lodash-4.16.4
|
27
|
+
// lodash used for google maps
|
28
|
+
<%
|
29
|
+
# ...
|
30
|
+
if Rails.env.development?
|
31
|
+
require_asset ("vue-2.4.2")
|
32
|
+
else
|
33
|
+
require_asset ("vue-2.4.2.prod")
|
34
|
+
end
|
35
|
+
|
36
|
+
require_asset ("vue-social-sharing")
|
37
|
+
require_asset ("vue-google-maps")
|
38
|
+
require_asset ("../shared/select-picker")
|
39
|
+
require_asset ("../shared/inmo-map")
|
40
|
+
require_asset ("../shared/slick-carousel")
|
41
|
+
require_asset ("../shared/vue-main")
|
42
|
+
|
43
|
+
%>
|
44
|
+
|
45
|
+
|
46
|
+
|
26
47
|
|
27
48
|
// $(document).on('page:change', function() {
|
28
49
|
// once turbolinks is activated, will have to change to above
|
@@ -32,6 +53,41 @@ $(document).on('ready', function() {
|
|
32
53
|
Paloma.start();
|
33
54
|
// Paloma.executeHook();
|
34
55
|
// Paloma.engine.start();
|
56
|
+
|
57
|
+
/* ----------------------------------------------------------- */
|
58
|
+
/* FIXED NAVBAR
|
59
|
+
/* ----------------------------------------------------------- */
|
60
|
+
|
61
|
+
|
62
|
+
jQuery(window).bind('scroll', function() {
|
63
|
+
if (jQuery(window).scrollTop() > 200) {
|
64
|
+
jQuery('.main-navbar').addClass('navbar-fixed-top');
|
65
|
+
|
66
|
+
} else {
|
67
|
+
jQuery('.main-navbar').removeClass('navbar-fixed-top');
|
68
|
+
}
|
69
|
+
});
|
70
|
+
|
71
|
+
/* ----------------------------------------------------------- */
|
72
|
+
/* SCROLL TOP BUTTON
|
73
|
+
/* ----------------------------------------------------------- */
|
74
|
+
|
75
|
+
//Check to see if the window is top if not then display button
|
76
|
+
|
77
|
+
jQuery(window).scroll(function() {
|
78
|
+
if (jQuery(this).scrollTop() > 900) {
|
79
|
+
jQuery('.scrollToTop').fadeIn();
|
80
|
+
} else {
|
81
|
+
jQuery('.scrollToTop').fadeOut();
|
82
|
+
}
|
83
|
+
});
|
84
|
+
|
85
|
+
//Click event to scroll to top
|
86
|
+
|
87
|
+
jQuery('.scrollToTop').click(function() {
|
88
|
+
jQuery('html, body').animate({ scrollTop: 0 }, 800);
|
89
|
+
return false;
|
90
|
+
});
|
35
91
|
});
|
36
92
|
|
37
93
|
// global namespace
|