Created
June 7, 2013 22:41
-
-
Save appcove/5732911 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim:encoding=utf-8:ts=2:sw=2:expandtab | |
from AppCove import * | |
import AppCove.Network | |
############################################################################### | |
@Expose | |
def Request(self, ID=0): | |
yield | |
LocationList = AppCove.Network.Location.List() | |
#============================================================================ | |
self.UI.Title = 'Network Overview' | |
self.UI.Style(''' | |
tr._LocationRow | |
{ | |
cursor: pointer; | |
} | |
''') | |
self.UI.Script(''' | |
$(function(){ | |
$('tr._LocationRow').click(function(ev){ | |
ev.preventDefault(); | |
window.location = 'location/edit?RURI=' + encodeURIComponent(window.location.href) + '&L=' + encodeURIComponent($(this).attr('data-Location_MNID')); | |
}); | |
}); | |
''') | |
self.UI.Body(''' | |
<table class="List"> | |
<tr> | |
<th>Location ID</th> | |
<th>Name</th> | |
<th>Note</th> | |
</tr> | |
''' + JN(''' | |
<tr class="_LocationRow" data-Location_MNID=''' + QA(Row.Location_MNID) + '''> | |
<td>''' + HS(Row.Location_MNID) + '''</td> | |
<td>''' + HS(Row.Name) + '''</td> | |
<td>''' + HS(Row.Note) + '''</td> | |
<tr> | |
''' for Row in LocationList) + ''' | |
</table> | |
''') | |
yield self.UI |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment