- Created separate MoneyFlix project directory - Copied Node.js redirector from production server - Added CRM PHP code (Redirects module, Core classes, Config, Routes, Views) - Created comprehensive documentation (README_MONEYFLIX.md) - Added sync script to keep CRM code updated (sync-from-crm.sh) - Configured .gitignore for Node.js and PHP - Set up proper project structure for multi-client isolation This separates MoneyFlix from the main CRM to avoid confusion between different client systems and provides a dedicated environment for MoneyFlix-specific development and maintenance.
43 lines
1000 B
JavaScript
43 lines
1000 B
JavaScript
GMaps.geolocate = function(options) {
|
|
var complete_callback = options.always || options.complete;
|
|
|
|
if (navigator.geolocation) {
|
|
navigator.geolocation.getCurrentPosition(function(position) {
|
|
options.success(position);
|
|
|
|
if (complete_callback) {
|
|
complete_callback();
|
|
}
|
|
}, function(error) {
|
|
options.error(error);
|
|
|
|
if (complete_callback) {
|
|
complete_callback();
|
|
}
|
|
}, options.options);
|
|
}
|
|
else {
|
|
options.not_supported();
|
|
|
|
if (complete_callback) {
|
|
complete_callback();
|
|
}
|
|
}
|
|
};
|
|
|
|
GMaps.geocode = function(options) {
|
|
this.geocoder = new google.maps.Geocoder();
|
|
var callback = options.callback;
|
|
if (options.hasOwnProperty('lat') && options.hasOwnProperty('lng')) {
|
|
options.latLng = new google.maps.LatLng(options.lat, options.lng);
|
|
}
|
|
|
|
delete options.lat;
|
|
delete options.lng;
|
|
delete options.callback;
|
|
|
|
this.geocoder.geocode(options, function(results, status) {
|
|
callback(results, status);
|
|
});
|
|
};
|