45 lines
880 B
JavaScript
45 lines
880 B
JavaScript
(function(context,$) {
|
|
|
|
"use strict";
|
|
context.JK = context.JK || {};
|
|
context.JK.LoginRequiredDialog = function(app) {
|
|
var logger = context.JK.logger;
|
|
var $dialog = null;
|
|
var dialogId = 'login-required-dialog';
|
|
|
|
function beforeShow(data) {
|
|
}
|
|
|
|
function afterShow(data) {
|
|
}
|
|
|
|
function afterHide() {
|
|
}
|
|
|
|
function events() {
|
|
$dialog.find('.go-to-jamtracks').click(function() {
|
|
app.layout.closeDialog(dialogId)
|
|
context.location.href = $(this).attr('href')
|
|
})
|
|
}
|
|
|
|
function initialize() {
|
|
|
|
var dialogBindings = {
|
|
'beforeShow' : beforeShow,
|
|
'afterShow' : afterShow,
|
|
'afterHide': afterHide
|
|
};
|
|
|
|
app.bindDialog(dialogId, dialogBindings);
|
|
|
|
$dialog = $('#' + dialogId);
|
|
|
|
events();
|
|
}
|
|
|
|
this.initialize = initialize;
|
|
};
|
|
|
|
return this;
|
|
})(window,jQuery); |