Changeset 171 for binary-improvements/webserver/js
- Timestamp:
- Sep 5, 2014, 10:54:12 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.