Refactored ViewImage modal and made it automatically play animated gifs

Этот коммит содержится в:
hmhealey
2015-12-18 12:14:15 -05:00
родитель d4a139c09a
Коммит 46a59252b6
6 изменённых файлов: 254 добавлений и 200 удалений

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

@@ -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,