Project

General

Profile

Feature #15880 » 15880-add-link-to-new-issue.diff

Go MAEDA, 2016-06-12 05:56

View differences:

lib/redmine.rb (working copy)
226 226
end
227 227

  
228 228
Redmine::MenuManager.map :project_menu do |menu|
229
  menu.push :new_object, nil, :caption => ' + ',
229
  menu.push :new_object, { :controller => 'issues', :action => 'new', :copy_from => nil }, :caption => ' + ',
230 230
              :if => Proc.new { |p| Setting.new_item_menu_tab == '2' },
231
              :html => { :id => 'new-object', :onclick => 'toggleNewObjectDropdown(); return false;' }
231
              :html => { :id => 'new-object' }
232 232
  menu.push :new_issue_sub, { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new,
233 233
              :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) },
234 234
              :if => Proc.new { |p| Issue.allowed_target_trackers(p).any? },
public/javascripts/application.js (working copy)
725 725
  $('input[data-disables], input[data-enables], input[data-shows]').each(toggleDisabledOnChange);
726 726
}
727 727

  
728
function toggleNewObjectDropdown() {
729
  var dropdown = $('#new-object + ul.menu-children');
730
  if(dropdown.hasClass('visible')){
731
    dropdown.removeClass('visible');
732
  }else{
733
    dropdown.addClass('visible');
734
  }
735
}
736

  
737 728
(function ( $ ) {
738 729

  
739 730
  // detect if native date input is supported
(11-11/11)