|
|
@ -1149,8 +1149,18 @@ define([
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
nThen(function (waitFor) {
|
|
|
|
nThen(function (waitFor) {
|
|
|
|
// XXX XXX Check number of teams first!
|
|
|
|
// Get preview content.
|
|
|
|
APP.module.execCommand("GET_PREVIEW_CONTENT", {
|
|
|
|
// Use the team module if we're logged in, or sframeChan if we're not
|
|
|
|
|
|
|
|
var f = function (data, cb) {
|
|
|
|
|
|
|
|
if (driveAPP.loggedIn) {
|
|
|
|
|
|
|
|
return void APP.module.execCommand('GET_PREVIEW_CONTENT', data, cb);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var sframeChan = common.getSframeChannel();
|
|
|
|
|
|
|
|
sframeChan.query('Q_ANON_GET_PREVIEW_CONTENT', data, function (err, json) {
|
|
|
|
|
|
|
|
cb(json);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
f({
|
|
|
|
seeds: seeds,
|
|
|
|
seeds: seeds,
|
|
|
|
}, waitFor(function (json) {
|
|
|
|
}, waitFor(function (json) {
|
|
|
|
if (json && json.error) { // XXX this is failing with "team is disabled"
|
|
|
|
if (json && json.error) { // XXX this is failing with "team is disabled"
|
|
|
|