fixed the metacode editing. TODO: Description, Link
This commit is contained in:
parent
c62f99d0fb
commit
84c8494f2b
2 changed files with 2 additions and 6 deletions
|
@ -564,9 +564,7 @@ function onCreateLabelHandler(domElement, node) {
|
|||
var metacode_choices = "'[";
|
||||
for (var key in imgArray) {
|
||||
if (imgArray.hasOwnProperty(key)) {
|
||||
var caps = key;
|
||||
var nocaps = caps.toLowerCase();
|
||||
metacode_choices += '["' + nocaps + '","' + caps + '"],';
|
||||
metacode_choices += '["' + key + '","' + key + '"],';
|
||||
}
|
||||
}
|
||||
//remove trailing comma and add ]
|
||||
|
|
|
@ -129,9 +129,7 @@ class TopicsController < ApplicationController
|
|||
@topic.desc = params[:topic][:desc] if params[:topic][:desc]
|
||||
@topic.link = params[:topic][:link] if params[:topic][:link]
|
||||
@topic.permission = params[:topic][:permission] if params[:topic][:permission]
|
||||
end
|
||||
if params[:category]
|
||||
@topic.metacode = Metacode.find(params[:category][:metacode_id]) if params[:category][:metacode_id]
|
||||
@topic.metacode = Metacode.find_by_name(params[:topic][:metacode]) if params[:topic][:metacode]
|
||||
end
|
||||
@topic.save
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue