JSFiddle - React, Tailwind, and code Playground
by Chase Wilson
JavaScript
define([
'App',
'backbone',
'marionette',
'jquery',
'jqueryui'],
function (App, Backbone, Marionette) {
return Backbone.Marionette.Region.extend({
onShow: function(view) {
var options = this.getDefaultOptions(_.result(view, "dialog"));
var self = this
this.$el.dialog(options, {
close: function(e, ui) {
self.closeDialog();
}
});
},
closeDialog: function() {
alert('Closing yo!!')
},
getDefaultOptions: function(options) {
if(options === null) {
options = {};
}
return _.defaults(options, {
title: "Default Dialog Title",
modal: true,
draggable: false,
resizable: false,
dialogClass: "testClass",
});
}
});
});