FIXED - bug 240279: Cross browser issues EPF Wiki toolbar with FireFox, IE on Windows, Linux
https://bugs.eclipse.org/bugs/show_bug.cgi?id=240279
diff --git a/source/app/controllers/pages_controller.rb b/source/app/controllers/pages_controller.rb
index e33b35b..f9dec28 100644
--- a/source/app/controllers/pages_controller.rb
+++ b/source/app/controllers/pages_controller.rb
@@ -50,6 +50,13 @@
render :update do |page|
page.replace_html 'epfwiki_header', :partial => 'header'
page.replace_html 'epfwiki_footer', :partial => 'footer'
+ if @checkout
+ if @version
+ page.replace_html 'checkout_text', :inline => "<%= image_tag('notice.png', :align => 'middle') %> This page is currently being modified by <%= @checkout.user.name %>"
+ else
+ page.replace_html 'checkout_text', :inline => "<%= image_tag('notice.png', :align => 'middle') %> This page is currently being created by <%= @checkout.user.name %>"
+ end
+ end
end
end
diff --git a/source/app/views/layouts/management.rhtml b/source/app/views/layouts/management.rhtml
index 41c31b7..6955763 100644
--- a/source/app/views/layouts/management.rhtml
+++ b/source/app/views/layouts/management.rhtml
@@ -3,6 +3,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><%= (ENV['EPFWIKI_APP_NAME'] + " - ") if !@site || !@site.id %><% if @site && @site.id %><%= @site.title + ' - ' %><% end %><%= @heading %></title>
<%= stylesheet_link_tag 'default' %>
+ <%= stylesheet_link_tag 'wiki' %>
<%= javascript_include_tag "prototype" %>
<%= javascript_include_tag "contentpage" %>
<%= javascript_include_tag "steps" %>
@@ -34,8 +35,9 @@
when 'other/about' then params[:action] = 'About'
end
%>
+<div id="epfwiki_header">
<div id="toolbar">
- <ol id="toolbar_toc">
+ <ol id="toc">
<%= menulink_to 'Sites', :controller => 'sites', :action => 'list' %>
<%= menulink_to 'Users', :controller => 'users', :action => 'list' %>
<% if admin? %>
@@ -52,6 +54,8 @@
<% end %>
</ol>
</div>
+</div>
+<div id="spacer"></div>
<% end %>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
diff --git a/source/app/views/layouts/portal.rhtml b/source/app/views/layouts/portal.rhtml
index 76a62ad..8966af4 100644
--- a/source/app/views/layouts/portal.rhtml
+++ b/source/app/views/layouts/portal.rhtml
@@ -105,7 +105,8 @@
</ul>
</li>
<li><%= link_to 'Upload file', :controller => 'uploads', :action => 'new' %></li>
- <li><%= link_to "My Account", :controller => 'users', :action => 'account' %></li>
+ <li><%= link_to 'My Account', :controller => 'users', :action => 'account' %></li>
+ <li><%= link_to 'EPF Wiki User Guide', 'http://wiki.eclipse.org/EPF_Wiki_User_Guide' %></li>
</ul>
</p>
@@ -114,7 +115,7 @@
<p>
<div id="monthly_top">
<div id="tabs">
- <ol id="toc">
+ <ol id="toc_tabs">
<li class="current"><a><span>Monthly</span></a></li>
<li>
<%= link_to_function("<span>Overall</span>") do |page|
@@ -133,7 +134,7 @@
<div id="overall_top" style="display:none;">
<div id="tabs">
- <ol id="toc">
+ <ol id="toc_tabs">
<li>
<%= link_to_function("<span>Monthly</span>") do |page|
page.show "monthly_top"
diff --git a/source/app/views/layouts/wiki.rhtml b/source/app/views/layouts/wiki.rhtml
index 64aca2c..65004b6 100644
--- a/source/app/views/layouts/wiki.rhtml
+++ b/source/app/views/layouts/wiki.rhtml
@@ -29,7 +29,8 @@
<div id="epfwiki_header">
<%= render :partial => 'pages/header' %>
- </div>
+ </div>
+ <div id="spacer"></div>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
diff --git a/source/app/views/pages/_header.rhtml b/source/app/views/pages/_header.rhtml
index 98ddf26..05bfe4f 100644
--- a/source/app/views/pages/_header.rhtml
+++ b/source/app/views/pages/_header.rhtml
@@ -15,14 +15,4 @@
<% end %>
<% end %>
</ol>
-</div>
-
-<% if @checkout && params[:action] == 'view' %>
- <p>
- <% if @version %>
- <%= image_tag('notice.png', :align => 'middle') %> This page is currently being modified by <%= @checkout.user.name %>
- <% else %>
- <%= image_tag('notice.png', :align => 'middle') %> This page is currently being created by <%= @checkout.user.name %>
- <% end %>
- </p>
-<% end %>
\ No newline at end of file
+</div>
\ No newline at end of file
diff --git a/source/app/views/pages/_tinymce.rhtml b/source/app/views/pages/_tinymce.rhtml
index 19ef5b9..33ae654 100644
--- a/source/app/views/pages/_tinymce.rhtml
+++ b/source/app/views/pages/_tinymce.rhtml
@@ -311,6 +311,7 @@
<% @current = 'Edit' %>
<%= render :partial => 'pages/header' %>
</div>
+<div id="spacer"></div>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
diff --git a/source/app/views/portal/_tabmenu.rhtml b/source/app/views/portal/_tabmenu.rhtml
index 5ca0f6b..deef547 100644
--- a/source/app/views/portal/_tabmenu.rhtml
+++ b/source/app/views/portal/_tabmenu.rhtml
@@ -1,5 +1,5 @@
<% div_id = 'tabs' if div_id.nil? %>
-<% ol_id = 'toc' if ol_id.nil? %>
+<% ol_id = 'toc_tabs' if ol_id.nil? %>
<div id="<%= div_id %>">
<ol id="<%= ol_id %>">
<% items.each do |item| %>
diff --git a/source/public/javascripts/wiki.js b/source/public/javascripts/wiki.js
index 873ff53..2f95bfb 100644
--- a/source/public/javascripts/wiki.js
+++ b/source/public/javascripts/wiki.js
@@ -13,6 +13,14 @@
epfwiki_footer.id="epfwiki_footer";
epfwiki_footer.innerHTML="<img src='/images/busy.gif'></img>";
document.body.appendChild(epfwiki_footer)
+
+ var checkout_text = document.createElement("div");
+ checkout_text.id = "checkout_text";
+ document.body.insertBefore(checkout_text, document.body.firstChild);
+
+ var spacer = document.createElement("div");
+ spacer.id = "spacer";
+ document.body.insertBefore(spacer, document.body.firstChild);
var epfwiki_header = document.createElement("div");
epfwiki_header.id="epfwiki_header";
diff --git a/source/public/stylesheets/default.css b/source/public/stylesheets/default.css
index c33ff5b..6838f68 100644
--- a/source/public/stylesheets/default.css
+++ b/source/public/stylesheets/default.css
@@ -125,9 +125,10 @@
}
-ol#toc {
+ol#toc_tabs {
list-style: none;
margin-left: 15px;
+ margin-top: 0px;
padding: 0;
font-size: x-small;
height: 29px;
@@ -135,12 +136,12 @@
font-weight: bold;
}
-ol#toc li {
+ol#toc_tabs li {
float: left;
margin: 0 0 0 0;
}
-ol#toc a {
+ol#toc_tabs a {
background: url(../images/tab2.png);
color: black;
display: block;
@@ -150,24 +151,24 @@
text-decoration: none;
}
-ol#toc a:hover {
+ol#toc_tabs a:hover {
background-position: 0 -58px;
}
-ol#toc a:hover span {
+ol#toc_tabs a:hover span {
background-position: 100% -58px;
}
-ol#toc li.current a {
+ol#toc_tabs li.current a {
background-position: 0 -29px;
color: black;
}
-ol#toc li.current span {
+ol#toc_tabs li.current span {
background-position: 100% -29px;
}
-ol#toc span {
+ol#toc_tabs span {
background: url(../images/tab2.png) 100% 0;
display: block;
line-height: 29px;
@@ -188,95 +189,6 @@
color: #4A4A4A;
}
-
-
-/* Toolbar, basically copy of entries in wiki.css */
-
-div#epfwiki_header {
-margin-top: -10px;
-margin-left: -10px;
-margin-right: -10px;
-}
-
-div#toolbar {
-margin-top: -10px !important;
-margin-top: 0px;
-margin-left: -10px;
-background: url(../images/tab_background.png);
-}
-
-ol#toolbar_toc {
- list-style: none;
- margin-left: 10px;
- padding: 0;
- font-size: x-small;
- height: 24px;
- font-family: Microsoft Sans Serif;
- font-weight: bold;
-}
-
-ol#toolbar_toc li {
- float: left;
- margin: 0 0 0 0;
-}
-
-ol#toolbar_toc a {
- background: url(../images/tab.png);
- color: black;
- display: block;
- float: left;
- height: 20px;
- padding-left: 10px;
- text-decoration: none;
-}
-
-ol#toolbar_toc a:hover {
- background-position: 0 -40px;
-}
-
-ol#toolbar_toc a:hover span {
- background-position: 100% -40px;
-}
-
-ol#toolbar_toc li.current a {
- background-position: 0 -20px;
- color: black;
-}
-
-ol#toolbar_toc li.current span {
- background-position: 100% -20px;
-}
-
-ol#toolbar_toc span {
- background: url(../images/tab.png) 100% 0;
- display: block;
- line-height: 20px;
- padding-right: 10px;
-}
-
-ol#toolbar_toc li.simple {
- float: right;
- margin: 0 0 0 0;
-}
-
-ol#toolbar_toc li.simple a {
- background: none;
- color: #565656;
- display: block;
- height: 20px;
- padding-left: 10px;
- text-decoration: none;
-}
-
-ol#toolbar_toc li.simple a:hover{
- text-decoration: underline;
-}
-
-ol#toolbar_toc li.simple span {
-background: none;
-}
-
-
/* EPFC style tabs */
div#epfc_tabs {
diff --git a/source/public/stylesheets/wiki.css b/source/public/stylesheets/wiki.css
index 5d92cf9..e7891ad 100644
--- a/source/public/stylesheets/wiki.css
+++ b/source/public/stylesheets/wiki.css
@@ -15,7 +15,10 @@
top: 0px;
left: 0px;
right: 0px;
- height: 30px;
+}
+
+div#spacer {
+ height: 40px;
}
div#toolbar {
@@ -31,7 +34,7 @@
list-style: none;
margin-left: 10px;
margin-top: 0px;
- padding: 0;
+ padding: 0px;
font-size: x-small;
height: 24px;
font-family: Microsoft Sans Serif;