mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-22 07:04:09 +01:00
Merge branch 'master' into 1.7_branch
* master: Added a fix for a failing functional test which concerned the javascript popup window to warn when a new context added in new action form. Fixed webrat/core.rb to solve problem with Ubuntu, as documented here: Corrected URL for testing documentation to Tracks community wiki.
This commit is contained in:
commit
c42cfc6e9f
5 changed files with 274 additions and 273 deletions
|
|
@ -40,6 +40,7 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
@contexts = current_user.contexts(true)
|
||||||
init_data_for_sidebar unless mobile?
|
init_data_for_sidebar unless mobile?
|
||||||
@projects = current_user.projects
|
@projects = current_user.projects
|
||||||
@page_title = "TRACKS::Project: #{@project.name}"
|
@page_title = "TRACKS::Project: #{@project.name}"
|
||||||
|
|
|
||||||
|
|
@ -27,17 +27,17 @@
|
||||||
:condition => "!$('todo_new_action_submit').isWaiting() && askIfNewContextProvided()") do -%>
|
:condition => "!$('todo_new_action_submit').isWaiting() && askIfNewContextProvided()") do -%>
|
||||||
|
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
function askIfNewContextProvided() {
|
function askIfNewContextProvided() {
|
||||||
var contexts = new Array(<%= @contexts.map{|c| '\'' + c.name + '\''}.join(", ") %>);
|
var contexts = new Array(<%= @contexts.map{|c| '\'' + c.name + '\''}.join(", ") %>);
|
||||||
var givenContextName = $('todo_context_name').value;
|
var givenContextName = $('todo_context_name').value;
|
||||||
if (givenContextName.length == 0) return true; // show rails validation error
|
if (givenContextName.length == 0) return true; // show rails validation error
|
||||||
for (var i = 0; i < contexts.length; ++i) {
|
for (var i = 0; i < contexts.length; ++i) {
|
||||||
if (contexts[i] == givenContextName) {
|
if (contexts[i] == givenContextName) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return confirm('New context "' + givenContextName + '" will be also created. Are you sure?');
|
return confirm('New context "' + givenContextName + '" will be also created. Are you sure?');
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="status"><%= error_messages_for("item", :object_name => 'action') %></div>
|
<div id="status"><%= error_messages_for("item", :object_name => 'action') %></div>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
1. Wiki
|
1. Wiki
|
||||||
|
|
||||||
There are some pointers for setting up your Tracks copy for testing at http://dev.rousette.org.uk/wiki/Tracks/Testing
|
There are some pointers for setting up your Tracks copy for testing at http://www.rousette.org.uk/projects/wiki/Testing/
|
||||||
|
|
||||||
2. SQLITE3 FOR TESTING
|
2. SQLITE3 FOR TESTING
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -223,8 +223,8 @@ class ProjectsControllerTest < TodoContainerControllerTestBase
|
||||||
login_as :admin_user
|
login_as :admin_user
|
||||||
u = users(:admin_user)
|
u = users(:admin_user)
|
||||||
post :actionize, :state => "active", :format => 'js'
|
post :actionize, :state => "active", :format => 'js'
|
||||||
assert_equal 1, projects(:gardenclean).position
|
assert_equal 1, projects(:moremoney).position
|
||||||
assert_equal 2, projects(:moremoney).position
|
assert_equal 2, projects(:gardenclean).position
|
||||||
assert_equal 3, projects(:timemachine).position
|
assert_equal 3, projects(:timemachine).position
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
4
vendor/plugins/webrat/lib/webrat/core.rb
vendored
4
vendor/plugins/webrat/lib/webrat/core.rb
vendored
|
|
@ -1,3 +1,3 @@
|
||||||
Dir[File.join(File.dirname(__FILE__), "core", "*.rb")].each do |file|
|
%w{field form label link logging page select_option session}.each do |file|
|
||||||
require File.expand_path(file)
|
require File.dirname(__FILE__) + "/core/#{file}"
|
||||||
end
|
end
|
||||||
Loading…
Add table
Add a link
Reference in a new issue