2012-03-09 05:02:49 +00:00
|
|
|
$(function() {
|
|
|
|
var MainView = Backbone.View.extend({
|
|
|
|
el: $("div.container"),
|
|
|
|
|
|
|
|
modalTemplate: _.template($("#modal-template").html()),
|
|
|
|
|
|
|
|
events:{
|
2012-05-22 21:43:52 +00:00
|
|
|
"click ul.the-icons > li": "iconClicked"
|
2012-03-09 05:02:49 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
iconClicked: function(event) {
|
|
|
|
event.preventDefault();
|
|
|
|
|
|
|
|
var $item = $(event.currentTarget);
|
2012-05-21 13:06:58 +00:00
|
|
|
var $modal = $(this.modalTemplate({"style": $item.find("i").attr("class")}));
|
2012-03-09 05:02:49 +00:00
|
|
|
|
|
|
|
$modal.modal("show");
|
|
|
|
$modal.on('hidden', function () {
|
|
|
|
$modal.remove();
|
|
|
|
})
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
var mainView = new MainView();
|
|
|
|
});
|