Skip to content

Commit

Permalink
Merge pull request #1163 from vector-im/markjh/cleanup
Browse files Browse the repository at this point in the history
Remove trailing whitespace
  • Loading branch information
NegativeMjark committed Mar 16, 2016
2 parents 29815b1 + 31915db commit fe9816a
Show file tree
Hide file tree
Showing 31 changed files with 103 additions and 103 deletions.
4 changes: 2 additions & 2 deletions src/components/structures/LeftPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var LeftPanel = React.createClass({

componentWillReceiveProps: function(newProps) {
this._recheckCallElement(newProps.selectedRoom);
},
},

componentWillUnmount: function() {
dis.unregister(this.dispatcherRef);
Expand Down Expand Up @@ -95,7 +95,7 @@ var LeftPanel = React.createClass({
}
else {
// Hide the collapse button until we work out how to display it in the new skin
// collapseButton = <img className="mx_LeftPanel_hideButton" onClick={ this.onHideClick } src="img/hide.png" width="12" height="20" alt="<"/>
// collapseButton = <img className="mx_LeftPanel_hideButton" onClick={ this.onHideClick } src="img/hide.png" width="12" height="20" alt="<"/>
}

var callPreview;
Expand Down
2 changes: 1 addition & 1 deletion src/components/structures/RightPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = React.createClass({
},

componentWillUnmount: function() {
dis.unregister(this.dispatcherRef);
dis.unregister(this.dispatcherRef);
if (MatrixClientPeg.get()) {
MatrixClientPeg.get().removeListener("RoomState.members", this.onRoomStateMember);
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/structures/RoomDirectory.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module.exports = React.createClass({
var self = this;
MatrixClientPeg.get().publicRooms(function (err, data) {
if (err) {
self.setState({ loading: false });
self.setState({ loading: false });
console.error("Failed to get publicRooms: %s", JSON.stringify(err));
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createDialog(ErrorDialog, {
Expand Down Expand Up @@ -124,7 +124,7 @@ module.exports = React.createClass({
<div className="mx_RoomDirectory_perm">Guests can join</div>
);
}

perms = null;
if (guestRead || guestJoin) {
perms = <div className="mx_RoomDirectory_perms">{guestRead} {guestJoin}</div>;
Expand Down Expand Up @@ -169,7 +169,7 @@ module.exports = React.createClass({

render: function() {
if (this.state.loading) {
var Loader = sdk.getComponent("elements.Spinner");
var Loader = sdk.getComponent("elements.Spinner");
return (
<div className="mx_RoomDirectory">
<Loader />
Expand Down
14 changes: 7 additions & 7 deletions src/components/structures/RoomSubList.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,15 @@ var RoomSubList = React.createClass({
var rooms = this.state.sortedList;
if (found.room) {
rooms.splice(found.index, 1);
}
}
else {
console.warn("Can't remove room " + room.roomId + " - can't find it");
}
this.setState({ sortedList: rooms });
},

findRoomTile: function(room) {
var index = this.state.sortedList.indexOf(room);
findRoomTile: function(room) {
var index = this.state.sortedList.indexOf(room);
if (index >= 0) {
// console.log("found: room: " + room.roomId + " with index " + index);
}
Expand All @@ -210,7 +210,7 @@ var RoomSubList = React.createClass({
},

calcManualOrderTagData: function(room) {
var index = this.state.sortedList.indexOf(room);
var index = this.state.sortedList.indexOf(room);

// we sort rooms by the lexicographic ordering of the 'order' metadata on their tags.
// for convenience, we calculate this for now a floating point number between 0.0 and 1.0.
Expand Down Expand Up @@ -274,7 +274,7 @@ var RoomSubList = React.createClass({
},

_getHeaderJsx: function() {
var TintableSvg = sdk.getComponent("elements.TintableSvg");
var TintableSvg = sdk.getComponent("elements.TintableSvg");
return (
<h2 onClick={ this.onClick } className="mx_RoomSubList_label">
{ this.props.collapsed ? '' : this.props.label }
Expand Down Expand Up @@ -332,7 +332,7 @@ var RoomSubList = React.createClass({
}
else {
subList = <TruncatedList className={ classes }>
</TruncatedList>;
</TruncatedList>;
}

return connectDropTarget(
Expand All @@ -356,7 +356,7 @@ var RoomSubList = React.createClass({

// Export the wrapped version, inlining the 'collect' functions
// to more closely resemble the ES7
module.exports =
module.exports =
DropTarget('RoomTile', roomListTarget, function(connect) {
return {
connectDropTarget: connect.dropTarget(),
Expand Down
2 changes: 1 addition & 1 deletion src/components/structures/ViewSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = React.createClass({
this.props.onFinished();
}
},

render: function() {
return (
<div className="mx_ViewSource">
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/globals/GuestWarningBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = React.createClass({
onRegisterClicked: function() {
dis.dispatch({'action': 'start_upgrade_registration'});
},

onLoginClicked: function() {
dis.dispatch({'action': 'logout'});
dis.dispatch({'action': 'start_login'});
Expand Down
10 changes: 5 additions & 5 deletions src/components/views/rooms/RoomDNDView.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var roomTileSource = {
// Return the data describing the dragged item
var item = {
room: props.room,
originalList: props.roomSubList,
originalList: props.roomSubList,
originalIndex: props.roomSubList.findRoomTile(props.room).index,
targetList: props.roomSubList, // at first target is same as original
// lastTargetRoom: null,
Expand Down Expand Up @@ -145,10 +145,10 @@ var roomTileTarget = {
// shuffle the list to add our tile to that position.
props.roomSubList.moveRoomTile(item.room, roomTile.index);
}

// stop us from flickering between our droptarget and the previous room.
// whenever the cursor changes direction we have to reset the flicker-damping.
/*
/*
var yDelta = off.y - item.lastYOffset;
if ((yDelta > 0 && item.lastYDelta < 0) ||
Expand All @@ -168,7 +168,7 @@ var roomTileTarget = {
if (yDelta) item.lastYDelta = yDelta;
item.lastYOffset = off.y;
*/
*/
}
else if (switchedTarget) {
if (!props.roomSubList.findRoomTile(item.room).room) {
Expand All @@ -183,7 +183,7 @@ var roomTileTarget = {

// Export the wrapped version, inlining the 'collect' functions
// to more closely resemble the ES7
module.exports =
module.exports =
DropTarget('RoomTile', roomTileTarget, function(connect, monitor) {
return {
// Call this function inside render()
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/rooms/RoomTooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = React.createClass({
});
}
else {
tooltip.style.top = tooltip.parentElement.getBoundingClientRect().top + "px";
tooltip.style.top = tooltip.parentElement.getBoundingClientRect().top + "px";
tooltip.style.display = "block";
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/rooms/SearchBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = React.createClass({
onSearch: function() {
this.props.onSearch(this.refs.search_term.value, this.state.scope);
},

render: function() {
var searchButtonClasses = classNames({ mx_SearchBar_searchButton : true, mx_SearchBar_searching: this.props.searchInProgress });
var thisRoomClasses = classNames({ mx_SearchBar_button : true, mx_SearchBar_unselected : this.state.scope !== 'Room' });
Expand Down
Loading

0 comments on commit fe9816a

Please sign in to comment.