Created
November 7, 2012 16:26
-
-
Save awartoft/4032622 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
show: function() | |
{ | |
var domains = this.grid.getSelectedDomains(); | |
var first = undefined, size = 0; | |
for (var i in domains) { | |
if (domains.hasOwnProperty(i) && typeof(i) !== 'function') { | |
if (first == undefined) { | |
first = domains[i]; | |
} | |
// increment | |
size += 1; | |
} | |
} | |
if (size != 1) { | |
this.titleNode.innerHTML = 'Raw whois information'; | |
this.containerNode.innerHTML = 'You must only specify a single domain to view the raw whois information.'; | |
this.inherited(arguments); | |
} else { | |
// show the loading modal | |
this.loadingModal.show(); | |
xhr.get({ | |
url: '/api/domain/whois/' + first, | |
handleAs: 'json', | |
load: lang.hitch(this, function(data) { | |
if (data.whois == null) { | |
data.whois = 'An error occurred'; | |
} | |
this.containerNode.innerHTML = '<pre>' + data.whois + '</pre>'; | |
this.inherited(arguments); | |
console.log(this.loadingModal.hide()); | |
}) | |
}); | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment