Move remaining client functions in components to actions (#5171)

Этот коммит содержится в:
Carlos Tadeu Panato Junior
2017-01-27 11:39:13 +01:00
коммит произвёл George Goldberg
родитель 49c677f6b4
Коммит d72547433a
32 изменённых файлов: 708 добавлений и 141 удалений

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

@@ -4,7 +4,8 @@
import $ from 'jquery';
import ReactDOM from 'react-dom';
import * as Utils from 'utils/utils.jsx';
import Client from 'client/web_client.jsx';
import {uploadLicenseFile, removeLicenseFile} from 'actions/admin_actions.jsx';
import {injectIntl, intlShape, defineMessages, FormattedMessage, FormattedHTMLMessage} from 'react-intl';
@@ -54,7 +55,8 @@ class LicenseSettings extends React.Component {
$('#upload-button').button('loading');
Client.uploadLicenseFile(file,
uploadLicenseFile(
file,
() => {
Utils.clearFileInput(element[0]);
$('#upload-button').button('reset');
@@ -74,7 +76,7 @@ class LicenseSettings extends React.Component {
$('#remove-button').button('loading');
Client.removeLicenseFile(
removeLicenseFile(
() => {
$('#remove-button').button('reset');
this.setState({fileSelected: false, fileName: null, serverError: null});