>>=== modified file 'examples/inlineeditor/index.html' >>--- examples/inlineeditor/index.html   2009-10-21 17:35:08.000000000 -0500 >>-    // Add the 2 second delay to the underlying editor widget. >>-    multiline_text.editor.plug({fn:DelayedSavePlugin}); > > Why was this removed? Uhm, that's something that came from Maris' branch. Since it doesn't make sense to me either, re-adding it. >>+    // XXX remove this when done writing the *error CSS stuff. >>+    // editor.editor.showError("Empty text is unacceptable!"); >>+    // editor.show_editor(); > > Why were these comments added? Same as above. Since it doesn't make sense to me, removing it. >>=== modified file 'widgets.conf' >>--- widgets.conf       2009-10-20 13:11:56 +0000 >>+++ widgets.conf       2009-10-21 22:29:49 +0000 >>@@ -5,37 +5,53 @@ > > > How is this file generated? There appear to be a bunch of diffs > from entries just moving to different spots. If this is generated by > a script, it would be nice to have it sort the list, so that future > diffs show only real changes. It's manually generated, though it would make sense to have a script generate it. I will keep that in mind for the future. In the meantime, I've sorted the file. As for the long-lines and indentation, all fixed. I also changed the Picker widget to use the AOP approach like was done for FormOverlay, and all tests pass. Incremental diff below. === modified file 'examples/inlineeditor/index.html' --- examples/inlineeditor/index.html 2009-09-01 02:14:14 +0000 +++ examples/inlineeditor/index.html 2009-10-22 18:37:47 +0000 @@ -421,9 +421,8 @@ }); multiline_text.render(); - // XXX remove this when done writing the *error CSS stuff. - // editor.editor.showError("Empty text is unacceptable!"); - // editor.show_editor(); + // Add the 2 second delay to the underlying editor widget. + multiline_text.editor.plug({fn:DelayedSavePlugin}); }); === modified file 'src-js/lazrjs/choiceedit/tests/choiceedit.js' --- src-js/lazrjs/choiceedit/tests/choiceedit.js 2009-10-21 21:43:07 +0000 +++ src-js/lazrjs/choiceedit/tests/choiceedit.js 2009-10-22 18:37:47 +0000 @@ -4,7 +4,8 @@ base: '../../yui/current/build/', filter: 'raw', combine: false - }).use('lazr.choiceedit', 'lazr.testing.runner', 'node', 'event', 'widget-stack', 'console', function(Y) { + }).use('lazr.choiceedit', 'lazr.testing.runner', 'node', + 'event', 'widget-stack', 'console', function(Y) { // Local aliases var Assert = Y.Assert, === modified file 'src-js/lazrjs/formoverlay/tests/formoverlay.js' --- src-js/lazrjs/formoverlay/tests/formoverlay.js 2009-10-21 21:43:07 +0000 +++ src-js/lazrjs/formoverlay/tests/formoverlay.js 2009-10-22 18:37:47 +0000 @@ -75,28 +75,19 @@ cleanup_form_overlay(overlay); }, - // This fails because YUI adds an extra div for some reason. - // If and when this is fixed, and this passes, we'll need to - // update test_form_content_in_bodyContent below. - // _should: { - // fail: {test_bodyContent_is_single_node: true} - // }, - - test_bodyContent_is_single_node: function() { + test_body_content_is_single_node: function() { Assert.areEqual( 1, this.form_overlay.getStdModNode("body").size(), - "The bodyContent should be a single node, not a node list."); + "The body content should be a single node, not a node list."); }, - test_form_content_in_bodyContent: function() { + test_form_content_in_body_content: function() { // The form_content should be included in the body of the // overlay during initialization. var body_content = this.form_overlay.getStdModNode("body"); // Ensure the body_content contains our form node. - // Note: see failing test_bodyContent_is_single_node above for why - // an index is used here. Assert.isTrue( body_content.contains(this.form_overlay.form_node), "The form node is part of the body content."); @@ -137,19 +128,16 @@ this.wait(5000); }, - test_form_submit_in_bodyContent: function() { - // The bodyContent should include the submit button. - + test_form_submit_in_body_content: function() { + // The body content should include the submit button. var body_content = this.form_overlay.getStdModNode("body"); - // Note: see failing test_bodyContent_is_single_node above for why - // an index is used here. Assert.isTrue( body_content.contains( this.form_overlay.get("form_submit_button")), - "The bodyContent includes the form_submit_button."); + "The body content includes the form_submit_button."); }, - test_users_submit_button_in_bodyContent: function() { + test_users_submit_button_in_body_content: function() { // If a user supplies a custom submit button, it should be included // in the form instead of the default one. var submit_button = Y.Node.create( @@ -169,19 +157,16 @@ cleanup_form_overlay(form_overlay); }, - test_form_cancel_in_bodyContent: function() { - // The bodyContent should include the cancel button. - + test_form_cancel_in_body_content: function() { + // The body content should include the cancel button. var body_content = this.form_overlay.getStdModNode("body"); - // Note: see failing test_bodyContent_is_single_node above for why - // an index is used here. Assert.isTrue( body_content.contains( this.form_overlay.get("form_cancel_button")), - "The bodyContent includes the form_cancel_button."); + "The body content includes the form_cancel_button."); }, - test_users_cancel_button_in_bodyContent: function() { + test_users_cancel_button_in_body_content: function() { // If a user supplies a custom cancel button, it should be included // in the form instead of the default one. var cancel_button = Y.Node.create( @@ -225,8 +210,6 @@ this.form_overlay.showError("My special error"); var body_content = this.form_overlay.getStdModNode("body"); - // Note: see failing test_bodyContent_is_single_node above for why - // an index is used here. Assert.areNotEqual( body_content.get("innerHTML").search("My special error"), -1, @@ -240,8 +223,6 @@ this.form_overlay.showError("

My special error

"); var body_content = this.form_overlay.getStdModNode("body"); - // Note: see failing test_bodyContent_is_single_node above for why - // an index is used here. Assert.areEqual( -1, body_content.get("innerHTML").search("

"), === modified file 'src-js/lazrjs/overlay/tests/overlay.js' --- src-js/lazrjs/overlay/tests/overlay.js 2009-10-21 21:43:07 +0000 +++ src-js/lazrjs/overlay/tests/overlay.js 2009-10-22 18:37:47 +0000 @@ -4,7 +4,8 @@ base: '../../yui/current/build/', filter: 'raw', combine: false - }).use('lazr.overlay', 'lazr.testing.runner', 'node', 'event', 'widget-stack', 'console', function(Y) { + }).use('lazr.overlay', 'lazr.testing.runner', 'node', + 'event', 'widget-stack', 'console', function(Y) { // KeyCode for escape var ESCAPE = 27; === modified file 'src-js/lazrjs/picker/picker.js' --- src-js/lazrjs/picker/picker.js 2009-10-21 18:07:07 +0000 +++ src-js/lazrjs/picker/picker.js 2009-10-22 18:37:47 +0000 @@ -54,10 +54,18 @@ FOOTER_SLOT = 'footer_slot', SELECTED_BATCH = 'selected_batch', SEARCH_MODE = 'search_mode', - NO_RESULTS_SEARCH_MESSAGE = 'no_results_search_message'; + NO_RESULTS_SEARCH_MESSAGE = 'no_results_search_message', + RENDERUI = "renderUI", + BINDUI = "bindUI", + SYNCUI = "syncUI"; + var Picker = function () { Picker.superclass.constructor.apply(this, arguments); + + Y.after(this._renderUIPicker, this, RENDERUI); + Y.after(this._bindUIPicker, this, BINDUI); + Y.after(this._syncUIPicker, this, BINDUI); }; Y.extend(Picker, Y.lazr.PrettyOverlay, { @@ -377,12 +385,15 @@ /** * Create the widget's HTML components. + *

+ * This method is invoked after renderUI is invoked for the Widget class + * using YUI's aop infrastructure. + *

* - * @method renderUI + * @method _renderUIPicker * @protected */ - renderUI: function() { - Picker.superclass.renderUI.apply(this, arguments); + _renderUIPicker: function() { this._search_button = Y.Node.create(Y.lazr.ui.SEARCH_BUTTON); var search_box = Y.Node.create([ @@ -415,26 +426,27 @@ this._footer_slot_box = Y.Node.create('
'); body.appendChild(search_box); body.appendChild(this._batches_box); body.appendChild(this._results_box); body.appendChild(this._footer_slot_box); body.addClass('yui-widget-bd'); - this.get(CONTENT_BOX).appendChild(body); + + this.setStdModContent(Y.WidgetStdMod.BODY, body, Y.WidgetStdMod.APPEND); }, /** * Bind the widget's DOM elements to their event handlers. + *

+ * This method is invoked after renderUI is invoked for the Widget class + * using YUI's aop infrastructure. + *

* - * @method bindUI + * @method _bindUIPicker * @protected */ - bindUI: function() { - Picker.superclass.bindUI.apply(this, arguments); - + _bindUIPicker: function() { Y.on('click', this._defaultSearchUserAction, this._search_button, this); @@ -521,12 +533,15 @@ /** * Synchronize the search box, error message and results with the UI. + *

+ * This method is invoked after renderUI is invoked for the Widget class + * using YUI's aop infrastructure. + *

* - * @method syncUI + * @method _syncUIPicker * @protected */ - syncUI: function() { - Picker.superclass.syncUI.apply(this, arguments); + _syncUIPicker: function() { this._syncResultsUI(); this._syncSearchModeUI(); this._syncBatchesUI(); @@ -737,8 +752,7 @@ Y.Picker = Picker; -}, '0.1', { - requires: [ - 'oop', 'event', 'event-focus', 'node', 'substitute', - 'lazr.overlay', 'lazr.anim', 'lazr.base'] +}, '0.1', {requires: ['oop', 'event', 'event-focus', 'node', + 'substitute', 'widget', 'widget-stdmod', + 'lazr.overlay', 'lazr.anim', 'lazr.base'] }); === modified file 'src-js/lazrjs/testing/testing.js' --- src-js/lazrjs/testing/testing.js 2009-10-21 21:43:07 +0000 +++ src-js/lazrjs/testing/testing.js 2009-10-22 18:46:48 +0000 @@ -41,7 +41,8 @@ // a clone of the original TestCase but with only the // single test method that we are interested in. for (var prop in testCase){ - if (prop.indexOf("test") === 0 && Y.Lang.isFunction(testCase[prop])){ + if (prop.indexOf("test") === 0 && + Y.Lang.isFunction(testCase[prop])){ tests.push({"suiteName": suiteName, "caseName": testCaseName, "case": clone, @@ -71,14 +72,15 @@ fakeTestCase[testObject["methodName"]] = Y.bind(function (testObject) { var results = []; - var onComplete = function (testCaseName, testMethodName, results, event) { + var onComplete = function (caseName, methodName, results, e) { Y.Test.Runner.unsubscribe("testsuitecomplete"); - results.push(event.results[testCaseName][testMethodName]); + results.push(e.results[caseName][methodName]); }; Y.Test.Runner.subscribe( "testsuitecomplete", - Y.bind(onComplete, this, testObject["caseName"], testObject["methodName"], results), + Y.bind(onComplete, this, testObject["caseName"], + testObject["methodName"], results), Y.Test.Runner); Clock.reset(); @@ -98,7 +100,8 @@ }, this, testObject); - TestCase(testObject["caseName"] + "." + testObject["methodName"], fakeTestCase); + TestCase(testObject["caseName"] + "." + testObject["methodName"], + fakeTestCase); } } }; === modified file 'widgets.conf' --- widgets.conf 2009-10-22 14:12:59 +0000 +++ widgets.conf 2009-10-22 14:46:35 +0000 @@ -10,48 +10,48 @@ - src-js/lazrjs/testing/jsUnitMockTimeout.js - src-js/lazrjs/yui/current/build/yui/yui.js - patch src-js/lazrjs/testing/yui-patch.js - - src-js/lazrjs/yui/current/build/oop/oop.js + - src-js/lazrjs/yui/current/build/anim/anim-easing.js - src-js/lazrjs/yui/current/build/anim/anim.js - - src-js/lazrjs/yui/current/build/anim/anim-easing.js - - src-js/lazrjs/yui/current/build/substitute/substitute.js - - src-js/lazrjs/yui/current/build/classnamemanager/classnamemanager.js - - src-js/lazrjs/yui/current/build/dom/dom.js - - src-js/lazrjs/yui/current/build/json/json.js - - src-js/lazrjs/yui/current/build/event-custom/event-custom.js - - src-js/lazrjs/yui/current/build/event/event.js - - src-js/lazrjs/yui/current/build/event-simulate/event-simulate.js - - src-js/lazrjs/yui/current/build/pluginhost/pluginhost.js + - src-js/lazrjs/yui/current/build/async-queue/async-queue.js - src-js/lazrjs/yui/current/build/attribute/attribute.js - src-js/lazrjs/yui/current/build/base/base.js - - src-js/lazrjs/yui/current/build/plugin/plugin.js - - src-js/lazrjs/yui/current/build/widget/widget.js - - src-js/lazrjs/yui/current/build/widget/widget-position.js - - src-js/lazrjs/yui/current/build/widget/widget-stack.js - - src-js/lazrjs/yui/current/build/widget/widget-position-ext.js - - src-js/lazrjs/yui/current/build/widget/widget-stdmod.js - - src-js/lazrjs/yui/current/build/node/node.js - - src-js/lazrjs/yui/current/build/node/node-event-simulate.js - - src-js/lazrjs/yui/current/build/node-focusmanager/node-focusmanager.js - - src-js/lazrjs/yui/current/build/node-menunav/node-menunav.js - - src-js/lazrjs/yui/current/build/overlay/overlay.js - - src-js/lazrjs/yui/current/build/io/io.js - - src-js/lazrjs/yui/current/build/io/io-form.js - - src-js/lazrjs/yui/current/build/get/get.js - src-js/lazrjs/yui/current/build/cache/cache.js - - src-js/lazrjs/yui/current/build/datatype/datatype.js - - src-js/lazrjs/yui/current/build/datatype/datatype-date.js - - src-js/lazrjs/yui/current/build/datatype/datatype-xml.js + - src-js/lazrjs/yui/current/build/classnamemanager/classnamemanager.js + - src-js/lazrjs/yui/current/build/console/console.js + - src-js/lazrjs/yui/current/build/dataschema/dataschema-array.js - src-js/lazrjs/yui/current/build/dataschema/dataschema-base.js - - src-js/lazrjs/yui/current/build/dataschema/dataschema-array.js - src-js/lazrjs/yui/current/build/dataschema/dataschema-json.js - src-js/lazrjs/yui/current/build/dataschema/dataschema-text.js - src-js/lazrjs/yui/current/build/dataschema/dataschema-xml.js - src-js/lazrjs/yui/current/build/datasource/datasource.js - - src-js/lazrjs/yui/current/build/console/console.js + - src-js/lazrjs/yui/current/build/datatype/datatype-date.js + - src-js/lazrjs/yui/current/build/datatype/datatype-xml.js + - src-js/lazrjs/yui/current/build/datatype/datatype.js + - src-js/lazrjs/yui/current/build/dom/dom.js - src-js/lazrjs/yui/current/build/dump/dump.js + - src-js/lazrjs/yui/current/build/event-custom/event-custom.js + - src-js/lazrjs/yui/current/build/event-simulate/event-simulate.js + - src-js/lazrjs/yui/current/build/event/event.js + - src-js/lazrjs/yui/current/build/get/get.js + - src-js/lazrjs/yui/current/build/io/io-form.js + - src-js/lazrjs/yui/current/build/io/io.js + - src-js/lazrjs/yui/current/build/json/json.js + - src-js/lazrjs/yui/current/build/node-focusmanager/node-focusmanager.js + - src-js/lazrjs/yui/current/build/node-menunav/node-menunav.js + - src-js/lazrjs/yui/current/build/node/node-event-simulate.js + - src-js/lazrjs/yui/current/build/node/node.js + - src-js/lazrjs/yui/current/build/oop/oop.js + - src-js/lazrjs/yui/current/build/overlay/overlay.js + - src-js/lazrjs/yui/current/build/plugin/plugin.js + - src-js/lazrjs/yui/current/build/pluginhost/pluginhost.js + - src-js/lazrjs/yui/current/build/queue-promote/queue-promote.js + - src-js/lazrjs/yui/current/build/substitute/substitute.js - src-js/lazrjs/yui/current/build/test/test.js - - src-js/lazrjs/yui/current/build/async-queue/async-queue.js - - src-js/lazrjs/yui/current/build/queue-promote/queue-promote.js + - src-js/lazrjs/yui/current/build/widget/widget-position-ext.js + - src-js/lazrjs/yui/current/build/widget/widget-position.js + - src-js/lazrjs/yui/current/build/widget/widget-stack.js + - src-js/lazrjs/yui/current/build/widget/widget-stdmod.js + - src-js/lazrjs/yui/current/build/widget/widget.js - src-js/lazrjs/activator/activator.js - src-js/lazrjs/anim/anim.js - src-js/lazrjs/autocomplete/autocomplete.js @@ -70,5 +70,3 @@ - src-js/lazrjs/inlineedit/tests/inline_edit.js - src-js/lazrjs/overlay/tests/overlay.js - src-js/lazrjs/picker/tests/picker.js - -