diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 8cadc5c31..ad936bcff 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -559,6 +559,7 @@ define([ button .click(common.prepareFeedback(type)) .click(function () { + UIElements.openTemplatePicker(common, true); }); break; case 'template': diff --git a/www/common/metadata-manager.js b/www/common/metadata-manager.js index dfc855863..fed4183d3 100644 --- a/www/common/metadata-manager.js +++ b/www/common/metadata-manager.js @@ -34,6 +34,10 @@ define(['json.sortify'], function (Sortify) { } if (!metadataObj.users) { metadataObj.users = {}; } if (!metadataLazyObj.users) { metadataLazyObj.users = {}; } + + if (!metadataObj.type) { metadataObj.type = meta.doc.type; } + if (!metadataLazyObj.type) { metadataLazyObj.type = meta.doc.type; } + var mdo = {}; // We don't want to add our user data to the object multiple times. //var containsYou = false; diff --git a/www/common/sframe-app-framework.js b/www/common/sframe-app-framework.js index e9447d024..b7fb0b286 100644 --- a/www/common/sframe-app-framework.js +++ b/www/common/sframe-app-framework.js @@ -572,7 +572,7 @@ define([ toolbar.$rightside.append($templateButton); } - var $importTemplateButton = common.createButton('importtemplate', true, templateObj); + var $importTemplateButton = common.createButton('importtemplate', true); toolbar.$drawer.append($importTemplateButton); /* add a forget button */