Author: jmorliaguet Date: Sun Mar 19 15:42:45 2006 New Revision: 2662 Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/panels/views.py cpsskins/branches/jmo-perspectives/ui/panels/settings.pt cpsskins/branches/jmo-perspectives/ui/screens/editor.pt cpsskins/branches/jmo-perspectives/ui/screens/sitedesigner/site_designer.css cpsskins/branches/jmo-perspectives/ui/screens/sitedesigner/views.py Log:
- site-designer: implemented the management of settings in Ajax Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/panels/views.py ============================================================================== --- cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/panels/views.py (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/panels/views.py Sun Mar 19 15:42:45 2006 @@ -5,5 +5,5 @@ class FormAction(BrowserView): - def doSomething(self, updated=0): + def doSomething(self): return json.write({'url': '@@panels-form.html?updated=1'}) Modified: cpsskins/branches/jmo-perspectives/ui/panels/settings.pt ============================================================================== --- cpsskins/branches/jmo-perspectives/ui/panels/settings.pt (original) +++ cpsskins/branches/jmo-perspectives/ui/panels/settings.pt Sun Mar 19 15:42:45 2006 @@ -1,3 +1,4 @@ + <table class="panel" cellpadding="0" cellspacing="0" tal:define="info context/@@getSettingInfo"> <tr> @@ -6,11 +7,7 @@ <img class="icon" src="/++skin++cpsskins/@@/++resource++settings-48.png" /> <ul> - <li tal:repeat="section info"> - <a class="section" - tal:attributes="href string:javascript:CPSSkins.getModelById('settings-section').setData({'url': '@@settings-section.html?section=$section'})" - tal:content="section" i18n:translate="" /> - </li> + <li><a class="section">perspective</a></li> </ul> <br style="clear:both"/> </div> @@ -18,18 +15,29 @@ <td class="subsection"> <ins class="model"> - {"id": "settings-section"} + {"id": "settings-section", + "data": { + "url": "@@settings-section.html?section=perspective" + }} </ins> <ins class="view"> {"id": "settings-section", "widget": { - "template": "@@settings-section.html?section=perspective" + "type": "panel" }, - "model": "settings-section" + "model": "settings-section", + "perspectives": ["settings"], + "controllers": ["site-designer-perspectives", "settings-location"] } </ins> + <ins class="controller"> + {"id": "settings-location", + "type": "location" + }} + </ins> + </td> </tr> </table> Modified: cpsskins/branches/jmo-perspectives/ui/screens/editor.pt ============================================================================== --- cpsskins/branches/jmo-perspectives/ui/screens/editor.pt (original) +++ cpsskins/branches/jmo-perspectives/ui/screens/editor.pt Sun Mar 19 15:42:45 2006 @@ -13,8 +13,6 @@ <script type="text/javascript" src="/++skin++cpsskins/@@/++resource++prototype.js"></script> <script type="text/javascript" - src="/++skin++cpsskins/@@/++resource++authoring.js"></script> - <script type="text/javascript" src="/++skin++cpsskins/@@/++resource++json.js"></script> <script type="text/javascript" src="/++skin++cpsskins/@@/++resource++ctal.js"></script> @@ -51,23 +49,23 @@ <ins class="view" cite="@@getView?id=content-author"></ins> <!-- Contextual menu --> + <!-- <ins class="view" cite="@@getView?id=context-menu"></ins> - - <div id="drag-feedback-box"></div> - <div id="factory-box"></div> - <div id="selection-box"></div> + --> </div> <!-- Main area for other screens --> <div id="mainArea"> <ins class="model" cite="@@getModel?id=site-designer"></ins> <ins class="view" cite="@@getView?id=site-designer"></ins> + </div> <!-- Bottom area --> <div class="floatingFooter"> <ins class="model" cite="@@getModel?id=portlet-factory"></ins> <ins class="view" cite="@@getView?id=portlet-factory"></ins> + <ins class="controller" cite="@@getController?id=portlet-factory"></ins> </div> </body> Modified: cpsskins/branches/jmo-perspectives/ui/screens/sitedesigner/site_designer.css ============================================================================== --- cpsskins/branches/jmo-perspectives/ui/screens/sitedesigner/site_designer.css (original) +++ cpsskins/branches/jmo-perspectives/ui/screens/sitedesigner/site_designer.css Sun Mar 19 15:42:45 2006 @@ -15,8 +15,9 @@ color: #000; padding: 1px 2px 1px 15px; margin: 1.8em 2px 0em 0; - border-bottom: 1px solid #eee; + border-bottom: 1px solid #666; background-color: #ccc; + cursor: pointer; } .description { @@ -69,3 +70,4 @@ table.panel td.subsection { width: 70%; } + Modified: cpsskins/branches/jmo-perspectives/ui/screens/sitedesigner/views.py ============================================================================== --- cpsskins/branches/jmo-perspectives/ui/screens/sitedesigner/views.py (original) +++ cpsskins/branches/jmo-perspectives/ui/screens/sitedesigner/views.py Sun Mar 19 15:42:45 2006 @@ -59,9 +59,6 @@ resources = getUtility(IResourceManager) resources.customize(name=name, context=self.context) - target = self.request.get('HTTP_REFERER', '.') - self.request.response.redirect(target) - def decustomizeSetting(self, name=u''): if not name: raise KeyError("Must specify a setting's name.") @@ -69,9 +66,6 @@ resources = getUtility(IResourceManager) resources.decustomize(name=name, context=self.context) - target = self.request.get('HTTP_REFERER', '.') - self.request.response.redirect(target) - def removeSetting(self, name=u''): if not name: raise KeyError("Must specify a setting's name.") @@ -79,9 +73,6 @@ resources = getUtility(IResourceManager) resources.unregister(name=name, context=self.context) - target = self.request.get('HTTP_REFERER', '.') - self.request.response.redirect(target) - def exportSetting(self, name=u''): """Export the setting as an XML file. """ @@ -116,9 +107,5 @@ def reloadSetting(self, name=u''): """Reload the setting from the file-system """ - reloadSetting(name) - target = self.request.get('HTTP_REFERER', '.') - self.request.response.redirect(target) - -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins