Skip to content

Commit

Permalink
Refresh timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgressoRU committed Jun 18, 2015
1 parent eacf9d5 commit be4a4ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion controller_v_second.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ applicationKPP.controller('controllerVSecond', function ($http, $timeout, $inter
vm.accountsSearch = [10098050, 133090071, 68758347];
vm.is_start = false;
vm.lastRoomId = 45620;
vm.refreshTimeout = 10000;
vm.foundedRooms = [];

vm.start = function () {
Expand Down Expand Up @@ -84,7 +85,7 @@ applicationKPP.controller('controllerVSecond', function ($http, $timeout, $inter
if (vm.autoRefresh && vm.is_start) {
vm.startRefreshing(roomId);
}
}, 10000);
}, vm.refreshTimeout);
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions search.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ <h3>Search new Room</h3>
<button data-ng-click="vm.startSearch()">Start scan</button>
<button data-ng-click="vm.stop()">Stop scan</button>
<br>
Last room ID: <input type="number" data-ng-model="vm.lastRoomId"> Autorefresh: <input
type="checkbox" data-ng-model="vm.autoRefresh">
<br>
Autoupdate while players < <input type="number" data-ng-model="vm.maxPlayers">
Last room ID: <input type="number" data-ng-model="vm.lastRoomId"><br>
Autoupdate while players < <input type="number" data-ng-model="vm.maxPlayers"><br>
Autorefresh: <input type="checkbox" data-ng-model="vm.autoRefresh"> Refresh timeout (ms): <input type="number"
data-ng-model="vm.refreshTimeout">

<br>
<hr>
Expand All @@ -70,7 +70,7 @@ <h3>Search new Room</h3>
<td>{{room.id}}</td>
<td>
<img data-ng-if="room.status == 0" src="ajax-loader.gif">
<span data-ng-if="room.status != 0"><strong> {{room.players}}</strong></span>
<span data-ng-if="room.status != 0"><strong> {{room.players}}</strong></span>
</td>
</tr>
</table>
Expand Down

0 comments on commit be4a4ca

Please sign in to comment.