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,9 +12,11 @@
<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">
<% 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>
<ul class="tab_menu">

@ -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);
@ -83,8 +83,8 @@
$.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);
@ -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