[Z3lab-checkins] r2484 - cpsskins/branches/jmo-perspectives/ui/framework/tests/functional
Author: jmorliaguet Date: Mon Feb 27 13:50:34 2006 New Revision: 2484 Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel1.css cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel2.css cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel3.css Log: - cosmetic Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel1.css == --- cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel1.css (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel1.css Mon Feb 27 13:50:34 2006 @@ -1,10 +1,10 @@ .panel1 { - background-color: #fec; - padding: 0.5em; + background-color: #fd8; + padding: 0.8em; color: red; - margin: 0.5em; - border: 2px solid red; + margin: 0.2em; + border: 1px solid #f99; } .panel1 h2 { Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel2.css == --- cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel2.css (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel2.css Mon Feb 27 13:50:34 2006 @@ -4,6 +4,7 @@ padding: 1em; color: #00c; margin: 0.5em; + border: 1px solid #cfc; } .panel2 h2 { Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel3.css == --- cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel3.css (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel3.css Mon Feb 27 13:50:34 2006 @@ -1,7 +1,7 @@ .panel3 { - background-color: #ffc; - border: 1px solid #090; + background-color: #efc; + border: 1px solid #9c9; padding: 0.5em; color: green; margin: 1em; -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins
[Z3lab-checkins] r2485 - in cpsskins/branches/jmo-perspectives/ui/framework/tests: functional unit zope3/functional/chat zope3/unit
Author: jmorliaguet Date: Mon Feb 27 14:06:15 2006 New Revision: 2485 Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_navpanel_test.html cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_panel_test.html cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_progressive_enhancement.html cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_widget_template_test.html cpsskins/branches/jmo-perspectives/ui/framework/tests/unit/cpsskins_test.html cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/cpsskins_chat.pt cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/unit/cpsskins_storage_adapters.pt Log: - the "ram" type of storage is used by default if none is specified. Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_navpanel_test.html == --- cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_navpanel_test.html (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_navpanel_test.html Mon Feb 27 14:06:15 2006 @@ -47,9 +47,6 @@ {"id": "panel1", "data": { "url": "panel1.html" -}, -"storage": { - "type": "ram" }} @@ -57,9 +54,6 @@ {"id": "panel2", "data": { "url": "panel2.html" -}, -"storage": { - "type": "ram" }} @@ -67,9 +61,6 @@ {"id": "panel3", "data": { "url": "panel3.html" -}, -"storage": { - "type": "ram" }} @@ -77,9 +68,6 @@ {"id": "panel4", "data": { "url": "panel4.html" -}, -"storage": { - "type": "ram" }} Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_panel_test.html == --- cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_panel_test.html (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_panel_test.html Mon Feb 27 14:06:15 2006 @@ -45,9 +45,6 @@ "data": { "url": "panel1.html", "css": "panel1.css" - }, - "storage": { - "type": "ram" }} @@ -56,9 +53,6 @@ "data": { "url": "panel2.html", "css": "panel2.css" - }, - "storage": { - "type": "ram" }} @@ -67,9 +61,6 @@ "data": { "url": "panel3.html", "css": "panel3.css" - }, - "storage": { - "type": "ram" }} @@ -78,9 +69,6 @@ "data": { "url": "panel4.html", "css": "panel4.css" - }, - "storage": { - "type": "ram" }} @@ -89,9 +77,6 @@ "data": { "url": "panel5.html", "css": "popup.css" - }, - "storage": { - "type": "ram" }} Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_progressive_enhancement.html == --- cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_progressive_enhancement.html (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_progressive_enhancement.html Mon Feb 27 14:06:15 2006 @@ -45,11 +45,8 @@ - {"id": "ram-data-provider", - "data": "", - "storage": { - "type": "ram" - } + {"id": "dummy", + "data": "" }} @@ -58,7 +55,7 @@ "template": "ajax_widget_template.pt", "replace": "htmlwidget" }, - "model": "ram-data-provider", + "model": "dummy", "render_effect": { "transition": "fadein" }} Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_widget_template_test.html == --- cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_widget_template_test.html (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_widget_template_test.html Mon Feb 27 14:06:15 2006 @@ -58,10 +58,6 @@ } ] } - }, - "storage": { - "type": "ram" - } }} Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/unit/cpsskins_test.html == --- cpsskins/branches/jmo-perspectives/ui/framework/tests/unit/cpsskins_test.html (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/unit/cpsskins_test.html Mon Feb 27 14:06:15 2006 @@ -77,9 +77,6 @@ {"id": "p1", "d
[Z3lab-checkins] r2486 - in cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3: . functional/aggregator functional/benchmarks functional/chat functional/forms functional/latency functional/tr
Author: jmorliaguet Date: Mon Feb 27 14:34:26 2006 New Revision: 2486 Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/__init__.py cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/configure.zcml cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/aggregator/configure.zcml cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/benchmarks/configure.zcml cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/configure.zcml cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/cpsskins_chat.pt cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/forms/configure.zcml cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/latency/configure.zcml cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/treeview/configure.zcml cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/treeview/treeview_widget.pt Log: - removed deprecation warning when registering layers / skins cpsskins-test was renamed as cpsskinsTest Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/__init__.py == --- cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/__init__.py (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/__init__.py Mon Feb 27 14:34:26 2006 @@ -1,9 +1,9 @@ -from zope.publisher.interfaces.browser import ILayer, IDefaultBrowserLayer +from zope.publisher.interfaces.browser import IDefaultBrowserLayer from zope.publisher.interfaces.browser import IBrowserRequest -class ITestLayer(ILayer, IBrowserRequest): +class cpsskinsTest(IBrowserRequest): """The test layer""" -class ITestSkin(ITestLayer, IDefaultBrowserLayer): +class ITestSkin(cpsskinsTest, IDefaultBrowserLayer): """The test skin""" Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/configure.zcml == --- cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/configure.zcml (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/configure.zcml Mon Feb 27 14:34:26 2006 @@ -1,16 +1,13 @@ http://namespaces.zope.org/zope"; xmlns:browser="http://namespaces.zope.org/browser";> - + - - - Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/aggregator/configure.zcml == --- cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/aggregator/configure.zcml (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/aggregator/configure.zcml Mon Feb 27 14:34:26 2006 @@ -3,7 +3,7 @@ Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/benchmarks/configure.zcml == --- cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/benchmarks/configure.zcml (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/benchmarks/configure.zcml Mon Feb 27 14:34:26 2006 @@ -3,14 +3,14 @@ Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/configure.zcml == --- cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/configure.zcml (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/configure.zcml Mon Feb 27 14:34:26 2006 @@ -3,11 +3,11 @@ + layer="cpsskins.ui.framework.tests.zope3.cpsskinsTest" /> Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/cpsskins_chat.pt == --- cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/cpsskins_chat.pt (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/chat/cpsskins_chat.pt Mon Feb 27 14:34:26 2006 @@ -17,7 +17,7 @@ href="/++skin++cpsskins/@@/++resource++cpsskins.css" /> +href="/++skin++cpsskinsTest/@@/++resource++chat.css" /> Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/forms/configure.zcml == --- cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/forms/configure.zcml (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/forms/configure.zcml Mon Feb 27 14:34:26 2006 @@ -3,11 +3,11 @@ + layer="cpsskins.ui.framework.tests.zope3.cpsski
[Z3lab-checkins] r2487 - cpsskins/branches/jmo-perspectives/locales
Author: jmorliaguet Date: Mon Feb 27 14:47:59 2006 New Revision: 2487 Modified: cpsskins/branches/jmo-perspectives/locales/custom.pot Log: - i18n updates Modified: cpsskins/branches/jmo-perspectives/locales/custom.pot == --- cpsskins/branches/jmo-perspectives/locales/custom.pot (original) +++ cpsskins/branches/jmo-perspectives/locales/custom.pot Mon Feb 27 14:47:59 2006 @@ -52,3 +52,16 @@ msgid "IMacroSlotPortlet" msgstr "" +# Hints + +msgid "hint-site-designer" +msgstr "" + +msgid "hint-layout-designer" +msgstr "" + +msgid "hint-page-designer" +msgstr "" + +msgid "hint-content-author" +msgstr "" -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins
[Z3lab-checkins] r2488 - in cpsskins/branches/jmo-perspectives: . browser browser/negociation browser/skin portlets/macroslot ui/authoring ui/authoring/icons ui/authoring/images ui/default/filters/sty
Author: jmorliaguet Date: Mon Feb 27 14:49:18 2006 New Revision: 2488 Added: cpsskins/branches/jmo-perspectives/portlets/macroslot/skin.py (contents, props changed) Modified: cpsskins/branches/jmo-perspectives/__init__.py cpsskins/branches/jmo-perspectives/browser/configure.zcml cpsskins/branches/jmo-perspectives/browser/negociation/configure.zcml cpsskins/branches/jmo-perspectives/browser/skin/__init__.py cpsskins/branches/jmo-perspectives/browser/skin/configure.zcml cpsskins/branches/jmo-perspectives/portlets/macroslot/configure.zcml cpsskins/branches/jmo-perspectives/portlets/macroslot/portlet.py cpsskins/branches/jmo-perspectives/ui/authoring/configure.zcml cpsskins/branches/jmo-perspectives/ui/authoring/icons/configure.zcml cpsskins/branches/jmo-perspectives/ui/authoring/images/configure.zcml cpsskins/branches/jmo-perspectives/ui/default/filters/style/configure.zcml cpsskins/branches/jmo-perspectives/ui/editing/configure.zcml cpsskins/branches/jmo-perspectives/ui/editing/icons/configure.zcml cpsskins/branches/jmo-perspectives/ui/framework/configure.zcml cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/quiz/configure.zcml cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/unit/configure.zcml cpsskins/branches/jmo-perspectives/ui/panels/configure.zcml cpsskins/branches/jmo-perspectives/ui/screens/configure.zcml cpsskins/branches/jmo-perspectives/ui/screens/contentauthor/configure.zcml cpsskins/branches/jmo-perspectives/ui/screens/layoutdesigner/configure.zcml cpsskins/branches/jmo-perspectives/ui/screens/pagedesigner/configure.zcml cpsskins/branches/jmo-perspectives/ui/screens/sitedesigner/configure.zcml Log: - fixed the registration of the 'cpsskins' layer according to the new way of registering skins / layers Modified: cpsskins/branches/jmo-perspectives/__init__.py == --- cpsskins/branches/jmo-perspectives/__init__.py (original) +++ cpsskins/branches/jmo-perspectives/__init__.py Mon Feb 27 14:49:18 2006 @@ -21,3 +21,4 @@ # load profiles from cpsskins.profiles import default + Modified: cpsskins/branches/jmo-perspectives/browser/configure.zcml == --- cpsskins/branches/jmo-perspectives/browser/configure.zcml (original) +++ cpsskins/branches/jmo-perspectives/browser/configure.zcml Mon Feb 27 14:49:18 2006 @@ -12,7 +12,7 @@ menu="zmi_actions" title="Add" class="zope.app.container.browser.adding.Adding" permission="zope.ManageContent" - layer="cpsskins"> + layer="cpsskins.browser.skin.cpsskins"> @@ -47,7 +47,7 @@ Modified: cpsskins/branches/jmo-perspectives/browser/negociation/configure.zcml == --- cpsskins/branches/jmo-perspectives/browser/negociation/configure.zcml (original) +++ cpsskins/branches/jmo-perspectives/browser/negociation/configure.zcml Mon Feb 27 14:49:18 2006 @@ -10,7 +10,7 @@ class=".views.NegociationView" permission="zope.Public" allowed_interface=".interfaces.INegociation" - layer="cpsskins" + layer="cpsskins.browser.skin.cpsskins" /> Modified: cpsskins/branches/jmo-perspectives/browser/skin/__init__.py == --- cpsskins/branches/jmo-perspectives/browser/skin/__init__.py (original) +++ cpsskins/branches/jmo-perspectives/browser/skin/__init__.py Mon Feb 27 14:49:18 2006 @@ -18,14 +18,14 @@ __docformat__ = "reStructuredText" from zope.app.publisher.browser import applySkin -from zope.publisher.interfaces.browser import ILayer, IDefaultBrowserLayer +from zope.publisher.interfaces.browser import IDefaultBrowserLayer from zope.publisher.interfaces.browser import IBrowserRequest from cpsskins.utils import getThemeManager -class IDefaultLayer(ILayer, IBrowserRequest): -"""The default layer""" +class cpsskins(IBrowserRequest): +"""The default cpsskins layer""" -class IDefaultSkin(IDefaultLayer, IDefaultBrowserLayer): -"""The default skin""" +class IDefaultSkin(cpsskins, IDefaultBrowserLayer): +"""The default cpsskins skin""" Modified: cpsskins/branches/jmo-perspectives/browser/skin/configure.zcml == --- cpsskins/branches/jmo-perspectives/browser/skin/configure.zcml (original) +++ cpsskins/branches/jmo-perspectives/browser/skin/configure.zcml Mon Feb 27 14:49:18 2006 @@ -3,16 +3,12 @@ xmlns:browser="http://namespaces.zope.org/browser"; i18n_domain="zope"> - + - - - Modified: cpsskins/branches/jmo-perspectives/portlets/macroslot/configure.zcml ==
[Z3lab-checkins] r2489 - cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/forms
Author: jmorliaguet Date: Mon Feb 27 14:52:35 2006 New Revision: 2489 Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/forms/cpsskins_form_validation.pt Log: - skin name fix Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/forms/cpsskins_form_validation.pt == --- cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/forms/cpsskins_form_validation.pt (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/zope3/functional/forms/cpsskins_form_validation.pt Mon Feb 27 14:52:35 2006 @@ -17,7 +17,7 @@ href="/++skin++cpsskins/@@/++resource++cpsskins.css" /> +href="/++skin++cpsskinsTest/@@/++resource++form.css" /> -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins
[Z3lab-checkins] r2490 - in cpsskins/branches/jmo-perspectives/ui/framework: . tests/functional
Author: jmorliaguet Date: Mon Feb 27 15:19:03 2006 New Revision: 2490 Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_panel_test.html Log: - refactoring of the perspective infrastructure (sub-perspectives will be removed, instead views will be able to specify which controller to use to switch perspectives) - registered a new controller: "perspective selector" that controls a collection of views. Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js == --- cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Mon Feb 27 15:19:03 2006 @@ -431,6 +431,10 @@ 'drag-and-drop': function(node, def) { return new CPSSkins.DragAndDropController(node, def); + }, + + 'perspective selector': function(node, def) { +return new CPSSkins.PerspectiveSelector(node, def); } }); @@ -609,6 +613,18 @@ }); +CPSSkins.PerspectiveSelector= Class.create(); +CPSSkins.PerspectiveSelector.prototype = Object.extend( + new CPSSkins.Controller(), { + + setup: function() { + }, + + register: function(view) { + } + +}); + // Identifiable DOM elements. if (!CPSSkins.Identifiable) { CPSSkins.Identifiable = new Object() } Object.extend(CPSSkins.Identifiable, { Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_panel_test.html == --- cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_panel_test.html (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_panel_test.html Mon Feb 27 15:19:03 2006 @@ -36,6 +36,13 @@ Element editor + + + {"id": "perspective-selector1", + "type": "perspective selector" + } + + @@ -72,20 +79,13 @@ }} - -{"id": "panel5", - "data": { - "url": "panel5.html", - "css": "popup.css" -}} - - {"widget": { "type": "panel" }, "model": "panel1", - "perspectives": ["page-designer", "layout-designer"] + "perspectives": ["page-designer", "layout-designer"], + "controllers": ["perspective-selector1"] } @@ -94,7 +94,8 @@ "type": "panel" }, "model": "panel2", - "perspectives": ["site-designer"] + "perspectives": ["site-designer"], + "controllers": ["perspective-selector1"] } @@ -109,7 +110,8 @@ "type": "panel" }, "model": "panel2", - "perspectives": ["page-designer"] + "perspectives": ["page-designer"], + "controllers": ["perspective-selector1"] } @@ -118,7 +120,8 @@ "type": "panel" }, "model": "panel3", - "perspectives": ["site-designer", "layout-designer"] + "perspectives": ["site-designer", "layout-designer"], + "controllers": ["perspective-selector1"] } @@ -130,7 +133,8 @@ "type": "panel" }, "model": "panel3", - "perspectives": ["page-designer"] + "perspectives": ["page-designer"], + "controllers": ["perspective-selector1"] } @@ -139,7 +143,8 @@ "type": "panel" }, "model": "panel4", - "perspectives": ["page-designer"] + "perspectives": ["page-designer"], + "controllers": ["perspective-selector1"] } @@ -151,7 +156,8 @@ "type": "panel" }, "model": "panel4", - "perspectives": ["site-designer", "layout-designer"] + "perspectives": ["site-designer", "layout-designer"], + "controllers": ["perspective-selector1"] } @@ -160,7 +166,8 @@ "type": "panel" }, "model": "panel2", - "perspectives": ["site-designer"] + "perspectives": ["site-designer"], + "controllers": ["perspective-selector1"] } @@ -169,14 +176,6 @@ - - {"widget": { - "type": "panel" - }, - "model": "panel5", - "perspectives": ["element-editor"] - } - -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins
[Z3lab-checkins] r2491 - cpsskins/branches/jmo-perspectives/ui/framework
Author: jmorliaguet Date: Mon Feb 27 16:17:33 2006 New Revision: 2491 Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Log: - fix: a same controller may control several views. - PerspectiveSelector: we register which views are visible for each perspective. Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js == --- cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Mon Feb 27 16:17:33 2006 @@ -285,7 +285,7 @@ var evt_id = "registered controller " + c; CPSSkins.registerEventHandler(evt_id, view, function(event) { var controller = event.publisher; -controller.view = view; +controller.views.push(view); controller.register(view); CPSSkins.unsubscribe(evt_id); }); @@ -399,6 +399,7 @@ initialize: function(node, def) { this.node = this.node; this.def = def; +this.views = []; }, setup: function() { @@ -511,16 +512,17 @@ }, submitEvent: function(e) { -var view = this.view; -var model = this.view.model; -var widget = this.view.widget; +$A(this.views).each(function(view) { + var model = this.view.model; + var widget = this.view.widget; + + var form_data = {}; + $A(Form.getInputs(widget)).each(function(i) { +form_data[i.name] = Form.Element.getValue(i); + }); -var form_data = {}; -$A(Form.getInputs(widget)).each(function(i) { - form_data[i.name] = Form.Element.getValue(i); + model.setData(form_data); }); - -model.setData(form_data); return false; } @@ -618,9 +620,17 @@ new CPSSkins.Controller(), { setup: function() { +this._perspectives = {}; }, register: function(view) { +var perspectives = this._perspectives; +$A(view.def.perspectives).each(function(p) { + if (!(p in perspectives)) { +perspectives[p] = []; + } + perspectives[p].push(view); +}); } }); -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins
[Z3lab-checkins] r2492 - cpsskins/branches/jmo-perspectives/ui/framework
Author: jmorliaguet Date: Mon Feb 27 16:39:10 2006 New Revision: 2492 Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Log: - simplifications: perspectives are now managed via the "perspective selector" Controller instead of being managed globally. sub-perspectives are no longer needed. Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js == --- cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Mon Feb 27 16:39:10 2006 @@ -45,9 +45,6 @@ _models: $H({}), _controllers: $H({}), _handlers: $H({}), - _perspectives: $H({}), - _currentPerspective: "", - _previousPerspective: "", init: function() { CPSSkins._parse(document); @@ -305,86 +302,12 @@ el.parentNode.insertBefore(view.widget, el); } -/* registers views per perspective */ -var perspectives = def.perspectives || []; -perspectives.each(function(p) { - if (!p) return; - if (!(p in CPSSkins._perspectives)) { -CPSSkins._perspectives[p] = []; - } - CPSSkins._perspectives[p].push(view); -}); //CPSSkins.notify("registered view " + def.id, view); } break; } } - }, - - _resolvePerspective: function(perspective) { -var path = CPSSkins._currentPerspective.split("/"); -var base = perspective; -var ext = ""; - -if (perspective == '..') { - if (path.length > 0) { -base = path.slice(0, path.length-1).join("/"); - } -} - -if (perspective.substr(0,2) == "./") { - base = CPSSkins._currentPerspective; - if (base) { -base += "/"; - } - ext = perspective.substr(2); -} - -var up = perspective.match(new RegExp(/\.\.\//g)); -if (up && (up.length <= path.length)) { - base = path.slice(0, path.length - up.length).join("/"); - if (base) { -base += "/"; - } - ext = perspective.substr(up.length*3); -} - -if (perspective == '-') { - base = CPSSkins._previousPerspective; -} - -return base + ext; - }, - - switchPerspective: function(perspective) { -var to_show = []; -var to_hide = []; - -perspective = CPSSkins._resolvePerspective(perspective); -CPSSkins._perspectives.each(function(s) { - var elements = s.value; - var path = perspective.split("/"); - path.each(function(p, index) { -var subpath = path.slice(0,index+1).join("/"); -if (s.key == subpath) { - elements.each(function(el) { to_show.push(el) } ); -} else { - elements.each(function(el) { to_hide.push(el) } ); -} - }); -}); - -// Do not hide objects to be shown -to_hide = to_hide.select(function(el) { - return to_show.indexOf(el) < 0; -}); - -to_hide.each(function(el) { el.hide(); }); -to_show.each(function(el) { el.show(); }); - -CPSSkins._previousPerspective = CPSSkins._currentPerspective; -CPSSkins._currentPerspective = perspective; } } @@ -620,17 +543,27 @@ new CPSSkins.Controller(), { setup: function() { -this._perspectives = {}; +this._visible_views = {}; }, register: function(view) { -var perspectives = this._perspectives; +var visible = this._visible_views; $A(view.def.perspectives).each(function(p) { - if (!(p in perspectives)) { -perspectives[p] = []; + if (!(p in visible)) { +visible[p] = []; } - perspectives[p].push(view); + visible[p].push(view); }); + }, + + switchTo: function(perspective) { +var to_show = this._visible_views[perspective]; +var to_hide = this.views.select(function(el) { + return to_show.indexOf(el) < 0; +}); + +to_hide.each(function(el) { el.hide(); }); +to_show.each(function(el) { el.show(); }); } }); -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins
[Z3lab-checkins] r2493 - cpsskins/branches/jmo-perspectives/ui/framework/tests/functional
Author: jmorliaguet Date: Mon Feb 27 17:21:52 2006 New Revision: 2493 Added: cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel5.css (contents, props changed) cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel5_1.html (contents, props changed) cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel5_2.html (contents, props changed) Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_panel_test.html cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel5.html Log: - test updates to demonstrate perspectives in perspectives Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_panel_test.html == --- cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_panel_test.html (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_panel_test.html Mon Feb 27 17:21:52 2006 @@ -16,6 +16,12 @@ margin: 2px; border: 1px solid #999; } +.selector a { + font: 12px Verdana, Arial; + padding-right: 1.5em; + text-decoration: none; + color: #069; +} @@ -25,24 +31,25 @@ - - - Site designer - - Page designer - - Layout designer - - Element editor + + + Perspective 1 + + Perspective 2 + + Perspective 3 + + - + - {"id": "perspective-selector1", + {"id": "controller1", "type": "perspective selector" } + @@ -79,13 +86,21 @@ }} + +{"id": "panel5", + "data": { + "url": "panel5.html", + "css": "panel5.css" +}} + + {"widget": { "type": "panel" }, "model": "panel1", - "perspectives": ["page-designer", "layout-designer"], - "controllers": ["perspective-selector1"] + "perspectives": ["perspective2", "perspective3"], + "controllers": ["controller1"] } @@ -94,8 +109,8 @@ "type": "panel" }, "model": "panel2", - "perspectives": ["site-designer"], - "controllers": ["perspective-selector1"] + "perspectives": ["perspective1"], + "controllers": ["controller1"] } @@ -110,8 +125,8 @@ "type": "panel" }, "model": "panel2", - "perspectives": ["page-designer"], - "controllers": ["perspective-selector1"] + "perspectives": ["perspective2"], + "controllers": ["controller1"] } @@ -120,8 +135,8 @@ "type": "panel" }, "model": "panel3", - "perspectives": ["site-designer", "layout-designer"], - "controllers": ["perspective-selector1"] + "perspectives": ["perspective1", "perspective3"], + "controllers": ["controller1"] } @@ -133,8 +148,8 @@ "type": "panel" }, "model": "panel3", - "perspectives": ["page-designer"], - "controllers": ["perspective-selector1"] + "perspectives": ["perspective2"], + "controllers": ["controller1"] } @@ -143,11 +158,23 @@ "type": "panel" }, "model": "panel4", - "perspectives": ["page-designer"], - "controllers": ["perspective-selector1"] + "perspectives": ["perspective2"], + "controllers": ["controller1"] } + + +{"widget": { + "type": "panel" + }, + "model": "panel5", + "perspectives": ["perspective1"], + "controllers": ["controller1"] +} + + + @@ -156,8 +183,8 @@ "type": "panel" }, "model": "panel4", - "perspectives": ["site-designer", "layout-designer"], - "controllers": ["perspective-selector1"] + "perspectives": ["perspective1", "perspective3"], + "controllers": ["controller1"] } @@ -166,11 +193,13 @@ "type": "panel" }, "model": "panel2", - "perspectives": ["site-designer"], - "controllers": ["perspective-selector1"] + "perspectives": ["perspective1"], + "controllers": ["controller1"] } + + Added: cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel5.css == --- (empty file) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel5.css Mon Feb 27 17:21:52 2006 @@ -0,0 +1,13 @@ + +.panel5 { + background-color: #fdf; + padding: 1em; + border-style: solid; + border-width: 2px; + border-color: #ccc #333 #333 #ccc;
[Z3lab-checkins] r2494 - cpsskins/branches/jmo-perspectives/ui/framework
Author: jmorliaguet Date: Mon Feb 27 19:52:38 2006 New Revision: 2494 Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Log: - fixes Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js == --- cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Mon Feb 27 19:52:38 2006 @@ -46,6 +46,8 @@ _controllers: $H({}), _handlers: $H({}), + _count: 0, + init: function() { CPSSkins._parse(document); }, @@ -178,7 +180,7 @@ } }); -elements.each(function(el, index) { +elements.each(function(el) { var url = el.getAttribute("cite"); if (url) { var options = { @@ -204,9 +206,10 @@ _load: function(node) { var elements = $A(node.getElementsByTagName("ins")); ["view", "controller", "model"].each(function(type) { - elements.each(function(el, index) { + elements.each(function(el) { if (Element.hasClassName(el, type)) { - CPSSkins._register(el, type, index); + CPSSkins._register(el, type, CPSSkins._count); + CPSSkins._count += 1; } }); }); @@ -557,7 +560,7 @@ }, switchTo: function(perspective) { -var to_show = this._visible_views[perspective]; +var to_show = this._visible_views[perspective] || []; var to_hide = this.views.select(function(el) { return to_show.indexOf(el) < 0; }); -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins
[Z3lab-checkins] r2495 - in cpsskins/branches/jmo-perspectives/ui/framework/tests/functional: . panels
Author: jmorliaguet Date: Mon Feb 27 20:07:11 2006 New Revision: 2495 Added: cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panels/ cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panels/cpsskins_panel_test.html - copied, changed from r2493, cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_panel_test.html cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panels/panel1.css - copied unchanged from r2492, cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel1.css cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panels/panel1.html - copied unchanged from r2492, cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel1.html cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panels/panel2.css - copied unchanged from r2492, cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel2.css cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panels/panel2.html - copied unchanged from r2492, cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel2.html cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panels/panel3.css - copied unchanged from r2492, cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel3.css cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panels/panel3.html - copied unchanged from r2492, cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel3.html cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panels/panel4.css - copied unchanged from r2492, cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel4.css cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panels/panel4.html - copied unchanged from r2492, cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel4.html cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panels/panel5.css - copied unchanged from r2493, cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel5.css cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panels/panel5.html - copied unchanged from r2493, cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel5.html cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panels/panel5_1.html - copied unchanged from r2493, cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel5_1.html cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panels/panel5_2.html - copied unchanged from r2493, cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel5_2.html Removed: cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_panel_test.html cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel1.css cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel1.html cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel2.css cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel2.html cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel3.css cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel3.html cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel4.css cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel4.html cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel5.css cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel5.html cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel5_1.html cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel5_2.html cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panel6.html Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/tests.html Log: - moved panel tests to ./panels Copied: cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panels/cpsskins_panel_test.html (from r2493, cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_panel_test.html) == --- cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/cpsskins_panel_test.html (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/functional/panels/cpsskins_panel_test.html Mon Feb 27 20:07:11 2006 @@ -5,10 +5,10 @@ CPSSkins Unit test file - - - - + + + +
[Z3lab-checkins] r2496 - cpsskins/branches/jmo-perspectives/ui/framework/doc
Author: jmorliaguet Date: Mon Feb 27 20:17:14 2006 New Revision: 2496 Modified: cpsskins/branches/jmo-perspectives/ui/framework/doc/index.txt Log: - doc update Modified: cpsskins/branches/jmo-perspectives/ui/framework/doc/index.txt == --- cpsskins/branches/jmo-perspectives/ui/framework/doc/index.txt (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/doc/index.txt Mon Feb 27 20:17:14 2006 @@ -56,21 +56,17 @@ The notion of perspective is borrowed from the Eclipse UI. A perspective -determines which views are visible in a given context. Perspectives are -usually task-oriented, they are selected by the *controller*. +is a collection of views which are visible. When switching between +perspectives, views get shown or hidden. -Perspectives can be nested to create "sub-perspectives". Sub-perspectives can -be used to create "sub-views" of a given view. - -It is possible to navigate between nested perspectives. Switching perspectives -translates into switching views. Controllers --- Controllers map user actions to model updates. -Controllers can also select views -- this is done by switching *perspectives*. +Controllers can also select which views to display -- this is done by switching +*perspectives* (see the Perspective Selector). Technical implementation @@ -182,19 +178,18 @@ - local - remote - + - accessors: the storage accessors ("get", "set") - refresh: the refresh rate - access: the type of access - - sequence type: queue, stack + - sequence type: queue, stack - sequence signature - View @@ -296,6 +291,11 @@ - draggable +* perspective selector + + - javascript API: switchTo + + Javascript API == @@ -318,11 +318,6 @@ - registerWidgets(widgets) -- perspectives - - - switchPerspective(perspective) - - - action handlers - addActions(handlers) @@ -351,7 +346,7 @@ - writeData(data) -- high-level IO +- high-level IO - getData() -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins
[Z3lab-checkins] r2497 - cpsskins/branches/jmo-perspectives/ui/framework/tests/unit
Author: jmorliaguet Date: Mon Feb 27 21:13:17 2006 New Revision: 2497 Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/unit/cpsskins_test.html Log: - test updates (not full working yet) Modified: cpsskins/branches/jmo-perspectives/ui/framework/tests/unit/cpsskins_test.html == --- cpsskins/branches/jmo-perspectives/ui/framework/tests/unit/cpsskins_test.html (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/tests/unit/cpsskins_test.html Mon Feb 27 21:13:17 2006 @@ -26,7 +26,14 @@ -{"id": "c1" +{"id": "c1", + "type": "perspective selector" +} + + + +{"id": "c2", + "type": "perspective selector" } @@ -121,7 +128,8 @@ "type": "panel" }, "model": "p1", - "perspectives": ["1"] + "perspectives": ["1"], + "controllers": ["c1"] } @@ -130,7 +138,8 @@ "type": "panel" }, "model": "p2", - "perspectives": ["1", "2"] + "perspectives": ["1", "2"], + "controllers": ["c1"] } @@ -139,7 +148,8 @@ "type": "panel" }, "model": "p3", - "perspectives": ["3"] + "perspectives": ["3"], + "controllers": ["c1"] } @@ -148,7 +158,8 @@ "type": "panel" }, "model": "p1_2", - "perspectives": ["1/2"] + "perspectives": ["1"], + "controllers": ["c2"] } @@ -157,7 +168,8 @@ "type": "panel" }, "model": "p2_3", - "perspectives": ["2/3"] + "perspectives": ["2"], + "controllers": ["c2"] } @@ -166,7 +178,8 @@ "type": "panel" }, "model": "p2_3_1", - "perspectives": ["2/3/1"] + "perspectives": ["3"], + "controllers": ["c1", "c2"] } @@ -231,7 +244,8 @@ testGetControllerById: function() { with(this) { assertEqual("c1", CPSSkins.getControllerById("c1").def.id); - assertEqual(null, CPSSkins.getControllerById("c2")); + assertEqual("c2", CPSSkins.getControllerById("c2").def.id); + assertEqual(null, CPSSkins.getControllerById("c3")); }}, testAddActions: function() { with(this) { @@ -480,7 +494,7 @@ assert(!isVisible("p3")); assert(!isVisible("p4")); - CPSSkins.switchPerspective("1"); + CPSSkins.getControllerById("c1").switchTo("1"); assert(isVisible("p1")); assert(isVisible("p2")); assert(!isVisible("p1_2")); @@ -489,7 +503,7 @@ assert(!isVisible("p3")); assert(!isVisible("p4")); - CPSSkins.switchPerspective("2"); + CPSSkins.getControllerById("c1").switchTo("2"); assert(isVisible("p2")); assert(!isVisible("p1")); assert(!isVisible("p1_2")); @@ -498,7 +512,7 @@ assert(!isVisible("p3")); assert(!isVisible("p4")); - CPSSkins.switchPerspective("3"); + CPSSkins.getControllerById("c1").switchTo("3"); assert(isVisible("p3")); assert(!isVisible("p1")); assert(!isVisible("p1_2")); @@ -507,7 +521,7 @@ assert(!isVisible("p2")); assert(!isVisible("p4")); - CPSSkins.switchPerspective("4"); + CPSSkins.getControllerById("c1").switchTo("4"); assert(isVisible("p4")); assert(!isVisible("p1")); assert(!isVisible("p1_2")); @@ -516,16 +530,16 @@ assert(!isVisible("p2")); assert(!isVisible("p3")); - CPSSkins.switchPerspective("1/2"); + CPSSkins.getControllerById("c2").switchTo("1"); assert(isVisible("p1")); - assert(isVisible("p2")); // visible because p2 is visible in perspective 1 + assert(isVisible("p2")); assert(isVisible("p1_2")); assert(!isVisible("p2_3")); assert(!isVisible("p2_3_1")); assert(!isVisible("p3")); assert(!isVisible("p4")); - CPSSkins.switchPerspective("2/3"); + CPSSkins.getControllerById("c2").switchTo("2"); assert(isVisible("p2")); assert(isVisible("p2_3")); assert(!isVisible("p1")); @@ -534,7 +548,7 @@ assert(!isVisible("p3")); assert(!isVisible("p4")); - CPSSkins.switchPerspective("2/3/1"); + CPSSkins.getControllerById("c2").switchTo("3"); assert(isVisible("p2")); assert(isVisible("p2_3")); assert(isVisible("p2_3_1")); @@ -543,49 +557,6 @@ assert(!isVisible("p3")); assert(!isVisible("p4")); - /* Navigating in the perspective path */ - // Moving up one level - assertEqual("2/3/1", CPSSkins._currentPerspective); - - CPSSkins.switchPerspective(".."); - assertEqual("2/3", CPSSkins._currentPerspective); - - CPSSkins.switchPerspective(".."); - assertEqual("2", CPSSkins._currentPerspective); - - CPSSkins.switchPerspective(".."); - assertEqual("", CPSSkins._currentPerspective); - - // Moving down - CPSSkins.switchPerspective("./2"); - assertEqual("2", CPSSkins._currentPerspective); - - CPSSkins.switchPerspective("./1"); - assertEqual("2/1", CPSSkins._currentPerspective); - - CPSSkins.swit
[Z3lab-checkins] r2498 - in cpsskins/branches/jmo-perspectives/ui: authoring panels screens
Author: jmorliaguet Date: Mon Feb 27 21:23:01 2006 New Revision: 2498 Modified: cpsskins/branches/jmo-perspectives/ui/authoring/authoring.js cpsskins/branches/jmo-perspectives/ui/authoring/configure.zcml cpsskins/branches/jmo-perspectives/ui/authoring/definitions.py cpsskins/branches/jmo-perspectives/ui/authoring/views.py cpsskins/branches/jmo-perspectives/ui/panels/action_pad.pt cpsskins/branches/jmo-perspectives/ui/screens/editor.pt Log: - updated to the latest API Modified: cpsskins/branches/jmo-perspectives/ui/authoring/authoring.js == --- cpsskins/branches/jmo-perspectives/ui/authoring/authoring.js (original) +++ cpsskins/branches/jmo-perspectives/ui/authoring/authoring.jsMon Feb 27 21:23:01 2006 @@ -36,7 +36,7 @@ this.node = node; this.bg = node.style.background; this.container = node.parentNode; -this.order = Identifiable.getOrder(node); +this.order = CPSSkins.Identifiable.getOrder(node); this.xpos = null; this.ypos = null; this.can_move = true; @@ -85,7 +85,7 @@ var new_id = request.responseText; var rendered = render_element(id=new_id); var container = current_elem.parentNode; -container.insertBefore(rendered, Identifiable.getNext(current_elem)); +container.insertBefore(rendered, CPSSkins.Identifiable.getNext(current_elem)); // set up the new nodes pd_setupPage(); } @@ -196,7 +196,7 @@ var speed = vertical_speed(e); if (Math.abs(speed) < 1) return; if (speed > 0) { -var target = Identifiable.getNext(el); +var target = CPSSkins.Identifiable.getNext(el); } else { var target = el; } @@ -211,10 +211,10 @@ } function save_move(elem) { - var parent = Identifiable.getParent(elem); + var parent = CPSSkins.Identifiable.getParent(elem); var src_id = elem.getAttribute("id"); var dest_id = parent.getAttribute("id"); - var order = Identifiable.getOrder(elem); + var order = CPSSkins.Identifiable.getOrder(elem); current_elem = elem; current_container = parent; model.move({'src_id': src_id, 'dest_id': dest_id, 'order': order}); @@ -228,15 +228,15 @@ if (!Element.hasClassName(moving, 'draggable')) return; var target = Event.element(e); if (!Element.hasClassName(target, 'container')) return; - if (!Identifiable.isEmpty(target)) return; + if (!CPSSkins.Identifiable.isEmpty(target)) return; target.appendChild(moving); current_elem = moving; } function add_element(container, el, type_name) { - var container_id = Identifiable.getIdentifiableElement(container).getAttribute("id"); + var container_id = CPSSkins.Identifiable.getIdentifiableElement(container).getAttribute("id"); if (el) { -var order = Identifiable.getOrder(el); +var order = CPSSkins.Identifiable.getOrder(el); } else { var order = 0; } @@ -283,7 +283,7 @@ setCursor("default"); if (!moved) return; if (!current_elem) return; -if ((moved.order == Identifiable.getOrder(current_elem)) +if ((moved.order == CPSSkins.Identifiable.getOrder(current_elem)) && (moved.container == current_elem.parentNode)) return; save_move(current_elem); moved = null; @@ -313,11 +313,11 @@ Event.observe(mo, 'mouseup', function(e) { if (factory) { var type_name = factory.node.getAttribute("type_name"); - if (Identifiable.isEmpty(mo)) { + if (CPSSkins.Identifiable.isEmpty(mo)) { var el = null; } else { var target = Event.element(e); -var el = Identifiable.getIdentifiableElement(target); +var el = CPSSkins.Identifiable.getIdentifiableElement(target); } add_element(mo, el, type_name); } Modified: cpsskins/branches/jmo-perspectives/ui/authoring/configure.zcml == --- cpsskins/branches/jmo-perspectives/ui/authoring/configure.zcml (original) +++ cpsskins/branches/jmo-perspectives/ui/authoring/configure.zcml Mon Feb 27 21:23:01 2006 @@ -123,6 +123,12 @@ name="getView" attribute="getView" /> + + + Modified: cpsskins/branches/jmo-perspectives/ui/authoring/definitions.py == --- cpsskins/branches/jmo-perspectives/ui/authoring/definitions.py (original) +++ cpsskins/branches/jmo-perspectives/ui/authoring/definitions.py Mon Feb 27 21:23:01 2006 @@ -90,6 +90,7 @@ 'model': 'action-pad', 'perspectives': ['site-designer', 'page-designer', 'layout-designer', 'content-author'], +'controllers': ['main-editor-perspectives'], }, 'tooltip': { @@ -108,6 +109,7 @@ }, 'model': 'perspective-selector', 'perspectives': ['page-designer', 'layout-designer', 'content-author'],
[Z3lab-checkins] r2499 - cpsskins/branches/jmo-perspectives/ui/framework
Author: jmorliaguet Date: Mon Feb 27 22:17:24 2006 New Revision: 2499 Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Log: - the content of panels must be parsed (not only loaded) Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js == --- cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Mon Feb 27 22:17:24 2006 @@ -1493,7 +1493,7 @@ var widget = this.widget; var options = { onComplete: function() { - CPSSkins._load(widget); + CPSSkins._parse(widget); } }; -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins
[Z3lab-checkins] r2500 - in cpsskins/branches/jmo-perspectives/ui: authoring panels screens/sitedesigner
Author: jmorliaguet Date: Mon Feb 27 22:25:20 2006 New Revision: 2500 Added: cpsskins/branches/jmo-perspectives/ui/panels/associations.pt (contents, props changed) cpsskins/branches/jmo-perspectives/ui/panels/management.pt (contents, props changed) cpsskins/branches/jmo-perspectives/ui/panels/settings.pt (contents, props changed) Modified: cpsskins/branches/jmo-perspectives/ui/authoring/definitions.py cpsskins/branches/jmo-perspectives/ui/panels/configure.zcml cpsskins/branches/jmo-perspectives/ui/screens/sitedesigner/site_designer.pt Log: - the site designer panels are displayed using perspectives Modified: cpsskins/branches/jmo-perspectives/ui/authoring/definitions.py == --- cpsskins/branches/jmo-perspectives/ui/authoring/definitions.py (original) +++ cpsskins/branches/jmo-perspectives/ui/authoring/definitions.py Mon Feb 27 22:25:20 2006 @@ -78,6 +78,26 @@ } }, +'settings': { +'id': 'settings', +'data': { +'url': '@@settings.html', +} +}, + +'management': { +'id': 'management', +'data': { +'url': '@@management.html', +} +}, + +'associations': { +'id': 'associations', +'data': { +'url': '@@associations.html', +} +}, } VIEWS = { @@ -181,8 +201,35 @@ 'controllers': ['main-editor-perspectives'], }, -# Bottom area +# site designer panels +'settings': { +'widget': { +'type': 'panel', +}, +'model': 'settings', +'perspectives': ['settings'], +'controllers': ['site-designer-perspectives'], +}, + +'associations': { +'widget': { +'type': 'panel', +}, +'model': 'associations', +'perspectives': ['associations'], +'controllers': ['site-designer-perspectives'], +}, + +'management': { +'widget': { +'type': 'panel', +}, +'model': 'management', +'perspectives': ['management'], +'controllers': ['site-designer-perspectives'], +}, +# Bottom area 'portlet-factory': { 'widget': { 'type': 'panel', @@ -258,6 +305,9 @@ 'main-editor-perspectives': { 'id': 'main-editor-perspectives', 'type': 'perspective selector', -} - +}, +'site-designer-perspectives': { +'id': 'site-designer-perspectives', +'type': 'perspective selector', +}, } Added: cpsskins/branches/jmo-perspectives/ui/panels/associations.pt == --- (empty file) +++ cpsskins/branches/jmo-perspectives/ui/panels/associations.ptMon Feb 27 22:25:20 2006 @@ -0,0 +1,9 @@ + + Associations + + +local themes, perspectives ... + + + Modified: cpsskins/branches/jmo-perspectives/ui/panels/configure.zcml == --- cpsskins/branches/jmo-perspectives/ui/panels/configure.zcml (original) +++ cpsskins/branches/jmo-perspectives/ui/panels/configure.zcml Mon Feb 27 22:25:20 2006 @@ -38,6 +38,22 @@ template="location_selector.pt" /> + + + + + + + Management + + +export, import themes and settings ... + + + Added: cpsskins/branches/jmo-perspectives/ui/panels/settings.pt == --- (empty file) +++ cpsskins/branches/jmo-perspectives/ui/panels/settings.ptMon Feb 27 22:25:20 2006 @@ -0,0 +1,55 @@ + + + + + +Settings + + + + + + + + + + + + + + + + + + + + [customize] + [remove] + [remove customization] + [export] + [reload] + + + + + + + + + + Modified: cpsskins/branches/jmo-perspectives/ui/screens/sitedesigner/site_designer.pt == --- cpsskins/branches/jmo-perspectives/ui/screens/sitedesigner/site_designer.pt (original) +++ cpsskins/branches/jmo-perspectives/ui/screens/sitedesigner/site_designer.pt Mon Feb 27 22:25:20 2006 @@ -1,73 +1,17 @@ - - - Site designer - - - - -Settings - - - - - - - - - - - - - - - - - - - - [customize] - [remove] - [remove customization] - [export] - [reload] - - - -
[Z3lab-checkins] r2501 - cpsskins/branches/jmo-perspectives/ui/framework
Author: jmorliaguet Date: Mon Feb 27 23:14:00 2006 New Revision: 2501 Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Log: - clear the content of hidden panels Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js == --- cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Mon Feb 27 23:14:00 2006 @@ -1516,6 +1516,7 @@ if (this.script_id) { CPSSKins.Canvas.removeScript(this.script_id); } +this.widget.innerHTML = ''; } }); -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins