Merge branch 'master' of github.com:Vizzuality/cartodb

1.0
Javier Álvarez Medina 14 years ago
commit 8979c144d9

@ -11,6 +11,7 @@ gem 'warden'
gem 'rails_warden'
gem 'rdoc', :group => :development
gem 'passenger', :group => :development
group :test, :development do
gem 'mocha'

@ -64,11 +64,15 @@ GEM
columnize (0.3.2)
configuration (1.2.0)
culerity (0.2.14)
daemon_controller (0.2.5)
diff-lcs (1.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
fastthread (1.0.7)
ffi (0.6.3)
rake (>= 0.8.7)
file-tail (1.0.5)
spruz (>= 0.1.0)
i18n (0.5.0)
json_pure (1.4.6)
launchy (0.3.7)
@ -88,6 +92,12 @@ GEM
nofxx-georuby (1.9.0)
json_pure (>= 1.4.6)
nokogiri (1.4.4)
passenger (3.0.2)
daemon_controller (>= 0.2.5)
fastthread (>= 1.0.1)
file-tail
rack
rake (>= 0.8.1)
pg (0.9.0)
polyglot (0.3.1)
rack (1.2.1)
@ -142,6 +152,7 @@ GEM
json_pure
rubyzip
sequel (3.19.0)
spruz (0.2.2)
steak (1.1.0)
rspec (>= 1.3)
thor (0.14.6)
@ -167,6 +178,7 @@ DEPENDENCIES
launchy
mocha
nofxx-georuby
passenger
pg (= 0.9)
rails (= 3.0.3)
rails_warden

@ -12,8 +12,10 @@
<h2><a href="#change_title"><%= @table.name %></a></h2>
<p class="status"><a class="<%= table_privacy_text(@table).downcase %>" href="#change_privacy"><%= table_privacy_text(@table) %></a></p>
<span class="tags">
<% @table.tags.split(',').each do |tag_name| %>
<p><%= tag_name %></p>
<% unless @table.tags.blank? %>
<% @table.tags.split(',').each do |tag_name| %>
<p><%= tag_name %></p>
<% end %>
<% end %>
<a href="#" class="add">add tags</a>
</span>

@ -1,25 +1,25 @@
$(document).ready(function(){
//Put paginator in middle
var paginator_width = $('div.paginate').width();
$('div.paginate').css('margin-left', ((626-paginator_width)/2) +'px');
$('div.paginate').show();
$('a.close').click(function(ev){
ev.stopPropagation();
ev.preventDefault();
$('div.requests_info').fadeOut();
});
$('ul.your_tables li.last').hover(function(){
$('div.tables_list div.left div.bottom_white_medium').css('background-position','0 -11px');
}, function(){
$('div.tables_list div.left div.bottom_white_medium').css('background-position','0 0');
});
$('a.new_table').click(function(ev){
ev.preventDefault();
ev.stopPropagation();
@ -27,8 +27,8 @@
$('div.mamufas').fadeIn();
bindESC();
});
$('input#create_table').click(function(ev){
ev.stopPropagation();
ev.preventDefault();
@ -39,8 +39,8 @@
$.ajax({
type: "POST",
url: '/api/json/tables/',
success: function(data) {
window.location.href = window.location;
success: function(data, textStatus, XMLHttpRequest) {
window.location.href = XMLHttpRequest.getResponseHeader("Location");
},
error: function(e) {
console.debug(e);
@ -48,10 +48,10 @@
});
});
});
setTimeout(function(){$('div.create_window a.close_create').addClass('last');},250);
});
$('a.delete').click(function(ev){
ev.preventDefault();
ev.stopPropagation();
@ -61,8 +61,8 @@
$('div.mamufas').fadeIn('fast');
bindESC();
});
$('div.mamufas a.cancel, div.mamufas a.close_delete, div.mamufas a.close_settings, div.mamufas a.close_create').click(function(ev){
ev.preventDefault();
ev.stopPropagation();
@ -73,9 +73,9 @@
});
unbindESC();
});
$('a.confirm_delete').click(function(ev){
ev.preventDefault();
ev.stopPropagation();
@ -83,16 +83,16 @@
$.ajax({
type: "DELETE",
url: '/api/json/tables/'+table_id,
success: function(data) {
window.location.href=window.location.href;
success: function(data, textStatus, XMLHttpRequest) {
window.location.href = XMLHttpRequest.getResponseHeader("Location");
},
error: function(e) {
console.debug(e);
}
});
});
$('a.settings').click(function(ev){
ev.preventDefault();
ev.stopPropagation();
@ -100,10 +100,10 @@
$('div.mamufas').fadeIn('fast');
bindESC();
});
});
function bindESC() {
$(document).keydown(function(){
if (event.which == '27') {
@ -119,4 +119,3 @@
function unbindESC() {
$(document).unbind('keydown');
}

@ -237,4 +237,39 @@ feature "Dashboard", %q{
click_link_or_button('close session')
page.current_path.should == login_path
end
# TODO: implement it
# scenario "Remove a table" do
# user = create_user
# create_table :user_id => user.id, :name => 'My check-ins', :privacy => Table::PUBLIC,
# :tags => "4sq, personal, feed aggregator"
# create_table :user_id => user.id, :name => 'Downloaded movies', :privacy => Table::PRIVATE,
# :tags => "movies, personal"
#
# login_as user
#
# # debugger
#
# page.driver.browser.execute_script("$('ul.your_tables li:eq(1)').trigger('mouseover')")
# page.find("ul.your_tables li a.delete").click
#
# page.find("div.delete_window a.cancel").click
# # page.find("ul.your_tables li:eq(1) p.status").click
# page.find("ul.your_tables li:eq(1) a.delete").click
# page.find("ul.your_tables li:eq(1) a.confirm_delete").click
# end
scenario "Create a new table" do
user = create_user
login_as user
click_link_or_button('Create a new table')
page.find('div.create_window ul li:eq(1) a').click
page.find('div.create_window span.bottom input#create_table').click
page.should have_css("h2", :text => 'untitle_table')
page.should have_css("p.status", :text => 'PUBLIC')
end
end

Loading…
Cancel
Save