mirror of
https://github.com/zoriya/flood.git
synced 2025-12-20 06:05:15 +00:00
Change const variable name
This commit is contained in:
@@ -8,7 +8,7 @@ import TorrentFilterStore from '../../stores/TorrentFilterStore';
|
|||||||
import TorrentStore from '../../stores/TorrentStore';
|
import TorrentStore from '../../stores/TorrentStore';
|
||||||
import UIActions from '../../actions/UIActions';
|
import UIActions from '../../actions/UIActions';
|
||||||
|
|
||||||
const methodsToBind = [
|
const METHODS_TO_BIND = [
|
||||||
'handleAddTorrents',
|
'handleAddTorrents',
|
||||||
'handleSortChange',
|
'handleSortChange',
|
||||||
'handleStart',
|
'handleStart',
|
||||||
@@ -24,7 +24,7 @@ export default class ActionBar extends React.Component {
|
|||||||
sortBy: TorrentFilterStore.getTorrentsSort()
|
sortBy: TorrentFilterStore.getTorrentsSort()
|
||||||
};
|
};
|
||||||
|
|
||||||
methodsToBind.forEach((method) => {
|
METHODS_TO_BIND.forEach((method) => {
|
||||||
this[method] = this[method].bind(this);
|
this[method] = this[method].bind(this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import React from 'react';
|
|||||||
import Dropdown from '../generic/Dropdown';
|
import Dropdown from '../generic/Dropdown';
|
||||||
import UIActions from '../../actions/UIActions';
|
import UIActions from '../../actions/UIActions';
|
||||||
|
|
||||||
const methodsToBind = [
|
const METHODS_TO_BIND = [
|
||||||
'getDropdownHeader',
|
'getDropdownHeader',
|
||||||
'handleItemSelect'
|
'handleItemSelect'
|
||||||
];
|
];
|
||||||
@@ -14,7 +14,7 @@ export default class SortDropdown extends React.Component {
|
|||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
methodsToBind.forEach((method) => {
|
METHODS_TO_BIND.forEach((method) => {
|
||||||
this[method] = this[method].bind(this);
|
this[method] = this[method].bind(this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import React from 'react';
|
|||||||
|
|
||||||
import Icon from '../icons/Icon.js';
|
import Icon from '../icons/Icon.js';
|
||||||
|
|
||||||
const methodsToBind = [
|
const METHODS_TO_BIND = [
|
||||||
'getTextboxes',
|
'getTextboxes',
|
||||||
'handleTextboxChange'
|
'handleTextboxChange'
|
||||||
];
|
];
|
||||||
@@ -13,7 +13,7 @@ export default class TextboxRepeater extends React.Component {
|
|||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
methodsToBind.forEach((method) => {
|
METHODS_TO_BIND.forEach((method) => {
|
||||||
this[method] = this[method].bind(this);
|
this[method] = this[method].bind(this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import classnames from 'classnames';
|
|||||||
import CSSTransitionGroup from 'react-addons-css-transition-group';
|
import CSSTransitionGroup from 'react-addons-css-transition-group';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
const methodsToBind = [
|
const METHODS_TO_BIND = [
|
||||||
'getDropdownButton',
|
'getDropdownButton',
|
||||||
'getDropdownMenu',
|
'getDropdownMenu',
|
||||||
'getDropdownMenuItems',
|
'getDropdownMenuItems',
|
||||||
@@ -21,7 +21,7 @@ export default class Dropdown extends React.Component {
|
|||||||
isExpanded: false
|
isExpanded: false
|
||||||
};
|
};
|
||||||
|
|
||||||
methodsToBind.forEach((method) => {
|
METHODS_TO_BIND.forEach((method) => {
|
||||||
this[method] = this[method].bind(this);
|
this[method] = this[method].bind(this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -82,10 +82,9 @@ export default class Dropdown extends React.Component {
|
|||||||
|
|
||||||
getDropdownMenuItems(listItems) {
|
getDropdownMenuItems(listItems) {
|
||||||
return listItems.map(function(property, index) {
|
return listItems.map(function(property, index) {
|
||||||
let classes = classnames({
|
let classes = classnames('dropdown__item', property.className, {
|
||||||
'dropdown__item': true,
|
'is-selectable': property.selectable !== false,
|
||||||
'is-selected': this.props.selectedItem.property === property.property &&
|
'is-selected': property.selected
|
||||||
this.props.selectedItem.value === property.value
|
|
||||||
})
|
})
|
||||||
return (
|
return (
|
||||||
<li className={classes} key={index} onClick={this.handleItemSelect.bind(this, property)}>
|
<li className={classes} key={index} onClick={this.handleItemSelect.bind(this, property)}>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import React from 'react';
|
|||||||
import TextboxRepeater from '../forms/TextboxRepeater';
|
import TextboxRepeater from '../forms/TextboxRepeater';
|
||||||
import TorrentActions from '../../actions/TorrentActions';
|
import TorrentActions from '../../actions/TorrentActions';
|
||||||
|
|
||||||
const methodsToBind = [
|
const METHODS_TO_BIND = [
|
||||||
'getContent',
|
'getContent',
|
||||||
'handleDestinationChange',
|
'handleDestinationChange',
|
||||||
'handleUrlAdd',
|
'handleUrlAdd',
|
||||||
@@ -24,7 +24,7 @@ export default class AddTorrents extends React.Component {
|
|||||||
urlTextboxes: [{value: null}]
|
urlTextboxes: [{value: null}]
|
||||||
};
|
};
|
||||||
|
|
||||||
methodsToBind.forEach((method) => {
|
METHODS_TO_BIND.forEach((method) => {
|
||||||
this[method] = this[method].bind(this);
|
this[method] = this[method].bind(this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import Icon from '../icons/Icon';
|
|||||||
import UIActions from '../../actions/UIActions';
|
import UIActions from '../../actions/UIActions';
|
||||||
import UIStore from '../../stores/UIStore';
|
import UIStore from '../../stores/UIStore';
|
||||||
|
|
||||||
const methodsToBind = [
|
const METHODS_TO_BIND = [
|
||||||
'handleOverlayClick',
|
'handleOverlayClick',
|
||||||
'onModalChange'
|
'onModalChange'
|
||||||
];
|
];
|
||||||
@@ -20,7 +20,7 @@ export default class Modal extends React.Component {
|
|||||||
activeModal: null
|
activeModal: null
|
||||||
};
|
};
|
||||||
|
|
||||||
methodsToBind.forEach((method) => {
|
METHODS_TO_BIND.forEach((method) => {
|
||||||
this[method] = this[method].bind(this);
|
this[method] = this[method].bind(this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import format from '../../util/formatData';
|
|||||||
import Icon from '../icons/Icon';
|
import Icon from '../icons/Icon';
|
||||||
import LineChart from './LineChart';
|
import LineChart from './LineChart';
|
||||||
|
|
||||||
const methodsToBind = [
|
const METHODS_TO_BIND = [
|
||||||
'onTransferDataRequestError',
|
'onTransferDataRequestError',
|
||||||
'onTransferDataRequestSuccess'
|
'onTransferDataRequestSuccess'
|
||||||
];
|
];
|
||||||
@@ -22,7 +22,7 @@ class ClientStats extends React.Component {
|
|||||||
transferDataRequestSuccess: false
|
transferDataRequestSuccess: false
|
||||||
};
|
};
|
||||||
|
|
||||||
methodsToBind.forEach((method) => {
|
METHODS_TO_BIND.forEach((method) => {
|
||||||
this[method] = this[method].bind(this);
|
this[method] = this[method].bind(this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import React from'react';
|
|||||||
import Icon from '../icons/Icon';
|
import Icon from '../icons/Icon';
|
||||||
import UIActions from '../../actions/UIActions';
|
import UIActions from '../../actions/UIActions';
|
||||||
|
|
||||||
const methodsToBind = [
|
const METHODS_TO_BIND = [
|
||||||
'handleKeyUp'
|
'handleKeyUp'
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ export default class SearchBox extends React.Component {
|
|||||||
searchValue: ''
|
searchValue: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
methodsToBind.forEach((method) => {
|
METHODS_TO_BIND.forEach((method) => {
|
||||||
this[method] = this[method].bind(this);
|
this[method] = this[method].bind(this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import React from 'react';
|
|||||||
|
|
||||||
import Icon from '../icons/Icon.js';
|
import Icon from '../icons/Icon.js';
|
||||||
|
|
||||||
const methodsToBind = [
|
const METHODS_TO_BIND = [
|
||||||
'handleClick'
|
'handleClick'
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ export default class StatusFilter extends React.Component {
|
|||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
methodsToBind.forEach((method) => {
|
METHODS_TO_BIND.forEach((method) => {
|
||||||
this[method] = this[method].bind(this);
|
this[method] = this[method].bind(this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import StatusFilter from './StatusFilter';
|
|||||||
import TorrentFilterStore from '../../stores/TorrentFilterStore';
|
import TorrentFilterStore from '../../stores/TorrentFilterStore';
|
||||||
import UIActions from '../../actions/UIActions';
|
import UIActions from '../../actions/UIActions';
|
||||||
|
|
||||||
const methodsToBind = [
|
const METHODS_TO_BIND = [
|
||||||
'getFilters',
|
'getFilters',
|
||||||
'handleClick',
|
'handleClick',
|
||||||
'onStatusFilterChange'
|
'onStatusFilterChange'
|
||||||
@@ -21,7 +21,7 @@ export default class StatusFilters extends React.Component {
|
|||||||
statusFilter: TorrentFilterStore.getStatusFilter()
|
statusFilter: TorrentFilterStore.getStatusFilter()
|
||||||
};
|
};
|
||||||
|
|
||||||
methodsToBind.forEach((method) => {
|
METHODS_TO_BIND.forEach((method) => {
|
||||||
this[method] = this[method].bind(this);
|
this[method] = this[method].bind(this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import format from '../../util/formatData';
|
|||||||
import Icon from '../icons/Icon';
|
import Icon from '../icons/Icon';
|
||||||
import ProgressBar from './ProgressBar';
|
import ProgressBar from './ProgressBar';
|
||||||
|
|
||||||
const methodsToBind = [
|
const METHODS_TO_BIND = [
|
||||||
'handleClick',
|
'handleClick',
|
||||||
'handleRightClick'
|
'handleRightClick'
|
||||||
];
|
];
|
||||||
@@ -15,7 +15,7 @@ export default class Torrent extends React.Component {
|
|||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
methodsToBind.forEach((method) => {
|
METHODS_TO_BIND.forEach((method) => {
|
||||||
this[method] = this[method].bind(this);
|
this[method] = this[method].bind(this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import TorrentActions from '../../actions/TorrentActions';
|
|||||||
import TorrentStore from '../../stores/TorrentStore';
|
import TorrentStore from '../../stores/TorrentStore';
|
||||||
import UIStore from '../../stores/UIStore';
|
import UIStore from '../../stores/UIStore';
|
||||||
|
|
||||||
const methodsToBind = [
|
const METHODS_TO_BIND = [
|
||||||
'getFileData',
|
'getFileData',
|
||||||
'getFileTreeDomNodes',
|
'getFileTreeDomNodes',
|
||||||
'onTorrentDetailsHashChange',
|
'onTorrentDetailsHashChange',
|
||||||
@@ -34,7 +34,7 @@ export default class TorrentDetails extends React.Component {
|
|||||||
torrentDetails: {}
|
torrentDetails: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
methodsToBind.forEach((method) => {
|
METHODS_TO_BIND.forEach((method) => {
|
||||||
this[method] = this[method].bind(this);
|
this[method] = this[method].bind(this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import TorrentFilterStore from '../../stores/TorrentFilterStore';
|
|||||||
import TorrentStore from '../../stores/TorrentStore';
|
import TorrentStore from '../../stores/TorrentStore';
|
||||||
import UIActions from '../../actions/UIActions';
|
import UIActions from '../../actions/UIActions';
|
||||||
|
|
||||||
const methodsToBind = [
|
const METHODS_TO_BIND = [
|
||||||
'onReceiveTorrentsError',
|
'onReceiveTorrentsError',
|
||||||
'onReceiveTorrentsSuccess',
|
'onReceiveTorrentsSuccess',
|
||||||
'handleDetailsClick',
|
'handleDetailsClick',
|
||||||
@@ -41,7 +41,7 @@ export default class TorrentListContainer extends React.Component {
|
|||||||
viewportHeight: 0
|
viewportHeight: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
methodsToBind.forEach((method) => {
|
METHODS_TO_BIND.forEach((method) => {
|
||||||
this[method] = this[method].bind(this);
|
this[method] = this[method].bind(this);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import React from 'react';
|
|||||||
import TorrentDetails from './TorrentDetails';
|
import TorrentDetails from './TorrentDetails';
|
||||||
import TorrentList from './TorrentList';
|
import TorrentList from './TorrentList';
|
||||||
|
|
||||||
const methodsToBind = [
|
const METHODS_TO_BIND = [
|
||||||
'toggleDetailsPanel'
|
'toggleDetailsPanel'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user