diff options
Diffstat (limited to 'js/dojo/dojox/atom')
147 files changed, 6927 insertions, 0 deletions
diff --git a/js/dojo/dojox/atom/README b/js/dojo/dojox/atom/README new file mode 100644 index 0000000..d5e447c --- /dev/null +++ b/js/dojo/dojox/atom/README @@ -0,0 +1,53 @@ +------------------------------------------------------------------------------- +DojoX Data +------------------------------------------------------------------------------- +Version 1.0 +Release date: 11/18/2008 +------------------------------------------------------------------------------- +Project state: experimental +------------------------------------------------------------------------------- +Project authors + Jared Jurkiewicz (jared.jurkiewicz@gmail.com) + Benjamin Schell (Corporate CLA) + +------------------------------------------------------------------------------- +Project description + +The DojoX Atom project is an implementation of the ATOM document format in a +JavaScript model and a full Atom Publishing Protocol (APP) io library for working +with ATOM feeds + +------------------------------------------------------------------------------- +Dependencies: + +DojoX Atom has dependencies on core dojo (dojo.data) and the D.O.H. unit test +framework. +------------------------------------------------------------------------------- +Documentation: + +See the Dojo API tool (http://dojotoolkit.org/api) +as well as the reference guide (http://dojotoolkit.org/reference-guide/dojox/atom.html) +------------------------------------------------------------------------------- +Contributions: + +Contributions of documentation, examples, and fixes are always welcome. + +------------------------------------------------------------------------------- +Installation instructions + +Grab the following from the Dojo SVN Repository: +http://svn.dojotoolkit.org/src/dojo/dojox/trunk/atom/* + +Install into the following directory structure: +/dojox/atom/ + +...which should be at the same level as your Dojo checkout. + +/dojox/atom/* + +Require in the sections you wish to use (the model, IO library, etc) +------------------------------------------------------------------------------- +Additional Notes: + This library is still undergoing some work and as such the API may change + hence the marking of 'experimental'. + diff --git a/js/dojo/dojox/atom/io/Connection.js b/js/dojo/dojox/atom/io/Connection.js new file mode 100644 index 0000000..da0c2a3 --- /dev/null +++ b/js/dojo/dojox/atom/io/Connection.js @@ -0,0 +1,437 @@ +//>>built +define("dojox/atom/io/Connection", [ + "dojo/_base/kernel", + "dojo/_base/xhr", + "dojo/_base/window", + "./model", + "dojo/_base/declare"], function (dojo, xhrUtil, windowUtil, model) { +return dojo.declare("dojox.atom.io.Connection",null,{ + // summary: This object implements a transport layer for working with ATOM feeds and ATOM publishing protocols. + // description: This object implements a transport layer for working with ATOM feeds and ATOM publishing protocols. + // Specifically, it provides a mechanism by which feeds can be fetched and entries can be fetched, created + // deleted, and modified. It also provides access to the introspection data. + + constructor: function(/* Boolean */sync, /* Boolean */preventCache){ + // summary: + // initializer + this.sync = sync; + this.preventCache = preventCache; + }, + + preventCache: false, //Flag to denote if the instance should use the xhr prevent cache mechanism + + alertsEnabled: false, //Flag to turn on alerts instead of throwing errors. + + getFeed: function(/*String*/url, /*Function*/callback, /*Function*/errorCallback, scope){ + // summary: + // Function to obtain a s specific ATOM feed from a given ATOM Feed url. + // description: + // This function takes the URL for a specific ATOM feed and returns + // the data from that feed to the caller through the use of a callback + // handler. + // + // url: String + // The URL of the ATOM feed to fetch. + // callback: + // Function + // A function reference that will handle the feed when it has been retrieved. + // The callback should accept two parameters: The feed object and the original complete DOM object. + // scope: Object + // The scope to use for all callbacks. + // + // returns: + // Nothing. The return is handled through the callback handler. + this._getXmlDoc(url, "feed", new model.Feed(), model._Constants.ATOM_NS, callback, /*handleDocumentRetrieved,*/ errorCallback, scope); + }, + + getService: function(url, callback, errorCallback, scope){ + // summary: + // Function to retrieve an introspection document from the given URL. + // description: + // This function takes the URL for an ATOM item and feed and returns + // the introspection document. + // + // url: + // String + // The URL of the ATOM document to obtain the introspection document of. + // callback: + // Function + // A function reference that will handle the introspection document when it has been retrieved. + // The callback should accept two parameters: The introspection document object and the original complete DOM object. + // + // returns: + // Nothing. The return is handled through the callback handler. + this._getXmlDoc(url, "service", new model.Service(url), model._Constants.APP_NS, callback, errorCallback, scope); + }, + + getEntry: function(url, callback, errorCallback, scope){ + // summary: + // Function to retrieve a single entry from an ATOM feed from the given URL. + // description: + // This function takes the URL for an ATOM entry and returns the constructed dojox.atom.io.model.Entry object through + // the specified callback. + // + // url: + // String + // The URL of the ATOM Entry document to parse. + // callback: + // Function + // A function reference that will handle the Entry object obtained. + // The callback should accept two parameters, the dojox.atom.io.model.Entry object and the original dom. + // + // returns: + // Nothing. The return is handled through the callback handler. + this._getXmlDoc(url, "entry", new model.Entry(), model._Constants.ATOM_NS, callback, errorCallback, scope); + }, + + _getXmlDoc: function(url, nodeName, newNode, namespace, callback, errorCallback, scope){ + // summary: + // Internal Function to retrieve an XML document and pass the results to a callback. + // description: + // This internal function takes the URL for an XML document and and passes the + // parsed contents to a specified callback. + // + // url: + // String + // The URL of the XML document to retrieve + // callback: + // Function + // A function reference that will handle the retrieved XML data. + // The callback should accept one parameter, the DOM of the parsed XML document. + // + // returns: + // Nothing. The return is handled through the callback handler. + if(!scope){ + scope = windowUtil.global; + } + var ae = this.alertsEnabled; + var xhrArgs = { + url: url, + handleAs: "xml", + sync: this.sync, + preventCache: this.preventCache, + load: function(data, args){ + var node = null; + var evaldObj = data; + var nodes; + if(evaldObj){ + //find the first node of the appropriate name + if(typeof(evaldObj.getElementsByTagNameNS)!= "undefined"){ + nodes = evaldObj.getElementsByTagNameNS(namespace,nodeName); + if(nodes && nodes.length > 0){ + node = nodes.item(0); + }else if(evaldObj.lastChild){ + // name_spaces can be used without declaration of atom (for example + // gooogle feeds often returns iTunes name_space qualifiers on elements) + // Treat this situation like name_spaces not enabled. + node = evaldObj.lastChild; + } + }else if(typeof(evaldObj.getElementsByTagName)!= "undefined"){ + // Find the first eith the correct tag name and correct namespace. + nodes = evaldObj.getElementsByTagName(nodeName); + if(nodes && nodes.length > 0){ + for(var i=0; i<nodes.length; i++){ + if(nodes[i].namespaceURI == namespace){ + node = nodes[i]; + break; + } + } + }else if(evaldObj.lastChild){ + node = evaldObj.lastChild; + } + }else if(evaldObj.lastChild){ + node = evaldObj.lastChild; + }else{ + callback.call(scope, null, null, args); + return; + } + newNode.buildFromDom(node); + if(callback){ + callback.call(scope, newNode, evaldObj, args); + }else if(ae){ + throw new Error("The callback value does not exist."); + } + }else{ + callback.call(scope, null, null, args); + } + } + }; + + if(this.user && this.user !== null){ + xhrArgs.user = this.user; + } + if(this.password && this.password !== null){ + xhrArgs.password = this.password; + } + + if(errorCallback){ + xhrArgs.error = function(error, args){errorCallback.call(scope, error, args);}; + }else{ + xhrArgs.error = function(){ + throw new Error("The URL requested cannot be accessed"); + }; + } + xhrUtil.get(xhrArgs); + }, + + updateEntry: function(entry, callback, errorCallback, retrieveUpdated, xmethod, scope){ + // summary: + // Function to update a specific ATOM entry by putting the new changes via APP. + // description: + // This function takes a specific dojox.atom.io.model.Entry object and pushes the + // changes back to the provider of the Entry. + // The entry MUST have a link tag with rel="edit" for this to work. + // + // entry: + // Object + // The dojox.atom.io.model.Entry object to update. + // callback: + // Function + // A function reference that will handle the results from the entry update. + // The callback should accept two parameters: The first is an Entry object, and the second is the URL of that Entry + // Either can be null, depending on the value of retrieveUpdated. + // retrieveUpdated: + // boolean + // A boolean flag denoting if the entry that was updated should then be + // retrieved and returned to the caller via the callback. + // xmethod: + // boolean + // Whether to use POST for PUT/DELETE items and send the X-Method-Override header. + // scope: + // Object + // The scope to use for all callbacks. + // + // returns: + // Nothing. The return is handled through the callback handler. + if(!scope){ + scope = windowUtil.global; + } + entry.updated = new Date(); + var url = entry.getEditHref(); + if(!url){ + throw new Error("A URL has not been specified for editing this entry."); + } + + var self = this; + var ae = this.alertsEnabled; + var xhrArgs = { + url: url, + handleAs: "text", + contentType: "text/xml", + sync: this.sync, + preventCache: this.preventCache, + load: function(data, args){ + var location = null; + if(retrieveUpdated){ + location = args.xhr.getResponseHeader("Location"); + if(!location){location = url;} + + //Function to handle the callback mapping of a getEntry after an update to return the + //entry and location. + var handleRetrieve = function(entry, dom, args){ + if(callback){ + callback.call(scope, entry, location, args); + }else if(ae){ + throw new Error("The callback value does not exist."); + } + }; + self.getEntry(location,handleRetrieve); + }else{ + if(callback){ + callback.call(scope, entry, args.xhr.getResponseHeader("Location"), args); + }else if(ae){ + throw new Error("The callback value does not exist."); + } + } + return data; + } + }; + + if(this.user && this.user !== null){ + xhrArgs.user = this.user; + } + if(this.password && this.password !== null){ + xhrArgs.password = this.password; + } + + if(errorCallback){ + xhrArgs.error = function(error, args){errorCallback.call(scope, error, args);}; + }else{ + xhrArgs.error = function(){ + throw new Error("The URL requested cannot be accessed"); + }; + } + + if(xmethod){ + xhrArgs.postData = entry.toString(true); //Set the content to send. + xhrArgs.headers = {"X-Method-Override": "PUT"}; + xhrUtil.post(xhrArgs); + }else{ + xhrArgs.putData = entry.toString(true); //Set the content to send. + var xhr = xhrUtil.put(xhrArgs); + } + }, + + addEntry: function(entry, url, callback, errorCallback, retrieveEntry, scope){ + // summary: + // Function to add a new ATOM entry by posting the new entry via APP. + // description: + // This function takes a specific dojox.atom.io.model.Entry object and pushes the + // changes back to the provider of the Entry. + // + // entry: + // Object + // The dojox.atom.io.model.Entry object to publish. + // callback: + // Function + // A function reference that will handle the results from the entry publish. + // The callback should accept two parameters: The first is an dojox.atom.io.model.Entry object, and the second is the location of the entry + // Either can be null, depending on the value of retrieveUpdated. + // retrieveEntry: + // boolean + // A boolean flag denoting if the entry that was created should then be + // retrieved and returned to the caller via the callback. + // scope: + // Object + // The scope to use for all callbacks. + // + // returns: + // Nothing. The return is handled through the callback handler. + if(!scope){ + scope = windowUtil.global; + } + + entry.published = new Date(); + entry.updated = new Date(); + + var feedUrl = entry.feedUrl; + var ae = this.alertsEnabled; + + //Determine which URL to use for the post. + if(!url && feedUrl){url = feedUrl;} + if(!url){ + if(ae){ + throw new Error("The request cannot be processed because the URL parameter is missing."); + } + return; + } + + var self = this; + var xhrArgs = { + url: url, + handleAs: "text", + contentType: "text/xml", + sync: this.sync, + preventCache: this.preventCache, + postData: entry.toString(true), + load: function(data, args){ + var location = args.xhr.getResponseHeader("Location"); + if(!location){ + location = url; + } + if(!args.retrieveEntry){ + if(callback){ + callback.call(scope, entry, location, args); + }else if(ae){ + throw new Error("The callback value does not exist."); + } + }else{ + //Function to handle the callback mapping of a getEntry after an update to return the + //entry and location. + var handleRetrieve = function(entry, dom, args){ + if(callback){ + callback.call(scope, entry, location, args); + }else if(ae){ + throw new Error("The callback value does not exist."); + } + }; + self.getEntry(location,handleRetrieve); + } + return data; + } + }; + + if(this.user && this.user !== null){ + xhrArgs.user = this.user; + } + if(this.password && this.password !== null){ + xhrArgs.password = this.password; + } + + if(errorCallback){ + xhrArgs.error = function(error, args){errorCallback.call(scope, error, args);}; + }else{ + xhrArgs.error = function(){ + throw new Error("The URL requested cannot be accessed"); + }; + } + xhrUtil.post(xhrArgs); + }, + + deleteEntry: function(entry,callback,errorCallback,xmethod,scope){ + // summary: + // Function to delete a specific ATOM entry via APP. + // description: + // This function takes a specific dojox.atom.io.model.Entry object and calls for a delete on the + // service housing the ATOM Entry database. + // The entry MUST have a link tag with rel="edit" for this to work. + // + // entry: + // Object + // The dojox.atom.io.model.Entry object to delete. + // callback: + // Function + // A function reference that will handle the results from the entry delete. + // The callback is called only if the delete is successful. + // + // returns: + // Nothing. The return is handled through the callback handler. + if(!scope){ + scope = windowUtil.global; + } + + var url = null; + if(typeof(entry) == "string"){ + url = entry; + }else{ + url = entry.getEditHref(); + } + if(!url){ + callback.call(scope, false, null); + throw new Error("The request cannot be processed because the URL parameter is missing."); + } + + var xhrArgs = { + url: url, + handleAs: "text", + sync: this.sync, + preventCache: this.preventCache, + load: function(data, args){ + callback.call(scope, args); + return data; + } + }; + + if(this.user && this.user !== null){ + xhrArgs.user = this.user; + } + if(this.password && this.password !== null){ + xhrArgs.password = this.password; + } + + if(errorCallback){ + xhrArgs.error = function(error, args){errorCallback.call(scope, error, args);}; + }else{ + xhrArgs.error = function(){ + throw new Error("The URL requested cannot be accessed"); + }; + } + if(xmethod){ + xhrArgs.headers = {"X-Method-Override": "DELETE"}; + dhxr.post(xhrArgs); + }else{ + xhrUtil.del(xhrArgs); + } + } +}); +});
\ No newline at end of file diff --git a/js/dojo/dojox/atom/io/model.js b/js/dojo/dojox/atom/io/model.js new file mode 100644 index 0000000..1f0d7f1 --- /dev/null +++ b/js/dojo/dojox/atom/io/model.js @@ -0,0 +1,1307 @@ +//>>built +define("dojox/atom/io/model", [ + "dojo/_base/kernel", + "dojo/_base/declare", // dojo.declare + "dojo/_base/lang", + "dojo/date/stamp", + "dojox/xml/parser" +], function (dojo, declare, lang, stamp, parser) { + +var model = dojo.getObject("dojox.atom.io.model", true); + +model._Constants = { + // summary: + // Container for general constants. + // description: + // Container for general constants. + "ATOM_URI": "http://www.w3.org/2005/Atom", + "ATOM_NS": "http://www.w3.org/2005/Atom", + "PURL_NS": "http://purl.org/atom/app#", + "APP_NS": "http://www.w3.org/2007/app" +}; + +model._actions = { + // summary: + // Container for tag handling functions. + // description: + // Container for tag handling functions. Each child of this container is + // a handler function for the given type of node. Each accepts two parameters: + // obj: Object. + // The object to insert data into. + // node: DOM Node. + // The dom node containing the data + "link": function(obj,node){ + if(obj.links === null){obj.links = [];} + var link = new model.Link(); + link.buildFromDom(node); + obj.links.push(link); + }, + "author": function(obj,node){ + if(obj.authors === null){obj.authors = [];} + var person = new model.Person("author"); + person.buildFromDom(node); + obj.authors.push(person); + }, + "contributor": function(obj,node){ + if(obj.contributors === null){obj.contributors = [];} + var person = new model.Person("contributor"); + person.buildFromDom(node); + obj.contributors.push(person); + }, + "category": function(obj,node){ + if(obj.categories === null){obj.categories = [];} + var cat = new model.Category(); + cat.buildFromDom(node); + obj.categories.push(cat); + }, + "icon": function(obj,node){ + obj.icon = parser.textContent(node); + }, + "id": function(obj,node){ + obj.id = parser.textContent(node); + }, + "rights": function(obj,node){ + obj.rights = parser.textContent(node); + }, + "subtitle": function(obj,node){ + var cnt = new model.Content("subtitle"); + cnt.buildFromDom(node); + obj.subtitle = cnt; + }, + "title": function(obj,node){ + var cnt = new model.Content("title"); + cnt.buildFromDom(node); + obj.title = cnt; + }, + "updated": function(obj,node){ + obj.updated = model.util.createDate(node); + }, + // Google news + "issued": function(obj,node){ + obj.issued = model.util.createDate(node); + }, + // Google news + "modified": function(obj,node){ + obj.modified = model.util.createDate(node); + }, + "published": function(obj,node){ + obj.published = model.util.createDate(node); + }, + "entry": function(obj,node){ + if(obj.entries === null){obj.entries = [];} + //The object passed in should be a Feed object, since only feeds can contain Entries + var entry = obj.createEntry ? obj.createEntry() : new model.Entry(); + entry.buildFromDom(node); + obj.entries.push(entry); + }, + "content": function(obj, node){ + var cnt = new model.Content("content"); + cnt.buildFromDom(node); + obj.content = cnt; + }, + "summary": function(obj, node){ + var summary = new model.Content("summary"); + summary.buildFromDom(node); + obj.summary = summary; + }, + + "name": function(obj,node){ + obj.name = parser.textContent(node); + }, + "email" : function(obj,node){ + obj.email = parser.textContent(node); + }, + "uri" : function(obj,node){ + obj.uri = parser.textContent(node); + }, + "generator" : function(obj,node){ + obj.generator = new model.Generator(); + obj.generator.buildFromDom(node); + } +}; + +model.util = { + createDate: function(/*DOM node*/node){ + // summary: + // Utility function to create a date from a DOM node's text content. + // description: + // Utility function to create a date from a DOM node's text content. + // + // node: + // The DOM node to inspect. + // returns: + // Date object from a DOM Node containing a ISO-8610 string. + var textContent = parser.textContent(node); + if(textContent){ + return stamp.fromISOString(lang.trim(textContent)); + } + return null; + }, + escapeHtml: function(/*String*/str){ + // summary: + // Utility function to escape XML special characters in an HTML string. + // description: + // Utility function to escape XML special characters in an HTML string. + // + // str: + // The string to escape + // returns: + // HTML String with special characters (<,>,&, ", etc,) escaped. + return str.replace(/&/gm, "&").replace(/</gm, "<").replace(/>/gm, ">").replace(/"/gm, """) + .replace(/'/gm, "'"); // String + }, + unEscapeHtml: function(/*String*/str){ + // summary: + // Utility function to un-escape XML special characters in an HTML string. + // description: + // Utility function to un-escape XML special characters in an HTML string. + // + // str: + // The string to un-escape. + // returns: + // HTML String converted back to the normal text (unescaped) characters (<,>,&, ", etc,). + return str.replace(/</gm, "<").replace(/>/gm, ">").replace(/"/gm, "\"") + .replace(/'/gm, "'").replace(/&/gm, "&"); // String + }, + getNodename: function(/*DOM node*/node){ + // summary: + // Utility function to get a node name and deal with IE's bad handling of namespaces + // on tag names. + // description: + // Utility function to get a node name and deal with IE's bad handling of namespaces + // on tag names. + // + // node: + // The DOM node whose name to retrieve. + // returns: + // String + // The name without namespace prefixes. + var name = null; + if(node !== null){ + name = node.localName ? node.localName: node.nodeName; + if(name !== null){ + var nsSep = name.indexOf(":"); + if(nsSep !== -1){ + name = name.substring((nsSep + 1), name.length); + } + } + } + return name; + } +}; + +model.Node = dojo.declare(/*===== 'dojox.atom.io.model.Node', =====*/ null, { + constructor: function(name_space,name, attributes,content, shortNs){ + this.name_space = name_space; + this.name = name; + this.attributes = []; + if(attributes){ + this.attributes = attributes; + } + this.content = []; + this.rawNodes = []; + this.textContent = null; + if(content){ + this.content.push(content); + } + this.shortNs = shortNs; + this._objName = "Node";//for debugging purposes + this.nodeType = "Node"; + }, + buildFromDom: function(node){ + this._saveAttributes(node); + this.name_space = node.namespaceURI; + this.shortNs = node.prefix; + this.name = model.util.getNodename(node); + for(var x=0; x < node.childNodes.length; x++){ + var c = node.childNodes[x]; + if(model.util.getNodename(c) != "#text" ){ + this.rawNodes.push(c); + var n = new model.Node(); + n.buildFromDom(c, true); + this.content.push(n); + }else{ + this.content.push(c.nodeValue); + } + } + this.textContent = parser.textContent(node); + }, + _saveAttributes: function(node){ + if(!this.attributes){this.attributes = [];} + // Work around lack of hasAttributes() in IE + var hasAttributes = function(node){ + var attrs = node.attributes; + if(attrs === null){return false;} + return (attrs.length !== 0); + }; + + if(hasAttributes(node) && this._getAttributeNames){ + var names = this._getAttributeNames(node); + if(names && names.length > 0){ + for(var x in names){ + var attrib = node.getAttribute(names[x]); + if(attrib){this.attributes[names[x]] = attrib;} + } + } + } + }, + addAttribute: function(name, value){ + this.attributes[name]=value; + }, + getAttribute: function(name){ + return this.attributes[name]; + }, + //if child objects want their attributes parsed, they should override + //to return an array of attrib names + _getAttributeNames: function(node){ + var names = []; + for(var i =0; i<node.attributes.length; i++){ + names.push(node.attributes[i].nodeName); + } + return names; + }, + toString: function(){ + var xml = []; + var x; + var name = (this.shortNs?this.shortNs+":":'')+this.name; + var cdata = (this.name == "#cdata-section"); + if(cdata){ + xml.push("<![CDATA["); + xml.push(this.textContent); + xml.push("]]>"); + }else{ + xml.push("<"); + xml.push(name); + if(this.name_space){ + xml.push(" xmlns='" + this.name_space + "'"); + } + if(this.attributes){ + for(x in this.attributes){ + xml.push(" " + x + "='" + this.attributes[x] + "'"); + } + } + if(this.content){ + xml.push(">"); + for(x in this.content){ + xml.push(this.content[x]); + } + xml.push("</" + name + ">\n"); + }else{ + xml.push("/>\n"); + } + } + return xml.join(''); + }, + addContent: function(content){ + this.content.push(content); + } +}); +//Types are as follows: links: array of Link, authors: array of Person, categories: array of Category +//contributors: array of Person, ico +model.AtomItem = dojo.declare(/*===== "dojox.atom.io.model.AtomItem", =====*/ model.Node,{ + constructor: function(args){ + this.ATOM_URI = model._Constants.ATOM_URI; + this.links = null; //Array of Link + this.authors = null; //Array of Person + this.categories = null; //Array of Category + this.contributors = null; //Array of Person + this.icon = this.id = this.logo = this.xmlBase = this.rights = null; //String + this.subtitle = this.title = null; //Content + this.updated = this.published = null; //Date + // Google news + this.issued = this.modified = null; //Date + this.content = null; //Content + this.extensions = null; //Array of Node, non atom based + this.entries = null; //Array of Entry + this.name_spaces = {}; + this._objName = "AtomItem"; //for debugging purposes + this.nodeType = "AtomItem"; + }, + // summary: Class container for generic Atom items. + // description: Class container for generic Atom items. + _getAttributeNames: function(){return null;}, + _accepts: {}, + accept: function(tag){return Boolean(this._accepts[tag]);}, + _postBuild: function(){},//child objects can override this if they want to be called after a Dom build + buildFromDom: function(node){ + var i, c, n; + for(i=0; i<node.attributes.length; i++){ + c = node.attributes.item(i); + n = model.util.getNodename(c); + if(c.prefix == "xmlns" && c.prefix != n){ + this.addNamespace(c.nodeValue, n); + } + } + c = node.childNodes; + for(i = 0; i< c.length; i++){ + if(c[i].nodeType == 1) { + var name = model.util.getNodename(c[i]); + if(!name){continue;} + if(c[i].namespaceURI != model._Constants.ATOM_NS && name != "#text"){ + if(!this.extensions){this.extensions = [];} + var extensionNode = new model.Node(); + extensionNode.buildFromDom(c[i]); + this.extensions.push(extensionNode); + } + if(!this.accept(name.toLowerCase())){ + continue; + } + var fn = model._actions[name]; + if(fn) { + fn(this,c[i]); + } + } + } + this._saveAttributes(node); + if(this._postBuild){this._postBuild();} + }, + addNamespace: function(fullName, shortName){ + if(fullName && shortName){ + this.name_spaces[shortName] = fullName; + } + }, + addAuthor: function(/*String*/name, /*String*/email, /*String*/uri){ + // summary: + // Function to add in an author to the list of authors. + // description: + // Function to add in an author to the list of authors. + // + // name: + // The author's name. + // email: + // The author's e-mail address. + // uri: + // A URI associated with the author. + if(!this.authors){this.authors = [];} + this.authors.push(new model.Person("author",name,email,uri)); + }, + addContributor: function(/*String*/name, /*String*/email, /*String*/uri){ + // summary: + // Function to add in an author to the list of authors. + // description: + // Function to add in an author to the list of authors. + // + // name: + // The author's name. + // email: + // The author's e-mail address. + // uri: + // A URI associated with the author. + if(!this.contributors){this.contributors = [];} + this.contributors.push(new model.Person("contributor",name,email,uri)); + }, + addLink: function(/*String*/href,/*String*/rel,/*String*/hrefLang,/*String*/title,/*String*/type){ + // summary: + // Function to add in a link to the list of links. + // description: + // Function to add in a link to the list of links. + // + // href: + // The href. + // rel: + // String + // hrefLang: + // String + // title: + // A title to associate with the link. + // type: + // The type of link is is. + if(!this.links){this.links=[];} + this.links.push(new model.Link(href,rel,hrefLang,title,type)); + }, + removeLink: function(/*String*/href, /*String*/rel){ + // summary: + // Function to remove a link from the list of links. + // description: + // Function to remove a link from the list of links. + // + // href: + // The href. + // rel: + // String + if(!this.links || !lang.isArray(this.links)){return;} + var count = 0; + for(var i = 0; i < this.links.length; i++){ + if((!href || this.links[i].href === href) && (!rel || this.links[i].rel === rel)){ + this.links.splice(i,1); count++; + } + } + return count; + }, + removeBasicLinks: function(){ + // summary: + // Function to remove all basic links from the list of links. + // description: + // Function to remove all basic link from the list of links. + if(!this.links){return;} + var count = 0; + for(var i = 0; i < this.links.length; i++){ + if(!this.links[i].rel){this.links.splice(i,1); count++; i--;} + } + return count; + }, + addCategory: function(/*String*/scheme, /*String*/term, /*String*/label){ + // summary: + // Function to add in a category to the list of categories. + // description: + // Function to add in a category to the list of categories. + // + // scheme: + // String + // term: + // String + // label: + // String + if(!this.categories){this.categories = [];} + this.categories.push(new model.Category(scheme,term,label)); + }, + getCategories: function(/*String*/scheme){ + // summary: + // Function to get all categories that match a particular scheme. + // description: + // Function to get all categories that match a particular scheme. + // + // scheme: + // String + // The scheme to filter on. + if(!scheme){return this.categories;} + //If categories belonging to a particular scheme are required, then create a new array containing these + var arr = []; + for(var x in this.categories){ + if(this.categories[x].scheme === scheme){arr.push(this.categories[x]);} + } + return arr; + }, + removeCategories: function(/*String*/scheme, /*String*/term){ + // summary: + // Function to remove all categories that match a particular scheme and term. + // description: + // Function to remove all categories that match a particular scheme and term. + // + // scheme: + // The scheme to filter on. + // term: + // The term to filter on. + if(!this.categories){return;} + var count = 0; + for(var i=0; i<this.categories.length; i++){ + if((!scheme || this.categories[i].scheme === scheme) && (!term || this.categories[i].term === term)){ + this.categories.splice(i, 1); count++; i--; + } + } + return count; + }, + setTitle: function(/*String*/str, /*String*/type){ + // summary: + // Function to set the title of the item. + // description: + // Function to set the title of the item. + // + // str: + // The title to set. + // type: + // The type of title format, text, xml, xhtml, etc. + if(!str){return;} + this.title = new model.Content("title"); + this.title.value = str; + if(type){this.title.type = type;} + }, + addExtension: function(/*String*/name_space,/*String*/name, /*Array*/attributes, /*String*/content, /*String*/shortNS){ + // summary: + // Function to add in an extension namespace into the item. + // description: + // Function to add in an extension namespace into the item. + // + // name_space: + // The namespace of the extension. + // name: + // The name of the extension + // attributes: + // The attributes associated with the extension. + // content: + // The content of the extension. + if(!this.extensions){this.extensions=[];} + this.extensions.push(new model.Node(name_space,name,attributes,content, shortNS || "ns"+this.extensions.length)); + }, + getExtensions: function(/*String*/name_space, /*String*/name){ + // summary: + // Function to get extensions that match a namespace and name. + // description: + // Function to get extensions that match a namespace and name. + // + // name_space: + // The namespace of the extension. + // name: + // The name of the extension + var arr = []; + if(!this.extensions){return arr;} + for(var x in this.extensions){ + if((this.extensions[x].name_space === name_space || this.extensions[x].shortNs === name_space) && (!name || this.extensions[x].name === name)){ + arr.push(this.extensions[x]); + } + } + return arr; + }, + removeExtensions: function(/*String*/name_space, /*String*/name){ + // summary: + // Function to remove extensions that match a namespace and name. + // description: + // Function to remove extensions that match a namespace and name. + // + // name_space: + // The namespace of the extension. + // name: + // The name of the extension + if(!this.extensions){return;} + for(var i=0; i< this.extensions.length; i++){ + if((this.extensions[i].name_space == name_space || this.extensions[i].shortNs === name_space) && this.extensions[i].name === name){ + this.extensions.splice(i,1); + i--; + } + } + }, + destroy: function() { + this.links = null; + this.authors = null; + this.categories = null; + this.contributors = null; + this.icon = this.id = this.logo = this.xmlBase = this.rights = null; + this.subtitle = this.title = null; + this.updated = this.published = null; + // Google news + this.issued = this.modified = null; + this.content = null; + this.extensions = null; + this.entries = null; + } +}); + +model.Category = dojo.declare(/*===== "dojox.atom.io.model.Category", =====*/ model.Node,{ + // summary: + // Class container for 'Category' types. + // description: + // Class container for 'Category' types. + constructor: function(/*String*/scheme, /*String*/term, /*String*/label){ + this.scheme = scheme; this.term = term; this.label = label; + this._objName = "Category";//for debugging + this.nodeType = "Category"; + }, + _postBuild: function(){}, + _getAttributeNames: function(){ + return ["label","scheme","term"]; + }, + toString: function(){ + // summary: + // Function to construct string form of the category tag, which is an XML structure. + // description: + // Function to construct string form of the category tag, which is an XML structure. + var s = []; + s.push('<category '); + if(this.label){s.push(' label="'+this.label+'" ');} + if(this.scheme){s.push(' scheme="'+this.scheme+'" ');} + if(this.term){s.push(' term="'+this.term+'" ');} + s.push('/>\n'); + return s.join(''); + }, + buildFromDom: function(/*DOM node*/node){ + // summary: + // Function to do construction of the Category data from the DOM node containing it. + // description: + // Function to do construction of the Category data from the DOM node containing it. + // + // node: + // The DOM node to process for content. + this._saveAttributes(node);//just get the attributes from the node + this.label = this.attributes.label; + this.scheme = this.attributes.scheme; + this.term = this.attributes.term; + if(this._postBuild){this._postBuild();} + } +}); + +model.Content = dojo.declare(/*===== "dojox.atom.io.model.Content", =====*/ model.Node,{ + // summary: + // Class container for 'Content' types. Such as summary, content, username, and so on types of data. + // description: + // Class container for 'Content' types. Such as summary, content, username, and so on types of data. + constructor: function(tagName, value, src, type,xmlLang){ + this.tagName = tagName; this.value = value; this.src = src; this.type=type; this.xmlLang = xmlLang; + this.HTML = "html"; this.TEXT = "text"; this.XHTML = "xhtml"; this.XML="xml"; + this._useTextContent = "true"; + this.nodeType = "Content"; + }, + _getAttributeNames: function(){return ["type","src"];}, + _postBuild: function(){}, + buildFromDom: function(/*DOM node*/node){ + // summary: + // Function to do construction of the Content data from the DOM node containing it. + // description: + // Function to do construction of the Content data from the DOM node containing it. + // + // node: + // The DOM node to process for content. + //Handle checking for XML content as the content type + var type = node.getAttribute("type"); + if(type){ + type = type.toLowerCase(); + if(type == "xml" || "text/xml"){ + type = this.XML; + } + }else{ + type="text"; + } + if(type === this.XML){ + if(node.firstChild){ + var i; + this.value = ""; + for(i = 0; i < node.childNodes.length; i++){ + var c = node.childNodes[i]; + if(c){ + this.value += parser.innerXML(c); + } + } + } + } else if(node.innerHTML){ + this.value = node.innerHTML; + }else{ + this.value = parser.textContent(node); + } + + this._saveAttributes(node); + + if(this.attributes){ + this.type = this.attributes.type; + this.scheme = this.attributes.scheme; + this.term = this.attributes.term; + } + if(!this.type){this.type = "text";} + + //We need to unescape the HTML content here so that it can be displayed correctly when the value is fetched. + var lowerType = this.type.toLowerCase(); + if(lowerType === "html" || lowerType === "text/html" || lowerType === "xhtml" || lowerType === "text/xhtml"){ + this.value = this.value?model.util.unEscapeHtml(this.value):""; + } + + if(this._postBuild){this._postBuild();} + }, + toString: function(){ + // summary: + // Function to construct string form of the content tag, which is an XML structure. + // description: + // Function to construct string form of the content tag, which is an XML structure. + var s = []; + s.push('<'+this.tagName+' '); + if(!this.type){this.type = "text";} + if(this.type){s.push(' type="'+this.type+'" ');} + if(this.xmlLang){s.push(' xml:lang="'+this.xmlLang+'" ');} + if(this.xmlBase){s.push(' xml:base="'+this.xmlBase+'" ');} + + //all HTML must be escaped + if(this.type.toLowerCase() == this.HTML){ + s.push('>'+model.util.escapeHtml(this.value)+'</'+this.tagName+'>\n'); + }else{ + s.push('>'+this.value+'</'+this.tagName+'>\n'); + } + var ret = s.join(''); + return ret; + } +}); + +model.Link = dojo.declare(/*===== "dojox.atom.io.model.Link", =====*/ model.Node,{ + // summary: + // Class container for 'link' types. + // description: + // Class container for 'link' types. + constructor: function(href,rel,hrefLang,title,type){ + this.href = href; this.hrefLang = hrefLang; this.rel = rel; this.title = title;this.type = type; + this.nodeType = "Link"; + }, + _getAttributeNames: function(){return ["href","jrefLang","rel","title","type"];}, + _postBuild: function(){}, + buildFromDom: function(node){ + // summary: + // Function to do construction of the link data from the DOM node containing it. + // description: + // Function to do construction of the link data from the DOM node containing it. + // + // node: + // The DOM node to process for link data. + this._saveAttributes(node);//just get the attributes from the node + this.href = this.attributes.href; + this.hrefLang = this.attributes.hreflang; + this.rel = this.attributes.rel; + this.title = this.attributes.title; + this.type = this.attributes.type; + if(this._postBuild){this._postBuild();} + }, + toString: function(){ + // summary: + // Function to construct string form of the link tag, which is an XML structure. + // description: + // Function to construct string form of the link tag, which is an XML structure. + var s = []; + s.push('<link '); + if(this.href){s.push(' href="'+this.href+'" ');} + if(this.hrefLang){s.push(' hrefLang="'+this.hrefLang+'" ');} + if(this.rel){s.push(' rel="'+this.rel+'" ');} + if(this.title){s.push(' title="'+this.title+'" ');} + if(this.type){s.push(' type = "'+this.type+'" ');} + s.push('/>\n'); + return s.join(''); + } +}); + +model.Person = dojo.declare(/*===== "dojox.atom.io.model.Person", =====*/ model.Node,{ + // summary: + // Class container for 'person' types, such as Author, controbutors, and so on. + // description: + // Class container for 'person' types, such as Author, controbutors, and so on. + constructor: function(personType, name, email, uri){ + this.author = "author"; + this.contributor = "contributor"; + if(!personType){ + personType = this.author; + } + this.personType = personType; + this.name = name || ''; + this.email = email || ''; + this.uri = uri || ''; + this._objName = "Person";//for debugging + this.nodeType = "Person"; + }, + _getAttributeNames: function(){return null;}, + _postBuild: function(){}, + accept: function(tag){return Boolean(this._accepts[tag]);}, + buildFromDom: function(node){ + // summary: + // Function to do construction of the person data from the DOM node containing it. + // description: + // Function to do construction of the person data from the DOM node containing it. + // + // node: + // The DOM node to process for person data. + var c = node.childNodes; + for(var i = 0; i< c.length; i++){ + var name = model.util.getNodename(c[i]); + + if(!name){continue;} + + if(c[i].namespaceURI != model._Constants.ATOM_NS && name != "#text"){ + if(!this.extensions){this.extensions = [];} + var extensionNode = new model.Node(); + extensionNode.buildFromDom(c[i]); + this.extensions.push(extensionNode); + } + if(!this.accept(name.toLowerCase())){ + continue; + } + var fn = model._actions[name]; + if(fn) { + fn(this,c[i]); + } + } + this._saveAttributes(node); + if(this._postBuild){this._postBuild();} + }, + _accepts: { + 'name': true, + 'uri': true, + 'email': true + }, + toString: function(){ + // summary: + // Function to construct string form of the Person tag, which is an XML structure. + // description: + // Function to construct string form of the Person tag, which is an XML structure. + var s = []; + s.push('<'+this.personType+'>\n'); + if(this.name){s.push('\t<name>'+this.name+'</name>\n');} + if(this.email){s.push('\t<email>'+this.email+'</email>\n');} + if(this.uri){s.push('\t<uri>'+this.uri+'</uri>\n');} + s.push('</'+this.personType+'>\n'); + return s.join(''); + } +}); + +model.Generator = dojo.declare(/*===== "dojox.atom.io.model.Generator", =====*/ model.Node,{ + // summary: + // Class container for 'Generator' types. + // description: + // Class container for 'Generator' types. + constructor: function(/*String*/uri, /*String*/version, /*String*/value){ + this.uri = uri; + this.version = version; + this.value = value; + }, + _postBuild: function(){}, + buildFromDom: function(node){ + // summary: + // Function to do construction of the generator data from the DOM node containing it. + // description: + // Function to do construction of the generator data from the DOM node containing it. + // + // node: + // The DOM node to process for link data. + + this.value = parser.textContent(node); + this._saveAttributes(node); + + this.uri = this.attributes.uri; + this.version = this.attributes.version; + + if(this._postBuild){this._postBuild();} + }, + toString: function(){ + // summary: + // Function to construct string form of the Generator tag, which is an XML structure. + // description: + // Function to construct string form of the Generator tag, which is an XML structure. + var s = []; + s.push('<generator '); + if(this.uri){s.push(' uri="'+this.uri+'" ');} + if(this.version){s.push(' version="'+this.version+'" ');} + s.push('>'+this.value+'</generator>\n'); + var ret = s.join(''); + return ret; + } +}); + +model.Entry = dojo.declare(/*===== "dojox.atom.io.model.Entry", =====*/ model.AtomItem,{ + // summary: + // Class container for 'Entry' types. + // description: + // Class container for 'Entry' types. + constructor: function(/*String*/id){ + this.id = id; this._objName = "Entry"; this.feedUrl = null; + }, + _getAttributeNames: function(){return null;}, + _accepts: { + 'author': true, + 'content': true, + 'category': true, + 'contributor': true, + 'created': true, + 'id': true, + 'link': true, + 'published': true, + 'rights': true, + 'summary': true, + 'title': true, + 'updated': true, + 'xmlbase': true, + 'issued': true, + 'modified': true + }, + toString: function(amPrimary){ + // summary: + // Function to construct string form of the entry tag, which is an XML structure. + // description: + // Function to construct string form of the entry tag, which is an XML structure. + var s = []; + var i; + if(amPrimary){ + s.push("<?xml version='1.0' encoding='UTF-8'?>"); + s.push("<entry xmlns='"+model._Constants.ATOM_URI+"'"); + }else{s.push("<entry");} + if(this.xmlBase){s.push(' xml:base="'+this.xmlBase+'" ');} + for(i in this.name_spaces){s.push(' xmlns:'+i+'="'+this.name_spaces[i]+'"');} + s.push('>\n'); + s.push('<id>' + (this.id ? this.id: '') + '</id>\n'); + if(this.issued && !this.published){this.published = this.issued;} + if(this.published){s.push('<published>'+stamp.toISOString(this.published)+'</published>\n');} + if(this.created){s.push('<created>'+stamp.toISOString(this.created)+'</created>\n');} + //Google News + if(this.issued){s.push('<issued>'+stamp.toISOString(this.issued)+'</issued>\n');} + + //Google News + if(this.modified){s.push('<modified>'+stamp.toISOString(this.modified)+'</modified>\n');} + + if(this.modified && !this.updated){this.updated = this.modified;} + if(this.updated){s.push('<updated>'+stamp.toISOString(this.updated)+'</updated>\n');} + if(this.rights){s.push('<rights>'+this.rights+'</rights>\n');} + if(this.title){s.push(this.title.toString());} + if(this.summary){s.push(this.summary.toString());} + var arrays = [this.authors,this.categories,this.links,this.contributors,this.extensions]; + for(var x in arrays){ + if(arrays[x]){ + for(var y in arrays[x]){ + s.push(arrays[x][y]); + } + } + } + if(this.content){s.push(this.content.toString());} + s.push("</entry>\n"); + return s.join(''); //string + }, + getEditHref: function(){ + // summary: + // Function to get the href that allows editing of this feed entry. + // description: + // Function to get the href that allows editing of this feed entry. + // + // returns: + // The href that specifies edit capability. + if(this.links === null || this.links.length === 0){ + return null; + } + for(var x in this.links){ + if(this.links[x].rel && this.links[x].rel == "edit"){ + return this.links[x].href; //string + } + } + return null; + }, + setEditHref: function(url){ + if(this.links === null){ + this.links = []; + } + for(var x in this.links){ + if(this.links[x].rel && this.links[x].rel == "edit"){ + this.links[x].href = url; + return; + } + } + this.addLink(url, 'edit'); + } +}); + +model.Feed = dojo.declare(/*===== "dojox.atom.io.model.Feed", =====*/ model.AtomItem,{ + // summary: + // Class container for 'Feed' types. + // description: + // Class container for 'Feed' types. + _accepts: { + 'author': true, + 'content': true, + 'category': true, + 'contributor': true, + 'created': true, + 'id': true, + 'link': true, + 'published': true, + 'rights': true, + 'summary': true, + 'title': true, + 'updated': true, + 'xmlbase': true, + 'entry': true, + 'logo': true, + 'issued': true, + 'modified': true, + 'icon': true, + 'subtitle': true + }, + addEntry: function(/*object*/entry){ + // summary: + // Function to add an entry to this feed. + // description: + // Function to add an entry to this feed. + // entry: + // The entry object to add. + if(!entry.id){ + throw new Error("The entry object must be assigned an ID attribute."); + } + if(!this.entries){this.entries = [];} + entry.feedUrl = this.getSelfHref(); + this.entries.push(entry); + }, + getFirstEntry: function(){ + // summary: + // Function to get the first entry of the feed. + // description: + // Function to get the first entry of the feed. + // + // returns: + // The first entry in the feed. + if(!this.entries || this.entries.length === 0){return null;} + return this.entries[0]; //object + }, + getEntry: function(/*String*/entryId){ + // summary: + // Function to get an entry by its id. + // description: + // Function to get an entry by its id. + // + // returns: + // The entry desired, or null if none. + if(!this.entries){return null;} + for(var x in this.entries){ + if(this.entries[x].id == entryId){ + return this.entries[x]; + } + } + return null; + }, + removeEntry: function(/*object*/entry){ + // summary: + // Function to remove an entry from the list of links. + // description: + // Function to remove an entry from the list of links. + // + // entry: + // The entry. + if(!this.entries){return;} + var count = 0; + for(var i = 0; i < this.entries.length; i++){ + if(this.entries[i] === entry){ + this.entries.splice(i,1); + count++; + } + } + return count; + }, + setEntries: function(/*array*/arrayOfEntry){ + // summary: + // Function to add a set of entries to the feed. + // description: + // Function to get an entry by its id. + // + // arrayOfEntry: + // An array of entry objects to add to the feed. + for(var x in arrayOfEntry){ + this.addEntry(arrayOfEntry[x]); + } + }, + toString: function(){ + // summary: + // Function to construct string form of the feed tag, which is an XML structure. + // description: + // Function to construct string form of the feed tag, which is an XML structure. + var s = []; + var i; + s.push('<?xml version="1.0" encoding="utf-8"?>\n'); + s.push('<feed xmlns="'+model._Constants.ATOM_URI+'"'); + if(this.xmlBase){s.push(' xml:base="'+this.xmlBase+'"');} + for(i in this.name_spaces){s.push(' xmlns:'+i+'="'+this.name_spaces[i]+'"');} + s.push('>\n'); + s.push('<id>' + (this.id ? this.id: '') + '</id>\n'); + if(this.title){s.push(this.title);} + if(this.copyright && !this.rights){this.rights = this.copyright;} + if(this.rights){s.push('<rights>' + this.rights + '</rights>\n');} + + // Google news + if(this.issued){s.push('<issued>'+stamp.toISOString(this.issued)+'</issued>\n');} + if(this.modified){s.push('<modified>'+stamp.toISOString(this.modified)+'</modified>\n');} + + if(this.modified && !this.updated){this.updated=this.modified;} + if(this.updated){s.push('<updated>'+stamp.toISOString(this.updated)+'</updated>\n');} + if(this.published){s.push('<published>'+stamp.toISOString(this.published)+'</published>\n');} + if(this.icon){s.push('<icon>'+this.icon+'</icon>\n');} + if(this.language){s.push('<language>'+this.language+'</language>\n');} + if(this.logo){s.push('<logo>'+this.logo+'</logo>\n');} + if(this.subtitle){s.push(this.subtitle.toString());} + if(this.tagline){s.push(this.tagline.toString());} + //TODO: need to figure out what to do with xmlBase + var arrays = [this.alternateLinks,this.authors,this.categories,this.contributors,this.otherLinks,this.extensions,this.entries]; + for(i in arrays){ + if(arrays[i]){ + for(var x in arrays[i]){ + s.push(arrays[i][x]); + } + } + } + s.push('</feed>'); + return s.join(''); + }, + createEntry: function(){ + // summary: + // Function to Create a new entry object in the feed. + // description: + // Function to Create a new entry object in the feed. + // returns: + // An empty entry object in the feed. + var entry = new model.Entry(); + entry.feedUrl = this.getSelfHref(); + return entry; //object + }, + getSelfHref: function(){ + // summary: + // Function to get the href that refers to this feed. + // description: + // Function to get the href that refers to this feed. + // returns: + // The href that refers to this feed or null if none. + if(this.links === null || this.links.length === 0){ + return null; + } + for(var x in this.links){ + if(this.links[x].rel && this.links[x].rel == "self"){ + return this.links[x].href; //string + } + } + return null; + } +}); + +model.Service = dojo.declare(/*===== "dojox.atom.io.model.Service", =====*/ model.AtomItem,{ + // summary: + // Class container for 'Feed' types. + // description: + // Class container for 'Feed' types. + constructor: function(href){ + this.href = href; + }, + //builds a Service document. each element of this, except for the namespace, is the href of + //a service that the server supports. Some of the common services are: + //"create-entry" , "user-prefs" , "search-entries" , "edit-template" , "categories" + buildFromDom: function(/*DOM node*/node){ + // summary: + // Function to do construction of the Service data from the DOM node containing it. + // description: + // Function to do construction of the Service data from the DOM node containing it. + // + // node: + // The DOM node to process for content. + var i; + this.workspaces = []; + if(node.tagName != "service"){ + // FIXME: Need 0.9 DOM util... + //node = dojox.xml.parser.firstElement(node,"service"); + //if(!node){return;} + return; + } + if(node.namespaceURI != model._Constants.PURL_NS && node.namespaceURI != model._Constants.APP_NS){return;} + var ns = node.namespaceURI; + this.name_space = node.namespaceURI; + //find all workspaces, and create them + var workspaces ; + if(typeof(node.getElementsByTagNameNS)!= "undefined"){ + workspaces = node.getElementsByTagNameNS(ns,"workspace"); + }else{ + // This block is IE only, which doesn't have a 'getElementsByTagNameNS' function + workspaces = []; + var temp = node.getElementsByTagName('workspace'); + for(i=0; i<temp.length; i++){ + if(temp[i].namespaceURI == ns){ + workspaces.push(temp[i]); + } + } + } + if(workspaces && workspaces.length > 0){ + var wkLen = 0; + var workspace; + for(i = 0; i< workspaces.length; i++){ + workspace = (typeof(workspaces.item)==="undefined"?workspaces[i]:workspaces.item(i)); + var wkspace = new model.Workspace(); + wkspace.buildFromDom(workspace); + this.workspaces[wkLen++] = wkspace; + } + } + }, + getCollection: function(/*String*/url){ + // summary: + // Function to collections that match a specific url. + // description: + // Function to collections that match a specific url. + // + // url: + // e URL to match collections against. + for(var i=0;i<this.workspaces.length;i++){ + var coll=this.workspaces[i].collections; + for(var j=0;j<coll.length;j++){ + if(coll[j].href == url){ + return coll; + } + } + } + return null; + } +}); + +model.Workspace = dojo.declare(/*===== "dojox.atom.io.model.Workspace", =====*/ model.AtomItem,{ + // summary: + // Class container for 'Workspace' types. + // description: + // Class container for 'Workspace' types. + constructor: function(title){ + this.title = title; + this.collections = []; + }, + + buildFromDom: function(/*DOM node*/node){ + // summary: + // Function to do construction of the Workspace data from the DOM node containing it. + // description: + // Function to do construction of the Workspace data from the DOM node containing it. + // + // node: + // The DOM node to process for content. + var name = model.util.getNodename(node); + if(name != "workspace"){return;} + var c = node.childNodes; + var len = 0; + for(var i = 0; i< c.length; i++){ + var child = c[i]; + if(child.nodeType === 1){ + name = model.util.getNodename(child); + if(child.namespaceURI == model._Constants.PURL_NS || child.namespaceURI == model._Constants.APP_NS){ + if(name === "collection"){ + var coll = new model.Collection(); + coll.buildFromDom(child); + this.collections[len++] = coll; + } + }else if(child.namespaceURI === model._Constants.ATOM_NS){ + if(name === "title"){ + this.title = parser.textContent(child); + } + } + //FIXME: Add an extension point so others can impl different namespaces. For now just + //ignore unknown namespace tags. + } + } + } +}); + +model.Collection = dojo.declare(/*===== "dojox.atom.io.model.Collection", =====*/ model.AtomItem,{ + // summary: + // Class container for 'Collection' types. + // description: + // Class container for 'Collection' types. + constructor: function(href, title){ + this.href = href; + this.title = title; + this.attributes = []; + this.features = []; + this.children = []; + this.memberType = null; + this.id = null; + }, + + buildFromDom: function(/*DOM node*/node){ + // summary: + // Function to do construction of the Collection data from the DOM node containing it. + // description: + // Function to do construction of the Collection data from the DOM node containing it. + // + // node: + // The DOM node to process for content. + this.href = node.getAttribute("href"); + var c = node.childNodes; + for(var i = 0; i< c.length; i++){ + var child = c[i]; + if(child.nodeType === 1){ + var name = model.util.getNodename(child); + if(child.namespaceURI == model._Constants.PURL_NS || child.namespaceURI == model._Constants.APP_NS){ + if(name === "member-type"){ + this.memberType = parser.textContent(child); + }else if(name == "feature"){//this IF stmt might need some more work + if(child.getAttribute("id")){this.features.push(child.getAttribute("id"));} + }else{ + var unknownTypeChild = new model.Node(); + unknownTypeChild.buildFromDom(child); + this.children.push(unknownTypeChild); + } + }else if(child.namespaceURI === model._Constants.ATOM_NS){ + if(name === "id"){ + this.id = parser.textContent(child); + }else if(name === "title"){ + this.title = parser.textContent(child); + } + } + } + } + } +}); + +return model; +}); diff --git a/js/dojo/dojox/atom/widget/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/FeedEntryEditor.js new file mode 100644 index 0000000..efe6a99 --- /dev/null +++ b/js/dojo/dojox/atom/widget/FeedEntryEditor.js @@ -0,0 +1,1239 @@ +//>>built +require({cache:{ +'url:dojox/atom/widget/templates/FeedEntryEditor.html':"<div class=\"feedEntryViewer\">\n <table border=\"0\" width=\"100%\" class=\"feedEntryViewerMenuTable\" dojoAttachPoint=\"feedEntryViewerMenu\" style=\"display: none;\">\n <tr width=\"100%\" dojoAttachPoint=\"entryCheckBoxDisplayOptions\">\n \t<td align=\"left\" dojoAttachPoint=\"entryNewButton\">\n <span class=\"feedEntryViewerMenu\" dojoAttachPoint=\"doNew\" dojoAttachEvent=\"onclick:_toggleNew\"></span>\n \t</td>\n <td align=\"left\" dojoAttachPoint=\"entryEditButton\" style=\"display: none;\">\n <span class=\"feedEntryViewerMenu\" dojoAttachPoint=\"edit\" dojoAttachEvent=\"onclick:_toggleEdit\"></span>\n </td>\n <td align=\"left\" dojoAttachPoint=\"entrySaveCancelButtons\" style=\"display: none;\">\n <span class=\"feedEntryViewerMenu\" dojoAttachPoint=\"save\" dojoAttachEvent=\"onclick:saveEdits\"></span>\n <span class=\"feedEntryViewerMenu\" dojoAttachPoint=\"cancel\" dojoAttachEvent=\"onclick:cancelEdits\"></span>\n </td>\n <td align=\"right\">\n <span class=\"feedEntryViewerMenu\" dojoAttachPoint=\"displayOptions\" dojoAttachEvent=\"onclick:_toggleOptions\"></span>\n </td>\n </tr>\n <tr class=\"feedEntryViewerDisplayCheckbox\" dojoAttachPoint=\"entryCheckBoxRow\" width=\"100%\" style=\"display: none;\">\n <td dojoAttachPoint=\"feedEntryCelltitle\">\n <input type=\"checkbox\" name=\"title\" value=\"Title\" dojoAttachPoint=\"feedEntryCheckBoxTitle\" dojoAttachEvent=\"onclick:_toggleCheckbox\"/>\n\t\t\t\t<label for=\"title\" dojoAttachPoint=\"feedEntryCheckBoxLabelTitle\"></label>\n </td>\n <td dojoAttachPoint=\"feedEntryCellauthors\">\n <input type=\"checkbox\" name=\"authors\" value=\"Authors\" dojoAttachPoint=\"feedEntryCheckBoxAuthors\" dojoAttachEvent=\"onclick:_toggleCheckbox\"/>\n\t\t\t\t<label for=\"title\" dojoAttachPoint=\"feedEntryCheckBoxLabelAuthors\"></label>\n </td>\n <td dojoAttachPoint=\"feedEntryCellcontributors\">\n <input type=\"checkbox\" name=\"contributors\" value=\"Contributors\" dojoAttachPoint=\"feedEntryCheckBoxContributors\" dojoAttachEvent=\"onclick:_toggleCheckbox\"/>\n\t\t\t\t<label for=\"title\" dojoAttachPoint=\"feedEntryCheckBoxLabelContributors\"></label>\n </td>\n <td dojoAttachPoint=\"feedEntryCellid\">\n <input type=\"checkbox\" name=\"id\" value=\"Id\" dojoAttachPoint=\"feedEntryCheckBoxId\" dojoAttachEvent=\"onclick:_toggleCheckbox\"/>\n\t\t\t\t<label for=\"title\" dojoAttachPoint=\"feedEntryCheckBoxLabelId\"></label>\n </td>\n <td rowspan=\"2\" align=\"right\">\n <span class=\"feedEntryViewerMenu\" dojoAttachPoint=\"close\" dojoAttachEvent=\"onclick:_toggleOptions\"></span>\n </td>\n\t\t</tr>\n\t\t<tr class=\"feedEntryViewerDisplayCheckbox\" dojoAttachPoint=\"entryCheckBoxRow2\" width=\"100%\" style=\"display: none;\">\n <td dojoAttachPoint=\"feedEntryCellupdated\">\n <input type=\"checkbox\" name=\"updated\" value=\"Updated\" dojoAttachPoint=\"feedEntryCheckBoxUpdated\" dojoAttachEvent=\"onclick:_toggleCheckbox\"/>\n\t\t\t\t<label for=\"title\" dojoAttachPoint=\"feedEntryCheckBoxLabelUpdated\"></label>\n </td>\n <td dojoAttachPoint=\"feedEntryCellsummary\">\n <input type=\"checkbox\" name=\"summary\" value=\"Summary\" dojoAttachPoint=\"feedEntryCheckBoxSummary\" dojoAttachEvent=\"onclick:_toggleCheckbox\"/>\n\t\t\t\t<label for=\"title\" dojoAttachPoint=\"feedEntryCheckBoxLabelSummary\"></label>\n </td>\n <td dojoAttachPoint=\"feedEntryCellcontent\">\n <input type=\"checkbox\" name=\"content\" value=\"Content\" dojoAttachPoint=\"feedEntryCheckBoxContent\" dojoAttachEvent=\"onclick:_toggleCheckbox\"/>\n\t\t\t\t<label for=\"title\" dojoAttachPoint=\"feedEntryCheckBoxLabelContent\"></label>\n </td>\n </tr>\n </table>\n \n <table class=\"feedEntryViewerContainer\" border=\"0\" width=\"100%\">\n <tr class=\"feedEntryViewerTitle\" dojoAttachPoint=\"entryTitleRow\" style=\"display: none;\">\n <td>\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr class=\"graphic-tab-lgray\">\n\t\t\t\t\t\t<td class=\"lp2\">\n\t\t\t\t\t\t\t<span class=\"lp\" dojoAttachPoint=\"entryTitleHeader\"></span>\n\t\t\t\t\t\t</td>\n </tr>\n <tr>\n <td>\n \t<select dojoAttachPoint=\"entryTitleSelect\" dojoAttachEvent=\"onchange:_switchEditor\" style=\"display: none\">\n \t\t<option value=\"text\">Text</option>\n\t\t\t\t\t\t\t\t<option value=\"html\">HTML</option>\n\t\t\t\t\t\t\t\t<option value=\"xhtml\">XHTML</option>\n \t</select>\n </td>\n </tr>\n <tr>\n <td colspan=\"2\" dojoAttachPoint=\"entryTitleNode\">\n </td>\n </tr>\n </table>\n </td>\n </tr>\n\n <tr class=\"feedEntryViewerAuthor\" dojoAttachPoint=\"entryAuthorRow\" style=\"display: none;\">\n <td>\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr class=\"graphic-tab-lgray\">\n\t\t\t\t\t\t<td class=\"lp2\">\n\t\t\t\t\t\t\t<span class=\"lp\" dojoAttachPoint=\"entryAuthorHeader\"></span>\n\t\t\t\t\t\t</td>\n </tr>\n <tr>\n <td dojoAttachPoint=\"entryAuthorNode\">\n </td>\n </tr>\n </table>\n </td>\n </tr>\n\n <tr class=\"feedEntryViewerContributor\" dojoAttachPoint=\"entryContributorRow\" style=\"display: none;\">\n <td>\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr class=\"graphic-tab-lgray\">\n\t\t\t\t\t\t<td class=\"lp2\">\n\t\t\t\t\t\t\t<span class=\"lp\" dojoAttachPoint=\"entryContributorHeader\"></span>\n\t\t\t\t\t\t</td>\n </tr>\n <tr>\n <td dojoAttachPoint=\"entryContributorNode\" class=\"feedEntryViewerContributorNames\">\n </td>\n </tr>\n </table>\n </td>\n </tr>\n \n <tr class=\"feedEntryViewerId\" dojoAttachPoint=\"entryIdRow\" style=\"display: none;\">\n <td>\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr class=\"graphic-tab-lgray\">\n\t\t\t\t\t\t<td class=\"lp2\">\n\t\t\t\t\t\t\t<span class=\"lp\" dojoAttachPoint=\"entryIdHeader\"></span>\n\t\t\t\t\t\t</td>\n </tr>\n <tr>\n <td dojoAttachPoint=\"entryIdNode\" class=\"feedEntryViewerIdText\">\n </td>\n </tr>\n </table>\n </td>\n </tr>\n \n <tr class=\"feedEntryViewerUpdated\" dojoAttachPoint=\"entryUpdatedRow\" style=\"display: none;\">\n <td>\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr class=\"graphic-tab-lgray\">\n\t\t\t\t\t\t<td class=\"lp2\">\n\t\t\t\t\t\t\t<span class=\"lp\" dojoAttachPoint=\"entryUpdatedHeader\"></span>\n\t\t\t\t\t\t</td>\n </tr>\n <tr>\n <td dojoAttachPoint=\"entryUpdatedNode\" class=\"feedEntryViewerUpdatedText\">\n </td>\n </tr>\n </table>\n </td>\n </tr>\n \n <tr class=\"feedEntryViewerSummary\" dojoAttachPoint=\"entrySummaryRow\" style=\"display: none;\">\n <td>\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr class=\"graphic-tab-lgray\">\n\t\t\t\t\t\t<td class=\"lp2\" colspan=\"2\">\n\t\t\t\t\t\t\t<span class=\"lp\" dojoAttachPoint=\"entrySummaryHeader\"></span>\n\t\t\t\t\t\t</td>\n </tr>\n <tr>\n <td>\n \t<select dojoAttachPoint=\"entrySummarySelect\" dojoAttachEvent=\"onchange:_switchEditor\" style=\"display: none\">\n \t\t<option value=\"text\">Text</option>\n\t\t\t\t\t\t\t\t<option value=\"html\">HTML</option>\n\t\t\t\t\t\t\t\t<option value=\"xhtml\">XHTML</option>\n \t</select>\n </td>\n </tr>\n <tr>\n <td dojoAttachPoint=\"entrySummaryNode\">\n </td>\n </tr>\n </table>\n </td>\n </tr>\n \n <tr class=\"feedEntryViewerContent\" dojoAttachPoint=\"entryContentRow\" style=\"display: none;\">\n <td>\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr class=\"graphic-tab-lgray\">\n\t\t\t\t\t\t<td class=\"lp2\">\n\t\t\t\t\t\t\t<span class=\"lp\" dojoAttachPoint=\"entryContentHeader\"></span>\n\t\t\t\t\t\t</td>\n </tr>\n <tr>\n <td>\n \t<select dojoAttachPoint=\"entryContentSelect\" dojoAttachEvent=\"onchange:_switchEditor\" style=\"display: none\">\n \t\t<option value=\"text\">Text</option>\n\t\t\t\t\t\t\t\t<option value=\"html\">HTML</option>\n\t\t\t\t\t\t\t\t<option value=\"xhtml\">XHTML</option>\n \t</select>\n </td>\n </tr>\n <tr>\n <td dojoAttachPoint=\"entryContentNode\">\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n</div>\n", +'url:dojox/atom/widget/templates/PeopleEditor.html':"<div class=\"peopleEditor\">\n\t<table style=\"width: 100%\">\n\t\t<tbody dojoAttachPoint=\"peopleEditorEditors\"></tbody>\n\t</table>\n\t<span class=\"peopleEditorButton\" dojoAttachPoint=\"peopleEditorButton\" dojoAttachEvent=\"onclick:_add\"></span>\n</div>"}}); +define("dojox/atom/widget/FeedEntryEditor", [ + "dojo/_base/kernel", + "dojo/_base/lang", + "dojo/_base/connect", + "dojo/_base/fx", + "dojo/_base/sniff", + "dojo/dom", + "dojo/dom-style", + "dojo/dom-construct", + "dijit/_Widget", + "dijit/_Templated", + "dijit/_Container", + "dijit/Editor", + "dijit/form/TextBox", + "dijit/form/SimpleTextarea", + "./FeedEntryViewer", + "../io/model", + "dojo/text!./templates/FeedEntryEditor.html", + "dojo/text!./templates/PeopleEditor.html", + "dojo/i18n!./nls/FeedEntryViewer", + "dojo/i18n!./nls/FeedEntryEditor", + "dojo/i18n!./nls/PeopleEditor", + "dojo/_base/declare" +], function (dojo, lang, connect, fx, has, domUtil, domStyle, domConstruct, _Widget, _Templated, _Container, Editor, TextBox, SimpleTextarea, FeedEntryViewer, model, template, peopleEditorTemplate, i18nViewer, i18nEditor, i18nPeople) { +dojo.experimental("dojox.atom.widget.FeedEntryEditor"); + +var widget = dojo.getObject("dojox.atom.widget", true); + +widget.FeedEntryEditor = dojo.declare(/*===== "dojox.atom.widget.FeedEntryEditor", =====*/ FeedEntryViewer,{ + // summary: + // An ATOM feed entry editor that allows viewing of the individual attributes of an entry. + // description: + // An ATOM feed entry editor that allows viewing of the individual attributes of an entry. + _contentEditor: null, + _oldContent: null, + _setObject: null, + enableEdit: false, + _contentEditorCreator: null, + _editors: {}, + entryNewButton: null, + _editable: false, //Flag denoting if the current entry is editable or not. + + //Templates for the HTML rendering. Need to figure these out better, admittedly. + templateString: template, + + postCreate: function(){ + if(this.entrySelectionTopic !== ""){ + this._subscriptions = [dojo.subscribe(this.entrySelectionTopic, this, "_handleEvent")]; + } + var _nlsResources = i18nViewer; + this.displayOptions.innerHTML = _nlsResources.displayOptions; + this.feedEntryCheckBoxLabelTitle.innerHTML = _nlsResources.title; + this.feedEntryCheckBoxLabelAuthors.innerHTML = _nlsResources.authors; + this.feedEntryCheckBoxLabelContributors.innerHTML = _nlsResources.contributors; + this.feedEntryCheckBoxLabelId.innerHTML = _nlsResources.id; + this.close.innerHTML = _nlsResources.close; + this.feedEntryCheckBoxLabelUpdated.innerHTML = _nlsResources.updated; + this.feedEntryCheckBoxLabelSummary.innerHTML = _nlsResources.summary; + this.feedEntryCheckBoxLabelContent.innerHTML = _nlsResources.content; + + _nlsResources = i18nEditor; + this.doNew.innerHTML = _nlsResources.doNew; + this.edit.innerHTML = _nlsResources.edit; + this.save.innerHTML = _nlsResources.save; + this.cancel.innerHTML = _nlsResources.cancel; + }, + + setEntry: function(/*object*/entry, /*object*/feed, /*boolean*/leaveMenuState){ + // summary: + // Function to set the current entry that is being edited. + // description: + // Function to set the current entry that is being edited. + // + // entry: + // Instance of dojox.atom.io.model.Entry to display for reading/editing. + if(this._entry !== entry){ + //If we swap entries, we don't want to keep the menu states and modes. + this._editMode=false; + leaveMenuState=false; + }else{ + leaveMenuState = true; + } + widget.FeedEntryEditor.superclass.setEntry.call(this, entry, feed); + this._editable = this._isEditable(entry); + if(!leaveMenuState && !this._editable){ + domStyle.set(this.entryEditButton, 'display', 'none'); + domStyle.set(this.entrySaveCancelButtons, 'display', 'none'); + } + if(this._editable && this.enableEdit){ + if(!leaveMenuState){ + domStyle.set(this.entryEditButton, 'display', ''); + //TODO double check this &&... + if(this.enableMenuFade && this.entrySaveCancelButton){ + fx.fadeOut({node: this.entrySaveCancelButton,duration: 250}).play(); + } + } + } + }, + + _toggleEdit: function(){ + // summary: + // Internal function for toggling/enabling the display of edit mode + // description: + // Internal function for toggling/enabling the display of edit mode + // + // returns: + // Nothing. + if(this._editable && this.enableEdit){ + domStyle.set(this.entryEditButton, 'display', 'none'); + domStyle.set(this.entrySaveCancelButtons, 'display', ''); + this._editMode = true; + + //Rebuild the view using the same entry and feed. + this.setEntry(this._entry, this._feed, true); + } + }, + + _handleEvent: function(/*object*/entrySelectionEvent){ + // summary: + // Internal function for listening to a topic that will handle entry notification. + // description: + // Internal function for listening to a topic that will handle entry notification. + // + // entrySelectionEvent: + // The topic message containing the entry that was selected for view. + // + // returns: + // Nothing. + if(entrySelectionEvent.source != this && entrySelectionEvent.action == "delete" && + entrySelectionEvent.entry && entrySelectionEvent.entry == this._entry){ + domStyle.set(this.entryEditButton, 'display', 'none'); + } + widget.FeedEntryEditor.superclass._handleEvent.call(this, entrySelectionEvent); + }, + + _isEditable: function(/*object*/entry){ + // summary: + // Internal function for determining of a particular entry is editable. + // description: + // Internal function for determining of a particular entry is editable. + // This is used for determining if the delete action should be displayed or not. + // + // entry: + // The dojox.atom.io.model.Entry object to examine + // + // returns: + // Boolean denoting if the entry seems editable or not.. + var retVal = false; + if(entry && entry !== null && entry.links && entry.links !== null){ + for(var x in entry.links){ + if(entry.links[x].rel && entry.links[x].rel == "edit"){ + retVal = true; + break; + } + } + } + return retVal; + }, + + // The following set<Attribute> functions override the corresponding functions in FeedEntryViewer. These handle + // the editMode flag by inserting appropriate editor widgets inside of just splashing the content in the page. + setTitle: function(/*DOM node*/titleAnchorNode, /*boolean*/editMode, /*object*/entry){ + // summary: + // Function to set the contents of the title node in the template to some value from the entry. + // description: + // Function to set the contents of the title node in the template to some value from the entry. + // This exists specifically so users can over-ride how the title data is filled out from an entry. + // + // titleAnchorNode: + // The DOM node to attach the title data to. + // editMode: + // Boolean to indicate if the display should be in edit mode or not. + // entry: + // The Feed Entry to work with. + // + if(!editMode){ + widget.FeedEntryEditor.superclass.setTitle.call(this, titleAnchorNode, editMode, entry); + if(entry.title && entry.title.value && entry.title.value !== null){ + this.setFieldValidity("title", true); + } + }else{ + if(entry.title && entry.title.value && entry.title.value !== null){ + if(!this._toLoad){ + this._toLoad = []; + } + this.entryTitleSelect.value = entry.title.type; + + var editor = this._createEditor(titleAnchorNode, entry.title, true, entry.title.type === "html" || entry.title.type === "xhtml"); + editor.name = "title"; + this._toLoad.push(editor); + this.setFieldValidity("titleedit",true); + this.setFieldValidity("title",true); + } + } + }, + + setAuthors: function(/*DOM node*/authorsAnchorNode, /*boolean*/editMode, /*object*/entry){ + // summary: + // Function to set the contents of the author node in the template to some value from the entry. + // description: + // Function to set the contents of the author node in the template to some value from the entry. + // This exists specifically so users can over-ride how the title data is filled out from an entry. + // + // authorsAnchorNode: + // The DOM node to attach the author data to. + // editMode: + // Boolean to indicate if the display should be in edit mode or not. + // entry: + // The Feed Entry to work with. + if(!editMode){ + widget.FeedEntryEditor.superclass.setAuthors.call(this, authorsAnchorNode, editMode, entry); + if(entry.authors && entry.authors.length > 0){ + this.setFieldValidity("authors", true); + } + }else{ + if(entry.authors && entry.authors.length > 0){ + this._editors.authors = this._createPeopleEditor(this.entryAuthorNode, {data: entry.authors, name: "Author"}); + this.setFieldValidity("authors", true); + } + } + }, + + + setContributors: function(/*DOM node*/contributorsAnchorNode, /*boolean*/editMode, /*object*/entry){ + // summary: + // Function to set the contents of the contributor node in the template to some value from the entry. + // description: + // Function to set the contents of the contributor node in the template to some value from the entry. + // This exists specifically so users can over-ride how the title data is filled out from an entry. + // + // contributorsAnchorNode: + // The DOM node to attach the contributor data to. + // editMode: + // Boolean to indicate if the display should be in edit mode or not. + // entry: + // The Feed Entry to work with. + if(!editMode){ + widget.FeedEntryEditor.superclass.setContributors.call(this, contributorsAnchorNode, editMode, entry); + if(entry.contributors && entry.contributors.length > 0){ + this.setFieldValidity("contributors", true); + } + }else{ + if(entry.contributors && entry.contributors.length > 0){ + this._editors.contributors = this._createPeopleEditor(this.entryContributorNode, {data: entry.contributors, name: "Contributor"}); + this.setFieldValidity("contributors", true); + } + } + }, + + + setId: function(/*DOM node*/idAnchorNode, /*boolean*/editMode, /*object*/entry){ + // summary: + // Function to set the contents of the ID node in the template to some value from the entry. + // description: + // Function to set the contents of the ID node in the template to some value from the entry. + // This exists specifically so users can over-ride how the title data is filled out from an entry. + // + // idAnchorNode: + // The DOM node to attach the ID data to. + // editMode: + // Boolean to indicate if the display should be in edit mode or not. + // entry: + // The Feed Entry to work with. + if(!editMode){ + widget.FeedEntryEditor.superclass.setId.call(this, idAnchorNode, editMode, entry); + if(entry.id && entry.id !== null){ + this.setFieldValidity("id", true); + } + }else{ + if(entry.id && entry.id !== null){ + this._editors.id = this._createEditor(idAnchorNode, entry.id); + this.setFieldValidity("id",true); + } + } + }, + + setUpdated: function(/*DOM node*/updatedAnchorNode, /*boolean*/editMode, /*object*/entry){ + // summary: + // Function to set the contents of the updated node in the template to some value from the entry. + // description: + // Function to set the contents of the updated node in the template to some value from the entry. + // This exists specifically so users can over-ride how the title data is filled out from an entry. + // + // updatedAnchorNode: + // The DOM node to attach the udpated data to. + // editMode: + // Boolean to indicate if the display should be in edit mode or not. + // entry: + // The Feed Entry to work with. + if(!editMode){ + widget.FeedEntryEditor.superclass.setUpdated.call(this, updatedAnchorNode, editMode, entry); + if(entry.updated && entry.updated !== null){ + this.setFieldValidity("updated", true); + } + }else{ + if(entry.updated && entry.updated !== null){ + this._editors.updated = this._createEditor(updatedAnchorNode, entry.updated); + this.setFieldValidity("updated",true); + } + } + }, + + + setSummary: function(/*DOM node*/summaryAnchorNode, /*boolean*/editMode, /*object*/entry){ + // summary: + // Function to set the contents of the summary node in the template to some value from the entry. + // description: + // Function to set the contents of the summary node in the template to some value from the entry. + // This exists specifically so users can over-ride how the title data is filled out from an entry. + // + // summaryAnchorNode: + // The DOM node to attach the summary data to. + // editMode: + // Boolean to indicate if the display should be in edit mode or not. + // entry: + // The Feed Entry to work with. + if(!editMode){ + widget.FeedEntryEditor.superclass.setSummary.call(this, summaryAnchorNode, editMode, entry); + if(entry.summary && entry.summary.value && entry.summary.value !== null){ + this.setFieldValidity("summary", true); + } + }else{ + if(entry.summary && entry.summary.value && entry.summary.value !== null){ + if(!this._toLoad){ + this._toLoad = []; + } + this.entrySummarySelect.value = entry.summary.type; + + var editor = this._createEditor(summaryAnchorNode, entry.summary, true, entry.summary.type === "html" || entry.summary.type === "xhtml"); + editor.name = "summary"; + this._toLoad.push(editor); + this.setFieldValidity("summaryedit",true); + this.setFieldValidity("summary",true); + } + } + }, + + setContent: function(/*DOM node*/contentAnchorNode, /*boolean*/editMode, /*object*/entry){ + // summary: + // Function to set the contents of the content node in the template to some value from the entry. + // description: + // Function to set the contents of the content node in the template to some value from the entry. + // This exists specifically so users can over-ride how the title data is filled out from an entry. + // + // summaryAnchorNode: + // The DOM node to attach the content data to. + // editMode: + // Boolean to indicate if the display should be in edit mode or not. + // entry: + // The Feed Entry to work with. + if(!editMode){ + widget.FeedEntryEditor.superclass.setContent.call(this, contentAnchorNode, editMode, entry); + if(entry.content && entry.content.value && entry.content.value !== null){ + this.setFieldValidity("content",true); + } + }else{ + if(entry.content && entry.content.value && entry.content.value !== null){ + if(!this._toLoad){ + this._toLoad = []; + } + this.entryContentSelect.value = entry.content.type; + var editor = this._createEditor(contentAnchorNode, entry.content, true, entry.content.type === "html" || entry.content.type === "xhtml"); + editor.name = "content"; + this._toLoad.push(editor); + this.setFieldValidity("contentedit",true); + this.setFieldValidity("content",true); + } + } + }, + + _createEditor: function(/*DOM node*/anchorNode, /*DOM node*/node, /*boolean*/multiline, /*object*/rte){ + // summary: + // Function to create an appropriate text editor widget based on the given parameters. + // description: + // Function to create an appropriate text editor widget based on the given parameters. + // + // anchorNode: + // The DOM node to attach the editor widget to. + // node: + // An object containing the value to be put into the editor. This ranges from an anonymous object + // with a value parameter to a dojox.atom.io.model.Content object. + // multiline: + // A boolean indicating whether the content should be multiline (such as a textarea) instead of a + // single line (such as a textbox). + // rte: + // A boolean indicating whether the content should be a rich text editor widget. + // + // returns: + // Either a widget (for textarea or textbox widgets) or an anonymous object to be used to create a + // rich text area widget. + var viewNode; + var box; + if(!node){ + if(rte){ + // Returns an anonymous object which would then be loaded later, after the containing element + // exists on the page. + return {anchorNode: anchorNode, + entryValue: "", + editor: null, + generateEditor: function(){ + // The only way I found I could get the editor to behave consistently was to + // create the content on a span, and allow the content editor to replace it. + // This gets around the dynamic/delayed way in which content editors get created. + var node = document.createElement("div"); + node.innerHTML = this.entryValue; + this.anchorNode.appendChild(node); + var _editor = new Editor({}, node); + this.editor = _editor; + return _editor; + } + }; + } + if(multiline){ + // If multiline, create a textarea + viewNode = document.createElement("textarea"); + anchorNode.appendChild(viewNode); + domStyle.set(viewNode, 'width', '90%'); + box = new SimpleTextarea({},viewNode); + }else{ + // If single line, create a textbox. + viewNode = document.createElement("input"); + anchorNode.appendChild(viewNode); + domStyle.set(viewNode, 'width', '95%'); + box = new TextBox({},viewNode); + } + box.attr('value', ''); + return box; + } + + // Check through the node parameter to get the value to be used. + var value; + if(node.value !== undefined){ + value = node.value; + }else if(node.attr){ + value = node.attr('value'); + }else{ + value = node; + } + if(rte){ + // Returns an anonymous object which would then be loaded later, after the containing element + // exists on the page. + if(value.indexOf("<") != -1){ + value = value.replace(/</g, "<"); + } + return {anchorNode: anchorNode, + entryValue: value, + editor: null, + generateEditor: function(){ + // The only way I found I could get the editor to behave consistently was to + // create the content on a span, and allow the content editor to replace it. + // This gets around the dynamic/delayed way in which content editors get created. + var node = document.createElement("div"); + node.innerHTML = this.entryValue; + this.anchorNode.appendChild(node); + var _editor = new Editor({}, node); + this.editor = _editor; + return _editor; + } + }; + } + if(multiline){ + // If multiline, create a textarea + viewNode = document.createElement("textarea"); + anchorNode.appendChild(viewNode); + domStyle.set(viewNode, 'width', '90%'); + box = new SimpleTextarea({},viewNode); + }else{ + // If single line, create a textbox. + viewNode = document.createElement("input"); + anchorNode.appendChild(viewNode); + domStyle.set(viewNode, 'width', '95%'); + box = new TextBox({},viewNode); + } + box.attr('value', value); + return box; + }, + + _switchEditor: function(/*object*/event){ + // summary: + // Function to switch between editor types. + // description: + // Function to switch between a rich text editor and a textarea widget. Used for title, summary, + // And content when switching between text and html/xhtml content. + // + // event: + // The event generated by the change in the select box on the page. + var type = null; + var target = null; + var parent = null; + + // Determine the source/target of this event (to determine which editor we're switching) + if(has("ie")){ + target = event.srcElement; + }else{ + target = event.target; + } + + // Determine which editor (title, summary, or content) + if(target === this.entryTitleSelect){ + parent = this.entryTitleNode; + type = "title"; + } else if(target === this.entrySummarySelect){ + parent = this.entrySummaryNode; + type = "summary"; + }else{ + parent = this.entryContentNode; + type = "content"; + } + + // Grab the existing editor. + var editor = this._editors[type]; + var newEditor; + var value; + + if(target.value === "text"){ + if(editor.isInstanceOf(Editor)){ + // If we're changing the type to text and our existing editor is a rich text editor, we need to destroy + // it and switch to a multiline editor. + value = editor.attr('value', false); + editor.close(false,true); + editor.destroy(); + while(parent.firstChild){ + domConstruct.destroy(parent.firstChild); + } + newEditor = this._createEditor(parent, {value: value}, true, false); + this._editors[type] = newEditor; + } + }else{ + if(!editor.isInstanceOf(Editor)){ + // Otherwise, we're switching to a html or xhtml type, but we currently have a textarea widget. We need + // to destroy the existing RTE and create a multiline textarea widget. + value = editor.attr('value'); + editor.destroy(); + while(parent.firstChild){ + domConstruct.destroy(parent.firstChild); + } + newEditor = this._createEditor(parent, {value: value}, true, true); + newEditor = lang.hitch(newEditor, newEditor.generateEditor)(); + this._editors[type] = newEditor; + } + } + }, + + _createPeopleEditor: function(/*DOM node*/anchorNode, /*DOM node*/node){ + // summary: + // Creates a People Editor widget and returns it. + // description: + // Creates a People Editor widget, sets its value, and returns it. + // + // anchorNode: + // The node to attach the editor to. + // node: + // An object containing the value to be put into the editor. Typically, this is an + // dojox.atom.io.model.Person object. + // + // returns: A new People Editor object. + var viewNode = document.createElement("div"); + anchorNode.appendChild(viewNode); + return new widget.PeopleEditor(node,viewNode); + }, + + saveEdits: function(){ + // summary: + // Saves edits submitted when the 'save' button is pressed. + // description: + // Saves edits submitted when the 'save' button is pressed. Distinguishes between new and existing + // entries and saves appropriately. Fetches the values of the editors, and, if existing, compares them to + // the existing values and submits the updates, otherwise creates a new entry and posts it as a new entry. + // + // returns: + // Nothing. + domStyle.set(this.entrySaveCancelButtons, 'display', 'none'); + domStyle.set(this.entryEditButton, 'display', ''); + domStyle.set(this.entryNewButton, 'display', ''); + var modifiedEntry = false; + var value; + var i; + var changed; + var entry; + var authors; + var contributors; + if(!this._new){ + entry = this.getEntry(); + if(this._editors.title && (this._editors.title.attr('value') != entry.title.value || this.entryTitleSelect.value != entry.title.type)){ + value = this._editors.title.attr('value'); + if(this.entryTitleSelect.value === "xhtml"){ + value = this._enforceXhtml(value); + if(value.indexOf('<div xmlns="http://www.w3.org/1999/xhtml">') !== 0){ + value = '<div xmlns="http://www.w3.org/1999/xhtml">' + value + '</div>'; + } + } + entry.title = new model.Content("title", value, null, this.entryTitleSelect.value); + modifiedEntry = true; + } + + if(this._editors.id.attr('value') != entry.id){ + entry.id = this._editors.id.attr('value'); + modifiedEntry = true; + } + + if(this._editors.summary && (this._editors.summary.attr('value') != entry.summary.value || this.entrySummarySelect.value != entry.summary.type)){ + value = this._editors.summary.attr('value'); + if(this.entrySummarySelect.value === "xhtml"){ + value = this._enforceXhtml(value); + if(value.indexOf('<div xmlns="http://www.w3.org/1999/xhtml">') !== 0){ + value = '<div xmlns="http://www.w3.org/1999/xhtml">' + value + '</div>'; + } + } + entry.summary = new model.Content("summary", value, null, this.entrySummarySelect.value); + modifiedEntry = true; + } + + if(this._editors.content && (this._editors.content.attr('value') != entry.content.value || this.entryContentSelect.value != entry.content.type)){ + value = this._editors.content.attr('value'); + if(this.entryContentSelect.value === "xhtml"){ + value = this._enforceXhtml(value); + if(value.indexOf('<div xmlns="http://www.w3.org/1999/xhtml">') !== 0){ + value = '<div xmlns="http://www.w3.org/1999/xhtml">' + value + '</div>'; + } + } + entry.content = new model.Content("content", value, null, this.entryContentSelect.value); + modifiedEntry = true; + } + + if(this._editors.authors){ + if(modifiedEntry){ + entry.authors = []; + authors = this._editors.authors.getValues(); + for(i in authors){ + if(authors[i].name || authors[i].email || authors[i].uri){ + entry.addAuthor(authors[i].name, authors[i].email, authors[i].uri); + } + } + }else{ + var currentAuthors = entry.authors; + var searchAuthors = function(name, email, uri){ + for(i in currentAuthors){ + if(currentAuthors[i].name === name && currentAuthors[i].email === email && currentAuthors[i].uri === uri){ + return true; + } + } + return false; + }; + authors = this._editors.authors.getValues(); + changed = false; + for(i in authors){ + if(!searchAuthors(authors[i].name, authors[i].email, authors[i].uri)){ + changed = true; + break; + } + } + if(changed){ + entry.authors = []; + for(i in authors){ + if(authors[i].name || authors[i].email || authors[i].uri){ + entry.addAuthor(authors[i].name, authors[i].email, authors[i].uri); + } + } + modifiedEntry = true; + } + } + } + + if(this._editors.contributors){ + if(modifiedEntry){ + entry.contributors = []; + contributors = this._editors.contributors.getValues(); + for(i in contributors){ + if(contributors[i].name || contributors[i].email || contributors[i].uri){ + entry.addAuthor(contributors[i].name, contributors[i].email, contributors[i].uri); + } + } + }else{ + var currentContributors = entry.contributors; + var searchContributors = function(name, email, uri){ + for(i in currentContributors){ + if(currentContributors[i].name === name && currentContributors[i].email === email && currentContributors[i].uri === uri){ + return true; + } + } + return false; + }; + contributors = this._editors.contributors.getValues(); + changed = false; + for(i in contributors){ + if(searchContributors(contributors[i].name, contributors[i].email, contributors[i].uri)){ + changed = true; + break; + } + } + if(changed){ + entry.contributors = []; + for(i in contributors){ + if(contributors[i].name || contributors[i].email || contributors[i].uri){ + entry.addContributor(contributors[i].name, contributors[i].email, contributors[i].uri); + } + } + modifiedEntry = true; + } + } + } + + if(modifiedEntry){ + dojo.publish(this.entrySelectionTopic, [{action: "update", source: this, entry: entry, callback: this._handleSave }]); + //TODO: REMOVE BELOW + //var atomIO = new dojox.atom.io.Connection(); + //atomIO.updateEntry(entry, dojo.hitch(this,this._handleSave)); + //WARNING: Use above when testing with SimpleProxy (or any other servlet which + // doesn't actually create a new entry and return it properly) + //atomIO.updateEntry(entry, dojo.hitch(this,this._handleSave), true); + } + }else{ + this._new = false; + entry = new model.Entry(); + + value = this._editors.title.attr('value'); + if(this.entryTitleSelect.value === "xhtml"){ + value = this._enforceXhtml(value); + value = '<div xmlns="http://www.w3.org/1999/xhtml">' + value + '</div>'; + } + entry.setTitle(value, this.entryTitleSelect.value); + entry.id = this._editors.id.attr('value'); + + authors = this._editors.authors.getValues(); + for(i in authors){ + if(authors[i].name || authors[i].email || authors[i].uri){ + entry.addAuthor(authors[i].name, authors[i].email, authors[i].uri); + } + } + + contributors = this._editors.contributors.getValues(); + for(i in contributors){ + if(contributors[i].name || contributors[i].email || contributors[i].uri){ + entry.addContributor(contributors[i].name, contributors[i].email, contributors[i].uri); + } + } + + + value = this._editors.summary.attr('value'); + if(this.entrySummarySelect.value === "xhtml"){ + value = this._enforceXhtml(value); + value = '<div xmlns="http://www.w3.org/1999/xhtml">' + value + '</div>'; + } + entry.summary = new model.Content("summary", value, null, this.entrySummarySelect.value); + + value = this._editors.content.attr('value'); + if(this.entryContentSelect.value === "xhtml"){ + value = this._enforceXhtml(value); + value = '<div xmlns="http://www.w3.org/1999/xhtml">' + value + '</div>'; + } + entry.content = new model.Content("content", value, null, this.entryContentSelect.value); + + domStyle.set(this.entryNewButton, 'display', ''); + dojo.publish(this.entrySelectionTopic, [{action: "post", source: this, entry: entry }]); + } + this._editMode = false; + + //Rebuild the view using the same entry and feed. + this.setEntry(entry, this._feed, true); + }, + + _handleSave: function(/*object*/entry, /*string*/location){ + // summary: + // Function for handling the save of an entry, cleaning up the display after the edit is completed. + // description: + // Function for handling the save of an entry, cleaning up the display after the edit is completed. + // + // entry: dojox.atom.io.model.Entry object + // The entry that was saved. + // Location: String + // A URL to be used, not used here, but part of the call back from the AtomIO + // returns: + // Nothing. + //Close the editor and revert out. + this._editMode = false; + + //Rebuild the view using the same entry and feed. + this.clear(); + this.setEntry(entry, this.getFeed(), true); + }, + + cancelEdits: function(){ + // summary: + // Cancels edits and reverts the editor to its previous state (display mode) + // description: + // Cancels edits and reverts the editor to its previous state (display mode) + // + // returns: + // Nothing. + this._new = false; + domStyle.set(this.entrySaveCancelButtons, 'display', 'none'); + if(this._editable){ + domStyle.set(this.entryEditButton, 'display', ''); + } + domStyle.set(this.entryNewButton, 'display', ''); + this._editMode = false; + + //Rebuild the view using the same entry and feed. + this.clearEditors(); + this.setEntry(this.getEntry(), this.getFeed(), true); + }, + + clear: function(){ + // summary: + // Clears the editor, destorys all editors, leaving the editor completely clear + // description: + // Clears the editor, destorys all editors, leaving the editor completely clear + this._editable=false; + this.clearEditors(); + widget.FeedEntryEditor.superclass.clear.apply(this); + if(this._contentEditor){ + // Note that the superclass clear destroys the widget since it's in the child widget list, + // so this is just ref clearing. + this._contentEditor = this._setObject = this._oldContent = this._contentEditorCreator = null; + this._editors = {}; + } + }, + + clearEditors: function(){ + for(var key in this._editors){ + if(this._editors[key].isInstanceOf(Editor)){ + this._editors[key].close(false, true); + } + this._editors[key].destroy(); + } + this._editors = {}; + }, + + _enforceXhtml: function(/*string*/html){ + // summary: + // Function for cleaning up/enforcing the XHTML standard in HTML returned from the editor2 widget. + // description: + // Function for cleaning up/enforcing the XHTML standard in HTML returned from the editor2 widget. + // + // html: + // HTML string to be enforced as xhtml. + // + // returns: + // string of cleaned up HTML. + var xhtml = null; + if(html){ + //Handle <BR> + var brRegExp = /<br>/g; + xhtml = html.replace(brRegExp, "<br/>"); + + //Handle <HR> + xhtml = this._closeTag(xhtml, "hr"); + + //Handle <img> + xhtml = this._closeTag(xhtml, "img"); + } + return xhtml; + }, + + _closeTag: function(/*string*/xhtml, /*string*/tag){ + // summary: + // Function for closing tags in a text of HTML/XHTML + // description: + // Function for closing tags in a text of HTML/XHTML + // + // xhtml: String + // XHTML string which needs the closing tag. + // tag: + // The tag to close. + // + // returns: string of cleaned up HTML. + // + // NOTE: Probably should redo this function in a more efficient way. This could get expensive. + var tagStart = "<" + tag; + var tagIndex = xhtml.indexOf(tagStart); + if(tagIndex !== -1){ + while (tagIndex !== -1){ + var tempString = ""; + var foundTagEnd = false; + for (var i = 0; i < xhtml.length; i++){ + var c = xhtml.charAt(i); + if(i <= tagIndex ||foundTagEnd){ + tempString += c; + } + else + { + if(c === '>'){ + tempString += "/"; + foundTagEnd = true; + } + tempString +=c; + } + } + xhtml = tempString; + tagIndex = xhtml.indexOf(tagStart, tagIndex + 1); + } + } + return xhtml; + }, + + _toggleNew: function(){ + // summary: + // Function to put the editor into a state to create a new entry. + // description: + // Function to put the editor into a state to create a new entry. + + // Hide the edit/new buttons and show the save/cancel buttons. + domStyle.set(this.entryNewButton, 'display', 'none'); + domStyle.set(this.entryEditButton, 'display', 'none'); + domStyle.set(this.entrySaveCancelButtons, 'display', ''); + + // Reset the type select boxes to text. + this.entrySummarySelect.value = "text"; + this.entryContentSelect.value = "text"; + this.entryTitleSelect.value = "text"; + + // Clear all nodes. + this.clearNodes(); + this._new = true; + + var _nlsResources = i18nViewer; + // Create all headers and editors. + var titleHeader = new widget.EntryHeader({title: _nlsResources.title}); + this.entryTitleHeader.appendChild(titleHeader.domNode); + + this._editors.title = this._createEditor(this.entryTitleNode, null); + this.setFieldValidity("title",true); + + var authorHeader = new widget.EntryHeader({title: _nlsResources.authors}); + this.entryAuthorHeader.appendChild(authorHeader.domNode); + + this._editors.authors = this._createPeopleEditor(this.entryAuthorNode, {name: "Author"}); + this.setFieldValidity("authors", true); + + var contributorHeader = new widget.EntryHeader({title: _nlsResources.contributors}); + this.entryContributorHeader.appendChild(contributorHeader.domNode); + + this._editors.contributors = this._createPeopleEditor(this.entryContributorNode, {name: "Contributor"}); + this.setFieldValidity("contributors", true); + + var idHeader = new widget.EntryHeader({title: _nlsResources.id}); + this.entryIdHeader.appendChild(idHeader.domNode); + + this._editors.id = this._createEditor(this.entryIdNode, null); + this.setFieldValidity("id",true); + + var updatedHeader = new widget.EntryHeader({title: _nlsResources.updated}); + this.entryUpdatedHeader.appendChild(updatedHeader.domNode); + + this._editors.updated = this._createEditor(this.entryUpdatedNode, null); + this.setFieldValidity("updated",true); + + var summaryHeader = new widget.EntryHeader({title: _nlsResources.summary}); + this.entrySummaryHeader.appendChild(summaryHeader.domNode); + + this._editors.summary = this._createEditor(this.entrySummaryNode, null, true); + this.setFieldValidity("summaryedit",true); + this.setFieldValidity("summary",true); + + var contentHeader = new widget.EntryHeader({title: _nlsResources.content}); + this.entryContentHeader.appendChild(contentHeader.domNode); + + this._editors.content = this._createEditor(this.entryContentNode, null, true); + this.setFieldValidity("contentedit",true); + this.setFieldValidity("content",true); + + // Show the sections. + this._displaySections(); + }, + + _displaySections: function(){ + // summary: Function to display the appropriate sections based on validity. + // description: Function to display the appropriate sections based on validity. + + // Hide select boxes. + domStyle.set(this.entrySummarySelect, 'display', 'none'); + domStyle.set(this.entryContentSelect, 'display', 'none'); + domStyle.set(this.entryTitleSelect, 'display', 'none'); + + // Show select boxes if the flags are set. + if(this.isFieldValid("contentedit")){ + domStyle.set(this.entryContentSelect, 'display', ''); + } + if(this.isFieldValid("summaryedit")){ + domStyle.set(this.entrySummarySelect, 'display', ''); + } + if(this.isFieldValid("titleedit")){ + domStyle.set(this.entryTitleSelect, 'display', ''); + } + // Call super's _displaySections. + widget.FeedEntryEditor.superclass._displaySections.apply(this); + + // If we have editors to load after the nodes are created on the page, execute those now. + if(this._toLoad){ + for(var i in this._toLoad){ + var editor; + if(this._toLoad[i].generateEditor){ + editor = lang.hitch(this._toLoad[i], this._toLoad[i].generateEditor)(); + }else{ + editor = this._toLoad[i]; + } + this._editors[this._toLoad[i].name] = editor; + this._toLoad[i] = null; + } + this._toLoad = null; + } + } +}); + +widget.PeopleEditor = dojo.declare(/*===== "dojox.atom.widget.PeopleEditor", =====*/ [_Widget, _Templated, _Container],{ + // summary: + // An editor for dojox.atom.io.model.Person objects. + // description: + // An editor for dojox.atom.io.model.Person objects. Displays multiple rows for the respective arrays + // of people. Can add/remove rows on the fly. + templateString: peopleEditorTemplate, + + _rows: [], + _editors: [], + _index: 0, + _numRows: 0, + + postCreate: function(){ + // Initializer function for the PeopleEditor widget. + var _nlsResources = i18nPeople; + if(this.name){ + if(this.name == "Author"){ + this.peopleEditorButton.appendChild(document.createTextNode("["+_nlsResources.addAuthor+"]")); + }else if(this.name == "Contributor"){ + this.peopleEditorButton.appendChild(document.createTextNode("["+_nlsResources.addContributor+"]")); + } + }else{ + this.peopleEditorButton.appendChild(document.createTextNode("["+_nlsResources.add+"]")); + } + this._editors = []; + + if(!this.data || this.data.length===0){ + this._createEditors(null, null, null, 0, this.name); + this._index = 1; + }else{ + for(var i in this.data){ + this._createEditors(this.data[i].name, this.data[i].email, this.data[i].uri, i); + this._index++; + this._numRows++; + } + } + }, + + destroy: function(){ + for(var key in this._editors){ + for(var key2 in this._editors[key]){ + this._editors[key][key2].destroy(); + } + } + this._editors = []; + }, + + _createEditors: function(/*string*/name, /*string*/email, /*string*/uri, /*int*/index, /*string*/widgetName){ + // summary: + // creates editor boxes (textbox widgets) for the individual values of a Person. + // description: + // creates editor boxes (textbox widgets) for the individual values of a Person. + // + // name: + // The name of this Person. + // email: + // The email of this Person. + // uri: + // The Person's URI. + // index: + // The row index to use for this Person. + var row = document.createElement("tr"); + this.peopleEditorEditors.appendChild(row); + row.id = "removeRow"+index; + + var node = document.createElement("td"); + node.setAttribute('align', 'right'); + row.appendChild(node); + node.colSpan = 2; + + if(this._numRows>0){ + var hr = document.createElement("hr"); + node.appendChild(hr); + hr.id = "hr"+index; + } + + row = document.createElement("span"); + node.appendChild(row); + row.className = "peopleEditorButton"; + domStyle.set(row, 'font-size', 'x-small'); + connect.connect(row, "onclick", this, "_removeEditor"); + row.id = "remove"+index; + + node = document.createTextNode("[X]"); + row.appendChild(node); + + row = document.createElement("tr"); + this.peopleEditorEditors.appendChild(row); + row.id = "editorsRow"+index; + + var labelNode = document.createElement("td"); + row.appendChild(labelNode); + domStyle.set(labelNode, 'width', '20%'); + + node = document.createElement("td"); + row.appendChild(node); + + row = document.createElement("table"); + labelNode.appendChild(row); + domStyle.set(row, 'width', '100%'); + + labelNode = document.createElement("tbody"); + row.appendChild(labelNode); + + row = document.createElement("table"); + node.appendChild(row); + domStyle.set(row, 'width', '100%'); + + node = document.createElement("tbody"); + row.appendChild(node); + + this._editors[index] = []; + this._editors[index].push(this._createEditor(name, widgetName+'name'+index, 'Name:', labelNode, node)); + this._editors[index].push(this._createEditor(email, widgetName+'email'+index, 'Email:', labelNode, node)); + this._editors[index].push(this._createEditor(uri, widgetName+'uri'+index, 'URI:', labelNode, node)); + }, + + _createEditor: function(/*string*/value, /*string*/id, /*string*/name, /*DOM node*/labelNode, /*DOM node*/node){ + // summary: + // Creates an individual editor widget (textbox) for a value. + // description: + // Creates an individual editor widget (textbox) for a value. + // + // value: + // The initial value of the textbox + // id: + // The id the textbox should have. + // name: + // The text to put in the label element for this textbox. + // labelNode: + // The node to attach the label to. + // node: + // The node to attach the editor rows to. + // + // returns: + // Editor widget. + var row = document.createElement("tr"); + labelNode.appendChild(row); + + var label = document.createElement("label"); + label.setAttribute('for', id); + label.appendChild(document.createTextNode(name)); + labelNode = document.createElement("td"); + labelNode.appendChild(label); + row.appendChild(labelNode); + + row = document.createElement("tr"); + node.appendChild(row); + + node = document.createElement("td"); + row.appendChild(node); + + var viewNode = document.createElement("input"); + viewNode.setAttribute('id', id); + node.appendChild(viewNode); + domStyle.set(viewNode, 'width', '95%'); + + var box = new TextBox({},viewNode); + box.attr('value', value); + return box; + }, + + _removeEditor: function(/*object*/event){ + // summary: + // Removes a Person from our list of editors. + // description: + // Removes a Person from our list of editors by removing the block of editors that + // make up that Person. + // + // event: + // The event generated when the remove button is pressed on the page. + var target = null; + + if(has("ie")){ + target = event.srcElement; + }else{ + target = event.target; + } + + var id = target.id; + id = id.substring(6); + for(var key in this._editors[id]){ + this._editors[id][key].destroy(); + } + + var node = domUtil.byId("editorsRow"+id); + var parent = node.parentNode; + parent.removeChild(node); + + node = domUtil.byId("removeRow"+id); + parent = node.parentNode; + parent.removeChild(node); + + this._numRows--; + if(this._numRows === 1 && parent.firstChild.firstChild.firstChild.tagName.toLowerCase() === "hr"){ + node = parent.firstChild.firstChild; + node.removeChild(node.firstChild); + } + this._editors[id] = null; + }, + + _add: function(){ + // summary: + // Adds a new block of blank editors to represent a Person. + // description: + // Adds a new block of blank editors to represent a Person. + this._createEditors(null, null, null, this._index); + this._index++; + this._numRows++; + }, + + getValues: function(){ + // summary: + // Gets the values of this editor in an array. + // description: + // Gets the values of this editor in an array, with each Person as an object within the array. + // + // returns: + // An array of anonymous objects representing dojox.atom.io.model.Persons. + var values = []; + for(var i in this._editors){ + if(this._editors[i]){ + values.push({name: this._editors[i][0].attr('value'), email: this._editors[i][1].attr('value'), uri: this._editors[i][2].attr('value')}); + } + } + return values; + } +}); +return widget.FeedEntryEditor; +}); diff --git a/js/dojo/dojox/atom/widget/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/FeedEntryViewer.js new file mode 100644 index 0000000..182801d --- /dev/null +++ b/js/dojo/dojox/atom/widget/FeedEntryViewer.js @@ -0,0 +1,800 @@ +//>>built +require({cache:{ +'url:dojox/atom/widget/templates/FeedEntryViewer.html':"<div class=\"feedEntryViewer\">\n <table border=\"0\" width=\"100%\" class=\"feedEntryViewerMenuTable\" dojoAttachPoint=\"feedEntryViewerMenu\" style=\"display: none;\">\n <tr width=\"100%\" dojoAttachPoint=\"entryCheckBoxDisplayOptions\">\n <td align=\"right\">\n <span class=\"feedEntryViewerMenu\" dojoAttachPoint=\"displayOptions\" dojoAttachEvent=\"onclick:_toggleOptions\"></span>\n </td>\n </tr>\n <tr class=\"feedEntryViewerDisplayCheckbox\" dojoAttachPoint=\"entryCheckBoxRow\" width=\"100%\" style=\"display: none;\">\n <td dojoAttachPoint=\"feedEntryCelltitle\">\n <input type=\"checkbox\" name=\"title\" value=\"Title\" dojoAttachPoint=\"feedEntryCheckBoxTitle\" dojoAttachEvent=\"onclick:_toggleCheckbox\"/>\n\t\t\t\t<label for=\"title\" dojoAttachPoint=\"feedEntryCheckBoxLabelTitle\"></label>\n </td>\n <td dojoAttachPoint=\"feedEntryCellauthors\">\n <input type=\"checkbox\" name=\"authors\" value=\"Authors\" dojoAttachPoint=\"feedEntryCheckBoxAuthors\" dojoAttachEvent=\"onclick:_toggleCheckbox\"/>\n\t\t\t\t<label for=\"title\" dojoAttachPoint=\"feedEntryCheckBoxLabelAuthors\"></label>\n </td>\n <td dojoAttachPoint=\"feedEntryCellcontributors\">\n <input type=\"checkbox\" name=\"contributors\" value=\"Contributors\" dojoAttachPoint=\"feedEntryCheckBoxContributors\" dojoAttachEvent=\"onclick:_toggleCheckbox\"/>\n\t\t\t\t<label for=\"title\" dojoAttachPoint=\"feedEntryCheckBoxLabelContributors\"></label>\n </td>\n <td dojoAttachPoint=\"feedEntryCellid\">\n <input type=\"checkbox\" name=\"id\" value=\"Id\" dojoAttachPoint=\"feedEntryCheckBoxId\" dojoAttachEvent=\"onclick:_toggleCheckbox\"/>\n\t\t\t\t<label for=\"title\" dojoAttachPoint=\"feedEntryCheckBoxLabelId\"></label>\n </td>\n <td rowspan=\"2\" align=\"right\">\n <span class=\"feedEntryViewerMenu\" dojoAttachPoint=\"close\" dojoAttachEvent=\"onclick:_toggleOptions\"></span>\n </td>\n\t\t</tr>\n\t\t<tr class=\"feedEntryViewerDisplayCheckbox\" dojoAttachPoint=\"entryCheckBoxRow2\" width=\"100%\" style=\"display: none;\">\n <td dojoAttachPoint=\"feedEntryCellupdated\">\n <input type=\"checkbox\" name=\"updated\" value=\"Updated\" dojoAttachPoint=\"feedEntryCheckBoxUpdated\" dojoAttachEvent=\"onclick:_toggleCheckbox\"/>\n\t\t\t\t<label for=\"title\" dojoAttachPoint=\"feedEntryCheckBoxLabelUpdated\"></label>\n </td>\n <td dojoAttachPoint=\"feedEntryCellsummary\">\n <input type=\"checkbox\" name=\"summary\" value=\"Summary\" dojoAttachPoint=\"feedEntryCheckBoxSummary\" dojoAttachEvent=\"onclick:_toggleCheckbox\"/>\n\t\t\t\t<label for=\"title\" dojoAttachPoint=\"feedEntryCheckBoxLabelSummary\"></label>\n </td>\n <td dojoAttachPoint=\"feedEntryCellcontent\">\n <input type=\"checkbox\" name=\"content\" value=\"Content\" dojoAttachPoint=\"feedEntryCheckBoxContent\" dojoAttachEvent=\"onclick:_toggleCheckbox\"/>\n\t\t\t\t<label for=\"title\" dojoAttachPoint=\"feedEntryCheckBoxLabelContent\"></label>\n </td>\n </tr>\n </table>\n \n <table class=\"feedEntryViewerContainer\" border=\"0\" width=\"100%\">\n <tr class=\"feedEntryViewerTitle\" dojoAttachPoint=\"entryTitleRow\" style=\"display: none;\">\n <td>\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr class=\"graphic-tab-lgray\">\n\t\t\t\t\t\t<td class=\"lp2\">\n\t\t\t\t\t\t\t<span class=\"lp\" dojoAttachPoint=\"entryTitleHeader\"></span>\n\t\t\t\t\t\t</td>\n </tr>\n <tr>\n <td dojoAttachPoint=\"entryTitleNode\">\n </td>\n </tr>\n </table>\n </td>\n </tr>\n\n <tr class=\"feedEntryViewerAuthor\" dojoAttachPoint=\"entryAuthorRow\" style=\"display: none;\">\n <td>\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr class=\"graphic-tab-lgray\">\n\t\t\t\t\t\t<td class=\"lp2\">\n\t\t\t\t\t\t\t<span class=\"lp\" dojoAttachPoint=\"entryAuthorHeader\"></span>\n\t\t\t\t\t\t</td>\n </tr>\n <tr>\n <td dojoAttachPoint=\"entryAuthorNode\">\n </td>\n </tr>\n </table>\n </td>\n </tr>\n\n <tr class=\"feedEntryViewerContributor\" dojoAttachPoint=\"entryContributorRow\" style=\"display: none;\">\n <td>\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr class=\"graphic-tab-lgray\">\n\t\t\t\t\t\t<td class=\"lp2\">\n\t\t\t\t\t\t\t<span class=\"lp\" dojoAttachPoint=\"entryContributorHeader\"></span>\n\t\t\t\t\t\t</td>\n </tr>\n <tr>\n <td dojoAttachPoint=\"entryContributorNode\" class=\"feedEntryViewerContributorNames\">\n </td>\n </tr>\n </table>\n </td>\n </tr>\n \n <tr class=\"feedEntryViewerId\" dojoAttachPoint=\"entryIdRow\" style=\"display: none;\">\n <td>\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr class=\"graphic-tab-lgray\">\n\t\t\t\t\t\t<td class=\"lp2\">\n\t\t\t\t\t\t\t<span class=\"lp\" dojoAttachPoint=\"entryIdHeader\"></span>\n\t\t\t\t\t\t</td>\n </tr>\n <tr>\n <td dojoAttachPoint=\"entryIdNode\" class=\"feedEntryViewerIdText\">\n </td>\n </tr>\n </table>\n </td>\n </tr>\n \n <tr class=\"feedEntryViewerUpdated\" dojoAttachPoint=\"entryUpdatedRow\" style=\"display: none;\">\n <td>\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr class=\"graphic-tab-lgray\">\n\t\t\t\t\t\t<td class=\"lp2\">\n\t\t\t\t\t\t\t<span class=\"lp\" dojoAttachPoint=\"entryUpdatedHeader\"></span>\n\t\t\t\t\t\t</td>\n </tr>\n <tr>\n <td dojoAttachPoint=\"entryUpdatedNode\" class=\"feedEntryViewerUpdatedText\">\n </td>\n </tr>\n </table>\n </td>\n </tr>\n \n <tr class=\"feedEntryViewerSummary\" dojoAttachPoint=\"entrySummaryRow\" style=\"display: none;\">\n <td>\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr class=\"graphic-tab-lgray\">\n\t\t\t\t\t\t<td class=\"lp2\">\n\t\t\t\t\t\t\t<span class=\"lp\" dojoAttachPoint=\"entrySummaryHeader\"></span>\n\t\t\t\t\t\t</td>\n </tr>\n <tr>\n <td dojoAttachPoint=\"entrySummaryNode\">\n </td>\n </tr>\n </table>\n </td>\n </tr>\n \n <tr class=\"feedEntryViewerContent\" dojoAttachPoint=\"entryContentRow\" style=\"display: none;\">\n <td>\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr class=\"graphic-tab-lgray\">\n\t\t\t\t\t\t<td class=\"lp2\">\n\t\t\t\t\t\t\t<span class=\"lp\" dojoAttachPoint=\"entryContentHeader\"></span>\n\t\t\t\t\t\t</td>\n </tr>\n <tr>\n <td dojoAttachPoint=\"entryContentNode\">\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n</div>\n", +'url:dojox/atom/widget/templates/EntryHeader.html':"<span dojoAttachPoint=\"entryHeaderNode\" class=\"entryHeaderNode\"></span>\n"}}); +define("dojox/atom/widget/FeedEntryViewer", [ + "dojo/_base/kernel", + "dojo/_base/connect", + "dojo/_base/declare", + "dojo/_base/fx", + "dojo/_base/array", + "dojo/dom-style", + "dojo/dom-construct", + "dijit/_Widget", + "dijit/_Templated", + "dijit/_Container", + "dijit/layout/ContentPane", + "../io/Connection", + "dojo/text!./templates/FeedEntryViewer.html", + "dojo/text!./templates/EntryHeader.html", + "dojo/i18n!./nls/FeedEntryViewer" +], function (dojo, connect, declare, fx, arrayUtil, domStyle, domConstruct, _Widget, _Templated, _Container, ContentPane, Connection, template, headerTemplate, i18nViewer) { + +dojo.experimental("dojox.atom.widget.FeedEntryViewer"); + +var widget = dojo.getObject("dojox.atom.widget", true); + +widget.FeedEntryViewer = dojo.declare(/*===== "dojox.atom.widget.FeedEntryViewer", =====*/ [_Widget, _Templated, _Container],{ + // summary: + // An ATOM feed entry editor for publishing updated ATOM entries, or viewing non-editable entries. + // description: + // An ATOM feed entry editor for publishing updated ATOM entries, or viewing non-editable entries. + entrySelectionTopic: "", //The topic to listen on for entries to edit. + + _validEntryFields: {}, //The entry fields that were present on the entry and are being displayed. + //This works in conjuntion with what is selected to be displayed. + displayEntrySections: "", //What current sections of the entries to display as a comma separated list. + _displayEntrySections: null, + + //Control options for the display options menu. + enableMenu: false, + enableMenuFade: false, + _optionButtonDisplayed: true, + + //Templates for the HTML rendering. Need to figure these out better, admittedly. + templateString: template, + + _entry: null, //The entry that is being viewed/edited. + _feed: null, //The feed the entry came from. + + _editMode: false, //Flag denoting the state of the widget, in edit mode or not. + + postCreate: function(){ + if(this.entrySelectionTopic !== ""){ + this._subscriptions = [dojo.subscribe(this.entrySelectionTopic, this, "_handleEvent")]; + } + var _nlsResources = i18nViewer; + this.displayOptions.innerHTML = _nlsResources.displayOptions; + this.feedEntryCheckBoxLabelTitle.innerHTML = _nlsResources.title; + this.feedEntryCheckBoxLabelAuthors.innerHTML = _nlsResources.authors; + this.feedEntryCheckBoxLabelContributors.innerHTML = _nlsResources.contributors; + this.feedEntryCheckBoxLabelId.innerHTML = _nlsResources.id; + this.close.innerHTML = _nlsResources.close; + this.feedEntryCheckBoxLabelUpdated.innerHTML = _nlsResources.updated; + this.feedEntryCheckBoxLabelSummary.innerHTML = _nlsResources.summary; + this.feedEntryCheckBoxLabelContent.innerHTML = _nlsResources.content; + }, + + startup: function(){ + if(this.displayEntrySections === ""){ + this._displayEntrySections = ["title","authors","contributors","summary","content","id","updated"]; + }else{ + this._displayEntrySections = this.displayEntrySections.split(","); + } + this._setDisplaySectionsCheckboxes(); + + if(this.enableMenu){ + domStyle.set(this.feedEntryViewerMenu, 'display', ''); + if(this.entryCheckBoxRow && this.entryCheckBoxRow2){ + if(this.enableMenuFade){ + fx.fadeOut({node: this.entryCheckBoxRow,duration: 250}).play(); + fx.fadeOut({node: this.entryCheckBoxRow2,duration: 250}).play(); + } + } + } + }, + + clear: function(){ + // summary: + // Function to clear the state of the widget. + // description: + // Function to clear the state of the widget. + this.destroyDescendants(); + this._entry=null; + this._feed=null; + this.clearNodes(); + }, + + clearNodes: function(){ + // summary: + // Function to clear all the display nodes for the ATOM entry from the viewer. + // description: + // Function to clear all the display nodes for the ATOM entry from the viewer. + + arrayUtil.forEach([ + "entryTitleRow", "entryAuthorRow", "entryContributorRow", "entrySummaryRow", "entryContentRow", + "entryIdRow", "entryUpdatedRow" + ], function(node){ + domStyle.set(this[node], "display", "none"); + }, this); + + arrayUtil.forEach([ + "entryTitleNode", "entryTitleHeader", "entryAuthorHeader", "entryContributorHeader", + "entryContributorNode", "entrySummaryHeader", "entrySummaryNode", "entryContentHeader", + "entryContentNode", "entryIdNode", "entryIdHeader", "entryUpdatedHeader", "entryUpdatedNode" + ], function(part){ + while(this[part].firstChild){ + domConstruct.destroy(this[part].firstChild); + } + } + ,this); + + }, + + setEntry: function(/*object*/entry, /*object*/feed, /*boolean*/leaveMenuState){ + // summary: + // Function to set the current entry that is being edited. + // description: + // Function to set the current entry that is being edited. + // + // entry: + // Instance of dojox.atom.io.model.Entry to display for reading/editing. + this.clear(); + this._validEntryFields = {}; + this._entry = entry; + this._feed = feed; + + if(entry !== null){ + // Handle the title. + if(this.entryTitleHeader){ + this.setTitleHeader(this.entryTitleHeader, entry); + } + + if(this.entryTitleNode){ + this.setTitle(this.entryTitleNode, this._editMode, entry); + } + + if(this.entryAuthorHeader){ + this.setAuthorsHeader(this.entryAuthorHeader, entry); + } + + if(this.entryAuthorNode){ + this.setAuthors(this.entryAuthorNode, this._editMode, entry); + } + + if(this.entryContributorHeader){ + this.setContributorsHeader(this.entryContributorHeader, entry); + } + + if(this.entryContributorNode){ + this.setContributors(this.entryContributorNode, this._editMode, entry); + } + + if(this.entryIdHeader){ + this.setIdHeader(this.entryIdHeader, entry); + } + + if(this.entryIdNode){ + this.setId(this.entryIdNode, this._editMode, entry); + } + + if(this.entryUpdatedHeader){ + this.setUpdatedHeader(this.entryUpdatedHeader, entry); + } + + if(this.entryUpdatedNode){ + this.setUpdated(this.entryUpdatedNode, this._editMode, entry); + } + + if(this.entrySummaryHeader){ + this.setSummaryHeader(this.entrySummaryHeader, entry); + } + + if(this.entrySummaryNode){ + this.setSummary(this.entrySummaryNode, this._editMode, entry); + } + + if(this.entryContentHeader){ + this.setContentHeader(this.entryContentHeader, entry); + } + + if(this.entryContentNode){ + this.setContent(this.entryContentNode, this._editMode, entry); + } + } + this._displaySections(); + }, + + setTitleHeader: function(/*DOM node*/titleHeaderNode, /*object*/entry){ + // summary: + // Function to set the contents of the title header node in the template to some value. + // description: + // Function to set the contents of the title header node in the template to some value. + // This exists specifically so users can over-ride how the title data is filled out from an entry. + // + // titleAchorNode: + // The DOM node to attach the title data to. + // editMode: + // Boolean to indicate if the display should be in edit mode or not. + // entry: + // The Feed Entry to work with. + // + if(entry.title && entry.title.value && entry.title.value !== null){ + var _nlsResources = i18nViewer; + var titleHeader = new widget.EntryHeader({title: _nlsResources.title}); + titleHeaderNode.appendChild(titleHeader.domNode); + } + }, + + setTitle: function(titleAnchorNode, editMode, entry){ + // summary: + // Function to set the contents of the title node in the template to some value from the entry. + // description: + // Function to set the contents of the title node in the template to some value from the entry. + // This exists specifically so users can over-ride how the title data is filled out from an entry. + // + // titleAchorNode: + // The DOM node to attach the title data to. + // editMode: + // Boolean to indicate if the display should be in edit mode or not. + // entry: + // The Feed Entry to work with. + if(entry.title && entry.title.value && entry.title.value !== null){ + if(entry.title.type == "text"){ + var titleNode = document.createTextNode(entry.title.value); + titleAnchorNode.appendChild(titleNode); + }else{ + var titleViewNode = document.createElement("span"); + var titleView = new ContentPane({refreshOnShow: true, executeScripts: false}, titleViewNode); + titleView.attr('content', entry.title.value); + titleAnchorNode.appendChild(titleView.domNode); + } + this.setFieldValidity("title", true); + } + }, + + setAuthorsHeader: function(/*DOM node*/authorHeaderNode, /*object*/entry){ + // summary: + // Function to set the title format for the authors section of the author row in the template to some value from the entry. + // description: + // Function to set the title format for the authors section of the author row in the template to some value from the entry. + // This exists specifically so users can over-ride how the author data is filled out from an entry. + // + // authorHeaderNode: + // The DOM node to attach the author section header data to. + // entry: + // The Feed Entry to work with. + if(entry.authors && entry.authors.length > 0){ + var _nlsResources = i18nViewer; + var authorHeader = new widget.EntryHeader({title: _nlsResources.authors}); + authorHeaderNode.appendChild(authorHeader.domNode); + } + }, + + setAuthors: function(/*DOM node*/authorsAnchorNode, /*boolean*/editMode, /*object*/entry){ + // summary: + // Function to set the contents of the author node in the template to some value from the entry. + // description: + // Function to set the contents of the author node in the template to some value from the entry. + // This exists specifically so users can over-ride how the title data is filled out from an entry. + // + // authorsAchorNode: + // The DOM node to attach the author data to. + // editMode: + // Boolean to indicate if the display should be in edit mode or not. + // entry: + // The Feed Entry to work with. + authorsAnchorNode.innerHTML = ""; + if(entry.authors && entry.authors.length > 0){ + for(var i in entry.authors){ + if(entry.authors[i].name){ + var anchor = authorsAnchorNode; + if(entry.authors[i].uri){ + var link = document.createElement("a"); + anchor.appendChild(link); + link.href = entry.authors[i].uri; + anchor = link; + } + var name = entry.authors[i].name; + if(entry.authors[i].email){ + name = name + " (" + entry.authors[i].email + ")"; + } + var authorNode = document.createTextNode(name); + anchor.appendChild(authorNode); + var breakNode = document.createElement("br"); + authorsAnchorNode.appendChild(breakNode); + this.setFieldValidity("authors", true); + } + } + } + }, + + setContributorsHeader: function(/*DOM node*/contributorsHeaderNode, /*object*/entry){ + // summary: + // Function to set the contents of the contributor header node in the template to some value from the entry. + // description: + // Function to set the contents of the contributor header node in the template to some value from the entry. + // This exists specifically so users can over-ride how the title data is filled out from an entry. + // + // contributorsHeaderNode: + // The DOM node to attach the contributor title to. + // entry: + // The Feed Entry to work with. + if(entry.contributors && entry.contributors.length > 0){ + var _nlsResources = i18nViewer; + var contributorHeader = new widget.EntryHeader({title: _nlsResources.contributors}); + contributorsHeaderNode.appendChild(contributorHeader.domNode); + } + }, + + + setContributors: function(/*DOM node*/contributorsAnchorNode, /*boolean*/editMode, /*object*/entry){ + // summary: + // Function to set the contents of the contributor node in the template to some value from the entry. + // description: + // Function to set the contents of the contributor node in the template to some value from the entry. + // This exists specifically so users can over-ride how the title data is filled out from an entry. + // + // contributorsAnchorNode: + // The DOM node to attach the contributor data to. + // editMode: + // Boolean to indicate if the display should be in edit mode or not. + // entry: + // The Feed Entry to work with. + if(entry.contributors && entry.contributors.length > 0){ + for(var i in entry.contributors){ + var contributorNode = document.createTextNode(entry.contributors[i].name); + contributorsAnchorNode.appendChild(contributorNode); + var breakNode = document.createElement("br"); + contributorsAnchorNode.appendChild(breakNode); + this.setFieldValidity("contributors", true); + } + } + }, + + + setIdHeader: function(/*DOM node*/idHeaderNode, /*object*/entry){ + // summary: + // Function to set the contents of the ID node in the template to some value from the entry. + // description: + // Function to set the contents of the ID node in the template to some value from the entry. + // This exists specifically so users can over-ride how the title data is filled out from an entry. + // + // idAnchorNode: + // The DOM node to attach the ID data to. + // entry: + // The Feed Entry to work with. + if(entry.id && entry.id !== null){ + var _nlsResources = i18nViewer; + var idHeader = new widget.EntryHeader({title: _nlsResources.id}); + idHeaderNode.appendChild(idHeader.domNode); + } + }, + + + setId: function(/*DOM node*/idAnchorNode, /*boolean*/editMode, /*object*/entry){ + // summary: + // Function to set the contents of the ID node in the template to some value from the entry. + // description: + // Function to set the contents of the ID node in the template to some value from the entry. + // This exists specifically so users can over-ride how the title data is filled out from an entry. + // + // idAnchorNode: + // The DOM node to attach the ID data to. + // editMode: + // Boolean to indicate if the display should be in edit mode or not. + // entry: + // The Feed Entry to work with. + if(entry.id && entry.id !== null){ + var idNode = document.createTextNode(entry.id); + idAnchorNode.appendChild(idNode); + this.setFieldValidity("id", true); + } + }, + + setUpdatedHeader: function(/*DOM node*/updatedHeaderNode, /*object*/entry){ + // summary: + // Function to set the contents of the updated header node in the template to some value from the entry. + // description: + // Function to set the contents of the updated header node in the template to some value from the entry. + // This exists specifically so users can over-ride how the title data is filled out from an entry. + // + // updatedHeaderNode: + // The DOM node to attach the updated header data to. + // entry: + // The Feed Entry to work with. + if(entry.updated && entry.updated !== null){ + var _nlsResources = i18nViewer; + var updatedHeader = new widget.EntryHeader({title: _nlsResources.updated}); + updatedHeaderNode.appendChild(updatedHeader.domNode); + } + }, + + setUpdated: function(/*DOM node*/updatedAnchorNode, /*boolean*/editMode, /*object*/entry){ + // summary: + // Function to set the contents of the updated node in the template to some value from the entry. + // description: + // Function to set the contents of the updated node in the template to some value from the entry. + // This exists specifically so users can over-ride how the title data is filled out from an entry. + // + // updatedAnchorNode: + // The DOM node to attach the udpated data to. + // editMode: + // Boolean to indicate if the display should be in edit mode or not. + // entry: + // The Feed Entry to work with. + if(entry.updated && entry.updated !== null){ + var updatedNode = document.createTextNode(entry.updated); + updatedAnchorNode.appendChild(updatedNode); + this.setFieldValidity("updated", true); + } + }, + + setSummaryHeader: function(/*DOM node*/summaryHeaderNode, /*object*/entry){ + // summary: + // Function to set the contents of the summary node in the template to some value from the entry. + // description: + // Function to set the contents of the summary node in the template to some value from the entry. + // This exists specifically so users can over-ride how the title data is filled out from an entry. + // + // summaryHeaderNode: + // The DOM node to attach the summary title to. + // entry: + // The Feed Entry to work with. + if(entry.summary && entry.summary.value && entry.summary.value !== null){ + var _nlsResources = i18nViewer; + var summaryHeader = new widget.EntryHeader({title: _nlsResources.summary}); + summaryHeaderNode.appendChild(summaryHeader.domNode); + } + }, + + + setSummary: function(/*DOM node*/summaryAnchorNode, /*boolean*/editMode, /*object*/entry){ + // summary: + // Function to set the contents of the summary node in the template to some value from the entry. + // description: + // Function to set the contents of the summary node in the template to some value from the entry. + // This exists specifically so users can over-ride how the title data is filled out from an entry. + // + // summaryAnchorNode: + // The DOM node to attach the summary data to. + // editMode: + // Boolean to indicate if the display should be in edit mode or not. + // entry: + // The Feed Entry to work with. + if(entry.summary && entry.summary.value && entry.summary.value !== null){ + var summaryViewNode = document.createElement("span"); + var summaryView = new ContentPane({refreshOnShow: true, executeScripts: false}, summaryViewNode); + summaryView.attr('content', entry.summary.value); + summaryAnchorNode.appendChild(summaryView.domNode); + this.setFieldValidity("summary", true); + } + }, + + setContentHeader: function(/*DOM node*/contentHeaderNode, /*object*/entry){ + // summary: + // Function to set the contents of the content node in the template to some value from the entry. + // description: + // Function to set the contents of the content node in the template to some value from the entry. + // This exists specifically so users can over-ride how the title data is filled out from an entry. + // + // contentHeaderNode: + // The DOM node to attach the content data to. + // entry: + // The Feed Entry to work with. + if(entry.content && entry.content.value && entry.content.value !== null){ + var _nlsResources = i18nViewer; + var contentHeader = new widget.EntryHeader({title: _nlsResources.content}); + contentHeaderNode.appendChild(contentHeader.domNode); + } + }, + + setContent: function(/*DOM node*/contentAnchorNode, /*boolean*/editMode, /*object*/entry){ + // summary: + // Function to set the contents of the content node in the template to some value from the entry. + // description: + // Function to set the contents of the content node in the template to some value from the entry. + // This exists specifically so users can over-ride how the title data is filled out from an entry. + // + // contentAnchorNode: + // The DOM node to attach the content data to. + // editMode: + // Boolean to indicate if the display should be in edit mode or not. + // entry: + // The Feed Entry to work with. + if(entry.content && entry.content.value && entry.content.value !== null){ + var contentViewNode = document.createElement("span"); + var contentView = new ContentPane({refreshOnShow: true, executeScripts: false},contentViewNode); + contentView.attr('content', entry.content.value); + contentAnchorNode.appendChild(contentView.domNode); + this.setFieldValidity("content", true); + } + }, + + + _displaySections: function(){ + // summary: + // Internal function for determining which sections of the view to actually display. + // description: + // Internal function for determining which sections of the view to actually display. + // + // returns: + // Nothing. + domStyle.set(this.entryTitleRow, 'display', 'none'); + domStyle.set(this.entryAuthorRow, 'display', 'none'); + domStyle.set(this.entryContributorRow, 'display', 'none'); + domStyle.set(this.entrySummaryRow, 'display', 'none'); + domStyle.set(this.entryContentRow, 'display', 'none'); + domStyle.set(this.entryIdRow, 'display', 'none'); + domStyle.set(this.entryUpdatedRow, 'display', 'none'); + + for(var i in this._displayEntrySections){ + var section = this._displayEntrySections[i].toLowerCase(); + if(section === "title" && this.isFieldValid("title")){ + domStyle.set(this.entryTitleRow, 'display', ''); + } + if(section === "authors" && this.isFieldValid("authors")){ + domStyle.set(this.entryAuthorRow, 'display', ''); + } + if(section === "contributors" && this.isFieldValid("contributors")){ + domStyle.set(this.entryContributorRow, 'display', ''); + } + if(section === "summary" && this.isFieldValid("summary")){ + domStyle.set(this.entrySummaryRow, 'display', ''); + } + if(section === "content" && this.isFieldValid("content")){ + domStyle.set(this.entryContentRow, 'display', ''); + } + if(section === "id" && this.isFieldValid("id")){ + domStyle.set(this.entryIdRow, 'display', ''); + } + if(section === "updated" && this.isFieldValid("updated")){ + domStyle.set(this.entryUpdatedRow, 'display', ''); + } + + } + }, + + setDisplaySections: function(/*array*/sectionsArray){ + // summary: + // Function for setting which sections of the entry should be displayed. + // description: + // Function for setting which sections of the entry should be displayed. + // + // sectionsArray: + // Array of string names that indicate which sections to display. + // + // returns: + // Nothing. + if(sectionsArray !== null){ + this._displayEntrySections = sectionsArray; + this._displaySections(); + }else{ + this._displayEntrySections = ["title","authors","contributors","summary","content","id","updated"]; + } + }, + + _setDisplaySectionsCheckboxes: function(){ + // summary: + // Internal function for setting which checkboxes on the display are selected. + // description: + // Internal function for setting which checkboxes on the display are selected. + // + // returns: + // Nothing. + var items = ["title","authors","contributors","summary","content","id","updated"]; + for(var i in items){ + if(arrayUtil.indexOf(this._displayEntrySections, items[i]) == -1){ + domStyle.set(this["feedEntryCell"+items[i]], 'display', 'none'); + }else{ + this["feedEntryCheckBox"+items[i].substring(0,1).toUpperCase()+items[i].substring(1)].checked=true; + } + } + }, + + _readDisplaySections: function(){ + // summary: + // Internal function for reading what is currently checked for display and generating the display list from it. + // description: + // Internal function for reading what is currently checked for display and generating the display list from it. + // + // returns: + // Nothing. + var checkedList = []; + + if(this.feedEntryCheckBoxTitle.checked){ + checkedList.push("title"); + } + if(this.feedEntryCheckBoxAuthors.checked){ + checkedList.push("authors"); + } + if(this.feedEntryCheckBoxContributors.checked){ + checkedList.push("contributors"); + } + if(this.feedEntryCheckBoxSummary.checked){ + checkedList.push("summary"); + } + if(this.feedEntryCheckBoxContent.checked){ + checkedList.push("content"); + } + if(this.feedEntryCheckBoxId.checked){ + checkedList.push("id"); + } + if(this.feedEntryCheckBoxUpdated.checked){ + checkedList.push("updated"); + } + this._displayEntrySections = checkedList; + }, + + _toggleCheckbox: function(/*object*/checkBox){ + // summary: + // Internal function for determining of a particular entry is editable. + // description: + // Internal function for determining of a particular entry is editable. + // This is used for determining if the delete action should be displayed or not. + // + // checkBox: + // The checkbox object to toggle the selection on. + // + // returns: + // Nothing + if(checkBox.checked){ + checkBox.checked=false; + }else{ + checkBox.checked=true; + } + this._readDisplaySections(); + this._displaySections(); + }, + + _toggleOptions: function(/*object*/checkBox){ + // summary: + // Internal function for determining of a particular entry is editable. + // description: + // Internal function for determining of a particular entry is editable. + // This is used for determining if the delete action should be displayed or not. + // + // checkBox: + // The checkbox object to toggle the selection on. + // + // returns: + // Nothing + if(this.enableMenu){ + var fade = null; + var anim; + var anim2; + if(this._optionButtonDisplayed){ + if(this.enableMenuFade){ + anim = fx.fadeOut({node: this.entryCheckBoxDisplayOptions,duration: 250}); + connect.connect(anim, "onEnd", this, function(){ + domStyle.set(this.entryCheckBoxDisplayOptions, 'display', 'none'); + domStyle.set(this.entryCheckBoxRow, 'display', ''); + domStyle.set(this.entryCheckBoxRow2, 'display', ''); + fx.fadeIn({node: this.entryCheckBoxRow, duration: 250}).play(); + fx.fadeIn({node: this.entryCheckBoxRow2, duration: 250}).play(); + }); + anim.play(); + }else{ + domStyle.set(this.entryCheckBoxDisplayOptions, 'display', 'none'); + domStyle.set(this.entryCheckBoxRow, 'display', ''); + domStyle.set(this.entryCheckBoxRow2, 'display', ''); + } + this._optionButtonDisplayed=false; + }else{ + if(this.enableMenuFade){ + anim = fx.fadeOut({node: this.entryCheckBoxRow,duration: 250}); + anim2 = fx.fadeOut({node: this.entryCheckBoxRow2,duration: 250}); + connect.connect(anim, "onEnd", this, function(){ + domStyle.set(this.entryCheckBoxRow, 'display', 'none'); + domStyle.set(this.entryCheckBoxRow2, 'display', 'none'); + domStyle.set(this.entryCheckBoxDisplayOptions, 'display', ''); + fx.fadeIn({node: this.entryCheckBoxDisplayOptions, duration: 250}).play(); + }); + anim.play(); + anim2.play(); + }else{ + domStyle.set(this.entryCheckBoxRow, 'display', 'none'); + domStyle.set(this.entryCheckBoxRow2, 'display', 'none'); + domStyle.set(this.entryCheckBoxDisplayOptions, 'display', ''); + } + this._optionButtonDisplayed=true; + } + } + }, + + _handleEvent: function(/*object*/entrySelectionEvent){ + // summary: + // Internal function for listening to a topic that will handle entry notification. + // description: + // Internal function for listening to a topic that will handle entry notification. + // + // entrySelectionEvent: + // The topic message containing the entry that was selected for view. + // + // returns: + // Nothing. + if(entrySelectionEvent.source != this){ + if(entrySelectionEvent.action == "set" && entrySelectionEvent.entry){ + this.setEntry(entrySelectionEvent.entry, entrySelectionEvent.feed); + }else if(entrySelectionEvent.action == "delete" && entrySelectionEvent.entry && entrySelectionEvent.entry == this._entry){ + this.clear(); + } + } + }, + + setFieldValidity: function(/*string*/field, /*boolean*/isValid){ + // summary: + // Function to set whether a field in the view is valid and displayable. + // description: + // Function to set whether a field in the view is valid and displayable. + // This is needed for over-riding of the set* functions and customization of how data is displayed in the attach point. + // So if custom implementations use their own display logic, they can still enable the field. + // + // field: + // The field name to set the valid parameter on. Such as 'content', 'id', etc. + // isValid: + // Flag denoting if the field is valid or not. + // + // returns: + // Nothing. + if(field){ + var lowerField = field.toLowerCase(); + this._validEntryFields[field] = isValid; + } + }, + + isFieldValid: function(/*string*/field){ + // summary: + // Function to return if a displayable field is valid or not + // description: + // Function to return if a displayable field is valid or not + // + // field: + // The field name to get the valid parameter of. Such as 'content', 'id', etc. + // + // returns: + // boolean denoting if the field is valid and set. + return this._validEntryFields[field.toLowerCase()]; + }, + + getEntry: function(){ + return this._entry; + }, + + getFeed: function(){ + return this._feed; + }, + + destroy: function(){ + this.clear(); + arrayUtil.forEach(this._subscriptions, dojo.unsubscribe); + } +}); + +widget.EntryHeader = dojo.declare(/*===== "dojox.atom.widget.EntryHeader", =====*/ [_Widget, _Templated, _Container],{ + // summary: + // Widget representing a header in a FeedEntryViewer/Editor + // description: + // Widget representing a header in a FeedEntryViewer/Editor + title: "", + templateString: headerTemplate, + + postCreate: function(){ + this.setListHeader(); + }, + + setListHeader: function(/*string*/title){ + this.clear(); + if(title){ + this.title = title; + } + var textNode = document.createTextNode(this.title); + this.entryHeaderNode.appendChild(textNode); + }, + + clear: function(){ + this.destroyDescendants(); + if(this.entryHeaderNode){ + for(var i = 0; i < this.entryHeaderNode.childNodes.length; i++){ + this.entryHeaderNode.removeChild(this.entryHeaderNode.childNodes[i]); + } + } + }, + + destroy: function(){ + this.clear(); + } +}); + +return widget.FeedEntryViewer; +}); diff --git a/js/dojo/dojox/atom/widget/FeedViewer.js b/js/dojo/dojox/atom/widget/FeedViewer.js new file mode 100644 index 0000000..36c426a --- /dev/null +++ b/js/dojo/dojox/atom/widget/FeedViewer.js @@ -0,0 +1,812 @@ +//>>built +require({cache:{ +'url:dojox/atom/widget/templates/FeedViewer.html':"<div class=\"feedViewerContainer\" dojoAttachPoint=\"feedViewerContainerNode\">\n\t<table cellspacing=\"0\" cellpadding=\"0\" class=\"feedViewerTable\">\n\t\t<tbody dojoAttachPoint=\"feedViewerTableBody\" class=\"feedViewerTableBody\">\n\t\t</tbody>\n\t</table>\n</div>\n", +'url:dojox/atom/widget/templates/FeedViewerEntry.html':"<tr class=\"feedViewerEntry\" dojoAttachPoint=\"entryNode\" dojoAttachEvent=\"onclick:onClick\">\n <td class=\"feedViewerEntryUpdated\" dojoAttachPoint=\"timeNode\">\n </td>\n <td>\n <table border=\"0\" width=\"100%\" dojoAttachPoint=\"titleRow\">\n <tr padding=\"0\" border=\"0\">\n <td class=\"feedViewerEntryTitle\" dojoAttachPoint=\"titleNode\">\n </td>\n <td class=\"feedViewerEntryDelete\" align=\"right\">\n <span dojoAttachPoint=\"deleteButton\" dojoAttachEvent=\"onclick:deleteEntry\" class=\"feedViewerDeleteButton\" style=\"display:none;\">[delete]</span>\n </td>\n <tr>\n </table>\n </td>\n</tr>", +'url:dojox/atom/widget/templates/FeedViewerGrouping.html':"<tr dojoAttachPoint=\"groupingNode\" class=\"feedViewerGrouping\">\n\t<td colspan=\"2\" dojoAttachPoint=\"titleNode\" class=\"feedViewerGroupingTitle\">\n\t</td>\n</tr>"}}); +define("dojox/atom/widget/FeedViewer", [ + "dojo/_base/kernel", + "dojo/_base/lang", + "dojo/_base/array", + "dojo/_base/connect", + "dojo/dom-class", + "dijit/_Widget", + "dijit/_Templated", + "dijit/_Container", + "../io/Connection", + "dojo/text!./templates/FeedViewer.html", + "dojo/text!./templates/FeedViewerEntry.html", + "dojo/text!./templates/FeedViewerGrouping.html", + "dojo/i18n!./nls/FeedViewerEntry", + "dojo/_base/declare" +], function (dojo, lang, arrayUtil, connect, domClass, _Widget, _Templated, _Container, Connection, template, entryTemplate, groupingTemplate, i18nViewer) { +dojo.experimental("dojox.atom.widget.FeedViewer"); + +var widget = dojo.getObject("dojox.atom.widget", true); + +widget.FeedViewer = dojo.declare(/*===== "dojox.atom.widget.FeedViewer", =====*/ [_Widget, _Templated, _Container],{ + // summary: + // An ATOM feed viewer that allows for viewing a feed, deleting entries, and editing entries. + // description: + // An ATOM feed viewer that allows for viewing a feed, deleting entries, and editing entries. + feedViewerTableBody: null, //The body of the feed viewer table so we can access it and populate it. Will be assigned via template. + feedViewerTable: null, //The overal table container which contains the feed viewer table. Will be assigned via template. + entrySelectionTopic: "", //The topic to broadcast when any entry is clicked so that a listener can pick up it and display it. + url: "", //The URL to which to connect to initially on creation. + xmethod: false, + localSaveOnly: false, + + //Templates for the HTML rendering. Need to figure these out better, admittedly. + templateString: template, + + _feed: null, + _currentSelection: null, // Currently selected entry + + _includeFilters: null, + + alertsEnabled: false, + + postCreate: function(){ + // summary: + // The postCreate function. + // description: + // The postCreate function. Creates our AtomIO object for future interactions and subscribes to the + // event given in markup/creation. + this._includeFilters = []; + + if(this.entrySelectionTopic !== ""){ + this._subscriptions = [dojo.subscribe(this.entrySelectionTopic, this, "_handleEvent")]; + } + this.atomIO = new Connection(); + this.childWidgets = []; + }, + + startup: function(){ + // summary: + // The startup function. + // description: + // The startup function. Parses the filters and sets the feed based on the given url. + this.containerNode = this.feedViewerTableBody; + var children = this.getDescendants(); + for(var i in children){ + var child = children[i]; + if(child && child.isFilter){ + this._includeFilters.push(new widget.FeedViewer.CategoryIncludeFilter(child.scheme, child.term, child.label)); + child.destroy(); + } + } + + if(this.url !== ""){ + this.setFeedFromUrl(this.url); + } + }, + + clear: function(){ + // summary: + // Function clearing all current entries in the feed view. + // description: + // Function clearing all current entries in the feed view. + // + // returns: + // Nothing. + this.destroyDescendants(); + }, + + setFeedFromUrl: function(/*string*/url){ + // summary: + // Function setting the feed from a URL which to get the feed. + // description: + // Function setting the dojox.atom.io.model.Feed data into the view. + // + // url: + // The URL to the feed to load. + // + // returns: + // Nothing. + if(url !== ""){ + if(this._isRelativeURL(url)){ + var baseUrl = ""; + if(url.charAt(0) !== '/'){ + baseUrl = this._calculateBaseURL(window.location.href, true); + }else{ + baseUrl = this._calculateBaseURL(window.location.href, false); + } + this.url = baseUrl + url; + } + + this.atomIO.getFeed(url,lang.hitch(this,this.setFeed)); + } + }, + + + setFeed: function(/*object*/feed){ + // summary: + // Function setting the dojox.atom.io.model.Feed data into the view. + // description: + // Function setting the dojox.atom.io.model.Feed data into the view. + // + // entry: + // The dojox.atom.io.model.Feed object to process + // + // returns: + // Nothing. + this._feed = feed; + this.clear(); + var entrySorter=function(a,b){ + var dispA = this._displayDateForEntry(a); + var dispB = this._displayDateForEntry(b); + if(dispA > dispB){return -1;} + if(dispA < dispB){return 1;} + return 0; + }; + + // This function may not be safe in different locales. + var groupingStr = function(dateStr){ + var dpts = dateStr.split(','); + + dpts.pop(); // remove year and time + return dpts.join(","); + }; + var sortedEntries = feed.entries.sort(lang.hitch(this,entrySorter)); + if(feed){ + var lastSectionTitle = null; + for(var i=0;i<sortedEntries.length;i++){ + + var entry = sortedEntries[i]; + + if(this._isFilterAccepted(entry)){ + var time = this._displayDateForEntry(entry); + var sectionTitle = ""; + + if(time !== null){ + sectionTitle = groupingStr(time.toLocaleString()); + + if(sectionTitle === "" ){ + //Generally an issue on Opera with how its toLocaleString() works, so do a quick and dirty date construction M/D/Y + sectionTitle = "" + (time.getMonth() + 1) + "/" + time.getDate() + "/" + time.getFullYear(); + } + } + if((lastSectionTitle === null) || (lastSectionTitle != sectionTitle)){ + this.appendGrouping(sectionTitle); + lastSectionTitle = sectionTitle; + } + this.appendEntry(entry); + } + } + } + }, + + _displayDateForEntry: function(/*object*/entry){ + // summary: + // Internal function for determining the appropriate date to display. + // description: Internal function for determining of a particular entry is editable. + // + // entry: + // The dojox.atom.io.model.Entry object to examine. + // + // returns: + // An appropriate date for the feed viewer display. + if(entry.updated){return entry.updated;} + if(entry.modified){return entry.modified;} + if(entry.issued){return entry.issued;} + return new Date(); + }, + + appendGrouping: function(/*string*/titleText){ + // summary: + // Function for appending a new grouping of entries to the feed view. + // description: + // Function for appending a grouping of entries to the feed view. + // + // entry: + // The title of the new grouping to create on the view. + // + // returns: + // Nothing. + var entryWidget = new widget.FeedViewerGrouping({}); + entryWidget.setText(titleText); + this.addChild(entryWidget); + this.childWidgets.push(entryWidget); + }, + + appendEntry: function(/*object*/entry){ + // summary: + // Function for appending an entry to the feed view. + // description: + // Function for appending an entry to the feed view. + // + // entry: + // The dojox.atom.io.model.Entry object to append + // + // returns: + // Nothing. + var entryWidget = new widget.FeedViewerEntry({"xmethod": this.xmethod}); + entryWidget.setTitle(entry.title.value); + entryWidget.setTime(this._displayDateForEntry(entry).toLocaleTimeString()); + entryWidget.entrySelectionTopic = this.entrySelectionTopic; + entryWidget.feed = this; + this.addChild(entryWidget); + this.childWidgets.push(entryWidget); + this.connect(entryWidget, "onClick", "_rowSelected"); + entry.domNode = entryWidget.entryNode; + + //Need to set up a bi-directional reference here to control events between the two. + entry._entryWidget = entryWidget; + entryWidget.entry = entry; + }, + + deleteEntry: function(/*object*/entryRow){ + // summary: + // Function for deleting a row from the view + // description: + // Function for deleting a row from the view + if(!this.localSaveOnly){ + this.atomIO.deleteEntry(entryRow.entry, lang.hitch(this, this._removeEntry, entryRow), null, this.xmethod); + }else{ + this._removeEntry(entryRow, true); + } + dojo.publish(this.entrySelectionTopic, [{ action: "delete", source: this, entry: entryRow.entry }]); + }, + + _removeEntry: function(/*FeedViewerEntry*/ entry, /* boolean */success){ + // summary: + // callback for when an entry is deleted from a feed. + // description: + // callback for when an entry is deleted from a feed. + if(success){ + /* Check if this is the last Entry beneath the given date */ + var idx = arrayUtil.indexOf(this.childWidgets, entry); + var before = this.childWidgets[idx-1]; + var after = this.childWidgets[idx+1]; + if( before.isInstanceOf(widget.FeedViewerGrouping) && + (after === undefined || after.isInstanceOf(widget.FeedViewerGrouping))){ + before.destroy(); + } + + /* Destroy the FeedViewerEntry to remove it from the view */ + entry.destroy(); + }else{} + }, + + _rowSelected: function(/*object*/evt){ + // summary: + // Internal function for handling the selection of feed entries. + // description: + // Internal function for handling the selection of feed entries. + // + // evt: + // The click event that triggered a selection. + // + // returns: + // Nothing. + var selectedNode = evt.target; + while(selectedNode){ + if(domClass.contains(selectedNode, 'feedViewerEntry')) { + break; + } + selectedNode = selectedNode.parentNode; + } + + for(var i=0;i<this._feed.entries.length;i++){ + var entry = this._feed.entries[i]; + if( (selectedNode === entry.domNode) && (this._currentSelection !== entry) ){ + //Found it and it isn't already selected. + domClass.add(entry.domNode, "feedViewerEntrySelected"); + domClass.remove(entry._entryWidget.timeNode, "feedViewerEntryUpdated"); + domClass.add(entry._entryWidget.timeNode, "feedViewerEntryUpdatedSelected"); + + this.onEntrySelected(entry); + if(this.entrySelectionTopic !== ""){ + dojo.publish(this.entrySelectionTopic, [{ action: "set", source: this, feed: this._feed, entry: entry }]); + } + if(this._isEditable(entry)){ + entry._entryWidget.enableDelete(); + } + + this._deselectCurrentSelection(); + this._currentSelection = entry; + break; + }else if( (selectedNode === entry.domNode) && (this._currentSelection === entry) ){ + //Found it and it is the current selection, we just want to de-select it so users can 'unselect rows' if they want. + dojo.publish(this.entrySelectionTopic, [{ action: "delete", source: this, entry: entry }]); + this._deselectCurrentSelection(); + break; + } + } + }, + + _deselectCurrentSelection: function(){ + // summary: + // Internal function for unselecting the current selection. + // description: + // Internal function for unselecting the current selection. + // + // returns: + // Nothing. + if(this._currentSelection){ + domClass.add(this._currentSelection._entryWidget.timeNode, "feedViewerEntryUpdated"); + domClass.remove(this._currentSelection.domNode, "feedViewerEntrySelected"); + domClass.remove(this._currentSelection._entryWidget.timeNode, "feedViewerEntryUpdatedSelected"); + this._currentSelection._entryWidget.disableDelete(); + this._currentSelection = null; + } + }, + + + _isEditable: function(/*object*/entry){ + // summary: + // Internal function for determining of a particular entry is editable. + // description: + // Internal function for determining of a particular entry is editable. + // This is used for determining if the delete action should be displayed or not. + // + // entry: + // The dojox.atom.io.model.Entry object to examine + // + // returns: + // Boolean denoting if the entry seems editable or not.. + var retVal = false; + if(entry && entry !== null && entry.links && entry.links !== null){ + for(var x in entry.links){ + if(entry.links[x].rel && entry.links[x].rel == "edit"){ + retVal = true; + break; + } + } + } + return retVal; + }, + + onEntrySelected: function(/*object*/entry){ + // summary: + // Function intended for over-riding/replacement as an attachpoint to for other items to recieve + // selection notification. + // description: Function intended for over0-riding/replacement as an attachpoint to for other items to recieve + // selection notification. + // + // entry: + // The dojox.atom.io.model.Entry object selected. + // + // returns: + // Nothing. + }, + + _isRelativeURL: function(/*string*/url){ + // summary: + // Method to determine if the URL is relative or absolute. + // description: + // Method to determine if the URL is relative or absolute. Basic assumption is if it doesn't start + // with http:// or file://, it's relative to the current document. + // + // url: + // The URL to inspect. + // + // returns: + // boolean indicating whether it's a relative url or not. + var isFileURL = function(url){ + var retVal = false; + if(url.indexOf("file://") === 0){ + retVal = true; + } + return retVal; + } + + var isHttpURL = function(url){ + var retVal = false; + if(url.indexOf("http://") === 0){ + retVal = true; + } + return retVal; + } + + var retVal = false; + if(url !== null){ + if(!isFileURL(url) && !isHttpURL(url)){ + retVal = true; + } + } + return retVal; + }, + + _calculateBaseURL: function(/*string*/fullURL, /*boolean*/currentPageRelative){ + // summary: + // Internal function to calculate a baseline URL from the provided full URL. + // description: + // Internal function to calculate a baseline URL from the provided full URL. + // + // fullURL: + // The full URL as a string. + // currentPageRelative: + // Flag to denote of the base URL should be calculated as just the server base, or relative to the current page/location in the URL. + // + // returns: + // String of the baseline URL + var baseURL = null; + if(fullURL !== null){ + //Check to see if we need to strip off any query parameters from the URL. + var index = fullURL.indexOf("?"); + if(index != -1){ + fullURL = fullURL.substring(0,index); + //console.debug("Removed query parameters. URL now: " + fullURL); + } + + if(currentPageRelative){ + //Relative to the 'current page' in the URL, so we need to trim that off. + //Now we need to trim if necessary. If it ends in /, then we don't have a filename to trim off + //so we can return. + index = fullURL.lastIndexOf("/"); + if((index > 0) && (index < fullURL.length) && (index !== (fullURL.length -1))){ + //We want to include the terminating / + baseURL = fullURL.substring(0,(index + 1)); + }else{ + baseURL = fullURL; + } + }else{ + //We want to find the first occurance of / after the <protocol>:// + index = fullURL.indexOf("://"); + if(index > 0){ + index = index + 3; + var protocol = fullURL.substring(0,index); + var fragmentURL = fullURL.substring(index, fullURL.length); + index = fragmentURL.indexOf("/"); + if((index < fragmentURL.length) && (index > 0) ){ + baseURL = protocol + fragmentURL.substring(0,index); + }else{ + baseURL = protocol + fragmentURL; + } + } + } + } + return baseURL; + }, + + _isFilterAccepted: function(/*object*/entry) { + // summary: + // Internal function to do matching of category filters to widgets. + // description: + // Internal function to do matching of category filters to widgets. + // + // returns: + // boolean denoting if this entry matched one of the accept filters. + var accepted = false; + if (this._includeFilters && (this._includeFilters.length > 0)) { + for (var i = 0; i < this._includeFilters.length; i++) { + var filter = this._includeFilters[i]; + if (filter.match(entry)) { + accepted = true; + break; + } + } + } + else { + accepted = true; + } + return accepted; + }, + + addCategoryIncludeFilter: function(/*object*/filter) { + // summary: + // Function to add a filter for entry inclusion in the feed view. + // description: + // Function to add a filter for entry inclusion in the feed view. + // + // filter: + // The basic items to filter on and the values. + // Should be of format: {scheme: <some text or null>, term: <some text or null>, label: <some text or null>} + // + // returns: + // Nothing. + if (filter) { + var scheme = filter.scheme; + var term = filter.term; + var label = filter.label; + var addIt = true; + + if (!scheme) { + scheme = null; + } + if (!term) { + scheme = null; + } + if (!label) { + scheme = null; + } + + if (this._includeFilters && this._includeFilters.length > 0) { + for (var i = 0; i < this._includeFilters.length; i++) { + var eFilter = this._includeFilters[i]; + if ((eFilter.term === term) && (eFilter.scheme === scheme) && (eFilter.label === label)) { + //Verify we don't have this filter already. + addIt = false; + break; + } + } + } + + if (addIt) { + this._includeFilters.push(widget.FeedViewer.CategoryIncludeFilter(scheme, term, label)); + } + } + }, + + removeCategoryIncludeFilter: function(/*object*/filter) { + // summary: + // Function to remove a filter for entry inclusion in the feed view. + // description: + // Function to remove a filter for entry inclusion in the feed view. + // + // filter: + // The basic items to identify the filter that is present. + // Should be of format: {scheme: <some text or null>, term: <some text or null>, label: <some text or null>} + // + // returns: + // Nothing. + if (filter) { + var scheme = filter.scheme; + var term = filter.term; + var label = filter.label; + + if (!scheme) { + scheme = null; + } + if (!term) { + scheme = null; + } + if (!label) { + scheme = null; + } + + var newFilters = []; + if (this._includeFilters && this._includeFilters.length > 0) { + for (var i = 0; i < this._includeFilters.length; i++) { + var eFilter = this._includeFilters[i]; + if (!((eFilter.term === term) && (eFilter.scheme === scheme) && (eFilter.label === label))) { + //Keep only filters that do not match + newFilters.push(eFilter); + } + } + this._includeFilters = newFilters; + } + } + }, + + _handleEvent: function(/*object*/entrySelectionEvent) { + // summary: + // Internal function for listening to a topic that will handle entry notification. + // description: + // Internal function for listening to a topic that will handle entry notification. + // + // entrySelectionEvent: + // The topic message containing the entry that was selected for view. + // + // returns: + // Nothing. + if(entrySelectionEvent.source != this) { + if(entrySelectionEvent.action == "update" && entrySelectionEvent.entry) { + var evt = entrySelectionEvent; + if(!this.localSaveOnly){ + this.atomIO.updateEntry(evt.entry, lang.hitch(evt.source,evt.callback), null, true); + } + this._currentSelection._entryWidget.setTime(this._displayDateForEntry(evt.entry).toLocaleTimeString()); + this._currentSelection._entryWidget.setTitle(evt.entry.title.value); + } else if(entrySelectionEvent.action == "post" && entrySelectionEvent.entry) { + if(!this.localSaveOnly){ + this.atomIO.addEntry(entrySelectionEvent.entry, this.url, lang.hitch(this,this._addEntry)); + }else{ + this._addEntry(entrySelectionEvent.entry); + } + } + } + }, + + _addEntry: function(/*object*/entry) { + // summary: + // callback function used when adding an entry to the feed. + // description: + // callback function used when adding an entry to the feed. After the entry has been posted to the feed, + // we add it to our feed representation (to show it on the page) and publish an event to update any entry viewers. + this._feed.addEntry(entry); + this.setFeed(this._feed); + dojo.publish(this.entrySelectionTopic, [{ action: "set", source: this, feed: this._feed, entry: entry }]); + }, + + destroy: function(){ + // summary: + // Destroys this widget, including all descendants and subscriptions. + // description: + // Destroys this widget, including all descendants and subscriptions. + this.clear(); + arrayUtil.forEach(this._subscriptions, dojo.unsubscribe); + } +}); + +widget.FeedViewerEntry = dojo.declare(/*===== "dojox.atom.widget.FeedViewerEntry", =====*/ [_Widget, _Templated],{ + // summary: + // Widget for handling the display of an entry and specific events associated with it. + // description: Widget for handling the display of an entry and specific events associated with it. + + templateString: entryTemplate, + + entryNode: null, + timeNode: null, + deleteButton: null, + entry: null, + feed: null, + + postCreate: function(){ + var _nlsResources = i18nViewer; + this.deleteButton.innerHTML = _nlsResources.deleteButton; + }, + + setTitle: function(/*string*/text){ + // summary: + // Function to set the title of the entry. + // description: + // Function to set the title of the entry. + // + // text: + // The title. + // + // returns: + // Nothing. + if (this.titleNode.lastChild){this.titleNode.removeChild(this.titleNode.lastChild);} + + var titleTextNode = document.createElement("div"); + titleTextNode.innerHTML = text; + this.titleNode.appendChild(titleTextNode); + }, + + setTime: function(/*string*/timeText){ + // summary: + // Function to set the time of the entry. + // description: + // Function to set the time of the entry. + // + // timeText: + // The string form of the date. + // + // returns: + // Nothing. + if (this.timeNode.lastChild){this.timeNode.removeChild(this.timeNode.lastChild);} + var timeTextNode = document.createTextNode(timeText); + this.timeNode.appendChild(timeTextNode); + }, + + enableDelete: function(){ + // summary: + // Function to enable the delete action on this entry. + // description: + // Function to enable the delete action on this entry. + // + // returns: + // Nothing. + if (this.deleteButton !== null) { + //TODO Fix this + this.deleteButton.style.display = 'inline'; + } + }, + + disableDelete: function(){ + // summary: + // Function to disable the delete action on this entry. + // description: + // Function to disable the delete action on this entry. + // + // returns: + // Nothing. + if (this.deleteButton !== null) { + this.deleteButton.style.display = 'none'; + } + }, + + deleteEntry: function(/*object*/event) { + // summary: + // Function to handle the delete event and delete the entry. + // description: + // Function to handle the delete event and delete the entry. + // + // returns: + // Nothing. + event.preventDefault(); + event.stopPropagation(); + this.feed.deleteEntry(this); + }, + + onClick: function(/*object*/e){ + // summary: + // Attach point for when a row is clicked on. + // description: + // Attach point for when a row is clicked on. + // + // e: + // The event generated by the click. + } +}); + +widget.FeedViewerGrouping = dojo.declare(/*===== "dojox.atom.widget.FeedViewerGrouping", =====*/ [_Widget, _Templated],{ + // summary: + // Grouping of feed entries. + // description: + // Grouping of feed entries. + templateString: groupingTemplate, + + groupingNode: null, + titleNode: null, + + setText: function(text){ + // summary: + // Sets the text to be shown above this grouping. + // description: + // Sets the text to be shown above this grouping. + // + // text: + // The text to show. + if (this.titleNode.lastChild){this.titleNode.removeChild(this.titleNode.lastChild);} + var textNode = document.createTextNode(text); + this.titleNode.appendChild(textNode); + } +}); + +widget.AtomEntryCategoryFilter = dojo.declare(/*===== "dojox.atom.widget.AtomEntryCategoryFilter", =====*/ [_Widget, _Templated],{ + // summary: + // A filter to be applied to the list of entries. + // description: + // A filter to be applied to the list of entries. + scheme: "", + term: "", + label: "", + isFilter: true +}); + +widget.FeedViewer.CategoryIncludeFilter = dojo.declare(/*===== "dojox.atom.widget.FeedViewer.CategoryIncludeFilter", =====*/ null,{ + constructor: function(scheme, term, label){ + // summary: + // The initializer function. + // description: + // The initializer function. + this.scheme = scheme; + this.term = term; + this.label = label; + }, + + match: function(entry) { + // summary: + // Function to determine if this category filter matches against a category on an atom entry + // description: + // Function to determine if this category filter matches against a category on an atom entry + // + // returns: + // boolean denoting if this category filter matched to this entry. + var matched = false; + if (entry !== null) { + var categories = entry.categories; + if (categories !== null) { + for (var i = 0; i < categories.length; i++) { + var category = categories[i]; + + if (this.scheme !== "") { + if (this.scheme !== category.scheme) { + break; + } + } + + if (this.term !== "") { + if (this.term !== category.term) { + break; + } + } + + if (this.label !== "") { + if (this.label !== category.label) { + break; + } + } + //Made it this far, everything matched. + matched = true; + } + } + } + return matched; + } +}); +return widget.FeedViewer; +});
\ No newline at end of file diff --git a/js/dojo/dojox/atom/widget/nls/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/FeedEntryEditor.js new file mode 100644 index 0000000..192dc85 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/FeedEntryEditor.js @@ -0,0 +1,43 @@ +//>>built +define("dojox/atom/widget/nls/FeedEntryEditor", { root: +//begin v1.x content +({ + doNew: "[new]", + edit: "[edit]", + save: "[save]", + cancel: "[cancel]" +}) +//end v1.x content +, +"ar": true, +"az": true, +"ca": true, +"cs": true, +"da": true, +"de": true, +"el": true, +"es": true, +"fi": true, +"fr": true, +"he": true, +"hu": true, +"hr": true, +"it": true, +"ja": true, +"kk": true, +"ko": true, +"nb": true, +"nl": true, +"pl": true, +"pt-pt": true, +"pt": true, +"ro": true, +"ru": true, +"sk": true, +"sl": true, +"sv": true, +"th": true, +"tr": true, +"zh": true, +"zh-tw": true +}) diff --git a/js/dojo/dojox/atom/widget/nls/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/FeedEntryViewer.js new file mode 100644 index 0000000..6a08647 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/FeedEntryViewer.js @@ -0,0 +1,48 @@ +//>>built +define("dojox/atom/widget/nls/FeedEntryViewer", { root: +//begin v1.x content +({ + displayOptions: "[display options]", + title: "Title", + authors: "Authors", + contributors: "Contributors", + id: "ID", + close: "[close]", + updated: "Updated", + summary: "Summary", + content: "Content" +}) +//end v1.x content +, +"ar": true, +"az": true, +"ca": true, +"cs": true, +"da": true, +"de": true, +"el": true, +"es": true, +"fi": true, +"fr": true, +"he": true, +"hu": true, +"hr": true, +"it": true, +"ja": true, +"kk": true, +"ko": true, +"nb": true, +"nl": true, +"pl": true, +"pt-pt": true, +"pt": true, +"ro": true, +"ru": true, +"sk": true, +"sl": true, +"sv": true, +"th": true, +"tr": true, +"zh": true, +"zh-tw": true +}); diff --git a/js/dojo/dojox/atom/widget/nls/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/FeedViewerEntry.js new file mode 100644 index 0000000..102de22 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/FeedViewerEntry.js @@ -0,0 +1,40 @@ +//>>built +define("dojox/atom/widget/nls/FeedViewerEntry", { root: +//begin v1.x content +({ + deleteButton: "[Delete]" +}) +//end v1.x content +, +"ar": true, +"az": true, +"ca": true, +"cs": true, +"da": true, +"de": true, +"el": true, +"es": true, +"fi": true, +"fr": true, +"he": true, +"hu": true, +"hr": true, +"it": true, +"ja": true, +"kk": true, +"ko": true, +"nb": true, +"nl": true, +"pl": true, +"pt-pt": true, +"pt": true, +"ro": true, +"ru": true, +"sk": true, +"sl": true, +"sv": true, +"th": true, +"tr": true, +"zh": true, +"zh-tw": true +}); diff --git a/js/dojo/dojox/atom/widget/nls/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/PeopleEditor.js new file mode 100644 index 0000000..b60fd23 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/PeopleEditor.js @@ -0,0 +1,42 @@ +//>>built +define("dojox/atom/widget/nls/PeopleEditor", { root: +//begin v1.x content +({ + add: "Add", + addAuthor: "Add Author", + addContributor: "Add Contributor" +}) +//end v1.x content +, +"ar": true, +"az": true, +"ca": true, +"cs": true, +"da": true, +"de": true, +"el": true, +"es": true, +"fi": true, +"fr": true, +"he": true, +"hu": true, +"hr": true, +"it": true, +"ja": true, +"kk": true, +"ko": true, +"nb": true, +"nl": true, +"pl": true, +"pt-pt": true, +"pt": true, +"ro": true, +"ru": true, +"sk": true, +"sl": true, +"sv": true, +"th": true, +"tr": true, +"zh": true, +"zh-tw": true +}); diff --git a/js/dojo/dojox/atom/widget/nls/ar/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/ar/FeedEntryEditor.js new file mode 100644 index 0000000..10445fb --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ar/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/ar/FeedEntryEditor", //begin v1.x content +({ + doNew: "[جديد]", + edit: "[تحرير]", + save: "[حفظ]", + cancel: "[الغاء]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ar/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/ar/FeedEntryViewer.js new file mode 100644 index 0000000..d1520cf --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ar/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/ar/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[اختيارات العرض]", + title: "العنوان", + authors: "المؤلفين", + contributors: "المساهمين", + id: "الكود", + close: "[اغلاق]", + updated: "تحديث في", + summary: "الملخص", + content: "المحتويات" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ar/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/ar/FeedViewerEntry.js new file mode 100644 index 0000000..6977ae7 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ar/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/ar/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[حذف]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ar/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/ar/PeopleEditor.js new file mode 100644 index 0000000..4d922fb --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ar/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/ar/PeopleEditor", //begin v1.x content +({ + add: "اضافة", + addAuthor: "اضافة مؤلف", + addContributor: "اضافة مشارك" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/az/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/az/FeedEntryEditor.js new file mode 100644 index 0000000..a7298ce --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/az/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/az/FeedEntryEditor", //begin v1.x content +({ + "edit" : "[tərtib et]", + "save" : "[saxla]", + "cancel" : "[ləğv et]", + "doNew" : "[yeni]" +}) +//end v1.x content +);
\ No newline at end of file diff --git a/js/dojo/dojox/atom/widget/nls/az/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/az/FeedEntryViewer.js new file mode 100644 index 0000000..f99bd60 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/az/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/az/FeedEntryViewer", //begin v1.x content +({ + "close" : "[çıx]", + "title" : "Başlıq", + "authors" : "Yazıçılar", + "summary" : "Məzmun", + "content" : "Tərkib", + "contributors" : "Əməyi keçənlər", + "updated" : "Yeniləndi", + "displayOptions" : "[göstərmə seçimləri]", + "id" : "Şəxsiyyət" +}) +//end v1.x content +);
\ No newline at end of file diff --git a/js/dojo/dojox/atom/widget/nls/az/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/az/FeedViewerEntry.js new file mode 100644 index 0000000..bc03f6a --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/az/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/az/FeedViewerEntry", //begin v1.x content +({ + "deleteButton" : "[Sil]" +}) +//end v1.x content +);
\ No newline at end of file diff --git a/js/dojo/dojox/atom/widget/nls/az/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/az/PeopleEditor.js new file mode 100644 index 0000000..6dd8a6d --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/az/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/az/PeopleEditor", //begin v1.x content +({ + "add" : "Əlavə Et", + "addAuthor" : "Yazıçı Əlavə Et", + "addContributor" : "Əməyi keçənlərə Əlavə Et" +}) +//end v1.x content +);
\ No newline at end of file diff --git a/js/dojo/dojox/atom/widget/nls/ca/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/ca/FeedEntryEditor.js new file mode 100644 index 0000000..3921f5e --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ca/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/ca/FeedEntryEditor", //begin v1.x content +({ + doNew: "[nou]", + edit: "[edita]", + save: "[desa]", + cancel: "[cancel·la]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ca/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/ca/FeedEntryViewer.js new file mode 100644 index 0000000..f0a4512 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ca/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/ca/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[mostra opcions]", + title: "Títol", + authors: "Autors", + contributors: "Col·laboradors", + id: "ID", + close: "[tanca]", + updated: "Actualitzat", + summary: "Resum", + content: "Contingut" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ca/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/ca/FeedViewerEntry.js new file mode 100644 index 0000000..51129b2 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ca/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/ca/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Suprimeix]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ca/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/ca/PeopleEditor.js new file mode 100644 index 0000000..7a10eba --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ca/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/ca/PeopleEditor", //begin v1.x content +({ + add: "Afegeix", + addAuthor: "Afegeix un autor", + addContributor: "Afegeix un col·laborador" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/cs/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/cs/FeedEntryEditor.js new file mode 100644 index 0000000..ced0d0a --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/cs/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/cs/FeedEntryEditor", //begin v1.x content +({ + doNew: "[nové]", + edit: "[upravit]", + save: "[uložit]", + cancel: "[storno]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/cs/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/cs/FeedEntryViewer.js new file mode 100644 index 0000000..9963791 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/cs/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/cs/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[volby zobrazení]", + title: "Název", + authors: "Autoři", + contributors: "Přispěvatelé", + id: "ID", + close: "[zavřít]", + updated: "Aktualizováno", + summary: "Souhrn", + content: "Obsah" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/cs/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/cs/FeedViewerEntry.js new file mode 100644 index 0000000..ecb21a2 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/cs/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/cs/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Odstranit]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/cs/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/cs/PeopleEditor.js new file mode 100644 index 0000000..ea85266 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/cs/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/cs/PeopleEditor", //begin v1.x content +({ + add: "Přidat", + addAuthor: "Přidat autora", + addContributor: "Přidat přispěvatele" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/da/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/da/FeedEntryEditor.js new file mode 100644 index 0000000..0c42583 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/da/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/da/FeedEntryEditor", //begin v1.x content +({ + doNew: "[ny]", + edit: "[redigér]", + save: "[gem]", + cancel: "[annullér]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/da/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/da/FeedEntryViewer.js new file mode 100644 index 0000000..c0bd1bd --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/da/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/da/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[fremvisningsvalg]", + title: "Titel", + authors: "Forfattere", + contributors: "Bidragydere", + id: "Id", + close: "[luk]", + updated: "Opdateret", + summary: "Resumé", + content: "Indhold" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/da/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/da/FeedViewerEntry.js new file mode 100644 index 0000000..c5e546c --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/da/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/da/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Slet]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/da/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/da/PeopleEditor.js new file mode 100644 index 0000000..51c820a --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/da/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/da/PeopleEditor", //begin v1.x content +({ + add: "Tilføj", + addAuthor: "Tilføj forfatter", + addContributor: "Tilføj bidragyder" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/de/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/de/FeedEntryEditor.js new file mode 100644 index 0000000..a2a66b6 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/de/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/de/FeedEntryEditor", //begin v1.x content +({ + doNew: "[Neu]", + edit: "[Bearbeiten]", + save: "[Speichern]", + cancel: "[Abbrechen]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/de/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/de/FeedEntryViewer.js new file mode 100644 index 0000000..bf87306 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/de/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/de/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[Anzeigeoptionen]", + title: "Titel", + authors: "Autoren", + contributors: "Mitwirkende", + id: "ID", + close: "[Schließen]", + updated: "Aktualisiert", + summary: "Zusammenfassung", + content: "Inhalt" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/de/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/de/FeedViewerEntry.js new file mode 100644 index 0000000..dbd6af2 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/de/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/de/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Löschen]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/de/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/de/PeopleEditor.js new file mode 100644 index 0000000..1e73d06 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/de/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/de/PeopleEditor", //begin v1.x content +({ + add: "Hinzufügen", + addAuthor: "Autor hinzufügen", + addContributor: "Mitwirkenden hinzufügen" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/el/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/el/FeedEntryEditor.js new file mode 100644 index 0000000..7a1cfeb --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/el/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/el/FeedEntryEditor", //begin v1.x content +({ + doNew: "[δημιουργία]", + edit: "[τροποποίηση]", + save: "[αποθήκευση]", + cancel: "[ακύρωση]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/el/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/el/FeedEntryViewer.js new file mode 100644 index 0000000..3307d3b --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/el/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/el/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[επιλογές παρουσίασης]", + title: "Τίτλος", + authors: "Συντάκτες", + contributors: "Συνεισφέροντες", + id: "Ταυτότητα", + close: "[κλείσιμο]", + updated: "Ενημερώθηκε", + summary: "Περίληψη", + content: "Περιεχόμενο" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/el/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/el/FeedViewerEntry.js new file mode 100644 index 0000000..91e8b39 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/el/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/el/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Διαγραφή]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/el/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/el/PeopleEditor.js new file mode 100644 index 0000000..b0fa325 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/el/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/el/PeopleEditor", //begin v1.x content +({ + add: "Προσθήκη", + addAuthor: "Προσθήκη συντάκτη", + addContributor: "Προσθήκη συνεισφέροντα" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/es/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/es/FeedEntryEditor.js new file mode 100644 index 0000000..e47c632 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/es/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/es/FeedEntryEditor", //begin v1.x content +({ + doNew: "[nuevo]", + edit: "[editar]", + save: "[guardar]", + cancel: "[cancelar]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/es/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/es/FeedEntryViewer.js new file mode 100644 index 0000000..1d8ea8a --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/es/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/es/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[opciones de visualización]", + title: "Título", + authors: "Autores", + contributors: "Colaboradores", + id: "ID", + close: "[cerrar]", + updated: "Actualizado", + summary: "Resumen", + content: "Contenido" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/es/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/es/FeedViewerEntry.js new file mode 100644 index 0000000..c096ac3 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/es/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/es/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Suprimir]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/es/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/es/PeopleEditor.js new file mode 100644 index 0000000..0351e4d --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/es/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/es/PeopleEditor", //begin v1.x content +({ + add: "Añadir", + addAuthor: "Añadir autor", + addContributor: "Añadir colaborador" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/fi/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/fi/FeedEntryEditor.js new file mode 100644 index 0000000..d5201bf --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/fi/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/fi/FeedEntryEditor", //begin v1.x content +({ + doNew: "[uusi]", + edit: "[muokkaa]", + save: "[tallenna]", + cancel: "[peruuta]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/fi/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/fi/FeedEntryViewer.js new file mode 100644 index 0000000..000b0e3 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/fi/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/fi/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[näyttöasetukset]", + title: "Otsikko", + authors: "Tekijät", + contributors: "Lisääjät", + id: "Tunnus", + close: "[sulje]", + updated: "Päivitetty", + summary: "Tiivistelmä", + content: "Sisältö" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/fi/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/fi/FeedViewerEntry.js new file mode 100644 index 0000000..5e47067 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/fi/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/fi/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Poista]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/fi/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/fi/PeopleEditor.js new file mode 100644 index 0000000..a1a3f3a --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/fi/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/fi/PeopleEditor", //begin v1.x content +({ + add: "Lisää", + addAuthor: "Lisää tekijä", + addContributor: "Lisää lisääjä" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/fr/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/fr/FeedEntryEditor.js new file mode 100644 index 0000000..a35d0f7 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/fr/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/fr/FeedEntryEditor", //begin v1.x content +({ + doNew: "[nouveau]", + edit: "[éditer]", + save: "[sauvegarder]", + cancel: "[annuler]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/fr/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/fr/FeedEntryViewer.js new file mode 100644 index 0000000..c5e8f2a --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/fr/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/fr/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[options d'affichage]", + title: "Titre", + authors: "Auteurs", + contributors: "Collaborateurs", + id: "ID", + close: "[fermer]", + updated: "Mis à jour", + summary: "Récapitulatif", + content: "Contenu" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/fr/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/fr/FeedViewerEntry.js new file mode 100644 index 0000000..5696e7e --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/fr/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/fr/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Supprimer]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/fr/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/fr/PeopleEditor.js new file mode 100644 index 0000000..fb77649 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/fr/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/fr/PeopleEditor", //begin v1.x content +({ + add: "Ajouter", + addAuthor: "Ajouter un auteur", + addContributor: "Ajouter un collaborateur" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/he/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/he/FeedEntryEditor.js new file mode 100644 index 0000000..74bdb43 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/he/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/he/FeedEntryEditor", //begin v1.x content +({ + doNew: "[חדש]", + edit: "[עריכה]", + save: "[שמירה]", + cancel: "[ביטול]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/he/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/he/FeedEntryViewer.js new file mode 100644 index 0000000..c47ae69 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/he/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/he/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[אפשרויות הצגה]", + title: "כותרת", + authors: "מחברים", + contributors: "תורמים", + id: "זיהוי", + close: "[סגירה]", + updated: "עודכן", + summary: "סיכום", + content: "תוכן" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/he/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/he/FeedViewerEntry.js new file mode 100644 index 0000000..3c10814 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/he/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/he/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[מחיקה]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/he/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/he/PeopleEditor.js new file mode 100644 index 0000000..d9c3a9d --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/he/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/he/PeopleEditor", //begin v1.x content +({ + add: "הוספה", + addAuthor: "הוספת מחבר", + addContributor: "הוספת תורם" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/hr/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/hr/FeedEntryEditor.js new file mode 100644 index 0000000..3b31e29 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/hr/FeedEntryEditor.js @@ -0,0 +1,9 @@ +//>>built +define( +"dojox/atom/widget/nls/hr/FeedEntryEditor", ({ + doNew: "[novo]", + edit: "[uredi]", + save: "[spremi]", + cancel: "[opoziv]" +}) +); diff --git a/js/dojo/dojox/atom/widget/nls/hr/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/hr/FeedEntryViewer.js new file mode 100644 index 0000000..2f23eaa --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/hr/FeedEntryViewer.js @@ -0,0 +1,14 @@ +//>>built +define( +"dojox/atom/widget/nls/hr/FeedEntryViewer", ({ + displayOptions: "[opcije prikaza]", + title: "Naslov", + authors: "Autori", + contributors: "Doprinositelji", + id: "ID", + close: "[zatvori]", + updated: "Ažurirano", + summary: "Sažetak", + content: "Sadržaj" +}) +); diff --git a/js/dojo/dojox/atom/widget/nls/hr/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/hr/FeedViewerEntry.js new file mode 100644 index 0000000..c380742 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/hr/FeedViewerEntry.js @@ -0,0 +1,6 @@ +//>>built +define( +"dojox/atom/widget/nls/hr/FeedViewerEntry", ({ + deleteButton: "[Izbriši]" +}) +); diff --git a/js/dojo/dojox/atom/widget/nls/hr/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/hr/PeopleEditor.js new file mode 100644 index 0000000..eccc9c4 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/hr/PeopleEditor.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/hr/PeopleEditor", ({ + add: "Dodaj", + addAuthor: "Dodaj autora", + addContributor: "Dodaj doprinositelja" +}) +); diff --git a/js/dojo/dojox/atom/widget/nls/hu/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/hu/FeedEntryEditor.js new file mode 100644 index 0000000..94fbabc --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/hu/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/hu/FeedEntryEditor", //begin v1.x content +({ + doNew: "[új]", + edit: "[szerkesztés]", + save: "[mentés]", + cancel: "[mégse]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/hu/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/hu/FeedEntryViewer.js new file mode 100644 index 0000000..6f6d918 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/hu/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/hu/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[megjelenítési beállítások]", + title: "Cím", + authors: "Szerzők", + contributors: "Közreműködők", + id: "Azonosító", + close: "[bezárás]", + updated: "Frissítve", + summary: "Összegzés", + content: "Tartalom" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/hu/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/hu/FeedViewerEntry.js new file mode 100644 index 0000000..7b2129a --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/hu/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/hu/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Törlés]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/hu/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/hu/PeopleEditor.js new file mode 100644 index 0000000..fc67a93 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/hu/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/hu/PeopleEditor", //begin v1.x content +({ + add: "Hozzáadás", + addAuthor: "Szerző hozzáadása", + addContributor: "Közreműködő hozzáadása" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/it/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/it/FeedEntryEditor.js new file mode 100644 index 0000000..c199d23 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/it/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/it/FeedEntryEditor", //begin v1.x content +({ + doNew: "[nuovo]", + edit: "[modifica]", + save: "[salva]", + cancel: "[annulla]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/it/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/it/FeedEntryViewer.js new file mode 100644 index 0000000..7484263 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/it/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/it/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[visualizza opzioni]", + title: "Titolo", + authors: "Autori", + contributors: "Collaboratori", + id: "ID", + close: "[chiudi]", + updated: "Aggiornato", + summary: "Riepilogo", + content: "Indice" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/it/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/it/FeedViewerEntry.js new file mode 100644 index 0000000..0a7d2fd --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/it/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/it/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Cancella]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/it/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/it/PeopleEditor.js new file mode 100644 index 0000000..ad12983 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/it/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/it/PeopleEditor", //begin v1.x content +({ + add: "Aggiungi", + addAuthor: "Aggiungi autore", + addContributor: "Aggiungi collaboratori" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ja/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/ja/FeedEntryEditor.js new file mode 100644 index 0000000..48372c7 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ja/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/ja/FeedEntryEditor", //begin v1.x content +({ + doNew: "[新規]", + edit: "[編集]", + save: "[保存]", + cancel: "[キャンセル]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ja/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/ja/FeedEntryViewer.js new file mode 100644 index 0000000..c167e4e --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ja/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/ja/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[表示オプション]", + title: "タイトル", + authors: "作成者", + contributors: "貢献者", + id: "ID", + close: "[閉じる]", + updated: "更新", + summary: "要約", + content: "内容" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ja/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/ja/FeedViewerEntry.js new file mode 100644 index 0000000..da28685 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ja/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/ja/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[削除]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ja/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/ja/PeopleEditor.js new file mode 100644 index 0000000..8a0ffae --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ja/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/ja/PeopleEditor", //begin v1.x content +({ + add: "追加", + addAuthor: "作成者の追加", + addContributor: "貢献者の追加" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/kk/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/kk/FeedEntryEditor.js new file mode 100644 index 0000000..5e73b8e --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/kk/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/kk/FeedEntryEditor", //begin v1.x content +({ + doNew: "[жаңа]", + edit: "[өңдеу]", + save: "[сақтау]", + cancel: "[болдырмау]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/kk/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/kk/FeedEntryViewer.js new file mode 100644 index 0000000..744156f --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/kk/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/kk/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[көрсету параметрлері]", + title: "Тақырып", + authors: "Авторлар", + contributors: "Таратушылар", + id: "ID коды", + close: "[жабу]", + updated: "Жаңартылған", + summary: "Жиынтық", + content: "Мазмұн" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/kk/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/kk/FeedViewerEntry.js new file mode 100644 index 0000000..04149c9 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/kk/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/kk/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Жою]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/kk/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/kk/PeopleEditor.js new file mode 100644 index 0000000..e0b9dbf --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/kk/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/kk/PeopleEditor", //begin v1.x content +({ + add: "Қосу", + addAuthor: "Авторды қосу", + addContributor: "Салымшыны қосу" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ko/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/ko/FeedEntryEditor.js new file mode 100644 index 0000000..cf4750e --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ko/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/ko/FeedEntryEditor", //begin v1.x content +({ + doNew: "[새로 작성]", + edit: "[편집]", + save: "[저장]", + cancel: "[취소]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ko/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/ko/FeedEntryViewer.js new file mode 100644 index 0000000..1e7bd20 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ko/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/ko/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[옵션 표시]", + title: "제목", + authors: "작성자", + contributors: "기고자", + id: "ID", + close: "[닫기]", + updated: "업데이트된 날짜", + summary: "요약", + content: "컨텐츠" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ko/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/ko/FeedViewerEntry.js new file mode 100644 index 0000000..66db7f4 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ko/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/ko/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[삭제]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ko/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/ko/PeopleEditor.js new file mode 100644 index 0000000..09d27a0 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ko/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/ko/PeopleEditor", //begin v1.x content +({ + add: "추가", + addAuthor: "작성자 추가", + addContributor: "제공자 추가" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/nb/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/nb/FeedEntryEditor.js new file mode 100644 index 0000000..5099ab7 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/nb/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/nb/FeedEntryEditor", //begin v1.x content +({ + doNew: "[ny(tt)]", + edit: "[rediger]", + save: "[lagre]", + cancel: "[avbryt]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/nb/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/nb/FeedEntryViewer.js new file mode 100644 index 0000000..5f87eb2 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/nb/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/nb/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[visningsalternativer]", + title: "Tittel", + authors: "Forfattere", + contributors: "Bidragsytere", + id: "ID", + close: "[lukk]", + updated: "Oppdatert", + summary: "Sammendrag", + content: "Innhold" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/nb/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/nb/FeedViewerEntry.js new file mode 100644 index 0000000..8a20301 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/nb/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/nb/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Slett]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/nb/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/nb/PeopleEditor.js new file mode 100644 index 0000000..3a34f83 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/nb/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/nb/PeopleEditor", //begin v1.x content +({ + add: "Legg til", + addAuthor: "Legg til forfatter", + addContributor: "Legg til bidragsyter" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/nl/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/nl/FeedEntryEditor.js new file mode 100644 index 0000000..417c2e4 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/nl/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/nl/FeedEntryEditor", //begin v1.x content +({ + doNew: "[nieuw]", + edit: "[bewerken]", + save: "[opslaan]", + cancel: "[annuleren]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/nl/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/nl/FeedEntryViewer.js new file mode 100644 index 0000000..03458c0 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/nl/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/nl/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[weergaveopties]", + title: "Titel", + authors: "Auteurs", + contributors: "Deelnemers", + id: "ID", + close: "[sluiten]", + updated: "Bijgewerkt", + summary: "Overzicht", + content: "Content" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/nl/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/nl/FeedViewerEntry.js new file mode 100644 index 0000000..48a7496 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/nl/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/nl/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Wissen]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/nl/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/nl/PeopleEditor.js new file mode 100644 index 0000000..f43be8a --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/nl/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/nl/PeopleEditor", //begin v1.x content +({ + add: "Toevoegen", + addAuthor: "Auteur toevoegen", + addContributor: "Deelnemer toevoegen" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/pl/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/pl/FeedEntryEditor.js new file mode 100644 index 0000000..62fedb5 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/pl/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/pl/FeedEntryEditor", //begin v1.x content +({ + doNew: "[nowy]", + edit: "[edytuj]", + save: "[zapisz]", + cancel: "[anuluj]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/pl/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/pl/FeedEntryViewer.js new file mode 100644 index 0000000..6bf59de --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/pl/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/pl/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[opcje wyświetlania]", + title: "Tytuł", + authors: "Autorzy", + contributors: "Kontrybutorzy", + id: "Identyfikator", + close: "[zamknij]", + updated: "Zaktualizowano", + summary: "Podsumowanie", + content: "Treść" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/pl/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/pl/FeedViewerEntry.js new file mode 100644 index 0000000..50f30f4 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/pl/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/pl/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Usuń]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/pl/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/pl/PeopleEditor.js new file mode 100644 index 0000000..529e986 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/pl/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/pl/PeopleEditor", //begin v1.x content +({ + add: "Dodaj", + addAuthor: "Dodaj autora", + addContributor: "Dodaj kontrybutora" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/pt-pt/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/pt-pt/FeedEntryEditor.js new file mode 100644 index 0000000..c90a9f3 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/pt-pt/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/pt-pt/FeedEntryEditor", //begin v1.x content +({ + doNew: "[novo]", + edit: "[editar]", + save: "[guardar]", + cancel: "[cancelar]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/pt-pt/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/pt-pt/FeedEntryViewer.js new file mode 100644 index 0000000..a3c3b6c --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/pt-pt/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/pt-pt/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[opções de visualização]", + title: "Título", + authors: "Autores", + contributors: "Contribuintes", + id: "ID", + close: "[fechar]", + updated: "Actualizado", + summary: "Resumo", + content: "Conteúdo" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/pt-pt/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/pt-pt/FeedViewerEntry.js new file mode 100644 index 0000000..659a872 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/pt-pt/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/pt-pt/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Eliminar]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/pt-pt/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/pt-pt/PeopleEditor.js new file mode 100644 index 0000000..7905270 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/pt-pt/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/pt-pt/PeopleEditor", //begin v1.x content +({ + add: "Adicionar", + addAuthor: "Adicionar autor", + addContributor: "Adicionar contribuinte" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/pt/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/pt/FeedEntryEditor.js new file mode 100644 index 0000000..34875e4 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/pt/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/pt/FeedEntryEditor", //begin v1.x content +({ + doNew: "[novo]", + edit: "[editar]", + save: "[salvar]", + cancel: "[cancelar]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/pt/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/pt/FeedEntryViewer.js new file mode 100644 index 0000000..79f9d7b --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/pt/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/pt/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[exibir opções]", + title: "Título", + authors: "Autores", + contributors: "Contribuidores", + id: "ID", + close: "[fechar]", + updated: "Atualizado", + summary: "Resumo", + content: "Conteúdo" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/pt/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/pt/FeedViewerEntry.js new file mode 100644 index 0000000..e53700f --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/pt/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/pt/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Excluir]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/pt/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/pt/PeopleEditor.js new file mode 100644 index 0000000..63fb1cd --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/pt/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/pt/PeopleEditor", //begin v1.x content +({ + add: "Adicionar", + addAuthor: "Adicionar Autor", + addContributor: "Adicionar Contribuidor" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ro/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/ro/FeedEntryEditor.js new file mode 100644 index 0000000..8d39e1e --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ro/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/ro/FeedEntryEditor", //begin v1.x content +({ + doNew: "[nou]", + edit: "[editare]", + save: "[salvare]", + cancel: "[anulare]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ro/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/ro/FeedEntryViewer.js new file mode 100644 index 0000000..68fad6d --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ro/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/ro/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[opţiuni afişare]", + title: "Titlu", + authors: "Autori", + contributors: "Contribuitori", + id: "ID", + close: "[închidere]", + updated: "Actualizat", + summary: "Sumar", + content: "Conţinut" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ro/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/ro/FeedViewerEntry.js new file mode 100644 index 0000000..8cd1be1 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ro/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/ro/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Ştergere]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ro/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/ro/PeopleEditor.js new file mode 100644 index 0000000..7a8a7fa --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ro/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/ro/PeopleEditor", //begin v1.x content +({ + add: "Adăugare", + addAuthor: "Adăugare autor", + addContributor: "Adăugare contribuitor" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ru/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/ru/FeedEntryEditor.js new file mode 100644 index 0000000..1fe3976 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ru/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/ru/FeedEntryEditor", //begin v1.x content +({ + doNew: "[создать]", + edit: "[изменить]", + save: "[сохранить]", + cancel: "[отмена]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ru/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/ru/FeedEntryViewer.js new file mode 100644 index 0000000..f5a21ff --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ru/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/ru/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[показать опции]", + title: "Название", + authors: "Авторы", + contributors: "Участники", + id: "ИД", + close: "[закрыть]", + updated: "Обновлено", + summary: "Сводка", + content: "Информационное наполнение" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ru/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/ru/FeedViewerEntry.js new file mode 100644 index 0000000..7868f3d --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ru/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/ru/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Удалить]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/ru/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/ru/PeopleEditor.js new file mode 100644 index 0000000..8b7c323 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/ru/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/ru/PeopleEditor", //begin v1.x content +({ + add: "Добавить", + addAuthor: "Добавить автора", + addContributor: "Добавить участника" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/sk/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/sk/FeedEntryEditor.js new file mode 100644 index 0000000..5556a8c --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/sk/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/sk/FeedEntryEditor", //begin v1.x content +({ + doNew: "[nový]", + edit: "[upraviť]", + save: "[uložiť]", + cancel: "[zrušiť]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/sk/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/sk/FeedEntryViewer.js new file mode 100644 index 0000000..b4c8eb7 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/sk/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/sk/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[zobraziť voľby]", + title: "Nadpis", + authors: "Autori", + contributors: "Prispievatelia", + id: "ID", + close: "[zatvoriť]", + updated: "Aktualizovaný", + summary: "Súhrn", + content: "Obsah" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/sk/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/sk/FeedViewerEntry.js new file mode 100644 index 0000000..0d36ab4 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/sk/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/sk/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Vymazať]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/sk/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/sk/PeopleEditor.js new file mode 100644 index 0000000..0882f3c --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/sk/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/sk/PeopleEditor", //begin v1.x content +({ + add: "Pridať", + addAuthor: "Pridať autora", + addContributor: "Pridať prispievateľa" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/sl/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/sl/FeedEntryEditor.js new file mode 100644 index 0000000..a3a67e8 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/sl/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/sl/FeedEntryEditor", //begin v1.x content +({ + doNew: "[novo]", + edit: "[urejanje]", + save: "[shrani]", + cancel: "[prekliči]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/sl/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/sl/FeedEntryViewer.js new file mode 100644 index 0000000..e248cfc --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/sl/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/sl/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[možnosti prikaza]", + title: "Naslov", + authors: "Avtorji", + contributors: "Kontributorji", + id: "ID", + close: "[zapri]", + updated: "Posodobljeno", + summary: "Povzetek", + content: "Vsebina" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/sl/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/sl/FeedViewerEntry.js new file mode 100644 index 0000000..af6f59a --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/sl/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/sl/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Izbriši]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/sl/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/sl/PeopleEditor.js new file mode 100644 index 0000000..9ae9138 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/sl/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/sl/PeopleEditor", //begin v1.x content +({ + add: "Dodaj", + addAuthor: "Dodaj avtorja", + addContributor: "Dodaj kontributorja" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/sv/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/sv/FeedEntryEditor.js new file mode 100644 index 0000000..a454e29 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/sv/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/sv/FeedEntryEditor", //begin v1.x content +({ + doNew: "[Nytt]", + edit: "[Redigera]", + save: "[Spara]", + cancel: "[Avbryt]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/sv/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/sv/FeedEntryViewer.js new file mode 100644 index 0000000..c90fc69 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/sv/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/sv/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[Visningsalternativ]", + title: "Rubrik", + authors: "Författare", + contributors: "Medverkande", + id: "ID", + close: "[Stäng]", + updated: "Uppdaterat", + summary: "Sammanfattning", + content: "Innehåll" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/sv/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/sv/FeedViewerEntry.js new file mode 100644 index 0000000..ad38eaf --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/sv/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/sv/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Ta bort]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/sv/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/sv/PeopleEditor.js new file mode 100644 index 0000000..7921022 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/sv/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/sv/PeopleEditor", //begin v1.x content +({ + add: "Lägg till", + addAuthor: "Lägg till författare", + addContributor: "Lägg till medverkande" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/th/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/th/FeedEntryEditor.js new file mode 100644 index 0000000..e75ff42 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/th/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/th/FeedEntryEditor", //begin v1.x content +({ + doNew: "[สร้าง]", + edit: "[แก้ไข]", + save: "[บันทึก]", + cancel: "[ยกเลิก]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/th/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/th/FeedEntryViewer.js new file mode 100644 index 0000000..490d06c --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/th/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/th/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[อ็อพชันการแสดงผล]", + title: "ชื่อเรื่อง", + authors: "ผู้เขียน", + contributors: "ผู้อนุเคราะห์", + id: "ID", + close: "[ปิด]", + updated: "อัพเดต", + summary: "สรุป", + content: "เนื้อหา" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/th/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/th/FeedViewerEntry.js new file mode 100644 index 0000000..9227f2d --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/th/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/th/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[ลบ]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/th/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/th/PeopleEditor.js new file mode 100644 index 0000000..700db2b --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/th/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/th/PeopleEditor", //begin v1.x content +({ + add: "เพิ่ม", + addAuthor: "เพิ่มผู้เขียน", + addContributor: "เพิ่มผู้อนุเคราะห์" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/tr/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/tr/FeedEntryEditor.js new file mode 100644 index 0000000..82a7193 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/tr/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/tr/FeedEntryEditor", //begin v1.x content +({ + doNew: "[yeni]", + edit: "[düzenle]", + save: "[kaydet]", + cancel: "[iptal]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/tr/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/tr/FeedEntryViewer.js new file mode 100644 index 0000000..12b5954 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/tr/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/tr/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[görüntüleme seçenekleri]", + title: "Başlık", + authors: "Yazarlar", + contributors: "Katkıda Bulunanlar", + id: "Kimlik", + close: "[kapat]", + updated: "Güncelleştirildi", + summary: "Özet", + content: "İçerik" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/tr/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/tr/FeedViewerEntry.js new file mode 100644 index 0000000..d4e5c82 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/tr/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/tr/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[Sil]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/tr/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/tr/PeopleEditor.js new file mode 100644 index 0000000..aabeee4 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/tr/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/tr/PeopleEditor", //begin v1.x content +({ + add: "Ekle", + addAuthor: "Yazar Ekle", + addContributor: "Katkıda Bulunan Ekle" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/zh-tw/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/zh-tw/FeedEntryEditor.js new file mode 100644 index 0000000..af5bca5 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/zh-tw/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/zh-tw/FeedEntryEditor", //begin v1.x content +({ + doNew: "[新建]", + edit: "[編輯]", + save: "[儲存]", + cancel: "[取消]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/zh-tw/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/zh-tw/FeedEntryViewer.js new file mode 100644 index 0000000..fa1c0a0 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/zh-tw/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/zh-tw/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[顯示選項]", + title: "標題", + authors: "作者", + contributors: "貢獻者", + id: "ID", + close: "[關閉]", + updated: "已更新", + summary: "摘要", + content: "內容" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/zh-tw/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/zh-tw/FeedViewerEntry.js new file mode 100644 index 0000000..edf8719 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/zh-tw/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/zh-tw/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[刪除]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/zh-tw/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/zh-tw/PeopleEditor.js new file mode 100644 index 0000000..4bfef2a --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/zh-tw/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/zh-tw/PeopleEditor", //begin v1.x content +({ + add: "新增", + addAuthor: "新增作者", + addContributor: "新增貢獻者" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/zh/FeedEntryEditor.js b/js/dojo/dojox/atom/widget/nls/zh/FeedEntryEditor.js new file mode 100644 index 0000000..20fee79 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/zh/FeedEntryEditor.js @@ -0,0 +1,11 @@ +//>>built +define( +"dojox/atom/widget/nls/zh/FeedEntryEditor", //begin v1.x content +({ + doNew: "[新建]", + edit: "[编辑]", + save: "[保存]", + cancel: "[取消]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/zh/FeedEntryViewer.js b/js/dojo/dojox/atom/widget/nls/zh/FeedEntryViewer.js new file mode 100644 index 0000000..d384451 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/zh/FeedEntryViewer.js @@ -0,0 +1,16 @@ +//>>built +define( +"dojox/atom/widget/nls/zh/FeedEntryViewer", //begin v1.x content +({ + displayOptions: "[显示选项]", + title: "标题", + authors: "作者", + contributors: "内容添加者", + id: "标识", + close: "[关闭]", + updated: "更新时间", + summary: "摘要", + content: "内容" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/zh/FeedViewerEntry.js b/js/dojo/dojox/atom/widget/nls/zh/FeedViewerEntry.js new file mode 100644 index 0000000..b8db2a6 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/zh/FeedViewerEntry.js @@ -0,0 +1,8 @@ +//>>built +define( +"dojox/atom/widget/nls/zh/FeedViewerEntry", //begin v1.x content +({ + deleteButton: "[删除]" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/nls/zh/PeopleEditor.js b/js/dojo/dojox/atom/widget/nls/zh/PeopleEditor.js new file mode 100644 index 0000000..56eab89 --- /dev/null +++ b/js/dojo/dojox/atom/widget/nls/zh/PeopleEditor.js @@ -0,0 +1,10 @@ +//>>built +define( +"dojox/atom/widget/nls/zh/PeopleEditor", //begin v1.x content +({ + add: "添加", + addAuthor: "添加作者", + addContributor: "添加内容添加者" +}) +//end v1.x content +); diff --git a/js/dojo/dojox/atom/widget/templates/EntryHeader.html b/js/dojo/dojox/atom/widget/templates/EntryHeader.html new file mode 100644 index 0000000..67d1e81 --- /dev/null +++ b/js/dojo/dojox/atom/widget/templates/EntryHeader.html @@ -0,0 +1 @@ +<span dojoAttachPoint="entryHeaderNode" class="entryHeaderNode"></span> diff --git a/js/dojo/dojox/atom/widget/templates/FeedEntryEditor.html b/js/dojo/dojox/atom/widget/templates/FeedEntryEditor.html new file mode 100644 index 0000000..6a7f445 --- /dev/null +++ b/js/dojo/dojox/atom/widget/templates/FeedEntryEditor.html @@ -0,0 +1,195 @@ +<div class="feedEntryViewer"> + <table border="0" width="100%" class="feedEntryViewerMenuTable" dojoAttachPoint="feedEntryViewerMenu" style="display: none;"> + <tr width="100%" dojoAttachPoint="entryCheckBoxDisplayOptions"> + <td align="left" dojoAttachPoint="entryNewButton"> + <span class="feedEntryViewerMenu" dojoAttachPoint="doNew" dojoAttachEvent="onclick:_toggleNew"></span> + </td> + <td align="left" dojoAttachPoint="entryEditButton" style="display: none;"> + <span class="feedEntryViewerMenu" dojoAttachPoint="edit" dojoAttachEvent="onclick:_toggleEdit"></span> + </td> + <td align="left" dojoAttachPoint="entrySaveCancelButtons" style="display: none;"> + <span class="feedEntryViewerMenu" dojoAttachPoint="save" dojoAttachEvent="onclick:saveEdits"></span> + <span class="feedEntryViewerMenu" dojoAttachPoint="cancel" dojoAttachEvent="onclick:cancelEdits"></span> + </td> + <td align="right"> + <span class="feedEntryViewerMenu" dojoAttachPoint="displayOptions" dojoAttachEvent="onclick:_toggleOptions"></span> + </td> + </tr> + <tr class="feedEntryViewerDisplayCheckbox" dojoAttachPoint="entryCheckBoxRow" width="100%" style="display: none;"> + <td dojoAttachPoint="feedEntryCelltitle"> + <input type="checkbox" name="title" value="Title" dojoAttachPoint="feedEntryCheckBoxTitle" dojoAttachEvent="onclick:_toggleCheckbox"/> + <label for="title" dojoAttachPoint="feedEntryCheckBoxLabelTitle"></label> + </td> + <td dojoAttachPoint="feedEntryCellauthors"> + <input type="checkbox" name="authors" value="Authors" dojoAttachPoint="feedEntryCheckBoxAuthors" dojoAttachEvent="onclick:_toggleCheckbox"/> + <label for="title" dojoAttachPoint="feedEntryCheckBoxLabelAuthors"></label> + </td> + <td dojoAttachPoint="feedEntryCellcontributors"> + <input type="checkbox" name="contributors" value="Contributors" dojoAttachPoint="feedEntryCheckBoxContributors" dojoAttachEvent="onclick:_toggleCheckbox"/> + <label for="title" dojoAttachPoint="feedEntryCheckBoxLabelContributors"></label> + </td> + <td dojoAttachPoint="feedEntryCellid"> + <input type="checkbox" name="id" value="Id" dojoAttachPoint="feedEntryCheckBoxId" dojoAttachEvent="onclick:_toggleCheckbox"/> + <label for="title" dojoAttachPoint="feedEntryCheckBoxLabelId"></label> + </td> + <td rowspan="2" align="right"> + <span class="feedEntryViewerMenu" dojoAttachPoint="close" dojoAttachEvent="onclick:_toggleOptions"></span> + </td> + </tr> + <tr class="feedEntryViewerDisplayCheckbox" dojoAttachPoint="entryCheckBoxRow2" width="100%" style="display: none;"> + <td dojoAttachPoint="feedEntryCellupdated"> + <input type="checkbox" name="updated" value="Updated" dojoAttachPoint="feedEntryCheckBoxUpdated" dojoAttachEvent="onclick:_toggleCheckbox"/> + <label for="title" dojoAttachPoint="feedEntryCheckBoxLabelUpdated"></label> + </td> + <td dojoAttachPoint="feedEntryCellsummary"> + <input type="checkbox" name="summary" value="Summary" dojoAttachPoint="feedEntryCheckBoxSummary" dojoAttachEvent="onclick:_toggleCheckbox"/> + <label for="title" dojoAttachPoint="feedEntryCheckBoxLabelSummary"></label> + </td> + <td dojoAttachPoint="feedEntryCellcontent"> + <input type="checkbox" name="content" value="Content" dojoAttachPoint="feedEntryCheckBoxContent" dojoAttachEvent="onclick:_toggleCheckbox"/> + <label for="title" dojoAttachPoint="feedEntryCheckBoxLabelContent"></label> + </td> + </tr> + </table> + + <table class="feedEntryViewerContainer" border="0" width="100%"> + <tr class="feedEntryViewerTitle" dojoAttachPoint="entryTitleRow" style="display: none;"> + <td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr class="graphic-tab-lgray"> + <td class="lp2"> + <span class="lp" dojoAttachPoint="entryTitleHeader"></span> + </td> + </tr> + <tr> + <td> + <select dojoAttachPoint="entryTitleSelect" dojoAttachEvent="onchange:_switchEditor" style="display: none"> + <option value="text">Text</option> + <option value="html">HTML</option> + <option value="xhtml">XHTML</option> + </select> + </td> + </tr> + <tr> + <td colspan="2" dojoAttachPoint="entryTitleNode"> + </td> + </tr> + </table> + </td> + </tr> + + <tr class="feedEntryViewerAuthor" dojoAttachPoint="entryAuthorRow" style="display: none;"> + <td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr class="graphic-tab-lgray"> + <td class="lp2"> + <span class="lp" dojoAttachPoint="entryAuthorHeader"></span> + </td> + </tr> + <tr> + <td dojoAttachPoint="entryAuthorNode"> + </td> + </tr> + </table> + </td> + </tr> + + <tr class="feedEntryViewerContributor" dojoAttachPoint="entryContributorRow" style="display: none;"> + <td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr class="graphic-tab-lgray"> + <td class="lp2"> + <span class="lp" dojoAttachPoint="entryContributorHeader"></span> + </td> + </tr> + <tr> + <td dojoAttachPoint="entryContributorNode" class="feedEntryViewerContributorNames"> + </td> + </tr> + </table> + </td> + </tr> + + <tr class="feedEntryViewerId" dojoAttachPoint="entryIdRow" style="display: none;"> + <td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr class="graphic-tab-lgray"> + <td class="lp2"> + <span class="lp" dojoAttachPoint="entryIdHeader"></span> + </td> + </tr> + <tr> + <td dojoAttachPoint="entryIdNode" class="feedEntryViewerIdText"> + </td> + </tr> + </table> + </td> + </tr> + + <tr class="feedEntryViewerUpdated" dojoAttachPoint="entryUpdatedRow" style="display: none;"> + <td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr class="graphic-tab-lgray"> + <td class="lp2"> + <span class="lp" dojoAttachPoint="entryUpdatedHeader"></span> + </td> + </tr> + <tr> + <td dojoAttachPoint="entryUpdatedNode" class="feedEntryViewerUpdatedText"> + </td> + </tr> + </table> + </td> + </tr> + + <tr class="feedEntryViewerSummary" dojoAttachPoint="entrySummaryRow" style="display: none;"> + <td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr class="graphic-tab-lgray"> + <td class="lp2" colspan="2"> + <span class="lp" dojoAttachPoint="entrySummaryHeader"></span> + </td> + </tr> + <tr> + <td> + <select dojoAttachPoint="entrySummarySelect" dojoAttachEvent="onchange:_switchEditor" style="display: none"> + <option value="text">Text</option> + <option value="html">HTML</option> + <option value="xhtml">XHTML</option> + </select> + </td> + </tr> + <tr> + <td dojoAttachPoint="entrySummaryNode"> + </td> + </tr> + </table> + </td> + </tr> + + <tr class="feedEntryViewerContent" dojoAttachPoint="entryContentRow" style="display: none;"> + <td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr class="graphic-tab-lgray"> + <td class="lp2"> + <span class="lp" dojoAttachPoint="entryContentHeader"></span> + </td> + </tr> + <tr> + <td> + <select dojoAttachPoint="entryContentSelect" dojoAttachEvent="onchange:_switchEditor" style="display: none"> + <option value="text">Text</option> + <option value="html">HTML</option> + <option value="xhtml">XHTML</option> + </select> + </td> + </tr> + <tr> + <td dojoAttachPoint="entryContentNode"> + </td> + </tr> + </table> + </td> + </tr> + </table> +</div> diff --git a/js/dojo/dojox/atom/widget/templates/FeedEntryViewer.html b/js/dojo/dojox/atom/widget/templates/FeedEntryViewer.html new file mode 100644 index 0000000..408c071 --- /dev/null +++ b/js/dojo/dojox/atom/widget/templates/FeedEntryViewer.html @@ -0,0 +1,158 @@ +<div class="feedEntryViewer"> + <table border="0" width="100%" class="feedEntryViewerMenuTable" dojoAttachPoint="feedEntryViewerMenu" style="display: none;"> + <tr width="100%" dojoAttachPoint="entryCheckBoxDisplayOptions"> + <td align="right"> + <span class="feedEntryViewerMenu" dojoAttachPoint="displayOptions" dojoAttachEvent="onclick:_toggleOptions"></span> + </td> + </tr> + <tr class="feedEntryViewerDisplayCheckbox" dojoAttachPoint="entryCheckBoxRow" width="100%" style="display: none;"> + <td dojoAttachPoint="feedEntryCelltitle"> + <input type="checkbox" name="title" value="Title" dojoAttachPoint="feedEntryCheckBoxTitle" dojoAttachEvent="onclick:_toggleCheckbox"/> + <label for="title" dojoAttachPoint="feedEntryCheckBoxLabelTitle"></label> + </td> + <td dojoAttachPoint="feedEntryCellauthors"> + <input type="checkbox" name="authors" value="Authors" dojoAttachPoint="feedEntryCheckBoxAuthors" dojoAttachEvent="onclick:_toggleCheckbox"/> + <label for="title" dojoAttachPoint="feedEntryCheckBoxLabelAuthors"></label> + </td> + <td dojoAttachPoint="feedEntryCellcontributors"> + <input type="checkbox" name="contributors" value="Contributors" dojoAttachPoint="feedEntryCheckBoxContributors" dojoAttachEvent="onclick:_toggleCheckbox"/> + <label for="title" dojoAttachPoint="feedEntryCheckBoxLabelContributors"></label> + </td> + <td dojoAttachPoint="feedEntryCellid"> + <input type="checkbox" name="id" value="Id" dojoAttachPoint="feedEntryCheckBoxId" dojoAttachEvent="onclick:_toggleCheckbox"/> + <label for="title" dojoAttachPoint="feedEntryCheckBoxLabelId"></label> + </td> + <td rowspan="2" align="right"> + <span class="feedEntryViewerMenu" dojoAttachPoint="close" dojoAttachEvent="onclick:_toggleOptions"></span> + </td> + </tr> + <tr class="feedEntryViewerDisplayCheckbox" dojoAttachPoint="entryCheckBoxRow2" width="100%" style="display: none;"> + <td dojoAttachPoint="feedEntryCellupdated"> + <input type="checkbox" name="updated" value="Updated" dojoAttachPoint="feedEntryCheckBoxUpdated" dojoAttachEvent="onclick:_toggleCheckbox"/> + <label for="title" dojoAttachPoint="feedEntryCheckBoxLabelUpdated"></label> + </td> + <td dojoAttachPoint="feedEntryCellsummary"> + <input type="checkbox" name="summary" value="Summary" dojoAttachPoint="feedEntryCheckBoxSummary" dojoAttachEvent="onclick:_toggleCheckbox"/> + <label for="title" dojoAttachPoint="feedEntryCheckBoxLabelSummary"></label> + </td> + <td dojoAttachPoint="feedEntryCellcontent"> + <input type="checkbox" name="content" value="Content" dojoAttachPoint="feedEntryCheckBoxContent" dojoAttachEvent="onclick:_toggleCheckbox"/> + <label for="title" dojoAttachPoint="feedEntryCheckBoxLabelContent"></label> + </td> + </tr> + </table> + + <table class="feedEntryViewerContainer" border="0" width="100%"> + <tr class="feedEntryViewerTitle" dojoAttachPoint="entryTitleRow" style="display: none;"> + <td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr class="graphic-tab-lgray"> + <td class="lp2"> + <span class="lp" dojoAttachPoint="entryTitleHeader"></span> + </td> + </tr> + <tr> + <td dojoAttachPoint="entryTitleNode"> + </td> + </tr> + </table> + </td> + </tr> + + <tr class="feedEntryViewerAuthor" dojoAttachPoint="entryAuthorRow" style="display: none;"> + <td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr class="graphic-tab-lgray"> + <td class="lp2"> + <span class="lp" dojoAttachPoint="entryAuthorHeader"></span> + </td> + </tr> + <tr> + <td dojoAttachPoint="entryAuthorNode"> + </td> + </tr> + </table> + </td> + </tr> + + <tr class="feedEntryViewerContributor" dojoAttachPoint="entryContributorRow" style="display: none;"> + <td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr class="graphic-tab-lgray"> + <td class="lp2"> + <span class="lp" dojoAttachPoint="entryContributorHeader"></span> + </td> + </tr> + <tr> + <td dojoAttachPoint="entryContributorNode" class="feedEntryViewerContributorNames"> + </td> + </tr> + </table> + </td> + </tr> + + <tr class="feedEntryViewerId" dojoAttachPoint="entryIdRow" style="display: none;"> + <td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr class="graphic-tab-lgray"> + <td class="lp2"> + <span class="lp" dojoAttachPoint="entryIdHeader"></span> + </td> + </tr> + <tr> + <td dojoAttachPoint="entryIdNode" class="feedEntryViewerIdText"> + </td> + </tr> + </table> + </td> + </tr> + + <tr class="feedEntryViewerUpdated" dojoAttachPoint="entryUpdatedRow" style="display: none;"> + <td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr class="graphic-tab-lgray"> + <td class="lp2"> + <span class="lp" dojoAttachPoint="entryUpdatedHeader"></span> + </td> + </tr> + <tr> + <td dojoAttachPoint="entryUpdatedNode" class="feedEntryViewerUpdatedText"> + </td> + </tr> + </table> + </td> + </tr> + + <tr class="feedEntryViewerSummary" dojoAttachPoint="entrySummaryRow" style="display: none;"> + <td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr class="graphic-tab-lgray"> + <td class="lp2"> + <span class="lp" dojoAttachPoint="entrySummaryHeader"></span> + </td> + </tr> + <tr> + <td dojoAttachPoint="entrySummaryNode"> + </td> + </tr> + </table> + </td> + </tr> + + <tr class="feedEntryViewerContent" dojoAttachPoint="entryContentRow" style="display: none;"> + <td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr class="graphic-tab-lgray"> + <td class="lp2"> + <span class="lp" dojoAttachPoint="entryContentHeader"></span> + </td> + </tr> + <tr> + <td dojoAttachPoint="entryContentNode"> + </td> + </tr> + </table> + </td> + </tr> + </table> +</div> diff --git a/js/dojo/dojox/atom/widget/templates/FeedViewer.html b/js/dojo/dojox/atom/widget/templates/FeedViewer.html new file mode 100644 index 0000000..f3d2108 --- /dev/null +++ b/js/dojo/dojox/atom/widget/templates/FeedViewer.html @@ -0,0 +1,6 @@ +<div class="feedViewerContainer" dojoAttachPoint="feedViewerContainerNode"> + <table cellspacing="0" cellpadding="0" class="feedViewerTable"> + <tbody dojoAttachPoint="feedViewerTableBody" class="feedViewerTableBody"> + </tbody> + </table> +</div> diff --git a/js/dojo/dojox/atom/widget/templates/FeedViewerEntry.html b/js/dojo/dojox/atom/widget/templates/FeedViewerEntry.html new file mode 100644 index 0000000..201f884 --- /dev/null +++ b/js/dojo/dojox/atom/widget/templates/FeedViewerEntry.html @@ -0,0 +1,15 @@ +<tr class="feedViewerEntry" dojoAttachPoint="entryNode" dojoAttachEvent="onclick:onClick"> + <td class="feedViewerEntryUpdated" dojoAttachPoint="timeNode"> + </td> + <td> + <table border="0" width="100%" dojoAttachPoint="titleRow"> + <tr padding="0" border="0"> + <td class="feedViewerEntryTitle" dojoAttachPoint="titleNode"> + </td> + <td class="feedViewerEntryDelete" align="right"> + <span dojoAttachPoint="deleteButton" dojoAttachEvent="onclick:deleteEntry" class="feedViewerDeleteButton" style="display:none;">[delete]</span> + </td> + <tr> + </table> + </td> +</tr>
\ No newline at end of file diff --git a/js/dojo/dojox/atom/widget/templates/FeedViewerGrouping.html b/js/dojo/dojox/atom/widget/templates/FeedViewerGrouping.html new file mode 100644 index 0000000..467e428 --- /dev/null +++ b/js/dojo/dojox/atom/widget/templates/FeedViewerGrouping.html @@ -0,0 +1,4 @@ +<tr dojoAttachPoint="groupingNode" class="feedViewerGrouping"> + <td colspan="2" dojoAttachPoint="titleNode" class="feedViewerGroupingTitle"> + </td> +</tr>
\ No newline at end of file diff --git a/js/dojo/dojox/atom/widget/templates/PeopleEditor.html b/js/dojo/dojox/atom/widget/templates/PeopleEditor.html new file mode 100644 index 0000000..a034c76 --- /dev/null +++ b/js/dojo/dojox/atom/widget/templates/PeopleEditor.html @@ -0,0 +1,6 @@ +<div class="peopleEditor"> + <table style="width: 100%"> + <tbody dojoAttachPoint="peopleEditorEditors"></tbody> + </table> + <span class="peopleEditorButton" dojoAttachPoint="peopleEditorButton" dojoAttachEvent="onclick:_add"></span> +</div>
\ No newline at end of file diff --git a/js/dojo/dojox/atom/widget/templates/css/EntryHeader.css b/js/dojo/dojox/atom/widget/templates/css/EntryHeader.css new file mode 100644 index 0000000..6403b61 --- /dev/null +++ b/js/dojo/dojox/atom/widget/templates/css/EntryHeader.css @@ -0,0 +1,35 @@ + +.containerNode { + visibility : visible; +} +.graphic-tab-lgray { + margin-bottom: 10px; +} +/* + background: #d9d9d9; + border-bottom: #d9d9d9 solid 7px; +}*/ + +/* headers for listview */ +.newgraphic-tab-lgray { + border-bottom: #d9d9d9 solid 7px; +} +td.lp { + padding: 0px 13px 0px 10px; + font-weight: bold; + background: #d9d9d9; + border-bottom: #d9d9d9 solid 7px; +} + +td.lp2 { + background: #FFFFFF; + border-bottom: #d9d9d9 solid 7px; +} + +span.lp { + padding: 0px 13px 0px 10px; + font-weight: bold; + background: #d9d9d9; + border-bottom: #d9d9d9 solid 7px; + width: auto; +}
\ No newline at end of file diff --git a/js/dojo/dojox/atom/widget/templates/css/HtmlFeedEntryEditor.css b/js/dojo/dojox/atom/widget/templates/css/HtmlFeedEntryEditor.css new file mode 100644 index 0000000..a6fa3c3 --- /dev/null +++ b/js/dojo/dojox/atom/widget/templates/css/HtmlFeedEntryEditor.css @@ -0,0 +1,98 @@ +.feedEntryEditor { + color:#000000; + background: #FFFFFF; +} + +.feedEntryEditorMenuTable { + background: #C0C0C0; + border:2px solid; + border-top-color: lightgrey; + border-left-color: lightgrey; + border-right-color: darkgray; + border-bottom-color: darkgray; +} + +.feedEntryEditorMenu { + cursor: pointer; + color:#0000FF; + text-align: left; + font-size: small; +} + +.feedEntryEditorDisplayCheckbox { + font-size: small; + text-align: left; +} + +.feedEntryEditorMenu:hover { + text-decoration: underline; +} + +.feedEntryEditorTitle { + color:#000000; + background: #FFFFFF; + text-align: left; + #padding-left: 10px; + font-size: 125%; + font-weight: bold; +} + +.feedEntryEditorAuthor { + color:#000000; + background: #FFFFFF; +} + +.feedEntryEditorAuthorNames { + color:#000000; + background: #FFFFFF; + text-align: left; + #padding-left: 10px; + font-size: 110%; + font-style: italic; + font-weight: normal; +} + +.feedEntryEditorSummary { + color:#000000; + background: #FFFFFF; +} + +.feedEntryEditorUpdated { + color:#000000; + background: #FFFFFF; +} + +.feedEntryEditorUpdatedText { + color:#000000; + background: #FFFFFF; + font-size: 110%; + font-style: italic; + font-weight: normal; +} + +.feedEntryEditorId { + color:#000000; + background: #FFFFFF; +} + +.feedEntryEditorIdText { + color:#000000; + background: #FFFFFF; + font-style: italic; + font-size: 110%; + font-weight: normal; +} + +.feedEntryEditorContent { + color:#000000; + background: #FFFFFF; +} + +.feedEntryEditorContributorNames { + color:#000000; + text-align: left; + #padding-left: 10px; + font-size: 125%; + font-style: italic; + font-weight: normal; +} diff --git a/js/dojo/dojox/atom/widget/templates/css/HtmlFeedEntryViewer.css b/js/dojo/dojox/atom/widget/templates/css/HtmlFeedEntryViewer.css new file mode 100644 index 0000000..36400c9 --- /dev/null +++ b/js/dojo/dojox/atom/widget/templates/css/HtmlFeedEntryViewer.css @@ -0,0 +1,107 @@ +.feedEntryViewer { + color:#000000; + background: #FFFFFF; +/* overflow: auto;*/ +} + +.feedEntryViewerMenuTable { + background: #C0C0C0; + border:2px solid; + border-top-color: lightgrey; + border-left-color: lightgrey; + border-right-color: darkgray; + border-bottom-color: darkgray; + margin: 0; +} + +.feedEntryViewerMenu, .peopleEditorButton { + cursor: pointer; + color:#0000FF; + text-align: left; + font-size: small; +} + +.feedEntryViewerDisplayCheckbox { + font-size: small; + text-align: left; +} + +.feedEntryViewerMenu:hover, .peopleEditorButton:hover { + text-decoration: underline; +} + +.feedEntryViewerContainer, .feedEntryViewerContainer table { + border-width: 0; + margin: 0; +} + +.feedEntryViewerTitle { + color:#000000; + background: #FFFFFF; + text-align: left; + /*padding-left: 10px;*/ + font-size: 125%; + font-weight: bold; +} + +.feedEntryViewerAuthor { + color:#000000; + background: #FFFFFF; +} + +.feedEntryViewerAuthorNames { + color:#000000; + background: #FFFFFF; + text-align: left; + /*padding-left: 10px;*/ + font-size: 110%; + font-style: italic; + font-weight: normal; +} + +.feedEntryViewerSummary { + color:#000000; + background: #FFFFFF; +} + +.feedEntryViewerUpdated { + color:#000000; + background: #FFFFFF; +} + +.feedEntryViewerUpdatedText { + color:#000000; + background: #FFFFFF; + font-size: 110%; + font-style: italic; + font-weight: normal; +} + +.feedEntryViewerId { + color:#000000; + background: #FFFFFF; +} + +.feedEntryViewerIdText { + color:#000000; + background: #FFFFFF; + font-style: italic; + font-size: 110%; + font-weight: normal; +} + +.feedEntryViewerContent { + color:#000000; + background: #FFFFFF; +} + +.feedEntryViewerContributorNames { + color:#000000; + text-align: left; + /*padding-left: 10px;*/ + font-size: 125%; + font-weight: normal; +} + +.feedEntryViewer table { +}
\ No newline at end of file diff --git a/js/dojo/dojox/atom/widget/templates/css/HtmlFeedViewer.css b/js/dojo/dojox/atom/widget/templates/css/HtmlFeedViewer.css new file mode 100644 index 0000000..395df3d --- /dev/null +++ b/js/dojo/dojox/atom/widget/templates/css/HtmlFeedViewer.css @@ -0,0 +1,16 @@ +.feedViewerTable { + font-size: small; + width:100%; + cursor:default; + padding:2px; +} + +.feedViewerTable, .feedViewerTable table { + border-width: 0; + margin: 0; +} + +.feedViewerTableBody { + overflow-x: auto; + overflow-y: auto; +} diff --git a/js/dojo/dojox/atom/widget/templates/css/HtmlFeedViewerEntry.css b/js/dojo/dojox/atom/widget/templates/css/HtmlFeedViewerEntry.css new file mode 100644 index 0000000..49a7f6c --- /dev/null +++ b/js/dojo/dojox/atom/widget/templates/css/HtmlFeedViewerEntry.css @@ -0,0 +1,70 @@ +.feedViewerEntry { + background: #F0F0F0; + padding: 2px; + overflow-x: auto; + overflow-y: auto; + cursor: pointer; +} + +.feedViewerEntry:hover { + background: #a6c2e7; + padding: 2px; +} + +.feedViewerEntrySelected { + color: #000000; + background: #C0C0C0; + text-align: left; + vertical-align: top; + padding-bottom: 2px; + padding: 2px; +} + +.feedViewerEntrySelected:hover { + background: #a6c2e7; + padding: 2px; +} + + +.feedViewerEntryUpdated { + text-align: left; + vertical-align: top; + color: #909090; + padding-bottom: 2px; + padding: 2px; +} + +.feedViewerEntryUpdatedSelected { + text-align: left; + vertical-align: top; + color: #000000; + padding-bottom: 2px; + padding: 2px; +} + + +.feedViewerEntryTitle { + color:#000000; + text-align: left; + text-decoration:none; + padding-left: 4px; + padding-bottom: 2px; +} +.feedViewerEntryTitle:hover { + color:#000000; + text-align: left; + text-decoration:underline; + padding-left: 4px; + padding-bottom: 2px; +} + +.feedViewerDeleteButton { + cursor: pointer; + color:#0000FF; + text-align: left; + font-size: small; +} + +.feedViewerDeleteButton:hover { + text-decoration: underline; +} diff --git a/js/dojo/dojox/atom/widget/templates/css/HtmlFeedViewerGrouping.css b/js/dojo/dojox/atom/widget/templates/css/HtmlFeedViewerGrouping.css new file mode 100644 index 0000000..326781e --- /dev/null +++ b/js/dojo/dojox/atom/widget/templates/css/HtmlFeedViewerGrouping.css @@ -0,0 +1,8 @@ +.feedViewerGrouping { +} +.feedViewerGroupingTitle { + font-weight: bold; + color:#606060; + border-bottom:1px solid #909090; + padding-top: 4px; +} |
