You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by gm...@apache.org on 2014/07/12 02:34:04 UTC

svn commit: r1609870 [1/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...

Author: gmazza
Date: Sat Jul 12 00:34:02 2014
New Revision: 1609870

URL: http://svn.apache.org/r1609870
Log:
Updated autocomplete from YUI2 to YUI3.

Added:
    roller/trunk/app/src/main/webapp/roller-ui/yui3/array-extras/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/array-extras/array-extras-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/array-extras/array-extras.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-base/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-base/autocomplete-base-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-base/autocomplete-base.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-filters/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-filters/autocomplete-filters-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-filters/autocomplete-filters.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list-keys/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list-keys/autocomplete-list-keys-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list-keys/autocomplete-list-keys.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list/assets/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list/assets/autocomplete-list-core.css
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list/assets/skins/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list/assets/skins/night/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list/assets/skins/night/autocomplete-list-skin.css
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list/assets/skins/night/autocomplete-list.css
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list/assets/skins/sam/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list/assets/skins/sam/autocomplete-list-skin.css
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list/assets/skins/sam/autocomplete-list.css
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list/autocomplete-list-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list/autocomplete-list.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list/lang/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list/lang/autocomplete-list.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list/lang/autocomplete-list_en.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list/lang/autocomplete-list_es.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list/lang/autocomplete-list_hu.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-list/lang/autocomplete-list_it.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-plugin/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-plugin/autocomplete-plugin-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-plugin/autocomplete-plugin.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-sources/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-sources/autocomplete-sources-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-sources/autocomplete-sources.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/dataschema-base/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/dataschema-base/dataschema-base-debug.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/dataschema-base/dataschema-base-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/dataschema-json/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/dataschema-json/dataschema-json-debug.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/dataschema-json/dataschema-json-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-io/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-io/datasource-io-debug.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-io/datasource-io-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-jsonschema/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-jsonschema/datasource-jsonschema-debug.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-jsonschema/datasource-jsonschema-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-local/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-local/datasource-local-debug.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/datasource-local/datasource-local-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/escape/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/escape/escape-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/escape/escape.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/event-resize/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/event-resize/event-resize-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/event-resize/event-resize.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/event-valuechange/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/event-valuechange/event-valuechange-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/event-valuechange/event-valuechange.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/intl/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/intl-base/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/intl-base/intl-base-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/intl-base/intl-base.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/intl/intl-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/intl/intl.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/io-base/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/io-base/io-base-debug.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/io-base/io-base-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/json-parse/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/json-parse/json-parse-debug.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/json-parse/json-parse-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/json-stringify/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/json-stringify/json-stringify-debug.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/json-stringify/json-stringify-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/querystring-stringify-simple/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/querystring-stringify-simple/querystring-stringify-simple-debug.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/querystring-stringify-simple/querystring-stringify-simple-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/selector-css2/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/selector-css2/selector-css2-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/selector-css2/selector-css2.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/selector-css3/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/selector-css3/selector-css3-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/selector-css3/selector-css3.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/shim-plugin/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/shim-plugin/shim-plugin-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/shim-plugin/shim-plugin.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/text-data-wordbreak/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/text-data-wordbreak/text-data-wordbreak-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/text-data-wordbreak/text-data-wordbreak.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/text-wordbreak/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/text-wordbreak/text-wordbreak-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/text-wordbreak/text-wordbreak.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/widget-position/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/widget-position-align/
    roller/trunk/app/src/main/webapp/roller-ui/yui3/widget-position-align/widget-position-align-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/widget-position-align/widget-position-align.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/widget-position/widget-position-min.js
    roller/trunk/app/src/main/webapp/roller-ui/yui3/widget-position/widget-position.js
Modified:
    roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryAdd.jsp
    roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryEdit.jsp

Modified: roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryAdd.jsp
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryAdd.jsp?rev=1609870&r1=1609869&r2=1609870&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryAdd.jsp (original)
+++ roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryAdd.jsp Sat Jul 12 00:34:02 2014
@@ -19,15 +19,12 @@
 
 <%-- container* files needed for yui-overlay in editor-text.jsp --%>
 <link rel="stylesheet" type="text/css" href="<s:url value='/roller-ui/yui/assets/skins/sam/container.css'/>" />
-<link rel="stylesheet" type="text/css" href="<s:url value='/roller-ui/yui/autocomplete/assets/skins/sam/autocomplete.css'/>">
+<link rel="stylesheet" type="text/css" media="all" href='/roller/roller-ui/yui3/assets/skins/sam/autocomplete-list.css'/>
 <link rel="stylesheet" type="text/css" media="all" href='<s:url value="/roller-ui/styles/jquery.ui.all.css"/>' />
 
 <script type="text/javascript" src="<s:url value='/roller-ui/yui/yahoo-dom-event/yahoo-dom-event.js'/>"></script>
 <script type="text/javascript" src="<s:url value='/roller-ui/yui/container/container-min.js' />"></script>
-<script type="text/javascript" src="<s:url value='/roller-ui/yui/datasource/datasource-min.js'/>"></script>
-<script type="text/javascript" src="<s:url value='/roller-ui/yui/animation/animation-min.js'/>"></script>
-<script type="text/javascript" src="<s:url value='/roller-ui/yui/connection/connection-min.js'/>"></script>
-<script type="text/javascript" src="<s:url value='/roller-ui/yui/autocomplete/autocomplete-min.js'/>"></script>
+<script type="text/javascript" src="<s:url value='/roller-ui/yui3/yui/yui-min.js' />"></script>
 <script type="text/javascript" src="<s:url value="/roller-ui/scripts/jquery-2.1.1.min.js" />"></script>
 <script type="text/javascript" src="<s:url value='/roller-ui/scripts/jquery-ui.custom.min.js'/>"></script>
 
@@ -86,13 +83,7 @@
                 <label for="title"><s:text name="weblogEdit.tags" /></label>
             </td>
             <td>
-
-                <div id="tagAutoCompleteWrapper">
-                    <s:textfield id="tagAutoComplete" cssClass="entryEditTags"
-                        name="bean.tagsAsString" size="70" maxlength="255" tabindex="3" />
-                    <div id="tagAutoCompleteContainer"></div>
-                </div>
-
+                <s:textfield id="tagAutoComplete" cssClass="entryEditTags" name="bean.tagsAsString" size="70" maxlength="255" tabindex="3" />
             </td>
         </tr>
 
@@ -235,31 +226,26 @@ if (getCookie('control_pluginControl') !
         togglePlusMinus('ipluginControl');
     }
 }
-YAHOO.example.RemoteCustomRequest = function() {
-    // Use an XHRDataSource
-    var oDS = new YAHOO.util.XHRDataSource('<s:property value="jsonAutocompleteUrl" />');
-    // Set the responseType
-    oDS.responseType = YAHOO.util.XHRDataSource.TYPE_JSON;
-    // Define the schema of the JSON results
-    oDS.responseSchema = {
-        resultsList : "tagcounts",
-        fields : ["tag"]
-    };
-
-    // Instantiate the AutoComplete
-    var oAC = new YAHOO.widget.AutoComplete("tagAutoComplete", "tagAutoCompleteContainer", oDS);
-    // Delimiter character, allow multiple tags to be chosen
-    oAC.delimChar = [","," "];
-    // Throttle requests sent
-    oAC.queryDelay = .5;
-    // The webservice needs additional parameters
-    oAC.generateRequest = function(sQuery) {
-        return "?format=json&prefix=" + sQuery ;
-    };
-
-    return {
-        oDS: oDS,
-        oAC: oAC
-    };
-}();
+YUI().use(['autocomplete', 'autocomplete-filters', "datasource-io", "datasource-jsonschema"], function (Y) {
+
+    var ds2 = new Y.DataSource.Local({source:['chicago', 'colonial', 'countrymen', 'Romans', 'boston', 'baltimore', 'baseball']});
+
+    var ds = new Y.DataSource.IO({
+        source: "<s:property value="jsonAutocompleteUrl" />"
+    });
+
+    ds.plug({fn: Y.Plugin.DataSourceJSONSchema, cfg: {
+        schema: {
+            resultListLocator: 'tagcounts',
+            resultFields: ['tag']
+        }
+    }});
+
+    Y.one('#tagAutoComplete').plug(Y.Plugin.AutoComplete, {
+      queryDelimiter: ' ',
+      requestTemplate: '?format=json&prefix={query}',
+      resultTextLocator: 'tag',
+      source: ds
+    });
+});
 </script>

Modified: roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryEdit.jsp
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryEdit.jsp?rev=1609870&r1=1609869&r2=1609870&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryEdit.jsp (original)
+++ roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryEdit.jsp Sat Jul 12 00:34:02 2014
@@ -19,15 +19,12 @@
 
 <%-- container* files needed for yui-overlay in editor-text.jsp --%>
 <link rel="stylesheet" type="text/css" href="<s:url value='/roller-ui/yui/assets/skins/sam/container.css'/>" />
-<link rel="stylesheet" type="text/css" href="<s:url value='/roller-ui/yui/autocomplete/assets/skins/sam/autocomplete.css'/>">
+<link rel="stylesheet" type="text/css" media="all" href='/roller/roller-ui/yui3/assets/skins/sam/autocomplete-list.css'/>
 <link rel="stylesheet" type="text/css" media="all" href='<s:url value="/roller-ui/styles/jquery.ui.all.css"/>' />
 
 <script type="text/javascript" src="<s:url value='/roller-ui/yui/yahoo-dom-event/yahoo-dom-event.js'/>"></script>
 <script type="text/javascript" src="<s:url value='/roller-ui/yui/container/container-min.js' />"></script>
-<script type="text/javascript" src="<s:url value='/roller-ui/yui/datasource/datasource-min.js'/>"></script>
-<script type="text/javascript" src="<s:url value='/roller-ui/yui/animation/animation-min.js'/>"></script>
-<script type="text/javascript" src="<s:url value='/roller-ui/yui/connection/connection-min.js'/>"></script>
-<script type="text/javascript" src="<s:url value='/roller-ui/yui/autocomplete/autocomplete-min.js'/>"></script>
+<script type="text/javascript" src="<s:url value='/roller-ui/yui3/yui/yui-min.js' />"></script>
 <script type="text/javascript" src="<s:url value="/roller-ui/scripts/jquery-2.1.1.min.js" />"></script>
 <script type="text/javascript" src="<s:url value='/roller-ui/scripts/jquery-ui.custom.min.js'/>"></script>
 
@@ -39,11 +36,9 @@
 </style>
 
 <script type="text/javascript">
-<!--
 function fullPreviewMode() {
     window.open('<s:property value="previewURL" />', '_preview', '');
 }
--->
 </script>
 
 <p class="subtitle">
@@ -87,7 +82,6 @@ function fullPreviewMode() {
                             &nbsp;&nbsp;&nbsp;&nbsp;<img src='<s:url value="/images/launch-link.png"/>' />
                             <a href='<s:property value="entry.permalink" />'><s:text name="weblogEdit.permaLink" /></a>
                         </s:if>
-                        
                     </span>
                 </s:if>
                 <s:elseif test="bean.draft">
@@ -146,10 +140,7 @@ function fullPreviewMode() {
                 <label for="title"><s:text name="weblogEdit.tags" /></label>
             </td>
             <td>
-                <div id="tagAutoCompleteWrapper">
-                    <s:textfield id="tagAutoComplete" cssClass="entryEditTags" name="bean.tagsAsString" size="70" maxlength="255" tabindex="3" />
-                    <div id="tagAutoCompleteContainer"></div>
-                </div>
+                <s:textfield id="tagAutoComplete" cssClass="entryEditTags" name="bean.tagsAsString" size="70" maxlength="255" tabindex="3" />
             </td>
         </tr> 
         
@@ -322,31 +313,26 @@ if (getCookie('control_pluginControl') !
         togglePlusMinus('ipluginControl');
     }
 }
-YAHOO.example.RemoteCustomRequest = function() {
-    // Use an XHRDataSource
-    var oDS = new YAHOO.util.XHRDataSource("<s:property value="jsonAutocompleteUrl" />");
-    // Set the responseType
-    oDS.responseType = YAHOO.util.XHRDataSource.TYPE_JSON;
-    // Define the schema of the JSON results
-    oDS.responseSchema = {
-        resultsList : "tagcounts",
-        fields : ["tag"]
-    };
-
-    // Instantiate the AutoComplete
-    var oAC = new YAHOO.widget.AutoComplete("tagAutoComplete", "tagAutoCompleteContainer", oDS);
-    // Delimiter character, allow multiple tags to be chosen
-    oAC.delimChar = [","," "];
-    // Throttle requests sent
-    oAC.queryDelay = .5;
-    // The webservice needs additional parameters
-    oAC.generateRequest = function(sQuery) {
-        return "?format=json&prefix=" + sQuery ;
-    };
-
-    return {
-        oDS: oDS,
-        oAC: oAC
-    };
-}();
+YUI().use(['autocomplete', 'autocomplete-filters', "datasource-io", "datasource-jsonschema"], function (Y) {
+
+    var ds2 = new Y.DataSource.Local({source:['chicago', 'colonial', 'countrymen', 'Romans', 'boston', 'baltimore', 'baseball']});
+
+    var ds = new Y.DataSource.IO({
+        source: "<s:property value="jsonAutocompleteUrl" />"
+    });
+
+    ds.plug({fn: Y.Plugin.DataSourceJSONSchema, cfg: {
+        schema: {
+            resultListLocator: 'tagcounts',
+            resultFields: ['tag']
+        }
+    }});
+
+    Y.one('#tagAutoComplete').plug(Y.Plugin.AutoComplete, {
+      queryDelimiter: ' ',
+      requestTemplate: '?format=json&prefix={query}',
+      resultTextLocator: 'tag',
+      source: ds
+    });
+});
 </script>

Added: roller/trunk/app/src/main/webapp/roller-ui/yui3/array-extras/array-extras-min.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/yui3/array-extras/array-extras-min.js?rev=1609870&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/yui3/array-extras/array-extras-min.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/yui3/array-extras/array-extras-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("array-extras",function(e,t){var n=e.Array,r=e.Lang,i=Array.prototype;n.lastIndexOf=r._isNative(i.lastIndexOf)?function(e,t,n){return n||n===0?e.lastIndexOf(t,n):e.lastIndexOf(t)}:function(e,t,n){var r=e.length,i=r-1;if(n||n===0)i=Math.min(n<0?r+n:n,r);if(i>-1&&r>0)for(;i>-1;--i)if(i in e&&e[i]===t)return i;return-1},n.unique=function(e,t){var n=0,r=e.length,i=[],s,o,u,a;e:for(;n<r;n++){a=e[n];for(s=0,u=i.length;s<u;s++){o=i[s];if(t){if(t.call(e,a,o,n,e))continue e}else if(a===o)continue e}i.push(a)}return i},n.filter=r._isNative(i.filter)?function(e,t,n){return i.filter.call(e,t,n)}:function(e,t,n){var r=0,i=e.length,s=[],o;for(;r<i;++r)r in e&&(o=e[r],t.call(n,o,r,e)&&s.push(o));return s},n.reject=function(e,t,r){return n.filter(e,function(e,n,i){return!t.call(r,e,n,i)})},n.every=r._isNative(i.every)?function(e,t,n){return i.every.call(e,t,n)}:function(e,t,n){for(var r=0,i=e.length;r<i;++r)if(r in e&&!t.call(n,e[r],r,e))return!1;return!0},n.map=r._isNative(i.map)?function(
 e,t,n){return i.map.call(e,t,n)}:function(e,t,n){var r=0,s=e.length,o=i.concat.call(e);for(;r<s;++r)r in e&&(o[r]=t.call(n,e[r],r,e));return o},n.reduce=r._isNative(i.reduce)?function(e,t,n,r){return i.reduce.call(e,function(e,t,i,s){return n.call(r,e,t,i,s)},t)}:function(e,t,n,r){var i=0,s=e.length,o=t;for(;i<s;++i)i in e&&(o=n.call(r,o,e[i],i,e));return o},n.find=function(e,t,n){for(var r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r,e))return e[r];return null},n.grep=function(e,t){return n.filter(e,function(e,n){return t.test(e)})},n.partition=function(e,t,r){var i={matches:[],rejects:[]};return n.each(e,function(n,s){var u=t.call(r,n,s,e)?i.matches:i.rejects;u.push(n)}),i},n.zip=function(e,t){var r=[];return n.each(e,function(e,n){r.push([e,t[n]])}),r},n.flatten=function(e){var t=[],i,s,o;if(!e)return t;for(i=0,s=e.length;i<s;++i)o=e[i],r.isArray(o)?t.push.apply(t,n.flatten(o)):t.push(o);return t}},"3.17.2",{requires:["yui-base"]});

Added: roller/trunk/app/src/main/webapp/roller-ui/yui3/array-extras/array-extras.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/yui3/array-extras/array-extras.js?rev=1609870&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/yui3/array-extras/array-extras.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/yui3/array-extras/array-extras.js Sat Jul 12 00:34:02 2014
@@ -0,0 +1,407 @@
+/*
+YUI 3.17.2 (build 9c3c78e)
+Copyright 2014 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+
+YUI.add('array-extras', function (Y, NAME) {
+
+/**
+Adds additional utility methods to the `Y.Array` class.
+
+@module collection
+@submodule array-extras
+**/
+
+var A          = Y.Array,
+    L          = Y.Lang,
+    ArrayProto = Array.prototype;
+
+/**
+Returns the index of the last item in the array that contains the specified
+value, or `-1` if the value isn't found.
+
+@method lastIndexOf
+@param {Array} a Array to search in.
+@param {Any} val Value to search for.
+@param {Number} [fromIndex] Index at which to start searching backwards.
+  Defaults to the array's length - 1. If negative, it will be taken as an offset
+  from the end of the array. If the calculated index is less than 0, the array
+  will not be searched and `-1` will be returned.
+@return {Number} Index of the item that contains the value, or `-1` if not
+  found.
+@static
+@for Array
+**/
+A.lastIndexOf = L._isNative(ArrayProto.lastIndexOf) ?
+    function(a, val, fromIndex) {
+        // An undefined fromIndex is still considered a value by some (all?)
+        // native implementations, so we can't pass it unless it's actually
+        // specified.
+        return fromIndex || fromIndex === 0 ? a.lastIndexOf(val, fromIndex) :
+                a.lastIndexOf(val);
+    } :
+    function(a, val, fromIndex) {
+        var len = a.length,
+            i   = len - 1;
+
+        if (fromIndex || fromIndex === 0) {
+            i = Math.min(fromIndex < 0 ? len + fromIndex : fromIndex, len);
+        }
+
+        if (i > -1 && len > 0) {
+            for (; i > -1; --i) {
+                if (i in a && a[i] === val) {
+                    return i;
+                }
+            }
+        }
+
+        return -1;
+    };
+
+/**
+Returns a copy of the input array with duplicate items removed.
+
+Note: If the input array only contains strings, the `Y.Array.dedupe()` method is
+a much faster alternative.
+
+@method unique
+@param {Array} array Array to dedupe.
+@param {Function} [testFn] Custom function to use to test the equality of two
+    values. A truthy return value indicates that the values are equal. A falsy
+    return value indicates that the values are not equal.
+
+    @param {Any} testFn.a First value to compare.
+    @param {Any} testFn.b Second value to compare.
+    @param {Number} testFn.index Index of the current item in the original
+        array.
+    @param {Array} testFn.array The original array.
+    @return {Boolean} _true_ if the items are equal, _false_ otherwise.
+
+@return {Array} Copy of the input array with duplicate items removed.
+@static
+**/
+A.unique = function (array, testFn) {
+    var i       = 0,
+        len     = array.length,
+        results = [],
+        j, result, resultLen, value;
+
+    // Note the label here. It's used to jump out of the inner loop when a value
+    // is not unique.
+    outerLoop: for (; i < len; i++) {
+        value = array[i];
+
+        // For each value in the input array, iterate through the result array
+        // and check for uniqueness against each result value.
+        for (j = 0, resultLen = results.length; j < resultLen; j++) {
+            result = results[j];
+
+            // If the test function returns true or there's no test function and
+            // the value equals the current result item, stop iterating over the
+            // results and continue to the next value in the input array.
+            if (testFn) {
+                if (testFn.call(array, value, result, i, array)) {
+                    continue outerLoop;
+                }
+            } else if (value === result) {
+                continue outerLoop;
+            }
+        }
+
+        // If we get this far, that means the current value is not already in
+        // the result array, so add it.
+        results.push(value);
+    }
+
+    return results;
+};
+
+/**
+Executes the supplied function on each item in the array. Returns a new array
+containing the items for which the supplied function returned a truthy value.
+
+@method filter
+@param {Array} a Array to filter.
+@param {Function} f Function to execute on each item.
+@param {Object} [o] Optional context object.
+@return {Array} Array of items for which the supplied function returned a
+  truthy value (empty if it never returned a truthy value).
+@static
+*/
+A.filter = L._isNative(ArrayProto.filter) ?
+    function(a, f, o) {
+        return ArrayProto.filter.call(a, f, o);
+    } :
+    function(a, f, o) {
+        var i       = 0,
+            len     = a.length,
+            results = [],
+            item;
+
+        for (; i < len; ++i) {
+            if (i in a) {
+                item = a[i];
+
+                if (f.call(o, item, i, a)) {
+                    results.push(item);
+                }
+            }
+        }
+
+        return results;
+    };
+
+/**
+The inverse of `Array.filter()`. Executes the supplied function on each item.
+Returns a new array containing the items for which the supplied function
+returned `false`.
+
+@method reject
+@param {Array} a the array to iterate.
+@param {Function} f the function to execute on each item.
+@param {object} [o] Optional context object.
+@return {Array} The items for which the supplied function returned `false`.
+@static
+*/
+A.reject = function(a, f, o) {
+    return A.filter(a, function(item, i, a) {
+        return !f.call(o, item, i, a);
+    });
+};
+
+/**
+Executes the supplied function on each item in the array. Iteration stops if the
+supplied function does not return a truthy value.
+
+@method every
+@param {Array} a the array to iterate.
+@param {Function} f the function to execute on each item.
+@param {Object} [o] Optional context object.
+@return {Boolean} `true` if every item in the array returns `true` from the
+  supplied function, `false` otherwise.
+@static
+*/
+A.every = L._isNative(ArrayProto.every) ?
+    function(a, f, o) {
+        return ArrayProto.every.call(a, f, o);
+    } :
+    function(a, f, o) {
+        for (var i = 0, l = a.length; i < l; ++i) {
+            if (i in a && !f.call(o, a[i], i, a)) {
+                return false;
+            }
+        }
+
+        return true;
+    };
+
+/**
+Executes the supplied function on each item in the array and returns a new array
+containing all the values returned by the supplied function.
+
+@example
+
+    // Convert an array of numbers into an array of strings.
+    Y.Array.map([1, 2, 3, 4], function (item) {
+      return '' + item;
+    });
+    // => ['1', '2', '3', '4']
+
+@method map
+@param {Array} a the array to iterate.
+@param {Function} f the function to execute on each item.
+@param {object} [o] Optional context object.
+@return {Array} A new array containing the return value of the supplied function
+  for each item in the original array.
+@static
+*/
+A.map = L._isNative(ArrayProto.map) ?
+    function(a, f, o) {
+        return ArrayProto.map.call(a, f, o);
+    } :
+    function(a, f, o) {
+        var i       = 0,
+            len     = a.length,
+            results = ArrayProto.concat.call(a);
+
+        for (; i < len; ++i) {
+            if (i in a) {
+                results[i] = f.call(o, a[i], i, a);
+            }
+        }
+
+        return results;
+    };
+
+
+/**
+Executes the supplied function on each item in the array, "folding" the array
+into a single value.
+
+@method reduce
+@param {Array} a Array to iterate.
+@param {Any} init Initial value to start with.
+@param {Function} f Function to execute on each item. This function should
+  update and return the value of the computation. It will receive the following
+  arguments:
+    @param {Any} f.previousValue Value returned from the previous iteration,
+      or the initial value if this is the first iteration.
+    @param {Any} f.currentValue Value of the current item being iterated.
+    @param {Number} f.index Index of the current item.
+    @param {Array} f.array Array being iterated.
+@param {Object} [o] Optional context object.
+@return {Any} Final result from iteratively applying the given function to each
+  element in the array.
+@static
+*/
+A.reduce = L._isNative(ArrayProto.reduce) ?
+    function(a, init, f, o) {
+        // ES5 Array.reduce doesn't support a thisObject, so we need to
+        // implement it manually.
+        return ArrayProto.reduce.call(a, function(init, item, i, a) {
+            return f.call(o, init, item, i, a);
+        }, init);
+    } :
+    function(a, init, f, o) {
+        var i      = 0,
+            len    = a.length,
+            result = init;
+
+        for (; i < len; ++i) {
+            if (i in a) {
+                result = f.call(o, result, a[i], i, a);
+            }
+        }
+
+        return result;
+    };
+
+/**
+Executes the supplied function on each item in the array, searching for the
+first item that matches the supplied function.
+
+@method find
+@param {Array} a the array to search.
+@param {Function} f the function to execute on each item. Iteration is stopped
+  as soon as this function returns `true`.
+@param {Object} [o] Optional context object.
+@return {Object} the first item that the supplied function returns `true` for,
+  or `null` if it never returns `true`.
+@static
+*/
+A.find = function(a, f, o) {
+    for (var i = 0, l = a.length; i < l; i++) {
+        if (i in a && f.call(o, a[i], i, a)) {
+            return a[i];
+        }
+    }
+    return null;
+};
+
+/**
+Iterates over an array, returning a new array of all the elements that match the
+supplied regular expression.
+
+@method grep
+@param {Array} a Array to iterate over.
+@param {RegExp} pattern Regular expression to test against each item.
+@return {Array} All the items in the array that produce a match against the
+  supplied regular expression. If no items match, an empty array is returned.
+@static
+*/
+A.grep = function(a, pattern) {
+    return A.filter(a, function(item, index) {
+        return pattern.test(item);
+    });
+};
+
+/**
+Partitions an array into two new arrays, one with the items for which the
+supplied function returns `true`, and one with the items for which the function
+returns `false`.
+
+@method partition
+@param {Array} a Array to iterate over.
+@param {Function} f Function to execute for each item in the array. It will
+  receive the following arguments:
+    @param {Any} f.item Current item.
+    @param {Number} f.index Index of the current item.
+    @param {Array} f.array The array being iterated.
+@param {Object} [o] Optional execution context.
+@return {Object} An object with two properties: `matches` and `rejects`. Each is
+  an array containing the items that were selected or rejected by the test
+  function (or an empty array if none).
+@static
+*/
+A.partition = function(a, f, o) {
+    var results = {
+        matches: [],
+        rejects: []
+    };
+
+    A.each(a, function(item, index) {
+        var set = f.call(o, item, index, a) ? results.matches : results.rejects;
+        set.push(item);
+    });
+
+    return results;
+};
+
+/**
+Creates an array of arrays by pairing the corresponding elements of two arrays
+together into a new array.
+
+@method zip
+@param {Array} a Array to iterate over.
+@param {Array} a2 Another array whose values will be paired with values of the
+  first array.
+@return {Array} An array of arrays formed by pairing each element of the first
+  array with an item in the second array having the corresponding index.
+@static
+*/
+A.zip = function(a, a2) {
+    var results = [];
+    A.each(a, function(item, index) {
+        results.push([item, a2[index]]);
+    });
+    return results;
+};
+
+/**
+Flattens an array of nested arrays at any abitrary depth into a single, flat
+array.
+
+@method flatten
+@param {Array} a Array with nested arrays to flatten.
+@return {Array} An array whose nested arrays have been flattened.
+@static
+@since 3.7.0
+**/
+A.flatten = function(a) {
+    var result = [],
+        i, len, val;
+
+    // Always return an array.
+    if (!a) {
+        return result;
+    }
+
+    for (i = 0, len = a.length; i < len; ++i) {
+        val = a[i];
+
+        if (L.isArray(val)) {
+            // Recusively flattens any nested arrays.
+            result.push.apply(result, A.flatten(val));
+        } else {
+            result.push(val);
+        }
+    }
+
+    return result;
+};
+
+
+}, '3.17.2', {"requires": ["yui-base"]});

Added: roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-base/autocomplete-base-min.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-base/autocomplete-base-min.js?rev=1609870&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-base/autocomplete-base-min.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/yui3/autocomplete-base/autocomplete-base-min.js Sat Jul 12 00:34:02 2014
@@ -0,0 +1,9 @@
+/*
+YUI 3.17.2 (build 9c3c78e)
+Copyright 2014 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+
+YUI.add("autocomplete-base",function(e,t){function T(){}var n=e.Escape,r=e.Lang,i=e.Array,s=e.Object,o=r.isFunction,u=r.isString,a=r.trim,f=e.Attribute.INVALID_VALUE,l="_functionValidator",c="_sourceSuccess",h="allowBrowserAutocomplete",p="inputNode",d="query",v="queryDelimiter",m="requestTemplate",g="results",y="resultListLocator",b="value",w="valueChange",E="clear",S=d,x=g;T.prototype={initializer:function(){e.before(this._bindUIACBase,this,"bindUI"),e.before(this._syncUIACBase,this,"syncUI"),this.publish(E,{defaultFn:this._defClearFn}),this.publish(S,{defaultFn:this._defQueryFn}),this.publish(x,{defaultFn:this._defResultsFn})},destructor:function(){this._acBaseEvents&&this._acBaseEvents.detach(),delete this._acBaseEvents,delete this._cache,delete this._inputNode,delete this._rawSource},clearCache:function(){return this._cache&&(this._cache={}),this},sendRequest:function(t,n){var r,i=this.get("source");return t||t===""?this._set(d,t):t=this.get(d)||"",i&&(n||(n=this.get(m)),r=n?n.
 call(this,t):t,i.sendRequest({query:t,request:r,callback:{success:e.bind(this._onResponse,this,t)}})),this},_bindUIACBase:function(){var t=this.get(p),n=t&&t.tokenInput;n&&(t=n.get(p),this._set("tokenInput",n));if(!t){e.error("No inputNode specified.");return}this._inputNode=t,this._acBaseEvents=new e.EventHandle([t.on(w,this._onInputValueChange,this),t.on("blur",this._onInputBlur,this),this.after(h+"Change",this._syncBrowserAutocomplete),this.after("sourceTypeChange",this._afterSourceTypeChange),this.after(w,this._afterValueChange)])},_syncUIACBase:function(){this._syncBrowserAutocomplete(),this.set(b,this.get(p).get(b))},_createArraySource:function(e){var t=this;return{type:"array",sendRequest:function(n){t[c](e.concat(),n)}}},_createFunctionSource:function(e){var t=this;return{type:"function",sendRequest:function(n){function i(e){t[c](e||[],n)}var r;(r=e(n.query,i))&&i(r)}}},_createObjectSource:function(e){var t=this;return{type:"object",sendRequest:function(n){var r=n.query;t[c]
 (s.owns(e,r)?e[r]:[],n)}}},_functionValidator:function(e){return e===null||o(e)},_getObjectValue:function(e,t){if(!e)return;for(var n=0,r=t.length;e&&n<r;n++)e=e[t[n]];return e},_parseResponse:function(e,t,r){var i={data:r,query:e,results:[]},s=this.get(y),o=[],u=t&&t.results,a,f,l,c,h,p,d,v,m,g,b;u&&s&&(u=s.call(this,u));if(u&&u.length){a=this.get("resultFilters"),b=this.get("resultTextLocator");for(p=0,d=u.length;p<d;++p)m=u[p],g=b?b.call(this,m):m.toString(),o.push({display:n.html(g),raw:m,text:g});for(p=0,d=a.length;p<d;++p){o=a[p].call(this,e,o.concat());if(!o)return;if(!o.length)break}if(o.length){l=this.get("resultFormatter"),h=this.get("resultHighlighter"),v=this.get("maxResults"),v&&v>0&&o.length>v&&(o.length=v);if(h){c=h.call(this,e,o.concat());if(!c)return;for(p=0,d=c.length;p<d;++p)m=o[p],m.highlighted=c[p],m.display=m.highlighted}if(l){f=l.call(this,e,o.concat());if(!f)return;for(p=0,d=f.length;p<d;++p)o[p].display=f[p]}}}i.results=o,this.fire(x,i)},_parseValue:function
 (e){var t=this.get(v);return t&&(e=e.split(t),e=e[e.length-1]),r.trimLeft(e)},_setEnableCache:function(e){this._cache=e?{}:null},_setLocator:function(e){if(this[l](e))return e;var t=this;return e=e.toString().split("."),function(n){return n&&t._getObjectValue(n,e)}},_setRequestTemplate:function(e){return this[l](e)?e:(e=e.toString(),function(t){return r.sub(e,{query:encodeURIComponent(t)})})},_setResultFilters:function(t){var n,s;return t===null?[]:(n=e.AutoCompleteFilters,s=function(e){return o(e)?e:u(e)&&n&&o(n[e])?n[e]:!1},r.isArray(t)?(t=i.map(t,s),i.every(t,function(e){return!!e})?t:f):(t=s(t),t?[t]:f))},_setResultHighlighter:function(t){var n;return this[l](t)?t:(n=e.AutoCompleteHighlighters,u(t)&&n&&o(n[t])?n[t]:f)},_setSource:function(t){var n=this.get("sourceType")||r.type(t),i;return t&&o(t.sendRequest)||t===null||n==="datasource"?(this._rawSource=t,t):(i=T.SOURCE_TYPES[n])?(this._rawSource=t,r.isString(i)?this[i](t):i(t)):(e.error("Unsupported source type '"+n+"'. Maybe a
 utocomplete-sources isn't loaded?"),f)},_sourceSuccess:function(e,t){t.callback.success({data:e,response:{results:e}})},_syncBrowserAutocomplete:function(){var e=this.get(p);e.get("nodeName").toLowerCase()==="input"&&e.setAttribute("autocomplete",this.get(h)?"on":"off")},_updateValue:function(e){var t=this.get(v),n,s,o;e=r.trimLeft(e),t&&(n=a(t),o=i.map(a(this.get(b)).split(t),a),s=o.length,s>1&&(o[s-1]=e,e=o.join(n+" ")),e=e+n+" "),this.set(b,e)},_afterSourceTypeChange:function(e){this._rawSource&&this.set("source",this._rawSource)},_afterValueChange:function(e){var t=e.newVal,n=this,r=e.src===T.UI_SRC,i,s,o,u;r||n._inputNode.set(b,t),o=n.get("minQueryLength"),u=n._parseValue(t)||"",o>=0&&u.length>=o?r?(i=n.get("queryDelay"),s=function(){n.fire(S,{inputValue:t,query:u,src:e.src})},i?(clearTimeout(n._delay),n._delay=setTimeout(s,i)):s()):n._set(d,u):(clearTimeout(n._delay),n.fire(E,{prevVal:e.prevVal?n._parseValue(e.prevVal):null,src:e.src}))},_onInputBlur:function(e){var t=this.get
 (v),n,i,s;if(t&&!this.get("allowTrailingDelimiter")){t=r.trimRight(t),s=i=this._inputNode.get(b);if(t)while((i=r.trimRight(i))&&(n=i.length-t.length)&&i.lastIndexOf(t)===n)i=i.substring(0,n);else i=r.trimRight(i);i!==s&&this.set(b,i)}},_onInputValueChange:function(e){var t=e.newVal;t!==this.get(b)&&this.set(b,t,{src:T.UI_SRC})},_onResponse:function(e,t){e===(this.get(d)||"")&&this._parseResponse(e||"",t.response,t.data)},_defClearFn:function(){this._set(d,null),this._set(g,[])},_defQueryFn:function(e){this.sendRequest(e.query)},_defResultsFn:function(e){this._set(g,e[g])}},T.ATTRS={allowBrowserAutocomplete:{value:!1},allowTrailingDelimiter:{value:!1},enableCache:{lazyAdd:!1,setter:"_setEnableCache",value:!0},inputNode:{setter:e.one,writeOnce:"initOnly"},maxResults:{value:0},minQueryLength:{value:1},query:{readOnly:!0,value:null},queryDelay:{value:100},queryDelimiter:{value:null},requestTemplate:{setter:"_setRequestTemplate",value:null},resultFilters:{setter:"_setResultFilters",value
 :[]},resultFormatter
+:{validator:l,value:null},resultHighlighter:{setter:"_setResultHighlighter",value:null},resultListLocator:{setter:"_setLocator",value:null},results:{readOnly:!0,value:[]},resultTextLocator:{setter:"_setLocator",value:null},source:{setter:"_setSource",value:null},sourceType:{value:null},tokenInput:{readOnly:!0},value:{value:""}},T._buildCfg={aggregates:["SOURCE_TYPES"],statics:["UI_SRC"]},T.SOURCE_TYPES={array:"_createArraySource","function":"_createFunctionSource",object:"_createObjectSource"},T.UI_SRC=e.Widget&&e.Widget.UI_SRC||"ui",e.AutoCompleteBase=T},"3.17.2",{optional:["autocomplete-sources"],requires:["array-extras","base-build","escape","event-valuechange","node-base"]});