[designfix] replace action menu in issues show

use refactored javascript for top menu
copy issue actions bar via javascript
pull/41/head
Romano Licker 13 years ago
parent e38860fcd1
commit 6bfb9d20fa
  1. 26
      app/views/issues/show.rhtml
  2. 18
      public/javascripts/application.js
  3. 5
      public/javascripts/copy_issue_actions.js
  4. 11
      public/stylesheets/application.css

@ -1,10 +1,19 @@
<div class="title-bar" id="upper-title-bar">
<div class="subject"><%= content_tag('h2', h(@issue.tracker.name) + ' #' +@issue.id.to_s) %></div>
<% content_for :action_menu_main do %>
<li><%= link_to_if_authorized(l(:button_update), {:controller => 'issues', :action => 'edit', :id => @issue }, :onclick => 'showAndScrollTo("update", "notes"); return false;', :class => 'icon icon-edit', :accesskey => accesskey(:edit)) %></li>
<li><%= watcher_link(@issue,
User.current,
{ :class => 'watcher_link',
:replace => User.current.allowed_to?(:view_issue_watchers, @project) ? ['#watchers', '.watcher_link'] : ['.watcher_link'] }) %></li>
<% end %>
<% content_for :action_menu_more do %>
<li><%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'new', :issue_id => @issue}, :class => 'icon icon-time-add' %></li>
<li><%= link_to_if_authorized l(:button_duplicate), {:controller => 'issues', :action => 'new', :project_id => @project, :copy_from => @issue }, :class => 'icon icon-duplicate' %></li>
<li><%= link_to_if_authorized l(:button_copy), {:controller => 'issue_moves', :action => 'new', :id => @issue, :copy_options => {:copy => 't'}}, :class => 'icon icon-copy' %></li>
<li><%= link_to_if_authorized l(:button_move), {:controller => 'issue_moves', :action => 'new', :id => @issue}, :class => 'icon icon-move' %></li>
<li><%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue}, :confirm => (@issue.leaf? ? l(:text_are_you_sure) : l(:text_are_you_sure_with_children)), :method => :post, :class => 'icon icon-del' %></li>
<% end %>
<div class="title-bar-actions">
<%= render :partial => 'action_menu' %>
</div>
</div>
<%= content_tag('h2', h(@issue.tracker.name) + ' #' +@issue.id.to_s, :id => "trackerid") %>
<div class="<%= @issue.css_classes %> details">
<div class="profile-wrap">
@ -104,10 +113,7 @@
<div style="clear: both;"></div>
<div class="title-bar" id="lower-title-bar">
<div class="title-bar-actions">
<%= render :partial => 'action_menu', :locals => {:replace_watcher => 'watcher2' } %>
</div>
<h3><%= l(:button_update) %></h3>
<%= javascript_include_tag 'copy_issue_actions' %>
</div>
<div style="clear: both;"></div>

@ -613,15 +613,8 @@ jQuery(document).ready(function($) {
function(){
return false;
});
jQuery("#account-nav > li.drop-down").click(function() {
if (($("#account-nav > li.drop-down.open").get(0) !== $(this).get(0))){
$("#account-nav > li.drop-down.open").toggleClass("open").find("> ul").mySlide();
}
$(this).slideAndFocus();
$("#account-nav").toggleClass("hover");
return false;
});
$("#account-nav").onClickDropDown();
$(".action_menu_main").onClickDropDown();
// deal with potentially problematic super-long titles
$(".title-bar h2").css({paddingRight: $(".title-bar-actions").outerWidth() + 15 });
@ -669,14 +662,7 @@ jQuery(document).ready(function($) {
});
});
$('html').click(function() {
$("#header .drop-down.open").toggleClass("open").find("> ul").mySlide();
$("#account-nav.hover").toggleClass("hover");
});
// Do not close the login window when using it
$('#account-nav li li').click(function(event){
event.stopPropagation();
});
$('#nav-login-content').click(function(event){
event.stopPropagation();
});

@ -0,0 +1,5 @@
jQuery(document).ready(function(){
var clone = jQuery('.action_menu_main').clone();
jQuery('#lower-title-bar').append(clone);
clone.onClickDropDown();
});

@ -1547,7 +1547,7 @@ h1.title {
#content .title-bar {
position:relative;
}
.title-bar div.subject h2 {
h2#trackerid {
font-size:14px;
font-weight:normal;
padding:12px 100px 4px 12px;
@ -1731,7 +1731,6 @@ form#issue-list {
/* color:#fff;*/
}
.title-bar .title-bar-actions .contextual a.icon {
color:#000000;
margin-right: 0px;
}
.title-bar .update {
@ -2760,3 +2759,11 @@ ul.action_menu_more {
-webkit-box-shadow: 1px 1px 2px #aaa;
z-index:100;
}
#lower-title-bar ul.action_menu_more {
bottom: 0;
left: 0;
margin-bottom: 25px;
}
#lower-title-bar ul.action_menu_main > li.drop-down {
position: relative;
}

Loading…
Cancel
Save