Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
39 lines
890 B
JavaScript
Executable file
39 lines
890 B
JavaScript
Executable file
/*
|
|
* PairExpiredDialog is responsible for:
|
|
* Notify a user that the earlier pairing request which fired in
|
|
* notification center is expired. There is a prompt handling via here.
|
|
*/
|
|
define(function(require) {
|
|
'use strict';
|
|
|
|
var PairExpiredDialog = {
|
|
init: function() {
|
|
this.dialog = document.getElementById('pairing-request-timeout');
|
|
this.confirmBtn =
|
|
document.getElementById('incoming-pairing-timeout-confirm');
|
|
},
|
|
|
|
showConfirm: function(callback) {
|
|
var self = this;
|
|
this.confirmBtn.onclick = function() {
|
|
self.close();
|
|
if (callback) {
|
|
callback();
|
|
}
|
|
};
|
|
this.dialog.hidden = false;
|
|
},
|
|
|
|
get isVisible() {
|
|
return (!this.dialog.hidden);
|
|
},
|
|
|
|
close: function() {
|
|
this.dialog.hidden = true;
|
|
}
|
|
};
|
|
|
|
PairExpiredDialog.init();
|
|
return PairExpiredDialog;
|
|
});
|
|
|