From gotcha at codespeak.net Wed Dec 17 18:48:22 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Wed, 17 Dec 2008 18:48:22 +0100 (CET)
Subject: [KSS-checkins] r60551 -
kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit
Message-ID: <20081217174822.1B2241684B6@codespeak.net>
Author: gotcha
Date: Wed Dec 17 18:48:21 2008
New Revision: 60551
Modified:
kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/commandreg.js
kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/registries.js
Log:
remove last reference to schema
Modified: kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/commandreg.js
==============================================================================
--- kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/commandreg.js (original)
+++ kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/commandreg.js Wed Dec 17 18:48:21 2008
@@ -62,7 +62,7 @@
};
this.register = function(name, commandClass) {
- var actions = kukit.plugins.schema.actions;
+ var actions = kukit.plugins.actions;
var attrib = actions.getItemFactory(name);
this._register(name, commandClass, attrib);
};
Modified: kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/registries.js
==============================================================================
--- kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/registries.js (original)
+++ kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/registries.js Wed Dec 17 18:48:21 2008
@@ -28,20 +28,17 @@
* The order in which they are loaded is irrelevant, provided they
* load after registries.js.
*
- * Managing the schema
- * -------------------
+ * Managing the registrar
+ * ----------------------
*
* When various javascript code is loaded, it can set up the
- * schema for the registry it handles. For example, during the
+ * registrar for the registry it handles. For example, during the
* loading of javascript, plugin code set up its registry, other code
* sets up services it provides or depends on.
*
* The registries are managed by name in a collection of registries.
- * Before accessing the schema of any registry, it needs to
+ * Before accessing the registrar of any registry, it needs to
* be initialized at one of the names registries object.
- * This may be happen several times, but at
- * least once it has been done before the schema is looked up from
- * code.
*
* This is the only dependency what we have for the order of the code.
* Ewerywhere else, order is independent. This means that if all
@@ -50,25 +47,9 @@
* case of the plugins), then the order of these javascripts is
* arbitrary for registries to work.
*
- * In the initialization the registry name and the item factory
- * need to be supplied as parameters.
- *
- * registries.initializeRegistry('myregistry', MyFactoryClass);
- *
- * After this the registrar object can be looked up with:
- *
- * var registrar = registries.schema.myregistry;
- *
- * Or the schema of an attribute can be looked up, and various methods
- * can be called on it. This depends on what the attribute class
- * actually implements.
- *
- * var factory = registries.schema.myregistry.getItemFactory('mykey');
- * factory.doWhateverTheFactoryImplements(blah);
- *
* This concludes everything we can do, before binding the registry.
* Binding freezes the factorization of items in the registrar and
- * allows its direct use, without the schema. For the binding, a
+ * allows its direct use. For the binding, a
* singleton registry object has to be provided. The items are
* bound on this registry.
*
From gotcha at codespeak.net Thu Dec 18 13:27:10 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Thu, 18 Dec 2008 13:27:10 +0100 (CET)
Subject: [KSS-checkins] r60564 - in
kukit/kukit.js/branch/gotcha-simplify-service-layer:
3rd_party doc kukit
Message-ID: <20081218122710.5D6B7168005@codespeak.net>
Author: gotcha
Date: Thu Dec 18 13:27:08 2008
New Revision: 60564
Added:
kukit/kukit.js/branch/gotcha-simplify-service-layer/3rd_party/base2-dom-fp-20080312.js
- copied unchanged from r60551, kukit/kukit.js/trunk/3rd_party/base2-dom-fp-20080312.js
kukit/kukit.js/branch/gotcha-simplify-service-layer/3rd_party/base2-dom-fp.js
- copied unchanged from r60551, kukit/kukit.js/trunk/3rd_party/base2-dom-fp.js
Modified:
kukit/kukit.js/branch/gotcha-simplify-service-layer/3rd_party/cssQuery-compat.js
kukit/kukit.js/branch/gotcha-simplify-service-layer/3rd_party/sarissa.js
kukit/kukit.js/branch/gotcha-simplify-service-layer/doc/HISTORY.txt
kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/actionreg.js
kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/dom.js
kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/errors.js
kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/forms.js
kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/kssparser.js
kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/oper.js
kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/plugin.js
kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/serveraction.js
kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/tokenizer.js
kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/utils.js
Log:
trunk changes : merge -r 53859:60016 http://codespeak.net/svn/kukit/kukit.js/trunk
Modified: kukit/kukit.js/branch/gotcha-simplify-service-layer/3rd_party/cssQuery-compat.js
==============================================================================
--- kukit/kukit.js/branch/gotcha-simplify-service-layer/3rd_party/cssQuery-compat.js (original)
+++ kukit/kukit.js/branch/gotcha-simplify-service-layer/3rd_party/cssQuery-compat.js Thu Dec 18 13:27:08 2008
@@ -5,24 +5,49 @@
* want to use cssQuery.
*
* When both cssQuery and base2 are present, this code does nothing.
- * When cssQuery is missing, this code defines a compatibility cssQuery
- * function that actually reuses base2 for querying.
+ * When cssQuery is missing at the time this code is loaded,
+ * it defines a compatibility cssQuery function that actually reuses
+ * base2 for querying.
*
*/
+// Check that cssQuery is missing originally.
+// If it is present, do not redefine it.
if (typeof(window.cssQuery) == 'undefined') {
// Define the compatibility layer.
- window.cssQuery = function(selector, element) {
- if (typeof(element) == 'undefined') {
- // if parameter is not given, we need to use document.
- element = document;
+ window.cssQuery = function _cssQueryStub(selector, element) {
+ // This stub checks which base2 api to use.
+ // It only runs once and also returns the result.
+ //
+ // Base2 legacy version: matchAll has to be used
+ // Base2 recent version: querySelectorAll has to be used
+ var _USE_BASE2_LEGACY = (typeof(base2.DOM.Document.querySelectorAll) == 'undefined');
+ var f;
+ if (! _USE_BASE2_LEGACY) {
+ f = function(selector, element) {
+ return base2.DOM.Document.querySelectorAll(element, selector);
+ };
+ } else {
+ f = function(selector, element) {
+ return base2.DOM.Document.matchAll(element, selector);
+ };
}
- var results = base2.DOM.Document.matchAll(element, selector);
- var nodes = [];
- for(var i = 0; i < results.length; i++) {
- nodes.push(results.item(i));
- }
- return nodes;
+ // redefine the function with its final version
+ window.cssQuery = function cssQuery(selector, element) {
+ if (typeof(element) == 'undefined') {
+ // if parameter is not given, we need to use document.
+ element = document;
+ }
+ var results = f(selector, element);
+ var nodes = [];
+ for(var i = 0; i < results.length; i++) {
+ nodes.push(results.item(i));
+ }
+ return nodes;
+ };
+ // since we are in the stub, we need to use
+ // the newly redefined function
+ return window.cssQuery(selector, element);
};
};
Modified: kukit/kukit.js/branch/gotcha-simplify-service-layer/3rd_party/sarissa.js
==============================================================================
--- kukit/kukit.js/branch/gotcha-simplify-service-layer/3rd_party/sarissa.js (original)
+++ kukit/kukit.js/branch/gotcha-simplify-service-layer/3rd_party/sarissa.js Thu Dec 18 13:27:08 2008
@@ -10,13 +10,8 @@
* ====================================================================
* Licence
* ====================================================================
- * Sarissa is free software distributed under the GNU GPL version 2 (see gpl.txt) or higher,
- * GNU LGPL version 2.1 (see lgpl.txt) or higher and Apache Software License 2.0 or higher
- * (see asl.txt). This means you can choose one of the three and use that if you like. If
- * you make modifications under the ASL, i would appreciate it if you submitted those.
- * In case your copy of Sarissa does not include the license texts, you may find
- * them online in various formats at http://www.gnu.org and
- * http://www.apache.org.
+ * Sarissa is free software distributed under the GNU GPL version 2
+ * Other licenses are also available, see http://dev.abiss.gr/sarissa/
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
* KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE
Modified: kukit/kukit.js/branch/gotcha-simplify-service-layer/doc/HISTORY.txt
==============================================================================
--- kukit/kukit.js/branch/gotcha-simplify-service-layer/doc/HISTORY.txt (original)
+++ kukit/kukit.js/branch/gotcha-simplify-service-layer/doc/HISTORY.txt Thu Dec 18 13:27:08 2008
@@ -6,7 +6,12 @@
- ...
- - Add global registries.
+MISSING, PLEASE MERGE! - Add improved demos
+ (insertions in tbody is not included : that demo is
+ still broken in IE6)
+ [gotcha]
+
+ - Add a general registry for interfaces.
Add service layers.
@@ -43,14 +48,47 @@
two places and considered as two broken selectors.
[ree]
-
- - refactor the value provider registry to use
+ - Refactor the value provider registry to use
a single registry in place of 3.
This will enable to define value
providers that recieve non-string parameters
like a node selection.
[ree]
+ - Fix or improve calculateAbsoluteURL to handle absolute
+ and relative urls correctly, as well as get rid of the
+ double slash (//) issue.
+ It also satisfies the tests kss_url_param and
+ kss_url_param_multiprop, that now work as intended,
+ with previous workaround removed.
+ [ree]
+
+ - Replaced license header of third-party sarissa.js
+ to workaround the license detection of ohloh.
+ sarissa.js is redistributed under GNU GPL v2
+ as previously.
+ [ree]
+
+ - Fix cssQuery-compat.js to use newest base2 api.
+ [ree]
+
+ - Fix a typo that caused an exception instead of
+ logging an error message, this happened when
+ an action was regitered twice with the same name.
+ [ree]
+
+kukit.js - 1.4 Released 2008-04-21
+
+ - Updated base2-dom-fp.js with newest version.
+ [ree]
+
+ - fix setKssAttribute action and command
+ (closes bug 8048 from plone.org)
+ [gotcha]
+
+ - fix action-cancel
+ [gotcha]
+
- disabled input values should not be submitted with the form
[gotcha]
@@ -58,8 +96,6 @@
This fixes breakage on FireFox 3.
[ree]
-kukit.js - 1.4dev Unreleased
-
- Remove previously deprecated form() and
currentForm() value providers from normal
action parameters (remark: they should
@@ -83,11 +119,6 @@
- Fix multiple selection form fields marshalling on Safari
(fixes #22 in kssproject) and on IE.
-
- - Fix multiple selection form fields
- marshalling on Safari
- (fixes #22 in kssproject)
- and on IE.
[ree]
- Fix error fallback handling
Modified: kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/actionreg.js
==============================================================================
--- kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/actionreg.js (original)
+++ kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/actionreg.js Thu Dec 18 13:27:08 2008
@@ -34,7 +34,7 @@
;;; if (typeof(func) == 'undefined') {
;;; kukit.e = '[func] argument is mandatory when registering an action';
;;; kukit.e += ' [ActionRegistry.register].';
-;;; throw new Error(kukit.E);
+;;; throw new Error(kukit.e);
;;; }
var actions = kukit.registrars.actions;
actions.getItemFactory(name).register({actionFunc: func});
Modified: kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/dom.js
==============================================================================
--- kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/dom.js (original)
+++ kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/dom.js Thu Dec 18 13:27:08 2008
@@ -269,7 +269,7 @@
dom.setKssAttribute = function(node, attrname, value) {
// Sets a given kss attribute on the namespace
var fullName = _kssAttrNamespace + ':' + attrname;
- dom.setAttribute(node, fullName);
+ dom.setAttribute(node, fullName, value);
};
/*
@@ -358,7 +358,7 @@
function(node, attrname, recurseParents, getter) {
return dom.locateMarkup(node,
recurseParents, getter, attrname).value;
-}
+};
/*
* From http://xkr.us/articles/dom/iframe-document/
Modified: kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/errors.js
==============================================================================
--- kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/errors.js (original)
+++ kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/errors.js Thu Dec 18 13:27:08 2008
@@ -224,7 +224,7 @@
;;; // this error protects and annotates all errors that
;;; // happen during KssRuleProcessor.parse.
;;; err.kssParsingError = function(e, url){
-;;; var kw = {url: url}
+;;; var kw = {url: url};
;;; var message = 'Error parsing KSS at ' + url;
;;; return setErrorInfo(e, 'KssParsingError', message, kw);
;;; };
Modified: kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/forms.js
==============================================================================
--- kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/forms.js (original)
+++ kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/forms.js Thu Dec 18 13:27:08 2008
@@ -132,7 +132,7 @@
this.initialize = function(target) {
this.target = target;
-}
+};
this.queryForm = function() {
// Find the form that contains the target node.
Modified: kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/kssparser.js
==============================================================================
--- kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/kssparser.js (original)
+++ kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/kssparser.js Thu Dec 18 13:27:08 2008
@@ -324,7 +324,7 @@
;;; }
// set it
var action = this.actions.getOrCreateAction(value.txt, valuesByReturnType);
- if (actionType == 'X' && action.type == null) {
+ if (actionType == 'X' && action.type != null) {
// action-cancel, and the action existed already in the same block:
// we delete it straight ahead
this.actions.deleteAction(value.txt);
@@ -512,7 +512,7 @@
this.process = function() {
// For multivalue only
- this.values = []
+ this.values = [];
// Parse all tokens (including first and last)
var context = {'nextTokenIndex': 0};
this.txt = '';
@@ -944,10 +944,10 @@
return new kssp.MethodArgs(this.cursor, kssp.openParent)
},
"'": function() {
- return new kssp.StringInSelector(this.cursor, kssp.quote)
+ return new kssp.StringInSelector(this.cursor, kssp.quote);
},
'"': function() {
- return new kssp.String2InSelector(this.cursor, kssp.dquote)
+ return new kssp.String2InSelector(this.cursor, kssp.dquote);
},
",": _mkReturnToken(kssp.comma),
"{": _emitAndReturn,
@@ -1115,7 +1115,7 @@
kssp.KssSelector = kukit.tk.mkParser('kssselector', {
":": function() {
return [new kssp.colon(this.cursor),
- new kssp.EventValue(this.cursor)]
+ new kssp.EventValue(this.cursor)];
},
"{": _emitAndReturn,
"\/\*": _returnComment
Modified: kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/oper.js
==============================================================================
--- kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/oper.js (original)
+++ kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/oper.js Thu Dec 18 13:27:08 2008
@@ -254,7 +254,7 @@
if (this.eventRule) {
// if it has actions, the answer is yes
if (this.eventRule.actions.hasActions())
- return true
+ return true;
// if we have a default action, we will return true in any case
// because we may want to call it.
// The reason for this check is, that a default action is also
Modified: kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/plugin.js
==============================================================================
--- kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/plugin.js (original)
+++ kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/plugin.js Thu Dec 18 13:27:08 2008
@@ -1013,11 +1013,11 @@
}
}
if (parms.allnodes) {
- binder.__continueEvent_allNodes__(parms.name,
+ binder.continueEventAllNodes(parms.name,
actionParameters);
} else {
// execution happens on the orignode
- binder.__continueEvent__(parms.name, oper.orignode,
+ binder.continueEvent(parms.name, oper.orignode,
actionParameters);
}
});
Modified: kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/serveraction.js
==============================================================================
--- kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/serveraction.js (original)
+++ kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/serveraction.js Thu Dec 18 13:27:08 2008
@@ -63,24 +63,40 @@
this.notifyServer();
};
+/*
+ * calculateAbsoluteURL
+ *
+ * Makes absolute site url
+ * - if starts with http:// https:// : no change
+ * - if starts with /: interprets absolute from domain
+ * - otherwise: relative to current context
+ */
this.calculateAbsoluteURL = function(url) {
- //
- // 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?:\/\//'))) {
+ // XXX packer breaks on following regexp constant,
+ // so it must be quoted
+ if (url.match(RegExp("/^https?:\/\//"))) {
+ // absolute already
return url;
- } else {
- var result = kukit.engine.baseUrl + url;
- return result;
}
+ var absoluteMatch = url.match(RegExp(/^(\/)(.*)/));
+ var path = kukit.engine.baseUrl;
+ if (absoluteMatch) {
+ // relative to domain
+ var base = path.match(RegExp(/^(.*:\/\/[^\/]*)(\/?)/))[1];
+ // base is like: http://foo.bar without trailing /
+ url = base + url;
+ return url;
+ }
+ // final case: relative to current url
+ // (paranoia: add an / to the path *only* if it is
+ // *not* there)
+ // XXX packer breaks on following
+ // regexp constant, so it must be quoted
+ if (! path.match(RegExp("/$"))) {
+ path += '/';
+ }
+ url = path + url;
+ return url;
};
// Backparameters can be used on command execution.
@@ -135,8 +151,8 @@
};
this.notifyServer_done = function(domDoc) {
-;;; var msg = 'Request readyState = ' + domDoc.readyState + '.';
-;;; kukit.logDebug(msg);
+//;;; var msg = 'Request readyState = ' + domDoc.readyState + '.';
+//;;; kukit.logDebug(msg);
if (domDoc.readyState == 4) {
// notify the queue that we are done
var success = this.oper.queueItem.receivedResult();
@@ -288,7 +304,8 @@
;;; }
throw kukit.err.responseParsingError(kukit.E);
}
- }
+ };
+
if (dom == null) {
// this should not happen
;;; kukit.E = 'Neither xml nor html payload.';
Modified: kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/tokenizer.js
==============================================================================
--- kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/tokenizer.js (original)
+++ kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/tokenizer.js Thu Dec 18 13:27:08 2008
@@ -73,7 +73,7 @@
};
this.nextStep = function() {
- var table = this.table
+ var table = this.table;
var cursor = this.cursor;
// Search for symbol according to table.
var best_pos = cursor.text.length;
@@ -245,7 +245,7 @@
tk.mkParser = function(symbol, table, _class) {
// Poor man's subclassing.
f = function(cursor, tokenClass, isTopLevelParser) {
- this.table = table
+ this.table = table;
this.cursor = cursor;
this.startpos = cursor.pos;
this.finished = false;
Modified: kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/utils.js
==============================================================================
--- kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/utils.js (original)
+++ kukit/kukit.js/branch/gotcha-simplify-service-layer/kukit/utils.js Thu Dec 18 13:27:08 2008
@@ -54,7 +54,7 @@
try {
kukit.HAVE_SAFARI = navigator.vendor &&
navigator.vendor.indexOf('Apple') != -1;
- kukit.HAVE_IE = eval("_SARISSA_IS_IE");
+ kukit.HAVE_IE = eval("_SARISSA_IS_IE");
} catch (e) {}
;;; // Activation of extra logging panel: if necessary
@@ -82,7 +82,7 @@
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
}
return null;
-}
+};
// a null function that is used for logging
kukit._null = function() {};
@@ -162,7 +162,7 @@
;;; kukit.dom.createCookie(kukit._COOKIE_LOGLEVEL, level);
;;; // re-establish the log handlers, based on this cookie setting
;;; kukit._logger.updateLogLevel();
-}
+};
// We want a way of knowing if Firebug is available :
// it is very convenient to log a node in Firebug;
@@ -192,7 +192,7 @@
;;; this.logWarning = console.warn;
;;; this.logError = console.error;
;;; this.logFatal = console.error;
-;;; }
+;;; };
;;; }
;;; // check whether the logging stuff of MochiKit is available
@@ -211,7 +211,7 @@
;;; this.logWarning = MochiKit.Logging.logWarning;
;;; this.logError = MochiKit.Logging.logError;
;;; this.logFatal = MochiKit.Logging.logFatal;
-;;; }
+;;; };
;;; // make convenience url
;;; // javascript:kukit.showLog();
;;; // instead of the need to say
@@ -236,7 +236,7 @@
;;; this.logWarning = function(str) { console.log('WARNING: '+str); };
;;; this.logError = function(str) { console.log('ERROR: '+str); };
;;; this.logFatal = function(str) { console.log('FATAL: '+str); };
-;;; }
+;;; };
;;; }
// Initialize the logger with the solution we've just detected
From gotcha at codespeak.net Thu Dec 18 13:27:35 2008
From: gotcha at codespeak.net (gotcha at codespeak.net)
Date: Thu, 18 Dec 2008 13:27:35 +0100 (CET)
Subject: [KSS-checkins] r60565 - in
kukit/kss.core/branch/ree-service-layer-and-refactoring: .
docs kss/core/pluginregistry kss/core/pluginregistry/deprecated
kss/core/pluginregistry/json kss/core/plugins/core
kss/core/plugins/core/demo kss/core/plugins/core/demo/commandaction
kss/core/plugins/core/demo/coresyntax
kss/core/plugins/core/demo/selenium_tests
Message-ID: <20081218122735.600191683D1@codespeak.net>
Author: gotcha
Date: Thu Dec 18 13:27:34 2008
New Revision: 60565
Added:
kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/INTRO.txt
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/cancel.kss
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/cancel.pt
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/kssattr.kss
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/kssattr.pt
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/selenium_tests/ca_cancel.html
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/selenium_tests/ca_kssattr.html
Removed:
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/pluginregistry/deprecated/
Modified:
kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/HISTORY.txt
kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/NEWS.txt
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/pluginregistry/json/utils.py
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/pluginregistry/meta.zcml
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/commands.py
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/commandaction.py
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/commandaction/configure.zcml
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/config.py
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/configure.zcml
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/coresyntax/kss_url_param.kss
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/coresyntax/kss_url_param.pt
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/coresyntax/kss_url_param_multiprop.kss
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/coresyntax/kss_url_param_multiprop.pt
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/demoview.py
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/protocol.kss
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/protocol.pt
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/selenium_tests/protocol.html
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/demo/zopeconfig.py
kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/plugins/core/interfaces.py
kukit/kss.core/branch/ree-service-layer-and-refactoring/setup.py
Log:
trunk changes : merge -r 53859:60016 http://codespeak.net/svn/kukit/kss.core/trunk
Modified: kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/HISTORY.txt
==============================================================================
--- kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/HISTORY.txt (original)
+++ kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/HISTORY.txt Thu Dec 18 13:27:34 2008
@@ -4,7 +4,52 @@
kss.core - 1.5dev Unreleased
- - ...
+ - Fix or improve calculateAbsoluteURL to handle absolute
+ and relative urls correctly, as well as get rid of the
+ double slash (//) issue.
+ It also satisfies the tests kss_url_param and
+ kss_url_param_multiprop, that now work as intended,
+ with previous workaround removed.
+ [ree]
+
+ - Use the real request in the json logic so skin layers, request parmeters,
+ etc. are available.
+ [wichert]
+
+ - Replaced license header of third-party sarissa.js
+ to workaround the license detection of ohloh.
+ sarissa.js is redistributed under GNU GPL v2
+ as previously.
+ [ree]
+
+ - Fix cssQuery-compat.js to use newest base2 api.
+ [ree]
+
+ - Fix a typo that caused an exception instead of
+ logging an error message, this happened when
+ an action was regitered twice with the same name.
+ [ree]
+
+kss.core - 1.4 Released 2008-04-21
+
+MISSING, PLEASE MERGE! - Add improved demos
+ (insertions in tbody is not included : that demo is
+ still broken in IE6)
+ [gotcha]
+
+ - Updated base2-dom-fp.js with newest version.
+ [ree]
+
+ - Change concatresource to accept resources with
+ "application/x-javascript" content type only
+ [ree]
+
+ - fix setKssAttribute action and command
+ (closes bug 8048 from plone.org)
+ [gotcha]
+
+ - fix action-cancel
+ [gotcha]
- Updated base2-don-fp.js with newest version.
This fixes breakage on FireFox 3.
Added: kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/INTRO.txt
==============================================================================
--- (empty file)
+++ kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/INTRO.txt Thu Dec 18 13:27:34 2008
@@ -0,0 +1,44 @@
+
+***********************************
+Kinetic Style Sheets (KSS) kss.core
+***********************************
+
+KSS is an Ajax framework that allows UI development without writing any
+Javascript. It uses style sheets with CSS-compliant syntax to declare and bind
+dynamic behaviors in the browser. The engine supports a set of generic DOM-like
+commands; they are computed on the server and sent back to manipulate the HTML
+page.
+
+What is KSS?
+************
+
+KSS is an AJAX framework. KSS has both a client-side Javascript library and
+server-side support.
+
+The client-side Javascript library needs to be included in your page. It
+fetches Kinetic style sheets from the server, parses them and binds a set of
+action to browser events and/or page elements. It is clean Javascript code that
+can peacefully coexist with other clean Javascript librarys like JQuery or
+ExtJS. It is about 100k in production mode. You can integrate your own
+Javascript code by using its extension mechanism through plugins.
+
+Server-side code is currently available for Zope (2 and 3, which includes
+Plone). The kss.base egg (which is currently in alpha) brings server-side
+support to other pythonic platforms, such as:
+
+* pylons
+* django
+* grok
+
+The Javascript client-side code can be used independently of existing
+server-side support. In other words, it is usable on platforms where we have
+not built server-side support like PHP, Ruby or Java. (If you have interest in
+porting KSS to the server environment you use and need help, please contact us
+!)
+
+Homepage
+***********
+
+More information and documentation can be found on the
+`KSS project homepage `_.
+
Modified: kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/NEWS.txt
==============================================================================
--- kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/NEWS.txt (original)
+++ kukit/kss.core/branch/ree-service-layer-and-refactoring/docs/NEWS.txt Thu Dec 18 13:27:34 2008
@@ -1,4 +1,72 @@
+Deprecated in kss 1.4
+---------------------
+
+form() and currentForm() in normal value providers
+""""""""""""""""""""""""""""""""""""""""""""""""""
+
+currentForm()
+'''''''''''''
+
+
+You must change rules that use currentForm() in a normal value provider::
+
+ action-server: myServerAction;
+ myServerAction-data: currentForm();
+
+to::
+
+ action-server: myServerAction currentForm();
+
+Or, if you want to keep compatibility with kss 1.2::
+
+ action-server: myServerAction;
+ myServerAction-kssSubmitForm: currentForm();
+
+
+form()
+''''''
+
+Similarly, for form(), you must change the following::
+
+ action-server: myServerAction;
+ myServerAction-data: form();
+
+to::
+
+ action-server: myServerAction form();
+
+Or, if you want to keep compatibility with kss 1.2::
+
+ action-server: myServerAction;
+ myServerAction-kssSubmitForm: form();
+
+
+Necessary server side changes
+'''''''''''''''''''''''''''''
+
+On the server side, the method that received the form as a dictionary in one
+parameter, must define the values directly in the method signature, or access
+them from the form directly.
+
+So the following old code::
+
+ def method(self, data):
+ field1 = data['field1']
+ field2 = data.get('field2', None)
+
+must be changed in one of the two ways shown in the following examples::
+
+ def method(self, field1, field2=None):
+ ...
+
+An alternate way is to get them from the request::
+
+ def method(self):
+ request = self.request
+ field1 = request.form['field1']
+ field2 = request.form.get('field2', None)
+
New in kss 1.4
--------------
@@ -9,6 +77,8 @@
and the core plugin, are added. All are checkable from a single click
from any browser.
+- New and improved demos
+
- Base2 is used for css selection, instead of the original cssQuery (if
present). Significantly faster page load.
@@ -95,10 +165,14 @@
- Implement loglevels based on cookies (also backported to 1.2.)
-- Other fixes (also backported to 1.2)::
+- Other fixes (also backported to 1.2):
- Fix error fallback handling
- Fix multiple selection form fields marshalling on Safari and IE
+ - Fix setKssAttribute action and command
+
+ - fix action-cancel
+
Modified: kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/pluginregistry/json/utils.py
==============================================================================
--- kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/pluginregistry/json/utils.py (original)
+++ kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/pluginregistry/json/utils.py Thu Dec 18 13:27:34 2008
@@ -5,7 +5,6 @@
import os.path, logging
import zope.component as capi
from zope.interface import implements, Interface
-from zope.publisher.browser import TestRequest
from interfaces import IJSONStreamWriteable
logger = logging.getLogger('kss.core')
@@ -14,19 +13,21 @@
'Gets the addon javascript files for json'
files = []
# Try adding the jsonserver files
- request = TestRequest()
- try:
- # use the files already registered to that concat resource
- jsonrpc = capi.getAdapter(request, Interface, 'jsonrpc.js')
- except capi.ComponentLookupError:
- pass # JSON not present.
- else:
- # JSON present.
- files.extend(jsonrpc.context.context.getPathList())
- # add the json kukit support file
- plugins_dir = os.path.split(globals()['__file__'])[0]
- files.append(os.path.join(plugins_dir, 'browser', 'jsonkukit.js'))
- logger.info('Lazy plugin construction: Installed support for JSON-RPC transport.')
+ request = getattr(capi.getSiteManager(), 'REQUEST', None)
+
+ if request is not None:
+ try:
+ # use the files already registered to that concat resource
+ jsonrpc = capi.getAdapter(request, Interface, 'jsonrpc.js')
+ except capi.ComponentLookupError:
+ pass # JSON not present.
+ else:
+ # JSON present.
+ files.extend(jsonrpc.context.context.getPathList())
+ # add the json kukit support file
+ plugins_dir = os.path.split(globals()['__file__'])[0]
+ files.append(os.path.join(plugins_dir, 'browser', 'jsonkukit.js'))
+ logger.info('Lazy plugin construction: Installed support for JSON-RPC transport.')
return files
class JsonCommandView(object):
Modified: kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/pluginregistry/meta.zcml
==============================================================================
--- kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/pluginregistry/meta.zcml (original)
+++ kukit/kss.core/branch/ree-service-layer-and-refactoring/kss/core/pluginregistry/meta.zcml Thu Dec 18 13:27:34 2008
@@ -4,9 +4,6 @@
-
-
-
+
+
+
+
+
+
+
+
+
+ header
+
+ action-cancel
+
+
+
+
+
+ logger
+
+