[Z3lab-checkins] r3600 - in cpsskins/branches/paris-sprint-2006: setup ui/screens/sitemanager
Author: jmorliaguet Date: Mon Jul 3 10:50:43 2006 New Revision: 3600 Modified: cpsskins/branches/paris-sprint-2006/setup/snapshot.py cpsskins/branches/paris-sprint-2006/ui/screens/sitemanager/io_section.pt cpsskins/branches/paris-sprint-2006/ui/screens/sitemanager/views.py Log: - using the snapshot's filename instead of the id Modified: cpsskins/branches/paris-sprint-2006/setup/snapshot.py == --- cpsskins/branches/paris-sprint-2006/setup/snapshot.py (original) +++ cpsskins/branches/paris-sprint-2006/setup/snapshot.py Mon Jul 3 10:50:43 2006 @@ -20,13 +20,19 @@ import time from zope.app.container.contained import Contained -from zope.interface import implements from zope.app.file import File from zope.app.file.interfaces import IFile +from zope.interface import implements +from zope.schema import TextLine class ISnapshot(IFile): A site snapshot +filename = TextLine( +title=uFilename, +description=uThe snapshot's filename, +) + def read(): Return the file's data Modified: cpsskins/branches/paris-sprint-2006/ui/screens/sitemanager/io_section.pt == --- cpsskins/branches/paris-sprint-2006/ui/screens/sitemanager/io_section.pt (original) +++ cpsskins/branches/paris-sprint-2006/ui/screens/sitemanager/io_section.pt Mon Jul 3 10:50:43 2006 @@ -1,6 +1,7 @@ div class=sections tal:define=section request/form/section|nothing; - snapshot request/form/snapshot|nothing + snapshot request/form/snapshot|nothing; + snapshots context/@@listSnapshots div tal:condition=section div tal:condition=python: section == 'export' @@ -29,8 +30,11 @@ form action=@@importSnapshot method=post enctype=multipart/form-data select name=filename - option tal:repeat=snapshot context/@@listSnapshots -tal:content=snapshot / + tal:block tal:repeat=id snapshots +option tal:define=snapshot snapshots/?id +tal:attributes=value id +tal:content=snapshot/filename / + /tal:block /select button type=submitLoad/button /form @@ -49,9 +53,11 @@ /form ul -li tal:repeat=snapshot context/@@listSnapshots - a tal:attributes=href string:@@downloadSnapshot?filename=$snapshot - tal:content=snapshot / +li tal:repeat=id snapshots + a tal:define=snapshot snapshots/?id; + filename snapshot/filename + tal:attributes=href string:@@downloadSnapshot?id=$idfilename=$filename + tal:content=filename / /li /ul /div Modified: cpsskins/branches/paris-sprint-2006/ui/screens/sitemanager/views.py == --- cpsskins/branches/paris-sprint-2006/ui/screens/sitemanager/views.py (original) +++ cpsskins/branches/paris-sprint-2006/ui/screens/sitemanager/views.py Mon Jul 3 10:50:43 2006 @@ -117,9 +117,9 @@ }}) def listSnapshots(self): -return list(self.getSnapshotStorage()) +return dict(self.getSnapshotStorage()) -def downloadSnapshot(self, filename=u''): +def downloadSnapshot(self, id=u'', filename=u''): if not filename: raise ValueError(No snaphost filename specified.) @@ -129,7 +129,7 @@ 'attachment; filename=%s' % filename) snapshots = self.getSnapshotStorage() -return snapshots[filename].read() +return snapshots[id].read() def importSnapshot(self, filename=u''): if not filename: -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins
[Z3lab-checkins] r3602 - in cpsskins/branches/paris-sprint-2006/ui/screens/contentauthor: . filters
Author: jmorliaguet Date: Mon Jul 3 11:35:45 2006 New Revision: 3602 Modified: cpsskins/branches/paris-sprint-2006/ui/screens/contentauthor/content_author.css cpsskins/branches/paris-sprint-2006/ui/screens/contentauthor/filters/slot.pt Log: - the slot frame's title CSS property conflicted with slot's content own markup Modified: cpsskins/branches/paris-sprint-2006/ui/screens/contentauthor/content_author.css == --- cpsskins/branches/paris-sprint-2006/ui/screens/contentauthor/content_author.css (original) +++ cpsskins/branches/paris-sprint-2006/ui/screens/contentauthor/content_author.css Mon Jul 3 11:35:45 2006 @@ -19,7 +19,7 @@ padding-bottom: 13px; } -.slotFrame .title { +.slotFrameTitle { font: 13px Arial, Helvetica, sans-serif; font-weight: bold; text-align: center; @@ -30,3 +30,5 @@ background-color: #fce94f; } +.slotFrameBody { +} Modified: cpsskins/branches/paris-sprint-2006/ui/screens/contentauthor/filters/slot.pt == --- cpsskins/branches/paris-sprint-2006/ui/screens/contentauthor/filters/slot.pt (original) +++ cpsskins/branches/paris-sprint-2006/ui/screens/contentauthor/filters/slot.pt Mon Jul 3 11:35:45 2006 @@ -9,8 +9,8 @@ id context/identifier div class=slotFrame container portletTarget tal:attributes=id id; targetid id -div class=title tal:content=slot_title|slot_name / -div class=body tal:condition=markup +div class=slotFrameTitle tal:content=slot_title|slot_name / +div class=slotFrameBody tal:condition=markup tal:content=structure markup / /div /tal:block -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins
[Z3lab-checkins] r3603 - in cpsskins/branches/paris-sprint-2006: browser/negotiation doc
Author: jmorliaguet Date: Mon Jul 3 11:51:30 2006 New Revision: 3603 Modified: cpsskins/branches/paris-sprint-2006/browser/negotiation/README.txt cpsskins/branches/paris-sprint-2006/doc/portlets.txt Log: - set the REQUEST_URI in the test request since the negotiation module uses that information Modified: cpsskins/branches/paris-sprint-2006/browser/negotiation/README.txt == --- cpsskins/branches/paris-sprint-2006/browser/negotiation/README.txt (original) +++ cpsskins/branches/paris-sprint-2006/browser/negotiation/README.txt Mon Jul 3 11:51:30 2006 @@ -67,7 +67,6 @@ Test setup: from zope.publisher.browser import TestRequest - request = TestRequest() root = getRootFolder() @@ -92,6 +91,7 @@ If nothing is specified, the default theme is returned: + request = TestRequest(environ={'REQUEST_URI': u'/++skin++cpsskins/123'}) page = negotiation.getPage() page.theme, page (Theme('Theme 1'), ThemePage('A page')) @@ -100,7 +100,8 @@ The page's name can be specified in the URL, by writing ...?page=Theme-2:ThemePage - request.form[u'page'] = u'Theme-2:ThemePage' + request = TestRequest(environ={'REQUEST_URI': u'/++skin++cpsskins/123'}, + form={'page': u'Theme-2:ThemePage'}) page = negotiation.getPage() page.theme, page (Theme('Theme 2'), ThemePage('A page')) @@ -110,6 +111,7 @@ The theme's name can also be specified in a cookie: + request = TestRequest(environ={'REQUEST_URI': u'/++skin++cpsskins/123'}) request.response.setCookie('cpsskins_page', u'Theme-3:ThemePage') page = negotiation.getPage() page.theme, page @@ -118,4 +120,3 @@ request.response.expireCookie('cpsskins_page') - Modified: cpsskins/branches/paris-sprint-2006/doc/portlets.txt == --- cpsskins/branches/paris-sprint-2006/doc/portlets.txt(original) +++ cpsskins/branches/paris-sprint-2006/doc/portlets.txtMon Jul 3 11:51:30 2006 @@ -12,7 +12,7 @@ from zope.publisher.browser import TestRequest from zope.publisher.interfaces import IRequest - request = TestRequest() + request = TestRequest(environ={'REQUEST_URI': u'/++skin++cpsskins/123'}) root = getRootFolder() Portlets use a *context info* structure to transmit data through the -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins
[Z3lab-checkins] r3604 - cpsskins/branches/paris-sprint-2006/browser/negotiation
Author: jmorliaguet Date: Mon Jul 3 11:55:17 2006 New Revision: 3604 Modified: cpsskins/branches/paris-sprint-2006/browser/negotiation/README.txt Log: - test fixes Modified: cpsskins/branches/paris-sprint-2006/browser/negotiation/README.txt == --- cpsskins/branches/paris-sprint-2006/browser/negotiation/README.txt (original) +++ cpsskins/branches/paris-sprint-2006/browser/negotiation/README.txt Mon Jul 3 11:55:17 2006 @@ -81,8 +81,6 @@ from zope.component import getMultiAdapter from cpsskins.browser.negotiation.interfaces import INegotiation - negotiation = getMultiAdapter((root, request), INegotiation, -... name='negotiation') Pages - @@ -92,6 +90,8 @@ If nothing is specified, the default theme is returned: request = TestRequest(environ={'REQUEST_URI': u'/++skin++cpsskins/123'}) + negotiation = getMultiAdapter((root, request), INegotiation, +... name='negotiation') page = negotiation.getPage() page.theme, page (Theme('Theme 1'), ThemePage('A page')) @@ -101,7 +101,9 @@ ...?page=Theme-2:ThemePage request = TestRequest(environ={'REQUEST_URI': u'/++skin++cpsskins/123'}, - form={'page': u'Theme-2:ThemePage'}) +... form={'page': u'Theme-2:ThemePage'}) + negotiation = getMultiAdapter((root, request), INegotiation, +... name='negotiation') page = negotiation.getPage() page.theme, page (Theme('Theme 2'), ThemePage('A page')) @@ -113,6 +115,8 @@ request = TestRequest(environ={'REQUEST_URI': u'/++skin++cpsskins/123'}) request.response.setCookie('cpsskins_page', u'Theme-3:ThemePage') + negotiation = getMultiAdapter((root, request), INegotiation, +... name='negotiation') page = negotiation.getPage() page.theme, page (Theme('Theme 3'), ThemePage('A page')) -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins
[Z3lab-checkins] r3606 - in cpsskins/branches/paris-sprint-2006: browser/negotiation standard/formats
Author: jmorliaguet Date: Mon Jul 3 14:54:04 2006 New Revision: 3606 Modified: cpsskins/branches/paris-sprint-2006/browser/negotiation/README.txt cpsskins/branches/paris-sprint-2006/standard/formats/layout.py Log: - test updates / fixes Modified: cpsskins/branches/paris-sprint-2006/browser/negotiation/README.txt == --- cpsskins/branches/paris-sprint-2006/browser/negotiation/README.txt (original) +++ cpsskins/branches/paris-sprint-2006/browser/negotiation/README.txt Mon Jul 3 14:54:04 2006 @@ -93,6 +93,7 @@ negotiation = getMultiAdapter((root, request), INegotiation, ... name='negotiation') print negotiation.strategy +default page = negotiation.getPage() page.theme, page Modified: cpsskins/branches/paris-sprint-2006/standard/formats/layout.py == --- cpsskins/branches/paris-sprint-2006/standard/formats/layout.py (original) +++ cpsskins/branches/paris-sprint-2006/standard/formats/layout.py Mon Jul 3 14:54:04 2006 @@ -78,6 +78,15 @@ ... KeyError: u'No such property: width' +layout types can be combined: + + layout = Layout(types=[u'contained', u'alignable']) + layout +Layout of type: contained, alignable + + dict(layout) +{u'padding': u'', u'align': u'', u'margin': u''} + _layout_types = { -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins