Changeset 171
- Timestamp:
- Sep 5, 2014, 10:54:12 PM (10 years ago)
- Location:
- binary-improvements/webserver
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/webserver/css/style.css
r163 r171 43 43 1px 1px 0 #000; 44 44 } 45 .inventoryButton { 46 color: #00ff00; 47 cursor: pointer; 48 } 49 #playerInventoryDialog { 50 display:none; 51 } 52 .ui-dialog { 53 z-index:1011 !important; 54 } 55 .ui-widget-overlay { 56 z-index:1010 !important; 57 } 45 58 -
binary-improvements/webserver/index.html
r163 r171 16 16 MouseCoords: <span id="pos"></span> 17 17 </div> 18 <div id=" dialog-message" title="Player inventory" style="display:none">18 <div id="playerInventoryDialog" title="Player inventory"> 19 19 Player: <span id="invPlayerName"></span> 20 20 <table class="invTable" id="bagTable"> -
binary-improvements/webserver/js/index.js
r163 r171 180 180 } 181 181 182 $( "# dialog-message").dialog({182 $( "#playerInventoryDialog" ).css("z-index", "1010").dialog({ 183 183 modal: true, 184 width: BAG_COLS* INV_ITEM_WIDTH + 60,184 width: BAG_COLS*(INV_ITEM_WIDTH+14) + 20, 185 185 buttons: { 186 186 Ok: function() { … … 190 190 }); 191 191 }) 192 .fail(function( ) {192 .fail(function(jqxhr, textStatus, error) { 193 193 console.log("Error fetching player inventory"); 194 194 }) … … 214 214 "</td>"); 215 215 } 216 217 $(".leaflet-popup-pane").on('click.action', '.inventoryButton', function(event) { 218 showInv($(this).data('steamid')); 219 }); 216 220 217 221 var setPlayerMarkers = function(data) { … … 226 230 marker = L.marker([val.position.z, val.position.x]).bindPopup( 227 231 "Player: " + val.name + "<br/>" + 228 "<a onClick='showInv(\""+val.steamid+"\")'>Show inventory</a>"232 "<a class='inventoryButton' data-steamid='"+val.steamid+"'>Show inventory</a>" 229 233 ); 230 234 playersMappingList[val.steamid] = { online: !val.online }; … … 256 260 $.getJSON( "../api/getplayerslocation") 257 261 .done(setPlayerMarkers) 258 .fail(function( ) {262 .fail(function(jqxhr, textStatus, error) { 259 263 console.log("Error fetching players list"); 260 264 })
Note:
See TracChangeset
for help on using the changeset viewer.