22 lines
804 B
JavaScript
Executable File
22 lines
804 B
JavaScript
Executable File
var linkIconTemplate = require('./icon-link.tpl');
|
|
var embedIconTemplate = require('./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'
|
|
}];
|
|
};
|