nbot

A clone of the eBot by @deStrO fully based on node.js with build in Web Page - WIP
git clone git://archive.git.mtrnord.blog/MTRNord/nbot.git
Log | Files | Refs | README | LICENSE

commit b5fb95ebfe5b57421182890d1fdb6c395b725ffc
parent 3e9218b6a456e4131c6ddc936703a911bb0d623f
Author: MTRNord <mtrnord1@gmail.com>
Date:   Tue, 29 Mar 2016 23:58:48 +0200

Update Design

Diffstat:
Mweb/theme/js/pluginManagerConnect.js | 15+++++++++++++++
Mweb/theme/pluginManager.html | 3+--
2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/web/theme/js/pluginManagerConnect.js b/web/theme/js/pluginManagerConnect.js @@ -14,6 +14,21 @@ $(document).off('click', '#refreshSourcemodReleases').on('click', '#refreshSourc socket.on('status_alert', function (message) { console.warn(message) }); + socket.on('SourcemodList', function (message) { console.warn(message) + drawTable(message.response); }); +function drawTable(data) { + for (var i = 0; i < data.length; i++) { + drawRow(data[i]); + } +} + +function drawRow(rowData) { + var row = $("<tr />") + $("#personDataTable").append(row); //this will append tr element to table... keep its reference for a while since we will add cels into it + row.append($("<td>" + rowData.id + "</td>")); + row.append($("<td>" + rowData.firstName + "</td>")); + row.append($("<td>" + rowData.lastName + "</td>")); +} diff --git a/web/theme/pluginManager.html b/web/theme/pluginManager.html @@ -108,7 +108,7 @@ <div class="panel panel-default"> <div class="panel-heading">Versions</div> <div class="panel-body"> - <button type="button" class="btn btn-danger btn-lg" id="refreshSourcemodReleases"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>Refresh</button> + <button type="button" class="btn btn-info pull-right" id="refreshSourcemodReleases"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span> Refresh</button> <table class="table table-hover" id="SourcemodVersions"> <tr> <th>Id</th> @@ -121,7 +121,6 @@ </div> </div> </div> - <button type="button" class="btn btn-info btn-lg" id="add_server">Add Server</button> </div> </div> </div>