Merge branch 'refactor' into staging

This commit is contained in:
yflory
2017-04-13 14:44:55 +02:00
5 changed files with 971 additions and 84 deletions

View File

@@ -381,8 +381,9 @@ load pinpad dynamically only after you know that it will be needed */
});
return templates;
};
var addTemplate = common.addTemplate = function (href) {
getStore().addTemplate(href);
var addTemplate = common.addTemplate = function (data) {
getStore().pushData(data);
getStore().addPad(data.href, ['template']);
};
var isTemplate = common.isTemplate = function (href) {
@@ -692,7 +693,7 @@ load pinpad dynamically only after you know that it will be needed */
var userChannel = common.parseHash(userHash).channel;
if (!userChannel) { return null; }
var list = fo.getFilesDataFiles().map(hrefToHexChannelId)
var list = fo.getFiles([fo.FILES_DATA]).map(hrefToHexChannelId)
.filter(function (x) { return x; });
list.push(common.base64ToHex(userChannel));