http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/analytics/plugins/mouseClick.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/analytics/plugins/mouseClick.js b/components/camel-web/src/main/webapp/js/dojox/analytics/plugins/mouseClick.js deleted file mode 100644 index 0c58c3c..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/analytics/plugins/mouseClick.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved. - Available via Academic Free License >= 2.1 OR the modified BSD license. - see: http://dojotoolkit.org/license for details -*/ - - -if(!dojo._hasResource["dojox.analytics.plugins.mouseClick"]){ -dojo._hasResource["dojox.analytics.plugins.mouseClick"]=true; -dojo.provide("dojox.analytics.plugins.mouseClick"); -dojox.analytics.plugins.mouseClick=new (function(){ -this.addData=dojo.hitch(dojox.analytics,"addData","mouseClick"); -this.onClick=function(e){ -this.addData(this.trimEvent(e)); -}; -dojo.connect(dojo.doc,"onclick",this,"onClick"); -this.trimEvent=function(e){ -var t={}; -for(var i in e){ -switch(i){ -case "target": -case "originalTarget": -case "explicitOriginalTarget": -var _5=["id","className","nodeName","localName","href","spellcheck","lang"]; -t[i]={}; -for(var j=0;j<_5.length;j++){ -if(e[i][_5[j]]){ -if(_5[j]=="text"||_5[j]=="textContent"){ -if((e[i]["localName"]!="HTML")&&(e[i]["localName"]!="BODY")){ -t[i][_5[j]]=e[i][_5[j]].substr(0,50); -} -}else{ -t[i][_5[j]]=e[i][_5[j]]; -} -} -} -break; -case "clientX": -case "clientY": -case "pageX": -case "pageY": -case "screenX": -case "screenY": -t[i]=e[i]; -break; -} -} -return t; -}; -})(); -}
http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/analytics/plugins/mouseOver.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/analytics/plugins/mouseOver.js b/components/camel-web/src/main/webapp/js/dojox/analytics/plugins/mouseOver.js deleted file mode 100644 index 4705880..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/analytics/plugins/mouseOver.js +++ /dev/null @@ -1,76 +0,0 @@ -/* - Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved. - Available via Academic Free License >= 2.1 OR the modified BSD license. - see: http://dojotoolkit.org/license for details -*/ - - -if(!dojo._hasResource["dojox.analytics.plugins.mouseOver"]){ -dojo._hasResource["dojox.analytics.plugins.mouseOver"]=true; -dojo.provide("dojox.analytics.plugins.mouseOver"); -dojox.analytics.plugins.mouseOver=new (function(){ -this.watchMouse=dojo.config["watchMouseOver"]||true; -this.mouseSampleDelay=dojo.config["sampleDelay"]||2500; -this.addData=dojo.hitch(dojox.analytics,"addData","mouseOver"); -this.targetProps=dojo.config["targetProps"]||["id","className","localName","href","spellcheck","lang","textContent","value"]; -this.toggleWatchMouse=function(){ -if(this._watchingMouse){ -dojo.disconnect(this._watchingMouse); -delete this._watchingMouse; -return; -} -dojo.connect(dojo.doc,"onmousemove",this,"sampleMouse"); -}; -if(this.watchMouse){ -dojo.connect(dojo.doc,"onmouseover",this,"toggleWatchMouse"); -dojo.connect(dojo.doc,"onmouseout",this,"toggleWatchMouse"); -} -this.sampleMouse=function(e){ -if(!this._rateLimited){ -this.addData("sample",this.trimMouseEvent(e)); -this._rateLimited=true; -setTimeout(dojo.hitch(this,function(){ -if(this._rateLimited){ -this.trimMouseEvent(this._lastMouseEvent); -delete this._lastMouseEvent; -delete this._rateLimited; -} -}),this.mouseSampleDelay); -} -this._lastMouseEvent=e; -return e; -}; -this.trimMouseEvent=function(e){ -var t={}; -for(var i in e){ -switch(i){ -case "target": -var _5=this.targetProps; -t[i]={}; -for(var j=0;j<_5.length;j++){ -if(dojo.isObject(e[i])&&_5[j] in e[i]){ -if(_5[j]=="text"||_5[j]=="textContent"){ -if(e[i]["localName"]&&(e[i]["localName"]!="HTML")&&(e[i]["localName"]!="BODY")){ -t[i][_5[j]]=e[i][_5[j]].substr(0,50); -} -}else{ -t[i][_5[j]]=e[i][_5[j]]; -} -} -} -break; -case "x": -case "y": -if(e[i]){ -var _7=e[i]; -t[i]=_7+""; -} -break; -default: -break; -} -} -return t; -}; -})(); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/analytics/plugins/window.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/analytics/plugins/window.js b/components/camel-web/src/main/webapp/js/dojox/analytics/plugins/window.js deleted file mode 100644 index 47ac2f3..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/analytics/plugins/window.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved. - Available via Academic Free License >= 2.1 OR the modified BSD license. - see: http://dojotoolkit.org/license for details -*/ - - -if(!dojo._hasResource["dojox.analytics.plugins.window"]){ -dojo._hasResource["dojox.analytics.plugins.window"]=true; -dojo.provide("dojox.analytics.plugins.window"); -dojox.analytics.plugins.window=new (function(){ -this.addData=dojo.hitch(dojox.analytics,"addData","window"); -this.windowConnects=dojo.config["windowConnects"]||["open","onerror"]; -for(var i=0;i<this.windowConnects.length;i++){ -dojo.connect(window,this.windowConnects[i],dojo.hitch(this,"addData",this.windowConnects[i])); -} -dojo.addOnLoad(dojo.hitch(this,function(){ -var _2={}; -for(var i in window){ -if(dojo.isObject(window[i])){ -switch(i){ -case "location": -case "console": -_2[i]=window[i]; -break; -default: -break; -} -}else{ -_2[i]=window[i]; -} -} -this.addData(_2); -})); -})(); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/analytics/profiles/analytics.profile.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/analytics/profiles/analytics.profile.js b/components/camel-web/src/main/webapp/js/dojox/analytics/profiles/analytics.profile.js deleted file mode 100644 index 95e99be..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/analytics/profiles/analytics.profile.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved. - Available via Academic Free License >= 2.1 OR the modified BSD license. - see: http://dojotoolkit.org/license for details -*/ - - -dependencies={layers:[{name:"../dojox/analytics.js",dependencies:["dojox.analytics","dojox.analytics.plugins.dojo","dojox.analytics.plugins.window","dojox.analytics.plugins.consoleMessages","dojox.analytics.plugins.mouseOver","dojox.analytics.plugins.mouseClick","dojox.analytics.plugins.idle"]}],prefixes:[["dojox","../dojox"],["dijit","../dijit"]]}; http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/analytics/profiles/analyticsInBase.profile.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/analytics/profiles/analyticsInBase.profile.js b/components/camel-web/src/main/webapp/js/dojox/analytics/profiles/analyticsInBase.profile.js deleted file mode 100644 index 83ead70..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/analytics/profiles/analyticsInBase.profile.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved. - Available via Academic Free License >= 2.1 OR the modified BSD license. - see: http://dojotoolkit.org/license for details -*/ - - -dependencies={layers:[{name:"dojo.js",dependencies:["dojox.analytics","dojox.analytics.plugins.dojo","dojox.analytics.plugins.window","dojox.analytics.plugins.consoleMessages","dojox.analytics.plugins.mouseOver","dojox.analytics.plugins.mouseClick","dojox.analytics.plugins.idle"]}],prefixes:[["dojox","../dojox"],["dijit","../dijit"]]}; http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/atom/README ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/atom/README b/components/camel-web/src/main/webapp/js/dojox/atom/README deleted file mode 100644 index 2e4936a..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/atom/README +++ /dev/null @@ -1,53 +0,0 @@ -------------------------------------------------------------------------------- -DojoX Data -------------------------------------------------------------------------------- -Version 1.0 -Release date: 11/18/2008 -------------------------------------------------------------------------------- -Project state: experimental -------------------------------------------------------------------------------- -Project authors - Jared Jurkiewicz (jared.jurkiew...@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 dojocampus (http://docs.dojocampus.org/dojox/atom) -------------------------------------------------------------------------------- -Contributions: - -Constributions 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'. - http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/atom/io/Connection.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/atom/io/Connection.js b/components/camel-web/src/main/webapp/js/dojox/atom/io/Connection.js deleted file mode 100644 index 7211358..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/atom/io/Connection.js +++ /dev/null @@ -1,267 +0,0 @@ -/* - Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved. - Available via Academic Free License >= 2.1 OR the modified BSD license. - see: http://dojotoolkit.org/license for details -*/ - - -if(!dojo._hasResource["dojox.atom.io.Connection"]){ -dojo._hasResource["dojox.atom.io.Connection"]=true; -dojo.provide("dojox.atom.io.Connection"); -dojo.require("dojox.atom.io.model"); -dojo.declare("dojox.atom.io.Connection",null,{constructor:function(_1,_2){ -this.sync=_1; -this.preventCache=_2; -},preventCache:false,alertsEnabled:false,getFeed:function(_3,_4,_5,_6){ -this._getXmlDoc(_3,"feed",new dojox.atom.io.model.Feed(),dojox.atom.io.model._Constants.ATOM_NS,_4,_5,_6); -},getService:function(_7,_8,_9,_a){ -this._getXmlDoc(_7,"service",new dojox.atom.io.model.Service(_7),dojox.atom.io.model._Constants.APP_NS,_8,_9,_a); -},getEntry:function(_b,_c,_d,_e){ -this._getXmlDoc(_b,"entry",new dojox.atom.io.model.Entry(),dojox.atom.io.model._Constants.ATOM_NS,_c,_d,_e); -},_getXmlDoc:function(_f,_10,_11,_12,_13,_14,_15){ -if(!_15){ -_15=dojo.global; -} -var ae=this.alertsEnabled; -var _17={url:_f,handleAs:"xml",sync:this.sync,preventCache:this.preventCache,load:function(_18,_19){ -var _1a=null; -var _1b=_18; -var _1c; -if(_1b){ -if(typeof (_1b.getElementsByTagNameNS)!="undefined"){ -_1c=_1b.getElementsByTagNameNS(_12,_10); -if(_1c&&_1c.length>0){ -_1a=_1c.item(0); -}else{ -if(_1b.lastChild){ -_1a=_1b.lastChild; -} -} -}else{ -if(typeof (_1b.getElementsByTagName)!="undefined"){ -_1c=_1b.getElementsByTagName(_10); -if(_1c&&_1c.length>0){ -for(var i=0;i<_1c.length;i++){ -if(_1c[i].namespaceURI==_12){ -_1a=_1c[i]; -break; -} -} -}else{ -if(_1b.lastChild){ -_1a=_1b.lastChild; -} -} -}else{ -if(_1b.lastChild){ -_1a=_1b.lastChild; -}else{ -_13.call(_15,null,null,_19); -return; -} -} -} -_11.buildFromDom(_1a); -if(_13){ -_13.call(_15,_11,_1b,_19); -}else{ -if(ae){ -var _1e=dojo.i18n.getLocalization("dojox.atom.io","messages"); -throw new Error(_1e.noCallback); -} -} -}else{ -_13.call(_15,null,null,_19); -} -}}; -if(this.user&&this.user!==null){ -_17.user=this.user; -} -if(this.password&&this.password!==null){ -_17.password=this.password; -} -if(_14){ -_17.error=function(_1f,_20){ -_14.call(_15,_1f,_20); -}; -}else{ -_17.error=function(){ -var _21=dojo.i18n.getLocalization("dojox.atom.io","messages"); -throw new Error(_21.failedXhr); -}; -} -dojo.xhrGet(_17); -},updateEntry:function(_22,_23,_24,_25,_26,_27){ -if(!_27){ -_27=dojo.global; -} -_22.updated=new Date(); -var url=_22.getEditHref(); -if(!url){ -var _29=dojo.i18n.getLocalization("dojox.atom.io","messages"); -throw new Error(_29.missingEditUrl); -} -var _2a=this; -var ae=this.alertsEnabled; -var _2c={url:url,handleAs:"text",contentType:"text/xml",sync:this.sync,preventCache:this.preventCache,load:function(_2d,_2e){ -var _2f=null; -if(_25){ -_2f=_2e.xhr.getResponseHeader("Location"); -if(!_2f){ -_2f=url; -} -var _30=function(_31,dom,_33){ -if(_23){ -_23.call(_27,_31,_2f,_33); -}else{ -if(ae){ -var _34=dojo.i18n.getLocalization("dojox.atom.io","messages"); -throw new Error(_34.noCallback); -} -} -}; -_2a.getEntry(_2f,_30); -}else{ -if(_23){ -_23.call(_27,_22,_2e.xhr.getResponseHeader("Location"),_2e); -}else{ -if(ae){ -var _35=dojo.i18n.getLocalization("dojox.atom.io","messages"); -throw new Error(_35.noCallback); -} -} -} -return _2d; -}}; -if(this.user&&this.user!==null){ -_2c.user=this.user; -} -if(this.password&&this.password!==null){ -_2c.password=this.password; -} -if(_24){ -_2c.error=function(_36,_37){ -_24.call(_27,_36,_37); -}; -}else{ -_2c.error=function(){ -var _38=dojo.i18n.getLocalization("dojox.atom.io","messages"); -throw new Error(_38.failedXhr); -}; -} -if(_26){ -_2c.postData=_22.toString(true); -_2c.headers={"X-Method-Override":"PUT"}; -dojo.rawXhrPost(_2c); -}else{ -_2c.putData=_22.toString(true); -var xhr=dojo.rawXhrPut(_2c); -} -},addEntry:function(_3a,url,_3c,_3d,_3e,_3f){ -if(!_3f){ -_3f=dojo.global; -} -_3a.published=new Date(); -_3a.updated=new Date(); -var _40=_3a.feedUrl; -var ae=this.alertsEnabled; -if(!url&&_40){ -url=_40; -} -if(!url){ -if(ae){ -var _42=dojo.i18n.getLocalization("dojox.atom.io","messages"); -throw new Error(_42.missingUrl); -} -return; -} -var _43=this; -var _44={url:url,handleAs:"text",contentType:"text/xml",sync:this.sync,preventCache:this.preventCache,postData:_3a.toString(true),load:function(_45,_46){ -var _47=_46.xhr.getResponseHeader("Location"); -if(!_47){ -_47=url; -} -if(!_46.retrieveEntry){ -if(_3c){ -_3c.call(_3f,_3a,_47,_46); -}else{ -if(ae){ -var _48=dojo.i18n.getLocalization("dojox.atom.io","messages"); -throw new Error(_48.noCallback); -} -} -}else{ -var _49=function(_4a,dom,_4c){ -if(_3c){ -_3c.call(_3f,_4a,_47,_4c); -}else{ -if(ae){ -var _4d=dojo.i18n.getLocalization("dojox.atom.io","messages"); -throw new Error(_4d.noCallback); -} -} -}; -_43.getEntry(_47,_49); -} -return _45; -}}; -if(this.user&&this.user!==null){ -_44.user=this.user; -} -if(this.password&&this.password!==null){ -_44.password=this.password; -} -if(_3d){ -_44.error=function(_4e,_4f){ -_3d.call(_3f,_4e,_4f); -}; -}else{ -_44.error=function(){ -var _50=dojo.i18n.getLocalization("dojox.atom.io","messages"); -throw new Error(_50.failedXhr); -}; -} -dojo.rawXhrPost(_44); -},deleteEntry:function(_51,_52,_53,_54,_55){ -if(!_55){ -_55=dojo.global; -} -var url=null; -if(typeof (_51)=="string"){ -url=_51; -}else{ -url=_51.getEditHref(); -} -if(!url){ -var _57=dojo.i18n.getLocalization("dojox.atom.io","messages"); -_52.call(_55,false,null); -throw new Error(_57.missingUrl); -} -var _58={url:url,handleAs:"text",sync:this.sync,preventCache:this.preventCache,load:function(_59,_5a){ -_52.call(_55,_5a); -return _59; -}}; -if(this.user&&this.user!==null){ -_58.user=this.user; -} -if(this.password&&this.password!==null){ -_58.password=this.password; -} -if(_53){ -_58.error=function(_5b,_5c){ -_53.call(_55,_5b,_5c); -}; -}else{ -_58.error=function(){ -var _5d=dojo.i18n.getLocalization("dojox.atom.io","messages"); -throw new Error(_5d.failedXhr); -}; -} -if(_54){ -_58.headers={"X-Method-Override":"DELETE"}; -dojo.xhrPost(_58); -}else{ -dojo.xhrDelete(_58); -} -}}); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/atom/io/model.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/atom/io/model.js b/components/camel-web/src/main/webapp/js/dojox/atom/io/model.js deleted file mode 100644 index e18e10f..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/atom/io/model.js +++ /dev/null @@ -1,938 +0,0 @@ -/* - Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved. - Available via Academic Free License >= 2.1 OR the modified BSD license. - see: http://dojotoolkit.org/license for details -*/ - - -if(!dojo._hasResource["dojox.atom.io.model"]){ -dojo._hasResource["dojox.atom.io.model"]=true; -dojo.provide("dojox.atom.io.model"); -dojo.require("dojox.xml.parser"); -dojo.require("dojo.string"); -dojo.require("dojo.date.stamp"); -dojo.requireLocalization("dojox.atom.io","messages",null,""); -dojox.atom.io.model._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"}; -dojox.atom.io.model._actions={"link":function(_1,_2){ -if(_1.links===null){ -_1.links=[]; -} -var _3=new dojox.atom.io.model.Link(); -_3.buildFromDom(_2); -_1.links.push(_3); -},"author":function(_4,_5){ -if(_4.authors===null){ -_4.authors=[]; -} -var _6=new dojox.atom.io.model.Person("author"); -_6.buildFromDom(_5); -_4.authors.push(_6); -},"contributor":function(_7,_8){ -if(_7.contributors===null){ -_7.contributors=[]; -} -var _9=new dojox.atom.io.model.Person("contributor"); -_9.buildFromDom(_8); -_7.contributors.push(_9); -},"category":function(_a,_b){ -if(_a.categories===null){ -_a.categories=[]; -} -var _c=new dojox.atom.io.model.Category(); -_c.buildFromDom(_b); -_a.categories.push(_c); -},"icon":function(_d,_e){ -_d.icon=dojox.xml.parser.textContent(_e); -},"id":function(_f,_10){ -_f.id=dojox.xml.parser.textContent(_10); -},"rights":function(obj,_12){ -obj.rights=dojox.xml.parser.textContent(_12); -},"subtitle":function(obj,_14){ -var cnt=new dojox.atom.io.model.Content("subtitle"); -cnt.buildFromDom(_14); -obj.subtitle=cnt; -},"title":function(obj,_17){ -var cnt=new dojox.atom.io.model.Content("title"); -cnt.buildFromDom(_17); -obj.title=cnt; -},"updated":function(obj,_1a){ -obj.updated=dojox.atom.io.model.util.createDate(_1a); -},"issued":function(obj,_1c){ -obj.issued=dojox.atom.io.model.util.createDate(_1c); -},"modified":function(obj,_1e){ -obj.modified=dojox.atom.io.model.util.createDate(_1e); -},"published":function(obj,_20){ -obj.published=dojox.atom.io.model.util.createDate(_20); -},"entry":function(obj,_22){ -if(obj.entries===null){ -obj.entries=[]; -} -var _23=obj.createEntry?obj.createEntry():new dojox.atom.io.model.Entry(); -_23.buildFromDom(_22); -obj.entries.push(_23); -},"content":function(obj,_25){ -var cnt=new dojox.atom.io.model.Content("content"); -cnt.buildFromDom(_25); -obj.content=cnt; -},"summary":function(obj,_28){ -var _29=new dojox.atom.io.model.Content("summary"); -_29.buildFromDom(_28); -obj.summary=_29; -},"name":function(obj,_2b){ -obj.name=dojox.xml.parser.textContent(_2b); -},"email":function(obj,_2d){ -obj.email=dojox.xml.parser.textContent(_2d); -},"uri":function(obj,_2f){ -obj.uri=dojox.xml.parser.textContent(_2f); -},"generator":function(obj,_31){ -obj.generator=new dojox.atom.io.model.Generator(); -obj.generator.buildFromDom(_31); -}}; -dojox.atom.io.model.util={createDate:function(_32){ -var _33=dojox.xml.parser.textContent(_32); -if(_33){ -return dojo.date.stamp.fromISOString(dojo.trim(_33)); -} -return null; -},escapeHtml:function(str){ -str=str.replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">").replace(/"/gm,"""); -str=str.replace(/'/gm,"'"); -return str; -},unEscapeHtml:function(str){ -str=str.replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">").replace(/"/gm,"\""); -str=str.replace(/'/gm,"'"); -return str; -},getNodename:function(_36){ -var _37=null; -if(_36!==null){ -_37=_36.localName?_36.localName:_36.nodeName; -if(_37!==null){ -var _38=_37.indexOf(":"); -if(_38!==-1){ -_37=_37.substring((_38+1),_37.length); -} -} -} -return _37; -}}; -dojo.declare("dojox.atom.io.model.Node",null,{constructor:function(_39,_3a,_3b,_3c,_3d){ -this.name_space=_39; -this.name=_3a; -this.attributes=[]; -if(_3b){ -this.attributes=_3b; -} -this.content=[]; -this.rawNodes=[]; -this.textContent=null; -if(_3c){ -this.content.push(_3c); -} -this.shortNs=_3d; -this._objName="Node"; -},buildFromDom:function(_3e){ -this._saveAttributes(_3e); -this.name_space=_3e.namespaceURI; -this.shortNs=_3e.prefix; -this.name=dojox.atom.io.model.util.getNodename(_3e); -for(var x=0;x<_3e.childNodes.length;x++){ -var c=_3e.childNodes[x]; -if(dojox.atom.io.model.util.getNodename(c)!="#text"){ -this.rawNodes.push(c); -var n=new dojox.atom.io.model.Node(); -n.buildFromDom(c,true); -this.content.push(n); -}else{ -this.content.push(c.nodeValue); -} -} -this.textContent=dojox.xml.parser.textContent(_3e); -},_saveAttributes:function(_42){ -if(!this.attributes){ -this.attributes=[]; -} -var _43=function(_44){ -var _45=_44.attributes; -if(_45===null){ -return false; -} -return (_45.length!==0); -}; -if(_43(_42)&&this._getAttributeNames){ -var _46=this._getAttributeNames(_42); -if(_46&&_46.length>0){ -for(var x in _46){ -var _48=_42.getAttribute(_46[x]); -if(_48){ -this.attributes[_46[x]]=_48; -} -} -} -} -},addAttribute:function(_49,_4a){ -this.attributes[_49]=_4a; -},getAttribute:function(_4b){ -return this.attributes[_4b]; -},_getAttributeNames:function(_4c){ -var _4d=[]; -for(var i=0;i<_4c.attributes.length;i++){ -_4d.push(_4c.attributes[i].nodeName); -} -return _4d; -},toString:function(){ -var xml=[]; -var x; -var _51=(this.shortNs?this.shortNs+":":"")+this.name; -var _52=(this.name=="#cdata-section"); -if(_52){ -xml.push("<![CDATA["); -xml.push(this.textContent); -xml.push("]]>"); -}else{ -xml.push("<"); -xml.push(_51); -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("</"+_51+">\n"); -}else{ -xml.push("/>\n"); -} -} -return xml.join(""); -},addContent:function(_53){ -this.content.push(_53); -}}); -dojo.declare("dojox.atom.io.model.AtomItem",dojox.atom.io.model.Node,{constructor:function(_54){ -this.ATOM_URI=dojox.atom.io.model._Constants.ATOM_URI; -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; -this.issued=this.modified=null; -this.content=null; -this.extensions=null; -this.entries=null; -this.name_spaces={}; -this._objName="AtomItem"; -},_getAttributeNames:function(){ -return null; -},_accepts:{},accept:function(tag){ -return Boolean(this._accepts[tag]); -},_postBuild:function(){ -},buildFromDom:function(_56){ -var i,c,n; -for(i=0;i<_56.attributes.length;i++){ -c=_56.attributes.item(i); -n=dojox.atom.io.model.util.getNodename(c); -if(c.prefix=="xmlns"&&c.prefix!=n){ -this.addNamespace(c.nodeValue,n); -} -} -c=_56.childNodes; -for(i=0;i<c.length;i++){ -if(c[i].nodeType==1){ -var _5a=dojox.atom.io.model.util.getNodename(c[i]); -if(!_5a){ -continue; -} -if(c[i].namespaceURI!=dojox.atom.io.model._Constants.ATOM_NS&&_5a!="#text"){ -if(!this.extensions){ -this.extensions=[]; -} -var _5b=new dojox.atom.io.model.Node(); -_5b.buildFromDom(c[i]); -this.extensions.push(_5b); -} -if(!this.accept(_5a.toLowerCase())){ -continue; -} -var fn=dojox.atom.io.model._actions[_5a]; -if(fn){ -fn(this,c[i]); -} -} -} -this._saveAttributes(_56); -if(this._postBuild){ -this._postBuild(); -} -},addNamespace:function(_5d,_5e){ -if(_5d&&_5e){ -this.name_spaces[_5e]=_5d; -} -},addAuthor:function(_5f,_60,uri){ -if(!this.authors){ -this.authors=[]; -} -this.authors.push(new dojox.atom.io.model.Person("author",_5f,_60,uri)); -},addContributor:function(_62,_63,uri){ -if(!this.contributors){ -this.contributors=[]; -} -this.contributors.push(new dojox.atom.io.model.Person("contributor",_62,_63,uri)); -},addLink:function(_65,rel,_67,_68,_69){ -if(!this.links){ -this.links=[]; -} -this.links.push(new dojox.atom.io.model.Link(_65,rel,_67,_68,_69)); -},removeLink:function(_6a,rel){ -if(!this.links||!dojo.isArray(this.links)){ -return; -} -var _6c=0; -for(var i=0;i<this.links.length;i++){ -if((!_6a||this.links[i].href===_6a)&&(!rel||this.links[i].rel===rel)){ -this.links.splice(i,1); -_6c++; -} -} -return _6c; -},removeBasicLinks:function(){ -if(!this.links){ -return; -} -var _6e=0; -for(var i=0;i<this.links.length;i++){ -if(!this.links[i].rel){ -this.links.splice(i,1); -_6e++; -i--; -} -} -return _6e; -},addCategory:function(_70,_71,_72){ -if(!this.categories){ -this.categories=[]; -} -this.categories.push(new dojox.atom.io.model.Category(_70,_71,_72)); -},getCategories:function(_73){ -if(!_73){ -return this.categories; -} -var arr=[]; -for(var x in this.categories){ -if(this.categories[x].scheme===_73){ -arr.push(this.categories[x]); -} -} -return arr; -},removeCategories:function(_76,_77){ -if(!this.categories){ -return; -} -var _78=0; -for(var i=0;i<this.categories.length;i++){ -if((!_76||this.categories[i].scheme===_76)&&(!_77||this.categories[i].term===_77)){ -this.categories.splice(i,1); -_78++; -i--; -} -} -return _78; -},setTitle:function(str,_7b){ -if(!str){ -return; -} -this.title=new dojox.atom.io.model.Content("title"); -this.title.value=str; -if(_7b){ -this.title.type=_7b; -} -},addExtension:function(_7c,_7d,_7e,_7f,_80){ -if(!this.extensions){ -this.extensions=[]; -} -this.extensions.push(new dojox.atom.io.model.Node(_7c,_7d,_7e,_7f,_80||"ns"+this.extensions.length)); -},getExtensions:function(_81,_82){ -var arr=[]; -if(!this.extensions){ -return arr; -} -for(var x in this.extensions){ -if((this.extensions[x].name_space===_81||this.extensions[x].shortNs===_81)&&(!_82||this.extensions[x].name===_82)){ -arr.push(this.extensions[x]); -} -} -return arr; -},removeExtensions:function(_85,_86){ -if(!this.extensions){ -return; -} -for(var i=0;i<this.extensions.length;i++){ -if((this.extensions[i].name_space==_85||this.extensions[i].shortNs===_85)&&this.extensions[i].name===_86){ -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; -this.issued=this.modified=null; -this.content=null; -this.extensions=null; -this.entries=null; -}}); -dojo.declare("dojox.atom.io.model.Category",dojox.atom.io.model.Node,{constructor:function(_88,_89,_8a){ -this.scheme=_88; -this.term=_89; -this.label=_8a; -this._objName="Category"; -},_postBuild:function(){ -},_getAttributeNames:function(){ -return ["label","scheme","term"]; -},toString:function(){ -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(_8c){ -this._saveAttributes(_8c); -this.label=this.attributes.label; -this.scheme=this.attributes.scheme; -this.term=this.attributes.term; -if(this._postBuild){ -this._postBuild(); -} -}}); -dojo.declare("dojox.atom.io.model.Content",dojox.atom.io.model.Node,{constructor:function(_8d,_8e,src,_90,_91){ -this.tagName=_8d; -this.value=_8e; -this.src=src; -this.type=_90; -this.xmlLang=_91; -this.HTML="html"; -this.TEXT="text"; -this.XHTML="xhtml"; -this.XML="xml"; -this._useTextContent="true"; -},_getAttributeNames:function(){ -return ["type","src"]; -},_postBuild:function(){ -},buildFromDom:function(_92){ -if(_92.innerHTML){ -this.value=_92.innerHTML; -}else{ -this.value=dojox.xml.parser.textContent(_92); -} -this._saveAttributes(_92); -if(this.attributes){ -this.type=this.attributes.type; -this.scheme=this.attributes.scheme; -this.term=this.attributes.term; -} -if(!this.type){ -this.type="text"; -} -var _93=this.type.toLowerCase(); -if(_93==="html"||_93==="text/html"||_93==="xhtml"||_93==="text/xhtml"){ -this.value=dojox.atom.io.model.util.unEscapeHtml(this.value); -} -if(this._postBuild){ -this._postBuild(); -} -},toString:function(){ -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+"\" "); -} -if(this.type.toLowerCase()==this.HTML){ -s.push(">"+dojox.atom.io.model.util.escapeHtml(this.value)+"</"+this.tagName+">\n"); -}else{ -s.push(">"+this.value+"</"+this.tagName+">\n"); -} -var ret=s.join(""); -return ret; -}}); -dojo.declare("dojox.atom.io.model.Link",dojox.atom.io.model.Node,{constructor:function(_96,rel,_98,_99,_9a){ -this.href=_96; -this.hrefLang=_98; -this.rel=rel; -this.title=_99; -this.type=_9a; -},_getAttributeNames:function(){ -return ["href","jrefLang","rel","title","type"]; -},_postBuild:function(){ -},buildFromDom:function(_9b){ -this._saveAttributes(_9b); -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(){ -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(""); -}}); -dojo.declare("dojox.atom.io.model.Person",dojox.atom.io.model.Node,{constructor:function(_9d,_9e,_9f,uri){ -this.author="author"; -this.contributor="contributor"; -if(!_9d){ -_9d=this.author; -} -this.personType=_9d; -this.name=_9e||""; -this.email=_9f||""; -this.uri=uri||""; -this._objName="Person"; -},_getAttributeNames:function(){ -return null; -},_postBuild:function(){ -},accept:function(tag){ -return Boolean(this._accepts[tag]); -},buildFromDom:function(_a2){ -var c=_a2.childNodes; -for(var i=0;i<c.length;i++){ -var _a5=dojox.atom.io.model.util.getNodename(c[i]); -if(!_a5){ -continue; -} -if(c[i].namespaceURI!=dojox.atom.io.model._Constants.ATOM_NS&&_a5!="#text"){ -if(!this.extensions){ -this.extensions=[]; -} -var _a6=new dojox.atom.io.model.Node(); -_a6.buildFromDom(c[i]); -this.extensions.push(_a6); -} -if(!this.accept(_a5.toLowerCase())){ -continue; -} -var fn=dojox.atom.io.model._actions[_a5]; -if(fn){ -fn(this,c[i]); -} -} -this._saveAttributes(_a2); -if(this._postBuild){ -this._postBuild(); -} -},_accepts:{"name":true,"uri":true,"email":true},toString:function(){ -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(""); -}}); -dojo.declare("dojox.atom.io.model.Generator",dojox.atom.io.model.Node,{constructor:function(uri,_aa,_ab){ -this.uri=uri; -this.version=_aa; -this.value=_ab; -},_postBuild:function(){ -},buildFromDom:function(_ac){ -this.value=dojox.xml.parser.textContent(_ac); -this._saveAttributes(_ac); -this.uri=this.attributes.uri; -this.version=this.attributes.version; -if(this._postBuild){ -this._postBuild(); -} -},toString:function(){ -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; -}}); -dojo.declare("dojox.atom.io.model.Entry",dojox.atom.io.model.AtomItem,{constructor:function(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(_b0){ -var s=[]; -var i; -if(_b0){ -s.push("<?xml version='1.0' encoding='UTF-8'?>"); -s.push("<entry xmlns='"+dojox.atom.io.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>"+dojo.date.stamp.toISOString(this.published)+"</published>\n"); -} -if(this.created){ -s.push("<created>"+dojo.date.stamp.toISOString(this.created)+"</created>\n"); -} -if(this.issued){ -s.push("<issued>"+dojo.date.stamp.toISOString(this.issued)+"</issued>\n"); -} -if(this.modified){ -s.push("<modified>"+dojo.date.stamp.toISOString(this.modified)+"</modified>\n"); -} -if(this.modified&&!this.updated){ -this.updated=this.modified; -} -if(this.updated){ -s.push("<updated>"+dojo.date.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 _b3=[this.authors,this.categories,this.links,this.contributors,this.extensions]; -for(var x in _b3){ -if(_b3[x]){ -for(var y in _b3[x]){ -s.push(_b3[x][y]); -} -} -} -if(this.content){ -s.push(this.content.toString()); -} -s.push("</entry>\n"); -return s.join(""); -},getEditHref:function(){ -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; -} -} -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"); -}}); -dojo.declare("dojox.atom.io.model.Feed",dojox.atom.io.model.AtomItem,{_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(_b9){ -if(!_b9.id){ -var _ba=dojo.i18n.getLocalization("dojox.atom.io","messages"); -throw new Error(_ba.noId); -} -if(!this.entries){ -this.entries=[]; -} -_b9.feedUrl=this.getSelfHref(); -this.entries.push(_b9); -},getFirstEntry:function(){ -if(!this.entries||this.entries.length===0){ -return null; -} -return this.entries[0]; -},getEntry:function(_bb){ -if(!this.entries){ -return null; -} -for(var x in this.entries){ -if(this.entries[x].id==_bb){ -return this.entries[x]; -} -} -return null; -},removeEntry:function(_bd){ -if(!this.entries){ -return; -} -var _be=0; -for(var i=0;i<this.entries.length;i++){ -if(this.entries[i]===_bd){ -this.entries.splice(i,1); -_be++; -} -} -return _be; -},setEntries:function(_c0){ -for(var x in _c0){ -this.addEntry(_c0[x]); -} -},toString:function(){ -var s=[]; -var i; -s.push("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"); -s.push("<feed xmlns=\""+dojox.atom.io.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"); -} -if(this.issued){ -s.push("<issued>"+dojo.date.stamp.toISOString(this.issued)+"</issued>\n"); -} -if(this.modified){ -s.push("<modified>"+dojo.date.stamp.toISOString(this.modified)+"</modified>\n"); -} -if(this.modified&&!this.updated){ -this.updated=this.modified; -} -if(this.updated){ -s.push("<updated>"+dojo.date.stamp.toISOString(this.updated)+"</updated>\n"); -} -if(this.published){ -s.push("<published>"+dojo.date.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()); -} -var _c4=[this.alternateLinks,this.authors,this.categories,this.contributors,this.otherLinks,this.extensions,this.entries]; -for(i in _c4){ -if(_c4[i]){ -for(var x in _c4[i]){ -s.push(_c4[i][x]); -} -} -} -s.push("</feed>"); -return s.join(""); -},createEntry:function(){ -var _c6=new dojox.atom.io.model.Entry(); -_c6.feedUrl=this.getSelfHref(); -return _c6; -},getSelfHref:function(){ -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; -} -} -return null; -}}); -dojo.declare("dojox.atom.io.model.Service",dojox.atom.io.model.AtomItem,{constructor:function(_c8){ -this.href=_c8; -},buildFromDom:function(_c9){ -var _ca; -var i; -var len=_c9.childNodes?_c9.childNodes.length:0; -this.workspaces=[]; -if(_c9.tagName!="service"){ -return; -} -if(_c9.namespaceURI!=dojox.atom.io.model._Constants.PURL_NS&&_c9.namespaceURI!=dojox.atom.io.model._Constants.APP_NS){ -return; -} -var ns=_c9.namespaceURI; -this.name_space=_c9.namespaceURI; -var _ce; -if(typeof (_c9.getElementsByTagNameNS)!="undefined"){ -_ce=_c9.getElementsByTagNameNS(ns,"workspace"); -}else{ -_ce=[]; -var _cf=_c9.getElementsByTagName("workspace"); -for(i=0;i<_cf.length;i++){ -if(_cf[i].namespaceURI==ns){ -_ce.push(_cf[i]); -} -} -} -if(_ce&&_ce.length>0){ -var _d0=0; -var _d1; -for(i=0;i<_ce.length;i++){ -_d1=(typeof (_ce.item)==="undefined"?_ce[i]:_ce.item(i)); -var _d2=new dojox.atom.io.model.Workspace(); -_d2.buildFromDom(_d1); -this.workspaces[_d0++]=_d2; -} -} -},getCollection:function(url){ -for(var i=0;i<this.workspaces.length;i++){ -var _d5=this.workspaces[i].collections; -for(var j=0;j<_d5.length;j++){ -if(_d5[j].href==url){ -return _d5; -} -} -} -return null; -}}); -dojo.declare("dojox.atom.io.model.Workspace",dojox.atom.io.model.AtomItem,{constructor:function(_d7){ -this.title=_d7; -this.collections=[]; -},buildFromDom:function(_d8){ -var _d9=dojox.atom.io.model.util.getNodename(_d8); -if(_d9!="workspace"){ -return; -} -var c=_d8.childNodes; -var len=0; -for(var i=0;i<c.length;i++){ -var _dd=c[i]; -if(_dd.nodeType===1){ -_d9=dojox.atom.io.model.util.getNodename(_dd); -if(_dd.namespaceURI==dojox.atom.io.model._Constants.PURL_NS||_dd.namespaceURI==dojox.atom.io.model._Constants.APP_NS){ -if(_d9==="collection"){ -var _de=new dojox.atom.io.model.Collection(); -_de.buildFromDom(_dd); -this.collections[len++]=_de; -} -}else{ -if(_dd.namespaceURI===dojox.atom.io.model._Constants.ATOM_NS){ -if(_d9==="title"){ -this.title=dojox.xml.parser.textContent(_dd); -} -}else{ -var _df=dojo.i18n.getLocalization("dojox.atom.io","messages"); -throw new Error(_df.badNS); -} -} -} -} -}}); -dojo.declare("dojox.atom.io.model.Collection",dojox.atom.io.model.AtomItem,{constructor:function(_e0,_e1){ -this.href=_e0; -this.title=_e1; -this.attributes=[]; -this.features=[]; -this.children=[]; -this.memberType=null; -this.id=null; -},buildFromDom:function(_e2){ -this.href=_e2.getAttribute("href"); -var c=_e2.childNodes; -for(var i=0;i<c.length;i++){ -var _e5=c[i]; -if(_e5.nodeType===1){ -var _e6=dojox.atom.io.model.util.getNodename(_e5); -if(_e5.namespaceURI==dojox.atom.io.model._Constants.PURL_NS||_e5.namespaceURI==dojox.atom.io.model._Constants.APP_NS){ -if(_e6==="member-type"){ -this.memberType=dojox.xml.parser.textContent(_e5); -}else{ -if(_e6=="feature"){ -if(_e5.getAttribute("id")){ -this.features.push(_e5.getAttribute("id")); -} -}else{ -var _e7=new dojox.atom.io.model.Node(); -_e7.buildFromDom(_e5); -this.children.push(_e7); -} -} -}else{ -if(_e5.namespaceURI===dojox.atom.io.model._Constants.ATOM_NS){ -if(_e6==="id"){ -this.id=dojox.xml.parser.textContent(_e5); -}else{ -if(_e6==="title"){ -this.title=dojox.xml.parser.textContent(_e5); -} -} -} -} -} -} -}}); -} http://git-wip-us.apache.org/repos/asf/camel/blob/9f5e32db/components/camel-web/src/main/webapp/js/dojox/atom/widget/FeedEntryEditor.js ---------------------------------------------------------------------- diff --git a/components/camel-web/src/main/webapp/js/dojox/atom/widget/FeedEntryEditor.js b/components/camel-web/src/main/webapp/js/dojox/atom/widget/FeedEntryEditor.js deleted file mode 100644 index 7e08401..0000000 --- a/components/camel-web/src/main/webapp/js/dojox/atom/widget/FeedEntryEditor.js +++ /dev/null @@ -1,735 +0,0 @@ -/* - Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved. - Available via Academic Free License >= 2.1 OR the modified BSD license. - see: http://dojotoolkit.org/license for details -*/ - - -if(!dojo._hasResource["dojox.atom.widget.FeedEntryEditor"]){ -dojo._hasResource["dojox.atom.widget.FeedEntryEditor"]=true; -dojo.provide("dojox.atom.widget.FeedEntryEditor"); -dojo.require("dojox.atom.widget.FeedEntryViewer"); -dojo.require("dijit._Widget"); -dojo.require("dijit._Templated"); -dojo.require("dijit._Container"); -dojo.require("dijit.Editor"); -dojo.require("dijit.form.TextBox"); -dojo.require("dijit.form.SimpleTextarea"); -dojo.requireLocalization("dojox.atom.widget","FeedEntryEditor",null,"ROOT,cs,de,es,fr,hu,it,ja,ko,pl,pt,ru,zh,zh-tw"); -dojo.requireLocalization("dojox.atom.widget","PeopleEditor",null,"ROOT,cs,de,es,fr,hu,it,ja,ko,pl,pt,ru,zh,zh-tw"); -dojo.experimental("dojox.atom.widget.FeedEntryEditor"); -dojo.declare("dojox.atom.widget.FeedEntryEditor",dojox.atom.widget.FeedEntryViewer,{_contentEditor:null,_oldContent:null,_setObject:null,enableEdit:false,_contentEditorCreator:null,_editors:{},entryNewButton:null,_editable:false,templateString:"<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=\"ent rySaveCancelButtons\" 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=\"dis play: 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",postCreate:function(){ -if(this.entrySelectionTopic!==""){ -this._subscriptions=[dojo.subscribe(this.entrySelectionTopic,this,"_handleEvent")]; -} -var _1=dojo.i18n.getLocalization("dojox.atom.widget","FeedEntryViewer"); -this.displayOptions.innerHTML=_1.displayOptions; -this.feedEntryCheckBoxLabelTitle.innerHTML=_1.title; -this.feedEntryCheckBoxLabelAuthors.innerHTML=_1.authors; -this.feedEntryCheckBoxLabelContributors.innerHTML=_1.contributors; -this.feedEntryCheckBoxLabelId.innerHTML=_1.id; -this.close.innerHTML=_1.close; -this.feedEntryCheckBoxLabelUpdated.innerHTML=_1.updated; -this.feedEntryCheckBoxLabelSummary.innerHTML=_1.summary; -this.feedEntryCheckBoxLabelContent.innerHTML=_1.content; -_1=dojo.i18n.getLocalization("dojox.atom.widget","FeedEntryEditor"); -this.doNew.innerHTML=_1.doNew; -this.edit.innerHTML=_1.edit; -this.save.innerHTML=_1.save; -this.cancel.innerHTML=_1.cancel; -},setEntry:function(_2,_3,_4){ -if(this._entry!==_2){ -this._editMode=false; -_4=false; -}else{ -_4=true; -} -dojox.atom.widget.FeedEntryEditor.superclass.setEntry.call(this,_2,_3); -this._editable=this._isEditable(_2); -if(!_4&&!this._editable){ -dojo.style(this.entryEditButton,"display","none"); -dojo.style(this.entrySaveCancelButtons,"display","none"); -} -if(this._editable&&this.enableEdit){ -if(!_4){ -dojo.style(this.entryEditButton,"display",""); -if(this.enableMenuFade&&this.entrySaveCancelButton){ -dojo.fadeOut({node:this.entrySaveCancelButton,duration:250}).play(); -} -} -} -},_toggleEdit:function(){ -if(this._editable&&this.enableEdit){ -dojo.style(this.entryEditButton,"display","none"); -dojo.style(this.entrySaveCancelButtons,"display",""); -this._editMode=true; -this.setEntry(this._entry,this._feed,true); -} -},_handleEvent:function(_5){ -if(_5.source!=this&&_5.action=="delete"&&_5.entry&&_5.entry==this._entry){ -dojo.style(this.entryEditButton,"display","none"); -} -dojox.atom.widget.FeedEntryEditor.superclass._handleEvent.call(this,_5); -},_isEditable:function(_6){ -var _7=false; -if(_6&&_6!==null&&_6.links&&_6.links!==null){ -for(var x in _6.links){ -if(_6.links[x].rel&&_6.links[x].rel=="edit"){ -_7=true; -break; -} -} -} -return _7; -},setTitle:function(_9,_a,_b){ -if(!_a){ -dojox.atom.widget.FeedEntryEditor.superclass.setTitle.call(this,_9,_a,_b); -if(_b.title&&_b.title.value&&_b.title.value!==null){ -this.setFieldValidity("title",true); -} -}else{ -if(_b.title&&_b.title.value&&_b.title.value!==null){ -if(!this._toLoad){ -this._toLoad=[]; -} -this.entryTitleSelect.value=_b.title.type; -var _c=this._createEditor(_9,_b.title,true,_b.title.type==="html"||_b.title.type==="xhtml"); -_c.name="title"; -this._toLoad.push(_c); -this.setFieldValidity("titleedit",true); -this.setFieldValidity("title",true); -} -} -},setAuthors:function(_d,_e,_f){ -if(!_e){ -dojox.atom.widget.FeedEntryEditor.superclass.setAuthors.call(this,_d,_e,_f); -if(_f.authors&&_f.authors.length>0){ -this.setFieldValidity("authors",true); -} -}else{ -if(_f.authors&&_f.authors.length>0){ -this._editors.authors=this._createPeopleEditor(this.entryAuthorNode,{data:_f.authors,name:"Author"}); -this.setFieldValidity("authors",true); -} -} -},setContributors:function(_10,_11,_12){ -if(!_11){ -dojox.atom.widget.FeedEntryEditor.superclass.setContributors.call(this,_10,_11,_12); -if(_12.contributors&&_12.contributors.length>0){ -this.setFieldValidity("contributors",true); -} -}else{ -if(_12.contributors&&_12.contributors.length>0){ -this._editors.contributors=this._createPeopleEditor(this.entryContributorNode,{data:_12.contributors,name:"Contributor"}); -this.setFieldValidity("contributors",true); -} -} -},setId:function(_13,_14,_15){ -if(!_14){ -dojox.atom.widget.FeedEntryEditor.superclass.setId.call(this,_13,_14,_15); -if(_15.id&&_15.id!==null){ -this.setFieldValidity("id",true); -} -}else{ -if(_15.id&&_15.id!==null){ -this._editors.id=this._createEditor(_13,_15.id); -this.setFieldValidity("id",true); -} -} -},setUpdated:function(_16,_17,_18){ -if(!_17){ -dojox.atom.widget.FeedEntryEditor.superclass.setUpdated.call(this,_16,_17,_18); -if(_18.updated&&_18.updated!==null){ -this.setFieldValidity("updated",true); -} -}else{ -if(_18.updated&&_18.updated!==null){ -this._editors.updated=this._createEditor(_16,_18.updated); -this.setFieldValidity("updated",true); -} -} -},setSummary:function(_19,_1a,_1b){ -if(!_1a){ -dojox.atom.widget.FeedEntryEditor.superclass.setSummary.call(this,_19,_1a,_1b); -if(_1b.summary&&_1b.summary.value&&_1b.summary.value!==null){ -this.setFieldValidity("summary",true); -} -}else{ -if(_1b.summary&&_1b.summary.value&&_1b.summary.value!==null){ -if(!this._toLoad){ -this._toLoad=[]; -} -this.entrySummarySelect.value=_1b.summary.type; -var _1c=this._createEditor(_19,_1b.summary,true,_1b.summary.type==="html"||_1b.summary.type==="xhtml"); -_1c.name="summary"; -this._toLoad.push(_1c); -this.setFieldValidity("summaryedit",true); -this.setFieldValidity("summary",true); -} -} -},setContent:function(_1d,_1e,_1f){ -if(!_1e){ -dojox.atom.widget.FeedEntryEditor.superclass.setContent.call(this,_1d,_1e,_1f); -if(_1f.content&&_1f.content.value&&_1f.content.value!==null){ -this.setFieldValidity("content",true); -} -}else{ -if(_1f.content&&_1f.content.value&&_1f.content.value!==null){ -if(!this._toLoad){ -this._toLoad=[]; -} -this.entryContentSelect.value=_1f.content.type; -var _20=this._createEditor(_1d,_1f.content,true,_1f.content.type==="html"||_1f.content.type==="xhtml"); -_20.name="content"; -this._toLoad.push(_20); -this.setFieldValidity("contentedit",true); -this.setFieldValidity("content",true); -} -} -},_createEditor:function(_21,_22,_23,rte){ -var _25; -var box; -if(!_22){ -if(rte){ -return {anchorNode:_21,entryValue:"",editor:null,generateEditor:function(){ -var _27=document.createElement("div"); -_27.innerHTML=this.entryValue; -this.anchorNode.appendChild(_27); -var _28=new dijit.Editor({},_27); -this.editor=_28; -return _28; -}}; -} -if(_23){ -_25=document.createElement("textarea"); -_21.appendChild(_25); -dojo.style(_25,"width","90%"); -box=new dijit.form.SimpleTextarea({},_25); -}else{ -_25=document.createElement("input"); -_21.appendChild(_25); -dojo.style(_25,"width","95%"); -box=new dijit.form.TextBox({},_25); -} -box.attr("value",""); -return box; -} -var _29; -if(_22.value!==undefined){ -_29=_22.value; -}else{ -if(_22.attr){ -_29=_22.attr("value"); -}else{ -_29=_22; -} -} -if(rte){ -if(_29.indexOf("<")!=-1){ -_29=_29.replace(/</g,"<"); -} -return {anchorNode:_21,entryValue:_29,editor:null,generateEditor:function(){ -var _2a=document.createElement("div"); -_2a.innerHTML=this.entryValue; -this.anchorNode.appendChild(_2a); -var _2b=new dijit.Editor({},_2a); -this.editor=_2b; -return _2b; -}}; -} -if(_23){ -_25=document.createElement("textarea"); -_21.appendChild(_25); -dojo.style(_25,"width","90%"); -box=new dijit.form.SimpleTextarea({},_25); -}else{ -_25=document.createElement("input"); -_21.appendChild(_25); -dojo.style(_25,"width","95%"); -box=new dijit.form.TextBox({},_25); -} -box.attr("value",_29); -return box; -},_switchEditor:function(_2c){ -var _2d=null; -var _2e=null; -var _2f=null; -if(dojo.isIE){ -_2e=_2c.srcElement; -}else{ -_2e=_2c.target; -} -if(_2e===this.entryTitleSelect){ -_2f=this.entryTitleNode; -_2d="title"; -}else{ -if(_2e===this.entrySummarySelect){ -_2f=this.entrySummaryNode; -_2d="summary"; -}else{ -_2f=this.entryContentNode; -_2d="content"; -} -} -var _30=this._editors[_2d]; -var _31; -var _32; -if(_2e.value==="text"){ -if(_30.declaredClass==="dijit.Editor"){ -_32=_30.attr("value",false); -_30.close(false,true); -_30.destroy(); -while(_2f.firstChild){ -dojo.destroy(_2f.firstChild); -} -_31=this._createEditor(_2f,{value:_32},true,false); -this._editors[_2d]=_31; -} -}else{ -if(_30.declaredClass!="dijit.Editor"){ -_32=_30.attr("value"); -_30.destroy(); -while(_2f.firstChild){ -dojo.destroy(_2f.firstChild); -} -_31=this._createEditor(_2f,{value:_32},true,true); -_31=dojo.hitch(_31,_31.generateEditor)(); -this._editors[_2d]=_31; -} -} -},_createPeopleEditor:function(_33,_34){ -var _35=document.createElement("div"); -_33.appendChild(_35); -return new dojox.atom.widget.PeopleEditor(_34,_35); -},saveEdits:function(){ -dojo.style(this.entrySaveCancelButtons,"display","none"); -dojo.style(this.entryEditButton,"display",""); -dojo.style(this.entryNewButton,"display",""); -var _36=false; -var _37; -var i; -var _39; -var _3a; -var _3b; -var _3c; -if(!this._new){ -_3a=this.getEntry(); -if(this._editors.title&&(this._editors.title.attr("value")!=_3a.title.value||this.entryTitleSelect.value!=_3a.title.type)){ -_37=this._editors.title.attr("value"); -if(this.entryTitleSelect.value==="xhtml"){ -_37=this._enforceXhtml(_37); -if(_37.indexOf("<div xmlns=\"http://www.w3.org/1999/xhtml\">")!==0){ -_37="<div xmlns=\"http://www.w3.org/1999/xhtml\">"+_37+"</div>"; -} -} -_3a.title=new dojox.atom.io.model.Content("title",_37,null,this.entryTitleSelect.value); -_36=true; -} -if(this._editors.id.attr("value")!=_3a.id){ -_3a.id=this._editors.id.attr("value"); -_36=true; -} -if(this._editors.summary&&(this._editors.summary.attr("value")!=_3a.summary.value||this.entrySummarySelect.value!=_3a.summary.type)){ -_37=this._editors.summary.attr("value"); -if(this.entrySummarySelect.value==="xhtml"){ -_37=this._enforceXhtml(_37); -if(_37.indexOf("<div xmlns=\"http://www.w3.org/1999/xhtml\">")!==0){ -_37="<div xmlns=\"http://www.w3.org/1999/xhtml\">"+_37+"</div>"; -} -} -_3a.summary=new dojox.atom.io.model.Content("summary",_37,null,this.entrySummarySelect.value); -_36=true; -} -if(this._editors.content&&(this._editors.content.attr("value")!=_3a.content.value||this.entryContentSelect.value!=_3a.content.type)){ -_37=this._editors.content.attr("value"); -if(this.entryContentSelect.value==="xhtml"){ -_37=this._enforceXhtml(_37); -if(_37.indexOf("<div xmlns=\"http://www.w3.org/1999/xhtml\">")!==0){ -_37="<div xmlns=\"http://www.w3.org/1999/xhtml\">"+_37+"</div>"; -} -} -_3a.content=new dojox.atom.io.model.Content("content",_37,null,this.entryContentSelect.value); -_36=true; -} -if(this._editors.authors){ -if(_36){ -_3a.authors=[]; -_3b=this._editors.authors.getValues(); -for(i in _3b){ -if(_3b[i].name||_3b[i].email||_3b[i].uri){ -_3a.addAuthor(_3b[i].name,_3b[i].email,_3b[i].uri); -} -} -}else{ -var _3d=_3a.authors; -var _3e=function(_3f,_40,uri){ -for(i in _3d){ -if(_3d[i].name===_3f&&_3d[i].email===_40&&_3d[i].uri===uri){ -return true; -} -} -return false; -}; -_3b=this._editors.authors.getValues(); -_39=false; -for(i in _3b){ -if(!_3e(_3b[i].name,_3b[i].email,_3b[i].uri)){ -_39=true; -break; -} -} -if(_39){ -_3a.authors=[]; -for(i in _3b){ -if(_3b[i].name||_3b[i].email||_3b[i].uri){ -_3a.addAuthor(_3b[i].name,_3b[i].email,_3b[i].uri); -} -} -_36=true; -} -} -} -if(this._editors.contributors){ -if(_36){ -_3a.contributors=[]; -_3c=this._editors.contributors.getValues(); -for(i in _3c){ -if(_3c[i].name||_3c[i].email||_3c[i].uri){ -_3a.addAuthor(_3c[i].name,_3c[i].email,_3c[i].uri); -} -} -}else{ -var _42=_3a.contributors; -var _43=function(_44,_45,uri){ -for(i in _42){ -if(_42[i].name===_44&&_42[i].email===_45&&_42[i].uri===uri){ -return true; -} -} -return false; -}; -_3c=this._editors.contributors.getValues(); -_39=false; -for(i in _3c){ -if(_43(_3c[i].name,_3c[i].email,_3c[i].uri)){ -_39=true; -break; -} -} -if(_39){ -_3a.contributors=[]; -for(i in _3c){ -if(_3c[i].name||_3c[i].email||_3c[i].uri){ -_3a.addContributor(_3c[i].name,_3c[i].email,_3c[i].uri); -} -} -_36=true; -} -} -} -if(_36){ -dojo.publish(this.entrySelectionTopic,[{action:"update",source:this,entry:_3a,callback:this._handleSave}]); -} -}else{ -this._new=false; -_3a=new dojox.atom.io.model.Entry(); -_37=this._editors.title.attr("value"); -if(this.entryTitleSelect.value==="xhtml"){ -_37=this._enforceXhtml(_37); -_37="<div xmlns=\"http://www.w3.org/1999/xhtml\">"+_37+"</div>"; -} -_3a.setTitle(_37,this.entryTitleSelect.value); -_3a.id=this._editors.id.attr("value"); -_3b=this._editors.authors.getValues(); -for(i in _3b){ -if(_3b[i].name||_3b[i].email||_3b[i].uri){ -_3a.addAuthor(_3b[i].name,_3b[i].email,_3b[i].uri); -} -} -_3c=this._editors.contributors.getValues(); -for(i in _3c){ -if(_3c[i].name||_3c[i].email||_3c[i].uri){ -_3a.addContributor(_3c[i].name,_3c[i].email,_3c[i].uri); -} -} -_37=this._editors.summary.attr("value"); -if(this.entrySummarySelect.value==="xhtml"){ -_37=this._enforceXhtml(_37); -_37="<div xmlns=\"http://www.w3.org/1999/xhtml\">"+_37+"</div>"; -} -_3a.summary=new dojox.atom.io.model.Content("summary",_37,null,this.entrySummarySelect.value); -_37=this._editors.content.attr("value"); -if(this.entryContentSelect.value==="xhtml"){ -_37=this._enforceXhtml(_37); -_37="<div xmlns=\"http://www.w3.org/1999/xhtml\">"+_37+"</div>"; -} -_3a.content=new dojox.atom.io.model.Content("content",_37,null,this.entryContentSelect.value); -dojo.style(this.entryNewButton,"display",""); -dojo.publish(this.entrySelectionTopic,[{action:"post",source:this,entry:_3a}]); -} -this._editMode=false; -this.setEntry(_3a,this._feed,true); -},_handleSave:function(_47,_48){ -this._editMode=false; -this.clear(); -this.setEntry(_47,this.getFeed(),true); -},cancelEdits:function(){ -this._new=false; -dojo.style(this.entrySaveCancelButtons,"display","none"); -if(this._editable){ -dojo.style(this.entryEditButton,"display",""); -} -dojo.style(this.entryNewButton,"display",""); -this._editMode=false; -this.clearEditors(); -this.setEntry(this.getEntry(),this.getFeed(),true); -},clear:function(){ -this._editable=false; -this.clearEditors(); -dojox.atom.widget.FeedEntryEditor.superclass.clear.apply(this); -if(this._contentEditor){ -this._contentEditor=this._setObject=this._oldContent=this._contentEditorCreator=null; -this._editors={}; -} -},clearEditors:function(){ -for(var key in this._editors){ -if(this._editors[key].declaredClass==="dijit.Editor"){ -this._editors[key].close(false,true); -} -this._editors[key].destroy(); -} -this._editors={}; -},_enforceXhtml:function(_4a){ -var _4b=null; -if(_4a){ -var _4c=/<br>/g; -_4b=_4a.replace(_4c,"<br/>"); -_4b=this._closeTag(_4b,"hr"); -_4b=this._closeTag(_4b,"img"); -} -return _4b; -},_closeTag:function(_4d,tag){ -var _4f="<"+tag; -var _50=_4d.indexOf(_4f); -if(_50!==-1){ -while(_50!==-1){ -var _51=""; -var _52=false; -for(var i=0;i<_4d.length;i++){ -var c=_4d.charAt(i); -if(i<=_50||_52){ -_51+=c; -}else{ -if(c===">"){ -_51+="/"; -_52=true; -} -_51+=c; -} -} -_4d=_51; -_50=_4d.indexOf(_4f,_50+1); -} -} -return _4d; -},_toggleNew:function(){ -dojo.style(this.entryNewButton,"display","none"); -dojo.style(this.entryEditButton,"display","none"); -dojo.style(this.entrySaveCancelButtons,"display",""); -this.entrySummarySelect.value="text"; -this.entryContentSelect.value="text"; -this.entryTitleSelect.value="text"; -this.clearNodes(); -this._new=true; -var _55=dojo.i18n.getLocalization("dojox.atom.widget","FeedEntryViewer"); -var _56=new dojox.atom.widget.EntryHeader({title:_55.title}); -this.entryTitleHeader.appendChild(_56.domNode); -this._editors.title=this._createEditor(this.entryTitleNode,null); -this.setFieldValidity("title",true); -var _57=new dojox.atom.widget.EntryHeader({title:_55.authors}); -this.entryAuthorHeader.appendChild(_57.domNode); -this._editors.authors=this._createPeopleEditor(this.entryAuthorNode,{name:"Author"}); -this.setFieldValidity("authors",true); -var _58=new dojox.atom.widget.EntryHeader({title:_55.contributors}); -this.entryContributorHeader.appendChild(_58.domNode); -this._editors.contributors=this._createPeopleEditor(this.entryContributorNode,{name:"Contributor"}); -this.setFieldValidity("contributors",true); -var _59=new dojox.atom.widget.EntryHeader({title:_55.id}); -this.entryIdHeader.appendChild(_59.domNode); -this._editors.id=this._createEditor(this.entryIdNode,null); -this.setFieldValidity("id",true); -var _5a=new dojox.atom.widget.EntryHeader({title:_55.updated}); -this.entryUpdatedHeader.appendChild(_5a.domNode); -this._editors.updated=this._createEditor(this.entryUpdatedNode,null); -this.setFieldValidity("updated",true); -var _5b=new dojox.atom.widget.EntryHeader({title:_55.summary}); -this.entrySummaryHeader.appendChild(_5b.domNode); -this._editors.summary=this._createEditor(this.entrySummaryNode,null,true); -this.setFieldValidity("summaryedit",true); -this.setFieldValidity("summary",true); -var _5c=new dojox.atom.widget.EntryHeader({title:_55.content}); -this.entryContentHeader.appendChild(_5c.domNode); -this._editors.content=this._createEditor(this.entryContentNode,null,true); -this.setFieldValidity("contentedit",true); -this.setFieldValidity("content",true); -this._displaySections(); -},_displaySections:function(){ -dojo.style(this.entrySummarySelect,"display","none"); -dojo.style(this.entryContentSelect,"display","none"); -dojo.style(this.entryTitleSelect,"display","none"); -if(this.isFieldValid("contentedit")){ -dojo.style(this.entryContentSelect,"display",""); -} -if(this.isFieldValid("summaryedit")){ -dojo.style(this.entrySummarySelect,"display",""); -} -if(this.isFieldValid("titleedit")){ -dojo.style(this.entryTitleSelect,"display",""); -} -dojox.atom.widget.FeedEntryEditor.superclass._displaySections.apply(this); -if(this._toLoad){ -for(var i in this._toLoad){ -var _5e; -if(this._toLoad[i].generateEditor){ -_5e=dojo.hitch(this._toLoad[i],this._toLoad[i].generateEditor)(); -}else{ -_5e=this._toLoad[i]; -} -this._editors[this._toLoad[i].name]=_5e; -this._toLoad[i]=null; -} -this._toLoad=null; -} -}}); -dojo.declare("dojox.atom.widget.PeopleEditor",[dijit._Widget,dijit._Templated,dijit._Container],{templateString:"<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>\n",_rows:[],_editors:[],_index:0,_numRows:0,postCreate:function(){ -var _5f=dojo.i18n.getLocalization("dojox.atom.widget","PeopleEditor"); -if(this.name){ -if(this.name=="Author"){ -this.peopleEditorButton.appendChild(document.createTextNode("["+_5f.addAuthor+"]")); -}else{ -if(this.name=="Contributor"){ -this.peopleEditorButton.appendChild(document.createTextNode("["+_5f.addContributor+"]")); -} -} -}else{ -this.peopleEditorButton.appendChild(document.createTextNode("["+_5f.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 _62 in this._editors[key]){ -this._editors[key][_62].destroy(); -} -} -this._editors=[]; -},_createEditors:function(_63,_64,uri,_66,_67){ -var row=document.createElement("tr"); -this.peopleEditorEditors.appendChild(row); -row.id="removeRow"+_66; -var _69=document.createElement("td"); -_69.setAttribute("align","right"); -row.appendChild(_69); -_69.colSpan=2; -if(this._numRows>0){ -var hr=document.createElement("hr"); -_69.appendChild(hr); -hr.id="hr"+_66; -} -row=document.createElement("span"); -_69.appendChild(row); -row.className="peopleEditorButton"; -dojo.style(row,"font-size","x-small"); -dojo.connect(row,"onclick",this,"_removeEditor"); -row.id="remove"+_66; -_69=document.createTextNode("[X]"); -row.appendChild(_69); -row=document.createElement("tr"); -this.peopleEditorEditors.appendChild(row); -row.id="editorsRow"+_66; -var _6b=document.createElement("td"); -row.appendChild(_6b); -dojo.style(_6b,"width","20%"); -_69=document.createElement("td"); -row.appendChild(_69); -row=document.createElement("table"); -_6b.appendChild(row); -dojo.style(row,"width","100%"); -_6b=document.createElement("tbody"); -row.appendChild(_6b); -row=document.createElement("table"); -_69.appendChild(row); -dojo.style(row,"width","100%"); -_69=document.createElement("tbody"); -row.appendChild(_69); -this._editors[_66]=[]; -this._editors[_66].push(this._createEditor(_63,_67+"name"+_66,"Name:",_6b,_69)); -this._editors[_66].push(this._createEditor(_64,_67+"email"+_66,"Email:",_6b,_69)); -this._editors[_66].push(this._createEditor(uri,_67+"uri"+_66,"URI:",_6b,_69)); -},_createEditor:function(_6c,id,_6e,_6f,_70){ -var row=document.createElement("tr"); -_6f.appendChild(row); -var _72=document.createElement("label"); -_72.setAttribute("for",id); -_72.appendChild(document.createTextNode(_6e)); -_6f=document.createElement("td"); -_6f.appendChild(_72); -row.appendChild(_6f); -row=document.createElement("tr"); -_70.appendChild(row); -_70=document.createElement("td"); -row.appendChild(_70); -var _73=document.createElement("input"); -_73.setAttribute("id",id); -_70.appendChild(_73); -dojo.style(_73,"width","95%"); -var box=new dijit.form.TextBox({},_73); -box.attr("value",_6c); -return box; -},_removeEditor:function(_75){ -var _76=null; -if(dojo.isIE){ -_76=_75.srcElement; -}else{ -_76=_75.target; -} -var id=_76.id; -id=id.substring(6); -for(var key in this._editors[id]){ -this._editors[id][key].destroy(); -} -var _79=dojo.byId("editorsRow"+id); -var _7a=_79.parentNode; -_7a.removeChild(_79); -_79=dojo.byId("removeRow"+id); -_7a=_79.parentNode; -_7a.removeChild(_79); -this._numRows--; -if(this._numRows===1&&_7a.firstChild.firstChild.firstChild.tagName.toLowerCase()==="hr"){ -_79=_7a.firstChild.firstChild; -_79.removeChild(_79.firstChild); -} -this._editors[id]=null; -},_add:function(){ -this._createEditors(null,null,null,this._index); -this._index++; -this._numRows++; -},getValues:function(){ -var _7b=[]; -for(var i in this._editors){ -if(this._editors[i]){ -_7b.push({name:this._editors[i][0].attr("value"),email:this._editors[i][1].attr("value"),uri:this._editors[i][2].attr("value")}); -} -} -return _7b; -}}); -}