From gotcha at codespeak.net Thu Mar 1 11:27:06 2007 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Thu, 1 Mar 2007 11:27:06 +0100 (CET) Subject: [KSS-checkins] r39621 - kukit/kss.core/trunk/kss/core Message-ID: <20070301102706.DB60310125@code0.codespeak.net> Author: gotcha Date: Thu Mar 1 11:27:04 2007 New Revision: 39621 Modified: kukit/kss.core/trunk/kss/core/concatresource.zcml Log: correct comments about memory caching Modified: kukit/kss.core/trunk/kss/core/concatresource.zcml ============================================================================== --- kukit/kss.core/trunk/kss/core/concatresource.zcml (original) +++ kukit/kss.core/trunk/kss/core/concatresource.zcml Thu Mar 1 11:27:04 2007 @@ -2,6 +2,12 @@ xmlns:browser="http://namespaces.zope.org/browser" xmlns:five="http://namespaces.zope.org/five"> + + - From jvloothuis at codespeak.net Thu Mar 1 23:25:03 2007 From: jvloothuis at codespeak.net (jvloothuis at codespeak.net) Date: Thu, 1 Mar 2007 23:25:03 +0100 (CET) Subject: [KSS-checkins] r39646 - kukit/kss.core/trunk/kss/core Message-ID: <20070301222503.41A2C10131@code0.codespeak.net> Author: jvloothuis Date: Thu Mar 1 23:25:01 2007 New Revision: 39646 Modified: kukit/kss.core/trunk/kss/core/azaxview.py Log: Fixed a problem with KSS in Plone that caused all KSS calls to break. This was due to an improper response header. Modified: kukit/kss.core/trunk/kss/core/azaxview.py ============================================================================== --- kukit/kss.core/trunk/kss/core/azaxview.py (original) +++ kukit/kss.core/trunk/kss/core/azaxview.py Thu Mar 1 23:25:01 2007 @@ -134,6 +134,10 @@ def render(self): """Views can use this to return their command set.""" + # Always output text/xml to make sure browsers but the data in the + # responseXML instead of responseText attribute of the + # XMLHttpRequestobject. + self.request.RESPONSE.setHeader('Content-type', 'text/xml') return self.commands.render(self.request) def cancelRedirect(self): From reebalazs at codespeak.net Fri Mar 2 09:11:04 2007 From: reebalazs at codespeak.net (reebalazs at codespeak.net) Date: Fri, 2 Mar 2007 09:11:04 +0100 (CET) Subject: [KSS-checkins] r39648 - kukit/kss.core/trunk/kss/core Message-ID: <20070302081104.D8C7810036@code0.codespeak.net> Author: reebalazs Date: Fri Mar 2 09:11:01 2007 New Revision: 39648 Modified: kukit/kss.core/trunk/kss/core/azaxview.py kukit/kss.core/trunk/kss/core/concatresource.zcml Log: To make sure, extend Jeroen's patch to include the charset information Modified: kukit/kss.core/trunk/kss/core/azaxview.py ============================================================================== --- kukit/kss.core/trunk/kss/core/azaxview.py (original) +++ kukit/kss.core/trunk/kss/core/azaxview.py Fri Mar 2 09:11:01 2007 @@ -137,7 +137,7 @@ # Always output text/xml to make sure browsers but the data in the # responseXML instead of responseText attribute of the # XMLHttpRequestobject. - self.request.RESPONSE.setHeader('Content-type', 'text/xml') + self.request.RESPONSE.setHeader('Content-type', 'text/xml;charset=utf-8') return self.commands.render(self.request) def cancelRedirect(self): Modified: kukit/kss.core/trunk/kss/core/concatresource.zcml ============================================================================== --- kukit/kss.core/trunk/kss/core/concatresource.zcml (original) +++ kukit/kss.core/trunk/kss/core/concatresource.zcml Fri Mar 2 09:11:01 2007 @@ -28,7 +28,7 @@ kukit/kukit/forms.js kukit/kukit/plugin.js" name="kukit.js" - compress_level="safe" + compress_level="none" /> Author: reebalazs Date: Fri Mar 2 09:12:31 2007 New Revision: 39649 Modified: kukit/kss.core/trunk/kss/core/concatresource.zcml Log: Oops, this was unintentional Modified: kukit/kss.core/trunk/kss/core/concatresource.zcml ============================================================================== --- kukit/kss.core/trunk/kss/core/concatresource.zcml (original) +++ kukit/kss.core/trunk/kss/core/concatresource.zcml Fri Mar 2 09:12:31 2007 @@ -28,7 +28,7 @@ kukit/kukit/forms.js kukit/kukit/plugin.js" name="kukit.js" - compress_level="none" + compress_level="safe" /> Author: jvloothuis Date: Fri Mar 2 10:09:04 2007 New Revision: 39650 Modified: kukit/kss.core/trunk/kss/core/azaxview.txt Log: Added a response to the request so the test works with the explicit setting of headers Modified: kukit/kss.core/trunk/kss/core/azaxview.txt ============================================================================== --- kukit/kss.core/trunk/kss/core/azaxview.txt (original) +++ kukit/kss.core/trunk/kss/core/azaxview.txt Fri Mar 2 10:09:04 2007 @@ -19,11 +19,13 @@ >>> from zope.lifecycleevent import ObjectModifiedEvent >>> from zope.lifecycleevent.interfaces import IObjectModifiedEvent >>> from zope.publisher.browser import TestRequest + >>> from zope.publisher.http import HTTPResponse >>> from zope import event >>> from zope.app.folder import folder >>> myfolder = folder.rootFolder() >>> request = TestRequest() + >>> request.RESPONSE = HTTPResponse() Now we will write our custom. From jvloothuis at codespeak.net Fri Mar 2 10:15:05 2007 From: jvloothuis at codespeak.net (jvloothuis at codespeak.net) Date: Fri, 2 Mar 2007 10:15:05 +0100 (CET) Subject: [KSS-checkins] r39651 - kukit/kss.core/trunk/kss/core Message-ID: <20070302091505.35E3010121@code0.codespeak.net> Author: jvloothuis Date: Fri Mar 2 10:15:03 2007 New Revision: 39651 Modified: kukit/kss.core/trunk/kss/core/actionwrapper.py Log: Fixed final test which broke due to the new explicit header setting Modified: kukit/kss.core/trunk/kss/core/actionwrapper.py ============================================================================== --- kukit/kss.core/trunk/kss/core/actionwrapper.py (original) +++ kukit/kss.core/trunk/kss/core/actionwrapper.py Fri Mar 2 10:15:03 2007 @@ -98,6 +98,7 @@ tests. >>> from zope.publisher.browser import TestRequest + >>> from zope.publisher.http import HTTPResponse >>> class MyView(AzaxBaseView): ... @kssaction @@ -109,6 +110,7 @@ ... raise KssExplicitError, 'The error' >>> request = TestRequest() + >>> request.RESPONSE = HTTPResponse() >>> view = MyView(None, request) Set debug-mode command rendering so we can see the results in a From reebalazs at codespeak.net Sat Mar 3 17:56:09 2007 From: reebalazs at codespeak.net (reebalazs at codespeak.net) Date: Sat, 3 Mar 2007 17:56:09 +0100 (CET) Subject: [KSS-checkins] r39829 - kukit/kss.core/trunk/kss/core Message-ID: <20070303165609.E3AF01006E@code0.codespeak.net> Author: reebalazs Date: Sat Mar 3 17:56:07 2007 New Revision: 39829 Modified: kukit/kss.core/trunk/kss/core/azaxview.py kukit/kss.core/trunk/kss/core/commands.py Log: Move the setting of the content-type request header where it belongs to. I believe it is safer to leave this explicit setting, independently what the final outcome of Hanno's patch will be. Modified: kukit/kss.core/trunk/kss/core/azaxview.py ============================================================================== --- kukit/kss.core/trunk/kss/core/azaxview.py (original) +++ kukit/kss.core/trunk/kss/core/azaxview.py Sat Mar 3 17:56:07 2007 @@ -134,10 +134,6 @@ def render(self): """Views can use this to return their command set.""" - # Always output text/xml to make sure browsers but the data in the - # responseXML instead of responseText attribute of the - # XMLHttpRequestobject. - self.request.RESPONSE.setHeader('Content-type', 'text/xml;charset=utf-8') return self.commands.render(self.request) def cancelRedirect(self): Modified: kukit/kss.core/trunk/kss/core/commands.py ============================================================================== --- kukit/kss.core/trunk/kss/core/commands.py (original) +++ kukit/kss.core/trunk/kss/core/commands.py Sat Mar 3 17:56:07 2007 @@ -191,8 +191,13 @@ # XML output gets rendered via a page template # XXX note: barefoot rendering, use python: only after zope2.9 - render = ViewPageTemplateFile('browser/kukitresponse.pt', content_type='text/xml;charset=utf-8') + # XXX we must have the content type set both here and below + _render = ViewPageTemplateFile('browser/kukitresponse.pt', content_type='text/xml;charset=utf-8') -# def render(self): -# result = self._render() -# return result + def render(self): + result = self._render() + # Always output text/xml to make sure browsers but the data in the + # responseXML instead of responseText attribute of the + # XMLHttpRequestobject. + self.request.RESPONSE.setHeader('Content-type', 'text/xml;charset=utf-8') + return result From reebalazs at codespeak.net Sat Mar 3 18:14:20 2007 From: reebalazs at codespeak.net (reebalazs at codespeak.net) Date: Sat, 3 Mar 2007 18:14:20 +0100 (CET) Subject: [KSS-checkins] r39832 - kukit/kss.core/trunk/kss/core/plugins/core Message-ID: <20070303171420.6B85D10060@code0.codespeak.net> Author: reebalazs Date: Sat Mar 3 18:14:19 2007 New Revision: 39832 Modified: kukit/kss.core/trunk/kss/core/plugins/core/configure.zcml Log: Add window unload event (document:unload) Modified: kukit/kss.core/trunk/kss/core/plugins/core/configure.zcml ============================================================================== --- kukit/kss.core/trunk/kss/core/plugins/core/configure.zcml (original) +++ kukit/kss.core/trunk/kss/core/plugins/core/configure.zcml Sat Mar 3 18:14:19 2007 @@ -107,6 +107,10 @@ name="spinneroff" /> + + Author: reebalazs Date: Sat Mar 3 18:15:05 2007 New Revision: 39833 Modified: kukit/kukit.js/trunk/kukit/plugin.js Log: Add window unload event (document:unload) Modified: kukit/kukit.js/trunk/kukit/plugin.js ============================================================================== --- kukit/kukit.js/trunk/kukit/plugin.js (original) +++ kukit/kukit.js/trunk/kukit/plugin.js Sat Mar 3 18:15:05 2007 @@ -66,7 +66,7 @@ kukit.pl.NativeEventBinder.prototype.__bind__node = function(name, func_to_bind, oper) { if (oper.node == null) { - throw 'Native event must be bound to a node.'; + throw 'Native event "' + name + '"must be bound to a node.'; } this.__bind__(name, func_to_bind, oper); }; @@ -78,6 +78,14 @@ this.__bind__(name, func_to_bind, oper); }; +kukit.pl.NativeEventBinder.prototype.__bind__window = function(name, func_to_bind, oper) { + if (oper.node != null) { + throw 'Native event "' + name + '"must not be bound to a node.'; + } + oper.node = window; + this.__bind__(name, func_to_bind, oper); +}; + kukit.pl.NativeEventBinder.prototype.__bind__nodeordocument = function(name, func_to_bind, oper) { if (oper.node == null) { oper.node = document; @@ -201,6 +209,7 @@ kukit.eventsGlobalRegistry.register(null, 'keydown', kukit.pl.NativeEventBinder, '__bind_key__', null); kukit.eventsGlobalRegistry.register(null, 'keypress', kukit.pl.NativeEventBinder, '__bind_key__', null); kukit.eventsGlobalRegistry.register(null, 'keyup', kukit.pl.NativeEventBinder, '__bind_key__', null); +kukit.eventsGlobalRegistry.register(null, 'unload', kukit.pl.NativeEventBinder, '__bind__window', null); /* * class TimeoutEventBinder From reebalazs at codespeak.net Sun Mar 4 16:23:08 2007 From: reebalazs at codespeak.net (reebalazs at codespeak.net) Date: Sun, 4 Mar 2007 16:23:08 +0100 (CET) Subject: [KSS-checkins] r39897 - kukit/kukit.js/trunk/kukit Message-ID: <20070304152308.31DDE10061@code0.codespeak.net> Author: reebalazs Date: Sun Mar 4 16:23:06 2007 New Revision: 39897 Modified: kukit/kukit.js/trunk/kukit/oper.js kukit/kukit.js/trunk/kukit/serveraction.js Log: Implemented the kssUrl parameter for action-server. Also change the call signature of kukit.sa.serverAction. Modified: kukit/kukit.js/trunk/kukit/oper.js ============================================================================== --- kukit/kukit.js/trunk/kukit/oper.js (original) +++ kukit/kukit.js/trunk/kukit/oper.js Sun Mar 4 16:23:06 2007 @@ -164,10 +164,18 @@ kukit.op.Oper.prototype.executeServerAction = function(name) { for (key in this.aparms) { - throw 'No kss parameter "' + key + '" allowed in action-server. (Normal parameters cannot start with kss.)'; + switch (key) { + case 'kssUrl': { + // Value will be evaluated. + } break; + default: { + throw 'No kss parameter "' + key + '" allowed in action-server. (Normal parameters cannot start with kss.)'; + } break; + } } + // oper will be accessible to some commands that execute in return - var sa = new kukit.sa.ServerAction(name, this.parms, this); + var sa = new kukit.sa.ServerAction(name, this); }; /* Helpers the serve binding */ Modified: kukit/kukit.js/trunk/kukit/serveraction.js ============================================================================== --- kukit/kukit.js/trunk/kukit/serveraction.js (original) +++ kukit/kukit.js/trunk/kukit/serveraction.js Sun Mar 4 16:23:06 2007 @@ -22,15 +22,29 @@ kukit.sa = {}; -kukit.sa.ServerAction = function(name, params, oper) { - this.url = this.calculateAbsoluteURL(name); - this.params = params; +kukit.sa.ServerAction = function(name, oper) { + this.url = oper.aparms.kssUrl; + if (typeof(this.url) == 'undefined') { + this.url = name; + } + this.url = this.calculateAbsoluteURL(this.url); this.oper = oper; this.notifyServer(); }; kukit.sa.ServerAction.prototype.calculateAbsoluteURL = function(url) { - if (url.search("http://") == 0) { + // + // If the url is an absolute path, it is used + // + // If the url is not an absolute path, it is put at the end of the context + // url. + // + // example: url='@theview/getName', + // context='http://your.site.com/portal/folder/object' + // + // result='http://your.site.com/portal/folder/object/@@theview/getName' + // + if (url.match(RegExp('/^https?:\/\//'))) { return url; } else { var result = kukit.engine.baseUrl + '/' + url; @@ -63,8 +77,8 @@ }; // convert params var query = new kukit.fo.FormQuery(); - for (var key in this.params) { - query.appendElem(key, this.params[key]); + for (var key in this.oper.parms) { + query.appendElem(key, this.oper.parms[key]); } var encoded = query.encode(); // sending form From reebalazs at codespeak.net Sun Mar 4 16:24:30 2007 From: reebalazs at codespeak.net (reebalazs at codespeak.net) Date: Sun, 4 Mar 2007 16:24:30 +0100 (CET) Subject: [KSS-checkins] r39898 - in kukit/kss.demo/trunk/kss/demo: browser browser/coresyntax tests/selenium_tests Message-ID: <20070304152430.1A08610061@code0.codespeak.net> Author: reebalazs Date: Sun Mar 4 16:24:28 2007 New Revision: 39898 Added: kukit/kss.demo/trunk/kss/demo/browser/coresyntax/azaxview.py kukit/kss.demo/trunk/kss/demo/browser/coresyntax/kss_url_param.kss kukit/kss.demo/trunk/kss/demo/browser/coresyntax/kss_url_param.pt kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/urlparam.html Modified: kukit/kss.demo/trunk/kss/demo/browser/azax_demo_index.pt kukit/kss.demo/trunk/kss/demo/browser/coresyntax/configure.zcml Log: Added demo and test for the kssUrl parameter. Modified: kukit/kss.demo/trunk/kss/demo/browser/azax_demo_index.pt ============================================================================== --- kukit/kss.demo/trunk/kss/demo/browser/azax_demo_index.pt (original) +++ kukit/kss.demo/trunk/kss/demo/browser/azax_demo_index.pt Sun Mar 4 16:24:28 2007 @@ -37,6 +37,7 @@

Core syntax



Added: kukit/kss.demo/trunk/kss/demo/browser/coresyntax/azaxview.py ============================================================================== --- (empty file) +++ kukit/kss.demo/trunk/kss/demo/browser/coresyntax/azaxview.py Sun Mar 4 16:24:28 2007 @@ -0,0 +1,34 @@ +# -*- coding: ISO-8859-15 -*- +# Copyright (c) 2005-2007 +# Authors: KSS Project Contributors (see docs/CREDITS.txt) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as published +# by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# + +from kss.core import AzaxBaseView, force_unicode, KssExplicitError, kssaction + +class AzaxView(AzaxBaseView): + + @kssaction + def urlMethod1(self): + self.getCommandSet('core').replaceInnerHTML('div#target', 'Method 1 called') + + @kssaction + def urlMethod2(self): + self.getCommandSet('core').replaceInnerHTML('div#target', 'Method 2 called') + + @kssaction + def urlMethod3(self): + self.getCommandSet('core').replaceInnerHTML('div#target', 'Method 3 called') Modified: kukit/kss.demo/trunk/kss/demo/browser/coresyntax/configure.zcml ============================================================================== --- kukit/kss.demo/trunk/kss/demo/browser/coresyntax/configure.zcml (original) +++ kukit/kss.demo/trunk/kss/demo/browser/coresyntax/configure.zcml Sun Mar 4 16:24:28 2007 @@ -3,7 +3,8 @@ i18n_domain="kss" > - + + + + + + + + + + + + + + Added: kukit/kss.demo/trunk/kss/demo/browser/coresyntax/kss_url_param.kss ============================================================================== --- (empty file) +++ kukit/kss.demo/trunk/kss/demo/browser/coresyntax/kss_url_param.kss Sun Mar 4 16:24:28 2007 @@ -0,0 +1,21 @@ + + +.clickable:click { + evt-click-preventdefault: true; +} + + +#button_1:click { + action-server: urlMethod1; +} + +#button_2:click { + action-server: urlMethodAlias; + urlMethodAlias-kssUrl: "urlMethod2"; +} + +#button_3:click { + action-server: urlMethodAnotherAlias; + urlMethodAnotherAlias-kssUrl: "@@urlMethod3/urlMethod3"; +} + Added: kukit/kss.demo/trunk/kss/demo/browser/coresyntax/kss_url_param.pt ============================================================================== --- (empty file) +++ kukit/kss.demo/trunk/kss/demo/browser/coresyntax/kss_url_param.pt Sun Mar 4 16:24:28 2007 @@ -0,0 +1,45 @@ + + + + + + + + + +

Kss url parameter demo

+
+

All buttons should display a corresponding text. +

+ +
+
+ +

+ kssUrl: "view2" +

+
+ Click the buttons here. +
+ +
+ + + +
+ +
+ + + Added: kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/urlparam.html ============================================================================== --- (empty file) +++ kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/urlparam.html Sun Mar 4 16:24:28 2007 @@ -0,0 +1,64 @@ + + + +urlparam + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
urlparam
open/demo/kss_url_param.html
clickbutton_1
waitForTextPresentMethod 1 called
verifyTextPresentMethod 1 called
clickbutton_2
waitForTextPresentMethod 2 called
verifyTextPresentMethod 2 called
clickbutton_3
waitForTextPresentMethod 3 called
verifyTextPresentMethod 3 called
+ + From reebalazs at codespeak.net Sun Mar 4 16:27:46 2007 From: reebalazs at codespeak.net (reebalazs at codespeak.net) Date: Sun, 4 Mar 2007 16:27:46 +0100 (CET) Subject: [KSS-checkins] r39901 - kukit/kukit.js/trunk/kukit Message-ID: <20070304152746.B77A410061@code0.codespeak.net> Author: reebalazs Date: Sun Mar 4 16:27:42 2007 New Revision: 39901 Modified: kukit/kukit.js/trunk/kukit/plugin.js Log: Disable the unload event as it does not work yet. Modified: kukit/kukit.js/trunk/kukit/plugin.js ============================================================================== --- kukit/kukit.js/trunk/kukit/plugin.js (original) +++ kukit/kukit.js/trunk/kukit/plugin.js Sun Mar 4 16:27:42 2007 @@ -209,7 +209,7 @@ kukit.eventsGlobalRegistry.register(null, 'keydown', kukit.pl.NativeEventBinder, '__bind_key__', null); kukit.eventsGlobalRegistry.register(null, 'keypress', kukit.pl.NativeEventBinder, '__bind_key__', null); kukit.eventsGlobalRegistry.register(null, 'keyup', kukit.pl.NativeEventBinder, '__bind_key__', null); -kukit.eventsGlobalRegistry.register(null, 'unload', kukit.pl.NativeEventBinder, '__bind__window', null); +//kukit.eventsGlobalRegistry.register(null, 'unload', kukit.pl.NativeEventBinder, '__bind__window', null); /* * class TimeoutEventBinder From reebalazs at codespeak.net Sun Mar 4 16:28:05 2007 From: reebalazs at codespeak.net (reebalazs at codespeak.net) Date: Sun, 4 Mar 2007 16:28:05 +0100 (CET) Subject: [KSS-checkins] r39902 - kukit/kss.core/trunk/kss/core/plugins/core Message-ID: <20070304152805.4E46B10061@code0.codespeak.net> Author: reebalazs Date: Sun Mar 4 16:28:03 2007 New Revision: 39902 Modified: kukit/kss.core/trunk/kss/core/plugins/core/configure.zcml Log: Disable the unload event as it does not work yet. Modified: kukit/kss.core/trunk/kss/core/plugins/core/configure.zcml ============================================================================== --- kukit/kss.core/trunk/kss/core/plugins/core/configure.zcml (original) +++ kukit/kss.core/trunk/kss/core/plugins/core/configure.zcml Sun Mar 4 16:28:03 2007 @@ -107,9 +107,11 @@ name="spinneroff" /> - + + From reebalazs at codespeak.net Sun Mar 4 16:47:00 2007 From: reebalazs at codespeak.net (reebalazs at codespeak.net) Date: Sun, 4 Mar 2007 16:47:00 +0100 (CET) Subject: [KSS-checkins] r39903 - kukit/kss.demo/trunk/kss/demo/browser/coresyntax Message-ID: <20070304154700.71E3D10060@code0.codespeak.net> Author: reebalazs Date: Sun Mar 4 16:46:58 2007 New Revision: 39903 Modified: kukit/kss.demo/trunk/kss/demo/browser/coresyntax/kss_url_param.pt Log: Make the url param demo look nicer Modified: kukit/kss.demo/trunk/kss/demo/browser/coresyntax/kss_url_param.pt ============================================================================== --- kukit/kss.demo/trunk/kss/demo/browser/coresyntax/kss_url_param.pt (original) +++ kukit/kss.demo/trunk/kss/demo/browser/coresyntax/kss_url_param.pt Sun Mar 4 16:46:58 2007 @@ -24,17 +24,48 @@

- kssUrl: "view2" +

+#button_1:click {
+    action-server: urlMethod1;
+}

- Click the buttons here. + Click the button here.
+
+ +

+

+#button_2:click {
+    action-server: urlMethodAlias;
+    urlMethodAlias-kssUrl: "urlMethod2";
+}
+

+
+ Click the button here. +
+ +
+
+ +

+

+#button_3:click {
+    action-server: urlMethodAnotherAlias;
+    urlMethodAnotherAlias-kssUrl: "@@urlMethod3/urlMethod3";
+}
+

+
+ Click the button here. +
+ +
From reebalazs at codespeak.net Sun Mar 4 19:51:02 2007 From: reebalazs at codespeak.net (reebalazs at codespeak.net) Date: Sun, 4 Mar 2007 19:51:02 +0100 (CET) Subject: [KSS-checkins] r39917 - kukit/kukit.js/trunk/kukit Message-ID: <20070304185102.4777F10060@code0.codespeak.net> Author: reebalazs Date: Sun Mar 4 19:51:00 2007 New Revision: 39917 Modified: kukit/kukit.js/trunk/kukit/oper.js Log: Add logging for client actions Modified: kukit/kukit.js/trunk/kukit/oper.js ============================================================================== --- kukit/kukit.js/trunk/kukit/oper.js (original) +++ kukit/kukit.js/trunk/kukit/oper.js Sun Mar 4 19:51:00 2007 @@ -124,6 +124,13 @@ } // // XXX TODO refactor this with commands execution (or the other way) + var nodetext = function(node) { + if (node) { + return node.tagName.toLowerCase(); + } else { + return 'DOCUMENT'; + } + }; var executeActions = kukit.actionsGlobalRegistry.get(name); if (nodes != null) { kukit.logDebug('action Selector type selected nodes:' + nodes.length); @@ -134,10 +141,12 @@ this.node = nodes[i]; //XXX error handling for wrong command name //kukit.logDebug('action Name: ' + this.name); + kukit.logDebug('action Name: ' + name + ' executing on target (' + (i+1) + '/' + nodes.length + '): ' + nodetext(this.node)); executeActions(this); } } else { // single node + kukit.logDebug('action Name: ' + name + ' executing on single target ' + nodetext(node)); executeActions(this); } }; From reebalazs at codespeak.net Sun Mar 4 21:07:19 2007 From: reebalazs at codespeak.net (reebalazs at codespeak.net) Date: Sun, 4 Mar 2007 21:07:19 +0100 (CET) Subject: [KSS-checkins] r39920 - kukit/kss.core/trunk/docs Message-ID: <20070304200719.DB31D10060@code0.codespeak.net> Author: reebalazs Date: Sun Mar 4 21:07:15 2007 New Revision: 39920 Modified: kukit/kss.core/trunk/docs/HISTORY.txt Log: Update documentation Modified: kukit/kss.core/trunk/docs/HISTORY.txt ============================================================================== --- kukit/kss.core/trunk/docs/HISTORY.txt (original) +++ kukit/kss.core/trunk/docs/HISTORY.txt Sun Mar 4 21:07:15 2007 @@ -6,6 +6,11 @@ - ... +kss.core - 1.2-beta1 + + - Prepare for release + [ree] + kss.core - 1.2-alpha2 - Merge in Philikon's refactorization From reebalazs at codespeak.net Sun Mar 4 21:08:09 2007 From: reebalazs at codespeak.net (reebalazs at codespeak.net) Date: Sun, 4 Mar 2007 21:08:09 +0100 (CET) Subject: [KSS-checkins] r39921 - kukit/kukit.js/tag/1.2-beta1 Message-ID: <20070304200809.2EA7910063@code0.codespeak.net> Author: reebalazs Date: Sun Mar 4 21:08:07 2007 New Revision: 39921 Added: kukit/kukit.js/tag/1.2-beta1/ - copied from r39920, kukit/kukit.js/trunk/ Log: Tagging release From reebalazs at codespeak.net Sun Mar 4 21:21:30 2007 From: reebalazs at codespeak.net (reebalazs at codespeak.net) Date: Sun, 4 Mar 2007 21:21:30 +0100 (CET) Subject: [KSS-checkins] r39922 - kukit/kss.core/tag/1.2-beta1 Message-ID: <20070304202130.92DE410063@code0.codespeak.net> Author: reebalazs Date: Sun Mar 4 21:21:27 2007 New Revision: 39922 Added: kukit/kss.core/tag/1.2-beta1/ - copied from r39921, kukit/kss.core/trunk/ Log: Tagging for release From reebalazs at codespeak.net Sun Mar 4 21:27:43 2007 From: reebalazs at codespeak.net (reebalazs at codespeak.net) Date: Sun, 4 Mar 2007 21:27:43 +0100 (CET) Subject: [KSS-checkins] r39924 - in kukit/kss.core/tag/1.2-beta1: . kss/core Message-ID: <20070304202743.54C6D10061@code0.codespeak.net> Author: reebalazs Date: Sun Mar 4 21:27:41 2007 New Revision: 39924 Removed: kukit/kss.core/tag/1.2-beta1/setup.cfg Modified: kukit/kss.core/tag/1.2-beta1/kss/core/ (props changed) kukit/kss.core/tag/1.2-beta1/kss/core/EXTERNALS.TXT kukit/kss.core/tag/1.2-beta1/kss/core/version.txt kukit/kss.core/tag/1.2-beta1/setup.py Log: Setting release Modified: kukit/kss.core/tag/1.2-beta1/kss/core/EXTERNALS.TXT ============================================================================== --- kukit/kss.core/tag/1.2-beta1/kss/core/EXTERNALS.TXT (original) +++ kukit/kss.core/tag/1.2-beta1/kss/core/EXTERNALS.TXT Sun Mar 4 21:27:41 2007 @@ -5,4 +5,4 @@ # You can update your working dir by: # svn propset svn:externals -F EXTERNALS.TXT . # -kukit http://codespeak.net/svn/kukit/kukit.js/trunk +kukit http://codespeak.net/svn/kukit/kukit.js/tag/1.2-beta1 Modified: kukit/kss.core/tag/1.2-beta1/kss/core/version.txt ============================================================================== --- kukit/kss.core/tag/1.2-beta1/kss/core/version.txt (original) +++ kukit/kss.core/tag/1.2-beta1/kss/core/version.txt Sun Mar 4 21:27:41 2007 @@ -1 +1 @@ -1.2dev unreleased +1.2-beta1 Released 2007-03-04 Deleted: /kukit/kss.core/tag/1.2-beta1/setup.cfg ============================================================================== --- /kukit/kss.core/tag/1.2-beta1/setup.cfg Sun Mar 4 21:27:41 2007 +++ (empty file) @@ -1,3 +0,0 @@ -[egg_info] -tag_build = dev -tag_svn_revision = true Modified: kukit/kss.core/tag/1.2-beta1/setup.py ============================================================================== --- kukit/kss.core/tag/1.2-beta1/setup.py (original) +++ kukit/kss.core/tag/1.2-beta1/setup.py Sun Mar 4 21:27:41 2007 @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import sys, os -version = '1.2' +version = '1.2-beta1' setup(name='kss.core', version=version, From reebalazs at codespeak.net Sun Mar 4 21:28:28 2007 From: reebalazs at codespeak.net (reebalazs at codespeak.net) Date: Sun, 4 Mar 2007 21:28:28 +0100 (CET) Subject: [KSS-checkins] r39925 - kukit/kukit.js/tag/1.2-beta1 Message-ID: <20070304202828.559AE10061@code0.codespeak.net> Author: reebalazs Date: Sun Mar 4 21:28:27 2007 New Revision: 39925 Modified: kukit/kukit.js/tag/1.2-beta1/version.txt Log: Setting release Modified: kukit/kukit.js/tag/1.2-beta1/version.txt ============================================================================== --- kukit/kukit.js/tag/1.2-beta1/version.txt (original) +++ kukit/kukit.js/tag/1.2-beta1/version.txt Sun Mar 4 21:28:27 2007 @@ -1 +1 @@ -1.2dev unreleased +1.2-beta1 Released 2007-03-04 From reebalazs at codespeak.net Sun Mar 4 21:49:43 2007 From: reebalazs at codespeak.net (reebalazs at codespeak.net) Date: Sun, 4 Mar 2007 21:49:43 +0100 (CET) Subject: [KSS-checkins] r39927 - kukit/kss.demo/trunk/docs Message-ID: <20070304204943.51B1410060@code0.codespeak.net> Author: reebalazs Date: Sun Mar 4 21:49:41 2007 New Revision: 39927 Modified: kukit/kss.demo/trunk/docs/HISTORY.txt Log: Prepare for release Modified: kukit/kss.demo/trunk/docs/HISTORY.txt ============================================================================== --- kukit/kss.demo/trunk/docs/HISTORY.txt (original) +++ kukit/kss.demo/trunk/docs/HISTORY.txt Sun Mar 4 21:49:41 2007 @@ -6,6 +6,11 @@ - ... +kss.demo - 1.2-beta1 Released 2007-03-04 + + - Prepare for release + [ree] + kss.demo - 1.2-alpha2 Unreleased - Preparation for release From reebalazs at codespeak.net Sun Mar 4 21:50:22 2007 From: reebalazs at codespeak.net (reebalazs at codespeak.net) Date: Sun, 4 Mar 2007 21:50:22 +0100 (CET) Subject: [KSS-checkins] r39928 - kukit/kss.demo/tag/1.2-beta1 Message-ID: <20070304205022.3F9BB10060@code0.codespeak.net> Author: reebalazs Date: Sun Mar 4 21:50:20 2007 New Revision: 39928 Added: kukit/kss.demo/tag/1.2-beta1/ - copied from r39927, kukit/kss.demo/trunk/ Log: Tag for release From reebalazs at codespeak.net Sun Mar 4 21:55:20 2007 From: reebalazs at codespeak.net (reebalazs at codespeak.net) Date: Sun, 4 Mar 2007 21:55:20 +0100 (CET) Subject: [KSS-checkins] r39929 - in kukit/kss.demo/tag/1.2-beta1: . kss/demo Message-ID: <20070304205520.0D8B210060@code0.codespeak.net> Author: reebalazs Date: Sun Mar 4 21:55:19 2007 New Revision: 39929 Removed: kukit/kss.demo/tag/1.2-beta1/setup.cfg Modified: kukit/kss.demo/tag/1.2-beta1/kss/demo/version.txt kukit/kss.demo/tag/1.2-beta1/setup.py Log: Setting release Modified: kukit/kss.demo/tag/1.2-beta1/kss/demo/version.txt ============================================================================== --- kukit/kss.demo/tag/1.2-beta1/kss/demo/version.txt (original) +++ kukit/kss.demo/tag/1.2-beta1/kss/demo/version.txt Sun Mar 4 21:55:19 2007 @@ -1 +1 @@ -1.2dev Unreleased +1.2beta1 Released 2007-03-04 Deleted: /kukit/kss.demo/tag/1.2-beta1/setup.cfg ============================================================================== --- /kukit/kss.demo/tag/1.2-beta1/setup.cfg Sun Mar 4 21:55:19 2007 +++ (empty file) @@ -1,3 +0,0 @@ -[egg_info] -tag_build = dev -tag_svn_revision = true Modified: kukit/kss.demo/tag/1.2-beta1/setup.py ============================================================================== --- kukit/kss.demo/tag/1.2-beta1/setup.py (original) +++ kukit/kss.demo/tag/1.2-beta1/setup.py Sun Mar 4 21:55:19 2007 @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import sys, os -version = '1.2' +version = '1.2-beta1' setup(name='kss.demo', version=version, @@ -26,12 +26,11 @@ zip_safe=False, install_requires=[ # -*- Extra requirements: -*- - 'kss.core>=dev', + 'kss.core>=1.2-beta1', ], entry_points=""" # -*- Entry points: -*- """, dependency_links=[ - 'https://codespeak.net/svn/kukit/kss.core/trunk#egg=kss.core-dev', ], ) From gotcha at codespeak.net Mon Mar 12 13:07:41 2007 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Mon, 12 Mar 2007 13:07:41 +0100 (CET) Subject: [KSS-checkins] r40309 - in kukit/kukit.js/trunk: doc kukit Message-ID: <20070312120741.21F181008E@code0.codespeak.net> Author: gotcha Date: Mon Mar 12 13:07:39 2007 New Revision: 40309 Modified: kukit/kukit.js/trunk/doc/CREDITS.txt kukit/kukit.js/trunk/kukit/dom.js kukit/kukit.js/trunk/kukit/forms.js kukit/kukit.js/trunk/kukit/oper.js kukit/kukit.js/trunk/kukit/plugin.js Log: add 'focus' action; credits Modified: kukit/kukit.js/trunk/doc/CREDITS.txt ============================================================================== --- kukit/kukit.js/trunk/doc/CREDITS.txt (original) +++ kukit/kukit.js/trunk/doc/CREDITS.txt Mon Mar 12 13:07:39 2007 @@ -1,4 +1,5 @@ -Florian Schulze (florian.schulze at gmx.net) Godefroid Chapelle (gotcha at bubbblenet.be) -Tarek Zyade (tziade at nuxeo.com) +Tarek Ziade (ziade.tarek at gmail.com) +Florian Schulze (florian.schulze at gmx.net) Balazs Ree (ree at greenfinity.hu) +Jeroen Vloothuis (jeroen.vloothuis at xs4all.nl) Modified: kukit/kukit.js/trunk/kukit/dom.js ============================================================================== --- kukit/kukit.js/trunk/kukit/dom.js (original) +++ kukit/kukit.js/trunk/kukit/dom.js Mon Mar 12 13:07:39 2007 @@ -137,6 +137,16 @@ return result; }; +kukit.dom.focus = function(node) { + tagName = node.tagName.toLowerCase(); + if ((tagName == 'input') || (tagName == 'select') || (tagName == 'textarea')) { + node.focus(); + } + else { + kukit.logWarning('Focus on node that cannot have focus !'); + }; +} + /* * Gets the textual content of the node * if recursive=false (default), does not descend into sub nodes Modified: kukit/kukit.js/trunk/kukit/forms.js ============================================================================== --- kukit/kukit.js/trunk/kukit/forms.js (original) +++ kukit/kukit.js/trunk/kukit/forms.js Mon Mar 12 13:07:39 2007 @@ -128,9 +128,6 @@ if (value == "") value = option.text; } - } else if (element.type == "checkbox") { - value = element.checked; - } else if (typeof element.length != 'undefined' && typeof element.item != 'undefined' && element.item(0).type == "radio") { var radioList = element; value = null; @@ -140,8 +137,7 @@ value = radio.value; } } - } else if (element.type == "radio") { - // for stupid people that use a single radio button + } else if (element.type == "radio" || element.type == "checkbox") { if (element.checked) { value = element.value; } else { Modified: kukit/kukit.js/trunk/kukit/oper.js ============================================================================== --- kukit/kukit.js/trunk/kukit/oper.js (original) +++ kukit/kukit.js/trunk/kukit/oper.js Mon Mar 12 13:07:39 2007 @@ -146,7 +146,7 @@ } } else { // single node - kukit.logDebug('action Name: ' + name + ' executing on single target ' + nodetext(node)); + kukit.logDebug('action Name: ' + name + ' executing on single target ' + nodetext(this.node)); executeActions(this); } }; Modified: kukit/kukit.js/trunk/kukit/plugin.js ============================================================================== --- kukit/kukit.js/trunk/kukit/plugin.js (original) +++ kukit/kukit.js/trunk/kukit/plugin.js Mon Mar 12 13:07:39 2007 @@ -569,6 +569,13 @@ }); kukit.commandsGlobalRegistry.registerFromAction('clearChildNodes', kukit.cr.makeSelectorCommand); +kukit.actionsGlobalRegistry.register('focus', function(oper) { + // TODO get rid of none + oper.completeParms([], {'none': false}, 'focus action'); + kukit.dom.focus(oper.node); +}); +kukit.commandsGlobalRegistry.registerFromAction('focus', kukit.cr.makeSelectorCommand); + kukit.actionsGlobalRegistry.register('moveNodeAfter', function(oper) { oper.completeParms(['html_id'], {}, 'moveNodeAfter action'); var node = oper.node; From gotcha at codespeak.net Mon Mar 12 13:09:53 2007 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Mon, 12 Mar 2007 13:09:53 +0100 (CET) Subject: [KSS-checkins] r40311 - in kukit/kss.demo/trunk/kss/demo: browser browser/commandaction browser/coreplugin browser/parameterfunction tests/selenium_tests Message-ID: <20070312120953.D62221008E@code0.codespeak.net> Author: gotcha Date: Mon Mar 12 13:09:49 2007 New Revision: 40311 Added: kukit/kss.demo/trunk/kss/demo/browser/commandaction/ kukit/kss.demo/trunk/kss/demo/browser/commandaction/__init__.py kukit/kss.demo/trunk/kss/demo/browser/commandaction/actions.kss - copied unchanged from r40167, kukit/kss.demo/trunk/kss/demo/browser/coreplugin/coreplugin.kss kukit/kss.demo/trunk/kss/demo/browser/commandaction/actions.pt - copied, changed from r40167, kukit/kss.demo/trunk/kss/demo/browser/coreplugin/coreplugin.pt kukit/kss.demo/trunk/kss/demo/browser/commandaction/configure.zcml kukit/kss.demo/trunk/kss/demo/browser/commandaction/focus.kss kukit/kss.demo/trunk/kss/demo/browser/commandaction/focus.pt kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/actions.html - copied, changed from r40167, kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/coreplugin.html kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/ca_focus.html Removed: kukit/kss.demo/trunk/kss/demo/browser/coreplugin/ kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/coreplugin.html Modified: kukit/kss.demo/trunk/kss/demo/browser/azax_demo_index.pt kukit/kss.demo/trunk/kss/demo/browser/configure.zcml kukit/kss.demo/trunk/kss/demo/browser/demo.css kukit/kss.demo/trunk/kss/demo/browser/parameterfunction/forms.pt Log: * tests for focus action * moved test for toggle class action Modified: kukit/kss.demo/trunk/kss/demo/browser/azax_demo_index.pt ============================================================================== --- kukit/kss.demo/trunk/kss/demo/browser/azax_demo_index.pt (original) +++ kukit/kss.demo/trunk/kss/demo/browser/azax_demo_index.pt Mon Mar 12 13:09:49 2007 @@ -26,10 +26,6 @@ -

Core plugins

-

Selectors

+

Commands/Actions

+ +

Unit tests

Added: kukit/kss.demo/trunk/kss/demo/browser/commandaction/__init__.py ============================================================================== Copied: kukit/kss.demo/trunk/kss/demo/browser/commandaction/actions.pt (from r40167, kukit/kss.demo/trunk/kss/demo/browser/coreplugin/coreplugin.pt) ============================================================================== --- kukit/kss.demo/trunk/kss/demo/browser/coreplugin/coreplugin.pt (original) +++ kukit/kss.demo/trunk/kss/demo/browser/commandaction/actions.pt Mon Mar 12 13:09:49 2007 @@ -2,7 +2,7 @@ + string:${context/@@absolute_url}/++resource++actions.kss"/> @@ -27,7 +26,8 @@ Toggling the class means adding or removing it. Click the button to toggle class on (it will highlight the button). Click it again to toggle class off (it will remove highlighting). Added: kukit/kss.demo/trunk/kss/demo/browser/commandaction/commandaction.py ============================================================================== --- (empty file) +++ kukit/kss.demo/trunk/kss/demo/browser/commandaction/commandaction.py Mon Mar 12 13:59:08 2007 @@ -0,0 +1,11 @@ +from kss.core import KSSView + +class ActionsView(KSSView): + + def toggleClass(self): + self.getCommandSet('core').toggleClass('#toggleclass-button', 'selected') + return self.render() + + def focus(self, id): + self.getCommandSet('core').focus('#' + id) + return self.render() Modified: kukit/kss.demo/trunk/kss/demo/browser/commandaction/configure.zcml ============================================================================== --- kukit/kss.demo/trunk/kss/demo/browser/commandaction/configure.zcml (original) +++ kukit/kss.demo/trunk/kss/demo/browser/commandaction/configure.zcml Mon Mar 12 13:59:08 2007 @@ -17,6 +17,14 @@ + + + + Modified: kukit/kss.demo/trunk/kss/demo/browser/commandaction/focus.kss ============================================================================== --- kukit/kss.demo/trunk/kss/demo/browser/commandaction/focus.kss (original) +++ kukit/kss.demo/trunk/kss/demo/browser/commandaction/focus.kss Mon Mar 12 13:59:08 2007 @@ -35,3 +35,28 @@ executeCommand-selector: "#checkbox-1"; } +#server-focus-to-text:click { + action-server: focus; + focus-id: "text"; +} + +#server-focus-to-textarea:click { + action-server: focus; + focus-id: "textarea"; +} + +#server-focus-to-select:click { + action-server: focus; + focus-id: "select"; +} + +#server-focus-to-radio:click { + action-server: focus; + focus-id: "radio-1"; +} + +#server-focus-to-checkbox:click { + action-server: focus; + focus-id: "checkbox-1"; +} + Modified: kukit/kss.demo/trunk/kss/demo/browser/commandaction/focus.pt ============================================================================== --- kukit/kss.demo/trunk/kss/demo/browser/commandaction/focus.pt (original) +++ kukit/kss.demo/trunk/kss/demo/browser/commandaction/focus.pt Mon Mar 12 13:59:08 2007 @@ -25,11 +25,12 @@ Focus to input type="text".
- Click the button to set focus to the input. + Click the buttons to set focus to the input.
@@ -38,11 +39,12 @@ Focus to textarea.
- Click the button to set focus to the textarea. + Click the buttons to set focus to the textarea.
@@ -50,11 +52,12 @@ Focus to select.
- Click the button to set focus to the select. + Click the buttons to set focus to the select.
- Click me ! + Click me ! + Click me ! @@ -81,11 +85,12 @@ Focus to input type="checkbox".
- Click the button to set focus to the checkbox. + Click the buttons to set focus to the checkbox.
- Click me ! + Click me ! + Click me ! Modified: kukit/kss.demo/trunk/kss/demo/browser/demo.css ============================================================================== --- kukit/kss.demo/trunk/kss/demo/browser/demo.css (original) +++ kukit/kss.demo/trunk/kss/demo/browser/demo.css Mon Mar 12 13:59:08 2007 @@ -61,6 +61,7 @@ padding: 0.2em; border: 1px solid #FF8888; color: #CC0000; + text-decoration: none; } fieldset { Modified: kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/actions.html ============================================================================== --- kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/actions.html (original) +++ kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/actions.html Mon Mar 12 13:59:08 2007 @@ -39,6 +39,41 @@ button click cursorPointer + + assertAttribute + server-toggleclass-button at class + button click cursorPointer + + + click + server-toggleclass-button + + + + waitForAttribute + server-toggleclass-button at class + button click cursorPointer selected + + + assertAttribute + server-toggleclass-button at class + button click cursorPointer selected + + + click + server-toggleclass-button + + + + waitForAttribute + server-toggleclass-button at class + button click cursorPointer + + + assertAttribute + server-toggleclass-button at class + button click cursorPointer + Modified: kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/ca_focus.html ============================================================================== --- kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/ca_focus.html (original) +++ kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/ca_focus.html Mon Mar 12 13:59:08 2007 @@ -93,6 +93,81 @@ Focus on checkbox-1. + + click + server-focus-to-text + + + + waitForTextPresent + Focus on text. + + + + assertTextPresent + Focus on text. + + + + click + server-focus-to-textarea + + + + waitForTextPresent + Focus on textarea. + + + + assertTextPresent + Focus on textarea. + + + + click + server-focus-to-select + + + + waitForTextPresent + Focus on select. + + + + assertTextPresent + Focus on select. + + + + click + server-focus-to-radio + + + + waitForTextPresent + Focus on radio-1. + + + + assertTextPresent + Focus on radio-1. + + + + click + server-focus-to-checkbox + + + + waitForTextPresent + Focus on checkbox-1. + + + + assertTextPresent + Focus on checkbox-1. + + From gotcha at codespeak.net Mon Mar 12 14:33:02 2007 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Mon, 12 Mar 2007 14:33:02 +0100 (CET) Subject: [KSS-checkins] r40339 - in kukit/kss.demo/trunk/kss/demo: browser browser/coresyntax tests/selenium_tests Message-ID: <20070312133302.D5B9710092@code0.codespeak.net> Author: gotcha Date: Mon Mar 12 14:33:00 2007 New Revision: 40339 Modified: kukit/kss.demo/trunk/kss/demo/browser/coresyntax/kss_url_param.kss kukit/kss.demo/trunk/kss/demo/browser/coresyntax/kss_url_param.pt kukit/kss.demo/trunk/kss/demo/browser/demo.css kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/urlparam.html Log: fix and beautify kssUrl test Modified: kukit/kss.demo/trunk/kss/demo/browser/coresyntax/kss_url_param.kss ============================================================================== --- kukit/kss.demo/trunk/kss/demo/browser/coresyntax/kss_url_param.kss (original) +++ kukit/kss.demo/trunk/kss/demo/browser/coresyntax/kss_url_param.kss Mon Mar 12 14:33:00 2007 @@ -1,6 +1,6 @@ -.clickable:click { +.click:click { evt-click-preventdefault: true; } Modified: kukit/kss.demo/trunk/kss/demo/browser/coresyntax/kss_url_param.pt ============================================================================== --- kukit/kss.demo/trunk/kss/demo/browser/coresyntax/kss_url_param.pt (original) +++ kukit/kss.demo/trunk/kss/demo/browser/coresyntax/kss_url_param.pt Mon Mar 12 14:33:00 2007 @@ -15,60 +15,46 @@
-

Kss url parameter demo

+

Kss url parameter

-

All buttons should display a corresponding text. -

+

Click on buttons will call server-side. Each button exercise a different syntax to express which URL to call. Server will update the div hereunder with corresponding text.

-
-
+
Target
-

-

-#button_1:click {
-    action-server: urlMethod1;
-}
-

-
- Click the button here. -
- -
- -
- -

-

-#button_2:click {
+      

Relative URL

+
+ Click the button; it will call urlMethod1 on the server. +
#button_1:click 
+  action-server: urlMethod1;
+}
+ + + +

Alias URL

+
+ Click the button; it will call urlMethod2 on the server. +
#button_2:click {
     action-server: urlMethodAlias;
     urlMethodAlias-kssUrl: "urlMethod2";
-}
-

-
- Click the button here. -
- -
- -
- -

-

-#button_3:click {
+}

+ + + +

Alias URL with @@

+
+ Click the button; it will call @@urlMethod3/urlMethod3 on the server. +
#button_3:click {
     action-server: urlMethodAnotherAlias;
     urlMethodAnotherAlias-kssUrl: "@@urlMethod3/urlMethod3";
-}
- -
- Click the button here. -
- -
- -
+}
+ + Modified: kukit/kss.demo/trunk/kss/demo/browser/demo.css ============================================================================== --- kukit/kss.demo/trunk/kss/demo/browser/demo.css (original) +++ kukit/kss.demo/trunk/kss/demo/browser/demo.css Mon Mar 12 14:33:00 2007 @@ -77,6 +77,14 @@ color: #AAAAAA; } +.help pre { + color: black; + border: 1px solid #CCCCCC; + background-color: #EEEEEE; + padding: 0.5em; + margin: 0.25em; +} + .container { padding : 1em; } Modified: kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/urlparam.html ============================================================================== --- kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/urlparam.html (original) +++ kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/urlparam.html Mon Mar 12 14:33:00 2007 @@ -14,6 +14,11 @@ + assertElementPresent + target + + + click button_1 From gotcha at codespeak.net Mon Mar 12 14:36:10 2007 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Mon, 12 Mar 2007 14:36:10 +0100 (CET) Subject: [KSS-checkins] r40341 - kukit/kss.demo/trunk/kss/demo/tests/selenium_tests Message-ID: <20070312133610.CB4F810092@code0.codespeak.net> Author: gotcha Date: Mon Mar 12 14:36:09 2007 New Revision: 40341 Modified: kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/seleniumtestcase.py Log: add missing part to API Modified: kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/seleniumtestcase.py ============================================================================== --- kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/seleniumtestcase.py (original) +++ kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/seleniumtestcase.py Mon Mar 12 14:36:09 2007 @@ -75,6 +75,10 @@ def waitForValue(self, target, value): self.failUnless(self.selenium.get_value(target)) + @trymanytimes + def waitForAttribute(self, target, value): + self.assertEqual(self.selenium.get_attribute(target), value) + def assertText(self, target, text=''): self.assertEqual(self.selenium.get_text(target), text) From gotcha at codespeak.net Mon Mar 12 15:06:51 2007 From: gotcha at codespeak.net (gotcha at codespeak.net) Date: Mon, 12 Mar 2007 15:06:51 +0100 (CET) Subject: [KSS-checkins] r40345 - kukit/kss.demo/trunk/kss/demo/tests/selenium_tests Message-ID: <20070312140651.BA58B10095@code0.codespeak.net> Author: gotcha Date: Mon Mar 12 15:06:50 2007 New Revision: 40345 Modified: kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/urlparam.html Log: do not use verify methods of Selenium API; they are not supported by Selenium RC Python implementation Modified: kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/urlparam.html ============================================================================== --- kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/urlparam.html (original) +++ kukit/kss.demo/trunk/kss/demo/tests/selenium_tests/urlparam.html Mon Mar 12 15:06:50 2007 @@ -29,7 +29,7 @@ - verifyTextPresent + assertTextPresent Method 1 called @@ -44,7 +44,7 @@ - verifyTextPresent + assertTextPresent Method 2 called @@ -59,7 +59,7 @@ - verifyTextPresent + assertTextPresent Method 3 called From reebalazs at codespeak.net Sat Mar 17 12:36:59 2007 From: reebalazs at codespeak.net (reebalazs at codespeak.net) Date: Sat, 17 Mar 2007 12:36:59 +0100 (CET) Subject: [KSS-checkins] r40631 - kukit/kukit.js/trunk/kukit Message-ID: <20070317113659.1F1B71007A@code0.codespeak.net> Author: reebalazs Date: Sat Mar 17 12:36:56 2007 New Revision: 40631 Modified: kukit/kukit.js/trunk/kukit/serveraction.js Log: Replace 'invalid KSS payload' error message woth something more descriptive. Modified: kukit/kukit.js/trunk/kukit/serveraction.js ============================================================================== --- kukit/kukit.js/trunk/kukit/serveraction.js (original) +++ kukit/kukit.js/trunk/kukit/serveraction.js Sat Mar 17 12:36:56 2007 @@ -161,10 +161,11 @@ // Check if there was a parsing error in the xml, and log it as reported from the dom // Opera <= 8.5 does not have the parseError attribute, so check for it first dom = domDoc.responseXML; + var errtxt = 'Unknown server error (invalid KSS response, no error info received)'; if (dom && dom.parseError && (dom.parseError != 0)) { - throw new kukit.err.ResponseParsingError('KSS payload not found: ' + Sarissa.getParseErrorText(dom)); + throw new kukit.err.ResponseParsingError(errtxt + ': ' + Sarissa.getParseErrorText(dom)); } else { - throw new kukit.err.ResponseParsingError('KSS payload not found'); + throw new kukit.err.ResponseParsingError(errtxt); } } } From jvloothuis at codespeak.net Sat Mar 24 11:13:28 2007 From: jvloothuis at codespeak.net (jvloothuis at codespeak.net) Date: Sat, 24 Mar 2007 11:13:28 +0100 (CET) Subject: [KSS-checkins] r41227 - kukit/kss.core/trunk/kss/core/plugins/core Message-ID: <20070324101328.5104E10071@code0.codespeak.net> Author: jvloothuis Date: Sat Mar 24 11:13:26 2007 New Revision: 41227 Modified: kukit/kss.core/trunk/kss/core/plugins/core/commands.py Log: Changed implementation to match the interface, thanks ??? Modified: kukit/kss.core/trunk/kss/core/plugins/core/commands.py ============================================================================== --- kukit/kss.core/trunk/kss/core/plugins/core/commands.py (original) +++ kukit/kss.core/trunk/kss/core/plugins/core/commands.py Sat Mar 24 11:13:26 2007 @@ -22,8 +22,8 @@ def getSameNodeSelector(self, selector): return SameNodeSelector(selector) - def getParentNodeSelector(self): - return ParentNodeSelector() + def getParentNodeSelector(self, selector): + return ParentNodeSelector(selector) # XXX the list is not full: maybe complete them? From reebalazs at codespeak.net Tue Mar 27 22:48:46 2007 From: reebalazs at codespeak.net (reebalazs at codespeak.net) Date: Tue, 27 Mar 2007 22:48:46 +0200 (CEST) Subject: [KSS-checkins] r41551 - kukit/kss.demo/trunk/kss/demo/browser Message-ID: <20070327204846.4EF6F1007B@code0.codespeak.net> Author: reebalazs Date: Tue Mar 27 22:48:45 2007 New Revision: 41551 Modified: kukit/kss.demo/trunk/kss/demo/browser/azax_tree.pt Log: The identifier of the class encoding of kss atrs has changed from 'kukit' to 'kssattr'. Modified: kukit/kss.demo/trunk/kss/demo/browser/azax_tree.pt ============================================================================== --- kukit/kss.demo/trunk/kss/demo/browser/azax_tree.pt (original) +++ kukit/kss.demo/trunk/kss/demo/browser/azax_tree.pt Tue Mar 27 22:48:45 2007 @@ -1,6 +1,6 @@ -