2013-06-10 21:22:32 +00:00
|
|
|
define([
|
2014-08-10 23:42:40 +00:00
|
|
|
"jquery",
|
|
|
|
"underscore",
|
|
|
|
"constants",
|
|
|
|
"utils",
|
|
|
|
"classes/Extension",
|
|
|
|
"monetizejs",
|
|
|
|
"text!html/dialogAbout.html"
|
|
|
|
], function($, _, constants, utils, Extension, MonetizeJS, dialogAboutHTML) {
|
2013-06-10 21:22:32 +00:00
|
|
|
|
2014-08-10 23:42:40 +00:00
|
|
|
var dialogAbout = new Extension("dialogAbout", 'Dialog "About"');
|
2013-06-10 21:22:32 +00:00
|
|
|
|
2014-08-13 23:44:33 +00:00
|
|
|
var eventMgr;
|
|
|
|
dialogAbout.onEventMgrCreated = function(eventMgrParameter) {
|
|
|
|
eventMgr = eventMgrParameter;
|
|
|
|
};
|
|
|
|
|
2014-08-10 23:42:40 +00:00
|
|
|
var monetize = new MonetizeJS({
|
2014-08-19 08:17:59 +00:00
|
|
|
applicationID: 'ESTHdCYOi18iLhhO'
|
2014-08-10 23:42:40 +00:00
|
|
|
});
|
2013-06-10 21:22:32 +00:00
|
|
|
|
2014-08-10 23:42:40 +00:00
|
|
|
dialogAbout.onReady = function() {
|
|
|
|
utils.addModal('modal-about', _.template(dialogAboutHTML, {
|
|
|
|
version: constants.VERSION
|
|
|
|
}));
|
|
|
|
$('.modal-about .sponsorship-button').click(function() {
|
|
|
|
monetize.getPayments({
|
|
|
|
summary: true
|
|
|
|
}, function() {
|
2014-08-13 23:44:33 +00:00
|
|
|
eventMgr.onMessage('Please refresh the page for your sponsorship to take effect.');
|
2014-08-10 23:42:40 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
2013-08-04 17:42:22 +00:00
|
|
|
|
2014-08-10 23:42:40 +00:00
|
|
|
return dialogAbout;
|
2013-06-10 21:22:32 +00:00
|
|
|
|
2014-04-21 01:12:57 +00:00
|
|
|
});
|