Merge pull request #370 from hmhealey/mm1812
MM-1812 Provide warnings on team invite screens when email is disabled
Этот коммит содержится в:
@@ -4,6 +4,7 @@
|
||||
var client = require('./client.jsx');
|
||||
var AppDispatcher = require('../dispatcher/app_dispatcher.jsx');
|
||||
var ChannelStore = require('../stores/channel_store.jsx');
|
||||
var ConfigStore = require('../stores/config_store.jsx');
|
||||
var PostStore = require('../stores/post_store.jsx');
|
||||
var UserStore = require('../stores/user_store.jsx');
|
||||
var utils = require('./utils.jsx');
|
||||
@@ -457,3 +458,28 @@ module.exports.getMyTeam = function() {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function getConfig() {
|
||||
if (isCallInProgress('getConfig')) {
|
||||
return;
|
||||
}
|
||||
|
||||
callTracker['getConfig'] = utils.getTimestamp();
|
||||
client.getConfig(
|
||||
function(data, textStatus, xhr) {
|
||||
callTracker['getConfig'] = 0;
|
||||
|
||||
if (data && xhr.status !== 304) {
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.RECIEVED_CONFIG,
|
||||
settings: data
|
||||
});
|
||||
}
|
||||
},
|
||||
function(err) {
|
||||
callTracker['getConfig'] = 0;
|
||||
dispatchError(err, 'getConfig');
|
||||
}
|
||||
);
|
||||
}
|
||||
module.exports.getConfig = getConfig;
|
||||
|
||||
@@ -880,3 +880,18 @@ module.exports.updateValetFeature = function(data, success, error) {
|
||||
|
||||
module.exports.track('api', 'api_teams_update_valet_feature');
|
||||
};
|
||||
|
||||
function getConfig(success, error) {
|
||||
$.ajax({
|
||||
url: '/api/v1/config/get_all',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
ifModified: true,
|
||||
success: success,
|
||||
error: function(xhr, status, err) {
|
||||
var e = handleError('getConfig', xhr, status, err);
|
||||
error(e);
|
||||
}
|
||||
});
|
||||
};
|
||||
module.exports.getConfig = getConfig;
|
||||
|
||||
@@ -31,6 +31,8 @@ module.exports = {
|
||||
|
||||
CLICK_TEAM: null,
|
||||
RECIEVED_TEAM: null,
|
||||
|
||||
RECIEVED_CONFIG: null
|
||||
}),
|
||||
|
||||
PayloadSources: keyMirror({
|
||||
|
||||
Ссылка в новой задаче
Block a user