better neighbors/save interaction
This commit is contained in:
		| @@ -24,7 +24,11 @@ | ||||
|     $("[rel=tooltip]").tooltip({live: true}); | ||||
|     $("[rel=popover]").popover({live: true}); | ||||
|  | ||||
|     $("input[name='mapshow']").trigger('change'); | ||||
|     if ($("input[name='mapshow']:checked").val() == 'neighbors') { | ||||
|       $('#nd_netmap-save').prop('disabled', true).removeClass('btn-info'); | ||||
|     } else { | ||||
|       $('#nd_netmap-save').prop('disabled', false).addClass('btn-info'); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   // on load, establish global delegations for now and future | ||||
| @@ -129,15 +133,6 @@ | ||||
|           + '&positions=' + JSON.stringify(graph.positions()) | ||||
|       ); | ||||
|     }); | ||||
|     $("input[name='mapshow']").change(function() { | ||||
|       var newval = $("input[name='mapshow']:checked").val(); | ||||
|       if (newval == 'neighbors') { | ||||
|         $('#nd_netmap-save').prop('disabled', true).removeClass('btn-info'); | ||||
|       } | ||||
|       else { | ||||
|         $('#nd_netmap-save').prop('disabled', false).addClass('btn-info'); | ||||
|       } | ||||
|     }); | ||||
|     $('#nd_netmap-zoomtodevice').on('click', function(event) { | ||||
|       event.preventDefault(); | ||||
|       var node = graph.nodeDataById( graph['nd2']['centernode'] ); | ||||
|   | ||||
| @@ -39,7 +39,7 @@ | ||||
|                 <i class="icon-lock icon-large pull-left nd_navbar-icon"></i> | ||||
|             Pin Selected</button> | ||||
|  | ||||
|             <button id="nd_netmap-save" class="btn btn-info"> | ||||
|             <button id="nd_netmap-save" class="btn" disabled> | ||||
|                 <i class="icon-save icon-large pull-left nd_navbar-icon"></i> | ||||
|             Save Positions</button> | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user