cartodb-4.42/lib/assets/javascripts/builder/components/modals/publish/create-share-options.js
2024-04-06 05:25:13 +00:00

22 lines
884 B
JavaScript
Executable File

var linkIconTemplate = require('builder/components/modals/publish/publish/icon-link.tpl');
var embedIconTemplate = require('builder/components/modals/publish/publish/icon-embed.tpl');
module.exports = function (visDefinitionModel) {
return [{
createIcon: function () {
return linkIconTemplate();
},
type: 'get-link',
content: visDefinitionModel.embedURL(),
private: visDefinitionModel.get('privacy') === 'PRIVATE'
}, {
createIcon: function () {
return embedIconTemplate();
},
type: 'embed',
content: '<iframe width="100%" height="520" frameborder="0" src="' + encodeURI(visDefinitionModel.embedURL()) + '" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen></iframe>',
url: encodeURI(visDefinitionModel.embedURL()),
private: visDefinitionModel.get('privacy') === 'PRIVATE'
}];
};