cartodb-4.42/lib/assets/javascripts/cartodb/public/public_dropdown.js
2024-04-06 05:25:13 +00:00

28 lines
616 B
JavaScript

/**
* Account dropdown within public header
*
*/
cdb.open.AccountDropdown = cdb.admin.DropdownMenu.extend({
_TEMPLATE: ' \
<ul>\
<li><a class="small" href="<%- urls[0] %>">View your datasets</a></li>\
<li><a class="small" href="<%- urls[0] %>/visualizations">View your maps</a></li>\
<li><a class="small" href="<%- urls[0].replace("dashboard", "logout") %>">Close session</a></li>\
</ul>\
',
render: function() {
this.$el
.html(_.template(this._TEMPLATE)(this.model.attributes))
.css({
width: this.options.width
})
return this;
}
});