Skip to content
Permalink
Browse files

Formatting updates.

  • Loading branch information...
roncli committed Jun 30, 2015
1 parent 57ec169 commit b1ec9190c3accd21845e9ce8b1dff1fb7d4d24e5
Showing with 54 additions and 42 deletions.
  1. +1 −1 public/index.htm
  2. +53 −41 public/templates/add-server-server.htm
@@ -8,7 +8,7 @@
<link rel="stylesheet" href="/css/bootstrap-override.css"/>
</head>
<body>
<div class="jumbotron text-center">
<div class="jumbotron text-center" style="padding: 0;">
<h1>Descent DSN</h1>
</div>
<div class="container-fluid">
@@ -1,45 +1,51 @@
<div class="input-group">
<span class="input-group-addon" style="white-space: nowrap; width: 1px;">IP address:</span>
<span class="input-group-addon" style="width: 100%; padding: 0;">
<select class="form-control" ng-model="data.settings.addServer.server.ip">
<option value="">Default</option>
<option ng-repeat="network in data.settings.interfaces" value="{{network.ip}}">{{network.ip}} - {{network.name}}</option>
</select>
</span>
</div>
<div ng-class="{true: 'input-group', false: 'input-group has-error'}[data.settings.addServer.server.portValid && data.settings.addServer.server.portsDiffer]">
<span class="input-group-addon">Server port:</span>
<input type="number" min="0" max="65535" class="form-control" placeholder="Port between 0 and 65535" ng-model="data.settings.addServer.server.port" ng-blur="updateAddServerServerPort()" />
</div>
<div ng-class="{true: 'input-group', false: 'input-group has-error'}[data.settings.addServer.server.gamespyportValid && data.settings.addServer.server.portsDiffer]">
<span class="input-group-addon">GameSpy port:</span>
<input type="number" min="0" max="65535" class="form-control" placeholder="GameSpy port between 0 and 65535" ng-model="data.settings.addServer.server.gamespyport" ng-blur="updateAddServerServerGamespyport()" />
</div>
<div ng-class="{true: 'input-group', false: 'input-group has-error'}[data.settings.addServer.server.framerateValid]">
<span class="input-group-addon">Server framerate:</span>
<input type="number" min="1" max="999" class="form-control" placeholder="Frames per second between 1 and 999" ng-model="data.settings.addServer.server.framerate" ng-blur="updateAddServerServerFramerate()" />
</div>
<div class="input-group">
<span class="input-group-addon" style="white-space: nowrap; width: 1px;">Ship logos and audio taunts:</span>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" ng-model="data.settings.addServer.server.noMultiBmp" ng-true-value="false" ng-false-value="true" />
</span>
</div>
<div class="input-group">
<span class="input-group-addon" style="white-space: nowrap; width: 1px;">Use player messages:</span>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" ng-model="data.settings.addServer.server.playerMessages" />
</span>
<div class="row">
<div class="col-xs-6">
<div class="input-group">
<span class="input-group-addon" style="white-space: nowrap; width: 1px;">IP address:</span>
<span class="input-group-addon" style="width: 100%; padding: 0;">
<select class="form-control" ng-model="data.settings.addServer.server.ip">
<option value="">Default</option>
<option ng-repeat="network in data.settings.interfaces" value="{{network.ip}}">{{network.ip}} - {{network.name}}</option>
</select>
</span>
</div>
<div ng-class="{true: 'input-group', false: 'input-group has-error'}[data.settings.addServer.server.portValid && data.settings.addServer.server.portsDiffer]">
<span class="input-group-addon">Server port:</span>
<input type="number" min="0" max="65535" class="form-control" placeholder="Port between 0 and 65535" ng-model="data.settings.addServer.server.port" ng-blur="updateAddServerServerPort()" />
</div>
<div ng-class="{true: 'input-group', false: 'input-group has-error'}[data.settings.addServer.server.gamespyportValid && data.settings.addServer.server.portsDiffer]">
<span class="input-group-addon">GameSpy port:</span>
<input type="number" min="0" max="65535" class="form-control" placeholder="GameSpy port between 0 and 65535" ng-model="data.settings.addServer.server.gamespyport" ng-blur="updateAddServerServerGamespyport()" />
</div>
</div>
<div class="col-xs-6">
<div ng-class="{true: 'input-group', false: 'input-group has-error'}[data.settings.addServer.server.framerateValid]">
<span class="input-group-addon">Server framerate:</span>
<input type="number" min="1" max="999" class="form-control" placeholder="Frames per second between 1 and 999" ng-model="data.settings.addServer.server.framerate" ng-blur="updateAddServerServerFramerate()" />
</div>
<div class="input-group">
<label for="addServerServerNoMultiBmp" class="input-group-addon" style="white-space: nowrap; width: 1px;">Ship logos and audio taunts:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerServerNoMultiBmp" ng-model="data.settings.addServer.server.noMultiBmp" ng-true-value="false" ng-false-value="true" />
</span>
</div>
<div class="input-group">
<label for="addServerServerPlayerMessages" class="input-group-addon" style="white-space: nowrap; width: 1px;">Use player messages:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerServerPlayerMessages" ng-model="data.settings.addServer.server.playerMessages" />
</span>
</div>
</div>
</div><br />
<table class="table table-hover table-condensed">
<tr>
<th colspan="4" class="text-center">Broadcast to these GameSpy Trackers:</th>
<th colspan="4" class="text-center">Broadcast to these GameSpy trackers:</th>
</tr>
<tr>
<th>Region</th>
<th>Server</th>
<th>Port</th>
<th></th>
<th style="width: 40%;">Region</th>
<th style="width: 35%;">Server</th>
<th style="width: 16%;">Port</th>
<th style="width: 9%;"></th>
</tr>
<tr ng-repeat="tracker in data.settings.addServer.server.trackers">
<td>{{getRegionName(tracker.region)}}</td>
@@ -48,11 +54,14 @@
<td><button class="btn btn-xs btn-danger" ng-click="addServerServerRemoveTracker($index)">Remove</button></td>
</tr>
<tr>
<th colspan="4" class="text-center">Add Other GameSpy Trackers:</th>
<th colspan="4">
<div class="text-center">Add other GameSpy trackers <button class="btn btn-sm btn-info" ng-click="data.addTrackerToggle = !data.addTrackerToggle;"><span ng-class="{true: 'glyphicon glyphicon-minus-sign', false: 'glyphicon glyphicon-plus-sign'}[!!data.addTrackerToggle]"></span></button></div>
</th>
</tr>
<tr>
<tr ng-if="data.addTrackerToggle">
<td ng-class="{true: '', false: 'has-error'}[data.settings.addServer.server.addTrackerRegionValid]">
<select class="form-control" ng-model="data.settings.addServer.server.addTrackerRegion" convert-to-number ng-change="updateAddServerServerTrackerRegion()">
<option class="hidden text-muted" value="" disabled>Select a region</option>
<option value="0">None</option>
<option value="1">Southeast US</option>
<option value="2">Western US</option>
@@ -74,10 +83,13 @@
<td ng-class="{true: '', false: 'has-error'}[data.settings.addServer.server.addTrackerPortValid]">
<input type="number" min="0" max="65535" class="form-control" placeholder="Port" size="6" maxlength="5" ng-model="data.settings.addServer.server.addTrackerPort" ng-blur="updateAddServerServerTrackerPort()" />
</td>
<td><button class="btn btn-xs btn-success" ng-click="addServerServerAddTracker()" ng-disabled="!data.settings.addServer.server.addTrackerServerValid || !data.settings.addServer.server.addTrackerPortValid">Add</button></td>
<td><button class="btn btn-success" ng-click="addServerServerAddTracker()" ng-disabled="!data.settings.addServer.server.addTrackerServerValid || !data.settings.addServer.server.addTrackerPortValid">Add</button></td>
</tr>
</table><br/>
</table>
<div class="alert alert-danger" role="alert" ng-if="!data.settings.addServer.server.portValid"><span class="glyphicon glyphicon-alert"></span> You must enter a valid port between 0 and 65535.</div>
<div class="alert alert-danger" role="alert" ng-if="!data.settings.addServer.server.gamespyportValid"><span class="glyphicon glyphicon-alert"></span> You must enter a valid GameSpy port between 0 and 65535.</div>
<div class="alert alert-danger" role="alert" ng-if="!data.settings.addServer.server.portsDiffer"><span class="glyphicon glyphicon-alert"></span> Port and GameSpy port must be different.</div>
<div class="alert alert-danger" role="alert" ng-if="!data.settings.addServer.server.framerateValid"><span class="glyphicon glyphicon-alert"></span> You must enter a framerate between 1 and 999.</div>
<div class="alert alert-warning" style="padding: 5px;" role="alert" ng-if="data.addTrackerToggle && !data.settings.addServer.server.addTrackerRegionValid"><span class="glyphicon glyphicon-alert"></span> You must select a region in order to add a tracker.</div>
<div class="alert alert-warning" style="padding: 5px;" role="alert" ng-if="data.addTrackerToggle && !data.settings.addServer.server.addTrackerServerValid"><span class="glyphicon glyphicon-alert"></span> You must enter a valid server in order to add a tracker.</div>
<div class="alert alert-warning" style="padding: 5px;" role="alert" ng-if="data.addTrackerToggle && !data.settings.addServer.server.addTrackerPortValid"><span class="glyphicon glyphicon-alert"></span> You must enter a valid port between 0 and 65535 in order to add a tracker.</div>

0 comments on commit b1ec919

Please sign in to comment.
You can’t perform that action at this time.