Revision 049a5a10 templates/user_routes.html

b/templates/user_routes.html
4 4
<script type="text/javascript" src="/static/js/jquery.dataTables.js"></script>
5 5
<script type="text/javascript">
6 6
	$(document).ready( function(){
7
		$("#hid_mid").val('');
7 8
		$('#dialog').dialog({
8 9
			height: 220,
9 10
            width: 300,
......
19 20
			cache: false,
20 21
			success: function(data) {
21 22
				$('#dialog').dialog('close');
23
				window.setTimeout('location.reload()', 1000);
22 24
			  }
23 25
		});
24 26
		},
25 27
		Cancel: function() {
26 28
			$('#dialog').dialog('close');
29
		},
30
		
31

  
32
	},
33
	close: function() {
34
        update_val = $("#hid_mid").val();
35
		if (update_val == 'UPDATED'){
36
			$("#hid_mid").val('');
37
			window.setTimeout('location.reload()', 500);
27 38
		}
28
	}
39
    }
29 40
		});
30 41
		$('#console').dialog({
31 42
			height: 250,
32 43
            width: 800,
33 44
			modal: true,
34
			autoOpen: false
35
			});
36
			$('#routes_table').dataTable( {
45
			autoOpen: false,
46
			close: function() {
47
		        update_val = $("#hid_mid").val();
48
				if (update_val == 'UPDATED'){
49
					$("#hid_mid").val('');
50
					window.setTimeout('location.reload()', 500);
51
				}
52
		    }
53
		});
54
			
55
		$('#routes_table').dataTable( {
37 56
			"bJQueryUI": true,
38 57
			"oLanguage": {
39 58
				"sLengthMenu": '{% trans "Display" %} <select><option value="25">25</option><option value="50">50</option><option value="-1">{% trans "All" %}</option></select> routes'
......
70 89
				$('#console').dialog('open');
71 90
				return false;
72 91
			});
92

  
73 93
		});
74 94
		
75 95
function delete_route(route){

Also available in: Unified diff