Switch to bootstrap
This commit is contained in:
@@ -1,16 +1,11 @@
|
||||
|
||||
|
||||
var app = angular.module( 'RconApp', ['ngMaterial', 'ngRoute', 'nvd3'] );
|
||||
var app = angular.module( 'RconApp', ['ngRoute', 'nvd3'] );
|
||||
|
||||
app.service( 'rconService', [RconService] );
|
||||
|
||||
app.config( function ( $mdThemingProvider, $routeProvider )
|
||||
app.config( function ( $routeProvider )
|
||||
{
|
||||
$mdThemingProvider.theme( 'default' ).primaryPalette( 'blue',
|
||||
{
|
||||
'default': '700'
|
||||
}).accentPalette( 'blue' );
|
||||
|
||||
$routeProvider.when( "/home", { Title: "Home" } )
|
||||
$routeProvider.when( "/:address/console", { Title: "Console", templateUrl: "html/console.html", Nav: true } )
|
||||
$routeProvider.when( "/:address/playerlist", { Title: "Player List", templateUrl: "html/playerlist.html", Nav: true } )
|
||||
@@ -22,7 +17,7 @@ app.config( function ( $mdThemingProvider, $routeProvider )
|
||||
|
||||
app.controller( 'RconController', RconController );
|
||||
|
||||
function RconController( $scope, $rootScope, rconService, $mdSidenav, $timeout, $mdDialog, $route )
|
||||
function RconController( $scope, $rootScope, rconService, $timeout, $route )
|
||||
{
|
||||
$scope.$route = $route;
|
||||
|
||||
@@ -97,6 +92,8 @@ function SecondsToDuration()
|
||||
if ( input > 60 ) out += minutes + "m ";
|
||||
|
||||
var seconds = input % 60;
|
||||
|
||||
if ( input < 3600 )
|
||||
out += seconds + "s";
|
||||
|
||||
return out;
|
||||
|
||||
@@ -7,8 +7,6 @@ function ConnectionController( $scope, rconService, $routeParams, $timeout, $loc
|
||||
$scope.Password = "";
|
||||
$scope.SaveConnection = true;
|
||||
|
||||
console.log( $location.search );
|
||||
|
||||
if ( localStorage.previousConnections != null )
|
||||
$scope.PreviousConnects = angular.fromJson( localStorage.previousConnections );
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ app.controller( 'PlayerListController', PlayerListController );
|
||||
function PlayerListController( $scope, rconService, $interval )
|
||||
{
|
||||
$scope.Output = new Array();
|
||||
$scope.OrderBy = '-ConnectedSeconds';
|
||||
|
||||
$scope.Refresh = function ()
|
||||
{
|
||||
@@ -13,6 +14,24 @@ function PlayerListController( $scope, rconService, $interval )
|
||||
});
|
||||
}
|
||||
|
||||
$scope.Order = function( o )
|
||||
{
|
||||
if ( $scope.OrderBy == o )
|
||||
{
|
||||
o = '-' + o;
|
||||
}
|
||||
|
||||
$scope.OrderBy = o;
|
||||
}
|
||||
|
||||
$scope.SortClass = function( o )
|
||||
{
|
||||
if ( $scope.OrderBy == o ) return "active";
|
||||
if ( $scope.OrderBy == "-" + o ) return "active descending";
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
rconService.InstallService( $scope, $scope.Refresh )
|
||||
|
||||
var timer = $interval( function ()
|
||||
|
||||
Reference in New Issue
Block a user