roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1609870 [4/6] - in /roller/trunk/app/src/main/webapp: WEB-INF/jsps/editor/ roller-ui/yui3/array-extras/ roller-ui/yui3/autocomplete-base/ roller-ui/yui3/autocomplete-filters/ roller-ui/yui3/autocomplete-list-keys/ roller-ui/yui3/autocomple...
Date Sat, 12 Jul 2014 00:34:04 GMT
Added: roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-jsonschema/datasource-jsonschema-debug.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-jsonschema/datasource-jsonschema-debug.js?rev=1609870&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-jsonschema/datasource-jsonschema-debug.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-jsonschema/datasource-jsonschema-debug.js Sat Jul 12 00:34:02 2014
@@ -0,0 +1,110 @@
+/*
+YUI 3.17.2 (build 9c3c78e)
+Copyright 2014 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+
+YUI.add('datasource-jsonschema', function (Y, NAME) {
+
+/**
+ * Extends DataSource with schema-parsing on JSON data.
+ *
+ * @module datasource
+ * @submodule datasource-jsonschema
+ */
+
+/**
+ * Adds schema-parsing to the DataSource Utility.
+ * @class DataSourceJSONSchema
+ * @extends Plugin.Base
+ */
+var DataSourceJSONSchema = function() {
+    DataSourceJSONSchema.superclass.constructor.apply(this, arguments);
+};
+
+Y.mix(DataSourceJSONSchema, {
+    /**
+     * The namespace for the plugin. This will be the property on the host which
+     * references the plugin instance.
+     *
+     * @property NS
+     * @type String
+     * @static
+     * @final
+     * @value "schema"
+     */
+    NS: "schema",
+
+    /**
+     * Class name.
+     *
+     * @property NAME
+     * @type String
+     * @static
+     * @final
+     * @value "dataSourceJSONSchema"
+     */
+    NAME: "dataSourceJSONSchema",
+
+    /////////////////////////////////////////////////////////////////////////////
+    //
+    // DataSourceJSONSchema Attributes
+    //
+    /////////////////////////////////////////////////////////////////////////////
+
+    ATTRS: {
+        schema: {
+            //value: {}
+        }
+    }
+});
+
+Y.extend(DataSourceJSONSchema, Y.Plugin.Base, {
+    /**
+    * Internal init() handler.
+    *
+    * @method initializer
+    * @param config {Object} Config object.
+    * @private
+    */
+    initializer: function(config) {
+        this.doBefore("_defDataFn", this._beforeDefDataFn);
+    },
+
+    /**
+     * Parses raw data into a normalized response. To accommodate XHR responses,
+     * will first look for data in data.responseText. Otherwise will just work
+     * with data.
+     *
+     * @method _beforeDefDataFn
+     * @param tId {Number} Unique transaction ID.
+     * @param request {Object} The request.
+     * @param callback {Object} The callback object with the following properties:
+     *     <dl>
+     *         <dt>success (Function)</dt> <dd>Success handler.</dd>
+     *         <dt>failure (Function)</dt> <dd>Failure handler.</dd>
+     *     </dl>
+     * @param data {Object} Raw data.
+     * @protected
+     */
+    _beforeDefDataFn: function(e) {
+        var data = e.data && (e.data.responseText || e.data),
+            schema = this.get('schema'),
+            payload = e.details[0];
+
+        payload.response = Y.DataSchema.JSON.apply.call(this, schema, data) || {
+            meta: {},
+            results: data
+        };
+
+        this.get("host").fire("response", payload);
+
+        return new Y.Do.Halt("DataSourceJSONSchema plugin halted _defDataFn");
+    }
+});
+
+Y.namespace('Plugin').DataSourceJSONSchema = DataSourceJSONSchema;
+
+
+}, '3.17.2', {"requires": ["datasource-local", "plugin", "dataschema-json"]});

Added: roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-jsonschema/datasource-jsonschema-min.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-jsonschema/datasource-jsonschema-min.js?rev=1609870&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-jsonschema/datasource-jsonschema-min.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-jsonschema/datasource-jsonschema-min.js Sat Jul 12 00:34:02 2014
@@ -0,0 +1,8 @@
+/*
+YUI 3.17.2 (build 9c3c78e)
+Copyright 2014 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+
+YUI.add("datasource-jsonschema",function(e,t){var n=function(){n.superclass.constructor.apply(this,arguments)};e.mix(n,{NS:"schema",NAME:"dataSourceJSONSchema",ATTRS:{schema:{}}}),e.extend(n,e.Plugin.Base,{initializer:function(e){this.doBefore("_defDataFn",this._beforeDefDataFn)},_beforeDefDataFn:function(t){var n=t.data&&(t.data.responseText||t.data),r=this.get("schema"),i=t.details[0];return i.response=e.DataSchema.JSON.apply.call(this,r,n)||{meta:{},results:n},this.get("host").fire("response",i),new e.Do.Halt("DataSourceJSONSchema plugin halted _defDataFn")}}),e.namespace("Plugin").DataSourceJSONSchema=n},"3.17.2",{requires:["datasource-local","plugin","dataschema-json"]});

Added: roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-local/datasource-local-debug.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-local/datasource-local-debug.js?rev=1609870&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-local/datasource-local-debug.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-local/datasource-local-debug.js Sat Jul 12 00:34:02 2014
@@ -0,0 +1,409 @@
+/*
+YUI 3.17.2 (build 9c3c78e)
+Copyright 2014 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+
+YUI.add('datasource-local', function (Y, NAME) {
+
+/**
+ * The DataSource utility provides a common configurable interface for widgets to
+ * access a variety of data, from JavaScript arrays to online database servers.
+ *
+ * @module datasource
+ * @main datasource
+ */
+
+/**
+ * Provides the base DataSource implementation, which can be extended to
+ * create DataSources for specific data protocols, such as the IO Utility, the
+ * Get Utility, or custom functions.
+ *
+ * @module datasource
+ * @submodule datasource-local
+ */
+
+/**
+ * Base class for the DataSource Utility.
+ * @class DataSource.Local
+ * @extends Base
+ * @constructor
+ */
+var LANG = Y.Lang,
+
+DSLocal = function() {
+    DSLocal.superclass.constructor.apply(this, arguments);
+};
+
+    /////////////////////////////////////////////////////////////////////////////
+    //
+    // DataSource static properties
+    //
+    /////////////////////////////////////////////////////////////////////////////
+Y.mix(DSLocal, {
+    /**
+     * Class name.
+     *
+     * @property NAME
+     * @type String
+     * @static
+     * @final
+     * @value "dataSourceLocal"
+     */
+    NAME: "dataSourceLocal",
+
+    /////////////////////////////////////////////////////////////////////////////
+    //
+    // DataSource Attributes
+    //
+    /////////////////////////////////////////////////////////////////////////////
+
+    ATTRS: {
+        /**
+        * @attribute source
+        * @description Pointer to live data.
+        * @type MIXED
+        * @default null
+        */
+        source: {
+            value: null
+        }
+    },
+
+    /**
+     * Global transaction counter.
+     *
+     * @property _tId
+     * @type Number
+     * @static
+     * @private
+     * @default 0
+     */
+    _tId: 0,
+
+    /**
+     * Global in-progress transaction objects.
+     *
+     * @property transactions
+     * @type Object
+     * @static
+     */
+    transactions: {},
+
+    /**
+     * Returns data to callback.
+     *
+     * @method issueCallback
+     * @param e {EventFacade} Event Facade.
+     * @param caller {DataSource} Calling DataSource instance.
+     * @static
+     */
+    issueCallback: function (e, caller) {
+        var callbacks = e.on || e.callback,
+            callback = callbacks && callbacks.success,
+            payload = e.details[0];
+
+        payload.error = (e.error || e.response.error);
+
+        if (payload.error) {
+            caller.fire("error", payload);
+            callback = callbacks && callbacks.failure;
+        }
+
+        if (callback) {
+            //TODO: this should be executed from a specific context
+            callback(payload);
+        }
+    }
+});
+
+Y.extend(DSLocal, Y.Base, {
+    /**
+    * Internal init() handler.
+    *
+    * @method initializer
+    * @param config {Object} Config object.
+    * @private
+    */
+    initializer: function(config) {
+        this._initEvents();
+    },
+
+    /**
+    * This method creates all the events for this module.
+    * @method _initEvents
+    * @private
+    */
+    _initEvents: function() {
+        /**
+         * Fired when a data request is received.
+         *
+         * @event request
+         * @param e {EventFacade} Event Facade with the following properties:
+         * <dl>
+         * <dt>tId (Number)</dt> <dd>Unique transaction ID.</dd>
+         * <dt>request (Object)</dt> <dd>The request.</dd>
+         * <dt>callback (Object)</dt> <dd>The callback object
+         *   (deprecated, refer to <strong>on</strong></dd>
+         * <dt>on (Object)</dt> <dd>The map of configured callback
+         *   functions.</dd>
+         * <dt>cfg (Object)</dt> <dd>Configuration object.</dd>
+         * </dl>
+         * @preventable _defRequestFn
+         */
+        this.publish("request", {defaultFn: Y.bind("_defRequestFn", this), queuable:true});
+
+        /**
+         * Fired when raw data is received.
+         *
+         * @event data
+         * @param e {EventFacade} Event Facade with the following properties:
+         * <dl>
+         * <dt>tId (Number)</dt> <dd>Unique transaction ID.</dd>
+         * <dt>request (Object)</dt> <dd>The request.</dd>
+         * <dt>callback (Object)</dt> <dd>Deprecated alias for the
+         *   <strong>on</strong> property</dd>
+         * <dt>on (Object)</dt> <dd>The map of configured transaction
+         *   callbacks.  An object with the following properties:
+         *     <dl>
+         *         <dt>success (Function)</dt> <dd>Success handler.</dd>
+         *         <dt>failure (Function)</dt> <dd>Failure handler.</dd>
+         *     </dl>
+         * </dd>
+         * <dt>cfg (Object)</dt> <dd>Configuration object.</dd>
+         * <dt>data (Object)</dt> <dd>Raw data.</dd>
+         * </dl>
+         * @preventable _defDataFn
+         */
+        this.publish("data", {defaultFn: Y.bind("_defDataFn", this), queuable:true});
+
+        /**
+         * Fired when response is returned.
+         *
+         * @event response
+         * @param e {EventFacade} Event Facade with the following properties:
+         * <dl>
+         * <dt>tId (Number)</dt> <dd>Unique transaction ID.</dd>
+         * <dt>request (Object)</dt> <dd>The request.</dd>
+         * <dt>callback (Object)</dt> <dd>Deprecated alias for the
+         *   <strong>on</strong> property</dd>
+         * <dt>on (Object)</dt> <dd>The map of configured transaction
+         *   callbacks.  An object with the following properties:
+         *     <dl>
+         *         <dt>success (Function)</dt> <dd>Success handler.</dd>
+         *         <dt>failure (Function)</dt> <dd>Failure handler.</dd>
+         *     </dl>
+         * </dd>
+         * <dt>cfg (Object)</dt> <dd>Configuration object.</dd>
+         * <dt>data (Object)</dt> <dd>Raw data.</dd>
+         * <dt>response (Object)</dt>
+         *     <dd>Normalized response object with the following properties:
+         *         <dl>
+         *             <dt>results (Object)</dt> <dd>Parsed results.</dd>
+         *             <dt>meta (Object)</dt> <dd>Parsed meta data.</dd>
+         *             <dt>error (Boolean)</dt> <dd>Error flag.</dd>
+         *         </dl>
+         *     </dd>
+         * <dt>error</dt>
+         *     <dd>Any error that occurred along the transaction lifecycle.</dd>
+         * </dl>
+         * @preventable _defResponseFn
+         */
+         this.publish("response", {defaultFn: Y.bind("_defResponseFn", this), queuable:true});
+
+        /**
+         * Fired when an error is encountered.
+         *
+         * @event error
+         * @param e {EventFacade} Event Facade with the following properties:
+         * <dl>
+         * <dt>tId (Number)</dt> <dd>Unique transaction ID.</dd>
+         * <dt>request (Object)</dt> <dd>The request.</dd>
+         * <dt>callback (Object)</dt> <dd>Deprecated alias for the
+         *   <strong>on</strong> property</dd>
+         * <dt>on (Object)</dt> <dd>The map of configured transaction
+         *   callbacks.  An object with the following properties:
+         *     <dl>
+         *         <dt>success (Function)</dt> <dd>Success handler.</dd>
+         *         <dt>failure (Function)</dt> <dd>Failure handler.</dd>
+         *     </dl>
+         * </dd>
+         * <dt>cfg (Object)</dt> <dd>Configuration object.</dd>
+         * <dt>data (Object)</dt> <dd>Raw data.</dd>
+         * <dt>response (Object)</dt>
+         *     <dd>Normalized response object with the following properties:
+         *         <dl>
+         *             <dt>results (Object)</dt> <dd>Parsed results.</dd>
+         *             <dt>meta (Object)</dt> <dd>Parsed meta data.</dd>
+         *             <dt>error (Object)</dt> <dd>Error object.</dd>
+         *         </dl>
+         *     </dd>
+         * <dt>error</dt>
+         *     <dd>Any error that occurred along the transaction lifecycle.</dd>
+         * </dl>
+         */
+
+    },
+
+    /**
+     * Manages request/response transaction. Must fire <code>response</code>
+     * event when response is received. This method should be implemented by
+     * subclasses to achieve more complex behavior such as accessing remote data.
+     *
+     * @method _defRequestFn
+     * @param e {EventFacade} Event Facadewith the following properties:
+     * <dl>
+     * <dt>tId (Number)</dt> <dd>Unique transaction ID.</dd>
+     * <dt>request (Object)</dt> <dd>The request.</dd>
+     * <dt>callback (Object)</dt> <dd>Deprecated alias for the
+     *   <strong>on</strong> property</dd>
+     * <dt>on (Object)</dt> <dd>The map of configured transaction
+     *   callbacks.  An object with the following properties:
+     *     <dl>
+     *         <dt>success (Function)</dt> <dd>Success handler.</dd>
+     *         <dt>failure (Function)</dt> <dd>Failure handler.</dd>
+     *     </dl>
+     * </dd>
+     * <dt>cfg (Object)</dt> <dd>Configuration object.</dd>
+     * </dl>
+     * @protected
+     */
+    _defRequestFn: function(e) {
+        var data = this.get("source"),
+            payload = e.details[0];
+
+        // Problematic data
+        if(LANG.isUndefined(data)) {
+            payload.error = new Error("Local source undefined");
+            Y.log("Local source undefined", "error", "datasource-local");
+        }
+
+        payload.data = data;
+        this.fire("data", payload);
+        Y.log("Transaction " + e.tId + " complete. Request: " +
+                Y.dump(e.request) + " . Response: " + Y.dump(e.response), "info", "datasource-local");
+    },
+
+    /**
+     * Normalizes raw data into a response that includes results and meta properties.
+     *
+     * @method _defDataFn
+     * @param e {EventFacade} Event Facade with the following properties:
+     * <dl>
+     * <dt>tId (Number)</dt> <dd>Unique transaction ID.</dd>
+     * <dt>request (Object)</dt> <dd>The request.</dd>
+     * <dt>callback (Object)</dt> <dd>Deprecated alias for the
+     *   <strong>on</strong> property</dd>
+     * <dt>on (Object)</dt> <dd>The map of configured transaction
+     *   callbacks.  An object with the following properties:
+     *     <dl>
+     *         <dt>success (Function)</dt> <dd>Success handler.</dd>
+     *         <dt>failure (Function)</dt> <dd>Failure handler.</dd>
+     *     </dl>
+     * </dd>
+     * <dt>cfg (Object)</dt> <dd>Configuration object.</dd>
+     * <dt>data (Object)</dt> <dd>Raw data.</dd>
+     * </dl>
+     * @protected
+     */
+    _defDataFn: function(e) {
+        var data = e.data,
+            meta = e.meta,
+            response = {
+                results: (LANG.isArray(data)) ? data : [data],
+                meta: (meta) ? meta : {}
+            },
+            payload = e.details[0];
+
+        payload.response = response;
+        this.fire("response", payload);
+    },
+
+    /**
+     * Sends data as a normalized response to callback.
+     *
+     * @method _defResponseFn
+     * @param e {EventFacade} Event Facade with the following properties:
+     * <dl>
+     * <dt>tId (Number)</dt> <dd>Unique transaction ID.</dd>
+     * <dt>request (Object)</dt> <dd>The request.</dd>
+     * <dt>callback (Object)</dt> <dd>Deprecated alias for the
+     *   <strong>on</strong> property</dd>
+     * <dt>on (Object)</dt> <dd>The map of configured transaction
+     *   callbacks.  An object with the following properties:
+     *     <dl>
+     *         <dt>success (Function)</dt> <dd>Success handler.</dd>
+     *         <dt>failure (Function)</dt> <dd>Failure handler.</dd>
+     *     </dl>
+     * </dd>
+     * <dt>cfg (Object)</dt> <dd>Configuration object.</dd>
+     * <dt>data (Object)</dt> <dd>Raw data.</dd>
+     * <dt>response (Object)</dt> <dd>Normalized response object with the following properties:
+     *     <dl>
+     *         <dt>results (Object)</dt> <dd>Parsed results.</dd>
+     *         <dt>meta (Object)</dt> <dd>Parsed meta data.</dd>
+     *         <dt>error (Boolean)</dt> <dd>Error flag.</dd>
+     *     </dl>
+     * </dd>
+     * </dl>
+     * @protected
+     */
+    _defResponseFn: function(e) {
+        // Send the response back to the callback
+        DSLocal.issueCallback(e, this);
+    },
+
+    /**
+     * Generates a unique transaction ID and fires <code>request</code> event.
+     * <strong>Note</strong>: the property <code>callback</code> is a
+     * deprecated alias for the <code>on</code> transaction configuration
+     * property described below.
+     *
+     * @method sendRequest
+     * @param [request] {Object} An object literal with the following properties:
+     *     <dl>
+     *     <dt><code>request</code></dt>
+     *     <dd>The request to send to the live data source, if any.</dd>
+     *     <dt><code>on</code></dt>
+     *     <dd>An object literal with the following properties:
+     *         <dl>
+     *         <dt><code>success</code></dt>
+     *         <dd>The function to call when the data is ready.</dd>
+     *         <dt><code>failure</code></dt>
+     *         <dd>The function to call upon a response failure condition.</dd>
+     *         <dt><code>argument</code></dt>
+     *         <dd>Arbitrary data payload that will be passed back to the success and failure handlers.</dd>
+     *         </dl>
+     *     </dd>
+     *     <dt><code>cfg</code></dt>
+     *     <dd>Configuration object, if any.</dd>
+     *     </dl>
+     * @return {Number} Transaction ID.
+     */
+    sendRequest: function(request) {
+        var tId = DSLocal._tId++,
+            callbacks;
+
+        request = request || {};
+
+        callbacks = request.on || request.callback;
+
+        this.fire("request", {
+            tId: tId,
+            request: request.request,
+            on: callbacks,
+            callback: callbacks,
+            cfg: request.cfg || {}
+        });
+
+        Y.log("Transaction " + tId + " sent request: " + Y.dump(request.request), "info", "datasource-local");
+
+        return tId;
+    }
+});
+
+Y.namespace("DataSource").Local = DSLocal;
+
+
+}, '3.17.2', {"requires": ["base"]});

Added: roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-local/datasource-local-min.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-local/datasource-local-min.js?rev=1609870&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-local/datasource-local-min.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-local/datasource-local-min.js Sat Jul 12 00:34:02 2014
@@ -0,0 +1,8 @@
+/*
+YUI 3.17.2 (build 9c3c78e)
+Copyright 2014 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+
+YUI.add("datasource-local",function(e,t){var n=e.Lang,r=function(){r.superclass.constructor.apply(this,arguments)};e.mix(r,{NAME:"dataSourceLocal",ATTRS:{source:{value:null}},_tId:0,transactions:{},issueCallback:function(e,t){var n=e.on||e.callback,r=n&&n.success,i=e.details[0];i.error=e.error||e.response.error,i.error&&(t.fire("error",i),r=n&&n.failure),r&&r(i)}}),e.extend(r,e.Base,{initializer:function(e){this._initEvents()},_initEvents:function(){this.publish("request",{defaultFn:e.bind("_defRequestFn",this),queuable:!0}),this.publish("data",{defaultFn:e.bind("_defDataFn",this),queuable:!0}),this.publish("response",{defaultFn:e.bind("_defResponseFn",this),queuable:!0})},_defRequestFn:function(e){var t=this.get("source"),r=e.details[0];n.isUndefined(t)&&(r.error=new Error("Local source undefined")),r.data=t,this.fire("data",r)},_defDataFn:function(e){var t=e.data,r=e.meta,i={results:n.isArray(t)?t:[t],meta:r?r:{}},s=e.details[0];s.response=i,this.fire("response",s)},_defResponseFn
 :function(e){r.issueCallback(e,this)},sendRequest:function(e){var t=r._tId++,n;return e=e||{},n=e.on||e.callback,this.fire("request",{tId:t,request:e.request,on:n,callback:n,cfg:e.cfg||{}}),t}}),e.namespace("DataSource").Local=r},"3.17.2",{requires:["base"]});

Added: roller/trunk/app/src/main/webapp/roller-ui/yui3/escape/escape-min.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/yui3/escape/escape-min.js?rev=1609870&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/yui3/escape/escape-min.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/yui3/escape/escape-min.js Sat Jul 12 00:34:02 2014
@@ -0,0 +1,8 @@
+/*
+YUI 3.17.2 (build 9c3c78e)
+Copyright 2014 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+
+YUI.add("escape",function(e,t){var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},r={html:function(e){return(e+"").replace(/[&<>"'\/`]/g,r._htmlReplacer)},regex:function(e){return(e+"").replace(/[\-$\^*()+\[\]{}|\\,.?\s]/g,"\\$&")},_htmlReplacer:function(e){return n[e]}};r.regexp=r.regex,e.Escape=r},"3.17.2",{requires:["yui-base"]});

Added: roller/trunk/app/src/main/webapp/roller-ui/yui3/escape/escape.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/yui3/escape/escape.js?rev=1609870&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/yui3/escape/escape.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/yui3/escape/escape.js Sat Jul 12 00:34:02 2014
@@ -0,0 +1,99 @@
+/*
+YUI 3.17.2 (build 9c3c78e)
+Copyright 2014 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+
+YUI.add('escape', function (Y, NAME) {
+
+/**
+Provides utility methods for escaping strings.
+
+@module escape
+@class Escape
+@static
+@since 3.3.0
+**/
+
+var HTML_CHARS = {
+        '&': '&amp;',
+        '<': '&lt;',
+        '>': '&gt;',
+        '"': '&quot;',
+        "'": '&#x27;',
+        '/': '&#x2F;',
+        '`': '&#x60;'
+    },
+
+Escape = {
+    // -- Public Static Methods ------------------------------------------------
+
+    /**
+    Returns a copy of the specified string with special HTML characters
+    escaped. The following characters will be converted to their
+    corresponding character entities:
+
+        & < > " ' / `
+
+    This implementation is based on the [OWASP HTML escaping
+    recommendations][1]. In addition to the characters in the OWASP
+    recommendations, we also escape the <code>&#x60;</code> character, since IE
+    interprets it as an attribute delimiter.
+
+    If _string_ is not already a string, it will be coerced to a string.
+
+    [1]: http://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet
+
+    @method html
+    @param {String} string String to escape.
+    @return {String} Escaped string.
+    @static
+    **/
+    html: function (string) {
+        return (string + '').replace(/[&<>"'\/`]/g, Escape._htmlReplacer);
+    },
+
+    /**
+    Returns a copy of the specified string with special regular expression
+    characters escaped, allowing the string to be used safely inside a regex.
+    The following characters, and all whitespace characters, are escaped:
+
+        - $ ^ * ( ) + [ ] { } | \ , . ?
+
+    If _string_ is not already a string, it will be coerced to a string.
+
+    @method regex
+    @param {String} string String to escape.
+    @return {String} Escaped string.
+    @static
+    **/
+    regex: function (string) {
+        // There's no need to escape !, =, and : since they only have meaning
+        // when they follow a parenthesized ?, as in (?:...), and we already
+        // escape parens and question marks.
+        return (string + '').replace(/[\-$\^*()+\[\]{}|\\,.?\s]/g, '\\$&');
+    },
+
+    // -- Protected Static Methods ---------------------------------------------
+
+    /**
+     * Regex replacer for HTML escaping.
+     *
+     * @method _htmlReplacer
+     * @param {String} match Matched character (must exist in HTML_CHARS).
+     * @return {String} HTML entity.
+     * @static
+     * @protected
+     */
+    _htmlReplacer: function (match) {
+        return HTML_CHARS[match];
+    }
+};
+
+Escape.regexp = Escape.regex;
+
+Y.Escape = Escape;
+
+
+}, '3.17.2', {"requires": ["yui-base"]});

Added: roller/trunk/app/src/main/webapp/roller-ui/yui3/event-resize/event-resize-min.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/yui3/event-resize/event-resize-min.js?rev=1609870&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/yui3/event-resize/event-resize-min.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/yui3/event-resize/event-resize-min.js Sat Jul 12 00:34:02 2014
@@ -0,0 +1,8 @@
+/*
+YUI 3.17.2 (build 9c3c78e)
+Copyright 2014 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+
+YUI.add("event-resize",function(e,t){e.Event.define("windowresize",{on:e.UA.gecko&&e.UA.gecko<1.91?function(t,n,r){n._handle=e.Event.attach("resize",function(e){r.fire(e)})}:function(t,n,r){var i=e.config.windowResizeDelay||100;n._handle=e.Event.attach("resize",function(t){n._timer&&n._timer.cancel(),n._timer=e.later(i,e,function(){r.fire(t)})})},detach:function(e,t){t._timer&&t._timer.cancel(),t._handle.detach()}})},"3.17.2",{requires:["node-base","event-synthetic"]});

Added: roller/trunk/app/src/main/webapp/roller-ui/yui3/event-resize/event-resize.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/yui3/event-resize/event-resize.js?rev=1609870&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/yui3/event-resize/event-resize.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/yui3/event-resize/event-resize.js Sat Jul 12 00:34:02 2014
@@ -0,0 +1,60 @@
+/*
+YUI 3.17.2 (build 9c3c78e)
+Copyright 2014 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+
+YUI.add('event-resize', function (Y, NAME) {
+
+/**
+ * Adds a window resize event that has its behavior normalized to fire at the
+ * end of the resize rather than constantly during the resize.
+ * @module event
+ * @submodule event-resize
+ */
+
+
+/**
+ * Old firefox fires the window resize event once when the resize action
+ * finishes, other browsers fire the event periodically during the
+ * resize.  This code uses timeout logic to simulate the Firefox
+ * behavior in other browsers.
+ * @event windowresize
+ * @for YUI
+ */
+Y.Event.define('windowresize', {
+
+    on: (Y.UA.gecko && Y.UA.gecko < 1.91) ?
+        function (node, sub, notifier) {
+            sub._handle = Y.Event.attach('resize', function (e) {
+                notifier.fire(e);
+            });
+        } :
+        function (node, sub, notifier) {
+            // interval bumped from 40 to 100ms as of 3.4.1
+            var delay = Y.config.windowResizeDelay || 100;
+
+            sub._handle = Y.Event.attach('resize', function (e) {
+                if (sub._timer) {
+                    sub._timer.cancel();
+                }
+
+                sub._timer = Y.later(delay, Y, function () {
+                    notifier.fire(e);
+                });
+            });
+        },
+
+    detach: function (node, sub) {
+        if (sub._timer) {
+            sub._timer.cancel();
+        }
+        sub._handle.detach();
+    }
+    // delegate methods not defined because this only works for window
+    // subscriptions, so...yeah.
+});
+
+
+}, '3.17.2', {"requires": ["node-base", "event-synthetic"]});

Added: roller/trunk/app/src/main/webapp/roller-ui/yui3/event-valuechange/event-valuechange-min.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/yui3/event-valuechange/event-valuechange-min.js?rev=1609870&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/yui3/event-valuechange/event-valuechange-min.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/yui3/event-valuechange/event-valuechange-min.js Sat Jul 12 00:34:02 2014
@@ -0,0 +1,8 @@
+/*
+YUI 3.17.2 (build 9c3c78e)
+Copyright 2014 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+
+YUI.add("event-valuechange",function(e,t){var n="_valuechange",r="value",i="nodeName",s,o={POLL_INTERVAL:50,TIMEOUT:1e4,_poll:function(t,r){var i=t._node,s=r.e,u=t._data&&t._data[n],a=0,f,l,c,h,p,d;if(!i||!u){o._stopPolling(t);return}l=u.prevVal,h=u.nodeName,u.isEditable?c=i.innerHTML:h==="input"||h==="textarea"?c=i.value:h==="select"&&(p=i.options[i.selectedIndex],c=p.value||p.text),c!==l&&(u.prevVal=c,f={_event:s,currentTarget:s&&s.currentTarget||t,newVal:c,prevVal:l,target:s&&s.target||t},e.Object.some(u.notifiers,function(e){var t=e.handle.evt,n;a!==1?e.fire(f):t.el===d&&e.fire(f),n=t&&t._facade?t._facade.stopped:0,n>a&&(a=n,a===1&&(d=t.el));if(a===2)return!0}),o._refreshTimeout(t))},_refreshTimeout:function(e,t){if(!e._node)return;var r=e.getData(n);o._stopTimeout(e),r.timeout=setTimeout(function(){o._stopPolling(e,t)},o.TIMEOUT)},_startPolling:function(t,s,u){var a,f;if(!t.test("input,textarea,select")&&!(f=o._isEditable(t)))return;a=t.getData(n),a||(a={nodeName:t.get(i).toLow
 erCase(),isEditable:f,prevVal:f?t.getDOMNode().innerHTML:t.get(r)},t.setData(n,a)),a.notifiers||(a.notifiers={});if(a.interval){if(!u.force){a.notifiers[e.stamp(s)]=s;return}o._stopPolling(t,s)}a.notifiers[e.stamp(s)]=s,a.interval=setInterval(function(){o._poll(t,u)},o.POLL_INTERVAL),o._refreshTimeout(t,s)},_stopPolling:function(t,r){if(!t._node)return;var i=t.getData(n)||{};clearInterval(i.interval),delete i.interval,o._stopTimeout(t),r?i.notifiers&&delete i.notifiers[e.stamp(r)]:i.notifiers={}},_stopTimeout:function(e){var t=e.getData(n)||{};clearTimeout(t.timeout),delete t.timeout},_isEditable:function(e){var t=e._node;return t.contentEditable==="true"||t.contentEditable===""},_onBlur:function(e,t){o._stopPolling(e.currentTarget,t)},_onFocus:function(e,t){var s=e.currentTarget,u=s.getData(n);u||(u={isEditable:o._isEditable(s),nodeName:s.get(i).toLowerCase()},s.setData(n,u)),u.prevVal=u.isEditable?s.getDOMNode().innerHTML:s.get(r),o._startPolling(s,t,{e:e})},_onKeyDown:function(e,
 t){o._startPolling(e.currentTarget,t,{e:e})},_onKeyUp:function(e,t){(e.charCode===229||e.charCode===197)&&o._startPolling(e.currentTarget,t,{e:e,force:!0})},_onMouseDown:function(e,t){o._startPolling(e.currentTarget,t,{e:e})},_onSubscribe:function(t,s,u,a){var f,l,c,h,p;l={blur:o._onBlur,focus:o._onFocus,keydown:o._onKeyDown,keyup:o._onKeyUp,mousedown:o._onMouseDown},f=u._valuechange={};if(a)f.delegated=!0,f.getNodes=function(){return h=t.all("input,textarea,select").filter(a),p=t.all('[contenteditable="true"],[contenteditable=""]').filter(a),h.concat(p)},f.getNodes().each(function(e){e.getData(n)||e.setData(n,{nodeName:e.get(i).toLowerCase(),isEditable:o._isEditable(e),prevVal:c?e.getDOMNode().innerHTML:e.get(r)})}),u._handles=e.delegate(l,t,a,null,u);else{c=o._isEditable(t);if(!t.test("input,textarea,select")&&!c)return;t.getData(n)||t.setData(n,{nodeName:t.get(i).toLowerCase(),isEditable:c,prevVal:c?t.getDOMNode().innerHTML:t.get(r)}),u._handles=t.on(l,null,null,u)}},_onUnsubscri
 be:function(e,t,n){var r=n._valuechange;n._handles&&n._handles.detach(),r.delegated?r.getNodes().each(function(e){o._stopPolling(e,n)}):o._stopPolling(e,n)}};s={detach:o._onUnsubscribe,on:o._onSubscribe,delegate:o._onSubscribe,detachDelegate:o._onUnsubscribe,publishConfig:{emitFacade:!0}},e.Event.define("valuechange",s),e.Event.define("valueChange",s),e.ValueChange=o},"3.17.2",{requires:["event-focus","event-synthetic"]});

Added: roller/trunk/app/src/main/webapp/roller-ui/yui3/event-valuechange/event-valuechange.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/yui3/event-valuechange/event-valuechange.js?rev=1609870&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/yui3/event-valuechange/event-valuechange.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/yui3/event-valuechange/event-valuechange.js Sat Jul 12 00:34:02 2014
@@ -0,0 +1,561 @@
+/*
+YUI 3.17.2 (build 9c3c78e)
+Copyright 2014 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+
+YUI.add('event-valuechange', function (Y, NAME) {
+
+/**
+Adds a synthetic `valuechange` event that fires when the `value` property of an
+`<input>`, `<textarea>`, `<select>`, or `[contenteditable="true"]` node changes
+as a result of a keystroke, mouse operation, or input method editor (IME)
+input event.
+
+Usage:
+
+    YUI().use('event-valuechange', function (Y) {
+        Y.one('#my-input').on('valuechange', function (e) {
+        });
+    });
+
+@module event-valuechange
+**/
+
+/**
+Provides the implementation for the synthetic `valuechange` event. This class
+isn't meant to be used directly, but is public to make monkeypatching possible.
+
+Usage:
+
+    YUI().use('event-valuechange', function (Y) {
+        Y.one('#my-input').on('valuechange', function (e) {
+        });
+    });
+
+@class ValueChange
+@static
+*/
+
+var DATA_KEY = '_valuechange',
+    VALUE    = 'value',
+    NODE_NAME = 'nodeName',
+
+    config, // defined at the end of this file
+
+// Just a simple namespace to make methods overridable.
+VC = {
+    // -- Static Constants -----------------------------------------------------
+
+    /**
+    Interval (in milliseconds) at which to poll for changes to the value of an
+    element with one or more `valuechange` subscribers when the user is likely
+    to be interacting with it.
+
+    @property POLL_INTERVAL
+    @type Number
+    @default 50
+    @static
+    **/
+    POLL_INTERVAL: 50,
+
+    /**
+    Timeout (in milliseconds) after which to stop polling when there hasn't been
+    any new activity (keypresses, mouse clicks, etc.) on an element.
+
+    @property TIMEOUT
+    @type Number
+    @default 10000
+    @static
+    **/
+    TIMEOUT: 10000,
+
+    // -- Protected Static Methods ---------------------------------------------
+
+    /**
+    Called at an interval to poll for changes to the value of the specified
+    node.
+
+    @method _poll
+    @param {Node} node Node to poll.
+
+    @param {Object} options Options object.
+        @param {EventFacade} [options.e] Event facade of the event that
+            initiated the polling.
+
+    @protected
+    @static
+    **/
+    _poll: function (node, options) {
+        var domNode  = node._node, // performance cheat; getValue() is a big hit when polling
+            event    = options.e,
+            vcData   = node._data && node._data[DATA_KEY], // another perf cheat
+            stopped  = 0,
+            facade, prevVal, newVal, nodeName, selectedOption, stopElement;
+
+        if (!(domNode && vcData)) {
+            VC._stopPolling(node);
+            return;
+        }
+
+        prevVal = vcData.prevVal;
+        nodeName  = vcData.nodeName;
+
+        if (vcData.isEditable) {
+            // Use innerHTML for performance
+            newVal = domNode.innerHTML;
+        } else if (nodeName === 'input' || nodeName === 'textarea') {
+            // Use value property for performance
+            newVal = domNode.value;
+        } else if (nodeName === 'select') {
+            // Back-compatibility with IE6 <select> element values.
+            // Huge performance cheat to get past node.get('value').
+            selectedOption = domNode.options[domNode.selectedIndex];
+            newVal = selectedOption.value || selectedOption.text;
+        }
+
+        if (newVal !== prevVal) {
+            vcData.prevVal = newVal;
+
+            facade = {
+                _event       : event,
+                currentTarget: (event && event.currentTarget) || node,
+                newVal       : newVal,
+                prevVal      : prevVal,
+                target       : (event && event.target) || node
+            };
+
+            Y.Object.some(vcData.notifiers, function (notifier) {
+                var evt = notifier.handle.evt,
+                    newStopped;
+
+                // support e.stopPropagation()
+                if (stopped !== 1) {
+                    notifier.fire(facade);
+                } else if (evt.el === stopElement) {
+                    notifier.fire(facade);
+                }
+
+                newStopped = evt && evt._facade ? evt._facade.stopped : 0;
+
+                // need to consider the condition in which there are two
+                // listeners on the same element:
+                // listener 1 calls e.stopPropagation()
+                // listener 2 calls e.stopImmediatePropagation()
+                if (newStopped > stopped) {
+                    stopped = newStopped;
+
+                    if (stopped === 1) {
+                        stopElement = evt.el;
+                    }
+                }
+
+                // support e.stopImmediatePropagation()
+                if (stopped === 2) {
+                    return true;
+                }
+            });
+
+            VC._refreshTimeout(node);
+        }
+    },
+
+    /**
+    Restarts the inactivity timeout for the specified node.
+
+    @method _refreshTimeout
+    @param {Node} node Node to refresh.
+    @param {SyntheticEvent.Notifier} notifier
+    @protected
+    @static
+    **/
+    _refreshTimeout: function (node, notifier) {
+        // The node may have been destroyed, so check that it still exists
+        // before trying to get its data. Otherwise an error will occur.
+        if (!node._node) {
+            return;
+        }
+
+        var vcData = node.getData(DATA_KEY);
+
+        VC._stopTimeout(node); // avoid dupes
+
+        // If we don't see any changes within the timeout period (10 seconds by
+        // default), stop polling.
+        vcData.timeout = setTimeout(function () {
+            VC._stopPolling(node, notifier);
+        }, VC.TIMEOUT);
+
+    },
+
+    /**
+    Begins polling for changes to the `value` property of the specified node. If
+    polling is already underway for the specified node, it will not be restarted
+    unless the `force` option is `true`
+
+    @method _startPolling
+    @param {Node} node Node to watch.
+    @param {SyntheticEvent.Notifier} notifier
+
+    @param {Object} options Options object.
+        @param {EventFacade} [options.e] Event facade of the event that
+            initiated the polling.
+        @param {Boolean} [options.force=false] If `true`, polling will be
+            restarted even if we're already polling this node.
+
+    @protected
+    @static
+    **/
+    _startPolling: function (node, notifier, options) {
+        var vcData, isEditable;
+
+        if (!node.test('input,textarea,select') && !(isEditable = VC._isEditable(node))) {
+            return;
+        }
+
+        vcData = node.getData(DATA_KEY);
+
+        if (!vcData) {
+            vcData = {
+                nodeName   : node.get(NODE_NAME).toLowerCase(),
+                isEditable : isEditable,
+                prevVal    : isEditable ? node.getDOMNode().innerHTML : node.get(VALUE)
+            };
+
+            node.setData(DATA_KEY, vcData);
+        }
+
+        vcData.notifiers || (vcData.notifiers = {});
+
+        // Don't bother continuing if we're already polling this node, unless
+        // `options.force` is true.
+        if (vcData.interval) {
+            if (options.force) {
+                VC._stopPolling(node, notifier); // restart polling, but avoid dupe polls
+            } else {
+                vcData.notifiers[Y.stamp(notifier)] = notifier;
+                return;
+            }
+        }
+
+        // Poll for changes to the node's value. We can't rely on keyboard
+        // events for this, since the value may change due to a mouse-initiated
+        // paste event, an IME input event, or for some other reason that
+        // doesn't trigger a key event.
+        vcData.notifiers[Y.stamp(notifier)] = notifier;
+
+        vcData.interval = setInterval(function () {
+            VC._poll(node, options);
+        }, VC.POLL_INTERVAL);
+
+
+        VC._refreshTimeout(node, notifier);
+    },
+
+    /**
+    Stops polling for changes to the specified node's `value` attribute.
+
+    @method _stopPolling
+    @param {Node} node Node to stop polling on.
+    @param {SyntheticEvent.Notifier} [notifier] Notifier to remove from the
+        node. If not specified, all notifiers will be removed.
+    @protected
+    @static
+    **/
+    _stopPolling: function (node, notifier) {
+        // The node may have been destroyed, so check that it still exists
+        // before trying to get its data. Otherwise an error will occur.
+        if (!node._node) {
+            return;
+        }
+
+        var vcData = node.getData(DATA_KEY) || {};
+
+        clearInterval(vcData.interval);
+        delete vcData.interval;
+
+        VC._stopTimeout(node);
+
+        if (notifier) {
+            vcData.notifiers && delete vcData.notifiers[Y.stamp(notifier)];
+        } else {
+            vcData.notifiers = {};
+        }
+
+    },
+
+    /**
+    Clears the inactivity timeout for the specified node, if any.
+
+    @method _stopTimeout
+    @param {Node} node
+    @protected
+    @static
+    **/
+    _stopTimeout: function (node) {
+        var vcData = node.getData(DATA_KEY) || {};
+
+        clearTimeout(vcData.timeout);
+        delete vcData.timeout;
+    },
+
+    /**
+    Check to see if a node has editable content or not.
+
+    TODO: Add additional checks to get it to work for child nodes
+    that inherit "contenteditable" from parent nodes. This may be
+    too computationally intensive to be placed inside of the `_poll`
+    loop, however.
+
+    @method _isEditable
+    @param {Node} node
+    @protected
+    @static
+    **/
+    _isEditable: function (node) {
+        // Performance cheat because this is used inside `_poll`
+        var domNode = node._node;
+        return domNode.contentEditable === 'true' ||
+               domNode.contentEditable === '';
+    },
+
+
+
+    // -- Protected Static Event Handlers --------------------------------------
+
+    /**
+    Stops polling when a node's blur event fires.
+
+    @method _onBlur
+    @param {EventFacade} e
+    @param {SyntheticEvent.Notifier} notifier
+    @protected
+    @static
+    **/
+    _onBlur: function (e, notifier) {
+        VC._stopPolling(e.currentTarget, notifier);
+    },
+
+    /**
+    Resets a node's history and starts polling when a focus event occurs.
+
+    @method _onFocus
+    @param {EventFacade} e
+    @param {SyntheticEvent.Notifier} notifier
+    @protected
+    @static
+    **/
+    _onFocus: function (e, notifier) {
+        var node       = e.currentTarget,
+            vcData     = node.getData(DATA_KEY);
+
+        if (!vcData) {
+            vcData = {
+                isEditable : VC._isEditable(node),
+                nodeName   : node.get(NODE_NAME).toLowerCase()
+            };
+            node.setData(DATA_KEY, vcData);
+        }
+
+        vcData.prevVal = vcData.isEditable ? node.getDOMNode().innerHTML : node.get(VALUE);
+
+        VC._startPolling(node, notifier, {e: e});
+    },
+
+    /**
+    Starts polling when a node receives a keyDown event.
+
+    @method _onKeyDown
+    @param {EventFacade} e
+    @param {SyntheticEvent.Notifier} notifier
+    @protected
+    @static
+    **/
+    _onKeyDown: function (e, notifier) {
+        VC._startPolling(e.currentTarget, notifier, {e: e});
+    },
+
+    /**
+    Starts polling when an IME-related keyUp event occurs on a node.
+
+    @method _onKeyUp
+    @param {EventFacade} e
+    @param {SyntheticEvent.Notifier} notifier
+    @protected
+    @static
+    **/
+    _onKeyUp: function (e, notifier) {
+        // These charCodes indicate that an IME has started. We'll restart
+        // polling and give the IME up to 10 seconds (by default) to finish.
+        if (e.charCode === 229 || e.charCode === 197) {
+            VC._startPolling(e.currentTarget, notifier, {
+                e    : e,
+                force: true
+            });
+        }
+    },
+
+    /**
+    Starts polling when a node receives a mouseDown event.
+
+    @method _onMouseDown
+    @param {EventFacade} e
+    @param {SyntheticEvent.Notifier} notifier
+    @protected
+    @static
+    **/
+    _onMouseDown: function (e, notifier) {
+        VC._startPolling(e.currentTarget, notifier, {e: e});
+    },
+
+    /**
+    Called when the `valuechange` event receives a new subscriber.
+
+    Child nodes that aren't initially available when this subscription is
+    called will still fire the `valuechange` event after their data is
+    collected when the delegated `focus` event is captured. This includes
+    elements that haven't been inserted into the DOM yet, as well as
+    elements that aren't initially `contenteditable`.
+
+    @method _onSubscribe
+    @param {Node} node
+    @param {Subscription} sub
+    @param {SyntheticEvent.Notifier} notifier
+    @param {Function|String} [filter] Filter function or selector string. Only
+        provided for delegate subscriptions.
+    @protected
+    @static
+    **/
+    _onSubscribe: function (node, sub, notifier, filter) {
+        var _valuechange, callbacks, isEditable, inputNodes, editableNodes;
+
+        callbacks = {
+            blur     : VC._onBlur,
+            focus    : VC._onFocus,
+            keydown  : VC._onKeyDown,
+            keyup    : VC._onKeyUp,
+            mousedown: VC._onMouseDown
+        };
+
+        // Store a utility object on the notifier to hold stuff that needs to be
+        // passed around to trigger event handlers, polling handlers, etc.
+        _valuechange = notifier._valuechange = {};
+
+        if (filter) {
+            // If a filter is provided, then this is a delegated subscription.
+            _valuechange.delegated = true;
+
+            // Add a function to the notifier that we can use to find all
+            // nodes that pass the delegate filter.
+            _valuechange.getNodes = function () {
+                inputNodes    = node.all('input,textarea,select').filter(filter);
+                editableNodes = node.all('[contenteditable="true"],[contenteditable=""]').filter(filter);
+
+                return inputNodes.concat(editableNodes);
+            };
+
+            // Store the initial values for each descendant of the container
+            // node that passes the delegate filter.
+            _valuechange.getNodes().each(function (child) {
+                if (!child.getData(DATA_KEY)) {
+                    child.setData(DATA_KEY, {
+                        nodeName   : child.get(NODE_NAME).toLowerCase(),
+                        isEditable : VC._isEditable(child),
+                        prevVal    : isEditable ? child.getDOMNode().innerHTML : child.get(VALUE)
+                    });
+                }
+            });
+
+            notifier._handles = Y.delegate(callbacks, node, filter, null,
+                notifier);
+        } else {
+            isEditable = VC._isEditable(node);
+            // This is a normal (non-delegated) event subscription.
+            if (!node.test('input,textarea,select') && !isEditable) {
+                return;
+            }
+
+            if (!node.getData(DATA_KEY)) {
+                node.setData(DATA_KEY, {
+                    nodeName   : node.get(NODE_NAME).toLowerCase(),
+                    isEditable : isEditable,
+                    prevVal    : isEditable ? node.getDOMNode().innerHTML : node.get(VALUE)
+                });
+            }
+
+            notifier._handles = node.on(callbacks, null, null, notifier);
+        }
+    },
+
+    /**
+    Called when the `valuechange` event loses a subscriber.
+
+    @method _onUnsubscribe
+    @param {Node} node
+    @param {Subscription} subscription
+    @param {SyntheticEvent.Notifier} notifier
+    @protected
+    @static
+    **/
+    _onUnsubscribe: function (node, subscription, notifier) {
+        var _valuechange = notifier._valuechange;
+
+        notifier._handles && notifier._handles.detach();
+
+        if (_valuechange.delegated) {
+            _valuechange.getNodes().each(function (child) {
+                VC._stopPolling(child, notifier);
+            });
+        } else {
+            VC._stopPolling(node, notifier);
+        }
+    }
+};
+
+/**
+Synthetic event that fires when the `value` property of an `<input>`,
+`<textarea>`, `<select>`, or `[contenteditable="true"]` node changes as a
+result of a user-initiated keystroke, mouse operation, or input method
+editor (IME) input event.
+
+Unlike the `onchange` event, this event fires when the value actually changes
+and not when the element loses focus. This event also reports IME and
+multi-stroke input more reliably than `oninput` or the various key events across
+browsers.
+
+For performance reasons, only focused nodes are monitored for changes, so
+programmatic value changes on nodes that don't have focus won't be detected.
+
+@example
+
+    YUI().use('event-valuechange', function (Y) {
+        Y.one('#my-input').on('valuechange', function (e) {
+        });
+    });
+
+@event valuechange
+@param {String} prevVal Previous value prior to the latest change.
+@param {String} newVal New value after the latest change.
+@for YUI
+**/
+
+config = {
+    detach: VC._onUnsubscribe,
+    on    : VC._onSubscribe,
+
+    delegate      : VC._onSubscribe,
+    detachDelegate: VC._onUnsubscribe,
+
+    publishConfig: {
+        emitFacade: true
+    }
+};
+
+Y.Event.define('valuechange', config);
+Y.Event.define('valueChange', config); // deprecated, but supported for backcompat
+
+Y.ValueChange = VC;
+
+
+}, '3.17.2', {"requires": ["event-focus", "event-synthetic"]});

Added: roller/trunk/app/src/main/webapp/roller-ui/yui3/intl-base/intl-base-min.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/yui3/intl-base/intl-base-min.js?rev=1609870&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/yui3/intl-base/intl-base-min.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/yui3/intl-base/intl-base-min.js Sat Jul 12 00:34:02 2014
@@ -0,0 +1,8 @@
+/*
+YUI 3.17.2 (build 9c3c78e)
+Copyright 2014 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+
+YUI.add("intl-base",function(e,t){var n=/[, ]/;e.mix(e.namespace("Intl"),{lookupBestLang:function(t,r){function a(e){var t;for(t=0;t<r.length;t+=1)if(e.toLowerCase()===r[t].toLowerCase())return r[t]}var i,s,o,u;e.Lang.isString(t)&&(t=t.split(n));for(i=0;i<t.length;i+=1){s=t[i];if(!s||s==="*")continue;while(s.length>0){o=a(s);if(o)return o;u=s.lastIndexOf("-");if(!(u>=0))break;s=s.substring(0,u),u>=2&&s.charAt(u-2)==="-"&&(s=s.substring(0,u-2))}}return""}})},"3.17.2",{requires:["yui-base"]});

Added: roller/trunk/app/src/main/webapp/roller-ui/yui3/intl-base/intl-base.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/yui3/intl-base/intl-base.js?rev=1609870&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/yui3/intl-base/intl-base.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/yui3/intl-base/intl-base.js Sat Jul 12 00:34:02 2014
@@ -0,0 +1,95 @@
+/*
+YUI 3.17.2 (build 9c3c78e)
+Copyright 2014 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+
+YUI.add('intl-base', function (Y, NAME) {
+
+/**
+ * The Intl utility provides a central location for managing sets of
+ * localized resources (strings and formatting patterns).
+ *
+ * @class Intl
+ * @uses EventTarget
+ * @static
+ */
+
+var SPLIT_REGEX = /[, ]/;
+
+Y.mix(Y.namespace('Intl'), {
+
+ /**
+    * Returns the language among those available that
+    * best matches the preferred language list, using the Lookup
+    * algorithm of BCP 47.
+    * If none of the available languages meets the user's preferences,
+    * then "" is returned.
+    * Extended language ranges are not supported.
+    *
+    * @method lookupBestLang
+    * @param {String[] | String} preferredLanguages The list of preferred
+    * languages in descending preference order, represented as BCP 47
+    * language tags. A string array or a comma-separated list.
+    * @param {String[]} availableLanguages The list of languages
+    * that the application supports, represented as BCP 47 language
+    * tags.
+    *
+    * @return {String} The available language that best matches the
+    * preferred language list, or "".
+    * @since 3.1.0
+    */
+    lookupBestLang: function(preferredLanguages, availableLanguages) {
+
+        var i, language, result, index;
+
+        // check whether the list of available languages contains language;
+        // if so return it
+        function scan(language) {
+            var i;
+            for (i = 0; i < availableLanguages.length; i += 1) {
+                if (language.toLowerCase() ===
+                            availableLanguages[i].toLowerCase()) {
+                    return availableLanguages[i];
+                }
+            }
+        }
+
+        if (Y.Lang.isString(preferredLanguages)) {
+            preferredLanguages = preferredLanguages.split(SPLIT_REGEX);
+        }
+
+        for (i = 0; i < preferredLanguages.length; i += 1) {
+            language = preferredLanguages[i];
+            if (!language || language === '*') {
+                continue;
+            }
+            // check the fallback sequence for one language
+            while (language.length > 0) {
+                result = scan(language);
+                if (result) {
+                    return result;
+                } else {
+                    index = language.lastIndexOf('-');
+                    if (index >= 0) {
+                        language = language.substring(0, index);
+                        // one-character subtags get cut along with the
+                        // following subtag
+                        if (index >= 2 && language.charAt(index - 2) === '-') {
+                            language = language.substring(0, index - 2);
+                        }
+                    } else {
+                        // nothing available for this language
+                        break;
+                    }
+                }
+            }
+        }
+
+        return '';
+    }
+});
+
+
+}, '3.17.2', {"requires": ["yui-base"]});

Added: roller/trunk/app/src/main/webapp/roller-ui/yui3/intl/intl-min.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/yui3/intl/intl-min.js?rev=1609870&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/yui3/intl/intl-min.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/yui3/intl/intl-min.js Sat Jul 12 00:34:02 2014
@@ -0,0 +1,8 @@
+/*
+YUI 3.17.2 (build 9c3c78e)
+Copyright 2014 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+
+YUI.add("intl",function(e,t){var n={},r="yuiRootLang",i="yuiActiveLang",s=[];e.mix(e.namespace("Intl"),{_mod:function(e){return n[e]||(n[e]={}),n[e]},setLang:function(e,t){var n=this._mod(e),s=n[i],o=!!n[t];return o&&t!==s&&(n[i]=t,this.fire("intl:langChange",{module:e,prevVal:s,newVal:t===r?"":t})),o},getLang:function(e){var t=this._mod(e)[i];return t===r?"":t},add:function(e,t,n){t=t||r,this._mod(e)[t]=n,this.setLang(e,t)},get:function(t,n,r){var s=this._mod(t),o;return r=r||s[i],o=s[r]||{},n?o[n]:e.merge(o)},getAvailableLangs:function(t){var n=e.Env._loader,r=n&&n.moduleInfo[t],i=r&&r.lang;return i?i.concat():s}}),e.augment(e.Intl,e.EventTarget),e.Intl.publish("intl:langChange",{emitFacade:!0})},"3.17.2",{requires:["intl-base","event-custom"]});

Added: roller/trunk/app/src/main/webapp/roller-ui/yui3/intl/intl.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/yui3/intl/intl.js?rev=1609870&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/yui3/intl/intl.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/yui3/intl/intl.js Sat Jul 12 00:34:02 2014
@@ -0,0 +1,157 @@
+/*
+YUI 3.17.2 (build 9c3c78e)
+Copyright 2014 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+
+YUI.add('intl', function (Y, NAME) {
+
+var _mods = {},
+
+    ROOT_LANG = "yuiRootLang",
+    ACTIVE_LANG = "yuiActiveLang",
+    NONE = [];
+
+/**
+ * Provides utilities to support the management of localized resources (strings and formatting patterns).
+ *
+ * @module intl
+ */
+
+/**
+ * The Intl utility provides a central location for managing sets of localized resources (strings and formatting patterns).
+ *
+ * @class Intl
+ * @uses EventTarget
+ * @static
+ */
+Y.mix(Y.namespace("Intl"), {
+
+    /**
+     * Private method to retrieve the language hash for a given module.
+     *
+     * @method _mod
+     * @private
+     *
+     * @param {String} module The name of the module
+     * @return {Object} The hash of localized resources for the module, keyed by BCP language tag
+     */
+    _mod : function(module) {
+        if (!_mods[module]) {
+            _mods[module] = {};
+        }
+        return _mods[module];
+    },
+
+    /**
+     * Sets the active language for the given module.
+     *
+     * Returns false on failure, which would happen if the language had not been registered through the <a href="#method_add">add()</a> method.
+     *
+     * @method setLang
+     *
+     * @param {String} module The module name.
+     * @param {String} lang The BCP 47 language tag.
+     * @return boolean true if successful, false if not.
+     */
+    setLang : function(module, lang) {
+        var langs = this._mod(module),
+            currLang = langs[ACTIVE_LANG],
+            exists = !!langs[lang];
+
+        if (exists && lang !== currLang) {
+            langs[ACTIVE_LANG] = lang;
+            this.fire("intl:langChange", {module: module, prevVal: currLang, newVal: (lang === ROOT_LANG) ? "" : lang});
+        }
+
+        return exists;
+    },
+
+    /**
+     * Get the currently active language for the given module.
+     *
+     * @method getLang
+     *
+     * @param {String} module The module name.
+     * @return {String} The BCP 47 language tag.
+     */
+    getLang : function(module) {
+        var lang = this._mod(module)[ACTIVE_LANG];
+        return (lang === ROOT_LANG) ? "" : lang;
+    },
+
+    /**
+     * Register a hash of localized resources for the given module and language
+     *
+     * @method add
+     *
+     * @param {String} module The module name.
+     * @param {String} lang The BCP 47 language tag.
+     * @param {Object} strings The hash of localized values, keyed by the string name.
+     */
+    add : function(module, lang, strings) {
+        lang = lang || ROOT_LANG;
+        this._mod(module)[lang] = strings;
+        this.setLang(module, lang);
+    },
+
+    /**
+     * Gets the module's localized resources for the currently active language (as provided by the <a href="#method_getLang">getLang</a> method).
+     * <p>
+     * Optionally, the localized resources for alternate languages which have been added to Intl (see the <a href="#method_add">add</a> method) can
+     * be retrieved by providing the BCP 47 language tag as the lang parameter.
+     * </p>
+     * @method get
+     *
+     * @param {String} module The module name.
+     * @param {String} key Optional. A single resource key. If not provided, returns a copy (shallow clone) of all resources.
+     * @param {String} lang Optional. The BCP 47 language tag. If not provided, the module's currently active language is used.
+     * @return String | Object A copy of the module's localized resources, or a single value if key is provided.
+     */
+    get : function(module, key, lang) {
+        var mod = this._mod(module),
+            strs;
+
+        lang = lang || mod[ACTIVE_LANG];
+        strs = mod[lang] || {};
+
+        return (key) ? strs[key] : Y.merge(strs);
+    },
+
+    /**
+     * Gets the list of languages for which localized resources are available for a given module, based on the module
+     * meta-data (part of loader). If loader is not on the page, returns an empty array.
+     *
+     * @method getAvailableLangs
+     * @param {String} module The name of the module
+     * @return {Array} The array of languages available.
+     */
+    getAvailableLangs : function(module) {
+        var loader = Y.Env._loader,
+            mod = loader && loader.moduleInfo[module],
+            langs = mod && mod.lang;
+        return (langs) ? langs.concat() : NONE;
+
+    }
+});
+
+Y.augment(Y.Intl, Y.EventTarget);
+
+/**
+ * Notification event to indicate when the lang for a module has changed. There is no default behavior associated with this event,
+ * so the on and after moments are equivalent.
+ *
+ * @event intl:langChange
+ * @param {EventFacade} e The event facade
+ * <p>The event facade contains:</p>
+ * <dl>
+ *     <dt>module</dt><dd>The name of the module for which the language changed</dd>
+ *     <dt>newVal</dt><dd>The new language tag</dd>
+ *     <dt>prevVal</dt><dd>The current language tag</dd>
+ * </dl>
+ */
+Y.Intl.publish("intl:langChange", {emitFacade:true});
+
+
+}, '3.17.2', {"requires": ["intl-base", "event-custom"]});



Mime
View raw message