diff --git a/app/views/layouts/_project_selector.rhtml b/app/views/layouts/_project_selector.rhtml
index ce2f15e..7a28035 100644
--- a/app/views/layouts/_project_selector.rhtml
+++ b/app/views/layouts/_project_selector.rhtml
@@ -1,7 +1,7 @@
<% user_projects_by_root = User.current.projects.find(:all, :include => :parent).group_by(&:root) %>
diff --git a/app/views/repositories/diff.rhtml b/app/views/repositories/diff.rhtml
index c1c33a4..de6cdc5 100644
--- a/app/views/repositories/diff.rhtml
+++ b/app/views/repositories/diff.rhtml
@@ -11,9 +11,9 @@
<%= select_tag 'type', options_for_select([[l(:label_diff_inline), "inline"], [l(:label_diff_side_by_side), "sbs"]], @diff_type), :onchange => "if (this.value != '') {this.form.submit()}" %>
<% end %>
-
<% content_for :header_tags do %>
<%= stylesheet_link_tag "scm" %>
diff --git a/app/views/wiki/show.rhtml b/app/views/wiki/show.rhtml
index 8def560..d234917 100644
--- a/app/views/wiki/show.rhtml
+++ b/app/views/wiki/show.rhtml
@@ -24,12 +24,6 @@
<%= link_to_attachments @page.attachments, :delete_url => (authorize_for('wiki', 'destroy_attachment') ? {:controller => 'wiki', :action => 'destroy_attachment', :page => @page.title} : nil) %>
-
-<%= l(:label_export_to) %>
-<%= link_to 'HTML', {:page => @page.title, :export => 'html', :version => @content.version}, :class => 'icon icon-html' %>,
-<%= link_to 'TXT', {:page => @page.title, :export => 'txt', :version => @content.version}, :class => 'icon icon-txt' %>
-
-
<% if authorize_for('wiki', 'add_attachment') %>
<%= toggle_link l(:label_attachment_new), "add_attachment_form" %>
<% form_tag({ :controller => 'wiki', :action => 'add_attachment', :page => @page.title }, :multipart => true, :class => "tabular", :id => "add_attachment_form", :style => "display:none;") do %>
@@ -38,6 +32,13 @@
<% end %>
<% end %>
+
+<%= l(:label_export_to) %>
+<%= link_to 'HTML', {:page => @page.title, :export => 'html', :version => @content.version}, :class => 'icon icon-html' %>,
+<%= link_to 'TXT', {:page => @page.title, :export => 'txt', :version => @content.version}, :class => 'icon icon-txt' %>
+
+
+
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'scm' %>
<% end %>
diff --git a/lib/redmine/scm/adapters/mercurial_adapter.rb b/lib/redmine/scm/adapters/mercurial_adapter.rb
index 1b9cab4..3c905fc 100644
--- a/lib/redmine/scm/adapters/mercurial_adapter.rb
+++ b/lib/redmine/scm/adapters/mercurial_adapter.rb
@@ -112,7 +112,7 @@ module Redmine
:author => changeset[:user],
:time => Time.parse(changeset[:date]),
:message => changeset[:description],
- :paths => changeset[:files].split.collect{|path| {:action => 'X', :path => "/#{path}"}}
+ :paths => changeset[:files].to_s.split.collect{|path| {:action => 'X', :path => "/#{path}"}}
})
end
return nil if $? && $?.exitstatus != 0
diff --git a/lib/redmine/themes.rb b/lib/redmine/themes.rb
index a7cf940..d0c90e3 100644
--- a/lib/redmine/themes.rb
+++ b/lib/redmine/themes.rb
@@ -69,4 +69,8 @@ module ApplicationHelper
super((@current_theme && @current_theme.stylesheets.include?(source)) ?
"/themes/#{@current_theme.dir}/stylesheets/#{source}" : source)
end
+
+ def path_to_stylesheet(source)
+ stylesheet_path source
+ end
end
diff --git a/public/javascripts/context_menu.js b/public/javascripts/context_menu.js
index 2e81086..11754cd 100644
--- a/public/javascripts/context_menu.js
+++ b/public/javascripts/context_menu.js
@@ -39,6 +39,9 @@ ContextMenu.prototype = {
this.selection = tr;
var id = tr.id.substring(6, tr.id.length);
/* TODO: do not hard code path */
- new Ajax.Updater({success:'context-menu'}, '../../issues/context_menu/' + id, {asynchronous:true, evalScripts:true, onComplete:function(request){Effect.Appear('context-menu', {duration: 0.20})}})
+ new Ajax.Updater({success:'context-menu'}, '../../issues/context_menu/' + id, {asynchronous:true, evalScripts:true, onComplete:function(request){
+ Effect.Appear('context-menu', {duration: 0.20});
+ if (window.parseStylesheets) { window.parseStylesheets(); }
+ }})
}
}
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 8aa63d8..aa4b297 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -123,7 +123,7 @@ hr { width: 100%; height: 1px; background: #ccc; border: 0;}
textarea.wiki-edit { width: 99%; }
li p {margin-top: 0;}
div.issue {background:#ffffdd; padding:6px; margin-bottom:6px;border: 1px solid #d7d7d7;}
-.autoscroll {overflow-x: auto; padding:1px; width:100%;}
+.autoscroll {overflow-x: auto; padding:1px; width:100%; margin-bottom: 1.2em;}
#user_firstname, #user_lastname, #user_mail, #my_account_form select { width: 90%; }
/***** Tabular forms ******/
diff --git a/public/stylesheets/context_menu.css b/public/stylesheets/context_menu.css
index 69acf7b..f68b33f 100644
--- a/public/stylesheets/context_menu.css
+++ b/public/stylesheets/context_menu.css
@@ -24,7 +24,7 @@
}
#context-menu li.folder ul {
position:absolute;
- left:128px; /* IE */
+ left:168px; /* IE6 */
top:-2px;
}
#context-menu li.folder>ul { left:148px; }
diff --git a/public/stylesheets/csshover.htc b/public/stylesheets/csshover.htc
index 3ba936a..5b58bf0 100644
--- a/public/stylesheets/csshover.htc
+++ b/public/stylesheets/csshover.htc
@@ -117,4 +117,6 @@ function getElementsBySelect(rule) {
return nodes;
}
+
+window.parseStylesheets = parseStylesheets;
\ No newline at end of file
diff --git a/test/functional/repositories_mercurial_controller_test.rb b/test/functional/repositories_mercurial_controller_test.rb
index db00290..736e38c 100644
--- a/test/functional/repositories_mercurial_controller_test.rb
+++ b/test/functional/repositories_mercurial_controller_test.rb
@@ -35,83 +35,88 @@ class RepositoriesMercurialControllerTest < Test::Unit::TestCase
Repository::Mercurial.create(:project => Project.find(3), :url => REPOSITORY_PATH)
end
- def test_show
- get :show, :id => 3
- assert_response :success
- assert_template 'show'
- assert_not_nil assigns(:entries)
- assert_not_nil assigns(:changesets)
- end
-
- def test_browse_root
- get :browse, :id => 3
- assert_response :success
- assert_template 'browse'
- assert_not_nil assigns(:entries)
- assert_equal 3, assigns(:entries).size
- assert assigns(:entries).detect {|e| e.name == 'images' && e.kind == 'dir'}
- assert assigns(:entries).detect {|e| e.name == 'sources' && e.kind == 'dir'}
- assert assigns(:entries).detect {|e| e.name == 'README' && e.kind == 'file'}
- end
-
- def test_browse_directory
- get :browse, :id => 3, :path => ['images']
- assert_response :success
- assert_template 'browse'
- assert_not_nil assigns(:entries)
- assert_equal 2, assigns(:entries).size
- entry = assigns(:entries).detect {|e| e.name == 'edit.png'}
- assert_not_nil entry
- assert_equal 'file', entry.kind
- assert_equal 'images/edit.png', entry.path
- end
-
- def test_changes
- get :changes, :id => 3, :path => ['images', 'edit.png']
- assert_response :success
- assert_template 'changes'
- assert_tag :tag => 'h2', :content => 'edit.png'
- end
-
- def test_entry_show
- get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb']
- assert_response :success
- assert_template 'entry'
- # Line 19
- assert_tag :tag => 'th',
- :content => /10/,
- :attributes => { :class => /line-num/ },
- :sibling => { :tag => 'td', :content => /WITHOUT ANY WARRANTY/ }
- end
-
- def test_entry_download
- get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb'], :format => 'raw'
- assert_response :success
- # File content
- assert @response.body.include?('WITHOUT ANY WARRANTY')
- end
-
- def test_diff
- # Full diff of changeset 4
- get :diff, :id => 3, :rev => 4
- assert_response :success
- assert_template 'diff'
- # Line 22 removed
- assert_tag :tag => 'th',
- :content => /22/,
- :sibling => { :tag => 'td',
- :attributes => { :class => /diff_out/ },
- :content => /def remove/ }
- end
+ if File.directory?(REPOSITORY_PATH)
+ def test_show
+ get :show, :id => 3
+ assert_response :success
+ assert_template 'show'
+ assert_not_nil assigns(:entries)
+ assert_not_nil assigns(:changesets)
+ end
+
+ def test_browse_root
+ get :browse, :id => 3
+ assert_response :success
+ assert_template 'browse'
+ assert_not_nil assigns(:entries)
+ assert_equal 3, assigns(:entries).size
+ assert assigns(:entries).detect {|e| e.name == 'images' && e.kind == 'dir'}
+ assert assigns(:entries).detect {|e| e.name == 'sources' && e.kind == 'dir'}
+ assert assigns(:entries).detect {|e| e.name == 'README' && e.kind == 'file'}
+ end
+
+ def test_browse_directory
+ get :browse, :id => 3, :path => ['images']
+ assert_response :success
+ assert_template 'browse'
+ assert_not_nil assigns(:entries)
+ assert_equal 2, assigns(:entries).size
+ entry = assigns(:entries).detect {|e| e.name == 'edit.png'}
+ assert_not_nil entry
+ assert_equal 'file', entry.kind
+ assert_equal 'images/edit.png', entry.path
+ end
+
+ def test_changes
+ get :changes, :id => 3, :path => ['images', 'edit.png']
+ assert_response :success
+ assert_template 'changes'
+ assert_tag :tag => 'h2', :content => 'edit.png'
+ end
+
+ def test_entry_show
+ get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb']
+ assert_response :success
+ assert_template 'entry'
+ # Line 19
+ assert_tag :tag => 'th',
+ :content => /10/,
+ :attributes => { :class => /line-num/ },
+ :sibling => { :tag => 'td', :content => /WITHOUT ANY WARRANTY/ }
+ end
+
+ def test_entry_download
+ get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb'], :format => 'raw'
+ assert_response :success
+ # File content
+ assert @response.body.include?('WITHOUT ANY WARRANTY')
+ end
- def test_annotate
- get :annotate, :id => 3, :path => ['sources', 'watchers_controller.rb']
- assert_response :success
- assert_template 'annotate'
- # Line 23, revision 4
- assert_tag :tag => 'th', :content => /23/,
- :sibling => { :tag => 'td', :child => { :tag => 'a', :content => /4/ } },
- :sibling => { :tag => 'td', :content => /jsmith/ },
- :sibling => { :tag => 'td', :content => /watcher =/ }
+ def test_diff
+ # Full diff of changeset 4
+ get :diff, :id => 3, :rev => 4
+ assert_response :success
+ assert_template 'diff'
+ # Line 22 removed
+ assert_tag :tag => 'th',
+ :content => /22/,
+ :sibling => { :tag => 'td',
+ :attributes => { :class => /diff_out/ },
+ :content => /def remove/ }
+ end
+
+ def test_annotate
+ get :annotate, :id => 3, :path => ['sources', 'watchers_controller.rb']
+ assert_response :success
+ assert_template 'annotate'
+ # Line 23, revision 4
+ assert_tag :tag => 'th', :content => /23/,
+ :sibling => { :tag => 'td', :child => { :tag => 'a', :content => /4/ } },
+ :sibling => { :tag => 'td', :content => /jsmith/ },
+ :sibling => { :tag => 'td', :content => /watcher =/ }
+ end
+ else
+ puts "Mercurial test repository NOT FOUND. Skipping functional tests !!!"
+ def test_fake; assert true end
end
end