37 |
$(this).text ("Wait..."); |
$(this).text ("Wait..."); |
38 |
|
|
39 |
portName = $(this).parents("tr").attr ('id'); |
portName = $(this).parents("tr").attr ('id'); |
40 |
$(this).load ("/portconf/update.py?action=getportfast&switch=""" + switchName + """&port=" + portName); |
$(this).load ("update.py?action=getportfast&switch=""" + switchName + """&port=" + portName); |
41 |
$(this).unbind (); |
$(this).unbind (); |
42 |
$(this).click (togglePortfast); |
$(this).click (togglePortfast); |
43 |
}); |
}); |
46 |
$(this).text ("Wait..."); |
$(this).text ("Wait..."); |
47 |
td = $(this).parents ("td"); |
td = $(this).parents ("td"); |
48 |
portName = $(this).parents("tr").attr ('id'); |
portName = $(this).parents("tr").attr ('id'); |
49 |
td.load ("/portconf/update.py?action=geterrors&switch=""" + switchName + """&port=" + portName); |
td.load ("update.py?action=geterrors&switch=""" + switchName + """&port=" + portName); |
50 |
}); |
}); |
51 |
$("a.status").click (function () { |
$("a.status").click (function () { |
52 |
$(this).attr ("class", "statusload"); |
$(this).attr ("class", "statusload"); |
53 |
$(this).text ("Wait..."); |
$(this).text ("Wait..."); |
54 |
td = $(this).parents ("td"); |
td = $(this).parents ("td"); |
55 |
portName = $(this).parents("tr").attr ('id'); |
portName = $(this).parents("tr").attr ('id'); |
56 |
$(this).load ("/portconf/update.py?action=toggleshutdown&switch=""" + switchName + """&port=" + portName); |
$(this).load ("update.py?action=toggleshutdown&switch=""" + switchName + """&port=" + portName); |
57 |
}); |
}); |
58 |
togglePortfast = function () { |
togglePortfast = function () { |
59 |
$(this).text ("Wait..."); |
$(this).text ("Wait..."); |
60 |
portName = $(this).parents("tr").attr ('id'); |
portName = $(this).parents("tr").attr ('id'); |
61 |
$(this).load ("/portconf/update.py?action=toggleportfast&switch=""" + switchName + """&port=" + portName); |
$(this).load ("update.py?action=toggleportfast&switch=""" + switchName + """&port=" + portName); |
62 |
}; |
}; |
63 |
toggleShutdown = function () { |
toggleShutdown = function () { |
64 |
$(this).text ("Wait..."); |
$(this).text ("Wait..."); |
65 |
portName = $(this).parents("tr").attr ('id'); |
portName = $(this).parents("tr").attr ('id'); |
66 |
$(this).load ("/portconf/update.py?action=toggleshutdown&switch=""" + switchName + """&port=" + portName); |
$(this).load ("update.py?action=toggleshutdown&switch=""" + switchName + """&port=" + portName); |
67 |
}; |
}; |
68 |
descClick = function () { |
descClick = function () { |
69 |
$(this).attr ("class", "descinput"); |
$(this).attr ("class", "descinput"); |
76 |
td = $(this).parents ("td"); |
td = $(this).parents ("td"); |
77 |
td.html ("<a style='cursor:pointer'>Saving...</a>"); |
td.html ("<a style='cursor:pointer'>Saving...</a>"); |
78 |
td.children ().click (descClick); |
td.children ().click (descClick); |
79 |
td.children().load ("/portconf/update.py?action=setdescription&switch=""" + switchName + """&port=" + portName + "&desc=" + escape (portDesc)); |
td.children().load ("update.py?action=setdescription&switch=""" + switchName + """&port=" + portName + "&desc=" + escape (portDesc)); |
80 |
}); |
}); |
81 |
//td.load ("/portconf/update.py?action=geterrors&switch=""" + switchName + """&port=" + portName); |
//td.load ("update.py?action=geterrors&switch=""" + switchName + """&port=" + portName); |
82 |
}; |
}; |
83 |
vlanClick = function () { |
vlanClick = function () { |
84 |
$(this).attr ("class", "vlaninput"); |
$(this).attr ("class", "vlaninput"); |
91 |
td = $(this).parents ("td"); |
td = $(this).parents ("td"); |
92 |
td.html ("<a style='cursor:pointer'>Saving...</a>"); |
td.html ("<a style='cursor:pointer'>Saving...</a>"); |
93 |
td.children ().click (vlanClick); |
td.children ().click (vlanClick); |
94 |
td.children().load ("/portconf/update.py?action=setvlan&switch=""" + switchName + """&port=" + escape(portName) + "&vlan=" + escape (vlan)); |
td.children().load ("update.py?action=setvlan&switch=""" + switchName + """&port=" + escape(portName) + "&vlan=" + escape (vlan)); |
95 |
}); |
}); |
96 |
}; |
}; |
97 |
$("a.desc").click (descClick); |
$("a.desc").click (descClick); |