Merge pull request #1755 from hmhealey/plt1108

PLT-1108 Refactored ViewImage modal and made it automatically play animated gifs
Этот коммит содержится в:
Joram Wilander
2015-12-28 08:59:23 -05:00
родитель f9f6b0cea3 cfdc5ab999
Коммит 0b55c5f861
11 изменённых файлов: 416 добавлений и 231 удалений

Просмотреть файл

@@ -769,3 +769,31 @@ export function getSuggestedCommands(command, suggestionId, component) {
}
);
}
export function getFileInfo(filename) {
const callName = 'getFileInfo' + filename;
if (isCallInProgress(callName)) {
return;
}
callTracker[callName] = utils.getTimestamp();
client.getFileInfo(
filename,
(data) => {
callTracker[callName] = 0;
AppDispatcher.handleServerAction({
type: ActionTypes.RECIEVED_FILE_INFO,
filename,
info: data
});
},
(err) => {
callTracker[callName] = 0;
dispatchError(err, 'getFileInfo');
}
);
}

Просмотреть файл

@@ -1076,7 +1076,9 @@ export function getFileInfo(filename, success, error) {
dataType: 'json',
contentType: 'application/json',
type: 'GET',
success,
success: (data) => {
success(data);
},
error: function onError(xhr, status, err) {
var e = handleError('getFileInfo', xhr, status, err);
error(e);

Просмотреть файл

@@ -37,6 +37,7 @@ export default {
RECIEVED_STATUSES: null,
RECIEVED_PREFERENCE: null,
RECIEVED_PREFERENCES: null,
RECIEVED_FILE_INFO: null,
RECIEVED_MSG: null,