mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
fixes on the fly category creation
This commit is contained in:
committed by
Michael Frister
parent
8303552576
commit
4cc9aaf896
@@ -33,10 +33,7 @@ class IssueCategoriesController < ApplicationController
|
||||
redirect_to :controller => '/projects', :action => 'settings', :tab => 'categories', :id => @project
|
||||
end
|
||||
format.js do
|
||||
# IE doesn't support the replace_html rjs method for select box options
|
||||
render(:update) {|page| page.replace "issue_category_id",
|
||||
content_tag('select', '<option></option>' + options_from_collection_for_select(@project.issue_categories, 'id', 'name', @category.id), :id => 'issue_category_id', :name => 'issue[category_id]')
|
||||
}
|
||||
render :locals => { :project => @project, :category => @category }
|
||||
end
|
||||
end
|
||||
else
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<%#-- copyright
|
||||
OpenProject is a project management system.
|
||||
|
||||
Copyright (C) 2012-2013 the OpenProject Team
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License version 3.
|
||||
|
||||
See doc/COPYRIGHT.rdoc for more details.
|
||||
|
||||
++#%>
|
||||
|
||||
jQuery('#work_package_category_id').empty().append("<%= escape_javascript(options_from_collection_for_select(project.issue_categories, 'id', 'name', category.id)) %>");
|
||||
Reference in New Issue
Block a user