Fix template importer

pull/1/head
yflory 7 years ago
parent 0c2987a6d1
commit f1c1d87d3f

@ -559,6 +559,7 @@ define([
button button
.click(common.prepareFeedback(type)) .click(common.prepareFeedback(type))
.click(function () { .click(function () {
UIElements.openTemplatePicker(common, true);
}); });
break; break;
case 'template': case 'template':

@ -34,6 +34,10 @@ define(['json.sortify'], function (Sortify) {
} }
if (!metadataObj.users) { metadataObj.users = {}; } if (!metadataObj.users) { metadataObj.users = {}; }
if (!metadataLazyObj.users) { metadataLazyObj.users = {}; } if (!metadataLazyObj.users) { metadataLazyObj.users = {}; }
if (!metadataObj.type) { metadataObj.type = meta.doc.type; }
if (!metadataLazyObj.type) { metadataLazyObj.type = meta.doc.type; }
var mdo = {}; var mdo = {};
// We don't want to add our user data to the object multiple times. // We don't want to add our user data to the object multiple times.
//var containsYou = false; //var containsYou = false;

@ -572,7 +572,7 @@ define([
toolbar.$rightside.append($templateButton); toolbar.$rightside.append($templateButton);
} }
var $importTemplateButton = common.createButton('importtemplate', true, templateObj); var $importTemplateButton = common.createButton('importtemplate', true);
toolbar.$drawer.append($importTemplateButton); toolbar.$drawer.append($importTemplateButton);
/* add a forget button */ /* add a forget button */

Loading…
Cancel
Save