[CalendarServer-changes] [7976] CalendarServer/branches/users/glyph/imip-and-admin-html/ calendarserver/webadmin
source_changes at macosforge.org
source_changes at macosforge.org
Thu Aug 11 21:54:34 PDT 2011
Revision: 7976
http://trac.macosforge.org/projects/calendarserver/changeset/7976
Author: glyph at apple.com
Date: 2011-08-11 21:54:34 -0700 (Thu, 11 Aug 2011)
Log Message:
-----------
elide some unused parts of the page
Modified Paths:
--------------
CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/resource.py
CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/template.html
CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/test/test_resource.py
Modified: CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/resource.py
===================================================================
--- CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/resource.py 2011-08-12 04:54:22 UTC (rev 7975)
+++ CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/resource.py 2011-08-12 04:54:34 UTC (rev 7976)
@@ -84,6 +84,8 @@
Renderer which detects if there are resource search results and
continues if so.
"""
+ if 'resourceSearch' not in request.args:
+ returnValue('')
yield self.performSearch(request)
returnValue(tag)
@@ -95,6 +97,8 @@
Renderer which detects if there are resource search results and
continues if so.
"""
+ if 'resourceSearch' not in request.args:
+ returnValue('')
rows = yield self.performSearch(request)
if rows:
returnValue("")
Modified: CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/template.html
===================================================================
--- CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/template.html 2011-08-12 04:54:22 UTC (rev 7975)
+++ CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/template.html 2011-08-12 04:54:34 UTC (rev 7976)
@@ -62,8 +62,8 @@
<div t:render="noSearchResults" style="margin-top:4px"
>No matches found for resource <b><t:slot name="resourceSearch" /></b>.
</div>
- <table t:render="hasSearchResults" cellspacing="0" cellpadding="3"
- border="1" style="margin-top: 2px">
+ <table id="tab_searchResults" t:render="hasSearchResults" cellspacing="0"
+ cellpadding="3" border="1" style="margin-top: 2px">
<tr class="odd">
<th>ID</th>
<th>Full Name</th>
Modified: CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/test/test_resource.py
===================================================================
--- CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/test/test_resource.py 2011-08-12 04:54:22 UTC (rev 7975)
+++ CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/test/test_resource.py 2011-08-12 04:54:34 UTC (rev 7976)
@@ -243,8 +243,16 @@
self.assertEquals(hiddenResourceId, "qux")
autoScheduleMenu = document.getElementById("sel_autoSchedule")
+
+ # Now, some assertions about features that are covered in other tests
+ # which should be turned _off_ here since we're not asking for them.
+
# Not an auto-schedule resource; there should be no auto-schedule menu.
self.assertIdentical(autoScheduleMenu, None)
+ # No resource search present; we shouldn't be performing the search.
+ self.assertNotIn("No matches found for resource",
+ gatherTextNodes(document))
+ self.assertIdentical(document.getElementById("tab_searchResults"), None)
@inlineCallbacks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110811/9432cf82/attachment-0001.html>
More information about the calendarserver-changes
mailing list