Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@ gem 'rails', '3.2.2'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'
group :development do
gem 'sqlite3'
end

group :production do
gem 'pg'
end


gem 'devise'

# Gems used only for assets and not required
# in production environments by default.
Expand All @@ -21,6 +29,8 @@ group :assets do
end

gem 'jquery-rails'
gem 'cleditor_rails'
gem 'paperclip'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
Expand All @@ -35,4 +45,4 @@ gem 'jquery-rails'
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
# gem 'ruby-debug19', :require => 'ruby-debug'
25 changes: 25 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,23 @@ GEM
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.2)
bcrypt-ruby (3.0.1)
bcrypt-ruby (3.0.1-x86-mingw32)
builder (3.0.0)
cleditor_rails (0.0.3)
cocaine (0.2.1)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.2.0)
devise (2.0.4)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
railties (~> 3.1)
warden (~> 1.1.1)
erubis (2.7.0)
execjs (1.3.0)
multi_json (~> 1.0)
Expand All @@ -53,6 +62,14 @@ GEM
treetop (~> 1.4.8)
mime-types (1.17.2)
multi_json (1.1.0)
orm_adapter (0.0.7)
paperclip (2.4.5)
activerecord (>= 2.3.0)
activesupport (>= 2.3.2)
cocaine (>= 0.0.2)
mime-types
pg (0.13.2)
pg (0.13.2-x86-mingw32)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
Expand Down Expand Up @@ -89,6 +106,7 @@ GEM
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.5)
sqlite3 (1.3.5-x86-mingw32)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
Expand All @@ -98,13 +116,20 @@ GEM
uglifier (1.2.3)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
warden (1.1.1)
rack (>= 1.0)

PLATFORMS
ruby
x86-mingw32

DEPENDENCIES
cleditor_rails
coffee-rails (~> 3.2.1)
devise
jquery-rails
paperclip
pg
rails (= 3.2.2)
sass-rails (~> 3.2.3)
sqlite3
Expand Down
Binary file added app/assets/images/arbol1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/bea.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/blue-marker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/florencia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/fot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/logo3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/pablo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/paris.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/pedriza.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/pergamo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/reichstag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
//= require cleditor
//= require jquery_ujs
//= require_tree .
// require_tree .
16 changes: 16 additions & 0 deletions app/assets/javascripts/application.js~
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
//= require cleditor
//= require jquery_ujs

57 changes: 57 additions & 0 deletions app/assets/javascripts/coments.form.geolocation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
function success(position) {

if (document.getElementById('coment_latitude').value == ""){
document.getElementById('coment_latitude').value=position.coords.latitude;
document.getElementById('coment_longitude').value=position.coords.longitude;
document.getElementById('coment_zoom').value=15;
}
var s = document.querySelector('#status');

if (s.className == 'success') {
// not sure why we're hitting this twice in FF, I think it's to do with a cached result coming back
return;
}

s.innerHTML = position.coords.latitude+","+position.coords.longitude;
s.className = 'success';

var mapcanvas = document.createElement('div');
mapcanvas.id = 'mapcanvas';
mapcanvas.style.height = '200px';
mapcanvas.style.width = '260px';

document.querySelector('article').appendChild(mapcanvas);

var latlng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
var myOptions = {
zoom: 15,
center: latlng,
mapTypeControl: false,
navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("mapcanvas"), myOptions);

var marker = new google.maps.Marker({
position: latlng,
map: map,
title:"You are here! (at least within a "+position.coords.accuracy+" meter radius)"
});
}

function error(msg) {
var s = document.querySelector('#status');
s.innerHTML = typeof msg == 'string' ? msg : "failed";
s.className = 'fail';

// console.log(arguments);
}

if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(success, error);
} else {
error('not supported');
}



56 changes: 56 additions & 0 deletions app/assets/javascripts/coments.geolocation.js~
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
function success(position) {

if (document.getElementById('coment_latitude').value == ""){
document.getElementById('coment_latitude').value=position.coords.latitude;
document.getElementById('coment_longitude').value=position.coords.longitude;
}
var s = document.querySelector('#status');

if (s.className == 'success') {
// not sure why we're hitting this twice in FF, I think it's to do with a cached result coming back
return;
}

s.innerHTML = position.coords.latitude+","+position.coords.longitude;
s.className = 'success';

var mapcanvas = document.createElement('div');
mapcanvas.id = 'mapcanvas';
mapcanvas.style.height = '200px';
mapcanvas.style.width = '260px';

document.querySelector('article').appendChild(mapcanvas);

var latlng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
var myOptions = {
zoom: 15,
center: latlng,
mapTypeControl: false,
navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("mapcanvas"), myOptions);

var marker = new google.maps.Marker({
position: latlng,
map: map,
title:"You are here! (at least within a "+position.coords.accuracy+" meter radius)"
});
}

function error(msg) {
var s = document.querySelector('#status');
s.innerHTML = typeof msg == 'string' ? msg : "failed";
s.className = 'fail';

// console.log(arguments);
}

if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(success, error);
} else {
error('not supported');
}



3 changes: 3 additions & 0 deletions app/assets/javascripts/coments.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
53 changes: 53 additions & 0 deletions app/assets/javascripts/geolocation.js~
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
function success(position) {
document.getElementById('coment_latitude').value=position.coords.latitude;
document.getElementById('coment_longitude').value=position.coords.longitude;
var s = document.querySelector('#status');

if (s.className == 'success') {
// not sure why we're hitting this twice in FF, I think it's to do with a cached result coming back
return;
}

s.innerHTML = "found you!";
s.className = 'success';

var mapcanvas = document.createElement('div');
mapcanvas.id = 'mapcanvas';
mapcanvas.style.height = '200px';
mapcanvas.style.width = '260px';

document.querySelector('article').appendChild(mapcanvas);

var latlng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
var myOptions = {
zoom: 15,
center: latlng,
mapTypeControl: false,
navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("mapcanvas"), myOptions);

var marker = new google.maps.Marker({
position: latlng,
map: map,
title:"You are here! (at least within a "+position.coords.accuracy+" meter radius)"
});
}

function error(msg) {
var s = document.querySelector('#status');
s.innerHTML = typeof msg == 'string' ? msg : "failed";
s.className = 'fail';

// console.log(arguments);
}

if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(success, error);
} else {
error('not supported');
}



2 changes: 1 addition & 1 deletion app/assets/javascripts/planet.js.coffee
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
22 changes: 22 additions & 0 deletions app/assets/javascripts/sites.coments.show.geolocation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
function posicionar(position) {
document.getElementById('coment_latitude').value=position.coords.latitude;
document.getElementById('coment_longitude').value=position.coords.longitude;
document.getElementById('coment_zoom').value=15;
}

function error_posicionar(msg) {
var s = document.querySelector('#status');
s.innerHTML = typeof msg == 'string' ? msg : "failed";
s.className = 'fail';

// console.log(arguments);
}

if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(posicionar, error_posicionar);
} else {
error('not supported');
}



56 changes: 56 additions & 0 deletions app/assets/javascripts/sites.form.geolocation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
function success(position) {
if (document.getElementById('site_latitude').value == ""){
document.getElementById('site_latitude').value=position.coords.latitude;
document.getElementById('site_longitude').value=position.coords.longitude;
document.getElementById('site_zoom').value=15;
}
var s = document.querySelector('#status');

if (s.className == 'success') {
// not sure why we're hitting this twice in FF, I think it's to do with a cached result coming back
return;
}

s.innerHTML = "found you!";
s.className = 'success';

var mapcanvas = document.createElement('div');
mapcanvas.id = 'mapcanvas';
mapcanvas.style.height = '200px';
mapcanvas.style.width = '260px';

document.querySelector('article').appendChild(mapcanvas);

var latlng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
var myOptions = {
zoom: 15,
center: latlng,
mapTypeControl: false,
navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("mapcanvas"), myOptions);

var marker = new google.maps.Marker({
position: latlng,
map: map,
title:"You are here! (at least within a "+position.coords.accuracy+" meter radius)"
});
}

function error(msg) {
var s = document.querySelector('#status');
s.innerHTML = typeof msg == 'string' ? msg : "failed";
s.className = 'fail';

// console.log(arguments);
}

if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(success, error);
} else {
error('not supported');
}



Loading