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 = "'[";
|
var metacode_choices = "'[";
|
||||||
for (var key in imgArray) {
|
for (var key in imgArray) {
|
||||||
if (imgArray.hasOwnProperty(key)) {
|
if (imgArray.hasOwnProperty(key)) {
|
||||||
var caps = key;
|
metacode_choices += '["' + key + '","' + key + '"],';
|
||||||
var nocaps = caps.toLowerCase();
|
|
||||||
metacode_choices += '["' + nocaps + '","' + caps + '"],';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//remove trailing comma and add ]
|
//remove trailing comma and add ]
|
||||||
|
|
|
@ -129,9 +129,7 @@ class TopicsController < ApplicationController
|
||||||
@topic.desc = params[:topic][:desc] if params[:topic][:desc]
|
@topic.desc = params[:topic][:desc] if params[:topic][:desc]
|
||||||
@topic.link = params[:topic][:link] if params[:topic][:link]
|
@topic.link = params[:topic][:link] if params[:topic][:link]
|
||||||
@topic.permission = params[:topic][:permission] if params[:topic][:permission]
|
@topic.permission = params[:topic][:permission] if params[:topic][:permission]
|
||||||
end
|
@topic.metacode = Metacode.find_by_name(params[:topic][:metacode]) if params[:topic][:metacode]
|
||||||
if params[:category]
|
|
||||||
@topic.metacode = Metacode.find(params[:category][:metacode_id]) if params[:category][:metacode_id]
|
|
||||||
end
|
end
|
||||||
@topic.save
|
@topic.save
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue