You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by he...@apache.org on 2006/11/13 23:55:14 UTC
svn commit: r474551 [19/49] - in
/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo:
./ src/ src/alg/ src/animation/ src/cal/ src/charting/ src/charting/svg/
src/charting/vml/ src/collections/ src/crypto/ src/data/ src/data/cs...
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/html/style.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/html/style.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/html/style.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/html/style.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,577 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.html.style");
+dojo.require("dojo.uri.Uri");
+
+dojo.html.getClass = function(/* HTMLElement */node){
+ // summary
+ // Returns the string value of the list of CSS classes currently assigned directly
+ // to the node in question. Returns an empty string if no class attribute is found;
+ node = dojo.byId(node);
+ if(!node){ return ""; }
+ var cs = "";
+ if(node.className){
+ cs = node.className;
+ }else if(dojo.html.hasAttribute(node, "class")){
+ cs = dojo.html.getAttribute(node, "class");
+ }
+ return cs.replace(/^\s+|\s+$/g, ""); // string
+}
+
+dojo.html.getClasses = function(/* HTMLElement */node) {
+ // summary
+ // Returns an array of CSS classes currently assigned directly to the node in question.
+ // Returns an empty array if no classes are found;
+ var c = dojo.html.getClass(node);
+ return (c == "") ? [] : c.split(/\s+/g); // array
+}
+
+dojo.html.hasClass = function(/* HTMLElement */node, /* string */classname){
+ // summary
+ // Returns whether or not the specified classname is a portion of the
+ // class list currently applied to the node. Does not cover cascaded
+ // styles, only classes directly applied to the node.
+ return (new RegExp('(^|\\s+)'+classname+'(\\s+|$)')).test(dojo.html.getClass(node)) // boolean
+}
+
+dojo.html.prependClass = function(/* HTMLElement */node, /* string */classStr){
+ // summary
+ // Adds the specified class to the beginning of the class list on the
+ // passed node. This gives the specified class the highest precidence
+ // when style cascading is calculated for the node. Returns true or
+ // false; indicating success or failure of the operation, respectively.
+ classStr += " " + dojo.html.getClass(node);
+ return dojo.html.setClass(node, classStr); // boolean
+}
+
+dojo.html.addClass = function(/* HTMLElement */node, /* string */classStr){
+ // summary
+ // Adds the specified class to the end of the class list on the
+ // passed &node;. Returns &true; or &false; indicating success or failure.
+ if (dojo.html.hasClass(node, classStr)) {
+ return false;
+ }
+ classStr = (dojo.html.getClass(node) + " " + classStr).replace(/^\s+|\s+$/g,"");
+ return dojo.html.setClass(node, classStr); // boolean
+}
+
+dojo.html.setClass = function(/* HTMLElement */node, /* string */classStr){
+ // summary
+ // Clobbers the existing list of classes for the node, replacing it with
+ // the list given in the 2nd argument. Returns true or false
+ // indicating success or failure.
+ node = dojo.byId(node);
+ var cs = new String(classStr);
+ try{
+ if(typeof node.className == "string"){
+ node.className = cs;
+ }else if(node.setAttribute){
+ node.setAttribute("class", classStr);
+ node.className = cs;
+ }else{
+ return false;
+ }
+ }catch(e){
+ dojo.debug("dojo.html.setClass() failed", e);
+ }
+ return true;
+}
+
+dojo.html.removeClass = function(/* HTMLElement */node, /* string */classStr, /* boolean? */allowPartialMatches){
+ // summary
+ // Removes the className from the node;. Returns true or false indicating success or failure.
+ try{
+ if (!allowPartialMatches) {
+ var newcs = dojo.html.getClass(node).replace(new RegExp('(^|\\s+)'+classStr+'(\\s+|$)'), "$1$2");
+ } else {
+ var newcs = dojo.html.getClass(node).replace(classStr,'');
+ }
+ dojo.html.setClass(node, newcs);
+ }catch(e){
+ dojo.debug("dojo.html.removeClass() failed", e);
+ }
+ return true; // boolean
+}
+
+dojo.html.replaceClass = function(/* HTMLElement */node, /* string */newClass, /* string */oldClass) {
+ // summary
+ // Replaces 'oldClass' and adds 'newClass' to node
+ dojo.html.removeClass(node, oldClass);
+ dojo.html.addClass(node, newClass);
+}
+
+// Enum type for getElementsByClass classMatchType arg:
+dojo.html.classMatchType = {
+ ContainsAll : 0, // all of the classes are part of the node's class (default)
+ ContainsAny : 1, // any of the classes are part of the node's class
+ IsOnly : 2 // only all of the classes are part of the node's class
+}
+
+
+dojo.html.getElementsByClass = function(
+ /* string */classStr,
+ /* HTMLElement? */parent,
+ /* string? */nodeType,
+ /* integer? */classMatchType,
+ /* boolean? */useNonXpath
+){
+ // summary
+ // Returns an array of nodes for the given classStr, children of a
+ // parent, and optionally of a certain nodeType
+ // FIXME: temporarily set to false because of several dojo tickets related
+ // to the xpath version not working consistently in firefox.
+ useNonXpath = false;
+ var _document = dojo.doc();
+ parent = dojo.byId(parent) || _document;
+ var classes = classStr.split(/\s+/g);
+ var nodes = [];
+ if( classMatchType != 1 && classMatchType != 2 ) classMatchType = 0; // make it enum
+ var reClass = new RegExp("(\\s|^)((" + classes.join(")|(") + "))(\\s|$)");
+ var srtLength = classes.join(" ").length;
+ var candidateNodes = [];
+
+ if(!useNonXpath && _document.evaluate) { // supports dom 3 xpath
+ var xpath = ".//" + (nodeType || "*") + "[contains(";
+ if(classMatchType != dojo.html.classMatchType.ContainsAny){
+ xpath += "concat(' ',@class,' '), ' " +
+ classes.join(" ') and contains(concat(' ',@class,' '), ' ") +
+ " ')";
+ if (classMatchType == 2) {
+ xpath += " and string-length(@class)="+srtLength+"]";
+ }else{
+ xpath += "]";
+ }
+ }else{
+ xpath += "concat(' ',@class,' '), ' " +
+ classes.join(" ') or contains(concat(' ',@class,' '), ' ") +
+ " ')]";
+ }
+ var xpathResult = _document.evaluate(xpath, parent, null, XPathResult.ANY_TYPE, null);
+ var result = xpathResult.iterateNext();
+ while(result){
+ try{
+ candidateNodes.push(result);
+ result = xpathResult.iterateNext();
+ }catch(e){ break; }
+ }
+ return candidateNodes; // NodeList
+ }else{
+ if(!nodeType){
+ nodeType = "*";
+ }
+ candidateNodes = parent.getElementsByTagName(nodeType);
+
+ var node, i = 0;
+ outer:
+ while(node = candidateNodes[i++]){
+ var nodeClasses = dojo.html.getClasses(node);
+ if(nodeClasses.length == 0){ continue outer; }
+ var matches = 0;
+
+ for(var j = 0; j < nodeClasses.length; j++){
+ if(reClass.test(nodeClasses[j])){
+ if(classMatchType == dojo.html.classMatchType.ContainsAny){
+ nodes.push(node);
+ continue outer;
+ }else{
+ matches++;
+ }
+ }else{
+ if(classMatchType == dojo.html.classMatchType.IsOnly){
+ continue outer;
+ }
+ }
+ }
+
+ if(matches == classes.length){
+ if( (classMatchType == dojo.html.classMatchType.IsOnly)&&
+ (matches == nodeClasses.length)){
+ nodes.push(node);
+ }else if(classMatchType == dojo.html.classMatchType.ContainsAll){
+ nodes.push(node);
+ }
+ }
+ }
+ return nodes; // NodeList
+ }
+}
+dojo.html.getElementsByClassName = dojo.html.getElementsByClass;
+
+dojo.html.toCamelCase = function(/* string */selector){
+ // summary
+ // Translates a CSS selector string to a camel-cased one.
+ var arr = selector.split('-'), cc = arr[0];
+ for(var i = 1; i < arr.length; i++) {
+ cc += arr[i].charAt(0).toUpperCase() + arr[i].substring(1);
+ }
+ return cc; // string
+}
+
+dojo.html.toSelectorCase = function(/* string */selector){
+ // summary
+ // Translates a camel cased string to a selector cased one.
+ return selector.replace(/([A-Z])/g, "-$1" ).toLowerCase(); // string
+}
+
+dojo.html.getComputedStyle = function(/* HTMLElement */node, /* string */cssSelector, /* integer? */inValue){
+ // summary
+ // Returns the computed style of cssSelector on node.
+ node = dojo.byId(node);
+ // cssSelector may actually be in camel case, so force selector version
+ var cssSelector = dojo.html.toSelectorCase(cssSelector);
+ var property = dojo.html.toCamelCase(cssSelector);
+ if(!node || !node.style){
+ return inValue;
+ } else if (document.defaultView && dojo.html.isDescendantOf(node, node.ownerDocument)){ // W3, gecko, KHTML
+ try{
+ // mozilla segfaults when margin-* and node is removed from doc
+ // FIXME: need to figure out a if there is quicker workaround
+ var cs = document.defaultView.getComputedStyle(node, "");
+ if(cs){
+ return cs.getPropertyValue(cssSelector); // integer
+ }
+ }catch(e){ // reports are that Safari can throw an exception above
+ if(node.style.getPropertyValue){ // W3
+ return node.style.getPropertyValue(cssSelector); // integer
+ } else {
+ return inValue; // integer
+ }
+ }
+ } else if(node.currentStyle){ // IE
+ return node.currentStyle[property]; // integer
+ }
+
+ if(node.style.getPropertyValue){ // W3
+ return node.style.getPropertyValue(cssSelector); // integer
+ }else{
+ return inValue; // integer
+ }
+}
+
+dojo.html.getStyleProperty = function(/* HTMLElement */node, /* string */cssSelector){
+ // summary
+ // Returns the value of the passed style
+ node = dojo.byId(node);
+ return (node && node.style ? node.style[dojo.html.toCamelCase(cssSelector)] : undefined); // string
+}
+
+dojo.html.getStyle = function(/* HTMLElement */node, /* string */cssSelector){
+ // summary
+ // Returns the computed value of the passed style
+ var value = dojo.html.getStyleProperty(node, cssSelector);
+ return (value ? value : dojo.html.getComputedStyle(node, cssSelector)); // string || integer
+}
+
+dojo.html.setStyle = function(/* HTMLElement */node, /* string */cssSelector, /* string */value){
+ // summary
+ // Set the value of passed style on node
+ node = dojo.byId(node);
+ if(node && node.style){
+ var camelCased = dojo.html.toCamelCase(cssSelector);
+ node.style[camelCased] = value;
+ }
+}
+
+dojo.html.setStyleText = function (/* HTMLElement */target, /* string */text) {
+ // summary
+ // Try to set the entire cssText property of the passed target; equiv of setting style attribute.
+ try {
+ target.style.cssText = text;
+ } catch (e) {
+ target.setAttribute("style", text);
+ }
+}
+
+dojo.html.copyStyle = function(/* HTMLElement */target, /* HTMLElement */source){
+ // summary
+ // work around for opera which doesn't have cssText, and for IE which fails on setAttribute
+ if(!source.style.cssText){
+ target.setAttribute("style", source.getAttribute("style"));
+ }else{
+ target.style.cssText = source.style.cssText;
+ }
+ dojo.html.addClass(target, dojo.html.getClass(source));
+}
+
+dojo.html.getUnitValue = function(/* HTMLElement */node, /* string */cssSelector, /* boolean? */autoIsZero){
+ // summary
+ // Get the value of passed selector, with the specific units used
+ var s = dojo.html.getComputedStyle(node, cssSelector);
+ if((!s)||((s == 'auto')&&(autoIsZero))){
+ return { value: 0, units: 'px' }; // object
+ }
+ // FIXME: is regex inefficient vs. parseInt or some manual test?
+ var match = s.match(/(\-?[\d.]+)([a-z%]*)/i);
+ if (!match){return dojo.html.getUnitValue.bad;}
+ return { value: Number(match[1]), units: match[2].toLowerCase() }; // object
+}
+dojo.html.getUnitValue.bad = { value: NaN, units: '' };
+
+dojo.html.getPixelValue = function(/* HTMLElement */node, /* string */cssSelector, /* boolean? */autoIsZero){
+ // summary
+ // Get the value of passed selector in pixels.
+ var result = dojo.html.getUnitValue(node, cssSelector, autoIsZero);
+ // FIXME: there is serious debate as to whether or not this is the right solution
+ if(isNaN(result.value)){
+ return 0; // integer
+ }
+ // FIXME: code exists for converting other units to px (see Dean Edward's IE7)
+ // but there are cross-browser complexities
+ if((result.value)&&(result.units != 'px')){
+ return NaN; // integer
+ }
+ return result.value; // integer
+}
+
+dojo.html.setPositivePixelValue = function(/* HTMLElement */node, /* string */selector, /* integer */value){
+ // summary
+ // Attempt to set the value of selector on node as a positive pixel value.
+ if(isNaN(value)){return false;}
+ node.style[selector] = Math.max(0, value) + 'px';
+ return true; // boolean
+}
+
+dojo.html.styleSheet = null;
+
+// FIXME: this is a really basic stub for adding and removing cssRules, but
+// it assumes that you know the index of the cssRule that you want to add
+// or remove, making it less than useful. So we need something that can
+// search for the selector that you you want to remove.
+dojo.html.insertCssRule = function(/* string */selector, /* string */declaration, /* integer? */index) {
+ // summary
+ // Attempt to insert declaration as selector on the internal stylesheet; if index try to set it there.
+ if (!dojo.html.styleSheet) {
+ if (document.createStyleSheet) { // IE
+ dojo.html.styleSheet = document.createStyleSheet();
+ } else if (document.styleSheets[0]) { // rest
+ // FIXME: should create a new style sheet here
+ // fall back on an exsiting style sheet
+ dojo.html.styleSheet = document.styleSheets[0];
+ } else {
+ return null; // integer
+ } // fail
+ }
+
+ if (arguments.length < 3) { // index may == 0
+ if (dojo.html.styleSheet.cssRules) { // W3
+ index = dojo.html.styleSheet.cssRules.length;
+ } else if (dojo.html.styleSheet.rules) { // IE
+ index = dojo.html.styleSheet.rules.length;
+ } else {
+ return null; // integer
+ } // fail
+ }
+
+ if (dojo.html.styleSheet.insertRule) { // W3
+ var rule = selector + " { " + declaration + " }";
+ return dojo.html.styleSheet.insertRule(rule, index); // integer
+ } else if (dojo.html.styleSheet.addRule) { // IE
+ return dojo.html.styleSheet.addRule(selector, declaration, index); // integer
+ } else {
+ return null; // integer
+ } // fail
+}
+
+dojo.html.removeCssRule = function(/* integer? */index){
+ // summary
+ // Attempt to remove the rule at index.
+ if(!dojo.html.styleSheet){
+ dojo.debug("no stylesheet defined for removing rules");
+ return false;
+ }
+ if(dojo.render.html.ie){
+ if(!index){
+ index = dojo.html.styleSheet.rules.length;
+ dojo.html.styleSheet.removeRule(index);
+ }
+ }else if(document.styleSheets[0]){
+ if(!index){
+ index = dojo.html.styleSheet.cssRules.length;
+ }
+ dojo.html.styleSheet.deleteRule(index);
+ }
+ return true; // boolean
+}
+
+dojo.html._insertedCssFiles = []; // cache container needed because IE reformats cssText when added to DOM
+dojo.html.insertCssFile = function(/* string */URI, /* HTMLDocument? */doc, /* boolean? */checkDuplicates, /* boolean */fail_ok){
+ // summary
+ // calls css by XmlHTTP and inserts it into DOM as <style [widgetType="widgetType"]> *downloaded cssText*</style>
+ if(!URI){ return; }
+ if(!doc){ doc = document; }
+ var cssStr = dojo.hostenv.getText(URI, false, fail_ok);
+ if(cssStr===null){ return; }
+ cssStr = dojo.html.fixPathsInCssText(cssStr, URI);
+
+ if(checkDuplicates){
+ var idx = -1, node, ent = dojo.html._insertedCssFiles;
+ for(var i = 0; i < ent.length; i++){
+ if((ent[i].doc == doc) && (ent[i].cssText == cssStr)){
+ idx = i; node = ent[i].nodeRef;
+ break;
+ }
+ }
+ // make sure we havent deleted our node
+ if(node){
+ var styles = doc.getElementsByTagName("style");
+ for(var i = 0; i < styles.length; i++){
+ if(styles[i] == node){
+ return;
+ }
+ }
+ // delete this entry
+ dojo.html._insertedCssFiles.shift(idx, 1);
+ }
+ }
+
+ var style = dojo.html.insertCssText(cssStr);
+ dojo.html._insertedCssFiles.push({'doc': doc, 'cssText': cssStr, 'nodeRef': style});
+
+ // insert custom attribute ex dbgHref="../foo.css" usefull when debugging in DOM inspectors, no?
+ if(style && djConfig.isDebug){
+ style.setAttribute("dbgHref", URI);
+ }
+ return style; // HTMLStyleElement
+}
+
+dojo.html.insertCssText = function(/* string */cssStr, /* HTMLDocument? */doc, /* string? */URI){
+ // summary
+ // Attempt to insert CSS rules into the document through inserting a style element
+ // DomNode Style = insertCssText(String ".dojoMenu {color: green;}"[, DomDoc document, dojo.uri.Uri Url ])
+ if(!cssStr){
+ return; // HTMLStyleElement
+ }
+ if(!doc){ doc = document; }
+ if(URI){// fix paths in cssStr
+ cssStr = dojo.html.fixPathsInCssText(cssStr, URI);
+ }
+ var style = doc.createElement("style");
+ style.setAttribute("type", "text/css");
+ // IE is b0rken enough to require that we add the element to the doc
+ // before changing it's properties
+ var head = doc.getElementsByTagName("head")[0];
+ if(!head){ // must have a head tag
+ dojo.debug("No head tag in document, aborting styles");
+ return; // HTMLStyleElement
+ }else{
+ head.appendChild(style);
+ }
+ if(style.styleSheet){// IE
+ style.styleSheet.cssText = cssStr;
+ }else{ // w3c
+ var cssText = doc.createTextNode(cssStr);
+ style.appendChild(cssText);
+ }
+ return style; // HTMLStyleElement
+}
+
+dojo.html.fixPathsInCssText = function(/* string */cssStr, /* string */URI){
+ // summary
+ // usage: cssText comes from dojoroot/src/widget/templates/Foobar.css
+ // it has .dojoFoo { background-image: url(images/bar.png);} then uri should point to dojoroot/src/widget/templates/
+ function iefixPathsInCssText() {
+ var regexIe = /AlphaImageLoader\(src\=['"]([\t\s\w()\/.\\'"-:#=&?~]*)['"]/;
+ while(match = regexIe.exec(cssStr)){
+ url = match[1].replace(regexTrim, "$2");
+ if(!regexProtocol.exec(url)){
+ url = (new dojo.uri.Uri(URI, url).toString());
+ }
+ str += cssStr.substring(0, match.index) + "AlphaImageLoader(src='" + url + "'";
+ cssStr = cssStr.substr(match.index + match[0].length);
+ }
+ return str + cssStr;
+ }
+
+ if(!cssStr || !URI){ return; }
+ var match, str = "", url = "";
+ var regex = /url\(\s*([\t\s\w()\/.\\'"-:#=&?]+)\s*\)/;
+ var regexProtocol = /(file|https?|ftps?):\/\//;
+ var regexTrim = /^[\s]*(['"]?)([\w()\/.\\'"-:#=&?]*)\1[\s]*?$/;
+ if (dojo.render.html.ie55 || dojo.render.html.ie60) {
+ cssStr = iefixPathsInCssText();
+ }
+ while(match = regex.exec(cssStr)){
+ url = match[1].replace(regexTrim, "$2");
+ if(!regexProtocol.exec(url)){
+ url = (new dojo.uri.Uri(URI, url).toString());
+ }
+ str += cssStr.substring(0, match.index) + "url(" + url + ")";
+ cssStr = cssStr.substr(match.index + match[0].length);
+ }
+ return str + cssStr; // string
+}
+
+dojo.html.setActiveStyleSheet = function(/* string */title){
+ // summary
+ // Activate style sheet with specified title.
+ var i = 0, a, els = dojo.doc().getElementsByTagName("link");
+ while (a = els[i++]) {
+ if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")){
+ a.disabled = true;
+ if (a.getAttribute("title") == title) { a.disabled = false; }
+ }
+ }
+}
+
+dojo.html.getActiveStyleSheet = function(){
+ // summary
+ // return the title of the currently active stylesheet
+ var i = 0, a, els = dojo.doc().getElementsByTagName("link");
+ while (a = els[i++]) {
+ if (a.getAttribute("rel").indexOf("style") != -1
+ && a.getAttribute("title")
+ && !a.disabled
+ ){
+ return a.getAttribute("title"); // string
+ }
+ }
+ return null; // string
+}
+
+dojo.html.getPreferredStyleSheet = function(){
+ // summary
+ // Return the preferred stylesheet title (i.e. link without alt attribute)
+ var i = 0, a, els = dojo.doc().getElementsByTagName("link");
+ while (a = els[i++]) {
+ if(a.getAttribute("rel").indexOf("style") != -1
+ && a.getAttribute("rel").indexOf("alt") == -1
+ && a.getAttribute("title")
+ ){
+ return a.getAttribute("title"); // string
+ }
+ }
+ return null; // string
+}
+
+dojo.html.applyBrowserClass = function(/* HTMLElement */node){
+ // summary
+ // Applies pre-set class names based on browser & version to the passed node.
+ // Modified version of Morris' CSS hack.
+ var drh=dojo.render.html;
+ var classes = {
+ dj_ie: drh.ie,
+ dj_ie55: drh.ie55,
+ dj_ie6: drh.ie60,
+ dj_ie7: drh.ie70,
+ dj_iequirks: drh.ie && drh.quirks,
+ dj_opera: drh.opera,
+ dj_opera8: drh.opera && (Math.floor(dojo.render.version)==8),
+ dj_opera9: drh.opera && (Math.floor(dojo.render.version)==9),
+ dj_khtml: drh.khtml,
+ dj_safari: drh.safari,
+ dj_gecko: drh.mozilla
+ }; // no dojo unsupported browsers
+ for(var p in classes){
+ if(classes[p]){
+ dojo.html.addClass(node, p);
+ }
+ }
+};
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/html/style.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/html/util.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/html/util.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/html/util.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/html/util.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,484 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.html.util");
+dojo.require("dojo.html.layout");
+
+dojo.html.getElementWindow = function(/* HTMLElement */element){
+ // summary
+ // Get the window object where the element is placed in.
+ return dojo.html.getDocumentWindow( element.ownerDocument ); // Window
+}
+
+dojo.html.getDocumentWindow = function(doc){
+ // summary
+ // Get window object associated with document doc
+
+ // With Safari, there is not wa to retrieve the window from the document, so we must fix it.
+ if(dojo.render.html.safari && !doc._parentWindow){
+ /*
+ This is a Safari specific function that fix the reference to the parent
+ window from the document object.
+ */
+
+ var fix=function(win){
+ win.document._parentWindow=win;
+ for(var i=0; i<win.frames.length; i++){
+ fix(win.frames[i]);
+ }
+ }
+ fix(window.top);
+ }
+
+ //In some IE versions (at least 6.0), document.parentWindow does not return a
+ //reference to the real window object (maybe a copy), so we must fix it as well
+ //We use IE specific execScript to attach the real window reference to
+ //document._parentWindow for later use
+ if(dojo.render.html.ie && window !== document.parentWindow && !doc._parentWindow){
+ /*
+ In IE 6, only the variable "window" can be used to connect events (others
+ may be only copies).
+ */
+ doc.parentWindow.execScript("document._parentWindow = window;", "Javascript");
+ //to prevent memory leak, unset it after use
+ //another possibility is to add an onUnload handler which seems overkill to me (liucougar)
+ var win = doc._parentWindow;
+ doc._parentWindow = null;
+ return win; // Window
+ }
+
+ return doc._parentWindow || doc.parentWindow || doc.defaultView; // Window
+}
+
+dojo.html.gravity = function(/* HTMLElement */node, /* DOMEvent */e){
+ // summary
+ // Calculates the mouse's direction of gravity relative to the centre
+ // of the given node.
+ // <p>
+ // If you wanted to insert a node into a DOM tree based on the mouse
+ // position you might use the following code:
+ // <pre>
+ // if (gravity(node, e) & gravity.NORTH) { [insert before]; }
+ // else { [insert after]; }
+ // </pre>
+ //
+ // @param node The node
+ // @param e The event containing the mouse coordinates
+ // @return The directions, NORTH or SOUTH and EAST or WEST. These
+ // are properties of the function.
+ node = dojo.byId(node);
+ var mouse = dojo.html.getCursorPosition(e);
+
+ with (dojo.html) {
+ var absolute = getAbsolutePosition(node, true);
+ var bb = getBorderBox(node);
+ var nodecenterx = absolute.x + (bb.width / 2);
+ var nodecentery = absolute.y + (bb.height / 2);
+ }
+
+ with (dojo.html.gravity) {
+ return ((mouse.x < nodecenterx ? WEST : EAST) | (mouse.y < nodecentery ? NORTH : SOUTH)); // integer
+ }
+}
+
+dojo.html.gravity.NORTH = 1;
+dojo.html.gravity.SOUTH = 1 << 1;
+dojo.html.gravity.EAST = 1 << 2;
+dojo.html.gravity.WEST = 1 << 3;
+
+dojo.html.overElement = function(/* HTMLElement */element, /* DOMEvent */e){
+ // summary
+ // Returns whether the mouse is over the passed element.
+ element = dojo.byId(element);
+ var mouse = dojo.html.getCursorPosition(e);
+ var bb = dojo.html.getBorderBox(element);
+ var absolute = dojo.html.getAbsolutePosition(element, true, dojo.html.boxSizing.BORDER_BOX);
+ var top = absolute.y;
+ var bottom = top + bb.height;
+ var left = absolute.x;
+ var right = left + bb.width;
+
+ return (mouse.x >= left
+ && mouse.x <= right
+ && mouse.y >= top
+ && mouse.y <= bottom
+ ); // boolean
+}
+
+dojo.html.renderedTextContent = function(/* HTMLElement */node){
+ // summary
+ // Attempts to return the text as it would be rendered, with the line breaks
+ // sorted out nicely. Unfinished.
+ node = dojo.byId(node);
+ var result = "";
+ if (node == null) { return result; }
+ for (var i = 0; i < node.childNodes.length; i++) {
+ switch (node.childNodes[i].nodeType) {
+ case 1: // ELEMENT_NODE
+ case 5: // ENTITY_REFERENCE_NODE
+ var display = "unknown";
+ try {
+ display = dojo.html.getStyle(node.childNodes[i], "display");
+ } catch(E) {}
+ switch (display) {
+ case "block": case "list-item": case "run-in":
+ case "table": case "table-row-group": case "table-header-group":
+ case "table-footer-group": case "table-row": case "table-column-group":
+ case "table-column": case "table-cell": case "table-caption":
+ // TODO: this shouldn't insert double spaces on aligning blocks
+ result += "\n";
+ result += dojo.html.renderedTextContent(node.childNodes[i]);
+ result += "\n";
+ break;
+
+ case "none": break;
+
+ default:
+ if(node.childNodes[i].tagName && node.childNodes[i].tagName.toLowerCase() == "br") {
+ result += "\n";
+ } else {
+ result += dojo.html.renderedTextContent(node.childNodes[i]);
+ }
+ break;
+ }
+ break;
+ case 3: // TEXT_NODE
+ case 2: // ATTRIBUTE_NODE
+ case 4: // CDATA_SECTION_NODE
+ var text = node.childNodes[i].nodeValue;
+ var textTransform = "unknown";
+ try {
+ textTransform = dojo.html.getStyle(node, "text-transform");
+ } catch(E) {}
+ switch (textTransform){
+ case "capitalize":
+ var words = text.split(' ');
+ for(var i=0; i<words.length; i++){
+ words[i] = words[i].charAt(0).toUpperCase() + words[i].substring(1);
+ }
+ text = words.join(" ");
+ break;
+ case "uppercase": text = text.toUpperCase(); break;
+ case "lowercase": text = text.toLowerCase(); break;
+ default: break; // leave as is
+ }
+ // TODO: implement
+ switch (textTransform){
+ case "nowrap": break;
+ case "pre-wrap": break;
+ case "pre-line": break;
+ case "pre": break; // leave as is
+ default:
+ // remove whitespace and collapse first space
+ text = text.replace(/\s+/, " ");
+ if (/\s$/.test(result)) { text.replace(/^\s/, ""); }
+ break;
+ }
+ result += text;
+ break;
+ default:
+ break;
+ }
+ }
+ return result; // string
+}
+
+dojo.html.createNodesFromText = function(/* string */txt, /* boolean? */trim){
+ // summary
+ // Attempts to create a set of nodes based on the structure of the passed text.
+ if(trim) { txt = txt.replace(/^\s+|\s+$/g, ""); }
+
+ var tn = dojo.doc().createElement("div");
+ // tn.style.display = "none";
+ tn.style.visibility= "hidden";
+ dojo.body().appendChild(tn);
+ var tableType = "none";
+ if((/^<t[dh][\s\r\n>]/i).test(txt.replace(/^\s+/))) {
+ txt = "<table><tbody><tr>" + txt + "</tr></tbody></table>";
+ tableType = "cell";
+ } else if((/^<tr[\s\r\n>]/i).test(txt.replace(/^\s+/))) {
+ txt = "<table><tbody>" + txt + "</tbody></table>";
+ tableType = "row";
+ } else if((/^<(thead|tbody|tfoot)[\s\r\n>]/i).test(txt.replace(/^\s+/))) {
+ txt = "<table>" + txt + "</table>";
+ tableType = "section";
+ }
+ tn.innerHTML = txt;
+ if(tn["normalize"]){
+ tn.normalize();
+ }
+
+ var parent = null;
+ switch(tableType) {
+ case "cell":
+ parent = tn.getElementsByTagName("tr")[0];
+ break;
+ case "row":
+ parent = tn.getElementsByTagName("tbody")[0];
+ break;
+ case "section":
+ parent = tn.getElementsByTagName("table")[0];
+ break;
+ default:
+ parent = tn;
+ break;
+ }
+
+ /* this doesn't make much sense, I'm assuming it just meant trim() so wrap was replaced with trim
+ if(wrap){
+ var ret = [];
+ // start hack
+ var fc = tn.firstChild;
+ ret[0] = ((fc.nodeValue == " ")||(fc.nodeValue == "\t")) ? fc.nextSibling : fc;
+ // end hack
+ // tn.style.display = "none";
+ dojo.body().removeChild(tn);
+ return ret;
+ }
+ */
+ var nodes = [];
+ for(var x=0; x<parent.childNodes.length; x++){
+ nodes.push(parent.childNodes[x].cloneNode(true));
+ }
+ tn.style.display = "none"; // FIXME: why do we do this?
+ dojo.body().removeChild(tn);
+ return nodes; // array
+}
+
+dojo.html.placeOnScreen = function(
+ /* HTMLElement */node,
+ /* integer */desiredX,
+ /* integer */desiredY,
+ /* integer */padding,
+ /* boolean? */hasScroll,
+ /* string? */corners,
+ /* boolean? */tryOnly
+){
+ // summary
+ // Keeps 'node' in the visible area of the screen while trying to
+ // place closest to desiredX, desiredY. The input coordinates are
+ // expected to be the desired screen position, not accounting for
+ // scrolling. If you already accounted for scrolling, set 'hasScroll'
+ // to true. Set padding to either a number or array for [paddingX, paddingY]
+ // to put some buffer around the element you want to position.
+ // Set which corner(s) you want to bind to, such as
+ //
+ // placeOnScreen(node, desiredX, desiredY, padding, hasScroll, "TR")
+ // placeOnScreen(node, [desiredX, desiredY], padding, hasScroll, ["TR", "BL"])
+ //
+ // The desiredX/desiredY will be treated as the topleft(TL)/topright(TR) or
+ // BottomLeft(BL)/BottomRight(BR) corner of the node. Each corner is tested
+ // and if a perfect match is found, it will be used. Otherwise, it goes through
+ // all of the specified corners, and choose the most appropriate one.
+ // By default, corner = ['TL'].
+ // If tryOnly is set to true, the node will not be moved to the place.
+ //
+ // NOTE: node is assumed to be absolutely or relatively positioned.
+ //
+ // Alternate call sig:
+ // placeOnScreen(node, [x, y], padding, hasScroll)
+ //
+ // Examples:
+ // placeOnScreen(node, 100, 200)
+ // placeOnScreen("myId", [800, 623], 5)
+ // placeOnScreen(node, 234, 3284, [2, 5], true)
+
+ // TODO: make this function have variable call sigs
+ // kes(node, ptArray, cornerArray, padding, hasScroll)
+ // kes(node, ptX, ptY, cornerA, cornerB, cornerC, paddingArray, hasScroll)
+ if(desiredX instanceof Array || typeof desiredX == "array") {
+ tryOnly = corners;
+ corners = hasScroll;
+ hasScroll = padding;
+ padding = desiredY;
+ desiredY = desiredX[1];
+ desiredX = desiredX[0];
+ }
+
+ if(corners instanceof String || typeof corners == "string"){
+ corners = corners.split(",");
+ }
+
+ if(!isNaN(padding)) {
+ padding = [Number(padding), Number(padding)];
+ } else if(!(padding instanceof Array || typeof padding == "array")) {
+ padding = [0, 0];
+ }
+
+ var scroll = dojo.html.getScroll().offset;
+ var view = dojo.html.getViewport();
+
+ node = dojo.byId(node);
+ var oldDisplay = node.style.display;
+ node.style.display="";
+ var bb = dojo.html.getBorderBox(node);
+ var w = bb.width;
+ var h = bb.height;
+ node.style.display=oldDisplay;
+
+ if(!(corners instanceof Array || typeof corners == "array")){
+ corners = ['TL'];
+ }
+
+ var bestx, besty, bestDistance = Infinity, bestCorner;
+
+ for(var cidex=0; cidex<corners.length; ++cidex){
+ var corner = corners[cidex];
+ var match = true;
+ var tryX = desiredX - (corner.charAt(1)=='L' ? 0 : w) + padding[0]*(corner.charAt(1)=='L' ? 1 : -1);
+ var tryY = desiredY - (corner.charAt(0)=='T' ? 0 : h) + padding[1]*(corner.charAt(0)=='T' ? 1 : -1);
+ if(hasScroll) {
+ tryX -= scroll.x;
+ tryY -= scroll.y;
+ }
+
+ if(tryX < 0){
+ tryX = 0;
+ match = false;
+ }
+
+ if(tryY < 0){
+ tryY = 0;
+ match = false;
+ }
+
+ var x = tryX + w;
+ if(x > view.width) {
+ x = view.width - w;
+ match = false;
+ } else {
+ x = tryX;
+ }
+ x = Math.max(padding[0], x) + scroll.x;
+
+ var y = tryY + h;
+ if(y > view.height) {
+ y = view.height - h;
+ match = false;
+ } else {
+ y = tryY;
+ }
+ y = Math.max(padding[1], y) + scroll.y;
+
+ if(match){ //perfect match, return now
+ bestx = x;
+ besty = y;
+ bestDistance = 0;
+ bestCorner = corner;
+ break;
+ }else{
+ //not perfect, find out whether it is better than the saved one
+ var dist = Math.pow(x-tryX-scroll.x,2)+Math.pow(y-tryY-scroll.y,2);
+ if(bestDistance > dist){
+ bestDistance = dist;
+ bestx = x;
+ besty = y;
+ bestCorner = corner;
+ }
+ }
+ }
+
+ if(!tryOnly){
+ node.style.left = bestx + "px";
+ node.style.top = besty + "px";
+ }
+
+ return { left: bestx, top: besty, x: bestx, y: besty, dist: bestDistance, corner: bestCorner}; // object
+}
+
+dojo.html.placeOnScreenPoint = function(node, desiredX, desiredY, padding, hasScroll) {
+ dojo.deprecated("dojo.html.placeOnScreenPoint", "use dojo.html.placeOnScreen() instead", "0.5");
+ return dojo.html.placeOnScreen(node, desiredX, desiredY, padding, hasScroll, ['TL', 'TR', 'BL', 'BR']);
+}
+
+dojo.html.placeOnScreenAroundElement = function(
+ /* HTMLElement */node,
+ /* HTMLElement */aroundNode,
+ /* integer */padding,
+ /* string? */aroundType,
+ /* string? */aroundCorners,
+ /* boolean? */tryOnly
+){
+ // summary
+ // Like placeOnScreen, except it accepts aroundNode instead of x,y
+ // and attempts to place node around it. aroundType (see
+ // dojo.html.boxSizing in html/layout.js) determines which box of the
+ // aroundNode should be used to calculate the outer box.
+ // aroundCorners specify Which corner of aroundNode should be
+ // used to place the node => which corner(s) of node to use (see the
+ // corners parameter in dojo.html.placeOnScreen)
+ // aroundCorners: {'TL': 'BL', 'BL': 'TL'}
+
+ var best, bestDistance=Infinity;
+ aroundNode = dojo.byId(aroundNode);
+ var oldDisplay = aroundNode.style.display;
+ aroundNode.style.display="";
+ var mb = dojo.html.getElementBox(aroundNode, aroundType);
+ var aroundNodeW = mb.width;
+ var aroundNodeH = mb.height;
+ var aroundNodePos = dojo.html.getAbsolutePosition(aroundNode, true, aroundType);
+ aroundNode.style.display=oldDisplay;
+
+ for(var nodeCorner in aroundCorners){
+ var pos, desiredX, desiredY;
+ var corners = aroundCorners[nodeCorner];
+
+ desiredX = aroundNodePos.x + (nodeCorner.charAt(1)=='L' ? 0 : aroundNodeW);
+ desiredY = aroundNodePos.y + (nodeCorner.charAt(0)=='T' ? 0 : aroundNodeH);
+
+ pos = dojo.html.placeOnScreen(node, desiredX, desiredY, padding, true, corners, true);
+ if(pos.dist == 0){
+ best = pos;
+ break;
+ }else{
+ //not perfect, find out whether it is better than the saved one
+ if(bestDistance > pos.dist){
+ bestDistance = pos.dist;
+ best = pos;
+ }
+ }
+ }
+
+ if(!tryOnly){
+ node.style.left = best.left + "px";
+ node.style.top = best.top + "px";
+ }
+ return best; // object
+}
+
+dojo.html.scrollIntoView = function(/* HTMLElement */node){
+ // summary
+ // Scroll the passed node into view, if it is not.
+ if(!node){ return; }
+
+ // don't rely on that node.scrollIntoView works just because the function is there
+ // it doesnt work in Konqueror or Opera even though the function is there and probably
+ // not safari either
+ // dont like browser sniffs implementations but sometimes you have to use it
+ if(dojo.render.html.ie){
+ //only call scrollIntoView if there is a scrollbar for this menu,
+ //otherwise, scrollIntoView will scroll the window scrollbar
+ if(dojo.html.getBorderBox(node.parentNode).height < node.parentNode.scrollHeight){
+ node.scrollIntoView(false);
+ }
+ }else if(dojo.render.html.mozilla){
+ // IE, mozilla
+ node.scrollIntoView(false);
+ }else{
+ var parent = node.parentNode;
+ var parentBottom = parent.scrollTop + dojo.html.getBorderBox(parent).height;
+ var nodeBottom = node.offsetTop + dojo.html.getMarginBox(node).height;
+ if(parentBottom < nodeBottom){
+ parent.scrollTop += (nodeBottom - parentBottom);
+ }else if(parent.scrollTop > node.offsetTop){
+ parent.scrollTop -= (parent.scrollTop - node.offsetTop);
+ }
+ }
+}
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/html/util.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/README
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/README?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/README (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/README Mon Nov 13 14:54:45 2006
@@ -0,0 +1,6 @@
+All files within this directory and subdirectories were manually derived from http://unicode.org/cldr
+
+See terms of use: http://www.unicode.org/copyright.html#Exhibit1
+
+Eventually, this data should be generated directly from the XML in the CLDR repository to provide
+accurate and full support for the full set of locales.
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/README
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/de/gregorian.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/de/gregorian.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/de/gregorian.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/de/gregorian.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,29 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+ 'months-format-wide': ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"],
+ 'months-format-abbr': ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"],
+ 'months-standAlone-narrow': ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
+ 'days-format-wide': ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
+ 'days-format-abbr': ["So", "Mo", "Di", "Mi", "Do", "Fri", "Sat"],
+ 'days-standAlone-narrow': ["S", "M", "D", "M", "D", "F", "S"],
+
+ 'dateFormat-full': "EEEE, d. MMMM yyyy",
+ 'dateFormat-long': "d. MMMM yyyy",
+ 'dateFormat-medium': "dd.MM.yyyy",
+ 'dateFormat-short': "dd.MM.yy",
+
+ 'timeFormat-full': "H:mm' Uhr 'z",
+
+ am: "vorm.",
+ pm: "nachm.",
+ eras: ['v. Chr.','n. Chr.']
+})
\ No newline at end of file
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/de/gregorian.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/en/gregorian.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/en/gregorian.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/en/gregorian.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/en/gregorian.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,30 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+ 'months-format-wide': ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
+ 'months-format-abbr': ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
+ 'months-standAlone-narrow': ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
+ 'days-format-wide': ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
+ 'days-format-abbr': ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
+ 'days-standAlone-narrow': ["S", "M", "T", "W", "T", "F", "S"],
+
+ 'dateFormat-full': "EEEE, MMMM d, yyyy",
+ 'dateFormat-long': "MMMM d, yyyy",
+ 'dateFormat-medium': "MMM d, yyyy",
+ 'dateFormat-short': "M/d/yy",
+
+ 'timeFormat-full': "h:mm:ss a v",
+ 'timeFormat-long': "h:mm:ss a z",
+ 'timeFormat-medium': "h:mm:ss a",
+ 'timeFormat-short': "h:mm a",
+
+ eras: ['BC','AD']
+})
\ No newline at end of file
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/en/gregorian.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/es/gregorian.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/es/gregorian.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/es/gregorian.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/es/gregorian.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,29 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+ 'months-format-wide': ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"],
+ 'months-format-abbr': ["ene", "feb", "mar", "abr", "may", "jun", "jul", "ago", "sep", "oct", "nov", "dic"],
+ 'months-standAlone-narrow': ["E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
+ 'days-format-wide': ["domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"],
+ 'days-format-abbr': ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"],
+ 'days-standAlone-narrow': ["D", "L", "M", "M", "J", "V", "S"],
+
+ 'dateFormat-full': "EEEE d' de 'MMMM' de 'yyyy",
+ 'dateFormat-long': "d' de 'MMMM' de 'yyyy",
+ 'dateFormat-medium': "dd-MMM-yy",
+ 'dateFormat-short': "d/MM/yy",
+
+ 'timeFormat-full': "HH'H'mm''ss\" z",
+
+ am: "a.m.",
+ pm: "p.m.",
+ eras: ['a.C.','d.C.']
+})
\ No newline at end of file
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/es/gregorian.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/fi/gregorian.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/fi/gregorian.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/fi/gregorian.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/fi/gregorian.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,32 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+ 'months-format-wide': ["tammikuu", "helmikuu", "maaliskuu", "huhtikuu", "toukokuu", "kesäkuu", "heinäkuu", "elokuu", "syyskuu", "lokakuu", "marraskuu", "joulukuu"],
+ 'months-format-abbr': ["tammi", "helmi", "maalis", "huhti", "touko", "kesä", "heinä", "elo", "syys", "loka", "marras", "joulu"],
+ 'months-standAlone-narrow': ["T", "H", "M", "H", "T", "K", "H", "E", "S", "L", "M", "J"],
+ 'days-format-wide': ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai"],
+ 'days-format-abbr': ["su", "ma", "ti", "ke", "to", "pe", "la"],
+ 'days-standAlone-narrow': ["S", "M", "T", "K", "T", "P", "L"],
+
+ 'dateFormat-full': "EEEE'na 'd. MMMM'ta 'yyyy",
+ 'dateFormat-long': "d. MMMM'ta 'yyyy",
+ 'dateFormat-medium': "d.M.yyyy",
+ 'dateFormat-short': "d.M.yyyy",
+
+ 'timeFormat-full': "H.mm.ss v",
+ 'timeFormat-long': "'klo 'H.mm.ss",
+ 'timeFormat-medium': "H.mm.ss",
+ 'timeFormat-short': "H.mm",
+
+ am: "ap.",
+ pm: "ip.",
+ eras: ['eKr.','jKr.']
+})
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/fi/gregorian.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/fr/gregorian.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/fr/gregorian.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/fr/gregorian.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/fr/gregorian.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,27 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+ 'months-format-wide': ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"],
+ 'months-format-abbr': ["janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sep.", "oct.", "nov.", "déc."],
+ 'months-standAlone-narrow': ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
+ 'days-format-wide': ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"],
+ 'days-format-abbr': ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."],
+ 'days-standAlone-narrow': ["D", "L", "M", "M", "J", "V", "S"],
+
+ 'dateFormat-full': "EEEE d MMMM yyyy",
+ 'dateFormat-long': "d MMMM yyyy",
+ 'dateFormat-medium': "d MMM yy",
+ 'dateFormat-short': "dd/MM/yy",
+
+ 'timeFormat-full': "HH' h 'mm z",
+
+ eras: ['av. J.-C.','apr. J.-C.']
+})
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/fr/gregorian.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/gregorian.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/gregorian.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/gregorian.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/gregorian.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,45 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+ 'months-format-wide': ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
+ 'months-format-abbr': ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
+ 'months-standAlone-narrow': ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
+ 'days-format-wide': ["1", "2", "3", "4", "5", "6", "7"],
+ 'days-format-abbr': ["1", "2", "3", "4", "5", "6", "7"],
+ 'days-standAlone-narrow': ["1", "2", "3", "4", "5", "6", "7"],
+
+
+ 'dateFormat-full': "EEEE, yyyy MMMM dd",
+ 'dateFormat-long': "yyyy MMMM d",
+ 'dateFormat-medium': "yyyy MMM d",
+ 'dateFormat-short': "yy/MM/dd",
+
+ 'timeFormat-full': "HH:mm:ss z",
+ 'timeFormat-long': "HH:mm:ss z",
+ 'timeFormat-medium': "HH:mm:ss",
+ 'timeFormat-short': "HH:mm",
+
+ am: 'AM',
+ pm: 'PM',
+ eras: ['BCE','CE'],
+
+ 'field-era': "Era",
+ 'field-year': "Year",
+ 'field-month': "Month",
+ 'field-week': "Week",
+ 'field-day': "Day",
+ 'field-weekday': "Day of the Week",
+ 'field-dayperiod': "Dayperiod",
+ 'field-hour': "Hour",
+ 'field-minute': "Minute",
+ 'field-second': "Second",
+ 'field-zone': "Zone"
+})
\ No newline at end of file
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/gregorian.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/gregorianExtras.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/gregorianExtras.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/gregorianExtras.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/gregorianExtras.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,14 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+// Dojo-specific extensions to the CLDR
+({
+ 'dateFormat-yearOnly': "yyyy"
+})
\ No newline at end of file
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/gregorianExtras.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/hu/gregorian.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/hu/gregorian.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/hu/gregorian.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/hu/gregorian.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,32 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+ 'months-format-wide': ["Január", "Február", "Március", "Ãprilis", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"],
+ 'months-format-abbr': ["Jan", "Feb", "Már", "Ãpr", "Máj", "Jún", "Júl", "Aug", "Sze", "Okt", "Nov", "Dec"],
+ 'months-standAlone-narrow': ["J", "F", "M", "Ã", "M", "J", "J", "A", "S", "O", "N", "D"],
+ 'days-format-wide': ["Vasárnap", "HétfÅ", "Kedd", "Szerda", "Csütörtök", "Péntek", "Szombat"],
+ 'days-format-abbr': ["Va", "Hé", "Ke", "Sze", "Csü", "Pé", "Szo"],
+ 'days-standAlone-narrow': ["V", "H", "K", "Sz", "Cs", "P", "Sz"],
+
+ 'dateFormat-full': "yyyy MMMM d, EEEE",
+ 'dateFormat-long': "yyyy MMMM d",
+ 'dateFormat-medium': "yyyy MMM d",
+ 'dateFormat-short': "yyyy-M-d",
+
+ 'timeFormat-full': "h:mm:ss a v",
+ 'timeFormat-long': "h:mm:ss a z",
+ 'timeFormat-medium': "h:mm:ss a",
+ 'timeFormat-short': "h:mm a",
+
+ am: "d.e.",
+ pm: "d.u.",
+ eras: ['k.e.','k.u.']
+})
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/hu/gregorian.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/it/gregorian.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/it/gregorian.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/it/gregorian.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/it/gregorian.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,25 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+ 'months-format-wide': ["gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"],
+ 'months-format-abbr': ["gen", "feb", "mar", "apr", "mag", "giu", "lug", "ago", "set", "ott", "nov", "dic"],
+ 'months-standAlone-narrow': ["G", "F", "M", "A", "M", "G", "L", "A", "S", "O", "N", "D"],
+ 'days-format-wide': ["domenica", "lunedì", "martedì", "mercoledì", "giovedì", "venerdì", "sabato"],
+ 'days-format-abbr': ["dom", "lun", "mar", "mer", "gio", "ven", "sab"],
+ 'days-standAlone-narrow': ["D", "L", "M", "M", "G", "V", "S"],
+
+ 'dateFormat-full': "EEEE d MMMM yyyy",
+ 'dateFormat-long': "dd MMMM yyyy",
+ 'dateFormat-medium': "dd/MMM/yy",
+ 'dateFormat-short': "dd/MM/yy",
+
+ eras: ['aC','dC']
+})
\ No newline at end of file
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/it/gregorian.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/ja/gregorian.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/ja/gregorian.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/ja/gregorian.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/ja/gregorian.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,32 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+/*<?xml version="1.0" encoding="UTF-8" ?>*/
+({
+ 'months-format-wide': ["1 æ", "2 æ", "3 æ", "4 æ", "5 æ", "6 æ", "7 æ", "8 æ", "9 æ", "10 æ", "11 æ", "12 æ"],
+ 'months-format-abbr': ["1 æ", "2 æ", "3 æ", "4 æ", "5 æ", "6 æ", "7 æ", "8 æ", "9 æ", "10 æ", "11 æ", "12 æ"],
+ 'days-format-wide': ["æ¥ææ¥", "æææ¥", "ç«ææ¥", "æ°´ææ¥", "æ¨ææ¥", "éææ¥", "åææ¥"],
+ 'days-format-abbr': ["æ¥", "æ", "ç«", "æ°´", "æ¨", "é", "å"],
+ 'days-standAlone-narrow': ["æ¥", "æ", "ç«", "æ°´", "æ¨", "é", "å"],
+
+
+ 'dateFormat-full': "yyyy'å¹´'M'æ'd'æ¥'EEEE",
+ 'dateFormat-long': "yyyy'å¹´'M'æ'd'æ¥'",
+ 'dateFormat-medium': "yyyy/MM/dd",
+
+ 'timeFormat-full': "H'æ'mm'å'ss'ç§'z",
+ 'timeFormat-long': "H:mm:ss:z",
+ 'timeFormat-medium': "H:mm:ss",
+ 'timeFormat-short': "H:mm",
+
+ am: "åå",
+ pm: "åå¾",
+ eras: ['ç´å
å','西æ¦']
+})
\ No newline at end of file
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/ja/gregorian.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/ja/gregorianExtras.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/ja/gregorianExtras.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/ja/gregorianExtras.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/ja/gregorianExtras.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,14 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+/*<?xml version="1.0" encoding="UTF-8" ?>*/
+({
+ 'dateFormat-yearOnly': "yyyyå¹´"
+})
\ No newline at end of file
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/ja/gregorianExtras.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/ko/gregorian.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/ko/gregorian.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/ko/gregorian.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/ko/gregorian.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,32 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+ 'months-format-wide': ["1ì", "2ì", "3ì", "4ì", "5ì", "6ì", "7ì", "8ì", "9ì", "10ì", "11ì", "12ì"],
+ 'months-format-abbr': ["1ì", "2ì", "3ì", "4ì", "5ì", "6ì", "7ì", "8ì", "9ì", "10ì", "11ì", "12ì"],
+ 'months-standAlone-narrow': ["1ì", "2ì", "3ì", "4ì", "5ì", "6ì", "7ì", "8ì", "9ì", "10ì", "11ì", "12ì"],
+ 'days-format-wide': ["ì¼ìì¼", "ììì¼", "íìì¼", "ììì¼", "목ìì¼", "ê¸ìì¼", "í ìì¼"],
+ 'days-format-abbr': ["ì¼", "ì", "í", "ì", "목", "ê¸", "í "],
+ 'days-standAlone-narrow': ["ì¼", "ì", "í", "ì", "목", "ê¸", "í "],
+
+ 'dateFormat-full': "yyyy'ë
' M'ì' d'ì¼' EEEE",
+ 'dateFormat-long': "yyyy'ë
' M'ì' d'ì¼'",
+ 'dateFormat-medium': "yyyy. MM. dd",
+ 'dateFormat-short': "yy. MM. dd",
+
+ 'timeFormat-full': "a hh'ì' mm'ë¶' ss'ì´' z",
+ 'timeFormat-long': "a hh'ì' mm'ë¶' ss'ì´'",
+ 'timeFormat-medium': "a hh'ì' mm'ë¶'",
+ 'timeFormat-short': "a hh'ì' mm'ë¶'",
+
+ am: 'ì¤ì ',
+ pm: 'ì¤í',
+ eras: ['기ìì ','ì기']
+})
\ No newline at end of file
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/ko/gregorian.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/nl/gregorian.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/nl/gregorian.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/nl/gregorian.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/nl/gregorian.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,27 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+ 'months-format-wide': ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"],
+ 'months-format-abbr': ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec"],
+ 'months-standAlone-narrow': ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
+ 'days-format-wide': ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"],
+ 'days-format-abbr': ["zo", "ma", "di", "wo", "do", "vr", "za"],
+ 'days-standAlone-narrow': ["Z", "M", "D", "W", "D", "V", "Z"],
+
+ 'dateFormat-full': "EEEE d MMMM yyyy",
+ 'dateFormat-long': "d MMMM yyyy",
+ 'dateFormat-medium': "d MMM yyyy",
+ 'dateFormat-short': "dd-MM-yy",
+
+ 'timeFormat-full': "HH:mm:ss v",
+
+ eras: ['v. Chr.','n. Chr.']
+})
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/nl/gregorian.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/pt-br/gregorian.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/pt-br/gregorian.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/pt-br/gregorian.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/pt-br/gregorian.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,17 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+ 'dateFormat-medium': "dd/MM/yyyy",
+ 'dateFormat-short': "dd/MM/yy",
+
+ 'timeFormat-full': "HH'h'mm'min'ss's' z",
+ 'timeFormat-long': "H'h'm'min's's' z"
+})
\ No newline at end of file
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/pt-br/gregorian.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/pt/gregorian.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/pt/gregorian.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/pt/gregorian.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/pt/gregorian.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,27 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+ 'months-format-wide': ["janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"],
+ 'months-format-abbr': ["jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez"],
+ 'months-standAlone-narrow': ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
+ 'days-format-wide': ["domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"],
+ 'days-format-abbr': ["dom", "seg", "ter", "qua", "qui", "sex", "sáb"],
+ 'days-standAlone-narrow': ["D", "S", "T", "Q", "Q", "S", "S"],
+
+ 'dateFormat-full': "EEEE, d' de 'MMMM' de 'yyyy",
+ 'dateFormat-long': "d' de 'MMMM' de 'yyyy",
+ 'dateFormat-medium': "d/MMM/yyyy",
+ 'dateFormat-short': "dd-MM-yyyy",
+
+ 'timeFormat-full': "HH'H'mm'm'ss's' z",
+
+ eras: ['a.C.','d.C.']
+})
\ No newline at end of file
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/pt/gregorian.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/sv/gregorian.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/sv/gregorian.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/sv/gregorian.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/sv/gregorian.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,32 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+({
+ 'months-format-wide': ["januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"],
+ 'months-format-abbr': ["jan", "feb", "mar", "apr", "maj", "jun", "jul", "aug", "sep", "okt", "nov", "dec"],
+ 'months-standAlone-narrow': ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
+ 'days-format-wide': ["söndag", "måndag", "tisdag", "onsdag", "torsdag", "fredag", "lördag"],
+ 'days-format-abbr': ["sön", "mån", "tis", "ons", "tor", "fre", "lör"],
+ 'days-standAlone-narrow': ["S", "M", "T", "O", "T", "F", "L"],
+
+ 'dateFormat-full': "EEEE'en den' d MMMM yyyy",
+ 'dateFormat-long': "EEEE d MMM yyyy",
+ 'dateFormat-medium': "d MMM yyyy",
+ 'dateFormat-short': "yyyy-MM-dd",
+
+ 'timeFormat-full': "'kl. 'HH.mm.ss z",
+ 'timeFormat-long': "HH.mm.ss z",
+ 'timeFormat-medium': "HH.mm.ss",
+ 'timeFormat-short': "HH.mm",
+
+ am: "fm",
+ pm: "em",
+ eras: ['f.Kr.','e.Kr.']
+})
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/sv/gregorian.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh-cn/gregorian.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh-cn/gregorian.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh-cn/gregorian.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh-cn/gregorian.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,22 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+/*<?xml version="1.0" encoding="UTF-8" ?>*/
+({
+ 'dateFormat-full': "yyyy'å¹´'M'æ'd'æ¥'EEEE",
+ 'dateFormat-long': "yyyy'å¹´'M'æ'd'æ¥'",
+ 'dateFormat-medium': "yyyy-M-d",
+ 'dateFormat-short': "yy-M-d",
+
+ 'timeFormat-full': "ahh'æ¶'mm'å'ss'ç§' z",
+ 'timeFormat-long': "ahh'æ¶'mm'å'ss'ç§'",
+ 'timeFormat-medium': "ahh:mm:ss",
+ 'timeFormat-short': "ah:mm"
+})
\ No newline at end of file
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh-cn/gregorian.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh-hk/gregorian.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh-hk/gregorian.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh-hk/gregorian.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh-hk/gregorian.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,26 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+/*<?xml version="1.0" encoding="UTF-8" ?>*/
+({
+ 'days-format-abbr': ["é±æ¥", "é±ä¸", "é±äº", "é±ä¸", "é±å", "é±äº", "é±å
"],
+
+ 'dateFormat-full': "yyyy'å¹´'M'æ'd'æ¥'EEEE",
+ 'dateFormat-long': "yyyy'å¹´'M'æ'd'æ¥'",
+ 'dateFormat-medium': "yyyy/M/d",
+ 'dateFormat-short': "yyyy/M/d",
+
+ 'timeFormat-full': "ahh'æ'mm'å'ss'ç§' z",
+ 'timeFormat-long': "ahh'æ'mm'å'ss'ç§'",
+ 'timeFormat-medium': "a h:mm:ss",
+ 'timeFormat-short': "a h:mm",
+
+ eras: ['西å
å','西å
']
+})
\ No newline at end of file
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh-hk/gregorian.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh-tw/gregorian.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh-tw/gregorian.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh-tw/gregorian.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh-tw/gregorian.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,26 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+/*<?xml version="1.0" encoding="UTF-8" ?>*/
+({
+ 'months-format-abbr': ["1æ", "2æ", "3æ", "4æ", "5æ", "6æ", "7æ", "8æ", "9æ", "10æ", "11æ", "12æ"],
+
+ 'dateFormat-full': "yyyy'å¹´'M'æ'd'æ¥'EEEE",
+ 'dateFormat-long': "yyyy'å¹´'M'æ'd'æ¥'",
+ 'dateFormat-medium': "yyyy'å¹´'M'æ'd'æ¥'",
+ 'dateFormat-short': "yy'å¹´'M'æ'd'æ¥'",
+
+ 'timeFormat-full': "ahh'æ'mm'å'ss'ç§' z",
+ 'timeFormat-long': "ahh'æ'mm'å'ss'ç§'",
+ 'timeFormat-medium': "ahh:mm:ss",
+ 'timeFormat-short': "ah:mm",
+
+ eras: ['西å
å','西å
']
+})
\ No newline at end of file
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh-tw/gregorian.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh/gregorian.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh/gregorian.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh/gregorian.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh/gregorian.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,23 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+/*<?xml version="1.0" encoding="UTF-8" ?>*/
+({
+ 'months-format-wide': ["ä¸æ", "äºæ", "ä¸æ", "åæ", "äºæ", "å
æ", "ä¸æ", "å
«æ", "ä¹æ", "åæ", "åä¸æ", "åäºæ"],
+ 'months-format-abbr': ["ä¸æ", "äºæ", "ä¸æ", "åæ", "äºæ", "å
æ", "ä¸æ", "å
«æ", "ä¹æ", "åæ", "åä¸æ", "åäºæ"],
+ 'months-standAlone-narrow': ["1æ", "2æ", "3æ", "4æ", "5æ", "6æ", "7æ", "8æ", "9æ", "10æ", "11æ", "12æ"],
+ 'days-format-wide': ["æææ¥", "ææä¸", "ææäº", "ææä¸", "ææå", "ææäº", "ææå
"],
+ 'days-format-abbr': ["å¨æ¥", "å¨ä¸", "å¨äº", "å¨ä¸", "å¨å", "å¨äº", "å¨å
"],
+ 'days-standAlone-narrow': ["æ¥", "ä¸", "äº", "ä¸", "å", "äº", "å
"],
+
+ am: "ä¸å",
+ pm: "ä¸å",
+ eras: ['å
Œ
å','å
Œ
']
+})
\ No newline at end of file
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh/gregorian.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh/gregorianExtras.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh/gregorianExtras.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh/gregorianExtras.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh/gregorianExtras.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,14 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+/*<?xml version="1.0" encoding="UTF-8" ?>*/
+({
+ 'dateFormat-yearOnly': "yyyy'å¹´'"
+})
\ No newline at end of file
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh/gregorianExtras.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/common.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/common.js?view=auto&rev=474551
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/common.js (added)
+++ struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/common.js Mon Nov 13 14:54:45 2006
@@ -0,0 +1,68 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.i18n.common");
+
+dojo.i18n.getLocalization = function(/*String*/packageName, /*String*/bundleName, /*String?*/locale){
+// summary:
+// Returns an Object containing the localization for a given resource bundle
+// in a package, matching the specified locale.
+//
+// description:
+// Returns a hash containing name/value pairs in its prototypesuch that values can be easily overridden.
+// Throws an exception if the bundle is not found.
+// Bundle must have already been loaded by dojo.requireLocalization() or by a build optimization step.
+//
+// packageName: package which is associated with this resource
+// bundleName: the base filename of the resource bundle (without the ".js" suffix)
+// locale: the variant to load (optional). By default, the locale defined by the
+// host environment: dojo.locale
+
+ dojo.hostenv.preloadLocalizations();
+ locale = dojo.hostenv.normalizeLocale(locale);
+
+ // look for nearest locale match
+ var elements = locale.split('-');
+ var module = [packageName,"nls",bundleName].join('.');
+ var bundle = dojo.hostenv.findModule(module, true);
+
+ var localization;
+ for(var i = elements.length; i > 0; i--){
+ var loc = elements.slice(0, i).join('_');
+ if(bundle[loc]){
+ localization = bundle[loc];
+ break;
+ }
+ }
+ if(!localization){
+ localization = bundle.ROOT;
+ }
+
+ // make a singleton prototype so that the caller won't accidentally change the values globally
+ if(localization){
+ var clazz = function(){};
+ clazz.prototype = localization;
+ return new clazz(); // Object
+ }
+
+ dojo.raise("Bundle not found: " + bundleName + " in " + packageName+" , locale=" + locale);
+};
+
+dojo.i18n.isLTR = function(/*String?*/locale){
+// summary:
+// Is the language read left-to-right? Most exceptions are for middle eastern languages.
+//
+// locale: a string representing the locale. By default, the locale defined by the
+// host environment: dojo.locale
+
+ var lang = dojo.hostenv.normalizeLocale(locale).split('-')[0];
+ var RTL = {ar:true,fa:true,he:true,ur:true,yi:true};
+ return !RTL[lang]; // Boolean
+};
Propchange: struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/src/i18n/common.js
------------------------------------------------------------------------------
svn:eol-style = native