rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
|
a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/, C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j, s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this, j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length}, toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j=== -1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false; if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K<Q;K++)if((j=arguments[K])!=null)for(s in j){v=G[s];z=j[s];if(G!==z)if(ga&&z&&(b.isPlainObject(z)||(H=b.isArray(z)))){if(H){H=false;v=v&&b.isArray(v)?v:[]}else v=v&&b.isPlainObject(v)?v:{};G[s]=b.extend(ga,v,z)}else if(z!==B)G[s]=z}return G};b.extend({noConflict:function(j){E.$=e;if(j)E.jQuery=d;return b},isReady:false,readyWait:1,ready:function(j){j===true&&b.readyWait--; if(!b.readyWait||j!==true&&!b.isReady){if(!t.body)return setTimeout(b.ready,1);b.isReady=true;if(!(j!==true&&--b.readyWait>0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload", b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&& !F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&& l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;H<G;){if(s.apply(j[H++],v)===false)break}else if(K)for(z in j){if(s.call(j[z], z,j[z])===false)break}else for(v=j[0];H<G&&s.call(v,H,v)!==false;v=j[++H]);return j},trim:O?function(j){return j==null?"":O.call(j)}:function(j){return j==null?"":j.toString().replace(k,"").replace(o,"")},makeArray:function(j,s){var v=s||[];if(j!=null){var z=b.type(j);j.length==null||z==="string"||z==="function"||z==="regexp"||b.isWindow(j)?M.call(v,j):b.merge(v,j)}return v},inArray:function(j,s){if(s.indexOf)return s.indexOf(j);for(var v=0,z=s.length;v<z;v++)if(s[v]===j)return v;return-1},merge:function(j, s){var v=j.length,z=0;if(typeof s.length==="number")for(var H=s.length;z<H;z++)j[v++]=s[z];else for(;s[z]!==B;)j[v++]=s[z++];j.length=v;return j},grep:function(j,s,v){var z=[],H;v=!!v;for(var G=0,K=j.length;G<K;G++){H=!!s(j[G],G);v!==H&&z.push(j[G])}return z},map:function(j,s,v){for(var z=[],H,G=0,K=j.length;G<K;G++){H=s(j[G],G,v);if(H!=null)z[z.length]=H}return z.concat.apply([],z)},guid:1,proxy:function(j,s,v){if(arguments.length===2)if(typeof s==="string"){v=j;j=v[s];s=B}else if(s&&!b.isFunction(s)){v= s;s=B}if(!s&&j)s=function(){return j.apply(v||this,arguments)};if(j)s.guid=j.guid=j.guid||s.guid||b.guid++;return s},access:function(j,s,v,z,H,G){var K=j.length;if(typeof s==="object"){for(var Q in s)b.access(j,Q,s[Q],z,H,v);return j}if(v!==B){z=!G&&z&&b.isFunction(v);for(Q=0;Q<K;Q++)H(j[Q],s,z?v.call(j[Q],Q,H(j[Q],s)):v,G);return j}return K?H(j[0],s):B},now:function(){return(new Date).getTime()},uaMatch:function(j){j=j.toLowerCase();j=L.exec(j)||g.exec(j)||i.exec(j)||j.indexOf("compatible")<0&&n.exec(j)|| [];return{browser:j[1]||"",version:j[2]||"0"}},browser:{}});b.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(j,s){R["[object "+s+"]"]=s.toLowerCase()});m=b.uaMatch(m);if(m.browser){b.browser[m.browser]=true;b.browser.version=m.version}if(b.browser.webkit)b.browser.safari=true;if(D)b.inArray=function(j,s){return D.call(s,j)};if(!/\s/.test("\u00a0")){k=/^[\s\xA0]+/;o=/[\s\xA0]+$/}f=b(t);if(t.addEventListener)u=function(){t.removeEventListener("DOMContentLoaded",u, false);b.ready()};else if(t.attachEvent)u=function(){if(t.readyState==="complete"){t.detachEvent("onreadystatechange",u);b.ready()}};return E.jQuery=E.$=b}();(function(){c.support={};var a=t.documentElement,b=t.createElement("script"),d=t.createElement("div"),e="script"+c.now();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"),
|
true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
|
iF=document.getElementsByName(md).item(0); pB=iF; x=pB.offsetLeft; y=pB.offsetTop+pB.offsetHeight; var p=pB; while (p.offsetParent){ p=p.offsetParent; x+=p.offsetLeft; y+=p.offsetTop;
|
iF=document.getElementsByName(md).item(0); pB=iF; x=pB.offsetLeft; y=pB.offsetTop+pB.offsetHeight; var p=pB; while (p.offsetParent){ p=p.offsetParent; x+=p.offsetLeft; y+=p.offsetTop; } dt=convertDate(iF.value,dF); nN=document.createElement("div"); nN.setAttribute("id",dateDivID); nN.setAttribute("style","visibility:hidden;"); document.body.appendChild(nN); cD=document.getElementById(dateDivID); cD.style.position="absolute"; cD.style.left=x+"px"; cD.style.top=y+"px"; cD.style.visibility=(cD.style.visibility=="visible" ? "hidden" : "visible"); cD.style.display=(cD.style.display=="block" ? "none" : "block"); cD.style.zIndex=10000; drawCalendar(md,dt.getFullYear(),dt.getMonth(),dt.getDate(),dF);
|
function Calendar(md,dF){iF=document.getElementsByName(md).item(0);pB=iF;x=pB.offsetLeft;y=pB.offsetTop+pB.offsetHeight;var p=pB;while (p.offsetParent){p=p.offsetParent;x+=p.offsetLeft;y+=p.offsetTop;}dt=convertDate(iF.value,dF);nN=document.createElement("div");nN.setAttribute("id",dateDivID);nN.setAttribute("style","visibility:hidden;");document.body.appendChild(nN);cD=document.getElementById(dateDivID);cD.style.position="absolute";cD.style.left=x+"px";cD.style.top=y+"px";cD.style.visibility=(cD.style.visibility=="visible" ? "hidden" : "visible");cD.style.display=(cD.style.display=="block" ? "none" : "block");cD.style.zIndex=10000;drawCalendar(md,dt.getFullYear(),dt.getMonth(),dt.getDate(),dF);}
|
dt=convertDate(iF.value,dF); nN=document.createElement("div"); nN.setAttribute("id",dateDivID); nN.setAttribute("style","visibility:hidden;"); document.body.appendChild(nN); cD=document.getElementById(dateDivID); cD.style.position="absolute"; cD.style.left=x+"px"; cD.style.top=y+"px"; cD.style.visibility=(cD.style.visibility=="visible" ? "hidden" : "visible"); cD.style.display=(cD.style.display=="block" ? "none" : "block"); cD.style.zIndex=10000; drawCalendar(md,dt.getFullYear(),dt.getMonth(),dt.getDate(),dF); }
|
function Calendar(md,dF){iF=document.getElementsByName(md).item(0);pB=iF;x=pB.offsetLeft;y=pB.offsetTop+pB.offsetHeight;var p=pB;while (p.offsetParent){p=p.offsetParent;x+=p.offsetLeft;y+=p.offsetTop;}dt=convertDate(iF.value,dF);nN=document.createElement("div");nN.setAttribute("id",dateDivID);nN.setAttribute("style","visibility:hidden;");document.body.appendChild(nN);cD=document.getElementById(dateDivID);cD.style.position="absolute";cD.style.left=x+"px";cD.style.top=y+"px";cD.style.visibility=(cD.style.visibility=="visible" ? "hidden" : "visible");cD.style.display=(cD.style.display=="block" ? "none" : "block");cD.style.zIndex=10000;drawCalendar(md,dt.getFullYear(),dt.getMonth(),dt.getDate(),dF);}
|
|
iF=document.getElementsByName(md).item(0); pB=iF; x=pB.offsetLeft; y=pB.offsetTop+pB.offsetHeight;
|
var iF=document.getElementsByName(md).item(0); var pB=iF; var x=pB.offsetLeft; var y=pB.offsetTop+pB.offsetHeight;
|
function Calendar(md,dF){iF=document.getElementsByName(md).item(0);pB=iF;x=pB.offsetLeft;y=pB.offsetTop+pB.offsetHeight;var p=pB;while (p.offsetParent){p=p.offsetParent;x+=p.offsetLeft;y+=p.offsetTop;}dt=convertDate(iF.value,dF);nN=document.createElement("div");nN.setAttribute("id",dateDivID);nN.setAttribute("style","visibility:hidden;");document.body.appendChild(nN);cD=document.getElementById(dateDivID);cD.style.position="absolute";cD.style.left=x+"px";cD.style.top=y+"px";cD.style.visibility=(cD.style.visibility=="visible" ? "hidden" : "visible");cD.style.display=(cD.style.display=="block" ? "none" : "block");cD.style.zIndex=10000;drawCalendar(md,dt.getFullYear(),dt.getMonth(),dt.getDate(),dF);}
|
dt=convertDate(iF.value,dF); nN=document.createElement("div");
|
var dt=convertDate(iF.value,dF); var nN=document.createElement("div");
|
function Calendar(md,dF){iF=document.getElementsByName(md).item(0);pB=iF;x=pB.offsetLeft;y=pB.offsetTop+pB.offsetHeight;var p=pB;while (p.offsetParent){p=p.offsetParent;x+=p.offsetLeft;y+=p.offsetTop;}dt=convertDate(iF.value,dF);nN=document.createElement("div");nN.setAttribute("id",dateDivID);nN.setAttribute("style","visibility:hidden;");document.body.appendChild(nN);cD=document.getElementById(dateDivID);cD.style.position="absolute";cD.style.left=x+"px";cD.style.top=y+"px";cD.style.visibility=(cD.style.visibility=="visible" ? "hidden" : "visible");cD.style.display=(cD.style.display=="block" ? "none" : "block");cD.style.zIndex=10000;drawCalendar(md,dt.getFullYear(),dt.getMonth(),dt.getDate(),dF);}
|
cD=document.getElementById(dateDivID);
|
var cD=document.getElementById(dateDivID);
|
function Calendar(md,dF){iF=document.getElementsByName(md).item(0);pB=iF;x=pB.offsetLeft;y=pB.offsetTop+pB.offsetHeight;var p=pB;while (p.offsetParent){p=p.offsetParent;x+=p.offsetLeft;y+=p.offsetTop;}dt=convertDate(iF.value,dF);nN=document.createElement("div");nN.setAttribute("id",dateDivID);nN.setAttribute("style","visibility:hidden;");document.body.appendChild(nN);cD=document.getElementById(dateDivID);cD.style.position="absolute";cD.style.left=x+"px";cD.style.top=y+"px";cD.style.visibility=(cD.style.visibility=="visible" ? "hidden" : "visible");cD.style.display=(cD.style.display=="block" ? "none" : "block");cD.style.zIndex=10000;drawCalendar(md,dt.getFullYear(),dt.getMonth(),dt.getDate(),dF);}
|
C.infoMsg("Thread killed") Ext.StoreMgr.get("threads").reload(); }
|
var result = Ext.decode(response.responseText); if (result.success){ C.body.unmask(); C.infoMsg("Task '" + name + "' deleted."); config.task.hideForm(); } else { C.showAjaxError(response.responseText); } }
|
callback:function(options,success,response){ C.infoMsg("Thread killed") Ext.StoreMgr.get("threads").reload(); }
|
element = YAHOO.util.Dom.get('repeat-begin-' + id);
|
element = YAHOO.util.Dom.get("repeat-begin-" + id);
|
callUserScript: function(functionName, targetId, observerId) { function getElement(id) { var element = YAHOO.util.Dom.get(id); if (element == null) { // Try to find repeat (some events xxforms-nodeset-changed can target the repeat) element = YAHOO.util.Dom.get("repeat-begin-" + id); if (element == null) { // Try getting repeat delimiter var separatorPosition = Math.max(id.lastIndexOf(XFORMS_SEPARATOR_1), id.lastIndexOf(XFORMS_SEPARATOR_2)); if (separatorPosition != -1) { var repeatID = id.substring(0, separatorPosition); var iteration = id.substring(separatorPosition + 1); element = ORBEON.util.Utils.findRepeatDelimiter(repeatID, iteration); if (element == null) { // If everything else has failed, the id might be an xforms:repeat id! element = YAHOO.util.Dom.get('repeat-begin-' + id); } } } } return element; } var targetElement = getElement(targetId); var observer = getElement(observerId); var event = { "target" : targetElement }; var theFunction = eval(functionName); theFunction.call(observer, event); }
|
var separatorPosition = Math.max(id.lastIndexOf(XFORMS_SEPARATOR_1), id.lastIndexOf(XFORMS_SEPARATOR_2)); if (separatorPosition != -1) { var repeatID = id.substring(0, separatorPosition); var iteration = id.substring(separatorPosition + 1); element = ORBEON.util.Utils.findRepeatDelimiter(repeatID, iteration); if (element == null) { element = YAHOO.util.Dom.get('repeat-begin-' + id);
|
element = YAHOO.util.Dom.get("repeat-begin-" + id); if (element == null) { var separatorPosition = Math.max(id.lastIndexOf(XFORMS_SEPARATOR_1), id.lastIndexOf(XFORMS_SEPARATOR_2)); if (separatorPosition != -1) { var repeatID = id.substring(0, separatorPosition); var iteration = id.substring(separatorPosition + 1); element = ORBEON.util.Utils.findRepeatDelimiter(repeatID, iteration); if (element == null) { element = YAHOO.util.Dom.get('repeat-begin-' + id); }
|
callUserScript: function(functionName, targetId, observerId) { function getElement(id) { var element = YAHOO.util.Dom.get(id); if (element == null) { // Try getting repeat delimiter var separatorPosition = Math.max(id.lastIndexOf(XFORMS_SEPARATOR_1), id.lastIndexOf(XFORMS_SEPARATOR_2)); if (separatorPosition != -1) { var repeatID = id.substring(0, separatorPosition); var iteration = id.substring(separatorPosition + 1); element = ORBEON.util.Utils.findRepeatDelimiter(repeatID, iteration); if (element == null) { // If everything else has failed, the id might be an xforms:repeat id! element = YAHOO.util.Dom.get('repeat-begin-' + id); } } } return element; } var targetElement = getElement(targetId); var observer = getElement(observerId); var event = { "target" : targetElement }; var theFunction = eval(functionName); theFunction.call(observer, event); }
|
$(document).unbind('mousemove.orderable', change); $(document).unbind('mouseup.orderable', stop);
|
$(document).unbind('.orderable');
|
cancel: function() { $(document).unbind('mousemove.orderable', change); $(document).unbind('mouseup.orderable', stop); if (state != null) { object.removeClass('ordering'); state.item.removeClass('ordering'); object.trigger('ordercancel', [state.item]); state = null; } },
|
if (callback == targetCallback) { continue; }
|
if (callback != targetCallback) { continue; }
|
cancelWindowResize: function(targetCallback) { for (var i=0, callback; callback = windowResizeCallbacks[i]; i++) { if (callback == targetCallback) { continue; } windowResizeCallbacks.splice(i, 1); return; } },
|
capfirst: function (value, arg) { return utils.string.cap_first("" + value); },
|
capfirst: function (value, arg) { return string_utils.cap_first("" + value); },
|
capfirst: function (value, arg) { return utils.string.cap_first("" + value); },
|
center: function (value, arg) { return utils.string.center("" + value, arg - 0); },
|
center: function (value, arg) { return string_utils.center("" + value, arg - 0); },
|
center: function (value, arg) { return utils.string.center("" + value, arg - 0); },
|
state.min = Math.min(b, a + (item.prev().offset().top || -Infinity));
|
state.min = Math.min(b, a + (prev.size() > 0 ? prev.offset().top : -Infinity));
|
var change = function(event) { var item = state.item; var target, next, top = event.pageY; var a = item.height(); var b = item.offset().top; state.min = Math.min(b, a + (item.prev().offset().top || -Infinity)); state.max = Math.max(a + b, b + (item.next().height() || Infinity)); if (!object.is('.ordering')) { object.addClass('ordering'); item.addClass('ordering'); object.trigger('orderstart', [state.item]); } if (top < state.min) { target = item.prev(settings.items); while (true) { state.delta--; next = target.prev(settings.items); if (next.length === 0 || top >= (state.min -= next.height())) { item.insertBefore(target); break; } target = next; } } else if (top > state.max) { target = item.next(settings.items); while (true) { state.delta++; next = target.next(settings.items); if (next.length === 0 || top <= (state.max += next.height())) { item.insertAfter(target); break; } target = next; } } object.trigger('orderchange', [state.item]); return false; };
|
clear(id); draw(id, current);
|
var changed = function(id, current) { var children = find_in_tree(id, current).children; var target = $(id); target.value = current; clear(id); draw(id, current); if (children.length) { add(id, children, 0); } };
|
|
clear(id); draw(id, current);
|
var changed = function(id, current) { var children = find_in_tree(id, current).children; var target = $(id); target.value = current; clear(id); draw(id, current); if (children.length) { add(id, children, 0); } };
|
|
init(dd, elem_id);
|
var changed = function(dd) { var elem_id = dd.options[dd.selectedIndex].value; init(dd, elem_id); push_current(dd); };
|
|
return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!o(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"=== g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,h){return h===0},last:function(g,h,k,l){return h===l.length-1},even:function(g,h){return h%2===
|
text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
|
return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!o(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,h){return h===0},last:function(g,h,k,l){return h===l.length-1},even:function(g,h){return h%2===
|
YA.areEqual(readonly, YD.hasClass(YD.getElementsByClassName("yui-button", null, buttonId)[0], "yui-button-disabled"),
|
YUA.areEqual(readonly, YUD.hasClass(YUD.getElementsByClassName("yui-button", null, buttonId)[0], "yui-button-disabled"),
|
checkButtonState: function(readonly, relevant) { return function() { _.each(["my-button-normal", "my-button-full-update"], function(buttonId) { if (relevant) { YA.areEqual(readonly, YD.hasClass(YD.getElementsByClassName("yui-button", null, buttonId)[0], "yui-button-disabled"), buttonId + ": class yui-button-disabled is not in the expected state"); YA.areEqual(readonly, OD.getElementByTagName(OD.get(buttonId), "button").disabled, buttonId + ": disabled attribute is not in the expected state"); } }); }; },
|
YA.areEqual(readonly, OD.getElementByTagName(OD.get(buttonId), "button").disabled,
|
YUA.areEqual(readonly, OUD.getElementByTagName(OUD.get(buttonId), "button").disabled,
|
checkButtonState: function(readonly, relevant) { return function() { _.each(["my-button-normal", "my-button-full-update"], function(buttonId) { if (relevant) { YA.areEqual(readonly, YD.hasClass(YD.getElementsByClassName("yui-button", null, buttonId)[0], "yui-button-disabled"), buttonId + ": class yui-button-disabled is not in the expected state"); YA.areEqual(readonly, OD.getElementByTagName(OD.get(buttonId), "button").disabled, buttonId + ": disabled attribute is not in the expected state"); } }); }; },
|
var classPrefix = 'dt-' + table.id.replace('\$', '-', 'g') + '-col-';
|
var classPrefix = 'dt-' + table.id.replace(/\$/g, '-') + '-col-';
|
checkCellClasses: function(table, isSplit) { if (YAHOO.env.ua.ie != 0) { return; } var headerTable = this.getHeaderTable(table, isSplit); var classPrefix = 'dt-' + table.id.replace('\$', '-', 'g') + '-col-'; this.checkCellClassesInARow(headerTable.tHead.rows[0], classPrefix); var rows = table.tBodies[0].rows; for (var i = 0; i < rows.length; i++) { var row = rows[i]; if (this.isSignificant(row)) { this.checkCellClassesInARow(row, classPrefix); } } },
|
var rows = tabvle.tBodies[0].rows;
|
var rows = table.tBodies[0].rows;
|
checkCellClasses: function(table, isSplit) { if (YAHOO.env.ua.ie != 0) { return; } var headerTable = this.getHeaderTable(table, isSplit); var classPrefix = 'dt-' + table.id.replace('\$', '-', 'g') + '-col-'; this.checkCellClassesInARow(headerTable.tHead.rows[0], classPrefix); var rows = tabvle.tBodies[0].rows; for (var i = 0; i < rows.length; i++) { var row = rows[i]; if (this.isSignificant(row)) { this.checkCellClassesInARow(row, classPrefix); } } },
|
this.checkCellClassesInARow(table.tHead.rows[0], classPrefix); var bodyTable = this.getBodyTable(table, isSplit); var rows = bodyTable.tBodies[0].rows;
|
this.checkCellClassesInARow(headerTable.tHead.rows[0], classPrefix); var rows = tabvle.tBodies[0].rows;
|
checkCellClasses: function(table, isSplit) { if (YAHOO.env.ua.ie != 0) { return; } var classPrefix = 'dt-' + table.id.replace('\$', '-', 'g') + '-col-'; this.checkCellClassesInARow(table.tHead.rows[0], classPrefix); var bodyTable = this.getBodyTable(table, isSplit); var rows = bodyTable.tBodies[0].rows; for (var i = 0; i < rows.length; i++) { var row = rows[i]; if (this.isSignificant(row)) { this.checkCellClassesInARow(row, classPrefix); } } },
|
var iActual = 0; f
|
var iActual = 0;
|
checkCellClassesInARow: function(row, classPrefix) { var iActual = 0; f for (var i = 0; i < row.cells.length; i++) { var cell = row.cells[i]; if (this.isSignificant(cell)) { iActual += 1; var liner = ORBEON.widgets.datatable.utils.getFirstChildByTagAndClassName(cell, 'div', 'yui-dt-liner'); if (liner != undefined) { var className = classPrefix + iActual; YAHOO.util.Assert.isTrue(YAHOO.util.Dom.hasClass(liner, className), 'Cell column ' + iActual + ' should have a class ' + className + '. Its current class attribute is: ' + liner.className); } } } },
|
var headerCells = table.tHead.rows[0].cells;
|
var headerCells = headerTable.tHead.rows[0].cells;
|
checkCellStyles: function(table, isSplit) { if (YAHOO.env.ua.ie == 0) { return; } var colWidths = []; var headerCells = table.tHead.rows[0].cells; for (var i = 0; i < headerCells.length; i++) { var cell = headerCells[i]; if (this.isSignificant(cell)) { var liner = YAHOO.util.Dom.getElementsByClassName('yui-dt-liner', 'div', cell)[0]; colWidths.push(liner.style.width); YAHOO.util.Assert.areNotEqual('', liner.style.width, 'Header cell for column ' + colWidths.length + ' should have a style width property in IE'); YAHOO.util.Assert.areNotEqual('auto', liner.style.width, 'Header cell for column ' + colWidths.length + ' should have a style width property in IE'); } } var bodyTable = this.getBodyTable(table, isSplit); var rows = bodyTable.tBodies[0].rows; var iActual = 0; for (var i = 0; i < rows.length; i++) { var row = rows[i]; if (this.isSignificant(row)) { iActual += 1; var jActual = 0; for (var j = 0; j < row.cells.length; j++) { var cell = row.cells[j]; if (this.isSignificant(cell)) { var liner = ORBEON.widgets.datatable.utils.getFirstChildByTagAndClassName(cell, 'div', 'yui-dt-liner'); if (liner != undefined) { YAHOO.util.Assert.areEqual(colWidths[jActual], liner.style.width, 'Body cell for row ' + iActual + ' and column ' + (jActual + 1) + ' should have a style width property equal to ' + colWidths[jActual]); jActual += 1; } } } } } },
|
var bodyTable = this.getBodyTable(table, isSplit); var rows = bodyTable.tBodies[0].rows;
|
var rows = table.tBodies[0].rows;
|
checkCellStyles: function(table, isSplit) { if (YAHOO.env.ua.ie == 0) { return; } var colWidths = []; var headerCells = table.tHead.rows[0].cells; for (var i = 0; i < headerCells.length; i++) { var cell = headerCells[i]; if (this.isSignificant(cell)) { var liner = YAHOO.util.Dom.getElementsByClassName('yui-dt-liner', 'div', cell)[0]; colWidths.push(liner.style.width); YAHOO.util.Assert.areNotEqual('', liner.style.width, 'Header cell for column ' + colWidths.length + ' should have a style width property in IE'); YAHOO.util.Assert.areNotEqual('auto', liner.style.width, 'Header cell for column ' + colWidths.length + ' should have a style width property in IE'); } } var bodyTable = this.getBodyTable(table, isSplit); var rows = bodyTable.tBodies[0].rows; var iActual = 0; for (var i = 0; i < rows.length; i++) { var row = rows[i]; if (this.isSignificant(row)) { iActual += 1; var jActual = 0; for (var j = 0; j < row.cells.length; j++) { var cell = row.cells[j]; if (this.isSignificant(cell)) { var liner = ORBEON.widgets.datatable.utils.getFirstChildByTagAndClassName(cell, 'div', 'yui-dt-liner'); if (liner != undefined) { YAHOO.util.Assert.areEqual(colWidths[jActual], liner.style.width, 'Body cell for row ' + iActual + ' and column ' + (jActual + 1) + ' should have a style width property equal to ' + colWidths[jActual]); jActual += 1; } } } } } },
|
if (element.id != "disabled$xforms-input-1" + XFORMS_SEPARATOR_1 + "1")
|
if (element.id != "disabled-input$xforms-input-1" + XFORMS_SEPARATOR_1 + "1" && element.id != "readonly-input$xforms-input-1" + XFORMS_SEPARATOR_1 + "1")
|
checkDisabled: function(disabled) { var elements = this.getFormControls(); for (var elementIndex = 0; elementIndex < elements.length; elementIndex++) { var element = elements[elementIndex]; if (element.id != "disabled$xforms-input-1" + XFORMS_SEPARATOR_1 + "1") YAHOO.util.Assert.areEqual(disabled, element.disabled, "element " + element.id + " supposed to have disabled = " + disabled); } },
|
Assert.areEqual(text, OD.getStringValue(body), "unexpected message in dialog");
|
var span = OD.getChildElementByIndex(body, 0); Assert.areEqual(text, OD.getStringValue(span), "unexpected message in dialog");
|
checkDisplayedMessage: function(text) { var dialog = OD.get("xforms-message-dialog"); Assert.areEqual("visible", dialog.parentNode.style.visibility, "dialog is visible"); var body = YD.getElementsByClassName("bd", null, dialog)[0]; Assert.areEqual(text, OD.getStringValue(body), "unexpected message in dialog"); dialog.getElementsByTagName("button")[0].click(); },
|
return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!o(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===
|
g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
|
return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!o(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===
|
log("found no feature on myNewLayer for " + givenId);
|
log("[ERROR] found no feature on myNewLayer for " + givenId);
|
function checkFeatureByOriginId(givenId) { for ( i=0; i<myNewLayer.features.length; i++ ) { if ( myNewLayer.features[i].data.originId == givenId ) { return myNewLayer.features[i]; } } // ### TODO: Show Notification to User log("found no feature on myNewLayer for " + givenId); return null; }
|
element.val("");
|
jLoader.Page_share.Textarea.CheckForLink = function ( pElement, pParent ) { element = $(pElement); if ( element.val().toString().search( new RegExp( /^http/i ) ) == 0 ) { $('#page-share').tabs('select', 1); $('#page-share .link').val ( element.val() ); $('#page-share .link').blur(); $('#page-share .link-content').focus(); } }
|
|
if ( element.val().toString().search( new RegExp( /^http:\/\ $('#page-share').tabs('select', 1); $('#page-share .link').val ( element.val() ); element.val(""); $('#page-share .link').blur(); $('#page-share .link-content').focus();
|
if ( element.hasClass ( 'content' ) ) { if ( element.val().toString().search( new RegExp( /^http:\/\ $('#page-share').tabs('select', 1); $('#page-share .link').val ( element.val() ); element.val(""); $('#page-share .link').blur(); $('#page-share .link-content').focus(); }
|
jLoader.Page_share.Textarea.CheckForLink = function ( pElement, pParent ) { element = $(pElement); if ( element.val().toString().search( new RegExp( /^http:\/\//i ) ) == 0 ) { $('#page-share').tabs('select', 1); $('#page-share .link').val ( element.val() ); element.val(""); $('#page-share .link').blur(); $('#page-share .link-content').focus(); } }
|
YAHOO.util.Assert.areEqual(isSplit, headerTable.tBodies.length == 0, "Header table's body doesn't match split status");
|
YAHOO.util.Assert.areEqual(isSplit, headerTable.tBodies.length == 0 || (headerTable.tBodies.length == 1 && headerTable.tBodies[0].rows.length == 0), "Header table's body doesn't match split status");
|
checkIsSplit: function(table, isSplit) { //YAHOO.util.Assert.areEqual(isSplit, table.tBodies.length == 0, "Header table's body doesn't match split status"); var headerTable = this.getHeaderTable(table, isSplit); YAHOO.util.Assert.areEqual(isSplit, headerTable.tBodies.length == 0, "Header table's body doesn't match split status"); //YAHOO.util.Assert.areEqual(isSplit, bodyTable.tHead == undefined, "Body table's header doesn't match split status"); },
|
YAHOO.util.Assert.areEqual(isSplit, table.tBodies.length == 0, "Header table's body doesn't match split status"); var bodyTable = this.getBodyTable(table, isSplit); YAHOO.util.Assert.areEqual(isSplit, bodyTable.tHead == undefined, "Body table's header doesn't match split status");
|
var headerTable = this.getHeaderTable(table, isSplit); YAHOO.util.Assert.areEqual(isSplit, headerTable.tBodies.length == 0, "Header table's body doesn't match split status");
|
checkIsSplit: function(table, isSplit) { YAHOO.util.Assert.areEqual(isSplit, table.tBodies.length == 0, "Header table's body doesn't match split status"); var bodyTable = this.getBodyTable(table, isSplit); YAHOO.util.Assert.areEqual(isSplit, bodyTable.tHead == undefined, "Body table's header doesn't match split status"); },
|
var bodyTable = this.getBodyTable(table, isSplit); var rows = bodyTable.tBodies[0].rows;
|
var rows = table.tBodies[0].rows;
|
checkNumberRows: function(table, nbRows, isSplit) { var bodyTable = this.getBodyTable(table, isSplit); var rows = bodyTable.tBodies[0].rows; var nbRowsActual = 0; for (var i = 0; i < rows.length; i++) { var row = rows[i]; if (this.isSignificant(row)) { nbRowsActual += 1; } } YAHOO.util.Assert.areEqual(nbRows, nbRowsActual, nbRowsActual + ' rows found on the instead of ' + nbRows); },
|
alert(ml); alert(my_form);
|
function checkOrUncheckAll(ml,bCheck){ // var ml = document.myform; var my_form=document.getElementById(ml); alert(ml); alert(my_form); var len = my_form.elements.length; for (var idx = 0; idx < len; idx++) { var e = my_form.elements[idx]; if (e.type == "checkbox") { e.checked = bCheck; } }}
|
|
alert('REQEEEE');
|
function checkRequiredCustomFields(cfields_inputs){ var CFIELD_TYPE_IDX=2; var cfields_container=''; var custom_field_types = new Array(); var checkStatus = {status_ok: true, msg_id: null, cfield_label: null}; var whitespace = " \t\n\r"; // Developer notes: // If new custom field types are added in PHP code, you need to add it also here // Not all types declared here will be validated. custom_field_types[0]='string'; custom_field_types[1]='numeric'; custom_field_types[2]='float'; custom_field_types[4]='email'; custom_field_types[5]='checkbox'; custom_field_types[6]='list'; custom_field_types[7]='multiselection list'; custom_field_types[8]='date'; custom_field_types[9]='radio'; custom_field_types[10]='datetime'; custom_field_types[20]='text area'; custom_field_types[500]='script'; custom_field_types[501]='server'; for(var idx = 0; idx < cfields_inputs.length; idx++) { // Important: // elemName format for custom fields -> custom_field_<cfield_type>_<cfield_id>[_<testcase_id>] var elemName = cfields_inputs[idx].name; var elemID = cfields_inputs[idx].id; var nameParts=elemName.split("_"); var cfield_type=custom_field_types[nameParts[CFIELD_TYPE_IDX]]; var cfield_value=cfields_inputs[idx].value; if(cfields_inputs[idx].className == 'required') { checkStatus.status_ok = !(cfield_value.length == 0); if(checkStatus.status_ok) { // check for whitespace now! checkStatus.status_ok = false; for (var z = 0; z < s.length; z++) { // Check that current character isn't whitespace. var c = s.charAt(z); if (cfield_value.indexOf(c) == -1) { checkStatus.status_ok = true; } } } if( !checkStatus.status_ok ) { alert('REQEEEE'); // get label var cfield_label = document.getElementById('label_'+elemID).firstChild.nodeValue; checkStatus.msg_id='required_cf'; // USELESS checkStatus.cfield_label = cfield_label; break; // exit from for loop } } } /* end for */ return checkStatus;}
|
|
checkStatus.status_ok = false; for (var z = 0; z < s.length; z++)
|
for (var z = 0; z < cfield_value.length; z++)
|
function checkRequiredCustomFields(cfields_inputs){ var CFIELD_TYPE_IDX=2; var cfields_container=''; var custom_field_types = new Array(); var checkStatus = {status_ok: true, msg_id: null, cfield_label: null}; var whitespace = " \t\n\r"; // Developer notes: // If new custom field types are added in PHP code, you need to add it also here // Not all types declared here will be validated. custom_field_types[0]='string'; custom_field_types[1]='numeric'; custom_field_types[2]='float'; custom_field_types[4]='email'; custom_field_types[5]='checkbox'; custom_field_types[6]='list'; custom_field_types[7]='multiselection list'; custom_field_types[8]='date'; custom_field_types[9]='radio'; custom_field_types[10]='datetime'; custom_field_types[20]='text area'; custom_field_types[500]='script'; custom_field_types[501]='server'; for(var idx = 0; idx < cfields_inputs.length; idx++) { // Important: // elemName format for custom fields -> custom_field_<cfield_type>_<cfield_id>[_<testcase_id>] var elemName = cfields_inputs[idx].name; var elemID = cfields_inputs[idx].id; var nameParts=elemName.split("_"); var cfield_type=custom_field_types[nameParts[CFIELD_TYPE_IDX]]; var cfield_value=cfields_inputs[idx].value; if(cfields_inputs[idx].className == 'required') { checkStatus.status_ok = !(cfield_value.length == 0); if(checkStatus.status_ok) { // check for whitespace now! checkStatus.status_ok = false; for (var z = 0; z < s.length; z++) { // Check that current character isn't whitespace. var c = s.charAt(z); if (cfield_value.indexOf(c) == -1) { checkStatus.status_ok = true; } } } if( !checkStatus.status_ok ) { // get label var cfield_label = document.getElementById('label_'+elemID).firstChild.nodeValue; checkStatus.msg_id='required_cf'; // USELESS checkStatus.cfield_label = cfield_label; break; // exit from for loop } } } /* end for */ return checkStatus;}
|
var c = s.charAt(z); if (cfield_value.indexOf(c) == -1)
|
var c = cfield_value.charAt(z); if (whitespace.indexOf(c) == -1)
|
function checkRequiredCustomFields(cfields_inputs){ var CFIELD_TYPE_IDX=2; var cfields_container=''; var custom_field_types = new Array(); var checkStatus = {status_ok: true, msg_id: null, cfield_label: null}; var whitespace = " \t\n\r"; // Developer notes: // If new custom field types are added in PHP code, you need to add it also here // Not all types declared here will be validated. custom_field_types[0]='string'; custom_field_types[1]='numeric'; custom_field_types[2]='float'; custom_field_types[4]='email'; custom_field_types[5]='checkbox'; custom_field_types[6]='list'; custom_field_types[7]='multiselection list'; custom_field_types[8]='date'; custom_field_types[9]='radio'; custom_field_types[10]='datetime'; custom_field_types[20]='text area'; custom_field_types[500]='script'; custom_field_types[501]='server'; for(var idx = 0; idx < cfields_inputs.length; idx++) { // Important: // elemName format for custom fields -> custom_field_<cfield_type>_<cfield_id>[_<testcase_id>] var elemName = cfields_inputs[idx].name; var elemID = cfields_inputs[idx].id; var nameParts=elemName.split("_"); var cfield_type=custom_field_types[nameParts[CFIELD_TYPE_IDX]]; var cfield_value=cfields_inputs[idx].value; if(cfields_inputs[idx].className == 'required') { checkStatus.status_ok = !(cfield_value.length == 0); if(checkStatus.status_ok) { // check for whitespace now! checkStatus.status_ok = false; for (var z = 0; z < s.length; z++) { // Check that current character isn't whitespace. var c = s.charAt(z); if (cfield_value.indexOf(c) == -1) { checkStatus.status_ok = true; } } } if( !checkStatus.status_ok ) { // get label var cfield_label = document.getElementById('label_'+elemID).firstChild.nodeValue; checkStatus.msg_id='required_cf'; // USELESS checkStatus.cfield_label = cfield_label; break; // exit from for loop } } } /* end for */ return checkStatus;}
|
YAHOO.util.Assert.isObject(table.tHead, 'The table header is missing'); YAHOO.util.Assert.areEqual(1, table.tHead.rows.length, 'There should be exactly one header row (not ' + table.tHead.rows.length + ')'); var nbcolsActual = this.getNumberVisibleCells(table.tHead.rows[0].cells);
|
var headerTable = this.getHeaderTable(table, isSplit); YAHOO.util.Assert.isObject(headerTable.tHead, 'The table header is missing'); YAHOO.util.Assert.areEqual(1, headerTable.tHead.rows.length, 'There should be exactly one header row (not ' + headerTable.tHead.rows.length + ')'); var nbcolsActual = this.getNumberVisibleCells(headerTable.tHead.rows[0].cells);
|
checkTableStructure: function(table, nbcols, isSplit) { YAHOO.util.Assert.isObject(table.tHead, 'The table header is missing'); YAHOO.util.Assert.areEqual(1, table.tHead.rows.length, 'There should be exactly one header row (not ' + table.tHead.rows.length + ')'); var nbcolsActual = this.getNumberVisibleCells(table.tHead.rows[0].cells); YAHOO.util.Assert.areEqual(nbcols, nbcolsActual, nbcolsActual + ' header columns found instead of ' + nbcols); var bodyTable = this.getBodyTable(table, isSplit); YAHOO.util.Assert.areEqual(1, bodyTable.tBodies.length, 'There should be exactly one body (not ' + bodyTable.tBodies.length + ')'); nbcolsActual = this.getNumberVisibleCells(bodyTable.tBodies[0].rows[2].cells); YAHOO.util.Assert.areEqual(nbcols, nbcolsActual, nbcolsActual + ' columns found on the first body row instead of ' + nbcols); },
|
var bodyTable = this.getBodyTable(table, isSplit); YAHOO.util.Assert.areEqual(1, bodyTable.tBodies.length, 'There should be exactly one body (not ' + bodyTable.tBodies.length + ')'); nbcolsActual = this.getNumberVisibleCells(bodyTable.tBodies[0].rows[2].cells);
|
YAHOO.util.Assert.areEqual(1, table.tBodies.length, 'There should be exactly one body (not ' + table.tBodies.length + ')'); nbcolsActual = this.getNumberVisibleCells(table.tBodies[0].rows[2].cells);
|
checkTableStructure: function(table, nbcols, isSplit) { YAHOO.util.Assert.isObject(table.tHead, 'The table header is missing'); YAHOO.util.Assert.areEqual(1, table.tHead.rows.length, 'There should be exactly one header row (not ' + table.tHead.rows.length + ')'); var nbcolsActual = this.getNumberVisibleCells(table.tHead.rows[0].cells); YAHOO.util.Assert.areEqual(nbcols, nbcolsActual, nbcolsActual + ' header columns found instead of ' + nbcols); var bodyTable = this.getBodyTable(table, isSplit); YAHOO.util.Assert.areEqual(1, bodyTable.tBodies.length, 'There should be exactly one body (not ' + bodyTable.tBodies.length + ')'); nbcolsActual = this.getNumberVisibleCells(bodyTable.tBodies[0].rows[2].cells); YAHOO.util.Assert.areEqual(nbcols, nbcolsActual, nbcolsActual + ' columns found on the first body row instead of ' + nbcols); },
|
TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,k,l,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var u;(u=h[p])!=null;p++)if(u)if(q^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))k||l.push(u);else if(k)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&& "2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h])g[1]=m.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,l,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=o(g[3],null,null,h);else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false}else if(m.match.POS.test(g[0])||m.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);
|
CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
|
TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,k,l,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var u;(u=h[p])!=null;p++)if(u)if(q^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))k||l.push(u);else if(k)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h])g[1]=m.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,l,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=o(g[3],null,null,h);else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false}else if(m.match.POS.test(g[0])||m.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);
|
d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
|
2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,
|
d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
|
__.circle = function(pos, radius, attrs){ return __.raphael.circle(pos.x, pos.y, radius).attr(attrs); };
|
circle: function(pos, radius, attrs){ return this.raphael.circle(pos.x, pos.y, radius).attr(attrs); },
|
__.circle = function(pos, radius, attrs){ return __.raphael.circle(pos.x, pos.y, radius).attr(attrs); };
|
TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,k,l,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var u;(u=h[p])!=null;p++)if(u)if(q^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))k||l.push(u);else if(k)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&
|
h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
|
TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,k,l,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var u;(u=h[p])!=null;p++)if(u)if(q^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))k||l.push(u);else if(k)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&
|
(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
|
i=i.toLowerCase();q=a}q("previousSibling",i,p,g,m,n)}},find:{ID:function(g,i,n){if(typeof i.getElementById!=="undefined"&&!n)return(g=i.getElementById(g[1]))&&g.parentNode?[g]:[]},NAME:function(g,i){if(typeof i.getElementsByName!=="undefined"){for(var n=[],m=i.getElementsByName(g[1]),p=0,q=m.length;p<q;p++)m[p].getAttribute("name")===g[1]&&n.push(m[p]);return n.length===0?null:n}},TAG:function(g,i){return i.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,i,n,m,p,q){g=" "+g[1].replace(/\\/g, "")+" ";if(q)return g;q=0;for(var u;(u=i[q])!=null;q++)if(u)if(p^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n,
|
(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
|
var delayedExecution
|
exports.Class = function(parent, proto) { if(!proto) { proto = parent } proto.prototype = parent.prototype var cls = function() { if(this.init) { this.init.apply(this, arguments) }} cls.prototype = new proto(function(context, method, args) { var target = parent while(target = target.prototype) { if(target[method]) { return target[method].apply(context, args || []) } } throw new Error('supr: parent method ' + method + ' does not exist') }) // Sometimes you want a method that renders UI to only execute once if it's called // multiple times within a short time period. Delayed methods do just that cls.prototype.createDelayedMethod = function(methodName, fn) { var delayedExecution this[methodName] = function() { clearTimeout(delayedExecution) delayedExecution = setTimeout(bind(this, fn), 10) } } cls.prototype.constructor = cls return cls}
|
|
clearTimeout(delayedExecution) delayedExecution = setTimeout(bind(this, fn), 10)
|
var executionTimeout this[methodName] = bind(this, function() { clearTimeout(executionTimeout) executionTimeout = setTimeout(bind(fn, 'apply', this, arguments), 10) })
|
exports.Class = function(parent, proto) { if(!proto) { proto = parent } proto.prototype = parent.prototype var cls = function() { if(this.init) { this.init.apply(this, arguments) }} cls.prototype = new proto(function(context, method, args) { var target = parent while(target = target.prototype) { if(target[method]) { return target[method].apply(context, args || []) } } throw new Error('supr: parent method ' + method + ' does not exist') }) // Sometimes you want a method that renders UI to only execute once if it's called // multiple times within a short time period. Delayed methods do just that cls.prototype.createDelayedMethod = function(methodName, fn) { var delayedExecution this[methodName] = function() { clearTimeout(delayedExecution) delayedExecution = setTimeout(bind(this, fn), 10) } } cls.prototype.constructor = cls return cls}
|
return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", ""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
|
prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f<h;f++){var l=(f>0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument|| b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1></$2>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]==="<table>"&&!x?r.childNodes:[];for(o=k.length- 1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script")))); d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i,
|
return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
|
c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
|
d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i,
|
c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
|
}else{R=this._getDoc().body;}}if(R){F=M(G,J);if(this._isElement(R,"body")||this._isElement(R,"html")){if(this._isElement(R,"html")){R=this._getDoc().body;}R.appendChild(F);}else{if(R.nextSibling){R.parentNode.insertBefore(F,R.nextSibling);}else{R.parentNode.appendChild(F);}}this.currentElement[this.currentElement.length]=F;this.currentEvent=null;if(this.browser.webkit){this._getSelection().setBaseAndExtent(F,0,F,0);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(true);}}}}else{this._setEditorStyle(true);this._getDoc().execCommand("fontname",false,"yui-tmp");var E=[],P,V=["font","span","i","b","u"];if(!this._isElement(this._getSelectedElement(),"body")){V[V.length]=this._getDoc().getElementsByTagName(this._getSelectedElement().tagName);V[V.length]=this._getDoc().getElementsByTagName(this._getSelectedElement().parentNode.tagName);}for(var K=0;K<V.length;K++){var I=this._getDoc().getElementsByTagName(V[K]);for(var U=0;U<I.length;U++){E[E.length]=I[U];}}for(var S=0;S<E.length;S++){if((YAHOO.util.Dom.getStyle(E[S],"font-family")=="yui-tmp")||(E[S].face&&(E[S].face=="yui-tmp"))){F=M(G,J);F.innerHTML=E[S].innerHTML;if(this._isElement(E[S],"ol")||(this._isElement(E[S],"ul"))){var N=E[S].getElementsByTagName("li")[0];E[S].style.fontFamily="inherit";N.style.fontFamily="inherit";F.innerHTML=N.innerHTML;N.innerHTML="";N.appendChild(F);this.currentElement[this.currentElement.length]=F;}else{if(this._isElement(E[S],"li")){E[S].innerHTML="";E[S].appendChild(F);E[S].style.fontFamily="inherit";this.currentElement[this.currentElement.length]=F;}else{if(E[S].parentNode){E[S].parentNode.replaceChild(F,E[S]);this.currentElement[this.currentElement.length]=F;this.currentEvent=null;if(this.browser.webkit){this._getSelection().setBaseAndExtent(F,0,F,0);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(true);}}if(this.browser.ie&&J&&J.fontSize){this._getSelection().empty();}if(this.browser.gecko){this._getSelection().collapseToStart();}}}}}}var T=this.currentElement.length;for(var O=0;O<T;O++){if((O+1)!=T){if(this.currentElement[O]&&this.currentElement[O].nextSibling){if(this._isElement(this.currentElement[O],"br")){this.currentElement[this.currentElement.length]=this.currentElement[O].nextSibling;}}}}}},saveHTML:function(){var F=this.cleanHTML();if(this._textarea){this.get("element").value=F;}else{this.get("element").innerHTML=F;}if(this.get("saveEl")!==this.get("element")){var E=this.get("saveEl");if(D.isString(E)){E=C.get(E);}if(E){if(E.tagName.toLowerCase()==="textarea"){E.value=F;}else{E.innerHTML=F;}}}return F;},setEditorHTML:function(F){var E=this._cleanIncomingHTML(F);this._getDoc().body.innerHTML=E;this.nodeChange();},getEditorHTML:function(){var E=this._getDoc().body;if(E===null){return null;}return this._getDoc().body.innerHTML;},show:function(){if(this.browser.gecko){this._setDesignMode("on");this._focusWindow();}if(this.browser.webkit){var E=this;window.setTimeout(function(){E._setInitialContent.call(E);},10);}if(this.currentWindow){this.closeWindow();}this.get("iframe").setStyle("position","static");this.get("iframe").setStyle("left","");},hide:function(){if(this.currentWindow){this.closeWindow();}if(this._fixNodesTimer){clearTimeout(this._fixNodesTimer);this._fixNodesTimer=null;}if(this._nodeChangeTimer){clearTimeout(this._nodeChangeTimer);this._nodeChangeTimer=null;}this._lastNodeChange=0;this.get("iframe").setStyle("position","absolute");this.get("iframe").setStyle("left","-9999px");},_cleanIncomingHTML:function(E){E=E.replace(/<strong([^>]*)>/gi,"<b$1>");E=E.replace(/<\/strong>/gi,"</b>");E=E.replace(/<embed([^>]*)>/gi,"<YUI_EMBED$1>");E=E.replace(/<\/embed>/gi,"</YUI_EMBED>");E=E.replace(/<em([^>]*)>/gi,"<i$1>");E=E.replace(/<\/em>/gi,"</i>");E=E.replace(/<YUI_EMBED([^>]*)>/gi,"<embed$1>");E=E.replace(/<\/YUI_EMBED>/gi,"</embed>");if(this.get("plainText")){E=E.replace(/\n/g,"<br>").replace(/\r/g,"<br>");E=E.replace(/ /gi," ");E=E.replace(/\t/gi," ");}E=E.replace(/<script([^>]*)>/gi,"<bad>");E=E.replace(/<\/script([^>]*)>/gi,"</bad>");E=E.replace(/<script([^>]*)>/gi,"<bad>");E=E.replace(/<\/script([^>]*)>/gi,"</bad>");E=E.replace(/\n/g,"<YUI_LF>").replace(/\r/g,"<YUI_LF>");E=E.replace(new RegExp("<bad([^>]*)>(.*?)</bad>","gi"),"");E=E.replace(/<YUI_LF>/g,"\n");return E;},cleanHTML:function(G){if(!G){G=this.getEditorHTML();}var F=this.get("markup");G=this.pre_filter_linebreaks(G,F);G=G.replace(/<img([^>]*)\/>/gi,"<YUI_IMG$1>");G=G.replace(/<img([^>]*)>/gi,"<YUI_IMG$1>");G=G.replace(/<input([^>]*)\/>/gi,"<YUI_INPUT$1>");G=G.replace(/<input([^>]*)>/gi,"<YUI_INPUT$1>");G=G.replace(/<ul([^>]*)>/gi,"<YUI_UL$1>");G=G.replace(/<\/ul>/gi,"</YUI_UL>");G=G.replace(/<blockquote([^>]*)>/gi,"<YUI_BQ$1>");G=G.replace(/<\/blockquote>/gi,"</YUI_BQ>");G=G.replace(/<embed([^>]*)>/gi,"<YUI_EMBED$1>");G=G.replace(/<\/embed>/gi,"</YUI_EMBED>");if((F=="semantic")||(F=="xhtml")){G=G.replace(/<i(\s+[^>]*)?>/gi,"<em$1>");G=G.replace(/<\/i>/gi,"</em>");G=G.replace(/<b(\s+[^>]*)?>/gi,"<strong$1>");G=G.replace(/<\/b>/gi,"</strong>");}G=G.replace(/<font/gi,"<font");G=G.replace(/<\/font>/gi,"</font>");G=G.replace(/<span/gi,"<span");G=G.replace(/<\/span>/gi,"</span>");if((F=="semantic")||(F=="xhtml")||(F=="css")){G=G.replace(new RegExp('<font([^>]*)face="([^>]*)">(.*?)</font>',"gi"),'<span $1 style="font-family: $2;">$3</span>');G=G.replace(/<u/gi,'<span style="text-decoration: underline;"');if(this.browser.webkit){G=G.replace(new RegExp('<span class="Apple-style-span" style="font-weight: bold;">([^>]*)</span>',"gi"),"<strong>$1</strong>");G=G.replace(new RegExp('<span class="Apple-style-span" style="font-style: italic;">([^>]*)</span>',"gi"),"<em>$1</em>");}G=G.replace(/\/u>/gi,"/span>");if(F=="css"){G=G.replace(/<em([^>]*)>/gi,"<i$1>");G=G.replace(/<\/em>/gi,"</i>");G=G.replace(/<strong([^>]*)>/gi,"<b$1>");G=G.replace(/<\/strong>/gi,"</b>");G=G.replace(/<b/gi,'<span style="font-weight: bold;"'); G=G.replace(/\/b>/gi,"/span>");G=G.replace(/<i/gi,'<span style="font-style: italic;"');G=G.replace(/\/i>/gi,"/span>");}G=G.replace(/ /gi," ");}else{G=G.replace(/<u/gi,"<u");G=G.replace(/\/u>/gi,"/u>");}G=G.replace(/<ol([^>]*)>/gi,"<ol$1>");G=G.replace(/\/ol>/gi,"/ol>");G=G.replace(/<li/gi,"<li");G=G.replace(/\/li>/gi,"/li>");G=this.filter_safari(G);G=this.filter_internals(G);G=this.filter_all_rgb(G);G=this.post_filter_linebreaks(G,F);if(F=="xhtml"){G=G.replace(/<YUI_IMG([^>]*)>/g,"<img $1 />");G=G.replace(/<YUI_INPUT([^>]*)>/g,"<input $1 />");}else{G=G.replace(/<YUI_IMG([^>]*)>/g,"<img $1>");G=G.replace(/<YUI_INPUT([^>]*)>/g,"<input $1>");}G=G.replace(/<YUI_UL([^>]*)>/g,"<ul$1>");G=G.replace(/<\/YUI_UL>/g,"</ul>");G=this.filter_invalid_lists(G);G=G.replace(/<YUI_BQ([^>]*)>/g,"<blockquote$1>");G=G.replace(/<\/YUI_BQ>/g,"</blockquote>");G=G.replace(/<YUI_EMBED([^>]*)>/g,"<embed$1>");G=G.replace(/<\/YUI_EMBED>/g,"</embed>");G=G.replace(" & ","YUI_AMP");G=G.replace("&","&");G=G.replace("YUI_AMP","&");G=YAHOO.lang.trim(G);if(this.get("removeLineBreaks")){G=G.replace(/\n/g,"").replace(/\r/g,"");G=G.replace(/ /gi," ");}if(G.substring(0,6).toLowerCase()=="<span>"){G=G.substring(6);if(G.substring(G.length-7,G.length).toLowerCase()=="</span>"){G=G.substring(0,G.length-7);}}for(var E in this.invalidHTML){if(YAHOO.lang.hasOwnProperty(this.invalidHTML,E)){if(D.isObject(E)&&E.keepContents){G=G.replace(new RegExp("<"+E+"([^>]*)>(.*?)</"+E+">","gi"),"$1");}else{G=G.replace(new RegExp("<"+E+"([^>]*)>(.*?)</"+E+">","gi"),"");}}}this.fireEvent("cleanHTML",{type:"cleanHTML",target:this,html:G});return G;},filter_invalid_lists:function(E){E=E.replace(/<\/li>\n/gi,"</li>");E=E.replace(/<\/li><ol>/gi,"</li><li><ol>");E=E.replace(/<\/ol>/gi,"</ol></li>");E=E.replace(/<\/ol><\/li>\n/gi,"</ol>\n");E=E.replace(/<\/li><ul>/gi,"</li><li><ul>");E=E.replace(/<\/ul>/gi,"</ul></li>");E=E.replace(/<\/ul><\/li>\n?/gi,"</ul>\n");E=E.replace(/<\/li>/gi,"</li>\n");E=E.replace(/<\/ol>/gi,"</ol>\n");E=E.replace(/<ol>/gi,"<ol>\n");E=E.replace(/<ul>/gi,"<ul>\n");return E;},filter_safari:function(E){if(this.browser.webkit){E=E.replace(/<span class="Apple-tab-span" style="white-space:pre">([^>])<\/span>/gi," ");E=E.replace(/Apple-style-span/gi,"");E=E.replace(/style="line-height: normal;"/gi,"");E=E.replace(/<li><\/li>/gi,"");E=E.replace(/<li> <\/li>/gi,"");E=E.replace(/<li> <\/li>/gi,"");if(this.get("ptags")){E=E.replace(/<div([^>]*)>/g,"<p$1>");E=E.replace(/<\/div>/gi,"</p>");}else{E=E.replace(/<div>/gi,"");E=E.replace(/<\/div>/gi,"<br>");}}return E;},filter_internals:function(E){E=E.replace(/\r/g,"");E=E.replace(/<\/?(body|head|html)[^>]*>/gi,"");E=E.replace(/<YUI_BR><\/li>/gi,"</li>");E=E.replace(/yui-tag-span/gi,"");E=E.replace(/yui-tag/gi,"");E=E.replace(/yui-non/gi,"");E=E.replace(/yui-img/gi,"");E=E.replace(/ tag="span"/gi,"");E=E.replace(/ class=""/gi,"");E=E.replace(/ style=""/gi,"");E=E.replace(/ class=" "/gi,"");E=E.replace(/ class=" "/gi,"");E=E.replace(/ target=""/gi,"");E=E.replace(/ title=""/gi,"");if(this.browser.ie){E=E.replace(/ class= /gi,"");E=E.replace(/ class= >/gi,"");E=E.replace(/_height="([^>])"/gi,"");E=E.replace(/_width="([^>])"/gi,"");}return E;},filter_all_rgb:function(I){var H=new RegExp("rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)","gi");var E=I.match(H);if(D.isArray(E)){for(var G=0;G<E.length;G++){var F=this.filter_rgb(E[G]);I=I.replace(E[G].toString(),F);}}return I;},filter_rgb:function(G){if(G.toLowerCase().indexOf("rgb")!=-1){var J=new RegExp("(.*?)rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)(.*?)","gi");var F=G.replace(J,"$1,$2,$3,$4,$5").split(",");if(F.length==5){var I=parseInt(F[1],10).toString(16);var H=parseInt(F[2],10).toString(16);var E=parseInt(F[3],10).toString(16);I=I.length==1?"0"+I:I;H=H.length==1?"0"+H:H;E=E.length==1?"0"+E:E;G="#"+I+H+E;}}return G;},pre_filter_linebreaks:function(F,E){if(this.browser.webkit){F=F.replace(/<br class="khtml-block-placeholder">/gi,"<YUI_BR>");F=F.replace(/<br class="webkit-block-placeholder">/gi,"<YUI_BR>");}F=F.replace(/<br>/gi,"<YUI_BR>");F=F.replace(/<br (.*?)>/gi,"<YUI_BR>");F=F.replace(/<br\/>/gi,"<YUI_BR>");F=F.replace(/<br \/>/gi,"<YUI_BR>");F=F.replace(/<div><YUI_BR><\/div>/gi,"<YUI_BR>");F=F.replace(/<p>( | )<\/p>/g,"<YUI_BR>");F=F.replace(/<p><br> <\/p>/gi,"<YUI_BR>");F=F.replace(/<p> <\/p>/gi,"<YUI_BR>");F=F.replace(/<YUI_BR>$/,"");F=F.replace(/<YUI_BR><\/p>/g,"</p>");if(this.browser.ie){F=F.replace(/ /g,"\t");}return F;},post_filter_linebreaks:function(F,E){if(E=="xhtml"){F=F.replace(/<YUI_BR>/g,"<br />");}else{F=F.replace(/<YUI_BR>/g,"<br>");}return F;},clearEditorDoc:function(){this._getDoc().body.innerHTML=" ";},openWindow:function(E){},moveWindow:function(){},_closeWindow:function(){},closeWindow:function(){this.toolbar.resetAllButtons();this._focusWindow();},destroy:function(){if(this.resize){this.resize.destroy();}if(this.dd){this.dd.unreg();}if(this.get("panel")){this.get("panel").destroy();}this.saveHTML();this.toolbar.destroy();this.setStyle("visibility","visible");this.setStyle("position","static");this.setStyle("top","");this.setStyle("left","");var E=this.get("element");this.get("element_cont").get("parentNode").replaceChild(E,this.get("element_cont").get("element"));this.get("element_cont").get("element").innerHTML="";this.set("handleSubmit",false);return true;},toString:function(){var E="SimpleEditor";if(this.get&&this.get("element_cont")){E="SimpleEditor (#"+this.get("element_cont").get("id")+")"+((this.get("disabled")?" Disabled":""));}return E;}});YAHOO.widget.EditorInfo={_instances:{},blankImage:"",window:{},panel:null,getEditorById:function(E){if(!YAHOO.lang.isString(E)){E=E.id;}if(this._instances[E]){return this._instances[E];}return false;},toString:function(){var E=0;for(var F in this._instances){if(D.hasOwnProperty(this._instances,F)){E++;}}return"Editor Info ("+E+" registered intance"+((E>1)?"s":"")+")";
|
(function(){var b=YAHOO.util.Dom,a=YAHOO.util.Event,c=YAHOO.lang;if(YAHOO.widget.Button){YAHOO.widget.ToolbarButtonAdvanced=YAHOO.widget.Button;YAHOO.widget.ToolbarButtonAdvanced.prototype.buttonType="rich";YAHOO.widget.ToolbarButtonAdvanced.prototype.checkValue=function(f){var e=this.getMenu().getItems();if(e.length===0){this.getMenu()._onBeforeShow();e=this.getMenu().getItems()}for(var d=0;d<e.length;d++){e[d].cfg.setProperty("checked",false);if(e[d].value==f){e[d].cfg.setProperty("checked",true)}}}}else{YAHOO.widget.ToolbarButtonAdvanced=function(){}}YAHOO.widget.ToolbarButton=function(e,d){if(c.isObject(arguments[0])&&!b.get(e).nodeType){d=e}var g=(d||{});var f={element:null,attributes:g};if(!f.attributes.type){f.attributes.type="push"}f.element=document.createElement("span");f.element.setAttribute("unselectable","on");f.element.className="yui-button yui-"+f.attributes.type+"-button";f.element.innerHTML='<span class="first-child"><a href="#">LABEL</a></span>';f.element.firstChild.firstChild.tabIndex="-1";f.attributes.id=b.generateId();YAHOO.widget.ToolbarButton.superclass.constructor.call(this,f.element,f.attributes)};YAHOO.extend(YAHOO.widget.ToolbarButton,YAHOO.util.Element,{buttonType:"normal",_handleMouseOver:function(){if(!this.get("disabled")){this.addClass("yui-button-hover");this.addClass("yui-"+this.get("type")+"-button-hover")}},_handleMouseOut:function(){this.removeClass("yui-button-hover");this.removeClass("yui-"+this.get("type")+"-button-hover")},checkValue:function(f){if(this.get("type")=="menu"){var e=this._button.options;for(var d=0;d<e.length;d++){if(e[d].value==f){e.selectedIndex=d}}}},init:function(e,d){YAHOO.widget.ToolbarButton.superclass.init.call(this,e,d);this.on("mouseover",this._handleMouseOver,this,true);this.on("mouseout",this._handleMouseOut,this,true)},initAttributes:function(d){YAHOO.widget.ToolbarButton.superclass.initAttributes.call(this,d);this.setAttributeConfig("value",{value:d.value});this.setAttributeConfig("menu",{value:d.menu||false});this.setAttributeConfig("type",{value:d.type,writeOnce:true,method:function(h){var g,f;if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0]}switch(h){case"select":case"menu":g=document.createElement("select");var j=this.get("menu");for(var e=0;e<j.length;e++){f=document.createElement("option");f.innerHTML=j[e].text;f.value=j[e].value;if(j[e].checked){f.selected=true}g.appendChild(f)}this._button.parentNode.replaceChild(g,this._button);a.on(g,"change",this._handleSelect,this,true);this._button=g;break}}});this.setAttributeConfig("disabled",{value:d.disabled||false,method:function(e){if(e){this.addClass("yui-button-disabled");this.addClass("yui-"+this.get("type")+"-button-disabled")}else{this.removeClass("yui-button-disabled");this.removeClass("yui-"+this.get("type")+"-button-disabled")}if(this.get("type")=="menu"){this._button.disabled=e}}});this.setAttributeConfig("label",{value:d.label,method:function(e){if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0]}if(this.get("type")=="push"){this._button.innerHTML=e}}});this.setAttributeConfig("title",{value:d.title});this.setAttributeConfig("container",{value:null,writeOnce:true,method:function(e){this.appendTo(e)}})},_handleSelect:function(e){var d=a.getTarget(e);var f=d.options[d.selectedIndex].value;this.fireEvent("change",{type:"change",value:f})},getMenu:function(){return this.get("menu")},destroy:function(){a.purgeElement(this.get("element"),true);this.get("element").parentNode.removeChild(this.get("element"));for(var d in this){if(c.hasOwnProperty(this,d)){this[d]=null}}},fireEvent:function(e,d){if(this.DOM_EVENTS[e]&&this.get("disabled")){return}YAHOO.widget.ToolbarButton.superclass.fireEvent.call(this,e,d)},toString:function(){return"ToolbarButton ("+this.get("id")+")"}})})();(function(){var c=YAHOO.util.Dom,a=YAHOO.util.Event,d=YAHOO.lang;var b=function(f){var e=f;if(d.isString(f)){e=this.getButtonById(f)}if(d.isNumber(f)){e=this.getButtonByIndex(f)}if((!(e instanceof YAHOO.widget.ToolbarButton))&&(!(e instanceof YAHOO.widget.ToolbarButtonAdvanced))){e=this.getButtonByValue(f)}if((e instanceof YAHOO.widget.ToolbarButton)||(e instanceof YAHOO.widget.ToolbarButtonAdvanced)){return e}return false};YAHOO.widget.Toolbar=function(i,h){if(d.isObject(arguments[0])&&!c.get(i).nodeType){h=i}var k={};if(h){d.augmentObject(k,h)}var j={element:null,attributes:k};if(d.isString(i)&&c.get(i)){j.element=c.get(i)}else{if(d.isObject(i)&&c.get(i)&&c.get(i).nodeType){j.element=c.get(i)}}if(!j.element){j.element=document.createElement("DIV");j.element.id=c.generateId();if(k.container&&c.get(k.container)){c.get(k.container).appendChild(j.element)}}if(!j.element.id){j.element.id=((d.isString(i))?i:c.generateId())}var f=document.createElement("fieldset");var g=document.createElement("legend");g.innerHTML="Toolbar";f.appendChild(g);var e=document.createElement("DIV");j.attributes.cont=e;c.addClass(e,"yui-toolbar-subcont");f.appendChild(e);j.element.appendChild(f);j.element.tabIndex=-1;j.attributes.element=j.element;j.attributes.id=j.element.id;YAHOO.widget.Toolbar.superclass.constructor.call(this,j.element,j.attributes)};YAHOO.extend(YAHOO.widget.Toolbar,YAHOO.util.Element,{_addMenuClasses:function(h,e,j){c.addClass(this.element,"yui-toolbar-"+j.get("value")+"-menu");if(c.hasClass(j._button.parentNode.parentNode,"yui-toolbar-select")){c.addClass(this.element,"yui-toolbar-select-menu")}var f=this.getItems();for(var g=0;g<f.length;g++){c.addClass(f[g].element,"yui-toolbar-"+j.get("value")+"-"+((f[g].value)?f[g].value.replace(/ /g,"-").toLowerCase():f[g]._oText.nodeValue.replace(/ /g,"-").toLowerCase()));c.addClass(f[g].element,"yui-toolbar-"+j.get("value")+"-"+((f[g].value)?f[g].value.replace(/ /g,"-"):f[g]._oText.nodeValue.replace(/ /g,"-")))}},buttonType:YAHOO.widget.ToolbarButton,dd:null,_colorData:{"#111111":"Obsidian","#2D2D2D":"Dark Gray","#434343":"Shale","#5B5B5B":"Flint","#737373":"Gray","#8B8B8B":"Concrete","#A2A2A2":"Gray","#B9B9B9":"Titanium","#000000":"Black","#D0D0D0":"Light Gray","#E6E6E6":"Silver","#FFFFFF":"White","#BFBF00":"Pumpkin","#FFFF00":"Yellow","#FFFF40":"Banana","#FFFF80":"Pale Yellow","#FFFFBF":"Butter","#525330":"Raw Siena","#898A49":"Mildew","#AEA945":"Olive","#7F7F00":"Paprika","#C3BE71":"Earth","#E0DCAA":"Khaki","#FCFAE1":"Cream","#60BF00":"Cactus","#80FF00":"Chartreuse","#A0FF40":"Green","#C0FF80":"Pale Lime","#DFFFBF":"Light Mint","#3B5738":"Green","#668F5A":"Lime Gray","#7F9757":"Yellow","#407F00":"Clover","#8A9B55":"Pistachio","#B7C296":"Light Jade","#E6EBD5":"Breakwater","#00BF00":"Spring Frost","#00FF80":"Pastel Green","#40FFA0":"Light Emerald","#80FFC0":"Sea Foam","#BFFFDF":"Sea Mist","#033D21":"Dark Forrest","#438059":"Moss","#7FA37C":"Medium Green","#007F40":"Pine","#8DAE94":"Yellow Gray Green","#ACC6B5":"Aqua Lung","#DDEBE2":"Sea Vapor","#00BFBF":"Fog","#00FFFF":"Cyan","#40FFFF":"Turquoise Blue","#80FFFF":"Light Aqua","#BFFFFF":"Pale Cyan","#033D3D":"Dark Teal","#347D7E":"Gray Turquoise","#609A9F":"Green Blue","#007F7F":"Seaweed","#96BDC4":"Green Gray","#B5D1D7":"Soapstone","#E2F1F4":"Light Turquoise","#0060BF":"Summer Sky","#0080FF":"Sky Blue","#40A0FF":"Electric Blue","#80C0FF":"Light Azure","#BFDFFF":"Ice Blue","#1B2C48":"Navy","#385376":"Biscay","#57708F":"Dusty Blue","#00407F":"Sea Blue","#7792AC":"Sky Blue Gray","#A8BED1":"Morning Sky","#DEEBF6":"Vapor","#0000BF":"Deep Blue","#0000FF":"Blue","#4040FF":"Cerulean Blue","#8080FF":"Evening Blue","#BFBFFF":"Light Blue","#212143":"Deep Indigo","#373E68":"Sea Blue","#444F75":"Night Blue","#00007F":"Indigo Blue","#585E82":"Dockside","#8687A4":"Blue Gray","#D2D1E1":"Light Blue Gray","#6000BF":"Neon Violet","#8000FF":"Blue Violet","#A040FF":"Violet Purple","#C080FF":"Violet Dusk","#DFBFFF":"Pale Lavender","#302449":"Cool Shale","#54466F":"Dark Indigo","#655A7F":"Dark Violet","#40007F":"Violet","#726284":"Smoky Violet","#9E8FA9":"Slate Gray","#DCD1DF":"Violet White","#BF00BF":"Royal Violet","#FF00FF":"Fuchsia","#FF40FF":"Magenta","#FF80FF":"Orchid","#FFBFFF":"Pale Magenta","#4A234A":"Dark Purple","#794A72":"Medium Purple","#936386":"Cool Granite","#7F007F":"Purple","#9D7292":"Purple Moon","#C0A0B6":"Pale Purple","#ECDAE5":"Pink Cloud","#BF005F":"Hot Pink","#FF007F":"Deep Pink","#FF409F":"Grape","#FF80BF":"Electric Pink","#FFBFDF":"Pink","#451528":"Purple Red","#823857":"Purple Dino","#A94A76":"Purple Gray","#7F003F":"Rose","#BC6F95":"Antique Mauve","#D8A5BB":"Cool Marble","#F7DDE9":"Pink Granite","#C00000":"Apple","#FF0000":"Fire Truck","#FF4040":"Pale Red","#FF8080":"Salmon","#FFC0C0":"Warm Pink","#441415":"Sepia","#82393C":"Rust","#AA4D4E":"Brick","#800000":"Brick Red","#BC6E6E":"Mauve","#D8A3A4":"Shrimp Pink","#F8DDDD":"Shell Pink","#BF5F00":"Dark Orange","#FF7F00":"Orange","#FF9F40":"Grapefruit","#FFBF80":"Canteloupe","#FFDFBF":"Wax","#482C1B":"Dark Brick","#855A40":"Dirt","#B27C51":"Tan","#7F3F00":"Nutmeg","#C49B71":"Mustard","#E1C4A8":"Pale Tan","#FDEEE0":"Marble"},_colorPicker:null,STR_COLLAPSE:"Collapse Toolbar",STR_SPIN_LABEL:"Spin Button with value {VALUE}. Use Control Shift Up Arrow and Control Shift Down arrow keys to increase or decrease the value.",STR_SPIN_UP:"Click to increase the value of this input",STR_SPIN_DOWN:"Click to decrease the value of this input",_titlebar:null,browser:YAHOO.env.ua,_buttonList:null,_buttonGroupList:null,_sep:null,_sepCount:null,_dragHandle:null,_toolbarConfigs:{renderer:true},CLASS_CONTAINER:"yui-toolbar-container",CLASS_DRAGHANDLE:"yui-toolbar-draghandle",CLASS_SEPARATOR:"yui-toolbar-separator",CLASS_DISABLED:"yui-toolbar-disabled",CLASS_PREFIX:"yui-toolbar",init:function(f,e){YAHOO.widget.Toolbar.superclass.init.call(this,f,e)},initAttributes:function(e){YAHOO.widget.Toolbar.superclass.initAttributes.call(this,e);this.addClass(this.CLASS_CONTAINER);this.setAttributeConfig("buttonType",{value:e.buttonType||"basic",writeOnce:true,validator:function(f){switch(f){case"advanced":case"basic":return true}return false},method:function(f){if(f=="advanced"){if(YAHOO.widget.Button){this.buttonType=YAHOO.widget.ToolbarButtonAdvanced}else{this.buttonType=YAHOO.widget.ToolbarButton}}else{this.buttonType=YAHOO.widget.ToolbarButton}}});this.setAttributeConfig("buttons",{value:[],writeOnce:true,method:function(g){for(var f in g){if(d.hasOwnProperty(g,f)){if(g[f].type=="separator"){this.addSeparator()}else{if(g[f].group!==undefined){this.addButtonGroup(g[f])}else{this.addButton(g[f])}}}}}});this.setAttributeConfig("disabled",{value:false,method:function(f){if(this.get("disabled")===f){return false}if(f){this.addClass(this.CLASS_DISABLED);this.set("draggable",false);this.disableAllButtons()}else{this.removeClass(this.CLASS_DISABLED);if(this._configs.draggable._initialConfig.value){this.set("draggable",true)}this.resetAllButtons()}}});this.setAttributeConfig("cont",{value:e.cont,readOnly:true});this.setAttributeConfig("grouplabels",{value:((e.grouplabels===false)?false:true),method:function(f){if(f){c.removeClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"))}else{c.addClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"))}}});this.setAttributeConfig("titlebar",{value:false,method:function(g){if(g){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar)}this._titlebar=document.createElement("DIV");this._titlebar.tabIndex="-1";a.on(this._titlebar,"focus",function(){this._handleFocus()},this,true);c.addClass(this._titlebar,this.CLASS_PREFIX+"-titlebar");if(d.isString(g)){var f=document.createElement("h2");f.tabIndex="-1";f.innerHTML='<a href="#" tabIndex="0">'+g+"</a>";this._titlebar.appendChild(f);a.on(f.firstChild,"click",function(h){a.stopEvent(h)});a.on([f,f.firstChild],"focus",function(){this._handleFocus()},this,true)}if(this.get("firstChild")){this.insertBefore(this._titlebar,this.get("firstChild"))}else{this.appendChild(this._titlebar)}if(this.get("collapse")){this.set("collapse",true)}}else{if(this._titlebar){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar)}}}}});this.setAttributeConfig("collapse",{value:false,method:function(h){if(this._titlebar){var g=null;var f=c.getElementsByClassName("collapse","span",this._titlebar);if(h){if(f.length>0){return true}g=document.createElement("SPAN");g.innerHTML="X";g.title=this.STR_COLLAPSE;c.addClass(g,"collapse");this._titlebar.appendChild(g);a.addListener(g,"click",function(){if(c.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false)}else{this.collapse()}},this,true)}else{g=c.getElementsByClassName("collapse","span",this._titlebar);if(g[0]){if(c.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false)}g[0].parentNode.removeChild(g[0])}}}}});this.setAttributeConfig("draggable",{value:(e.draggable||false),method:function(f){if(f&&!this.get("titlebar")){if(!this._dragHandle){this._dragHandle=document.createElement("SPAN");this._dragHandle.innerHTML="|";this._dragHandle.setAttribute("title","Click to drag the toolbar");this._dragHandle.id=this.get("id")+"_draghandle";c.addClass(this._dragHandle,this.CLASS_DRAGHANDLE);if(this.get("cont").hasChildNodes()){this.get("cont").insertBefore(this._dragHandle,this.get("cont").firstChild)}else{this.get("cont").appendChild(this._dragHandle)}this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._dragHandle.id)}}else{if(this._dragHandle){this._dragHandle.parentNode.removeChild(this._dragHandle);this._dragHandle=null;this.dd=null}}if(this._titlebar){if(f){this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._titlebar);c.addClass(this._titlebar,"draggable")}else{c.removeClass(this._titlebar,"draggable");if(this.dd){this.dd.unreg();this.dd=null}}}},validator:function(g){var f=true;if(!YAHOO.util.DD){f=false}return f}})},addButtonGroup:function(j){if(!this.get("element")){this._queue[this._queue.length]=["addButtonGroup",arguments];return false}if(!this.hasClass(this.CLASS_PREFIX+"-grouped")){this.addClass(this.CLASS_PREFIX+"-grouped")}var k=document.createElement("DIV");c.addClass(k,this.CLASS_PREFIX+"-group");c.addClass(k,this.CLASS_PREFIX+"-group-"+j.group);if(j.label){var f=document.createElement("h3");f.innerHTML=j.label;k.appendChild(f)}if(!this.get("grouplabels")){c.addClass(this.get("cont"),this.CLASS_PREFIX,"-nogrouplabels")}this.get("cont").appendChild(k);var h=document.createElement("ul");k.appendChild(h);if(!this._buttonGroupList){this._buttonGroupList={}}this._buttonGroupList[j.group]=h;for(var g=0;g<j.buttons.length;g++){var e=document.createElement("li");e.className=this.CLASS_PREFIX+"-groupitem";h.appendChild(e);if((j.buttons[g].type!==undefined)&&j.buttons[g].type=="separator"){this.addSeparator(e)}else{j.buttons[g].container=e;this.addButton(j.buttons[g])}}},addButtonToGroup:function(g,h,i){var f=this._buttonGroupList[h];var e=document.createElement("li");e.className=this.CLASS_PREFIX+"-groupitem";g.container=e;this.addButton(g,i);f.appendChild(e)},addButton:function(k,j){if(!this.get("element")){this._queue[this._queue.length]=["addButton",arguments];return false}if(!this._buttonList){this._buttonList=[]}if(!k.container){k.container=this.get("cont")}if((k.type=="menu")||(k.type=="split")||(k.type=="select")){if(d.isArray(k.menu)){for(var s in k.menu){if(d.hasOwnProperty(k.menu,s)){var y={fn:function(o,i,m){if(!k.menucmd){k.menucmd=k.value}k.value=((m.value)?m.value:m._oText.nodeValue)},scope:this};k.menu[s].onclick=y}}}}var t={},q=false;for(var n in k){if(d.hasOwnProperty(k,n)){if(!this._toolbarConfigs[n]){t[n]=k[n]}}}if(k.type=="select"){t.type="menu"}if(k.type=="spin"){t.type="push"}if(t.type=="color"){if(YAHOO.widget.Overlay){t=this._makeColorButton(t)}else{q=true}}if(t.menu){if((YAHOO.widget.Overlay)&&(k.menu instanceof YAHOO.widget.Overlay)){k.menu.showEvent.subscribe(function(){this._button=t})}else{for(var r=0;r<t.menu.length;r++){if(!t.menu[r].value){t.menu[r].value=t.menu[r].text}}if(this.browser.webkit){t.focusmenu=false}}}if(q){k=false}else{this._configs.buttons.value[this._configs.buttons.value.length]=k;var w=new this.buttonType(t);w.get("element").tabIndex="-1";w.get("element").setAttribute("role","button");w._selected=true;if(this.get("disabled")){w.set("disabled",true)}if(!k.id){k.id=w.get("id")}if(j){var f=w.get("element");var p=null;if(j.get){p=j.get("element").nextSibling}else{if(j.nextSibling){p=j.nextSibling}}if(p){p.parentNode.insertBefore(f,p)}}w.addClass(this.CLASS_PREFIX+"-"+w.get("value"));var v=document.createElement("span");v.className=this.CLASS_PREFIX+"-icon";w.get("element").insertBefore(v,w.get("firstChild"));if(w._button.tagName.toLowerCase()=="button"){w.get("element").setAttribute("unselectable","on");var x=document.createElement("a");x.innerHTML=w._button.innerHTML;x.href="#";x.tabIndex="-1";a.on(x,"click",function(i){a.stopEvent(i)});w._button.parentNode.replaceChild(x,w._button);w._button=x}if(k.type=="select"){if(w._button.tagName.toLowerCase()=="select"){v.parentNode.removeChild(v);var g=w._button;var u=w.get("element");u.parentNode.replaceChild(g,u)}else{w.addClass(this.CLASS_PREFIX+"-select")}}if(k.type=="spin"){if(!d.isArray(k.range)){k.range=[10,100]}this._makeSpinButton(w,k)}w.get("element").setAttribute("title",w.get("label"));if(k.type!="spin"){if((YAHOO.widget.Overlay)&&(t.menu instanceof YAHOO.widget.Overlay)){var h=function(o){var i=true;if(o.keyCode&&(o.keyCode==9)){i=false}if(i){if(this._colorPicker){this._colorPicker._button=k.value}var m=w.getMenu().element;if(c.getStyle(m,"visibility")=="hidden"){w.getMenu().show()}else{w.getMenu().hide()}}YAHOO.util.Event.stopEvent(o)};w.on("mousedown",h,k,this);w.on("keydown",h,k,this)}else{if((k.type!="menu")&&(k.type!="select")){w.on("keypress",this._buttonClick,k,this);w.on("mousedown",function(i){YAHOO.util.Event.stopEvent(i);this._buttonClick(i,k)},k,this);w.on("click",function(i){YAHOO.util.Event.stopEvent(i)})}else{w.on("mousedown",function(i){YAHOO.util.Event.stopEvent(i)});w.on("click",function(i){YAHOO.util.Event.stopEvent(i)});w.on("change",function(i){if(!k.menucmd){k.menucmd=k.value}k.value=i.value;this._buttonClick(i,k)},this,true);var l=this;w.on("appendTo",function(){var i=this;if(i.getMenu()&&i.getMenu().mouseDownEvent){i.getMenu().mouseDownEvent.subscribe(function(z,o){var m=o[1];YAHOO.util.Event.stopEvent(o[0]);i._onMenuClick(o[0],i);if(!k.menucmd){k.menucmd=k.value}k.value=((m.value)?m.value:m._oText.nodeValue);l._buttonClick.call(l,o[1],k);i._hideMenu();return false});i.getMenu().clickEvent.subscribe(function(o,m){YAHOO.util.Event.stopEvent(m[0])});i.getMenu().mouseUpEvent.subscribe(function(o,m){YAHOO.util.Event.stopEvent(m[0])})}})}}}else{w.on("mousedown",function(i){YAHOO.util.Event.stopEvent(i)});w.on("click",function(i){YAHOO.util.Event.stopEvent(i)})}if(this.browser.ie){}if(this.browser.webkit){w.hasFocus=function(){return true}}this._buttonList[this._buttonList.length]=w;if((k.type=="menu")||(k.type=="split")||(k.type=="select")){if(d.isArray(k.menu)){var e=w.getMenu();if(e&&e.renderEvent){e.renderEvent.subscribe(this._addMenuClasses,w);if(k.renderer){e.renderEvent.subscribe(k.renderer,w)}}}}}return k},addSeparator:function(e,h){if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false}var f=((e)?e:this.get("cont"));if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false}if(this._sepCount===null){this._sepCount=0}if(!this._sep){this._sep=document.createElement("SPAN");c.addClass(this._sep,this.CLASS_SEPARATOR);this._sep.innerHTML="|"}var g=this._sep.cloneNode(true);this._sepCount++;c.addClass(g,this.CLASS_SEPARATOR+"-"+this._sepCount);if(h){var i=null;if(h.get){i=h.get("element").nextSibling}else{if(h.nextSibling){i=h.nextSibling}else{i=h}}if(i){if(i==h){i.parentNode.appendChild(g)}else{i.parentNode.insertBefore(g,i)}}}else{f.appendChild(g)}return g},_createColorPicker:function(h){if(c.get(h+"_colors")){c.get(h+"_colors").parentNode.removeChild(c.get(h+"_colors"))}var e=document.createElement("div");e.className="yui-toolbar-colors";e.id=h+"_colors";e.style.display="none";a.on(window,"load",function(){document.body.appendChild(e)},this,true);this._colorPicker=e;var g="";for(var f in this._colorData){if(d.hasOwnProperty(this._colorData,f)){g+='<a style="background-color: '+f+'" href="#">'+f.replace("#","")+"</a>"}}g+="<span><em>X</em><strong></strong></span>";window.setTimeout(function(){e.innerHTML=g},0);a.on(e,"mouseover",function(m){var k=this._colorPicker;var l=k.getElementsByTagName("em")[0];var j=k.getElementsByTagName("strong")[0];var i=a.getTarget(m);if(i.tagName.toLowerCase()=="a"){l.style.backgroundColor=i.style.backgroundColor;j.innerHTML=this._colorData["#"+i.innerHTML]+"<br>"+i.innerHTML}},this,true);a.on(e,"focus",function(i){a.stopEvent(i)});a.on(e,"click",function(i){a.stopEvent(i)});a.on(e,"mousedown",function(j){a.stopEvent(j);var i=a.getTarget(j);if(i.tagName.toLowerCase()=="a"){var l=this.fireEvent("colorPickerClicked",{type:"colorPickerClicked",target:this,button:this._colorPicker._button,color:i.innerHTML,colorName:this._colorData["#"+i.innerHTML]});if(l!==false){var k={color:i.innerHTML,colorName:this._colorData["#"+i.innerHTML],value:this._colorPicker._button};this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:k})}this.getButtonByValue(this._colorPicker._button).getMenu().hide()}},this,true)},_resetColorPicker:function(){var f=this._colorPicker.getElementsByTagName("em")[0];var e=this._colorPicker.getElementsByTagName("strong")[0];f.style.backgroundColor="transparent";e.innerHTML=""},_makeColorButton:function(e){if(!this._colorPicker){this._createColorPicker(this.get("id"))}e.type="color";e.menu=new YAHOO.widget.Overlay(this.get("id")+"_"+e.value+"_menu",{visible:false,position:"absolute",iframe:true});e.menu.setBody("");e.menu.render(this.get("cont"));c.addClass(e.menu.element,"yui-button-menu");c.addClass(e.menu.element,"yui-color-button-menu");e.menu.beforeShowEvent.subscribe(function(){e.menu.cfg.setProperty("zindex",5);e.menu.cfg.setProperty("context",[this.getButtonById(e.id).get("element"),"tl","bl"]);this._resetColorPicker();var f=this._colorPicker;if(f.parentNode){f.parentNode.removeChild(f)}e.menu.setBody("");e.menu.appendToBody(f);this._colorPicker.style.display="block"},this,true);return e},_makeSpinButton:function(r,l){r.addClass(this.CLASS_PREFIX+"-spinbutton");var s=this,n=r._button.parentNode.parentNode,i=l.range,h=document.createElement("a"),g=document.createElement("a");h.href="#";g.href="#";h.tabIndex="-1";g.tabIndex="-1";h.className="up";h.title=this.STR_SPIN_UP;h.innerHTML=this.STR_SPIN_UP;g.className="down";g.title=this.STR_SPIN_DOWN;g.innerHTML=this.STR_SPIN_DOWN;n.appendChild(h);n.appendChild(g);var m=YAHOO.lang.substitute(this.STR_SPIN_LABEL,{VALUE:r.get("label")});r.set("title",m);var q=function(t){t=((t<i[0])?i[0]:t);t=((t>i[1])?i[1]:t);return t};var p=this.browser;var f=false;var k=this.STR_SPIN_LABEL;if(this._titlebar&&this._titlebar.firstChild){f=this._titlebar.firstChild}var e=function(u){YAHOO.util.Event.stopEvent(u);if(!r.get("disabled")&&(u.keyCode!=9)){var v=parseInt(r.get("label"),10);v++;v=q(v);r.set("label",""+v);var t=YAHOO.lang.substitute(k,{VALUE:r.get("label")});r.set("title",t);if(!p.webkit&&f){}s._buttonClick(u,l)}};var o=function(u){YAHOO.util.Event.stopEvent(u);if(!r.get("disabled")&&(u.keyCode!=9)){var v=parseInt(r.get("label"),10);v--;v=q(v);r.set("label",""+v);var t=YAHOO.lang.substitute(k,{VALUE:r.get("label")});r.set("title",t);if(!p.webkit&&f){}s._buttonClick(u,l)}};var j=function(t){if(t.keyCode==38){e(t)}else{if(t.keyCode==40){o(t)}else{if(t.keyCode==107&&t.shiftKey){e(t)}else{if(t.keyCode==109&&t.shiftKey){o(t)}}}}};r.on("keydown",j,this,true);a.on(h,"mousedown",function(t){a.stopEvent(t)},this,true);a.on(g,"mousedown",function(t){a.stopEvent(t)},this,true);a.on(h,"click",e,this,true);a.on(g,"click",o,this,true)},_buttonClick:function(n,f){var e=true;if(n&&n.type=="keypress"){if(n.keyCode==9){e=false}else{if((n.keyCode===13)||(n.keyCode===0)||(n.keyCode===32)){}else{e=false}}}if(e){var p=true,h=false;f.isSelected=this.isSelected(f.id);if(f.value){h=this.fireEvent(f.value+"Click",{type:f.value+"Click",target:this.get("element"),button:f});if(h===false){p=false}}if(f.menucmd&&p){h=this.fireEvent(f.menucmd+"Click",{type:f.menucmd+"Click",target:this.get("element"),button:f});if(h===false){p=false}}if(p){this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:f})}if(f.type=="select"){var l=this.getButtonById(f.id);if(l.buttonType=="rich"){var k=f.value;for(var j=0;j<f.menu.length;j++){if(f.menu[j].value==f.value){k=f.menu[j].text;break}}l.set("label",'<span class="yui-toolbar-'+f.menucmd+"-"+(f.value).replace(/ /g,"-").toLowerCase()+'">'+k+"</span>");var o=l.getMenu().getItems();for(var g=0;g<o.length;g++){if(o[g].value.toLowerCase()==f.value.toLowerCase()){o[g].cfg.setProperty("checked",true)}else{o[g].cfg.setProperty("checked",false)}}}}if(n){a.stopEvent(n)}}},_keyNav:null,_navCounter:null,_navigateButtons:function(f){switch(f.keyCode){case 37:case 39:if(f.keyCode==37){this._navCounter--}else{this._navCounter++}if(this._navCounter>(this._buttonList.length-1)){this._navCounter=0}if(this._navCounter<0){this._navCounter=(this._buttonList.length-1)}if(this._buttonList[this._navCounter]){var e=this._buttonList[this._navCounter].get("element");if(this.browser.ie){e=this._buttonList[this._navCounter].get("element").getElementsByTagName("a")[0]}if(this._buttonList[this._navCounter].get("disabled")){this._navigateButtons(f)}else{e.focus()}}break}},_handleFocus:function(){if(!this._keyNav){var e="keypress";if(this.browser.ie){e="keydown"}a.on(this.get("element"),e,this._navigateButtons,this,true);this._keyNav=true;this._navCounter=-1}},getButtonById:function(g){var e=this._buttonList.length;for(var f=0;f<e;f++){if(this._buttonList[f]&&this._buttonList[f].get("id")==g){return this._buttonList[f]}}return false},getButtonByValue:function(n){var h=this.get("buttons");var f=h.length;for(var k=0;k<f;k++){if(h[k].group!==undefined){for(var e=0;e<h[k].buttons.length;e++){if((h[k].buttons[e].value==n)||(h[k].buttons[e].menucmd==n)){return this.getButtonById(h[k].buttons[e].id)}if(h[k].buttons[e].menu){for(var l=0;l<h[k].buttons[e].menu.length;l++){if(h[k].buttons[e].menu[l].value==n){return this.getButtonById(h[k].buttons[e].id)}}}}}else{if((h[k].value==n)||(h[k].menucmd==n)){return this.getButtonById(h[k].id)}if(h[k].menu){for(var g=0;g<h[k].menu.length;g++){if(h[k].menu[g].value==n){return this.getButtonById(h[k].id)}}}}}return false},getButtonByIndex:function(e){if(this._buttonList[e]){return this._buttonList[e]}else{return false}},getButtons:function(){return this._buttonList},disableButton:function(f){var e=b.call(this,f);if(e){e.set("disabled",true)}else{return false}},enableButton:function(f){if(this.get("disabled")){return false}var e=b.call(this,f);if(e){if(e.get("disabled")){e.set("disabled",false)}}else{return false}},isSelected:function(f){var e=b.call(this,f);if(e){return e._selected}return false},selectButton:function(i,g){var f=b.call(this,i);if(f){f.addClass("yui-button-selected");f.addClass("yui-button-"+f.get("value")+"-selected");f._selected=true;if(g){if(f.buttonType=="rich"){var h=f.getMenu().getItems();for(var e=0;e<h.length;e++){if(h[e].value==g){h[e].cfg.setProperty("checked",true);f.set("label",'<span class="yui-toolbar-'+f.get("value")+"-"+(g).replace(/ /g,"-").toLowerCase()+'">'+h[e]._oText.nodeValue+"</span>")}else{h[e].cfg.setProperty("checked",false)}}}}}else{return false}},deselectButton:function(f){var e=b.call(this,f);if(e){e.removeClass("yui-button-selected");e.removeClass("yui-button-"+e.get("value")+"-selected");e.removeClass("yui-button-hover");e._selected=false}else{return false}},deselectAllButtons:function(){var e=this._buttonList.length;for(var f=0;f<e;f++){this.deselectButton(this._buttonList[f])}},disableAllButtons:function(){if(this.get("disabled")){return false}var e=this._buttonList.length;for(var f=0;f<e;f++){this.disableButton(this._buttonList[f])}},enableAllButtons:function(){if(this.get("disabled")){return false}var e=this._buttonList.length;for(var f=0;f<e;f++){this.enableButton(this._buttonList[f])}},resetAllButtons:function(j){if(!d.isObject(j)){j={}}if(this.get("disabled")){return false}var e=this._buttonList.length;for(var f=0;f<e;f++){var h=this._buttonList[f];if(h){var g=h._configs.disabled._initialConfig.value;if(j[h.get("id")]){this.enableButton(h);this.selectButton(h)}else{if(g){this.disableButton(h)}else{this.enableButton(h)}this.deselectButton(h)}}}},destroyButton:function(j){var g=b.call(this,j);if(g){var h=g.get("id");g.destroy();var e=this._buttonList.length;for(var f=0;f<e;f++){if(this._buttonList[f]&&this._buttonList[f].get("id")==h){this._buttonList[f]=null}}}else{return false}},destroy:function(){this.get("element").innerHTML="";this.get("element").className="";for(var e in this){if(d.hasOwnProperty(this,e)){this[e]=null}}return true},collapse:function(f){var e=c.getElementsByClassName("collapse","span",this._titlebar);if(f===false){c.removeClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");if(e[0]){c.removeClass(e[0],"collapsed")}this.fireEvent("toolbarExpanded",{type:"toolbarExpanded",target:this})}else{if(e[0]){c.addClass(e[0],"collapsed")}c.addClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");this.fireEvent("toolbarCollapsed",{type:"toolbarCollapsed",target:this})}},toString:function(){return"Toolbar (#"+this.get("element").id+") with "+this._buttonList.length+" buttons."}})})();(function(){var c=YAHOO.util.Dom,a=YAHOO.util.Event,d=YAHOO.lang,b=YAHOO.widget.Toolbar;YAHOO.widget.SimpleEditor=function(h,m){var g={};if(d.isObject(h)&&(!h.tagName)&&!m){d.augmentObject(g,h);h=document.createElement("textarea");this.DOMReady=true;if(g.container){var k=c.get(g.container);k.appendChild(h)}else{document.body.appendChild(h)}}else{if(m){d.augmentObject(g,m)}}var i={element:null,attributes:g},f=null;if(d.isString(h)){f=h}else{if(i.attributes.id){f=i.attributes.id}else{this.DOMReady=true;f=c.generateId(h)}}i.element=h;var j=document.createElement("DIV");i.attributes.element_cont=new YAHOO.util.Element(j,{id:f+"_container"});var e=document.createElement("div");c.addClass(e,"first-child");i.attributes.element_cont.appendChild(e);if(!i.attributes.toolbar_cont){i.attributes.toolbar_cont=document.createElement("DIV");i.attributes.toolbar_cont.id=f+"_toolbar";e.appendChild(i.attributes.toolbar_cont)}var l=document.createElement("DIV");e.appendChild(l);i.attributes.editor_wrapper=l;YAHOO.widget.SimpleEditor.superclass.constructor.call(this,i.element,i.attributes)};YAHOO.extend(YAHOO.widget.SimpleEditor,YAHOO.util.Element,{_resizeConfig:{handles:["br"],autoRatio:true,status:true,proxy:true,useShim:true,setSize:false},_setupResize:function(){if(!YAHOO.util.DD||!YAHOO.util.Resize){return false}if(this.get("resize")){var e={};d.augmentObject(e,this._resizeConfig);this.resize=new YAHOO.util.Resize(this.get("element_cont").get("element"),e);this.resize.on("resize",function(g){var l=this.get("animate");this.set("animate",false);this.set("width",g.width+"px");var i=g.height,j=(this.toolbar.get("element").clientHeight+2),k=0;if(this.dompath){k=(this.dompath.clientHeight+1)}var f=(i-j-k);this.set("height",f+"px");this.get("element_cont").setStyle("height","");this.set("animate",l)},this,true)}},resize:null,_setupDD:function(){if(!YAHOO.util.DD){return false}if(this.get("drag")){var f=this.get("drag"),e=YAHOO.util.DD;if(f==="proxy"){e=YAHOO.util.DDProxy}this.dd=new e(this.get("element_cont").get("element"));this.toolbar.addClass("draggable");this.dd.setHandleElId(this.toolbar._titlebar)}},dd:null,_lastCommand:null,_undoNodeChange:function(){},_storeUndo:function(){},_checkKey:function(f,j){var g=false;if((j.keyCode===f.key)){if(f.mods&&(f.mods.length>0)){var l=0;for(var h=0;h<f.mods.length;h++){if(this.browser.mac){if(f.mods[h]=="ctrl"){f.mods[h]="meta"}}if(j[f.mods[h]+"Key"]===true){l++}}if(l===f.mods.length){g=true}}else{g=true}}return g},_keyMap:{SELECT_ALL:{key:65,mods:["ctrl"]},CLOSE_WINDOW:{key:87,mods:["shift","ctrl"]},FOCUS_TOOLBAR:{key:27,mods:["shift"]},FOCUS_AFTER:{key:27},CREATE_LINK:{key:76,mods:["shift","ctrl"]},BOLD:{key:66,mods:["shift","ctrl"]},ITALIC:{key:73,mods:["shift","ctrl"]},UNDERLINE:{key:85,mods:["shift","ctrl"]},UNDO:{key:90,mods:["ctrl"]},REDO:{key:90,mods:["shift","ctrl"]},JUSTIFY_LEFT:{key:219,mods:["shift","ctrl"]},JUSTIFY_CENTER:{key:220,mods:["shift","ctrl"]},JUSTIFY_RIGHT:{key:221,mods:["shift","ctrl"]}},_cleanClassName:function(e){return e.replace(/ /g,"-").toLowerCase()},_textarea:null,_docType:'<!DOCTYPE HTML PUBLIC "-
|
}else{R=this._getDoc().body;}}if(R){F=M(G,J);if(this._isElement(R,"body")||this._isElement(R,"html")){if(this._isElement(R,"html")){R=this._getDoc().body;}R.appendChild(F);}else{if(R.nextSibling){R.parentNode.insertBefore(F,R.nextSibling);}else{R.parentNode.appendChild(F);}}this.currentElement[this.currentElement.length]=F;this.currentEvent=null;if(this.browser.webkit){this._getSelection().setBaseAndExtent(F,0,F,0);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(true);}}}}else{this._setEditorStyle(true);this._getDoc().execCommand("fontname",false,"yui-tmp");var E=[],P,V=["font","span","i","b","u"];if(!this._isElement(this._getSelectedElement(),"body")){V[V.length]=this._getDoc().getElementsByTagName(this._getSelectedElement().tagName);V[V.length]=this._getDoc().getElementsByTagName(this._getSelectedElement().parentNode.tagName);}for(var K=0;K<V.length;K++){var I=this._getDoc().getElementsByTagName(V[K]);for(var U=0;U<I.length;U++){E[E.length]=I[U];}}for(var S=0;S<E.length;S++){if((YAHOO.util.Dom.getStyle(E[S],"font-family")=="yui-tmp")||(E[S].face&&(E[S].face=="yui-tmp"))){F=M(G,J);F.innerHTML=E[S].innerHTML;if(this._isElement(E[S],"ol")||(this._isElement(E[S],"ul"))){var N=E[S].getElementsByTagName("li")[0];E[S].style.fontFamily="inherit";N.style.fontFamily="inherit";F.innerHTML=N.innerHTML;N.innerHTML="";N.appendChild(F);this.currentElement[this.currentElement.length]=F;}else{if(this._isElement(E[S],"li")){E[S].innerHTML="";E[S].appendChild(F);E[S].style.fontFamily="inherit";this.currentElement[this.currentElement.length]=F;}else{if(E[S].parentNode){E[S].parentNode.replaceChild(F,E[S]);this.currentElement[this.currentElement.length]=F;this.currentEvent=null;if(this.browser.webkit){this._getSelection().setBaseAndExtent(F,0,F,0);if(this.browser.webkit3){this._getSelection().collapseToStart();}else{this._getSelection().collapse(true);}}if(this.browser.ie&&J&&J.fontSize){this._getSelection().empty();}if(this.browser.gecko){this._getSelection().collapseToStart();}}}}}}var T=this.currentElement.length;for(var O=0;O<T;O++){if((O+1)!=T){if(this.currentElement[O]&&this.currentElement[O].nextSibling){if(this._isElement(this.currentElement[O],"br")){this.currentElement[this.currentElement.length]=this.currentElement[O].nextSibling;}}}}}},saveHTML:function(){var F=this.cleanHTML();if(this._textarea){this.get("element").value=F;}else{this.get("element").innerHTML=F;}if(this.get("saveEl")!==this.get("element")){var E=this.get("saveEl");if(D.isString(E)){E=C.get(E);}if(E){if(E.tagName.toLowerCase()==="textarea"){E.value=F;}else{E.innerHTML=F;}}}return F;},setEditorHTML:function(F){var E=this._cleanIncomingHTML(F);this._getDoc().body.innerHTML=E;this.nodeChange();},getEditorHTML:function(){var E=this._getDoc().body;if(E===null){return null;}return this._getDoc().body.innerHTML;},show:function(){if(this.browser.gecko){this._setDesignMode("on");this._focusWindow();}if(this.browser.webkit){var E=this;window.setTimeout(function(){E._setInitialContent.call(E);},10);}if(this.currentWindow){this.closeWindow();}this.get("iframe").setStyle("position","static");this.get("iframe").setStyle("left","");},hide:function(){if(this.currentWindow){this.closeWindow();}if(this._fixNodesTimer){clearTimeout(this._fixNodesTimer);this._fixNodesTimer=null;}if(this._nodeChangeTimer){clearTimeout(this._nodeChangeTimer);this._nodeChangeTimer=null;}this._lastNodeChange=0;this.get("iframe").setStyle("position","absolute");this.get("iframe").setStyle("left","-9999px");},_cleanIncomingHTML:function(E){E=E.replace(/<strong([^>]*)>/gi,"<b$1>");E=E.replace(/<\/strong>/gi,"</b>");E=E.replace(/<embed([^>]*)>/gi,"<YUI_EMBED$1>");E=E.replace(/<\/embed>/gi,"</YUI_EMBED>");E=E.replace(/<em([^>]*)>/gi,"<i$1>");E=E.replace(/<\/em>/gi,"</i>");E=E.replace(/<YUI_EMBED([^>]*)>/gi,"<embed$1>");E=E.replace(/<\/YUI_EMBED>/gi,"</embed>");if(this.get("plainText")){E=E.replace(/\n/g,"<br>").replace(/\r/g,"<br>");E=E.replace(/ /gi," ");E=E.replace(/\t/gi," ");}E=E.replace(/<script([^>]*)>/gi,"<bad>");E=E.replace(/<\/script([^>]*)>/gi,"</bad>");E=E.replace(/<script([^>]*)>/gi,"<bad>");E=E.replace(/<\/script([^>]*)>/gi,"</bad>");E=E.replace(/\n/g,"<YUI_LF>").replace(/\r/g,"<YUI_LF>");E=E.replace(new RegExp("<bad([^>]*)>(.*?)</bad>","gi"),"");E=E.replace(/<YUI_LF>/g,"\n");return E;},cleanHTML:function(G){if(!G){G=this.getEditorHTML();}var F=this.get("markup");G=this.pre_filter_linebreaks(G,F);G=G.replace(/<img([^>]*)\/>/gi,"<YUI_IMG$1>");G=G.replace(/<img([^>]*)>/gi,"<YUI_IMG$1>");G=G.replace(/<input([^>]*)\/>/gi,"<YUI_INPUT$1>");G=G.replace(/<input([^>]*)>/gi,"<YUI_INPUT$1>");G=G.replace(/<ul([^>]*)>/gi,"<YUI_UL$1>");G=G.replace(/<\/ul>/gi,"</YUI_UL>");G=G.replace(/<blockquote([^>]*)>/gi,"<YUI_BQ$1>");G=G.replace(/<\/blockquote>/gi,"</YUI_BQ>");G=G.replace(/<embed([^>]*)>/gi,"<YUI_EMBED$1>");G=G.replace(/<\/embed>/gi,"</YUI_EMBED>");if((F=="semantic")||(F=="xhtml")){G=G.replace(/<i(\s+[^>]*)?>/gi,"<em$1>");G=G.replace(/<\/i>/gi,"</em>");G=G.replace(/<b(\s+[^>]*)?>/gi,"<strong$1>");G=G.replace(/<\/b>/gi,"</strong>");}G=G.replace(/<font/gi,"<font");G=G.replace(/<\/font>/gi,"</font>");G=G.replace(/<span/gi,"<span");G=G.replace(/<\/span>/gi,"</span>");if((F=="semantic")||(F=="xhtml")||(F=="css")){G=G.replace(new RegExp('<font([^>]*)face="([^>]*)">(.*?)</font>',"gi"),'<span $1 style="font-family: $2;">$3</span>');G=G.replace(/<u/gi,'<span style="text-decoration: underline;"');if(this.browser.webkit){G=G.replace(new RegExp('<span class="Apple-style-span" style="font-weight: bold;">([^>]*)</span>',"gi"),"<strong>$1</strong>");G=G.replace(new RegExp('<span class="Apple-style-span" style="font-style: italic;">([^>]*)</span>',"gi"),"<em>$1</em>");}G=G.replace(/\/u>/gi,"/span>");if(F=="css"){G=G.replace(/<em([^>]*)>/gi,"<i$1>");G=G.replace(/<\/em>/gi,"</i>");G=G.replace(/<strong([^>]*)>/gi,"<b$1>");G=G.replace(/<\/strong>/gi,"</b>");G=G.replace(/<b/gi,'<span style="font-weight: bold;"');G=G.replace(/\/b>/gi,"/span>");G=G.replace(/<i/gi,'<span style="font-style: italic;"');G=G.replace(/\/i>/gi,"/span>");}G=G.replace(/ /gi," ");}else{G=G.replace(/<u/gi,"<u");G=G.replace(/\/u>/gi,"/u>");}G=G.replace(/<ol([^>]*)>/gi,"<ol$1>");G=G.replace(/\/ol>/gi,"/ol>");G=G.replace(/<li/gi,"<li");G=G.replace(/\/li>/gi,"/li>");G=this.filter_safari(G);G=this.filter_internals(G);G=this.filter_all_rgb(G);G=this.post_filter_linebreaks(G,F);if(F=="xhtml"){G=G.replace(/<YUI_IMG([^>]*)>/g,"<img $1 />");G=G.replace(/<YUI_INPUT([^>]*)>/g,"<input $1 />");}else{G=G.replace(/<YUI_IMG([^>]*)>/g,"<img $1>");G=G.replace(/<YUI_INPUT([^>]*)>/g,"<input $1>");}G=G.replace(/<YUI_UL([^>]*)>/g,"<ul$1>");G=G.replace(/<\/YUI_UL>/g,"</ul>");G=this.filter_invalid_lists(G);G=G.replace(/<YUI_BQ([^>]*)>/g,"<blockquote$1>");G=G.replace(/<\/YUI_BQ>/g,"</blockquote>");G=G.replace(/<YUI_EMBED([^>]*)>/g,"<embed$1>");G=G.replace(/<\/YUI_EMBED>/g,"</embed>");G=G.replace(" & ","YUI_AMP");G=G.replace("&","&");G=G.replace("YUI_AMP","&");G=YAHOO.lang.trim(G);if(this.get("removeLineBreaks")){G=G.replace(/\n/g,"").replace(/\r/g,"");G=G.replace(/ /gi," ");}if(G.substring(0,6).toLowerCase()=="<span>"){G=G.substring(6);if(G.substring(G.length-7,G.length).toLowerCase()=="</span>"){G=G.substring(0,G.length-7);}}for(var E in this.invalidHTML){if(YAHOO.lang.hasOwnProperty(this.invalidHTML,E)){if(D.isObject(E)&&E.keepContents){G=G.replace(new RegExp("<"+E+"([^>]*)>(.*?)</"+E+">","gi"),"$1");}else{G=G.replace(new RegExp("<"+E+"([^>]*)>(.*?)</"+E+">","gi"),"");}}}this.fireEvent("cleanHTML",{type:"cleanHTML",target:this,html:G});return G;},filter_invalid_lists:function(E){E=E.replace(/<\/li>\n/gi,"</li>");E=E.replace(/<\/li><ol>/gi,"</li><li><ol>");E=E.replace(/<\/ol>/gi,"</ol></li>");E=E.replace(/<\/ol><\/li>\n/gi,"</ol>\n");E=E.replace(/<\/li><ul>/gi,"</li><li><ul>");E=E.replace(/<\/ul>/gi,"</ul></li>");E=E.replace(/<\/ul><\/li>\n?/gi,"</ul>\n");E=E.replace(/<\/li>/gi,"</li>\n");E=E.replace(/<\/ol>/gi,"</ol>\n");E=E.replace(/<ol>/gi,"<ol>\n");E=E.replace(/<ul>/gi,"<ul>\n");return E;},filter_safari:function(E){if(this.browser.webkit){E=E.replace(/<span class="Apple-tab-span" style="white-space:pre">([^>])<\/span>/gi," ");E=E.replace(/Apple-style-span/gi,"");E=E.replace(/style="line-height: normal;"/gi,"");E=E.replace(/<li><\/li>/gi,"");E=E.replace(/<li> <\/li>/gi,"");E=E.replace(/<li> <\/li>/gi,"");if(this.get("ptags")){E=E.replace(/<div([^>]*)>/g,"<p$1>");E=E.replace(/<\/div>/gi,"</p>");}else{E=E.replace(/<div>/gi,"");E=E.replace(/<\/div>/gi,"<br>");}}return E;},filter_internals:function(E){E=E.replace(/\r/g,"");E=E.replace(/<\/?(body|head|html)[^>]*>/gi,"");E=E.replace(/<YUI_BR><\/li>/gi,"</li>");E=E.replace(/yui-tag-span/gi,"");E=E.replace(/yui-tag/gi,"");E=E.replace(/yui-non/gi,"");E=E.replace(/yui-img/gi,"");E=E.replace(/ tag="span"/gi,"");E=E.replace(/ class=""/gi,"");E=E.replace(/ style=""/gi,"");E=E.replace(/ class=" "/gi,"");E=E.replace(/ class=" "/gi,"");E=E.replace(/ target=""/gi,"");E=E.replace(/ title=""/gi,"");if(this.browser.ie){E=E.replace(/ class= /gi,"");E=E.replace(/ class= >/gi,"");E=E.replace(/_height="([^>])"/gi,"");E=E.replace(/_width="([^>])"/gi,"");}return E;},filter_all_rgb:function(I){var H=new RegExp("rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)","gi");var E=I.match(H);if(D.isArray(E)){for(var G=0;G<E.length;G++){var F=this.filter_rgb(E[G]);I=I.replace(E[G].toString(),F);}}return I;},filter_rgb:function(G){if(G.toLowerCase().indexOf("rgb")!=-1){var J=new RegExp("(.*?)rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)(.*?)","gi");var F=G.replace(J,"$1,$2,$3,$4,$5").split(",");if(F.length==5){var I=parseInt(F[1],10).toString(16);var H=parseInt(F[2],10).toString(16);var E=parseInt(F[3],10).toString(16);I=I.length==1?"0"+I:I;H=H.length==1?"0"+H:H;E=E.length==1?"0"+E:E;G="#"+I+H+E;}}return G;},pre_filter_linebreaks:function(F,E){if(this.browser.webkit){F=F.replace(/<br class="khtml-block-placeholder">/gi,"<YUI_BR>");F=F.replace(/<br class="webkit-block-placeholder">/gi,"<YUI_BR>");}F=F.replace(/<br>/gi,"<YUI_BR>");F=F.replace(/<br (.*?)>/gi,"<YUI_BR>");F=F.replace(/<br\/>/gi,"<YUI_BR>");F=F.replace(/<br \/>/gi,"<YUI_BR>");F=F.replace(/<div><YUI_BR><\/div>/gi,"<YUI_BR>");F=F.replace(/<p>( | )<\/p>/g,"<YUI_BR>");F=F.replace(/<p><br> <\/p>/gi,"<YUI_BR>");F=F.replace(/<p> <\/p>/gi,"<YUI_BR>");F=F.replace(/<YUI_BR>$/,"");F=F.replace(/<YUI_BR><\/p>/g,"</p>");if(this.browser.ie){F=F.replace(/ /g,"\t");}return F;},post_filter_linebreaks:function(F,E){if(E=="xhtml"){F=F.replace(/<YUI_BR>/g,"<br />");}else{F=F.replace(/<YUI_BR>/g,"<br>");}return F;},clearEditorDoc:function(){this._getDoc().body.innerHTML=" ";},openWindow:function(E){},moveWindow:function(){},_closeWindow:function(){},closeWindow:function(){this.toolbar.resetAllButtons();this._focusWindow();},destroy:function(){if(this.resize){this.resize.destroy();}if(this.dd){this.dd.unreg();}if(this.get("panel")){this.get("panel").destroy();}this.saveHTML();this.toolbar.destroy();this.setStyle("visibility","visible");this.setStyle("position","static");this.setStyle("top","");this.setStyle("left","");var E=this.get("element");this.get("element_cont").get("parentNode").replaceChild(E,this.get("element_cont").get("element"));this.get("element_cont").get("element").innerHTML="";this.set("handleSubmit",false);return true;},toString:function(){var E="SimpleEditor";if(this.get&&this.get("element_cont")){E="SimpleEditor (#"+this.get("element_cont").get("id")+")"+((this.get("disabled")?" Disabled":""));}return E;}});YAHOO.widget.EditorInfo={_instances:{},blankImage:"",window:{},panel:null,getEditorById:function(E){if(!YAHOO.lang.isString(E)){E=E.id;}if(this._instances[E]){return this._instances[E];}return false;},toString:function(){var E=0;for(var F in this._instances){if(D.hasOwnProperty(this._instances,F)){E++;}}return"Editor Info ("+E+" registered intance"+((E>1)?"s":"")+")";
|
G=G.replace(/\/b>/gi,"/span>");G=G.replace(/<i/gi,'<span style="font-style: italic;"');G=G.replace(/\/i>/gi,"/span>");}G=G.replace(/ /gi," ");}else{G=G.replace(/<u/gi,"<u");G=G.replace(/\/u>/gi,"/u>");}G=G.replace(/<ol([^>]*)>/gi,"<ol$1>");G=G.replace(/\/ol>/gi,"/ol>");G=G.replace(/<li/gi,"<li");G=G.replace(/\/li>/gi,"/li>");G=this.filter_safari(G);G=this.filter_internals(G);G=this.filter_all_rgb(G);G=this.post_filter_linebreaks(G,F);if(F=="xhtml"){G=G.replace(/<YUI_IMG([^>]*)>/g,"<img $1 />");G=G.replace(/<YUI_INPUT([^>]*)>/g,"<input $1 />");}else{G=G.replace(/<YUI_IMG([^>]*)>/g,"<img $1>");G=G.replace(/<YUI_INPUT([^>]*)>/g,"<input $1>");}G=G.replace(/<YUI_UL([^>]*)>/g,"<ul$1>");G=G.replace(/<\/YUI_UL>/g,"</ul>");G=this.filter_invalid_lists(G);G=G.replace(/<YUI_BQ([^>]*)>/g,"<blockquote$1>");G=G.replace(/<\/YUI_BQ>/g,"</blockquote>");G=G.replace(/<YUI_EMBED([^>]*)>/g,"<embed$1>");G=G.replace(/<\/YUI_EMBED>/g,"</embed>");G=G.replace(" & ","YUI_AMP");G=G.replace("&","&");G=G.replace("YUI_AMP","&");G=YAHOO.lang.trim(G);if(this.get("removeLineBreaks")){G=G.replace(/\n/g,"").replace(/\r/g,"");G=G.replace(/ /gi," ");}if(G.substring(0,6).toLowerCase()=="<span>"){G=G.substring(6);if(G.substring(G.length-7,G.length).toLowerCase()=="</span>"){G=G.substring(0,G.length-7);}}for(var E in this.invalidHTML){if(YAHOO.lang.hasOwnProperty(this.invalidHTML,E)){if(D.isObject(E)&&E.keepContents){G=G.replace(new RegExp("<"+E+"([^>]*)>(.*?)</"+E+">","gi"),"$1");}else{G=G.replace(new RegExp("<"+E+"([^>]*)>(.*?)</"+E+">","gi"),"");}}}this.fireEvent("cleanHTML",{type:"cleanHTML",target:this,html:G});return G;},filter_invalid_lists:function(E){E=E.replace(/<\/li>\n/gi,"</li>");E=E.replace(/<\/li><ol>/gi,"</li><li><ol>");E=E.replace(/<\/ol>/gi,"</ol></li>");E=E.replace(/<\/ol><\/li>\n/gi,"</ol>\n");E=E.replace(/<\/li><ul>/gi,"</li><li><ul>");E=E.replace(/<\/ul>/gi,"</ul></li>");E=E.replace(/<\/ul><\/li>\n?/gi,"</ul>\n");E=E.replace(/<\/li>/gi,"</li>\n");E=E.replace(/<\/ol>/gi,"</ol>\n");E=E.replace(/<ol>/gi,"<ol>\n");E=E.replace(/<ul>/gi,"<ul>\n");return E;},filter_safari:function(E){if(this.browser.webkit){E=E.replace(/<span class="Apple-tab-span" style="white-space:pre">([^>])<\/span>/gi," ");E=E.replace(/Apple-style-span/gi,"");E=E.replace(/style="line-height: normal;"/gi,"");E=E.replace(/<li><\/li>/gi,"");E=E.replace(/<li> <\/li>/gi,"");E=E.replace(/<li> <\/li>/gi,"");if(this.get("ptags")){E=E.replace(/<div([^>]*)>/g,"<p$1>");E=E.replace(/<\/div>/gi,"</p>");}else{E=E.replace(/<div>/gi,"");E=E.replace(/<\/div>/gi,"<br>");}}return E;},filter_internals:function(E){E=E.replace(/\r/g,"");E=E.replace(/<\/?(body|head|html)[^>]*>/gi,"");E=E.replace(/<YUI_BR><\/li>/gi,"</li>");E=E.replace(/yui-tag-span/gi,"");E=E.replace(/yui-tag/gi,"");E=E.replace(/yui-non/gi,"");E=E.replace(/yui-img/gi,"");E=E.replace(/ tag="span"/gi,"");E=E.replace(/ class=""/gi,"");E=E.replace(/ style=""/gi,"");E=E.replace(/ class=" "/gi,"");E=E.replace(/ class=" "/gi,"");E=E.replace(/ target=""/gi,"");E=E.replace(/ title=""/gi,"");if(this.browser.ie){E=E.replace(/ class= /gi,"");E=E.replace(/ class= >/gi,"");E=E.replace(/_height="([^>])"/gi,"");E=E.replace(/_width="([^>])"/gi,"");}return E;},filter_all_rgb:function(I){var H=new RegExp("rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)","gi");var E=I.match(H);if(D.isArray(E)){for(var G=0;G<E.length;G++){var F=this.filter_rgb(E[G]);I=I.replace(E[G].toString(),F);}}return I;},filter_rgb:function(G){if(G.toLowerCase().indexOf("rgb")!=-1){var J=new RegExp("(.*?)rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)(.*?)","gi");var F=G.replace(J,"$1,$2,$3,$4,$5").split(",");if(F.length==5){var I=parseInt(F[1],10).toString(16);var H=parseInt(F[2],10).toString(16);var E=parseInt(F[3],10).toString(16);I=I.length==1?"0"+I:I;H=H.length==1?"0"+H:H;E=E.length==1?"0"+E:E;G="#"+I+H+E;}}return G;},pre_filter_linebreaks:function(F,E){if(this.browser.webkit){F=F.replace(/<br class="khtml-block-placeholder">/gi,"<YUI_BR>");F=F.replace(/<br class="webkit-block-placeholder">/gi,"<YUI_BR>");}F=F.replace(/<br>/gi,"<YUI_BR>");F=F.replace(/<br (.*?)>/gi,"<YUI_BR>");F=F.replace(/<br\/>/gi,"<YUI_BR>");F=F.replace(/<br \/>/gi,"<YUI_BR>");F=F.replace(/<div><YUI_BR><\/div>/gi,"<YUI_BR>");F=F.replace(/<p>( | )<\/p>/g,"<YUI_BR>");F=F.replace(/<p><br> <\/p>/gi,"<YUI_BR>");F=F.replace(/<p> <\/p>/gi,"<YUI_BR>");F=F.replace(/<YUI_BR>$/,"");F=F.replace(/<YUI_BR><\/p>/g,"</p>");if(this.browser.ie){F=F.replace(/ /g,"\t");}return F;},post_filter_linebreaks:function(F,E){if(E=="xhtml"){F=F.replace(/<YUI_BR>/g,"<br />");}else{F=F.replace(/<YUI_BR>/g,"<br>");}return F;},clearEditorDoc:function(){this._getDoc().body.innerHTML=" ";},openWindow:function(E){},moveWindow:function(){},_closeWindow:function(){},closeWindow:function(){this.toolbar.resetAllButtons();this._focusWindow();},destroy:function(){if(this.resize){this.resize.destroy();}if(this.dd){this.dd.unreg();}if(this.get("panel")){this.get("panel").destroy();}this.saveHTML();this.toolbar.destroy();this.setStyle("visibility","visible");this.setStyle("position","static");this.setStyle("top","");this.setStyle("left","");var E=this.get("element");this.get("element_cont").get("parentNode").replaceChild(E,this.get("element_cont").get("element"));this.get("element_cont").get("element").innerHTML="";this.set("handleSubmit",false);return true;},toString:function(){var E="SimpleEditor";if(this.get&&this.get("element_cont")){E="SimpleEditor (#"+this.get("element_cont").get("id")+")"+((this.get("disabled")?" Disabled":""));}return E;}});YAHOO.widget.EditorInfo={_instances:{},blankImage:"",window:{},panel:null,getEditorById:function(E){if(!YAHOO.lang.isString(E)){E=E.id;}if(this._instances[E]){return this._instances[E];}return false;},toString:function(){var E=0;for(var F in this._instances){if(D.hasOwnProperty(this._instances,F)){E++;}}return"Editor Info ("+E+" registered intance"+((E>1)?"s":"")+")";
|
(function(){var b=YAHOO.util.Dom,a=YAHOO.util.Event,c=YAHOO.lang;if(YAHOO.widget.Button){YAHOO.widget.ToolbarButtonAdvanced=YAHOO.widget.Button;YAHOO.widget.ToolbarButtonAdvanced.prototype.buttonType="rich";YAHOO.widget.ToolbarButtonAdvanced.prototype.checkValue=function(f){var e=this.getMenu().getItems();if(e.length===0){this.getMenu()._onBeforeShow();e=this.getMenu().getItems()}for(var d=0;d<e.length;d++){e[d].cfg.setProperty("checked",false);if(e[d].value==f){e[d].cfg.setProperty("checked",true)}}}}else{YAHOO.widget.ToolbarButtonAdvanced=function(){}}YAHOO.widget.ToolbarButton=function(e,d){if(c.isObject(arguments[0])&&!b.get(e).nodeType){d=e}var g=(d||{});var f={element:null,attributes:g};if(!f.attributes.type){f.attributes.type="push"}f.element=document.createElement("span");f.element.setAttribute("unselectable","on");f.element.className="yui-button yui-"+f.attributes.type+"-button";f.element.innerHTML='<span class="first-child"><a href="#">LABEL</a></span>';f.element.firstChild.firstChild.tabIndex="-1";f.attributes.id=b.generateId();YAHOO.widget.ToolbarButton.superclass.constructor.call(this,f.element,f.attributes)};YAHOO.extend(YAHOO.widget.ToolbarButton,YAHOO.util.Element,{buttonType:"normal",_handleMouseOver:function(){if(!this.get("disabled")){this.addClass("yui-button-hover");this.addClass("yui-"+this.get("type")+"-button-hover")}},_handleMouseOut:function(){this.removeClass("yui-button-hover");this.removeClass("yui-"+this.get("type")+"-button-hover")},checkValue:function(f){if(this.get("type")=="menu"){var e=this._button.options;for(var d=0;d<e.length;d++){if(e[d].value==f){e.selectedIndex=d}}}},init:function(e,d){YAHOO.widget.ToolbarButton.superclass.init.call(this,e,d);this.on("mouseover",this._handleMouseOver,this,true);this.on("mouseout",this._handleMouseOut,this,true)},initAttributes:function(d){YAHOO.widget.ToolbarButton.superclass.initAttributes.call(this,d);this.setAttributeConfig("value",{value:d.value});this.setAttributeConfig("menu",{value:d.menu||false});this.setAttributeConfig("type",{value:d.type,writeOnce:true,method:function(h){var g,f;if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0]}switch(h){case"select":case"menu":g=document.createElement("select");var j=this.get("menu");for(var e=0;e<j.length;e++){f=document.createElement("option");f.innerHTML=j[e].text;f.value=j[e].value;if(j[e].checked){f.selected=true}g.appendChild(f)}this._button.parentNode.replaceChild(g,this._button);a.on(g,"change",this._handleSelect,this,true);this._button=g;break}}});this.setAttributeConfig("disabled",{value:d.disabled||false,method:function(e){if(e){this.addClass("yui-button-disabled");this.addClass("yui-"+this.get("type")+"-button-disabled")}else{this.removeClass("yui-button-disabled");this.removeClass("yui-"+this.get("type")+"-button-disabled")}if(this.get("type")=="menu"){this._button.disabled=e}}});this.setAttributeConfig("label",{value:d.label,method:function(e){if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0]}if(this.get("type")=="push"){this._button.innerHTML=e}}});this.setAttributeConfig("title",{value:d.title});this.setAttributeConfig("container",{value:null,writeOnce:true,method:function(e){this.appendTo(e)}})},_handleSelect:function(e){var d=a.getTarget(e);var f=d.options[d.selectedIndex].value;this.fireEvent("change",{type:"change",value:f})},getMenu:function(){return this.get("menu")},destroy:function(){a.purgeElement(this.get("element"),true);this.get("element").parentNode.removeChild(this.get("element"));for(var d in this){if(c.hasOwnProperty(this,d)){this[d]=null}}},fireEvent:function(e,d){if(this.DOM_EVENTS[e]&&this.get("disabled")){return}YAHOO.widget.ToolbarButton.superclass.fireEvent.call(this,e,d)},toString:function(){return"ToolbarButton ("+this.get("id")+")"}})})();(function(){var c=YAHOO.util.Dom,a=YAHOO.util.Event,d=YAHOO.lang;var b=function(f){var e=f;if(d.isString(f)){e=this.getButtonById(f)}if(d.isNumber(f)){e=this.getButtonByIndex(f)}if((!(e instanceof YAHOO.widget.ToolbarButton))&&(!(e instanceof YAHOO.widget.ToolbarButtonAdvanced))){e=this.getButtonByValue(f)}if((e instanceof YAHOO.widget.ToolbarButton)||(e instanceof YAHOO.widget.ToolbarButtonAdvanced)){return e}return false};YAHOO.widget.Toolbar=function(i,h){if(d.isObject(arguments[0])&&!c.get(i).nodeType){h=i}var k={};if(h){d.augmentObject(k,h)}var j={element:null,attributes:k};if(d.isString(i)&&c.get(i)){j.element=c.get(i)}else{if(d.isObject(i)&&c.get(i)&&c.get(i).nodeType){j.element=c.get(i)}}if(!j.element){j.element=document.createElement("DIV");j.element.id=c.generateId();if(k.container&&c.get(k.container)){c.get(k.container).appendChild(j.element)}}if(!j.element.id){j.element.id=((d.isString(i))?i:c.generateId())}var f=document.createElement("fieldset");var g=document.createElement("legend");g.innerHTML="Toolbar";f.appendChild(g);var e=document.createElement("DIV");j.attributes.cont=e;c.addClass(e,"yui-toolbar-subcont");f.appendChild(e);j.element.appendChild(f);j.element.tabIndex=-1;j.attributes.element=j.element;j.attributes.id=j.element.id;YAHOO.widget.Toolbar.superclass.constructor.call(this,j.element,j.attributes)};YAHOO.extend(YAHOO.widget.Toolbar,YAHOO.util.Element,{_addMenuClasses:function(h,e,j){c.addClass(this.element,"yui-toolbar-"+j.get("value")+"-menu");if(c.hasClass(j._button.parentNode.parentNode,"yui-toolbar-select")){c.addClass(this.element,"yui-toolbar-select-menu")}var f=this.getItems();for(var g=0;g<f.length;g++){c.addClass(f[g].element,"yui-toolbar-"+j.get("value")+"-"+((f[g].value)?f[g].value.replace(/ /g,"-").toLowerCase():f[g]._oText.nodeValue.replace(/ /g,"-").toLowerCase()));c.addClass(f[g].element,"yui-toolbar-"+j.get("value")+"-"+((f[g].value)?f[g].value.replace(/ /g,"-"):f[g]._oText.nodeValue.replace(/ /g,"-")))}},buttonType:YAHOO.widget.ToolbarButton,dd:null,_colorData:{"#111111":"Obsidian","#2D2D2D":"Dark Gray","#434343":"Shale","#5B5B5B":"Flint","#737373":"Gray","#8B8B8B":"Concrete","#A2A2A2":"Gray","#B9B9B9":"Titanium","#000000":"Black","#D0D0D0":"Light Gray","#E6E6E6":"Silver","#FFFFFF":"White","#BFBF00":"Pumpkin","#FFFF00":"Yellow","#FFFF40":"Banana","#FFFF80":"Pale Yellow","#FFFFBF":"Butter","#525330":"Raw Siena","#898A49":"Mildew","#AEA945":"Olive","#7F7F00":"Paprika","#C3BE71":"Earth","#E0DCAA":"Khaki","#FCFAE1":"Cream","#60BF00":"Cactus","#80FF00":"Chartreuse","#A0FF40":"Green","#C0FF80":"Pale Lime","#DFFFBF":"Light Mint","#3B5738":"Green","#668F5A":"Lime Gray","#7F9757":"Yellow","#407F00":"Clover","#8A9B55":"Pistachio","#B7C296":"Light Jade","#E6EBD5":"Breakwater","#00BF00":"Spring Frost","#00FF80":"Pastel Green","#40FFA0":"Light Emerald","#80FFC0":"Sea Foam","#BFFFDF":"Sea Mist","#033D21":"Dark Forrest","#438059":"Moss","#7FA37C":"Medium Green","#007F40":"Pine","#8DAE94":"Yellow Gray Green","#ACC6B5":"Aqua Lung","#DDEBE2":"Sea Vapor","#00BFBF":"Fog","#00FFFF":"Cyan","#40FFFF":"Turquoise Blue","#80FFFF":"Light Aqua","#BFFFFF":"Pale Cyan","#033D3D":"Dark Teal","#347D7E":"Gray Turquoise","#609A9F":"Green Blue","#007F7F":"Seaweed","#96BDC4":"Green Gray","#B5D1D7":"Soapstone","#E2F1F4":"Light Turquoise","#0060BF":"Summer Sky","#0080FF":"Sky Blue","#40A0FF":"Electric Blue","#80C0FF":"Light Azure","#BFDFFF":"Ice Blue","#1B2C48":"Navy","#385376":"Biscay","#57708F":"Dusty Blue","#00407F":"Sea Blue","#7792AC":"Sky Blue Gray","#A8BED1":"Morning Sky","#DEEBF6":"Vapor","#0000BF":"Deep Blue","#0000FF":"Blue","#4040FF":"Cerulean Blue","#8080FF":"Evening Blue","#BFBFFF":"Light Blue","#212143":"Deep Indigo","#373E68":"Sea Blue","#444F75":"Night Blue","#00007F":"Indigo Blue","#585E82":"Dockside","#8687A4":"Blue Gray","#D2D1E1":"Light Blue Gray","#6000BF":"Neon Violet","#8000FF":"Blue Violet","#A040FF":"Violet Purple","#C080FF":"Violet Dusk","#DFBFFF":"Pale Lavender","#302449":"Cool Shale","#54466F":"Dark Indigo","#655A7F":"Dark Violet","#40007F":"Violet","#726284":"Smoky Violet","#9E8FA9":"Slate Gray","#DCD1DF":"Violet White","#BF00BF":"Royal Violet","#FF00FF":"Fuchsia","#FF40FF":"Magenta","#FF80FF":"Orchid","#FFBFFF":"Pale Magenta","#4A234A":"Dark Purple","#794A72":"Medium Purple","#936386":"Cool Granite","#7F007F":"Purple","#9D7292":"Purple Moon","#C0A0B6":"Pale Purple","#ECDAE5":"Pink Cloud","#BF005F":"Hot Pink","#FF007F":"Deep Pink","#FF409F":"Grape","#FF80BF":"Electric Pink","#FFBFDF":"Pink","#451528":"Purple Red","#823857":"Purple Dino","#A94A76":"Purple Gray","#7F003F":"Rose","#BC6F95":"Antique Mauve","#D8A5BB":"Cool Marble","#F7DDE9":"Pink Granite","#C00000":"Apple","#FF0000":"Fire Truck","#FF4040":"Pale Red","#FF8080":"Salmon","#FFC0C0":"Warm Pink","#441415":"Sepia","#82393C":"Rust","#AA4D4E":"Brick","#800000":"Brick Red","#BC6E6E":"Mauve","#D8A3A4":"Shrimp Pink","#F8DDDD":"Shell Pink","#BF5F00":"Dark Orange","#FF7F00":"Orange","#FF9F40":"Grapefruit","#FFBF80":"Canteloupe","#FFDFBF":"Wax","#482C1B":"Dark Brick","#855A40":"Dirt","#B27C51":"Tan","#7F3F00":"Nutmeg","#C49B71":"Mustard","#E1C4A8":"Pale Tan","#FDEEE0":"Marble"},_colorPicker:null,STR_COLLAPSE:"Collapse Toolbar",STR_SPIN_LABEL:"Spin Button with value {VALUE}. Use Control Shift Up Arrow and Control Shift Down arrow keys to increase or decrease the value.",STR_SPIN_UP:"Click to increase the value of this input",STR_SPIN_DOWN:"Click to decrease the value of this input",_titlebar:null,browser:YAHOO.env.ua,_buttonList:null,_buttonGroupList:null,_sep:null,_sepCount:null,_dragHandle:null,_toolbarConfigs:{renderer:true},CLASS_CONTAINER:"yui-toolbar-container",CLASS_DRAGHANDLE:"yui-toolbar-draghandle",CLASS_SEPARATOR:"yui-toolbar-separator",CLASS_DISABLED:"yui-toolbar-disabled",CLASS_PREFIX:"yui-toolbar",init:function(f,e){YAHOO.widget.Toolbar.superclass.init.call(this,f,e)},initAttributes:function(e){YAHOO.widget.Toolbar.superclass.initAttributes.call(this,e);this.addClass(this.CLASS_CONTAINER);this.setAttributeConfig("buttonType",{value:e.buttonType||"basic",writeOnce:true,validator:function(f){switch(f){case"advanced":case"basic":return true}return false},method:function(f){if(f=="advanced"){if(YAHOO.widget.Button){this.buttonType=YAHOO.widget.ToolbarButtonAdvanced}else{this.buttonType=YAHOO.widget.ToolbarButton}}else{this.buttonType=YAHOO.widget.ToolbarButton}}});this.setAttributeConfig("buttons",{value:[],writeOnce:true,method:function(g){for(var f in g){if(d.hasOwnProperty(g,f)){if(g[f].type=="separator"){this.addSeparator()}else{if(g[f].group!==undefined){this.addButtonGroup(g[f])}else{this.addButton(g[f])}}}}}});this.setAttributeConfig("disabled",{value:false,method:function(f){if(this.get("disabled")===f){return false}if(f){this.addClass(this.CLASS_DISABLED);this.set("draggable",false);this.disableAllButtons()}else{this.removeClass(this.CLASS_DISABLED);if(this._configs.draggable._initialConfig.value){this.set("draggable",true)}this.resetAllButtons()}}});this.setAttributeConfig("cont",{value:e.cont,readOnly:true});this.setAttributeConfig("grouplabels",{value:((e.grouplabels===false)?false:true),method:function(f){if(f){c.removeClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"))}else{c.addClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"))}}});this.setAttributeConfig("titlebar",{value:false,method:function(g){if(g){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar)}this._titlebar=document.createElement("DIV");this._titlebar.tabIndex="-1";a.on(this._titlebar,"focus",function(){this._handleFocus()},this,true);c.addClass(this._titlebar,this.CLASS_PREFIX+"-titlebar");if(d.isString(g)){var f=document.createElement("h2");f.tabIndex="-1";f.innerHTML='<a href="#" tabIndex="0">'+g+"</a>";this._titlebar.appendChild(f);a.on(f.firstChild,"click",function(h){a.stopEvent(h)});a.on([f,f.firstChild],"focus",function(){this._handleFocus()},this,true)}if(this.get("firstChild")){this.insertBefore(this._titlebar,this.get("firstChild"))}else{this.appendChild(this._titlebar)}if(this.get("collapse")){this.set("collapse",true)}}else{if(this._titlebar){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar)}}}}});this.setAttributeConfig("collapse",{value:false,method:function(h){if(this._titlebar){var g=null;var f=c.getElementsByClassName("collapse","span",this._titlebar);if(h){if(f.length>0){return true}g=document.createElement("SPAN");g.innerHTML="X";g.title=this.STR_COLLAPSE;c.addClass(g,"collapse");this._titlebar.appendChild(g);a.addListener(g,"click",function(){if(c.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false)}else{this.collapse()}},this,true)}else{g=c.getElementsByClassName("collapse","span",this._titlebar);if(g[0]){if(c.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false)}g[0].parentNode.removeChild(g[0])}}}}});this.setAttributeConfig("draggable",{value:(e.draggable||false),method:function(f){if(f&&!this.get("titlebar")){if(!this._dragHandle){this._dragHandle=document.createElement("SPAN");this._dragHandle.innerHTML="|";this._dragHandle.setAttribute("title","Click to drag the toolbar");this._dragHandle.id=this.get("id")+"_draghandle";c.addClass(this._dragHandle,this.CLASS_DRAGHANDLE);if(this.get("cont").hasChildNodes()){this.get("cont").insertBefore(this._dragHandle,this.get("cont").firstChild)}else{this.get("cont").appendChild(this._dragHandle)}this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._dragHandle.id)}}else{if(this._dragHandle){this._dragHandle.parentNode.removeChild(this._dragHandle);this._dragHandle=null;this.dd=null}}if(this._titlebar){if(f){this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._titlebar);c.addClass(this._titlebar,"draggable")}else{c.removeClass(this._titlebar,"draggable");if(this.dd){this.dd.unreg();this.dd=null}}}},validator:function(g){var f=true;if(!YAHOO.util.DD){f=false}return f}})},addButtonGroup:function(j){if(!this.get("element")){this._queue[this._queue.length]=["addButtonGroup",arguments];return false}if(!this.hasClass(this.CLASS_PREFIX+"-grouped")){this.addClass(this.CLASS_PREFIX+"-grouped")}var k=document.createElement("DIV");c.addClass(k,this.CLASS_PREFIX+"-group");c.addClass(k,this.CLASS_PREFIX+"-group-"+j.group);if(j.label){var f=document.createElement("h3");f.innerHTML=j.label;k.appendChild(f)}if(!this.get("grouplabels")){c.addClass(this.get("cont"),this.CLASS_PREFIX,"-nogrouplabels")}this.get("cont").appendChild(k);var h=document.createElement("ul");k.appendChild(h);if(!this._buttonGroupList){this._buttonGroupList={}}this._buttonGroupList[j.group]=h;for(var g=0;g<j.buttons.length;g++){var e=document.createElement("li");e.className=this.CLASS_PREFIX+"-groupitem";h.appendChild(e);if((j.buttons[g].type!==undefined)&&j.buttons[g].type=="separator"){this.addSeparator(e)}else{j.buttons[g].container=e;this.addButton(j.buttons[g])}}},addButtonToGroup:function(g,h,i){var f=this._buttonGroupList[h];var e=document.createElement("li");e.className=this.CLASS_PREFIX+"-groupitem";g.container=e;this.addButton(g,i);f.appendChild(e)},addButton:function(k,j){if(!this.get("element")){this._queue[this._queue.length]=["addButton",arguments];return false}if(!this._buttonList){this._buttonList=[]}if(!k.container){k.container=this.get("cont")}if((k.type=="menu")||(k.type=="split")||(k.type=="select")){if(d.isArray(k.menu)){for(var s in k.menu){if(d.hasOwnProperty(k.menu,s)){var y={fn:function(o,i,m){if(!k.menucmd){k.menucmd=k.value}k.value=((m.value)?m.value:m._oText.nodeValue)},scope:this};k.menu[s].onclick=y}}}}var t={},q=false;for(var n in k){if(d.hasOwnProperty(k,n)){if(!this._toolbarConfigs[n]){t[n]=k[n]}}}if(k.type=="select"){t.type="menu"}if(k.type=="spin"){t.type="push"}if(t.type=="color"){if(YAHOO.widget.Overlay){t=this._makeColorButton(t)}else{q=true}}if(t.menu){if((YAHOO.widget.Overlay)&&(k.menu instanceof YAHOO.widget.Overlay)){k.menu.showEvent.subscribe(function(){this._button=t})}else{for(var r=0;r<t.menu.length;r++){if(!t.menu[r].value){t.menu[r].value=t.menu[r].text}}if(this.browser.webkit){t.focusmenu=false}}}if(q){k=false}else{this._configs.buttons.value[this._configs.buttons.value.length]=k;var w=new this.buttonType(t);w.get("element").tabIndex="-1";w.get("element").setAttribute("role","button");w._selected=true;if(this.get("disabled")){w.set("disabled",true)}if(!k.id){k.id=w.get("id")}if(j){var f=w.get("element");var p=null;if(j.get){p=j.get("element").nextSibling}else{if(j.nextSibling){p=j.nextSibling}}if(p){p.parentNode.insertBefore(f,p)}}w.addClass(this.CLASS_PREFIX+"-"+w.get("value"));var v=document.createElement("span");v.className=this.CLASS_PREFIX+"-icon";w.get("element").insertBefore(v,w.get("firstChild"));if(w._button.tagName.toLowerCase()=="button"){w.get("element").setAttribute("unselectable","on");var x=document.createElement("a");x.innerHTML=w._button.innerHTML;x.href="#";x.tabIndex="-1";a.on(x,"click",function(i){a.stopEvent(i)});w._button.parentNode.replaceChild(x,w._button);w._button=x}if(k.type=="select"){if(w._button.tagName.toLowerCase()=="select"){v.parentNode.removeChild(v);var g=w._button;var u=w.get("element");u.parentNode.replaceChild(g,u)}else{w.addClass(this.CLASS_PREFIX+"-select")}}if(k.type=="spin"){if(!d.isArray(k.range)){k.range=[10,100]}this._makeSpinButton(w,k)}w.get("element").setAttribute("title",w.get("label"));if(k.type!="spin"){if((YAHOO.widget.Overlay)&&(t.menu instanceof YAHOO.widget.Overlay)){var h=function(o){var i=true;if(o.keyCode&&(o.keyCode==9)){i=false}if(i){if(this._colorPicker){this._colorPicker._button=k.value}var m=w.getMenu().element;if(c.getStyle(m,"visibility")=="hidden"){w.getMenu().show()}else{w.getMenu().hide()}}YAHOO.util.Event.stopEvent(o)};w.on("mousedown",h,k,this);w.on("keydown",h,k,this)}else{if((k.type!="menu")&&(k.type!="select")){w.on("keypress",this._buttonClick,k,this);w.on("mousedown",function(i){YAHOO.util.Event.stopEvent(i);this._buttonClick(i,k)},k,this);w.on("click",function(i){YAHOO.util.Event.stopEvent(i)})}else{w.on("mousedown",function(i){YAHOO.util.Event.stopEvent(i)});w.on("click",function(i){YAHOO.util.Event.stopEvent(i)});w.on("change",function(i){if(!k.menucmd){k.menucmd=k.value}k.value=i.value;this._buttonClick(i,k)},this,true);var l=this;w.on("appendTo",function(){var i=this;if(i.getMenu()&&i.getMenu().mouseDownEvent){i.getMenu().mouseDownEvent.subscribe(function(z,o){var m=o[1];YAHOO.util.Event.stopEvent(o[0]);i._onMenuClick(o[0],i);if(!k.menucmd){k.menucmd=k.value}k.value=((m.value)?m.value:m._oText.nodeValue);l._buttonClick.call(l,o[1],k);i._hideMenu();return false});i.getMenu().clickEvent.subscribe(function(o,m){YAHOO.util.Event.stopEvent(m[0])});i.getMenu().mouseUpEvent.subscribe(function(o,m){YAHOO.util.Event.stopEvent(m[0])})}})}}}else{w.on("mousedown",function(i){YAHOO.util.Event.stopEvent(i)});w.on("click",function(i){YAHOO.util.Event.stopEvent(i)})}if(this.browser.ie){}if(this.browser.webkit){w.hasFocus=function(){return true}}this._buttonList[this._buttonList.length]=w;if((k.type=="menu")||(k.type=="split")||(k.type=="select")){if(d.isArray(k.menu)){var e=w.getMenu();if(e&&e.renderEvent){e.renderEvent.subscribe(this._addMenuClasses,w);if(k.renderer){e.renderEvent.subscribe(k.renderer,w)}}}}}return k},addSeparator:function(e,h){if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false}var f=((e)?e:this.get("cont"));if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false}if(this._sepCount===null){this._sepCount=0}if(!this._sep){this._sep=document.createElement("SPAN");c.addClass(this._sep,this.CLASS_SEPARATOR);this._sep.innerHTML="|"}var g=this._sep.cloneNode(true);this._sepCount++;c.addClass(g,this.CLASS_SEPARATOR+"-"+this._sepCount);if(h){var i=null;if(h.get){i=h.get("element").nextSibling}else{if(h.nextSibling){i=h.nextSibling}else{i=h}}if(i){if(i==h){i.parentNode.appendChild(g)}else{i.parentNode.insertBefore(g,i)}}}else{f.appendChild(g)}return g},_createColorPicker:function(h){if(c.get(h+"_colors")){c.get(h+"_colors").parentNode.removeChild(c.get(h+"_colors"))}var e=document.createElement("div");e.className="yui-toolbar-colors";e.id=h+"_colors";e.style.display="none";a.on(window,"load",function(){document.body.appendChild(e)},this,true);this._colorPicker=e;var g="";for(var f in this._colorData){if(d.hasOwnProperty(this._colorData,f)){g+='<a style="background-color: '+f+'" href="#">'+f.replace("#","")+"</a>"}}g+="<span><em>X</em><strong></strong></span>";window.setTimeout(function(){e.innerHTML=g},0);a.on(e,"mouseover",function(m){var k=this._colorPicker;var l=k.getElementsByTagName("em")[0];var j=k.getElementsByTagName("strong")[0];var i=a.getTarget(m);if(i.tagName.toLowerCase()=="a"){l.style.backgroundColor=i.style.backgroundColor;j.innerHTML=this._colorData["#"+i.innerHTML]+"<br>"+i.innerHTML}},this,true);a.on(e,"focus",function(i){a.stopEvent(i)});a.on(e,"click",function(i){a.stopEvent(i)});a.on(e,"mousedown",function(j){a.stopEvent(j);var i=a.getTarget(j);if(i.tagName.toLowerCase()=="a"){var l=this.fireEvent("colorPickerClicked",{type:"colorPickerClicked",target:this,button:this._colorPicker._button,color:i.innerHTML,colorName:this._colorData["#"+i.innerHTML]});if(l!==false){var k={color:i.innerHTML,colorName:this._colorData["#"+i.innerHTML],value:this._colorPicker._button};this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:k})}this.getButtonByValue(this._colorPicker._button).getMenu().hide()}},this,true)},_resetColorPicker:function(){var f=this._colorPicker.getElementsByTagName("em")[0];var e=this._colorPicker.getElementsByTagName("strong")[0];f.style.backgroundColor="transparent";e.innerHTML=""},_makeColorButton:function(e){if(!this._colorPicker){this._createColorPicker(this.get("id"))}e.type="color";e.menu=new YAHOO.widget.Overlay(this.get("id")+"_"+e.value+"_menu",{visible:false,position:"absolute",iframe:true});e.menu.setBody("");e.menu.render(this.get("cont"));c.addClass(e.menu.element,"yui-button-menu");c.addClass(e.menu.element,"yui-color-button-menu");e.menu.beforeShowEvent.subscribe(function(){e.menu.cfg.setProperty("zindex",5);e.menu.cfg.setProperty("context",[this.getButtonById(e.id).get("element"),"tl","bl"]);this._resetColorPicker();var f=this._colorPicker;if(f.parentNode){f.parentNode.removeChild(f)}e.menu.setBody("");e.menu.appendToBody(f);this._colorPicker.style.display="block"},this,true);return e},_makeSpinButton:function(r,l){r.addClass(this.CLASS_PREFIX+"-spinbutton");var s=this,n=r._button.parentNode.parentNode,i=l.range,h=document.createElement("a"),g=document.createElement("a");h.href="#";g.href="#";h.tabIndex="-1";g.tabIndex="-1";h.className="up";h.title=this.STR_SPIN_UP;h.innerHTML=this.STR_SPIN_UP;g.className="down";g.title=this.STR_SPIN_DOWN;g.innerHTML=this.STR_SPIN_DOWN;n.appendChild(h);n.appendChild(g);var m=YAHOO.lang.substitute(this.STR_SPIN_LABEL,{VALUE:r.get("label")});r.set("title",m);var q=function(t){t=((t<i[0])?i[0]:t);t=((t>i[1])?i[1]:t);return t};var p=this.browser;var f=false;var k=this.STR_SPIN_LABEL;if(this._titlebar&&this._titlebar.firstChild){f=this._titlebar.firstChild}var e=function(u){YAHOO.util.Event.stopEvent(u);if(!r.get("disabled")&&(u.keyCode!=9)){var v=parseInt(r.get("label"),10);v++;v=q(v);r.set("label",""+v);var t=YAHOO.lang.substitute(k,{VALUE:r.get("label")});r.set("title",t);if(!p.webkit&&f){}s._buttonClick(u,l)}};var o=function(u){YAHOO.util.Event.stopEvent(u);if(!r.get("disabled")&&(u.keyCode!=9)){var v=parseInt(r.get("label"),10);v--;v=q(v);r.set("label",""+v);var t=YAHOO.lang.substitute(k,{VALUE:r.get("label")});r.set("title",t);if(!p.webkit&&f){}s._buttonClick(u,l)}};var j=function(t){if(t.keyCode==38){e(t)}else{if(t.keyCode==40){o(t)}else{if(t.keyCode==107&&t.shiftKey){e(t)}else{if(t.keyCode==109&&t.shiftKey){o(t)}}}}};r.on("keydown",j,this,true);a.on(h,"mousedown",function(t){a.stopEvent(t)},this,true);a.on(g,"mousedown",function(t){a.stopEvent(t)},this,true);a.on(h,"click",e,this,true);a.on(g,"click",o,this,true)},_buttonClick:function(n,f){var e=true;if(n&&n.type=="keypress"){if(n.keyCode==9){e=false}else{if((n.keyCode===13)||(n.keyCode===0)||(n.keyCode===32)){}else{e=false}}}if(e){var p=true,h=false;f.isSelected=this.isSelected(f.id);if(f.value){h=this.fireEvent(f.value+"Click",{type:f.value+"Click",target:this.get("element"),button:f});if(h===false){p=false}}if(f.menucmd&&p){h=this.fireEvent(f.menucmd+"Click",{type:f.menucmd+"Click",target:this.get("element"),button:f});if(h===false){p=false}}if(p){this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:f})}if(f.type=="select"){var l=this.getButtonById(f.id);if(l.buttonType=="rich"){var k=f.value;for(var j=0;j<f.menu.length;j++){if(f.menu[j].value==f.value){k=f.menu[j].text;break}}l.set("label",'<span class="yui-toolbar-'+f.menucmd+"-"+(f.value).replace(/ /g,"-").toLowerCase()+'">'+k+"</span>");var o=l.getMenu().getItems();for(var g=0;g<o.length;g++){if(o[g].value.toLowerCase()==f.value.toLowerCase()){o[g].cfg.setProperty("checked",true)}else{o[g].cfg.setProperty("checked",false)}}}}if(n){a.stopEvent(n)}}},_keyNav:null,_navCounter:null,_navigateButtons:function(f){switch(f.keyCode){case 37:case 39:if(f.keyCode==37){this._navCounter--}else{this._navCounter++}if(this._navCounter>(this._buttonList.length-1)){this._navCounter=0}if(this._navCounter<0){this._navCounter=(this._buttonList.length-1)}if(this._buttonList[this._navCounter]){var e=this._buttonList[this._navCounter].get("element");if(this.browser.ie){e=this._buttonList[this._navCounter].get("element").getElementsByTagName("a")[0]}if(this._buttonList[this._navCounter].get("disabled")){this._navigateButtons(f)}else{e.focus()}}break}},_handleFocus:function(){if(!this._keyNav){var e="keypress";if(this.browser.ie){e="keydown"}a.on(this.get("element"),e,this._navigateButtons,this,true);this._keyNav=true;this._navCounter=-1}},getButtonById:function(g){var e=this._buttonList.length;for(var f=0;f<e;f++){if(this._buttonList[f]&&this._buttonList[f].get("id")==g){return this._buttonList[f]}}return false},getButtonByValue:function(n){var h=this.get("buttons");var f=h.length;for(var k=0;k<f;k++){if(h[k].group!==undefined){for(var e=0;e<h[k].buttons.length;e++){if((h[k].buttons[e].value==n)||(h[k].buttons[e].menucmd==n)){return this.getButtonById(h[k].buttons[e].id)}if(h[k].buttons[e].menu){for(var l=0;l<h[k].buttons[e].menu.length;l++){if(h[k].buttons[e].menu[l].value==n){return this.getButtonById(h[k].buttons[e].id)}}}}}else{if((h[k].value==n)||(h[k].menucmd==n)){return this.getButtonById(h[k].id)}if(h[k].menu){for(var g=0;g<h[k].menu.length;g++){if(h[k].menu[g].value==n){return this.getButtonById(h[k].id)}}}}}return false},getButtonByIndex:function(e){if(this._buttonList[e]){return this._buttonList[e]}else{return false}},getButtons:function(){return this._buttonList},disableButton:function(f){var e=b.call(this,f);if(e){e.set("disabled",true)}else{return false}},enableButton:function(f){if(this.get("disabled")){return false}var e=b.call(this,f);if(e){if(e.get("disabled")){e.set("disabled",false)}}else{return false}},isSelected:function(f){var e=b.call(this,f);if(e){return e._selected}return false},selectButton:function(i,g){var f=b.call(this,i);if(f){f.addClass("yui-button-selected");f.addClass("yui-button-"+f.get("value")+"-selected");f._selected=true;if(g){if(f.buttonType=="rich"){var h=f.getMenu().getItems();for(var e=0;e<h.length;e++){if(h[e].value==g){h[e].cfg.setProperty("checked",true);f.set("label",'<span class="yui-toolbar-'+f.get("value")+"-"+(g).replace(/ /g,"-").toLowerCase()+'">'+h[e]._oText.nodeValue+"</span>")}else{h[e].cfg.setProperty("checked",false)}}}}}else{return false}},deselectButton:function(f){var e=b.call(this,f);if(e){e.removeClass("yui-button-selected");e.removeClass("yui-button-"+e.get("value")+"-selected");e.removeClass("yui-button-hover");e._selected=false}else{return false}},deselectAllButtons:function(){var e=this._buttonList.length;for(var f=0;f<e;f++){this.deselectButton(this._buttonList[f])}},disableAllButtons:function(){if(this.get("disabled")){return false}var e=this._buttonList.length;for(var f=0;f<e;f++){this.disableButton(this._buttonList[f])}},enableAllButtons:function(){if(this.get("disabled")){return false}var e=this._buttonList.length;for(var f=0;f<e;f++){this.enableButton(this._buttonList[f])}},resetAllButtons:function(j){if(!d.isObject(j)){j={}}if(this.get("disabled")){return false}var e=this._buttonList.length;for(var f=0;f<e;f++){var h=this._buttonList[f];if(h){var g=h._configs.disabled._initialConfig.value;if(j[h.get("id")]){this.enableButton(h);this.selectButton(h)}else{if(g){this.disableButton(h)}else{this.enableButton(h)}this.deselectButton(h)}}}},destroyButton:function(j){var g=b.call(this,j);if(g){var h=g.get("id");g.destroy();var e=this._buttonList.length;for(var f=0;f<e;f++){if(this._buttonList[f]&&this._buttonList[f].get("id")==h){this._buttonList[f]=null}}}else{return false}},destroy:function(){this.get("element").innerHTML="";this.get("element").className="";for(var e in this){if(d.hasOwnProperty(this,e)){this[e]=null}}return true},collapse:function(f){var e=c.getElementsByClassName("collapse","span",this._titlebar);if(f===false){c.removeClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");if(e[0]){c.removeClass(e[0],"collapsed")}this.fireEvent("toolbarExpanded",{type:"toolbarExpanded",target:this})}else{if(e[0]){c.addClass(e[0],"collapsed")}c.addClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");this.fireEvent("toolbarCollapsed",{type:"toolbarCollapsed",target:this})}},toString:function(){return"Toolbar (#"+this.get("element").id+") with "+this._buttonList.length+" buttons."}})})();(function(){var c=YAHOO.util.Dom,a=YAHOO.util.Event,d=YAHOO.lang,b=YAHOO.widget.Toolbar;YAHOO.widget.SimpleEditor=function(h,m){var g={};if(d.isObject(h)&&(!h.tagName)&&!m){d.augmentObject(g,h);h=document.createElement("textarea");this.DOMReady=true;if(g.container){var k=c.get(g.container);k.appendChild(h)}else{document.body.appendChild(h)}}else{if(m){d.augmentObject(g,m)}}var i={element:null,attributes:g},f=null;if(d.isString(h)){f=h}else{if(i.attributes.id){f=i.attributes.id}else{this.DOMReady=true;f=c.generateId(h)}}i.element=h;var j=document.createElement("DIV");i.attributes.element_cont=new YAHOO.util.Element(j,{id:f+"_container"});var e=document.createElement("div");c.addClass(e,"first-child");i.attributes.element_cont.appendChild(e);if(!i.attributes.toolbar_cont){i.attributes.toolbar_cont=document.createElement("DIV");i.attributes.toolbar_cont.id=f+"_toolbar";e.appendChild(i.attributes.toolbar_cont)}var l=document.createElement("DIV");e.appendChild(l);i.attributes.editor_wrapper=l;YAHOO.widget.SimpleEditor.superclass.constructor.call(this,i.element,i.attributes)};YAHOO.extend(YAHOO.widget.SimpleEditor,YAHOO.util.Element,{_resizeConfig:{handles:["br"],autoRatio:true,status:true,proxy:true,useShim:true,setSize:false},_setupResize:function(){if(!YAHOO.util.DD||!YAHOO.util.Resize){return false}if(this.get("resize")){var e={};d.augmentObject(e,this._resizeConfig);this.resize=new YAHOO.util.Resize(this.get("element_cont").get("element"),e);this.resize.on("resize",function(g){var l=this.get("animate");this.set("animate",false);this.set("width",g.width+"px");var i=g.height,j=(this.toolbar.get("element").clientHeight+2),k=0;if(this.dompath){k=(this.dompath.clientHeight+1)}var f=(i-j-k);this.set("height",f+"px");this.get("element_cont").setStyle("height","");this.set("animate",l)},this,true)}},resize:null,_setupDD:function(){if(!YAHOO.util.DD){return false}if(this.get("drag")){var f=this.get("drag"),e=YAHOO.util.DD;if(f==="proxy"){e=YAHOO.util.DDProxy}this.dd=new e(this.get("element_cont").get("element"));this.toolbar.addClass("draggable");this.dd.setHandleElId(this.toolbar._titlebar)}},dd:null,_lastCommand:null,_undoNodeChange:function(){},_storeUndo:function(){},_checkKey:function(f,j){var g=false;if((j.keyCode===f.key)){if(f.mods&&(f.mods.length>0)){var l=0;for(var h=0;h<f.mods.length;h++){if(this.browser.mac){if(f.mods[h]=="ctrl"){f.mods[h]="meta"}}if(j[f.mods[h]+"Key"]===true){l++}}if(l===f.mods.length){g=true}}else{g=true}}return g},_keyMap:{SELECT_ALL:{key:65,mods:["ctrl"]},CLOSE_WINDOW:{key:87,mods:["shift","ctrl"]},FOCUS_TOOLBAR:{key:27,mods:["shift"]},FOCUS_AFTER:{key:27},CREATE_LINK:{key:76,mods:["shift","ctrl"]},BOLD:{key:66,mods:["shift","ctrl"]},ITALIC:{key:73,mods:["shift","ctrl"]},UNDERLINE:{key:85,mods:["shift","ctrl"]},UNDO:{key:90,mods:["ctrl"]},REDO:{key:90,mods:["shift","ctrl"]},JUSTIFY_LEFT:{key:219,mods:["shift","ctrl"]},JUSTIFY_CENTER:{key:220,mods:["shift","ctrl"]},JUSTIFY_RIGHT:{key:221,mods:["shift","ctrl"]}},_cleanClassName:function(e){return e.replace(/ /g,"-").toLowerCase()},_textarea:null,_docType:'<!DOCTYPE HTML PUBLIC "-
|
G=G.replace(/\/b>/gi,"/span>");G=G.replace(/<i/gi,'<span style="font-style: italic;"');G=G.replace(/\/i>/gi,"/span>");}G=G.replace(/ /gi," ");}else{G=G.replace(/<u/gi,"<u");G=G.replace(/\/u>/gi,"/u>");}G=G.replace(/<ol([^>]*)>/gi,"<ol$1>");G=G.replace(/\/ol>/gi,"/ol>");G=G.replace(/<li/gi,"<li");G=G.replace(/\/li>/gi,"/li>");G=this.filter_safari(G);G=this.filter_internals(G);G=this.filter_all_rgb(G);G=this.post_filter_linebreaks(G,F);if(F=="xhtml"){G=G.replace(/<YUI_IMG([^>]*)>/g,"<img $1 />");G=G.replace(/<YUI_INPUT([^>]*)>/g,"<input $1 />");}else{G=G.replace(/<YUI_IMG([^>]*)>/g,"<img $1>");G=G.replace(/<YUI_INPUT([^>]*)>/g,"<input $1>");}G=G.replace(/<YUI_UL([^>]*)>/g,"<ul$1>");G=G.replace(/<\/YUI_UL>/g,"</ul>");G=this.filter_invalid_lists(G);G=G.replace(/<YUI_BQ([^>]*)>/g,"<blockquote$1>");G=G.replace(/<\/YUI_BQ>/g,"</blockquote>");G=G.replace(/<YUI_EMBED([^>]*)>/g,"<embed$1>");G=G.replace(/<\/YUI_EMBED>/g,"</embed>");G=G.replace(" & ","YUI_AMP");G=G.replace("&","&");G=G.replace("YUI_AMP","&");G=YAHOO.lang.trim(G);if(this.get("removeLineBreaks")){G=G.replace(/\n/g,"").replace(/\r/g,"");G=G.replace(/ /gi," ");}if(G.substring(0,6).toLowerCase()=="<span>"){G=G.substring(6);if(G.substring(G.length-7,G.length).toLowerCase()=="</span>"){G=G.substring(0,G.length-7);}}for(var E in this.invalidHTML){if(YAHOO.lang.hasOwnProperty(this.invalidHTML,E)){if(D.isObject(E)&&E.keepContents){G=G.replace(new RegExp("<"+E+"([^>]*)>(.*?)</"+E+">","gi"),"$1");}else{G=G.replace(new RegExp("<"+E+"([^>]*)>(.*?)</"+E+">","gi"),"");}}}this.fireEvent("cleanHTML",{type:"cleanHTML",target:this,html:G});return G;},filter_invalid_lists:function(E){E=E.replace(/<\/li>\n/gi,"</li>");E=E.replace(/<\/li><ol>/gi,"</li><li><ol>");E=E.replace(/<\/ol>/gi,"</ol></li>");E=E.replace(/<\/ol><\/li>\n/gi,"</ol>\n");E=E.replace(/<\/li><ul>/gi,"</li><li><ul>");E=E.replace(/<\/ul>/gi,"</ul></li>");E=E.replace(/<\/ul><\/li>\n?/gi,"</ul>\n");E=E.replace(/<\/li>/gi,"</li>\n");E=E.replace(/<\/ol>/gi,"</ol>\n");E=E.replace(/<ol>/gi,"<ol>\n");E=E.replace(/<ul>/gi,"<ul>\n");return E;},filter_safari:function(E){if(this.browser.webkit){E=E.replace(/<span class="Apple-tab-span" style="white-space:pre">([^>])<\/span>/gi," ");E=E.replace(/Apple-style-span/gi,"");E=E.replace(/style="line-height: normal;"/gi,"");E=E.replace(/<li><\/li>/gi,"");E=E.replace(/<li> <\/li>/gi,"");E=E.replace(/<li> <\/li>/gi,"");if(this.get("ptags")){E=E.replace(/<div([^>]*)>/g,"<p$1>");E=E.replace(/<\/div>/gi,"</p>");}else{E=E.replace(/<div>/gi,"");E=E.replace(/<\/div>/gi,"<br>");}}return E;},filter_internals:function(E){E=E.replace(/\r/g,"");E=E.replace(/<\/?(body|head|html)[^>]*>/gi,"");E=E.replace(/<YUI_BR><\/li>/gi,"</li>");E=E.replace(/yui-tag-span/gi,"");E=E.replace(/yui-tag/gi,"");E=E.replace(/yui-non/gi,"");E=E.replace(/yui-img/gi,"");E=E.replace(/ tag="span"/gi,"");E=E.replace(/ class=""/gi,"");E=E.replace(/ style=""/gi,"");E=E.replace(/ class=" "/gi,"");E=E.replace(/ class=" "/gi,"");E=E.replace(/ target=""/gi,"");E=E.replace(/ title=""/gi,"");if(this.browser.ie){E=E.replace(/ class= /gi,"");E=E.replace(/ class= >/gi,"");E=E.replace(/_height="([^>])"/gi,"");E=E.replace(/_width="([^>])"/gi,"");}return E;},filter_all_rgb:function(I){var H=new RegExp("rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)","gi");var E=I.match(H);if(D.isArray(E)){for(var G=0;G<E.length;G++){var F=this.filter_rgb(E[G]);I=I.replace(E[G].toString(),F);}}return I;},filter_rgb:function(G){if(G.toLowerCase().indexOf("rgb")!=-1){var J=new RegExp("(.*?)rgb\\s*?\\(\\s*?([0-9]+).*?,\\s*?([0-9]+).*?,\\s*?([0-9]+).*?\\)(.*?)","gi");var F=G.replace(J,"$1,$2,$3,$4,$5").split(",");if(F.length==5){var I=parseInt(F[1],10).toString(16);var H=parseInt(F[2],10).toString(16);var E=parseInt(F[3],10).toString(16);I=I.length==1?"0"+I:I;H=H.length==1?"0"+H:H;E=E.length==1?"0"+E:E;G="#"+I+H+E;}}return G;},pre_filter_linebreaks:function(F,E){if(this.browser.webkit){F=F.replace(/<br class="khtml-block-placeholder">/gi,"<YUI_BR>");F=F.replace(/<br class="webkit-block-placeholder">/gi,"<YUI_BR>");}F=F.replace(/<br>/gi,"<YUI_BR>");F=F.replace(/<br (.*?)>/gi,"<YUI_BR>");F=F.replace(/<br\/>/gi,"<YUI_BR>");F=F.replace(/<br \/>/gi,"<YUI_BR>");F=F.replace(/<div><YUI_BR><\/div>/gi,"<YUI_BR>");F=F.replace(/<p>( | )<\/p>/g,"<YUI_BR>");F=F.replace(/<p><br> <\/p>/gi,"<YUI_BR>");F=F.replace(/<p> <\/p>/gi,"<YUI_BR>");F=F.replace(/<YUI_BR>$/,"");F=F.replace(/<YUI_BR><\/p>/g,"</p>");if(this.browser.ie){F=F.replace(/ /g,"\t");}return F;},post_filter_linebreaks:function(F,E){if(E=="xhtml"){F=F.replace(/<YUI_BR>/g,"<br />");}else{F=F.replace(/<YUI_BR>/g,"<br>");}return F;},clearEditorDoc:function(){this._getDoc().body.innerHTML=" ";},openWindow:function(E){},moveWindow:function(){},_closeWindow:function(){},closeWindow:function(){this.toolbar.resetAllButtons();this._focusWindow();},destroy:function(){if(this.resize){this.resize.destroy();}if(this.dd){this.dd.unreg();}if(this.get("panel")){this.get("panel").destroy();}this.saveHTML();this.toolbar.destroy();this.setStyle("visibility","visible");this.setStyle("position","static");this.setStyle("top","");this.setStyle("left","");var E=this.get("element");this.get("element_cont").get("parentNode").replaceChild(E,this.get("element_cont").get("element"));this.get("element_cont").get("element").innerHTML="";this.set("handleSubmit",false);return true;},toString:function(){var E="SimpleEditor";if(this.get&&this.get("element_cont")){E="SimpleEditor (#"+this.get("element_cont").get("id")+")"+((this.get("disabled")?" Disabled":""));}return E;}});YAHOO.widget.EditorInfo={_instances:{},blankImage:"",window:{},panel:null,getEditorById:function(E){if(!YAHOO.lang.isString(E)){E=E.id;}if(this._instances[E]){return this._instances[E];}return false;},toString:function(){var E=0;for(var F in this._instances){if(D.hasOwnProperty(this._instances,F)){E++;}}return"Editor Info ("+E+" registered intance"+((E>1)?"s":"")+")";
|
w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
|
a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var sa=/[\n\t]/g,ha=/\s+/,Sa=/\r/g,Ta=/^(?:href|src|style)$/,Ua=/^(?:button|input)$/i,Va=/^(?:button|input|object|select|textarea)$/i,Wa=/^a(?:rea)?$/i,ta=/^(?:radio|checkbox)$/i;c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",
|
w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
|
var inputElement = YAHOO.util.Dom.getElementsByClassName("xforms-upload-select", null, uploadElement)[0]; var parentElement = inputElement.parentNode; var newInputElement = document.createElement("input"); ORBEON.util.Dom.addClass(newInputElement, inputElement.className); newInputElement.setAttribute("type", inputElement.type); newInputElement.setAttribute("name", inputElement.name); newInputElement.setAttribute("size", inputElement.size); newInputElement.setAttribute("unselectable", "on"); parentElement.replaceChild(newInputElement, inputElement); return null; },
|
var inputElement = YAHOO.util.Dom.getElementsByClassName("xforms-upload-select", null, uploadElement)[0]; var parentElement = inputElement.parentNode; var newInputElement = document.createElement("input"); YAHOO.util.Dom.addClass(newInputElement, inputElement.className); newInputElement.setAttribute("type", inputElement.type); newInputElement.setAttribute("name", inputElement.name); newInputElement.setAttribute("size", inputElement.size); newInputElement.setAttribute("unselectable", "on"); parentElement.replaceChild(newInputElement, inputElement); return null; },
|
clearUploadControl: function(uploadElement) { var inputElement = YAHOO.util.Dom.getElementsByClassName("xforms-upload-select", null, uploadElement)[0]; var parentElement = inputElement.parentNode; var newInputElement = document.createElement("input"); ORBEON.util.Dom.addClass(newInputElement, inputElement.className); newInputElement.setAttribute("type", inputElement.type); newInputElement.setAttribute("name", inputElement.name); newInputElement.setAttribute("size", inputElement.size); newInputElement.setAttribute("unselectable", "on");// the server sets this, so we have to set it again parentElement.replaceChild(newInputElement, inputElement); return null; },
|
}]
|
}], usearia: true, role: "alertdialog"
|
clinit: function() { YAHOO.util.Event.onDOMReady(function() { // Prevent SimpleDialog from registering itself on the form YAHOO.widget.SimpleDialog.prototype.registerForm = function() {}; // Create one single instance of the YUI dialog used for xforms:message this._messageDialog = new YAHOO.widget.SimpleDialog("xforms-message-dialog", { width: "30em", fixedcenter: true, modal: true, close: false, visible: false, draggable: false, buttons: [{ text: "Close", handler: { fn: function() { this._messageDialog.hide(); this._messageQueue.shift(); if (this._messageQueue.length > 0) this._showMessage(); }, scope: this }, isDefault: false }] }); this._messageDialog.setHeader("Message"); this._messageDialog.render(document.body); // Add ARIA attributes var dialogDiv = OD.get("xforms-message-dialog"); var bodyDiv = YD.getElementsByClassName("bd", null, dialogDiv)[0]; bodyDiv.setAttribute("aria-live", "polite"); bodyDiv.setAttribute("role", "alert"); }, this, true); },
|
var bodyDiv = YD.getElementsByClassName("bd", null, dialogDiv)[0]; bodyDiv.setAttribute("aria-live", "polite"); bodyDiv.setAttribute("role", "alert");
|
dialogDiv.setAttribute("aria-live", "polite");
|
clinit: function() { YAHOO.util.Event.onDOMReady(function() { // Prevent SimpleDialog from registering itself on the form YAHOO.widget.SimpleDialog.prototype.registerForm = function() {}; // Create one single instance of the YUI dialog used for xforms:message this._messageDialog = new YAHOO.widget.SimpleDialog("xforms-message-dialog", { width: "30em", fixedcenter: true, modal: true, close: false, visible: false, draggable: false, buttons: [{ text: "Close", handler: { fn: function() { this._messageDialog.hide(); this._messageQueue.shift(); if (this._messageQueue.length > 0) this._showMessage(); }, scope: this }, isDefault: false }] }); this._messageDialog.setHeader("Message"); this._messageDialog.render(document.body); // Add ARIA attributes var dialogDiv = OD.get("xforms-message-dialog"); var bodyDiv = YD.getElementsByClassName("bd", null, dialogDiv)[0]; bodyDiv.setAttribute("aria-live", "polite"); bodyDiv.setAttribute("role", "alert"); }, this, true); },
|
return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
|
return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null;
|
return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
|
c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= {},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
|
not:function(a){return this.pushStack(ma(this,a,false),"not",a)},filter:function(a){return this.pushStack(ma(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e<f;e++){l=a[e];k[l]||(k[l]=c.expr.match.POS.test(l)?c(l,b||this.context):l)}for(;h&&h.ownerDocument&&h!==b;){for(l in k){e=k[l];if(e.jquery?e.index(h)>-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h= h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e<f;e++)for(h=this[e];h;)if(l?l.index(h)>-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context):
|
c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j={},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
|
F.setAttribute("method","GET");E.editor_form=F;A.on(F,"submit",function(N){A.stopEvent(N);},this,true);J.appendChild(F);var G=document.createElement("span");G.innerHTML="X";G.title=this.STR_CLOSE_WINDOW;G.className="close";A.on(G,"click",this.closeWindow,this,true);var L=document.createElement("span");L.innerHTML="^";L.className="knob";E.editor_knob=L;var M=document.createElement("h3");E.editor_header=M;M.innerHTML="<span></span>";E.setHeader(" ");E.appendToHeader(M);M.appendChild(G);M.appendChild(L);E.setBody(" ");E.setFooter(" ");E.appendToBody(J);A.on(E.element,"click",function(N){A.stopPropagation(N);});var I=function(){};E.showEvent.subscribe(I,this,true);E.renderEvent.subscribe(function(){this._renderInsertImageWindow();this._renderCreateLinkWindow();this.fireEvent("windowRender",{type:"windowRender",panel:E});},this,true);if(this.DOMReady){this.get("panel").render(document.body);C.addClass(this.get("panel").element,"yui-editor-panel");}else{A.onDOMReady(function(){this.get("panel").render(document.body);C.addClass(this.get("panel").element,"yui-editor-panel");},this,true);}this.get("panel").showEvent.subscribe(function(){YAHOO.util.Dom.setStyle(this.element,"display","block");});return this.get("panel");},openWindow:function(K){var P=this;window.setTimeout(function(){P.toolbar.set("disabled",true);},10);A.on(document,"keydown",this._closeWindow,this,true);if(this.currentWindow){this.closeWindow();}var Q=C.getXY(this.currentElement[0]),N=C.getXY(this.get("iframe").get("element")),E=this.get("panel"),H=[(Q[0]+N[0]-20),(Q[1]+N[1]+10)],G=(parseInt(K.attrs.width,10)/2),L="center",J=null;this.fireEvent("beforeOpenWindow",{type:"beforeOpenWindow",win:K,panel:E});var F=E.editor_form;var I=this._windows;for(var O in I){if(D.hasOwnProperty(I,O)){if(I[O]&&I[O].body){if(O==K.name){C.setStyle(I[O].body,"display","block");}else{C.setStyle(I[O].body,"display","none");}}}}if(this._windows[K.name].body){C.setStyle(this._windows[K.name].body,"display","block");F.appendChild(this._windows[K.name].body);}else{if(D.isObject(K.body)){F.appendChild(K.body);}else{var M=document.createElement("div");M.innerHTML=K.body;F.appendChild(M);}}E.editor_header.firstChild.innerHTML=K.header;if(K.footer!==null){E.setFooter(K.footer);C.addClass(E.footer,"open");}else{C.removeClass(E.footer,"open");}E.cfg.setProperty("width",K.attrs.width);this.currentWindow=K;this.moveWindow(true);E.show();this.fireEvent("afterOpenWindow",{type:"afterOpenWindow",win:K,panel:E});},moveWindow:function(F){if(!this.currentWindow){return false;}var I=this.currentWindow,J=C.getXY(this.currentElement[0]),a=C.getXY(this.get("iframe").get("element")),O=this.get("panel"),Y=[(J[0]+a[0]),(J[1]+a[1])],R=(parseInt(I.attrs.width,10)/2),U="center",Q=O.cfg.getProperty("xy")||[0,0],G=O.editor_knob,X=0,L=0,T=false;Y[0]=((Y[0]-R)+20);Y[0]=Y[0]-C.getDocumentScrollLeft(this._getDoc());Y[1]=Y[1]-C.getDocumentScrollTop(this._getDoc());if(this._isElement(this.currentElement[0],"img")){if(this.currentElement[0].src.indexOf(this.get("blankimage"))!=-1){Y[0]=(Y[0]+(75/2));Y[1]=(Y[1]+75);}else{var N=parseInt(this.currentElement[0].width,10);var W=parseInt(this.currentElement[0].height,10);Y[0]=(Y[0]+(N/2));Y[1]=(Y[1]+W);}Y[1]=Y[1]+15;}else{var K=C.getStyle(this.currentElement[0],"fontSize");if(K&&K.indexOf&&K.indexOf("px")!=-1){Y[1]=Y[1]+parseInt(C.getStyle(this.currentElement[0],"fontSize"),10)+5;}else{Y[1]=Y[1]+20;}}if(Y[0]<a[0]){Y[0]=a[0]+5;U="left";}if((Y[0]+(R*2))>(a[0]+parseInt(this.get("iframe").get("element").clientWidth,10))){Y[0]=((a[0]+parseInt(this.get("iframe").get("element").clientWidth,10))-(R*2)-5);U="right";}try{X=(Y[0]-Q[0]);L=(Y[1]-Q[1]);}catch(b){}if(this.get("autoHeight")===false){var P=a[1]+parseInt(this.get("height"),10);var H=a[0]+parseInt(this.get("width"),10);if(Y[1]>P){Y[1]=P;}if(Y[0]>H){Y[0]=(H/2);}}X=((X<0)?(X*-1):X);L=((L<0)?(L*-1):L);if(((X>10)||(L>10))||F){var S=0,V=0;if(this.currentElement[0].width){V=(parseInt(this.currentElement[0].width,10)/2);}var M=J[0]+a[0]+V;S=M-Y[0];if(S>(parseInt(I.attrs.width,10)-1)){S=((parseInt(I.attrs.width,10)-30)-1);}else{if(S<40){S=1;}}if(isNaN(S)){S=1;}if(F){if(G){G.style.left=S+"px";}O.cfg.setProperty("xy",Y);}else{if(this.get("animate")){T=new YAHOO.util.Anim(O.element,{},0.5,YAHOO.util.Easing.easeOut);T.attributes={top:{to:Y[1]},left:{to:Y[0]}};T.onComplete.subscribe(function(){O.cfg.setProperty("xy",Y);});var Z=new YAHOO.util.Anim(O.iframe,T.attributes,0.5,YAHOO.util.Easing.easeOut);var E=new YAHOO.util.Anim(G,{left:{to:S}},0.6,YAHOO.util.Easing.easeOut);T.animate();Z.animate();E.animate();}else{G.style.left=S+"px";O.cfg.setProperty("xy",Y);}}}},_closeWindow:function(E){if(this._checkKey(this._keyMap.CLOSE_WINDOW,E)){if(this.currentWindow){this.closeWindow();}}},closeWindow:function(E){this.fireEvent("window"+this.currentWindow.name+"Close",{type:"window"+this.currentWindow.name+"Close",win:this.currentWindow,el:this.currentElement[0]});this.fireEvent("closeWindow",{type:"closeWindow",win:this.currentWindow});this.currentWindow=null;this.get("panel").hide();this.get("panel").cfg.setProperty("xy",[-900,-900]);this.get("panel").syncIframe();this.unsubscribeAll("afterExecCommand");this.toolbar.set("disabled",false);this.toolbar.resetAllButtons();this._focusWindow();A.removeListener(document,"keydown",this._closeWindow);},cmd_undo:function(F){if(this._hasUndoLevel()){if(!this._undoLevel){this._undoLevel=this._undoCache.length;}this._undoLevel=(this._undoLevel-1);if(this._undoCache[this._undoLevel]){var E=this._getUndo(this._undoLevel);this.setEditorHTML(E);}else{this._undoLevel=null;this.toolbar.disableButton("undo");}}return[false];},cmd_redo:function(F){this._undoLevel=this._undoLevel+1;if(this._undoLevel>=this._undoCache.length){this._undoLevel=this._undoCache.length;}if(this._undoCache[this._undoLevel]){var E=this._getUndo(this._undoLevel);this.setEditorHTML(E);}else{this.toolbar.disableButton("redo");}return[false];},cmd_heading:function(I){var F=true,G=null,H="heading",J=this._getSelection(),E=this._getSelectedElement(); if(E){J=E;}if(this.browser.ie){H="formatblock";}if(I=="none"){if((J&&J.tagName&&(J.tagName.toLowerCase().substring(0,1)=="h"))||(J&&J.parentNode&&J.parentNode.tagName&&(J.parentNode.tagName.toLowerCase().substring(0,1)=="h"))){if(J.parentNode.tagName.toLowerCase().substring(0,1)=="h"){J=J.parentNode;}if(this._isElement(J,"html")){return[false];}G=this._swapEl(E,"span",function(K){K.className="yui-non";});this._selectNode(G);this.currentElement[0]=G;}F=false;}else{if(this._isElement(E,"h1")||this._isElement(E,"h2")||this._isElement(E,"h3")||this._isElement(E,"h4")||this._isElement(E,"h5")||this._isElement(E,"h6")){G=this._swapEl(E,I);this._selectNode(G);this.currentElement[0]=G;}else{this._createCurrentElement(I);this._selectNode(this.currentElement[0]);}F=false;}return[F,H];},cmd_hiddenelements:function(E){if(this._showingHiddenElements){this._lastButton=null;this._showingHiddenElements=false;this.toolbar.deselectButton("hiddenelements");C.removeClass(this._getDoc().body,this.CLASS_HIDDEN);}else{this._showingHiddenElements=true;C.addClass(this._getDoc().body,this.CLASS_HIDDEN);this.toolbar.selectButton("hiddenelements");}return[false];},cmd_removeformat:function(H){var F=true;if(this.browser.webkit&&!this._getDoc().queryCommandEnabled("removeformat")){var E=this._getSelection()+"";this._createCurrentElement("span");this.currentElement[0].className="yui-non";this.currentElement[0].innerHTML=E;for(var G=1;G<this.currentElement.length;G++){this.currentElement[G].parentNode.removeChild(this.currentElement[G]);}F=false;}return[F];},cmd_script:function(K,J){var G=true,E=K.toLowerCase().substring(0,3),H=null,F=this._getSelectedElement();if(this.browser.webkit){if(this._isElement(F,E)){H=this._swapEl(this.currentElement[0],"span",function(L){L.className="yui-non";});this._selectNode(H);}else{this._createCurrentElement(E);var I=this._swapEl(this.currentElement[0],E);this._selectNode(I);this.currentElement[0]=I;}G=false;}return G;},cmd_superscript:function(E){return[this.cmd_script("superscript",E)];},cmd_subscript:function(E){return[this.cmd_script("subscript",E)];},cmd_indent:function(H){var E=true,G=this._getSelectedElement(),I=null;if(this.browser.ie){if(this._isElement(G,"blockquote")){I=this._getDoc().createElement("blockquote");I.innerHTML=G.innerHTML;G.innerHTML="";G.appendChild(I);this._selectNode(I);}else{I=this._getDoc().createElement("blockquote");var F=this._getRange().htmlText;I.innerHTML=F;this._createCurrentElement("blockquote");this.currentElement[0].parentNode.replaceChild(I,this.currentElement[0]);this.currentElement[0]=I;this._selectNode(this.currentElement[0]);}E=false;}else{H="blockquote";}return[E,"formatblock",H];},cmd_outdent:function(I){var E=true,H=this._getSelectedElement(),J=null,F=null;if(this.browser.webkit||this.browser.ie){H=this._getSelectedElement();if(this._isElement(H,"blockquote")){var G=H.parentNode;if(this._isElement(H.parentNode,"blockquote")){G.innerHTML=H.innerHTML;this._selectNode(G);}else{F=this._getDoc().createElement("span");F.innerHTML=H.innerHTML;YAHOO.util.Dom.addClass(F,"yui-non");G.replaceChild(F,H);this._selectNode(F);}}else{}E=false;}else{I=false;}return[E,"outdent",I];},cmd_justify:function(E){if(this.browser.ie){if(this._hasSelection()){this._createCurrentElement("span");this._swapEl(this.currentElement[0],"div",function(F){F.style.textAlign=E;});return[false];}}return[true,"justify"+E,""];},cmd_justifycenter:function(){return[this.cmd_justify("center")];},cmd_justifyleft:function(){return[this.cmd_justify("left")];},cmd_justifyright:function(){return[this.cmd_justify("right")];},toString:function(){var E="Editor";if(this.get&&this.get("element_cont")){E="Editor (#"+this.get("element_cont").get("id")+")"+((this.get("disabled")?" Disabled":""));}return E;}});YAHOO.widget.EditorWindow=function(F,E){this.name=F.replace(" ","_");this.attrs=E;};YAHOO.widget.EditorWindow.prototype={header:null,body:null,footer:null,setHeader:function(E){this.header=E;},setBody:function(E){this.body=E;},setFooter:function(E){this.footer=E;},toString:function(){return"Editor Window ("+this.name+")";}};})();YAHOO.register("editor",YAHOO.widget.Editor,{version:"2.6.0",build:"1321"});
|
(function(){var b=YAHOO.util.Dom,a=YAHOO.util.Event,c=YAHOO.lang;if(YAHOO.widget.Button){YAHOO.widget.ToolbarButtonAdvanced=YAHOO.widget.Button;YAHOO.widget.ToolbarButtonAdvanced.prototype.buttonType="rich";YAHOO.widget.ToolbarButtonAdvanced.prototype.checkValue=function(f){var e=this.getMenu().getItems();if(e.length===0){this.getMenu()._onBeforeShow();e=this.getMenu().getItems()}for(var d=0;d<e.length;d++){e[d].cfg.setProperty("checked",false);if(e[d].value==f){e[d].cfg.setProperty("checked",true)}}}}else{YAHOO.widget.ToolbarButtonAdvanced=function(){}}YAHOO.widget.ToolbarButton=function(e,d){if(c.isObject(arguments[0])&&!b.get(e).nodeType){d=e}var g=(d||{});var f={element:null,attributes:g};if(!f.attributes.type){f.attributes.type="push"}f.element=document.createElement("span");f.element.setAttribute("unselectable","on");f.element.className="yui-button yui-"+f.attributes.type+"-button";f.element.innerHTML='<span class="first-child"><a href="#">LABEL</a></span>';f.element.firstChild.firstChild.tabIndex="-1";f.attributes.id=b.generateId();YAHOO.widget.ToolbarButton.superclass.constructor.call(this,f.element,f.attributes)};YAHOO.extend(YAHOO.widget.ToolbarButton,YAHOO.util.Element,{buttonType:"normal",_handleMouseOver:function(){if(!this.get("disabled")){this.addClass("yui-button-hover");this.addClass("yui-"+this.get("type")+"-button-hover")}},_handleMouseOut:function(){this.removeClass("yui-button-hover");this.removeClass("yui-"+this.get("type")+"-button-hover")},checkValue:function(f){if(this.get("type")=="menu"){var e=this._button.options;for(var d=0;d<e.length;d++){if(e[d].value==f){e.selectedIndex=d}}}},init:function(e,d){YAHOO.widget.ToolbarButton.superclass.init.call(this,e,d);this.on("mouseover",this._handleMouseOver,this,true);this.on("mouseout",this._handleMouseOut,this,true)},initAttributes:function(d){YAHOO.widget.ToolbarButton.superclass.initAttributes.call(this,d);this.setAttributeConfig("value",{value:d.value});this.setAttributeConfig("menu",{value:d.menu||false});this.setAttributeConfig("type",{value:d.type,writeOnce:true,method:function(h){var g,f;if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0]}switch(h){case"select":case"menu":g=document.createElement("select");var j=this.get("menu");for(var e=0;e<j.length;e++){f=document.createElement("option");f.innerHTML=j[e].text;f.value=j[e].value;if(j[e].checked){f.selected=true}g.appendChild(f)}this._button.parentNode.replaceChild(g,this._button);a.on(g,"change",this._handleSelect,this,true);this._button=g;break}}});this.setAttributeConfig("disabled",{value:d.disabled||false,method:function(e){if(e){this.addClass("yui-button-disabled");this.addClass("yui-"+this.get("type")+"-button-disabled")}else{this.removeClass("yui-button-disabled");this.removeClass("yui-"+this.get("type")+"-button-disabled")}if(this.get("type")=="menu"){this._button.disabled=e}}});this.setAttributeConfig("label",{value:d.label,method:function(e){if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0]}if(this.get("type")=="push"){this._button.innerHTML=e}}});this.setAttributeConfig("title",{value:d.title});this.setAttributeConfig("container",{value:null,writeOnce:true,method:function(e){this.appendTo(e)}})},_handleSelect:function(e){var d=a.getTarget(e);var f=d.options[d.selectedIndex].value;this.fireEvent("change",{type:"change",value:f})},getMenu:function(){return this.get("menu")},destroy:function(){a.purgeElement(this.get("element"),true);this.get("element").parentNode.removeChild(this.get("element"));for(var d in this){if(c.hasOwnProperty(this,d)){this[d]=null}}},fireEvent:function(e,d){if(this.DOM_EVENTS[e]&&this.get("disabled")){return}YAHOO.widget.ToolbarButton.superclass.fireEvent.call(this,e,d)},toString:function(){return"ToolbarButton ("+this.get("id")+")"}})})();(function(){var c=YAHOO.util.Dom,a=YAHOO.util.Event,d=YAHOO.lang;var b=function(f){var e=f;if(d.isString(f)){e=this.getButtonById(f)}if(d.isNumber(f)){e=this.getButtonByIndex(f)}if((!(e instanceof YAHOO.widget.ToolbarButton))&&(!(e instanceof YAHOO.widget.ToolbarButtonAdvanced))){e=this.getButtonByValue(f)}if((e instanceof YAHOO.widget.ToolbarButton)||(e instanceof YAHOO.widget.ToolbarButtonAdvanced)){return e}return false};YAHOO.widget.Toolbar=function(i,h){if(d.isObject(arguments[0])&&!c.get(i).nodeType){h=i}var k={};if(h){d.augmentObject(k,h)}var j={element:null,attributes:k};if(d.isString(i)&&c.get(i)){j.element=c.get(i)}else{if(d.isObject(i)&&c.get(i)&&c.get(i).nodeType){j.element=c.get(i)}}if(!j.element){j.element=document.createElement("DIV");j.element.id=c.generateId();if(k.container&&c.get(k.container)){c.get(k.container).appendChild(j.element)}}if(!j.element.id){j.element.id=((d.isString(i))?i:c.generateId())}var f=document.createElement("fieldset");var g=document.createElement("legend");g.innerHTML="Toolbar";f.appendChild(g);var e=document.createElement("DIV");j.attributes.cont=e;c.addClass(e,"yui-toolbar-subcont");f.appendChild(e);j.element.appendChild(f);j.element.tabIndex=-1;j.attributes.element=j.element;j.attributes.id=j.element.id;YAHOO.widget.Toolbar.superclass.constructor.call(this,j.element,j.attributes)};YAHOO.extend(YAHOO.widget.Toolbar,YAHOO.util.Element,{_addMenuClasses:function(h,e,j){c.addClass(this.element,"yui-toolbar-"+j.get("value")+"-menu");if(c.hasClass(j._button.parentNode.parentNode,"yui-toolbar-select")){c.addClass(this.element,"yui-toolbar-select-menu")}var f=this.getItems();for(var g=0;g<f.length;g++){c.addClass(f[g].element,"yui-toolbar-"+j.get("value")+"-"+((f[g].value)?f[g].value.replace(/ /g,"-").toLowerCase():f[g]._oText.nodeValue.replace(/ /g,"-").toLowerCase()));c.addClass(f[g].element,"yui-toolbar-"+j.get("value")+"-"+((f[g].value)?f[g].value.replace(/ /g,"-"):f[g]._oText.nodeValue.replace(/ /g,"-")))}},buttonType:YAHOO.widget.ToolbarButton,dd:null,_colorData:{"#111111":"Obsidian","#2D2D2D":"Dark Gray","#434343":"Shale","#5B5B5B":"Flint","#737373":"Gray","#8B8B8B":"Concrete","#A2A2A2":"Gray","#B9B9B9":"Titanium","#000000":"Black","#D0D0D0":"Light Gray","#E6E6E6":"Silver","#FFFFFF":"White","#BFBF00":"Pumpkin","#FFFF00":"Yellow","#FFFF40":"Banana","#FFFF80":"Pale Yellow","#FFFFBF":"Butter","#525330":"Raw Siena","#898A49":"Mildew","#AEA945":"Olive","#7F7F00":"Paprika","#C3BE71":"Earth","#E0DCAA":"Khaki","#FCFAE1":"Cream","#60BF00":"Cactus","#80FF00":"Chartreuse","#A0FF40":"Green","#C0FF80":"Pale Lime","#DFFFBF":"Light Mint","#3B5738":"Green","#668F5A":"Lime Gray","#7F9757":"Yellow","#407F00":"Clover","#8A9B55":"Pistachio","#B7C296":"Light Jade","#E6EBD5":"Breakwater","#00BF00":"Spring Frost","#00FF80":"Pastel Green","#40FFA0":"Light Emerald","#80FFC0":"Sea Foam","#BFFFDF":"Sea Mist","#033D21":"Dark Forrest","#438059":"Moss","#7FA37C":"Medium Green","#007F40":"Pine","#8DAE94":"Yellow Gray Green","#ACC6B5":"Aqua Lung","#DDEBE2":"Sea Vapor","#00BFBF":"Fog","#00FFFF":"Cyan","#40FFFF":"Turquoise Blue","#80FFFF":"Light Aqua","#BFFFFF":"Pale Cyan","#033D3D":"Dark Teal","#347D7E":"Gray Turquoise","#609A9F":"Green Blue","#007F7F":"Seaweed","#96BDC4":"Green Gray","#B5D1D7":"Soapstone","#E2F1F4":"Light Turquoise","#0060BF":"Summer Sky","#0080FF":"Sky Blue","#40A0FF":"Electric Blue","#80C0FF":"Light Azure","#BFDFFF":"Ice Blue","#1B2C48":"Navy","#385376":"Biscay","#57708F":"Dusty Blue","#00407F":"Sea Blue","#7792AC":"Sky Blue Gray","#A8BED1":"Morning Sky","#DEEBF6":"Vapor","#0000BF":"Deep Blue","#0000FF":"Blue","#4040FF":"Cerulean Blue","#8080FF":"Evening Blue","#BFBFFF":"Light Blue","#212143":"Deep Indigo","#373E68":"Sea Blue","#444F75":"Night Blue","#00007F":"Indigo Blue","#585E82":"Dockside","#8687A4":"Blue Gray","#D2D1E1":"Light Blue Gray","#6000BF":"Neon Violet","#8000FF":"Blue Violet","#A040FF":"Violet Purple","#C080FF":"Violet Dusk","#DFBFFF":"Pale Lavender","#302449":"Cool Shale","#54466F":"Dark Indigo","#655A7F":"Dark Violet","#40007F":"Violet","#726284":"Smoky Violet","#9E8FA9":"Slate Gray","#DCD1DF":"Violet White","#BF00BF":"Royal Violet","#FF00FF":"Fuchsia","#FF40FF":"Magenta","#FF80FF":"Orchid","#FFBFFF":"Pale Magenta","#4A234A":"Dark Purple","#794A72":"Medium Purple","#936386":"Cool Granite","#7F007F":"Purple","#9D7292":"Purple Moon","#C0A0B6":"Pale Purple","#ECDAE5":"Pink Cloud","#BF005F":"Hot Pink","#FF007F":"Deep Pink","#FF409F":"Grape","#FF80BF":"Electric Pink","#FFBFDF":"Pink","#451528":"Purple Red","#823857":"Purple Dino","#A94A76":"Purple Gray","#7F003F":"Rose","#BC6F95":"Antique Mauve","#D8A5BB":"Cool Marble","#F7DDE9":"Pink Granite","#C00000":"Apple","#FF0000":"Fire Truck","#FF4040":"Pale Red","#FF8080":"Salmon","#FFC0C0":"Warm Pink","#441415":"Sepia","#82393C":"Rust","#AA4D4E":"Brick","#800000":"Brick Red","#BC6E6E":"Mauve","#D8A3A4":"Shrimp Pink","#F8DDDD":"Shell Pink","#BF5F00":"Dark Orange","#FF7F00":"Orange","#FF9F40":"Grapefruit","#FFBF80":"Canteloupe","#FFDFBF":"Wax","#482C1B":"Dark Brick","#855A40":"Dirt","#B27C51":"Tan","#7F3F00":"Nutmeg","#C49B71":"Mustard","#E1C4A8":"Pale Tan","#FDEEE0":"Marble"},_colorPicker:null,STR_COLLAPSE:"Collapse Toolbar",STR_SPIN_LABEL:"Spin Button with value {VALUE}. Use Control Shift Up Arrow and Control Shift Down arrow keys to increase or decrease the value.",STR_SPIN_UP:"Click to increase the value of this input",STR_SPIN_DOWN:"Click to decrease the value of this input",_titlebar:null,browser:YAHOO.env.ua,_buttonList:null,_buttonGroupList:null,_sep:null,_sepCount:null,_dragHandle:null,_toolbarConfigs:{renderer:true},CLASS_CONTAINER:"yui-toolbar-container",CLASS_DRAGHANDLE:"yui-toolbar-draghandle",CLASS_SEPARATOR:"yui-toolbar-separator",CLASS_DISABLED:"yui-toolbar-disabled",CLASS_PREFIX:"yui-toolbar",init:function(f,e){YAHOO.widget.Toolbar.superclass.init.call(this,f,e)},initAttributes:function(e){YAHOO.widget.Toolbar.superclass.initAttributes.call(this,e);this.addClass(this.CLASS_CONTAINER);this.setAttributeConfig("buttonType",{value:e.buttonType||"basic",writeOnce:true,validator:function(f){switch(f){case"advanced":case"basic":return true}return false},method:function(f){if(f=="advanced"){if(YAHOO.widget.Button){this.buttonType=YAHOO.widget.ToolbarButtonAdvanced}else{this.buttonType=YAHOO.widget.ToolbarButton}}else{this.buttonType=YAHOO.widget.ToolbarButton}}});this.setAttributeConfig("buttons",{value:[],writeOnce:true,method:function(g){for(var f in g){if(d.hasOwnProperty(g,f)){if(g[f].type=="separator"){this.addSeparator()}else{if(g[f].group!==undefined){this.addButtonGroup(g[f])}else{this.addButton(g[f])}}}}}});this.setAttributeConfig("disabled",{value:false,method:function(f){if(this.get("disabled")===f){return false}if(f){this.addClass(this.CLASS_DISABLED);this.set("draggable",false);this.disableAllButtons()}else{this.removeClass(this.CLASS_DISABLED);if(this._configs.draggable._initialConfig.value){this.set("draggable",true)}this.resetAllButtons()}}});this.setAttributeConfig("cont",{value:e.cont,readOnly:true});this.setAttributeConfig("grouplabels",{value:((e.grouplabels===false)?false:true),method:function(f){if(f){c.removeClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"))}else{c.addClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"))}}});this.setAttributeConfig("titlebar",{value:false,method:function(g){if(g){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar)}this._titlebar=document.createElement("DIV");this._titlebar.tabIndex="-1";a.on(this._titlebar,"focus",function(){this._handleFocus()},this,true);c.addClass(this._titlebar,this.CLASS_PREFIX+"-titlebar");if(d.isString(g)){var f=document.createElement("h2");f.tabIndex="-1";f.innerHTML='<a href="#" tabIndex="0">'+g+"</a>";this._titlebar.appendChild(f);a.on(f.firstChild,"click",function(h){a.stopEvent(h)});a.on([f,f.firstChild],"focus",function(){this._handleFocus()},this,true)}if(this.get("firstChild")){this.insertBefore(this._titlebar,this.get("firstChild"))}else{this.appendChild(this._titlebar)}if(this.get("collapse")){this.set("collapse",true)}}else{if(this._titlebar){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar)}}}}});this.setAttributeConfig("collapse",{value:false,method:function(h){if(this._titlebar){var g=null;var f=c.getElementsByClassName("collapse","span",this._titlebar);if(h){if(f.length>0){return true}g=document.createElement("SPAN");g.innerHTML="X";g.title=this.STR_COLLAPSE;c.addClass(g,"collapse");this._titlebar.appendChild(g);a.addListener(g,"click",function(){if(c.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false)}else{this.collapse()}},this,true)}else{g=c.getElementsByClassName("collapse","span",this._titlebar);if(g[0]){if(c.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false)}g[0].parentNode.removeChild(g[0])}}}}});this.setAttributeConfig("draggable",{value:(e.draggable||false),method:function(f){if(f&&!this.get("titlebar")){if(!this._dragHandle){this._dragHandle=document.createElement("SPAN");this._dragHandle.innerHTML="|";this._dragHandle.setAttribute("title","Click to drag the toolbar");this._dragHandle.id=this.get("id")+"_draghandle";c.addClass(this._dragHandle,this.CLASS_DRAGHANDLE);if(this.get("cont").hasChildNodes()){this.get("cont").insertBefore(this._dragHandle,this.get("cont").firstChild)}else{this.get("cont").appendChild(this._dragHandle)}this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._dragHandle.id)}}else{if(this._dragHandle){this._dragHandle.parentNode.removeChild(this._dragHandle);this._dragHandle=null;this.dd=null}}if(this._titlebar){if(f){this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._titlebar);c.addClass(this._titlebar,"draggable")}else{c.removeClass(this._titlebar,"draggable");if(this.dd){this.dd.unreg();this.dd=null}}}},validator:function(g){var f=true;if(!YAHOO.util.DD){f=false}return f}})},addButtonGroup:function(j){if(!this.get("element")){this._queue[this._queue.length]=["addButtonGroup",arguments];return false}if(!this.hasClass(this.CLASS_PREFIX+"-grouped")){this.addClass(this.CLASS_PREFIX+"-grouped")}var k=document.createElement("DIV");c.addClass(k,this.CLASS_PREFIX+"-group");c.addClass(k,this.CLASS_PREFIX+"-group-"+j.group);if(j.label){var f=document.createElement("h3");f.innerHTML=j.label;k.appendChild(f)}if(!this.get("grouplabels")){c.addClass(this.get("cont"),this.CLASS_PREFIX,"-nogrouplabels")}this.get("cont").appendChild(k);var h=document.createElement("ul");k.appendChild(h);if(!this._buttonGroupList){this._buttonGroupList={}}this._buttonGroupList[j.group]=h;for(var g=0;g<j.buttons.length;g++){var e=document.createElement("li");e.className=this.CLASS_PREFIX+"-groupitem";h.appendChild(e);if((j.buttons[g].type!==undefined)&&j.buttons[g].type=="separator"){this.addSeparator(e)}else{j.buttons[g].container=e;this.addButton(j.buttons[g])}}},addButtonToGroup:function(g,h,i){var f=this._buttonGroupList[h];var e=document.createElement("li");e.className=this.CLASS_PREFIX+"-groupitem";g.container=e;this.addButton(g,i);f.appendChild(e)},addButton:function(k,j){if(!this.get("element")){this._queue[this._queue.length]=["addButton",arguments];return false}if(!this._buttonList){this._buttonList=[]}if(!k.container){k.container=this.get("cont")}if((k.type=="menu")||(k.type=="split")||(k.type=="select")){if(d.isArray(k.menu)){for(var s in k.menu){if(d.hasOwnProperty(k.menu,s)){var y={fn:function(o,i,m){if(!k.menucmd){k.menucmd=k.value}k.value=((m.value)?m.value:m._oText.nodeValue)},scope:this};k.menu[s].onclick=y}}}}var t={},q=false;for(var n in k){if(d.hasOwnProperty(k,n)){if(!this._toolbarConfigs[n]){t[n]=k[n]}}}if(k.type=="select"){t.type="menu"}if(k.type=="spin"){t.type="push"}if(t.type=="color"){if(YAHOO.widget.Overlay){t=this._makeColorButton(t)}else{q=true}}if(t.menu){if((YAHOO.widget.Overlay)&&(k.menu instanceof YAHOO.widget.Overlay)){k.menu.showEvent.subscribe(function(){this._button=t})}else{for(var r=0;r<t.menu.length;r++){if(!t.menu[r].value){t.menu[r].value=t.menu[r].text}}if(this.browser.webkit){t.focusmenu=false}}}if(q){k=false}else{this._configs.buttons.value[this._configs.buttons.value.length]=k;var w=new this.buttonType(t);w.get("element").tabIndex="-1";w.get("element").setAttribute("role","button");w._selected=true;if(this.get("disabled")){w.set("disabled",true)}if(!k.id){k.id=w.get("id")}if(j){var f=w.get("element");var p=null;if(j.get){p=j.get("element").nextSibling}else{if(j.nextSibling){p=j.nextSibling}}if(p){p.parentNode.insertBefore(f,p)}}w.addClass(this.CLASS_PREFIX+"-"+w.get("value"));var v=document.createElement("span");v.className=this.CLASS_PREFIX+"-icon";w.get("element").insertBefore(v,w.get("firstChild"));if(w._button.tagName.toLowerCase()=="button"){w.get("element").setAttribute("unselectable","on");var x=document.createElement("a");x.innerHTML=w._button.innerHTML;x.href="#";x.tabIndex="-1";a.on(x,"click",function(i){a.stopEvent(i)});w._button.parentNode.replaceChild(x,w._button);w._button=x}if(k.type=="select"){if(w._button.tagName.toLowerCase()=="select"){v.parentNode.removeChild(v);var g=w._button;var u=w.get("element");u.parentNode.replaceChild(g,u)}else{w.addClass(this.CLASS_PREFIX+"-select")}}if(k.type=="spin"){if(!d.isArray(k.range)){k.range=[10,100]}this._makeSpinButton(w,k)}w.get("element").setAttribute("title",w.get("label"));if(k.type!="spin"){if((YAHOO.widget.Overlay)&&(t.menu instanceof YAHOO.widget.Overlay)){var h=function(o){var i=true;if(o.keyCode&&(o.keyCode==9)){i=false}if(i){if(this._colorPicker){this._colorPicker._button=k.value}var m=w.getMenu().element;if(c.getStyle(m,"visibility")=="hidden"){w.getMenu().show()}else{w.getMenu().hide()}}YAHOO.util.Event.stopEvent(o)};w.on("mousedown",h,k,this);w.on("keydown",h,k,this)}else{if((k.type!="menu")&&(k.type!="select")){w.on("keypress",this._buttonClick,k,this);w.on("mousedown",function(i){YAHOO.util.Event.stopEvent(i);this._buttonClick(i,k)},k,this);w.on("click",function(i){YAHOO.util.Event.stopEvent(i)})}else{w.on("mousedown",function(i){YAHOO.util.Event.stopEvent(i)});w.on("click",function(i){YAHOO.util.Event.stopEvent(i)});w.on("change",function(i){if(!k.menucmd){k.menucmd=k.value}k.value=i.value;this._buttonClick(i,k)},this,true);var l=this;w.on("appendTo",function(){var i=this;if(i.getMenu()&&i.getMenu().mouseDownEvent){i.getMenu().mouseDownEvent.subscribe(function(z,o){var m=o[1];YAHOO.util.Event.stopEvent(o[0]);i._onMenuClick(o[0],i);if(!k.menucmd){k.menucmd=k.value}k.value=((m.value)?m.value:m._oText.nodeValue);l._buttonClick.call(l,o[1],k);i._hideMenu();return false});i.getMenu().clickEvent.subscribe(function(o,m){YAHOO.util.Event.stopEvent(m[0])});i.getMenu().mouseUpEvent.subscribe(function(o,m){YAHOO.util.Event.stopEvent(m[0])})}})}}}else{w.on("mousedown",function(i){YAHOO.util.Event.stopEvent(i)});w.on("click",function(i){YAHOO.util.Event.stopEvent(i)})}if(this.browser.ie){}if(this.browser.webkit){w.hasFocus=function(){return true}}this._buttonList[this._buttonList.length]=w;if((k.type=="menu")||(k.type=="split")||(k.type=="select")){if(d.isArray(k.menu)){var e=w.getMenu();if(e&&e.renderEvent){e.renderEvent.subscribe(this._addMenuClasses,w);if(k.renderer){e.renderEvent.subscribe(k.renderer,w)}}}}}return k},addSeparator:function(e,h){if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false}var f=((e)?e:this.get("cont"));if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false}if(this._sepCount===null){this._sepCount=0}if(!this._sep){this._sep=document.createElement("SPAN");c.addClass(this._sep,this.CLASS_SEPARATOR);this._sep.innerHTML="|"}var g=this._sep.cloneNode(true);this._sepCount++;c.addClass(g,this.CLASS_SEPARATOR+"-"+this._sepCount);if(h){var i=null;if(h.get){i=h.get("element").nextSibling}else{if(h.nextSibling){i=h.nextSibling}else{i=h}}if(i){if(i==h){i.parentNode.appendChild(g)}else{i.parentNode.insertBefore(g,i)}}}else{f.appendChild(g)}return g},_createColorPicker:function(h){if(c.get(h+"_colors")){c.get(h+"_colors").parentNode.removeChild(c.get(h+"_colors"))}var e=document.createElement("div");e.className="yui-toolbar-colors";e.id=h+"_colors";e.style.display="none";a.on(window,"load",function(){document.body.appendChild(e)},this,true);this._colorPicker=e;var g="";for(var f in this._colorData){if(d.hasOwnProperty(this._colorData,f)){g+='<a style="background-color: '+f+'" href="#">'+f.replace("#","")+"</a>"}}g+="<span><em>X</em><strong></strong></span>";window.setTimeout(function(){e.innerHTML=g},0);a.on(e,"mouseover",function(m){var k=this._colorPicker;var l=k.getElementsByTagName("em")[0];var j=k.getElementsByTagName("strong")[0];var i=a.getTarget(m);if(i.tagName.toLowerCase()=="a"){l.style.backgroundColor=i.style.backgroundColor;j.innerHTML=this._colorData["#"+i.innerHTML]+"<br>"+i.innerHTML}},this,true);a.on(e,"focus",function(i){a.stopEvent(i)});a.on(e,"click",function(i){a.stopEvent(i)});a.on(e,"mousedown",function(j){a.stopEvent(j);var i=a.getTarget(j);if(i.tagName.toLowerCase()=="a"){var l=this.fireEvent("colorPickerClicked",{type:"colorPickerClicked",target:this,button:this._colorPicker._button,color:i.innerHTML,colorName:this._colorData["#"+i.innerHTML]});if(l!==false){var k={color:i.innerHTML,colorName:this._colorData["#"+i.innerHTML],value:this._colorPicker._button};this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:k})}this.getButtonByValue(this._colorPicker._button).getMenu().hide()}},this,true)},_resetColorPicker:function(){var f=this._colorPicker.getElementsByTagName("em")[0];var e=this._colorPicker.getElementsByTagName("strong")[0];f.style.backgroundColor="transparent";e.innerHTML=""},_makeColorButton:function(e){if(!this._colorPicker){this._createColorPicker(this.get("id"))}e.type="color";e.menu=new YAHOO.widget.Overlay(this.get("id")+"_"+e.value+"_menu",{visible:false,position:"absolute",iframe:true});e.menu.setBody("");e.menu.render(this.get("cont"));c.addClass(e.menu.element,"yui-button-menu");c.addClass(e.menu.element,"yui-color-button-menu");e.menu.beforeShowEvent.subscribe(function(){e.menu.cfg.setProperty("zindex",5);e.menu.cfg.setProperty("context",[this.getButtonById(e.id).get("element"),"tl","bl"]);this._resetColorPicker();var f=this._colorPicker;if(f.parentNode){f.parentNode.removeChild(f)}e.menu.setBody("");e.menu.appendToBody(f);this._colorPicker.style.display="block"},this,true);return e},_makeSpinButton:function(r,l){r.addClass(this.CLASS_PREFIX+"-spinbutton");var s=this,n=r._button.parentNode.parentNode,i=l.range,h=document.createElement("a"),g=document.createElement("a");h.href="#";g.href="#";h.tabIndex="-1";g.tabIndex="-1";h.className="up";h.title=this.STR_SPIN_UP;h.innerHTML=this.STR_SPIN_UP;g.className="down";g.title=this.STR_SPIN_DOWN;g.innerHTML=this.STR_SPIN_DOWN;n.appendChild(h);n.appendChild(g);var m=YAHOO.lang.substitute(this.STR_SPIN_LABEL,{VALUE:r.get("label")});r.set("title",m);var q=function(t){t=((t<i[0])?i[0]:t);t=((t>i[1])?i[1]:t);return t};var p=this.browser;var f=false;var k=this.STR_SPIN_LABEL;if(this._titlebar&&this._titlebar.firstChild){f=this._titlebar.firstChild}var e=function(u){YAHOO.util.Event.stopEvent(u);if(!r.get("disabled")&&(u.keyCode!=9)){var v=parseInt(r.get("label"),10);v++;v=q(v);r.set("label",""+v);var t=YAHOO.lang.substitute(k,{VALUE:r.get("label")});r.set("title",t);if(!p.webkit&&f){}s._buttonClick(u,l)}};var o=function(u){YAHOO.util.Event.stopEvent(u);if(!r.get("disabled")&&(u.keyCode!=9)){var v=parseInt(r.get("label"),10);v--;v=q(v);r.set("label",""+v);var t=YAHOO.lang.substitute(k,{VALUE:r.get("label")});r.set("title",t);if(!p.webkit&&f){}s._buttonClick(u,l)}};var j=function(t){if(t.keyCode==38){e(t)}else{if(t.keyCode==40){o(t)}else{if(t.keyCode==107&&t.shiftKey){e(t)}else{if(t.keyCode==109&&t.shiftKey){o(t)}}}}};r.on("keydown",j,this,true);a.on(h,"mousedown",function(t){a.stopEvent(t)},this,true);a.on(g,"mousedown",function(t){a.stopEvent(t)},this,true);a.on(h,"click",e,this,true);a.on(g,"click",o,this,true)},_buttonClick:function(n,f){var e=true;if(n&&n.type=="keypress"){if(n.keyCode==9){e=false}else{if((n.keyCode===13)||(n.keyCode===0)||(n.keyCode===32)){}else{e=false}}}if(e){var p=true,h=false;f.isSelected=this.isSelected(f.id);if(f.value){h=this.fireEvent(f.value+"Click",{type:f.value+"Click",target:this.get("element"),button:f});if(h===false){p=false}}if(f.menucmd&&p){h=this.fireEvent(f.menucmd+"Click",{type:f.menucmd+"Click",target:this.get("element"),button:f});if(h===false){p=false}}if(p){this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:f})}if(f.type=="select"){var l=this.getButtonById(f.id);if(l.buttonType=="rich"){var k=f.value;for(var j=0;j<f.menu.length;j++){if(f.menu[j].value==f.value){k=f.menu[j].text;break}}l.set("label",'<span class="yui-toolbar-'+f.menucmd+"-"+(f.value).replace(/ /g,"-").toLowerCase()+'">'+k+"</span>");var o=l.getMenu().getItems();for(var g=0;g<o.length;g++){if(o[g].value.toLowerCase()==f.value.toLowerCase()){o[g].cfg.setProperty("checked",true)}else{o[g].cfg.setProperty("checked",false)}}}}if(n){a.stopEvent(n)}}},_keyNav:null,_navCounter:null,_navigateButtons:function(f){switch(f.keyCode){case 37:case 39:if(f.keyCode==37){this._navCounter--}else{this._navCounter++}if(this._navCounter>(this._buttonList.length-1)){this._navCounter=0}if(this._navCounter<0){this._navCounter=(this._buttonList.length-1)}if(this._buttonList[this._navCounter]){var e=this._buttonList[this._navCounter].get("element");if(this.browser.ie){e=this._buttonList[this._navCounter].get("element").getElementsByTagName("a")[0]}if(this._buttonList[this._navCounter].get("disabled")){this._navigateButtons(f)}else{e.focus()}}break}},_handleFocus:function(){if(!this._keyNav){var e="keypress";if(this.browser.ie){e="keydown"}a.on(this.get("element"),e,this._navigateButtons,this,true);this._keyNav=true;this._navCounter=-1}},getButtonById:function(g){var e=this._buttonList.length;for(var f=0;f<e;f++){if(this._buttonList[f]&&this._buttonList[f].get("id")==g){return this._buttonList[f]}}return false},getButtonByValue:function(n){var h=this.get("buttons");var f=h.length;for(var k=0;k<f;k++){if(h[k].group!==undefined){for(var e=0;e<h[k].buttons.length;e++){if((h[k].buttons[e].value==n)||(h[k].buttons[e].menucmd==n)){return this.getButtonById(h[k].buttons[e].id)}if(h[k].buttons[e].menu){for(var l=0;l<h[k].buttons[e].menu.length;l++){if(h[k].buttons[e].menu[l].value==n){return this.getButtonById(h[k].buttons[e].id)}}}}}else{if((h[k].value==n)||(h[k].menucmd==n)){return this.getButtonById(h[k].id)}if(h[k].menu){for(var g=0;g<h[k].menu.length;g++){if(h[k].menu[g].value==n){return this.getButtonById(h[k].id)}}}}}return false},getButtonByIndex:function(e){if(this._buttonList[e]){return this._buttonList[e]}else{return false}},getButtons:function(){return this._buttonList},disableButton:function(f){var e=b.call(this,f);if(e){e.set("disabled",true)}else{return false}},enableButton:function(f){if(this.get("disabled")){return false}var e=b.call(this,f);if(e){if(e.get("disabled")){e.set("disabled",false)}}else{return false}},isSelected:function(f){var e=b.call(this,f);if(e){return e._selected}return false},selectButton:function(i,g){var f=b.call(this,i);if(f){f.addClass("yui-button-selected");f.addClass("yui-button-"+f.get("value")+"-selected");f._selected=true;if(g){if(f.buttonType=="rich"){var h=f.getMenu().getItems();for(var e=0;e<h.length;e++){if(h[e].value==g){h[e].cfg.setProperty("checked",true);f.set("label",'<span class="yui-toolbar-'+f.get("value")+"-"+(g).replace(/ /g,"-").toLowerCase()+'">'+h[e]._oText.nodeValue+"</span>")}else{h[e].cfg.setProperty("checked",false)}}}}}else{return false}},deselectButton:function(f){var e=b.call(this,f);if(e){e.removeClass("yui-button-selected");e.removeClass("yui-button-"+e.get("value")+"-selected");e.removeClass("yui-button-hover");e._selected=false}else{return false}},deselectAllButtons:function(){var e=this._buttonList.length;for(var f=0;f<e;f++){this.deselectButton(this._buttonList[f])}},disableAllButtons:function(){if(this.get("disabled")){return false}var e=this._buttonList.length;for(var f=0;f<e;f++){this.disableButton(this._buttonList[f])}},enableAllButtons:function(){if(this.get("disabled")){return false}var e=this._buttonList.length;for(var f=0;f<e;f++){this.enableButton(this._buttonList[f])}},resetAllButtons:function(j){if(!d.isObject(j)){j={}}if(this.get("disabled")){return false}var e=this._buttonList.length;for(var f=0;f<e;f++){var h=this._buttonList[f];if(h){var g=h._configs.disabled._initialConfig.value;if(j[h.get("id")]){this.enableButton(h);this.selectButton(h)}else{if(g){this.disableButton(h)}else{this.enableButton(h)}this.deselectButton(h)}}}},destroyButton:function(j){var g=b.call(this,j);if(g){var h=g.get("id");g.destroy();var e=this._buttonList.length;for(var f=0;f<e;f++){if(this._buttonList[f]&&this._buttonList[f].get("id")==h){this._buttonList[f]=null}}}else{return false}},destroy:function(){this.get("element").innerHTML="";this.get("element").className="";for(var e in this){if(d.hasOwnProperty(this,e)){this[e]=null}}return true},collapse:function(f){var e=c.getElementsByClassName("collapse","span",this._titlebar);if(f===false){c.removeClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");if(e[0]){c.removeClass(e[0],"collapsed")}this.fireEvent("toolbarExpanded",{type:"toolbarExpanded",target:this})}else{if(e[0]){c.addClass(e[0],"collapsed")}c.addClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");this.fireEvent("toolbarCollapsed",{type:"toolbarCollapsed",target:this})}},toString:function(){return"Toolbar (#"+this.get("element").id+") with "+this._buttonList.length+" buttons."}})})();(function(){var c=YAHOO.util.Dom,a=YAHOO.util.Event,d=YAHOO.lang,b=YAHOO.widget.Toolbar;YAHOO.widget.SimpleEditor=function(h,m){var g={};if(d.isObject(h)&&(!h.tagName)&&!m){d.augmentObject(g,h);h=document.createElement("textarea");this.DOMReady=true;if(g.container){var k=c.get(g.container);k.appendChild(h)}else{document.body.appendChild(h)}}else{if(m){d.augmentObject(g,m)}}var i={element:null,attributes:g},f=null;if(d.isString(h)){f=h}else{if(i.attributes.id){f=i.attributes.id}else{this.DOMReady=true;f=c.generateId(h)}}i.element=h;var j=document.createElement("DIV");i.attributes.element_cont=new YAHOO.util.Element(j,{id:f+"_container"});var e=document.createElement("div");c.addClass(e,"first-child");i.attributes.element_cont.appendChild(e);if(!i.attributes.toolbar_cont){i.attributes.toolbar_cont=document.createElement("DIV");i.attributes.toolbar_cont.id=f+"_toolbar";e.appendChild(i.attributes.toolbar_cont)}var l=document.createElement("DIV");e.appendChild(l);i.attributes.editor_wrapper=l;YAHOO.widget.SimpleEditor.superclass.constructor.call(this,i.element,i.attributes)};YAHOO.extend(YAHOO.widget.SimpleEditor,YAHOO.util.Element,{_resizeConfig:{handles:["br"],autoRatio:true,status:true,proxy:true,useShim:true,setSize:false},_setupResize:function(){if(!YAHOO.util.DD||!YAHOO.util.Resize){return false}if(this.get("resize")){var e={};d.augmentObject(e,this._resizeConfig);this.resize=new YAHOO.util.Resize(this.get("element_cont").get("element"),e);this.resize.on("resize",function(g){var l=this.get("animate");this.set("animate",false);this.set("width",g.width+"px");var i=g.height,j=(this.toolbar.get("element").clientHeight+2),k=0;if(this.dompath){k=(this.dompath.clientHeight+1)}var f=(i-j-k);this.set("height",f+"px");this.get("element_cont").setStyle("height","");this.set("animate",l)},this,true)}},resize:null,_setupDD:function(){if(!YAHOO.util.DD){return false}if(this.get("drag")){var f=this.get("drag"),e=YAHOO.util.DD;if(f==="proxy"){e=YAHOO.util.DDProxy}this.dd=new e(this.get("element_cont").get("element"));this.toolbar.addClass("draggable");this.dd.setHandleElId(this.toolbar._titlebar)}},dd:null,_lastCommand:null,_undoNodeChange:function(){},_storeUndo:function(){},_checkKey:function(f,j){var g=false;if((j.keyCode===f.key)){if(f.mods&&(f.mods.length>0)){var l=0;for(var h=0;h<f.mods.length;h++){if(this.browser.mac){if(f.mods[h]=="ctrl"){f.mods[h]="meta"}}if(j[f.mods[h]+"Key"]===true){l++}}if(l===f.mods.length){g=true}}else{g=true}}return g},_keyMap:{SELECT_ALL:{key:65,mods:["ctrl"]},CLOSE_WINDOW:{key:87,mods:["shift","ctrl"]},FOCUS_TOOLBAR:{key:27,mods:["shift"]},FOCUS_AFTER:{key:27},CREATE_LINK:{key:76,mods:["shift","ctrl"]},BOLD:{key:66,mods:["shift","ctrl"]},ITALIC:{key:73,mods:["shift","ctrl"]},UNDERLINE:{key:85,mods:["shift","ctrl"]},UNDO:{key:90,mods:["ctrl"]},REDO:{key:90,mods:["shift","ctrl"]},JUSTIFY_LEFT:{key:219,mods:["shift","ctrl"]},JUSTIFY_CENTER:{key:220,mods:["shift","ctrl"]},JUSTIFY_RIGHT:{key:221,mods:["shift","ctrl"]}},_cleanClassName:function(e){return e.replace(/ /g,"-").toLowerCase()},_textarea:null,_docType:'<!DOCTYPE HTML PUBLIC "-
|
F.setAttribute("method","GET");E.editor_form=F;A.on(F,"submit",function(N){A.stopEvent(N);},this,true);J.appendChild(F);var G=document.createElement("span");G.innerHTML="X";G.title=this.STR_CLOSE_WINDOW;G.className="close";A.on(G,"click",this.closeWindow,this,true);var L=document.createElement("span");L.innerHTML="^";L.className="knob";E.editor_knob=L;var M=document.createElement("h3");E.editor_header=M;M.innerHTML="<span></span>";E.setHeader(" ");E.appendToHeader(M);M.appendChild(G);M.appendChild(L);E.setBody(" ");E.setFooter(" ");E.appendToBody(J);A.on(E.element,"click",function(N){A.stopPropagation(N);});var I=function(){};E.showEvent.subscribe(I,this,true);E.renderEvent.subscribe(function(){this._renderInsertImageWindow();this._renderCreateLinkWindow();this.fireEvent("windowRender",{type:"windowRender",panel:E});},this,true);if(this.DOMReady){this.get("panel").render(document.body);C.addClass(this.get("panel").element,"yui-editor-panel");}else{A.onDOMReady(function(){this.get("panel").render(document.body);C.addClass(this.get("panel").element,"yui-editor-panel");},this,true);}this.get("panel").showEvent.subscribe(function(){YAHOO.util.Dom.setStyle(this.element,"display","block");});return this.get("panel");},openWindow:function(K){var P=this;window.setTimeout(function(){P.toolbar.set("disabled",true);},10);A.on(document,"keydown",this._closeWindow,this,true);if(this.currentWindow){this.closeWindow();}var Q=C.getXY(this.currentElement[0]),N=C.getXY(this.get("iframe").get("element")),E=this.get("panel"),H=[(Q[0]+N[0]-20),(Q[1]+N[1]+10)],G=(parseInt(K.attrs.width,10)/2),L="center",J=null;this.fireEvent("beforeOpenWindow",{type:"beforeOpenWindow",win:K,panel:E});var F=E.editor_form;var I=this._windows;for(var O in I){if(D.hasOwnProperty(I,O)){if(I[O]&&I[O].body){if(O==K.name){C.setStyle(I[O].body,"display","block");}else{C.setStyle(I[O].body,"display","none");}}}}if(this._windows[K.name].body){C.setStyle(this._windows[K.name].body,"display","block");F.appendChild(this._windows[K.name].body);}else{if(D.isObject(K.body)){F.appendChild(K.body);}else{var M=document.createElement("div");M.innerHTML=K.body;F.appendChild(M);}}E.editor_header.firstChild.innerHTML=K.header;if(K.footer!==null){E.setFooter(K.footer);C.addClass(E.footer,"open");}else{C.removeClass(E.footer,"open");}E.cfg.setProperty("width",K.attrs.width);this.currentWindow=K;this.moveWindow(true);E.show();this.fireEvent("afterOpenWindow",{type:"afterOpenWindow",win:K,panel:E});},moveWindow:function(F){if(!this.currentWindow){return false;}var I=this.currentWindow,J=C.getXY(this.currentElement[0]),a=C.getXY(this.get("iframe").get("element")),O=this.get("panel"),Y=[(J[0]+a[0]),(J[1]+a[1])],R=(parseInt(I.attrs.width,10)/2),U="center",Q=O.cfg.getProperty("xy")||[0,0],G=O.editor_knob,X=0,L=0,T=false;Y[0]=((Y[0]-R)+20);Y[0]=Y[0]-C.getDocumentScrollLeft(this._getDoc());Y[1]=Y[1]-C.getDocumentScrollTop(this._getDoc());if(this._isElement(this.currentElement[0],"img")){if(this.currentElement[0].src.indexOf(this.get("blankimage"))!=-1){Y[0]=(Y[0]+(75/2));Y[1]=(Y[1]+75);}else{var N=parseInt(this.currentElement[0].width,10);var W=parseInt(this.currentElement[0].height,10);Y[0]=(Y[0]+(N/2));Y[1]=(Y[1]+W);}Y[1]=Y[1]+15;}else{var K=C.getStyle(this.currentElement[0],"fontSize");if(K&&K.indexOf&&K.indexOf("px")!=-1){Y[1]=Y[1]+parseInt(C.getStyle(this.currentElement[0],"fontSize"),10)+5;}else{Y[1]=Y[1]+20;}}if(Y[0]<a[0]){Y[0]=a[0]+5;U="left";}if((Y[0]+(R*2))>(a[0]+parseInt(this.get("iframe").get("element").clientWidth,10))){Y[0]=((a[0]+parseInt(this.get("iframe").get("element").clientWidth,10))-(R*2)-5);U="right";}try{X=(Y[0]-Q[0]);L=(Y[1]-Q[1]);}catch(b){}if(this.get("autoHeight")===false){var P=a[1]+parseInt(this.get("height"),10);var H=a[0]+parseInt(this.get("width"),10);if(Y[1]>P){Y[1]=P;}if(Y[0]>H){Y[0]=(H/2);}}X=((X<0)?(X*-1):X);L=((L<0)?(L*-1):L);if(((X>10)||(L>10))||F){var S=0,V=0;if(this.currentElement[0].width){V=(parseInt(this.currentElement[0].width,10)/2);}var M=J[0]+a[0]+V;S=M-Y[0];if(S>(parseInt(I.attrs.width,10)-1)){S=((parseInt(I.attrs.width,10)-30)-1);}else{if(S<40){S=1;}}if(isNaN(S)){S=1;}if(F){if(G){G.style.left=S+"px";}O.cfg.setProperty("xy",Y);}else{if(this.get("animate")){T=new YAHOO.util.Anim(O.element,{},0.5,YAHOO.util.Easing.easeOut);T.attributes={top:{to:Y[1]},left:{to:Y[0]}};T.onComplete.subscribe(function(){O.cfg.setProperty("xy",Y);});var Z=new YAHOO.util.Anim(O.iframe,T.attributes,0.5,YAHOO.util.Easing.easeOut);var E=new YAHOO.util.Anim(G,{left:{to:S}},0.6,YAHOO.util.Easing.easeOut);T.animate();Z.animate();E.animate();}else{G.style.left=S+"px";O.cfg.setProperty("xy",Y);}}}},_closeWindow:function(E){if(this._checkKey(this._keyMap.CLOSE_WINDOW,E)){if(this.currentWindow){this.closeWindow();}}},closeWindow:function(E){this.fireEvent("window"+this.currentWindow.name+"Close",{type:"window"+this.currentWindow.name+"Close",win:this.currentWindow,el:this.currentElement[0]});this.fireEvent("closeWindow",{type:"closeWindow",win:this.currentWindow});this.currentWindow=null;this.get("panel").hide();this.get("panel").cfg.setProperty("xy",[-900,-900]);this.get("panel").syncIframe();this.unsubscribeAll("afterExecCommand");this.toolbar.set("disabled",false);this.toolbar.resetAllButtons();this._focusWindow();A.removeListener(document,"keydown",this._closeWindow);},cmd_undo:function(F){if(this._hasUndoLevel()){if(!this._undoLevel){this._undoLevel=this._undoCache.length;}this._undoLevel=(this._undoLevel-1);if(this._undoCache[this._undoLevel]){var E=this._getUndo(this._undoLevel);this.setEditorHTML(E);}else{this._undoLevel=null;this.toolbar.disableButton("undo");}}return[false];},cmd_redo:function(F){this._undoLevel=this._undoLevel+1;if(this._undoLevel>=this._undoCache.length){this._undoLevel=this._undoCache.length;}if(this._undoCache[this._undoLevel]){var E=this._getUndo(this._undoLevel);this.setEditorHTML(E);}else{this.toolbar.disableButton("redo");}return[false];},cmd_heading:function(I){var F=true,G=null,H="heading",J=this._getSelection(),E=this._getSelectedElement();if(E){J=E;}if(this.browser.ie){H="formatblock";}if(I=="none"){if((J&&J.tagName&&(J.tagName.toLowerCase().substring(0,1)=="h"))||(J&&J.parentNode&&J.parentNode.tagName&&(J.parentNode.tagName.toLowerCase().substring(0,1)=="h"))){if(J.parentNode.tagName.toLowerCase().substring(0,1)=="h"){J=J.parentNode;}if(this._isElement(J,"html")){return[false];}G=this._swapEl(E,"span",function(K){K.className="yui-non";});this._selectNode(G);this.currentElement[0]=G;}F=false;}else{if(this._isElement(E,"h1")||this._isElement(E,"h2")||this._isElement(E,"h3")||this._isElement(E,"h4")||this._isElement(E,"h5")||this._isElement(E,"h6")){G=this._swapEl(E,I);this._selectNode(G);this.currentElement[0]=G;}else{this._createCurrentElement(I);this._selectNode(this.currentElement[0]);}F=false;}return[F,H];},cmd_hiddenelements:function(E){if(this._showingHiddenElements){this._lastButton=null;this._showingHiddenElements=false;this.toolbar.deselectButton("hiddenelements");C.removeClass(this._getDoc().body,this.CLASS_HIDDEN);}else{this._showingHiddenElements=true;C.addClass(this._getDoc().body,this.CLASS_HIDDEN);this.toolbar.selectButton("hiddenelements");}return[false];},cmd_removeformat:function(H){var F=true;if(this.browser.webkit&&!this._getDoc().queryCommandEnabled("removeformat")){var E=this._getSelection()+"";this._createCurrentElement("span");this.currentElement[0].className="yui-non";this.currentElement[0].innerHTML=E;for(var G=1;G<this.currentElement.length;G++){this.currentElement[G].parentNode.removeChild(this.currentElement[G]);}F=false;}return[F];},cmd_script:function(K,J){var G=true,E=K.toLowerCase().substring(0,3),H=null,F=this._getSelectedElement();if(this.browser.webkit){if(this._isElement(F,E)){H=this._swapEl(this.currentElement[0],"span",function(L){L.className="yui-non";});this._selectNode(H);}else{this._createCurrentElement(E);var I=this._swapEl(this.currentElement[0],E);this._selectNode(I);this.currentElement[0]=I;}G=false;}return G;},cmd_superscript:function(E){return[this.cmd_script("superscript",E)];},cmd_subscript:function(E){return[this.cmd_script("subscript",E)];},cmd_indent:function(H){var E=true,G=this._getSelectedElement(),I=null;if(this.browser.ie){if(this._isElement(G,"blockquote")){I=this._getDoc().createElement("blockquote");I.innerHTML=G.innerHTML;G.innerHTML="";G.appendChild(I);this._selectNode(I);}else{I=this._getDoc().createElement("blockquote");var F=this._getRange().htmlText;I.innerHTML=F;this._createCurrentElement("blockquote");this.currentElement[0].parentNode.replaceChild(I,this.currentElement[0]);this.currentElement[0]=I;this._selectNode(this.currentElement[0]);}E=false;}else{H="blockquote";}return[E,"formatblock",H];},cmd_outdent:function(I){var E=true,H=this._getSelectedElement(),J=null,F=null;if(this.browser.webkit||this.browser.ie){H=this._getSelectedElement();if(this._isElement(H,"blockquote")){var G=H.parentNode;if(this._isElement(H.parentNode,"blockquote")){G.innerHTML=H.innerHTML;this._selectNode(G);}else{F=this._getDoc().createElement("span");F.innerHTML=H.innerHTML;YAHOO.util.Dom.addClass(F,"yui-non");G.replaceChild(F,H);this._selectNode(F);}}else{}E=false;}else{I=false;}return[E,"outdent",I];},cmd_justify:function(E){if(this.browser.ie){if(this._hasSelection()){this._createCurrentElement("span");this._swapEl(this.currentElement[0],"div",function(F){F.style.textAlign=E;});return[false];}}return[true,"justify"+E,""];},cmd_justifycenter:function(){return[this.cmd_justify("center")];},cmd_justifyleft:function(){return[this.cmd_justify("left")];},cmd_justifyright:function(){return[this.cmd_justify("right")];},toString:function(){var E="Editor";if(this.get&&this.get("element_cont")){E="Editor (#"+this.get("element_cont").get("id")+")"+((this.get("disabled")?" Disabled":""));}return E;}});YAHOO.widget.EditorWindow=function(F,E){this.name=F.replace(" ","_");this.attrs=E;};YAHOO.widget.EditorWindow.prototype={header:null,body:null,footer:null,setHeader:function(E){this.header=E;},setBody:function(E){this.body=E;},setFooter:function(E){this.footer=E;},toString:function(){return"Editor Window ("+this.name+")";}};})();YAHOO.register("editor",YAHOO.widget.Editor,{version:"2.6.0",build:"1321"});
|
},render:function(){if(this._rendered){return false;}if(!this.DOMReady){this._queue[this._queue.length]=["render",arguments];return false;}if(this.get("element")){if(this.get("element").tagName){this._textarea=true;if(this.get("element").tagName.toLowerCase()!=="textarea"){this._textarea=false;}}else{return false;}}else{return false;}this._rendered=true;var E=this;window.setTimeout(function(){E._render.call(E);},4);},_render:function(){var E=this;this.set("textarea",this.get("element"));this.get("element_cont").setStyle("display","none");this.get("element_cont").addClass(this.CLASS_CONTAINER);this.set("iframe",this._createIframe());window.setTimeout(function(){E._setInitialContent.call(E);},10);this.get("editor_wrapper").appendChild(this.get("iframe").get("element"));if(this.get("disabled")){this._disableEditor(true);}var F=this.get("toolbar");if(F instanceof B){this.toolbar=F;this.toolbar.set("disabled",true);}else{F.disabled=true;this.toolbar=new B(this.get("toolbar_cont"),F);}this.fireEvent("toolbarLoaded",{type:"toolbarLoaded",target:this.toolbar});this.toolbar.on("toolbarCollapsed",function(){if(this.currentWindow){this.moveWindow();}},this,true);this.toolbar.on("toolbarExpanded",function(){if(this.currentWindow){this.moveWindow();}},this,true);this.toolbar.on("fontsizeClick",this._handleFontSize,this,true);this.toolbar.on("colorPickerClicked",function(G){this._handleColorPicker(G);return false;},this,true);this.toolbar.on("alignClick",this._handleAlign,this,true);this.on("afterNodeChange",this._handleAfterNodeChange,this,true);this.toolbar.on("insertimageClick",this._handleInsertImageClick,this,true);this.on("windowinsertimageClose",this._handleInsertImageWindowClose,this,true);this.toolbar.on("createlinkClick",this._handleCreateLinkClick,this,true);this.on("windowcreatelinkClose",this._handleCreateLinkWindowClose,this,true);this.get("parentNode").replaceChild(this.get("element_cont").get("element"),this.get("element"));this.setStyle("visibility","hidden");this.setStyle("position","absolute");this.setStyle("top","-9999px");this.setStyle("left","-9999px");this.get("element_cont").appendChild(this.get("element"));this.get("element_cont").setStyle("display","block");C.addClass(this.get("iframe").get("parentNode"),this.CLASS_EDITABLE_CONT);this.get("iframe").addClass(this.CLASS_EDITABLE);this.get("element_cont").setStyle("width",this.get("width"));C.setStyle(this.get("iframe").get("parentNode"),"height",this.get("height"));this.get("iframe").setStyle("width","100%");this.get("iframe").setStyle("height","100%");this._setupDD();window.setTimeout(function(){E._setupAfterElement.call(E);},0);this.fireEvent("afterRender",{type:"afterRender",target:this});},execCommand:function(G,F){var J=this.fireEvent("beforeExecCommand",{type:"beforeExecCommand",target:this,args:arguments});if((J===false)||(this.STOP_EXEC_COMMAND)){this.STOP_EXEC_COMMAND=false;return false;}this._lastCommand=G;this._setMarkupType(G);if(this.browser.ie){this._getWindow().focus();}var E=true;if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue(G)){E=false;}}this.editorDirty=true;if((typeof this["cmd_"+G.toLowerCase()]=="function")&&E){var I=this["cmd_"+G.toLowerCase()](F);E=I[0];if(I[1]){G=I[1];}if(I[2]){F=I[2];}}if(E){try{this._getDoc().execCommand(G,false,F);}catch(H){}}else{}this.on("afterExecCommand",function(){this.unsubscribeAll("afterExecCommand");this.nodeChange();},this,true);this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});},cmd_underline:function(F){if(!this.browser.webkit){var E=this._getSelectedElement();if(E&&this._isElement(E,"span")){if(E.style.textDecoration=="underline"){E.style.textDecoration="none";}else{E.style.textDecoration="underline";}return[false];}}return[true];},cmd_backcolor:function(H){var E=true,F=this._getSelectedElement(),G="backcolor";if(this.browser.gecko||this.browser.opera){this._setEditorStyle(true);G="hilitecolor";}if(!this._isElement(F,"body")&&!this._hasSelection()){C.setStyle(F,"background-color",H);this._selectNode(F);E=false;}else{if(!this._isElement(F,"body")&&this._hasSelection()){C.setStyle(F,"background-color",H);this._selectNode(F);E=false;}else{if(this.get("insert")){F=this._createInsertElement({backgroundColor:H});}else{this._createCurrentElement("span",{backgroundColor:H});this._selectNode(this.currentElement[0]);}E=false;}}return[E,G];},cmd_forecolor:function(G){var E=true,F=this._getSelectedElement();if(!this._isElement(F,"body")&&!this._hasSelection()){C.setStyle(F,"color",G);this._selectNode(F);E=false;}else{if(!this._isElement(F,"body")&&this._hasSelection()){C.setStyle(F,"color",G);this._selectNode(F);E=false;}else{if(this.get("insert")){F=this._createInsertElement({color:G});}else{this._createCurrentElement("span",{color:G});this._selectNode(this.currentElement[0]);}E=false;}}return[E];},cmd_unlink:function(E){this._swapEl(this.currentElement[0],"span",function(F){F.className="yui-non";});return[false];},cmd_createlink:function(G){var F=this._getSelectedElement(),E=null;if(this._hasParent(F,"a")){this.currentElement[0]=this._hasParent(F,"a");}else{if(!this._isElement(F,"a")){this._createCurrentElement("a");E=this._swapEl(this.currentElement[0],"a");this.currentElement[0]=E;}else{this.currentElement[0]=F;}}return[false];},cmd_insertimage:function(J){var E=true,F=null,I="insertimage",H=this._getSelectedElement();if(J===""){J=this.get("blankimage");}if(this._isElement(H,"img")){this.currentElement[0]=H;E=false;}else{if(this._getDoc().queryCommandEnabled(I)){this._getDoc().execCommand("insertimage",false,J);var K=this._getDoc().getElementsByTagName("img");for(var G=0;G<K.length;G++){if(!YAHOO.util.Dom.hasClass(K[G],"yui-img")){YAHOO.util.Dom.addClass(K[G],"yui-img");this.currentElement[0]=K[G];}}E=false;}else{if(H==this._getDoc().body){F=this._getDoc().createElement("img");F.setAttribute("src",J);YAHOO.util.Dom.addClass(F,"yui-img");this._getDoc().body.appendChild(F);}else{this._createCurrentElement("img");F=this._getDoc().createElement("img"); F.setAttribute("src",J);YAHOO.util.Dom.addClass(F,"yui-img");this.currentElement[0].parentNode.replaceChild(F,this.currentElement[0]);}this.currentElement[0]=F;E=false;}}return[E];},cmd_inserthtml:function(H){var E=true,G="inserthtml",F=null,I=null;if(this.browser.webkit&&!this._getDoc().queryCommandEnabled(G)){this._createCurrentElement("img");F=this._getDoc().createElement("span");F.innerHTML=H;this.currentElement[0].parentNode.replaceChild(F,this.currentElement[0]);E=false;}else{if(this.browser.ie){I=this._getRange();if(I.item){I.item(0).outerHTML=H;}else{I.pasteHTML(H);}E=false;}}return[E];},cmd_list:function(Y){var S=true,V=null,M=0,G=null,R="",W=this._getSelectedElement(),T="insertorderedlist";if(Y=="ul"){T="insertunorderedlist";}if(this.browser.webkit){if(this._isElement(W,"li")&&this._isElement(W.parentNode,Y)){G=W.parentNode;V=this._getDoc().createElement("span");YAHOO.util.Dom.addClass(V,"yui-non");R="";var F=G.getElementsByTagName("li");for(M=0;M<F.length;M++){R+="<div>"+F[M].innerHTML+"</div>";}V.innerHTML=R;this.currentElement[0]=G;this.currentElement[0].parentNode.replaceChild(V,this.currentElement[0]);}else{this._createCurrentElement(Y.toLowerCase());V=this._getDoc().createElement(Y);for(M=0;M<this.currentElement.length;M++){var J=this._getDoc().createElement("li");J.innerHTML=this.currentElement[M].innerHTML+'<span class="yui-non"> </span> ';V.appendChild(J);if(M>0){this.currentElement[M].parentNode.removeChild(this.currentElement[M]);}}this.currentElement[0].parentNode.replaceChild(V,this.currentElement[0]);this.currentElement[0]=V;var H=this.currentElement[0].firstChild;H=C.getElementsByClassName("yui-non","span",H)[0];this._getSelection().setBaseAndExtent(H,1,H,H.innerText.length);}S=false;}else{G=this._getSelectedElement();if(this._isElement(G,"li")&&this._isElement(G.parentNode,Y)||(this.browser.ie&&this._isElement(this._getRange().parentElement,"li"))||(this.browser.ie&&this._isElement(G,"ul"))||(this.browser.ie&&this._isElement(G,"ol"))){if(this.browser.ie){if((this.browser.ie&&this._isElement(G,"ul"))||(this.browser.ie&&this._isElement(G,"ol"))){G=G.getElementsByTagName("li")[0];}R="";var I=G.parentNode.getElementsByTagName("li");for(var U=0;U<I.length;U++){R+=I[U].innerHTML+"<br>";}var X=this._getDoc().createElement("span");X.innerHTML=R;G.parentNode.parentNode.replaceChild(X,G.parentNode);}else{this.nodeChange();this._getDoc().execCommand(T,"",G.parentNode);this.nodeChange();}S=false;}if(this.browser.opera){var Q=this;window.setTimeout(function(){var Z=Q._getDoc().getElementsByTagName("li");for(var a=0;a<Z.length;a++){if(Z[a].innerHTML.toLowerCase()=="<br>"){Z[a].parentNode.parentNode.removeChild(Z[a].parentNode);}}},30);}if(this.browser.ie&&S){var K="";if(this._getRange().html){K="<li>"+this._getRange().html+"</li>";}else{var L=this._getRange().text.split("\n");if(L.length>1){K="";for(var P=0;P<L.length;P++){K+="<li>"+L[P]+"</li>";}}else{var O=this._getRange().text;if(O===""){K='<li id="new_list_item">'+O+"</li>";}else{K="<li>"+O+"</li>";}}}this._getRange().pasteHTML("<"+Y+">"+K+"</"+Y+">");var E=this._getDoc().getElementById("new_list_item");if(E){var N=this._getDoc().body.createTextRange();N.moveToElementText(E);N.collapse(false);N.select();E.id="";}S=false;}}return S;},cmd_insertorderedlist:function(E){return[this.cmd_list("ol")];},cmd_insertunorderedlist:function(E){return[this.cmd_list("ul")];},cmd_fontname:function(H){var E=true,G=this._getSelectedElement();this.currentFont=H;if(G&&G.tagName&&!this._hasSelection()&&!this._isElement(G,"body")&&!this.get("insert")){YAHOO.util.Dom.setStyle(G,"font-family",H);E=false;}else{if(this.get("insert")&&!this._hasSelection()){var F=this._createInsertElement({fontFamily:H});E=false;}}return[E];},cmd_fontsize:function(G){var E=null;if(this.currentElement&&(this.currentElement.length>0)&&(!this._hasSelection())&&(!this.get("insert"))){YAHOO.util.Dom.setStyle(this.currentElement,"fontSize",G);}else{if(!this._isElement(this._getSelectedElement(),"body")){E=this._getSelectedElement();YAHOO.util.Dom.setStyle(E,"fontSize",G);if(this.get("insert")&&this.browser.ie){var F=this._getRange();F.collapse(false);F.select();}else{this._selectNode(E);}}else{if(this.get("insert")&&!this._hasSelection()){E=this._createInsertElement({fontSize:G});this.currentElement[0]=E;this._selectNode(this.currentElement[0]);}else{this._createCurrentElement("span",{"fontSize":G});this._selectNode(this.currentElement[0]);}}}return[false];},_swapEl:function(F,E,H){var G=this._getDoc().createElement(E);if(F){G.innerHTML=F.innerHTML;}if(typeof H=="function"){H.call(this,G);}if(F){F.parentNode.replaceChild(G,F);}return G;},_createInsertElement:function(E){this._createCurrentElement("span",E);var F=this.currentElement[0];if(this.browser.webkit){F.innerHTML='<span class="yui-non"> </span>';F=F.firstChild;this._getSelection().setBaseAndExtent(F,1,F,F.innerText.length);}else{if(this.browser.ie||this.browser.opera){F.innerHTML=" ";}}this._focusWindow();this._selectNode(F,true);return F;},_createCurrentElement:function(G,J){G=((G)?G:"a");var R=null,F=[],H=this._getDoc();if(this.currentFont){if(!J){J={};}J.fontFamily=this.currentFont;this.currentFont=null;}this.currentElement=[];var M=function(X,Z){var Y=null;X=((X)?X:"span");X=X.toLowerCase();switch(X){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":Y=H.createElement(X);break;default:Y=H.createElement(X);if(X==="span"){YAHOO.util.Dom.addClass(Y,"yui-tag-"+X);YAHOO.util.Dom.addClass(Y,"yui-tag");Y.setAttribute("tag",X);}for(var W in Z){if(YAHOO.lang.hasOwnProperty(Z,W)){Y.style[W]=Z[W];}}break;}return Y;};if(!this._hasSelection()){if(this._getDoc().queryCommandEnabled("insertimage")){this._getDoc().execCommand("insertimage",false,"yui-tmp-img");var L=this._getDoc().getElementsByTagName("img");for(var Q=0;Q<L.length;Q++){if(L[Q].getAttribute("src",2)=="yui-tmp-img"){F=M(G,J);L[Q].parentNode.replaceChild(F,L[Q]);this.currentElement[this.currentElement.length]=F;}}}else{if(this.currentEvent){R=YAHOO.util.Event.getTarget(this.currentEvent);
|
(function(){var b=YAHOO.util.Dom,a=YAHOO.util.Event,c=YAHOO.lang;if(YAHOO.widget.Button){YAHOO.widget.ToolbarButtonAdvanced=YAHOO.widget.Button;YAHOO.widget.ToolbarButtonAdvanced.prototype.buttonType="rich";YAHOO.widget.ToolbarButtonAdvanced.prototype.checkValue=function(f){var e=this.getMenu().getItems();if(e.length===0){this.getMenu()._onBeforeShow();e=this.getMenu().getItems()}for(var d=0;d<e.length;d++){e[d].cfg.setProperty("checked",false);if(e[d].value==f){e[d].cfg.setProperty("checked",true)}}}}else{YAHOO.widget.ToolbarButtonAdvanced=function(){}}YAHOO.widget.ToolbarButton=function(e,d){if(c.isObject(arguments[0])&&!b.get(e).nodeType){d=e}var g=(d||{});var f={element:null,attributes:g};if(!f.attributes.type){f.attributes.type="push"}f.element=document.createElement("span");f.element.setAttribute("unselectable","on");f.element.className="yui-button yui-"+f.attributes.type+"-button";f.element.innerHTML='<span class="first-child"><a href="#">LABEL</a></span>';f.element.firstChild.firstChild.tabIndex="-1";f.attributes.id=b.generateId();YAHOO.widget.ToolbarButton.superclass.constructor.call(this,f.element,f.attributes)};YAHOO.extend(YAHOO.widget.ToolbarButton,YAHOO.util.Element,{buttonType:"normal",_handleMouseOver:function(){if(!this.get("disabled")){this.addClass("yui-button-hover");this.addClass("yui-"+this.get("type")+"-button-hover")}},_handleMouseOut:function(){this.removeClass("yui-button-hover");this.removeClass("yui-"+this.get("type")+"-button-hover")},checkValue:function(f){if(this.get("type")=="menu"){var e=this._button.options;for(var d=0;d<e.length;d++){if(e[d].value==f){e.selectedIndex=d}}}},init:function(e,d){YAHOO.widget.ToolbarButton.superclass.init.call(this,e,d);this.on("mouseover",this._handleMouseOver,this,true);this.on("mouseout",this._handleMouseOut,this,true)},initAttributes:function(d){YAHOO.widget.ToolbarButton.superclass.initAttributes.call(this,d);this.setAttributeConfig("value",{value:d.value});this.setAttributeConfig("menu",{value:d.menu||false});this.setAttributeConfig("type",{value:d.type,writeOnce:true,method:function(h){var g,f;if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0]}switch(h){case"select":case"menu":g=document.createElement("select");var j=this.get("menu");for(var e=0;e<j.length;e++){f=document.createElement("option");f.innerHTML=j[e].text;f.value=j[e].value;if(j[e].checked){f.selected=true}g.appendChild(f)}this._button.parentNode.replaceChild(g,this._button);a.on(g,"change",this._handleSelect,this,true);this._button=g;break}}});this.setAttributeConfig("disabled",{value:d.disabled||false,method:function(e){if(e){this.addClass("yui-button-disabled");this.addClass("yui-"+this.get("type")+"-button-disabled")}else{this.removeClass("yui-button-disabled");this.removeClass("yui-"+this.get("type")+"-button-disabled")}if(this.get("type")=="menu"){this._button.disabled=e}}});this.setAttributeConfig("label",{value:d.label,method:function(e){if(!this._button){this._button=this.get("element").getElementsByTagName("a")[0]}if(this.get("type")=="push"){this._button.innerHTML=e}}});this.setAttributeConfig("title",{value:d.title});this.setAttributeConfig("container",{value:null,writeOnce:true,method:function(e){this.appendTo(e)}})},_handleSelect:function(e){var d=a.getTarget(e);var f=d.options[d.selectedIndex].value;this.fireEvent("change",{type:"change",value:f})},getMenu:function(){return this.get("menu")},destroy:function(){a.purgeElement(this.get("element"),true);this.get("element").parentNode.removeChild(this.get("element"));for(var d in this){if(c.hasOwnProperty(this,d)){this[d]=null}}},fireEvent:function(e,d){if(this.DOM_EVENTS[e]&&this.get("disabled")){return}YAHOO.widget.ToolbarButton.superclass.fireEvent.call(this,e,d)},toString:function(){return"ToolbarButton ("+this.get("id")+")"}})})();(function(){var c=YAHOO.util.Dom,a=YAHOO.util.Event,d=YAHOO.lang;var b=function(f){var e=f;if(d.isString(f)){e=this.getButtonById(f)}if(d.isNumber(f)){e=this.getButtonByIndex(f)}if((!(e instanceof YAHOO.widget.ToolbarButton))&&(!(e instanceof YAHOO.widget.ToolbarButtonAdvanced))){e=this.getButtonByValue(f)}if((e instanceof YAHOO.widget.ToolbarButton)||(e instanceof YAHOO.widget.ToolbarButtonAdvanced)){return e}return false};YAHOO.widget.Toolbar=function(i,h){if(d.isObject(arguments[0])&&!c.get(i).nodeType){h=i}var k={};if(h){d.augmentObject(k,h)}var j={element:null,attributes:k};if(d.isString(i)&&c.get(i)){j.element=c.get(i)}else{if(d.isObject(i)&&c.get(i)&&c.get(i).nodeType){j.element=c.get(i)}}if(!j.element){j.element=document.createElement("DIV");j.element.id=c.generateId();if(k.container&&c.get(k.container)){c.get(k.container).appendChild(j.element)}}if(!j.element.id){j.element.id=((d.isString(i))?i:c.generateId())}var f=document.createElement("fieldset");var g=document.createElement("legend");g.innerHTML="Toolbar";f.appendChild(g);var e=document.createElement("DIV");j.attributes.cont=e;c.addClass(e,"yui-toolbar-subcont");f.appendChild(e);j.element.appendChild(f);j.element.tabIndex=-1;j.attributes.element=j.element;j.attributes.id=j.element.id;YAHOO.widget.Toolbar.superclass.constructor.call(this,j.element,j.attributes)};YAHOO.extend(YAHOO.widget.Toolbar,YAHOO.util.Element,{_addMenuClasses:function(h,e,j){c.addClass(this.element,"yui-toolbar-"+j.get("value")+"-menu");if(c.hasClass(j._button.parentNode.parentNode,"yui-toolbar-select")){c.addClass(this.element,"yui-toolbar-select-menu")}var f=this.getItems();for(var g=0;g<f.length;g++){c.addClass(f[g].element,"yui-toolbar-"+j.get("value")+"-"+((f[g].value)?f[g].value.replace(/ /g,"-").toLowerCase():f[g]._oText.nodeValue.replace(/ /g,"-").toLowerCase()));c.addClass(f[g].element,"yui-toolbar-"+j.get("value")+"-"+((f[g].value)?f[g].value.replace(/ /g,"-"):f[g]._oText.nodeValue.replace(/ /g,"-")))}},buttonType:YAHOO.widget.ToolbarButton,dd:null,_colorData:{"#111111":"Obsidian","#2D2D2D":"Dark Gray","#434343":"Shale","#5B5B5B":"Flint","#737373":"Gray","#8B8B8B":"Concrete","#A2A2A2":"Gray","#B9B9B9":"Titanium","#000000":"Black","#D0D0D0":"Light Gray","#E6E6E6":"Silver","#FFFFFF":"White","#BFBF00":"Pumpkin","#FFFF00":"Yellow","#FFFF40":"Banana","#FFFF80":"Pale Yellow","#FFFFBF":"Butter","#525330":"Raw Siena","#898A49":"Mildew","#AEA945":"Olive","#7F7F00":"Paprika","#C3BE71":"Earth","#E0DCAA":"Khaki","#FCFAE1":"Cream","#60BF00":"Cactus","#80FF00":"Chartreuse","#A0FF40":"Green","#C0FF80":"Pale Lime","#DFFFBF":"Light Mint","#3B5738":"Green","#668F5A":"Lime Gray","#7F9757":"Yellow","#407F00":"Clover","#8A9B55":"Pistachio","#B7C296":"Light Jade","#E6EBD5":"Breakwater","#00BF00":"Spring Frost","#00FF80":"Pastel Green","#40FFA0":"Light Emerald","#80FFC0":"Sea Foam","#BFFFDF":"Sea Mist","#033D21":"Dark Forrest","#438059":"Moss","#7FA37C":"Medium Green","#007F40":"Pine","#8DAE94":"Yellow Gray Green","#ACC6B5":"Aqua Lung","#DDEBE2":"Sea Vapor","#00BFBF":"Fog","#00FFFF":"Cyan","#40FFFF":"Turquoise Blue","#80FFFF":"Light Aqua","#BFFFFF":"Pale Cyan","#033D3D":"Dark Teal","#347D7E":"Gray Turquoise","#609A9F":"Green Blue","#007F7F":"Seaweed","#96BDC4":"Green Gray","#B5D1D7":"Soapstone","#E2F1F4":"Light Turquoise","#0060BF":"Summer Sky","#0080FF":"Sky Blue","#40A0FF":"Electric Blue","#80C0FF":"Light Azure","#BFDFFF":"Ice Blue","#1B2C48":"Navy","#385376":"Biscay","#57708F":"Dusty Blue","#00407F":"Sea Blue","#7792AC":"Sky Blue Gray","#A8BED1":"Morning Sky","#DEEBF6":"Vapor","#0000BF":"Deep Blue","#0000FF":"Blue","#4040FF":"Cerulean Blue","#8080FF":"Evening Blue","#BFBFFF":"Light Blue","#212143":"Deep Indigo","#373E68":"Sea Blue","#444F75":"Night Blue","#00007F":"Indigo Blue","#585E82":"Dockside","#8687A4":"Blue Gray","#D2D1E1":"Light Blue Gray","#6000BF":"Neon Violet","#8000FF":"Blue Violet","#A040FF":"Violet Purple","#C080FF":"Violet Dusk","#DFBFFF":"Pale Lavender","#302449":"Cool Shale","#54466F":"Dark Indigo","#655A7F":"Dark Violet","#40007F":"Violet","#726284":"Smoky Violet","#9E8FA9":"Slate Gray","#DCD1DF":"Violet White","#BF00BF":"Royal Violet","#FF00FF":"Fuchsia","#FF40FF":"Magenta","#FF80FF":"Orchid","#FFBFFF":"Pale Magenta","#4A234A":"Dark Purple","#794A72":"Medium Purple","#936386":"Cool Granite","#7F007F":"Purple","#9D7292":"Purple Moon","#C0A0B6":"Pale Purple","#ECDAE5":"Pink Cloud","#BF005F":"Hot Pink","#FF007F":"Deep Pink","#FF409F":"Grape","#FF80BF":"Electric Pink","#FFBFDF":"Pink","#451528":"Purple Red","#823857":"Purple Dino","#A94A76":"Purple Gray","#7F003F":"Rose","#BC6F95":"Antique Mauve","#D8A5BB":"Cool Marble","#F7DDE9":"Pink Granite","#C00000":"Apple","#FF0000":"Fire Truck","#FF4040":"Pale Red","#FF8080":"Salmon","#FFC0C0":"Warm Pink","#441415":"Sepia","#82393C":"Rust","#AA4D4E":"Brick","#800000":"Brick Red","#BC6E6E":"Mauve","#D8A3A4":"Shrimp Pink","#F8DDDD":"Shell Pink","#BF5F00":"Dark Orange","#FF7F00":"Orange","#FF9F40":"Grapefruit","#FFBF80":"Canteloupe","#FFDFBF":"Wax","#482C1B":"Dark Brick","#855A40":"Dirt","#B27C51":"Tan","#7F3F00":"Nutmeg","#C49B71":"Mustard","#E1C4A8":"Pale Tan","#FDEEE0":"Marble"},_colorPicker:null,STR_COLLAPSE:"Collapse Toolbar",STR_SPIN_LABEL:"Spin Button with value {VALUE}. Use Control Shift Up Arrow and Control Shift Down arrow keys to increase or decrease the value.",STR_SPIN_UP:"Click to increase the value of this input",STR_SPIN_DOWN:"Click to decrease the value of this input",_titlebar:null,browser:YAHOO.env.ua,_buttonList:null,_buttonGroupList:null,_sep:null,_sepCount:null,_dragHandle:null,_toolbarConfigs:{renderer:true},CLASS_CONTAINER:"yui-toolbar-container",CLASS_DRAGHANDLE:"yui-toolbar-draghandle",CLASS_SEPARATOR:"yui-toolbar-separator",CLASS_DISABLED:"yui-toolbar-disabled",CLASS_PREFIX:"yui-toolbar",init:function(f,e){YAHOO.widget.Toolbar.superclass.init.call(this,f,e)},initAttributes:function(e){YAHOO.widget.Toolbar.superclass.initAttributes.call(this,e);this.addClass(this.CLASS_CONTAINER);this.setAttributeConfig("buttonType",{value:e.buttonType||"basic",writeOnce:true,validator:function(f){switch(f){case"advanced":case"basic":return true}return false},method:function(f){if(f=="advanced"){if(YAHOO.widget.Button){this.buttonType=YAHOO.widget.ToolbarButtonAdvanced}else{this.buttonType=YAHOO.widget.ToolbarButton}}else{this.buttonType=YAHOO.widget.ToolbarButton}}});this.setAttributeConfig("buttons",{value:[],writeOnce:true,method:function(g){for(var f in g){if(d.hasOwnProperty(g,f)){if(g[f].type=="separator"){this.addSeparator()}else{if(g[f].group!==undefined){this.addButtonGroup(g[f])}else{this.addButton(g[f])}}}}}});this.setAttributeConfig("disabled",{value:false,method:function(f){if(this.get("disabled")===f){return false}if(f){this.addClass(this.CLASS_DISABLED);this.set("draggable",false);this.disableAllButtons()}else{this.removeClass(this.CLASS_DISABLED);if(this._configs.draggable._initialConfig.value){this.set("draggable",true)}this.resetAllButtons()}}});this.setAttributeConfig("cont",{value:e.cont,readOnly:true});this.setAttributeConfig("grouplabels",{value:((e.grouplabels===false)?false:true),method:function(f){if(f){c.removeClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"))}else{c.addClass(this.get("cont"),(this.CLASS_PREFIX+"-nogrouplabels"))}}});this.setAttributeConfig("titlebar",{value:false,method:function(g){if(g){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar)}this._titlebar=document.createElement("DIV");this._titlebar.tabIndex="-1";a.on(this._titlebar,"focus",function(){this._handleFocus()},this,true);c.addClass(this._titlebar,this.CLASS_PREFIX+"-titlebar");if(d.isString(g)){var f=document.createElement("h2");f.tabIndex="-1";f.innerHTML='<a href="#" tabIndex="0">'+g+"</a>";this._titlebar.appendChild(f);a.on(f.firstChild,"click",function(h){a.stopEvent(h)});a.on([f,f.firstChild],"focus",function(){this._handleFocus()},this,true)}if(this.get("firstChild")){this.insertBefore(this._titlebar,this.get("firstChild"))}else{this.appendChild(this._titlebar)}if(this.get("collapse")){this.set("collapse",true)}}else{if(this._titlebar){if(this._titlebar&&this._titlebar.parentNode){this._titlebar.parentNode.removeChild(this._titlebar)}}}}});this.setAttributeConfig("collapse",{value:false,method:function(h){if(this._titlebar){var g=null;var f=c.getElementsByClassName("collapse","span",this._titlebar);if(h){if(f.length>0){return true}g=document.createElement("SPAN");g.innerHTML="X";g.title=this.STR_COLLAPSE;c.addClass(g,"collapse");this._titlebar.appendChild(g);a.addListener(g,"click",function(){if(c.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false)}else{this.collapse()}},this,true)}else{g=c.getElementsByClassName("collapse","span",this._titlebar);if(g[0]){if(c.hasClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed")){this.collapse(false)}g[0].parentNode.removeChild(g[0])}}}}});this.setAttributeConfig("draggable",{value:(e.draggable||false),method:function(f){if(f&&!this.get("titlebar")){if(!this._dragHandle){this._dragHandle=document.createElement("SPAN");this._dragHandle.innerHTML="|";this._dragHandle.setAttribute("title","Click to drag the toolbar");this._dragHandle.id=this.get("id")+"_draghandle";c.addClass(this._dragHandle,this.CLASS_DRAGHANDLE);if(this.get("cont").hasChildNodes()){this.get("cont").insertBefore(this._dragHandle,this.get("cont").firstChild)}else{this.get("cont").appendChild(this._dragHandle)}this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._dragHandle.id)}}else{if(this._dragHandle){this._dragHandle.parentNode.removeChild(this._dragHandle);this._dragHandle=null;this.dd=null}}if(this._titlebar){if(f){this.dd=new YAHOO.util.DD(this.get("id"));this.dd.setHandleElId(this._titlebar);c.addClass(this._titlebar,"draggable")}else{c.removeClass(this._titlebar,"draggable");if(this.dd){this.dd.unreg();this.dd=null}}}},validator:function(g){var f=true;if(!YAHOO.util.DD){f=false}return f}})},addButtonGroup:function(j){if(!this.get("element")){this._queue[this._queue.length]=["addButtonGroup",arguments];return false}if(!this.hasClass(this.CLASS_PREFIX+"-grouped")){this.addClass(this.CLASS_PREFIX+"-grouped")}var k=document.createElement("DIV");c.addClass(k,this.CLASS_PREFIX+"-group");c.addClass(k,this.CLASS_PREFIX+"-group-"+j.group);if(j.label){var f=document.createElement("h3");f.innerHTML=j.label;k.appendChild(f)}if(!this.get("grouplabels")){c.addClass(this.get("cont"),this.CLASS_PREFIX,"-nogrouplabels")}this.get("cont").appendChild(k);var h=document.createElement("ul");k.appendChild(h);if(!this._buttonGroupList){this._buttonGroupList={}}this._buttonGroupList[j.group]=h;for(var g=0;g<j.buttons.length;g++){var e=document.createElement("li");e.className=this.CLASS_PREFIX+"-groupitem";h.appendChild(e);if((j.buttons[g].type!==undefined)&&j.buttons[g].type=="separator"){this.addSeparator(e)}else{j.buttons[g].container=e;this.addButton(j.buttons[g])}}},addButtonToGroup:function(g,h,i){var f=this._buttonGroupList[h];var e=document.createElement("li");e.className=this.CLASS_PREFIX+"-groupitem";g.container=e;this.addButton(g,i);f.appendChild(e)},addButton:function(k,j){if(!this.get("element")){this._queue[this._queue.length]=["addButton",arguments];return false}if(!this._buttonList){this._buttonList=[]}if(!k.container){k.container=this.get("cont")}if((k.type=="menu")||(k.type=="split")||(k.type=="select")){if(d.isArray(k.menu)){for(var s in k.menu){if(d.hasOwnProperty(k.menu,s)){var y={fn:function(o,i,m){if(!k.menucmd){k.menucmd=k.value}k.value=((m.value)?m.value:m._oText.nodeValue)},scope:this};k.menu[s].onclick=y}}}}var t={},q=false;for(var n in k){if(d.hasOwnProperty(k,n)){if(!this._toolbarConfigs[n]){t[n]=k[n]}}}if(k.type=="select"){t.type="menu"}if(k.type=="spin"){t.type="push"}if(t.type=="color"){if(YAHOO.widget.Overlay){t=this._makeColorButton(t)}else{q=true}}if(t.menu){if((YAHOO.widget.Overlay)&&(k.menu instanceof YAHOO.widget.Overlay)){k.menu.showEvent.subscribe(function(){this._button=t})}else{for(var r=0;r<t.menu.length;r++){if(!t.menu[r].value){t.menu[r].value=t.menu[r].text}}if(this.browser.webkit){t.focusmenu=false}}}if(q){k=false}else{this._configs.buttons.value[this._configs.buttons.value.length]=k;var w=new this.buttonType(t);w.get("element").tabIndex="-1";w.get("element").setAttribute("role","button");w._selected=true;if(this.get("disabled")){w.set("disabled",true)}if(!k.id){k.id=w.get("id")}if(j){var f=w.get("element");var p=null;if(j.get){p=j.get("element").nextSibling}else{if(j.nextSibling){p=j.nextSibling}}if(p){p.parentNode.insertBefore(f,p)}}w.addClass(this.CLASS_PREFIX+"-"+w.get("value"));var v=document.createElement("span");v.className=this.CLASS_PREFIX+"-icon";w.get("element").insertBefore(v,w.get("firstChild"));if(w._button.tagName.toLowerCase()=="button"){w.get("element").setAttribute("unselectable","on");var x=document.createElement("a");x.innerHTML=w._button.innerHTML;x.href="#";x.tabIndex="-1";a.on(x,"click",function(i){a.stopEvent(i)});w._button.parentNode.replaceChild(x,w._button);w._button=x}if(k.type=="select"){if(w._button.tagName.toLowerCase()=="select"){v.parentNode.removeChild(v);var g=w._button;var u=w.get("element");u.parentNode.replaceChild(g,u)}else{w.addClass(this.CLASS_PREFIX+"-select")}}if(k.type=="spin"){if(!d.isArray(k.range)){k.range=[10,100]}this._makeSpinButton(w,k)}w.get("element").setAttribute("title",w.get("label"));if(k.type!="spin"){if((YAHOO.widget.Overlay)&&(t.menu instanceof YAHOO.widget.Overlay)){var h=function(o){var i=true;if(o.keyCode&&(o.keyCode==9)){i=false}if(i){if(this._colorPicker){this._colorPicker._button=k.value}var m=w.getMenu().element;if(c.getStyle(m,"visibility")=="hidden"){w.getMenu().show()}else{w.getMenu().hide()}}YAHOO.util.Event.stopEvent(o)};w.on("mousedown",h,k,this);w.on("keydown",h,k,this)}else{if((k.type!="menu")&&(k.type!="select")){w.on("keypress",this._buttonClick,k,this);w.on("mousedown",function(i){YAHOO.util.Event.stopEvent(i);this._buttonClick(i,k)},k,this);w.on("click",function(i){YAHOO.util.Event.stopEvent(i)})}else{w.on("mousedown",function(i){YAHOO.util.Event.stopEvent(i)});w.on("click",function(i){YAHOO.util.Event.stopEvent(i)});w.on("change",function(i){if(!k.menucmd){k.menucmd=k.value}k.value=i.value;this._buttonClick(i,k)},this,true);var l=this;w.on("appendTo",function(){var i=this;if(i.getMenu()&&i.getMenu().mouseDownEvent){i.getMenu().mouseDownEvent.subscribe(function(z,o){var m=o[1];YAHOO.util.Event.stopEvent(o[0]);i._onMenuClick(o[0],i);if(!k.menucmd){k.menucmd=k.value}k.value=((m.value)?m.value:m._oText.nodeValue);l._buttonClick.call(l,o[1],k);i._hideMenu();return false});i.getMenu().clickEvent.subscribe(function(o,m){YAHOO.util.Event.stopEvent(m[0])});i.getMenu().mouseUpEvent.subscribe(function(o,m){YAHOO.util.Event.stopEvent(m[0])})}})}}}else{w.on("mousedown",function(i){YAHOO.util.Event.stopEvent(i)});w.on("click",function(i){YAHOO.util.Event.stopEvent(i)})}if(this.browser.ie){}if(this.browser.webkit){w.hasFocus=function(){return true}}this._buttonList[this._buttonList.length]=w;if((k.type=="menu")||(k.type=="split")||(k.type=="select")){if(d.isArray(k.menu)){var e=w.getMenu();if(e&&e.renderEvent){e.renderEvent.subscribe(this._addMenuClasses,w);if(k.renderer){e.renderEvent.subscribe(k.renderer,w)}}}}}return k},addSeparator:function(e,h){if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false}var f=((e)?e:this.get("cont"));if(!this.get("element")){this._queue[this._queue.length]=["addSeparator",arguments];return false}if(this._sepCount===null){this._sepCount=0}if(!this._sep){this._sep=document.createElement("SPAN");c.addClass(this._sep,this.CLASS_SEPARATOR);this._sep.innerHTML="|"}var g=this._sep.cloneNode(true);this._sepCount++;c.addClass(g,this.CLASS_SEPARATOR+"-"+this._sepCount);if(h){var i=null;if(h.get){i=h.get("element").nextSibling}else{if(h.nextSibling){i=h.nextSibling}else{i=h}}if(i){if(i==h){i.parentNode.appendChild(g)}else{i.parentNode.insertBefore(g,i)}}}else{f.appendChild(g)}return g},_createColorPicker:function(h){if(c.get(h+"_colors")){c.get(h+"_colors").parentNode.removeChild(c.get(h+"_colors"))}var e=document.createElement("div");e.className="yui-toolbar-colors";e.id=h+"_colors";e.style.display="none";a.on(window,"load",function(){document.body.appendChild(e)},this,true);this._colorPicker=e;var g="";for(var f in this._colorData){if(d.hasOwnProperty(this._colorData,f)){g+='<a style="background-color: '+f+'" href="#">'+f.replace("#","")+"</a>"}}g+="<span><em>X</em><strong></strong></span>";window.setTimeout(function(){e.innerHTML=g},0);a.on(e,"mouseover",function(m){var k=this._colorPicker;var l=k.getElementsByTagName("em")[0];var j=k.getElementsByTagName("strong")[0];var i=a.getTarget(m);if(i.tagName.toLowerCase()=="a"){l.style.backgroundColor=i.style.backgroundColor;j.innerHTML=this._colorData["#"+i.innerHTML]+"<br>"+i.innerHTML}},this,true);a.on(e,"focus",function(i){a.stopEvent(i)});a.on(e,"click",function(i){a.stopEvent(i)});a.on(e,"mousedown",function(j){a.stopEvent(j);var i=a.getTarget(j);if(i.tagName.toLowerCase()=="a"){var l=this.fireEvent("colorPickerClicked",{type:"colorPickerClicked",target:this,button:this._colorPicker._button,color:i.innerHTML,colorName:this._colorData["#"+i.innerHTML]});if(l!==false){var k={color:i.innerHTML,colorName:this._colorData["#"+i.innerHTML],value:this._colorPicker._button};this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:k})}this.getButtonByValue(this._colorPicker._button).getMenu().hide()}},this,true)},_resetColorPicker:function(){var f=this._colorPicker.getElementsByTagName("em")[0];var e=this._colorPicker.getElementsByTagName("strong")[0];f.style.backgroundColor="transparent";e.innerHTML=""},_makeColorButton:function(e){if(!this._colorPicker){this._createColorPicker(this.get("id"))}e.type="color";e.menu=new YAHOO.widget.Overlay(this.get("id")+"_"+e.value+"_menu",{visible:false,position:"absolute",iframe:true});e.menu.setBody("");e.menu.render(this.get("cont"));c.addClass(e.menu.element,"yui-button-menu");c.addClass(e.menu.element,"yui-color-button-menu");e.menu.beforeShowEvent.subscribe(function(){e.menu.cfg.setProperty("zindex",5);e.menu.cfg.setProperty("context",[this.getButtonById(e.id).get("element"),"tl","bl"]);this._resetColorPicker();var f=this._colorPicker;if(f.parentNode){f.parentNode.removeChild(f)}e.menu.setBody("");e.menu.appendToBody(f);this._colorPicker.style.display="block"},this,true);return e},_makeSpinButton:function(r,l){r.addClass(this.CLASS_PREFIX+"-spinbutton");var s=this,n=r._button.parentNode.parentNode,i=l.range,h=document.createElement("a"),g=document.createElement("a");h.href="#";g.href="#";h.tabIndex="-1";g.tabIndex="-1";h.className="up";h.title=this.STR_SPIN_UP;h.innerHTML=this.STR_SPIN_UP;g.className="down";g.title=this.STR_SPIN_DOWN;g.innerHTML=this.STR_SPIN_DOWN;n.appendChild(h);n.appendChild(g);var m=YAHOO.lang.substitute(this.STR_SPIN_LABEL,{VALUE:r.get("label")});r.set("title",m);var q=function(t){t=((t<i[0])?i[0]:t);t=((t>i[1])?i[1]:t);return t};var p=this.browser;var f=false;var k=this.STR_SPIN_LABEL;if(this._titlebar&&this._titlebar.firstChild){f=this._titlebar.firstChild}var e=function(u){YAHOO.util.Event.stopEvent(u);if(!r.get("disabled")&&(u.keyCode!=9)){var v=parseInt(r.get("label"),10);v++;v=q(v);r.set("label",""+v);var t=YAHOO.lang.substitute(k,{VALUE:r.get("label")});r.set("title",t);if(!p.webkit&&f){}s._buttonClick(u,l)}};var o=function(u){YAHOO.util.Event.stopEvent(u);if(!r.get("disabled")&&(u.keyCode!=9)){var v=parseInt(r.get("label"),10);v--;v=q(v);r.set("label",""+v);var t=YAHOO.lang.substitute(k,{VALUE:r.get("label")});r.set("title",t);if(!p.webkit&&f){}s._buttonClick(u,l)}};var j=function(t){if(t.keyCode==38){e(t)}else{if(t.keyCode==40){o(t)}else{if(t.keyCode==107&&t.shiftKey){e(t)}else{if(t.keyCode==109&&t.shiftKey){o(t)}}}}};r.on("keydown",j,this,true);a.on(h,"mousedown",function(t){a.stopEvent(t)},this,true);a.on(g,"mousedown",function(t){a.stopEvent(t)},this,true);a.on(h,"click",e,this,true);a.on(g,"click",o,this,true)},_buttonClick:function(n,f){var e=true;if(n&&n.type=="keypress"){if(n.keyCode==9){e=false}else{if((n.keyCode===13)||(n.keyCode===0)||(n.keyCode===32)){}else{e=false}}}if(e){var p=true,h=false;f.isSelected=this.isSelected(f.id);if(f.value){h=this.fireEvent(f.value+"Click",{type:f.value+"Click",target:this.get("element"),button:f});if(h===false){p=false}}if(f.menucmd&&p){h=this.fireEvent(f.menucmd+"Click",{type:f.menucmd+"Click",target:this.get("element"),button:f});if(h===false){p=false}}if(p){this.fireEvent("buttonClick",{type:"buttonClick",target:this.get("element"),button:f})}if(f.type=="select"){var l=this.getButtonById(f.id);if(l.buttonType=="rich"){var k=f.value;for(var j=0;j<f.menu.length;j++){if(f.menu[j].value==f.value){k=f.menu[j].text;break}}l.set("label",'<span class="yui-toolbar-'+f.menucmd+"-"+(f.value).replace(/ /g,"-").toLowerCase()+'">'+k+"</span>");var o=l.getMenu().getItems();for(var g=0;g<o.length;g++){if(o[g].value.toLowerCase()==f.value.toLowerCase()){o[g].cfg.setProperty("checked",true)}else{o[g].cfg.setProperty("checked",false)}}}}if(n){a.stopEvent(n)}}},_keyNav:null,_navCounter:null,_navigateButtons:function(f){switch(f.keyCode){case 37:case 39:if(f.keyCode==37){this._navCounter--}else{this._navCounter++}if(this._navCounter>(this._buttonList.length-1)){this._navCounter=0}if(this._navCounter<0){this._navCounter=(this._buttonList.length-1)}if(this._buttonList[this._navCounter]){var e=this._buttonList[this._navCounter].get("element");if(this.browser.ie){e=this._buttonList[this._navCounter].get("element").getElementsByTagName("a")[0]}if(this._buttonList[this._navCounter].get("disabled")){this._navigateButtons(f)}else{e.focus()}}break}},_handleFocus:function(){if(!this._keyNav){var e="keypress";if(this.browser.ie){e="keydown"}a.on(this.get("element"),e,this._navigateButtons,this,true);this._keyNav=true;this._navCounter=-1}},getButtonById:function(g){var e=this._buttonList.length;for(var f=0;f<e;f++){if(this._buttonList[f]&&this._buttonList[f].get("id")==g){return this._buttonList[f]}}return false},getButtonByValue:function(n){var h=this.get("buttons");var f=h.length;for(var k=0;k<f;k++){if(h[k].group!==undefined){for(var e=0;e<h[k].buttons.length;e++){if((h[k].buttons[e].value==n)||(h[k].buttons[e].menucmd==n)){return this.getButtonById(h[k].buttons[e].id)}if(h[k].buttons[e].menu){for(var l=0;l<h[k].buttons[e].menu.length;l++){if(h[k].buttons[e].menu[l].value==n){return this.getButtonById(h[k].buttons[e].id)}}}}}else{if((h[k].value==n)||(h[k].menucmd==n)){return this.getButtonById(h[k].id)}if(h[k].menu){for(var g=0;g<h[k].menu.length;g++){if(h[k].menu[g].value==n){return this.getButtonById(h[k].id)}}}}}return false},getButtonByIndex:function(e){if(this._buttonList[e]){return this._buttonList[e]}else{return false}},getButtons:function(){return this._buttonList},disableButton:function(f){var e=b.call(this,f);if(e){e.set("disabled",true)}else{return false}},enableButton:function(f){if(this.get("disabled")){return false}var e=b.call(this,f);if(e){if(e.get("disabled")){e.set("disabled",false)}}else{return false}},isSelected:function(f){var e=b.call(this,f);if(e){return e._selected}return false},selectButton:function(i,g){var f=b.call(this,i);if(f){f.addClass("yui-button-selected");f.addClass("yui-button-"+f.get("value")+"-selected");f._selected=true;if(g){if(f.buttonType=="rich"){var h=f.getMenu().getItems();for(var e=0;e<h.length;e++){if(h[e].value==g){h[e].cfg.setProperty("checked",true);f.set("label",'<span class="yui-toolbar-'+f.get("value")+"-"+(g).replace(/ /g,"-").toLowerCase()+'">'+h[e]._oText.nodeValue+"</span>")}else{h[e].cfg.setProperty("checked",false)}}}}}else{return false}},deselectButton:function(f){var e=b.call(this,f);if(e){e.removeClass("yui-button-selected");e.removeClass("yui-button-"+e.get("value")+"-selected");e.removeClass("yui-button-hover");e._selected=false}else{return false}},deselectAllButtons:function(){var e=this._buttonList.length;for(var f=0;f<e;f++){this.deselectButton(this._buttonList[f])}},disableAllButtons:function(){if(this.get("disabled")){return false}var e=this._buttonList.length;for(var f=0;f<e;f++){this.disableButton(this._buttonList[f])}},enableAllButtons:function(){if(this.get("disabled")){return false}var e=this._buttonList.length;for(var f=0;f<e;f++){this.enableButton(this._buttonList[f])}},resetAllButtons:function(j){if(!d.isObject(j)){j={}}if(this.get("disabled")){return false}var e=this._buttonList.length;for(var f=0;f<e;f++){var h=this._buttonList[f];if(h){var g=h._configs.disabled._initialConfig.value;if(j[h.get("id")]){this.enableButton(h);this.selectButton(h)}else{if(g){this.disableButton(h)}else{this.enableButton(h)}this.deselectButton(h)}}}},destroyButton:function(j){var g=b.call(this,j);if(g){var h=g.get("id");g.destroy();var e=this._buttonList.length;for(var f=0;f<e;f++){if(this._buttonList[f]&&this._buttonList[f].get("id")==h){this._buttonList[f]=null}}}else{return false}},destroy:function(){this.get("element").innerHTML="";this.get("element").className="";for(var e in this){if(d.hasOwnProperty(this,e)){this[e]=null}}return true},collapse:function(f){var e=c.getElementsByClassName("collapse","span",this._titlebar);if(f===false){c.removeClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");if(e[0]){c.removeClass(e[0],"collapsed")}this.fireEvent("toolbarExpanded",{type:"toolbarExpanded",target:this})}else{if(e[0]){c.addClass(e[0],"collapsed")}c.addClass(this.get("cont").parentNode,"yui-toolbar-container-collapsed");this.fireEvent("toolbarCollapsed",{type:"toolbarCollapsed",target:this})}},toString:function(){return"Toolbar (#"+this.get("element").id+") with "+this._buttonList.length+" buttons."}})})();(function(){var c=YAHOO.util.Dom,a=YAHOO.util.Event,d=YAHOO.lang,b=YAHOO.widget.Toolbar;YAHOO.widget.SimpleEditor=function(h,m){var g={};if(d.isObject(h)&&(!h.tagName)&&!m){d.augmentObject(g,h);h=document.createElement("textarea");this.DOMReady=true;if(g.container){var k=c.get(g.container);k.appendChild(h)}else{document.body.appendChild(h)}}else{if(m){d.augmentObject(g,m)}}var i={element:null,attributes:g},f=null;if(d.isString(h)){f=h}else{if(i.attributes.id){f=i.attributes.id}else{this.DOMReady=true;f=c.generateId(h)}}i.element=h;var j=document.createElement("DIV");i.attributes.element_cont=new YAHOO.util.Element(j,{id:f+"_container"});var e=document.createElement("div");c.addClass(e,"first-child");i.attributes.element_cont.appendChild(e);if(!i.attributes.toolbar_cont){i.attributes.toolbar_cont=document.createElement("DIV");i.attributes.toolbar_cont.id=f+"_toolbar";e.appendChild(i.attributes.toolbar_cont)}var l=document.createElement("DIV");e.appendChild(l);i.attributes.editor_wrapper=l;YAHOO.widget.SimpleEditor.superclass.constructor.call(this,i.element,i.attributes)};YAHOO.extend(YAHOO.widget.SimpleEditor,YAHOO.util.Element,{_resizeConfig:{handles:["br"],autoRatio:true,status:true,proxy:true,useShim:true,setSize:false},_setupResize:function(){if(!YAHOO.util.DD||!YAHOO.util.Resize){return false}if(this.get("resize")){var e={};d.augmentObject(e,this._resizeConfig);this.resize=new YAHOO.util.Resize(this.get("element_cont").get("element"),e);this.resize.on("resize",function(g){var l=this.get("animate");this.set("animate",false);this.set("width",g.width+"px");var i=g.height,j=(this.toolbar.get("element").clientHeight+2),k=0;if(this.dompath){k=(this.dompath.clientHeight+1)}var f=(i-j-k);this.set("height",f+"px");this.get("element_cont").setStyle("height","");this.set("animate",l)},this,true)}},resize:null,_setupDD:function(){if(!YAHOO.util.DD){return false}if(this.get("drag")){var f=this.get("drag"),e=YAHOO.util.DD;if(f==="proxy"){e=YAHOO.util.DDProxy}this.dd=new e(this.get("element_cont").get("element"));this.toolbar.addClass("draggable");this.dd.setHandleElId(this.toolbar._titlebar)}},dd:null,_lastCommand:null,_undoNodeChange:function(){},_storeUndo:function(){},_checkKey:function(f,j){var g=false;if((j.keyCode===f.key)){if(f.mods&&(f.mods.length>0)){var l=0;for(var h=0;h<f.mods.length;h++){if(this.browser.mac){if(f.mods[h]=="ctrl"){f.mods[h]="meta"}}if(j[f.mods[h]+"Key"]===true){l++}}if(l===f.mods.length){g=true}}else{g=true}}return g},_keyMap:{SELECT_ALL:{key:65,mods:["ctrl"]},CLOSE_WINDOW:{key:87,mods:["shift","ctrl"]},FOCUS_TOOLBAR:{key:27,mods:["shift"]},FOCUS_AFTER:{key:27},CREATE_LINK:{key:76,mods:["shift","ctrl"]},BOLD:{key:66,mods:["shift","ctrl"]},ITALIC:{key:73,mods:["shift","ctrl"]},UNDERLINE:{key:85,mods:["shift","ctrl"]},UNDO:{key:90,mods:["ctrl"]},REDO:{key:90,mods:["shift","ctrl"]},JUSTIFY_LEFT:{key:219,mods:["shift","ctrl"]},JUSTIFY_CENTER:{key:220,mods:["shift","ctrl"]},JUSTIFY_RIGHT:{key:221,mods:["shift","ctrl"]}},_cleanClassName:function(e){return e.replace(/ /g,"-").toLowerCase()},_textarea:null,_docType:'<!DOCTYPE HTML PUBLIC "-
|
},render:function(){if(this._rendered){return false;}if(!this.DOMReady){this._queue[this._queue.length]=["render",arguments];return false;}if(this.get("element")){if(this.get("element").tagName){this._textarea=true;if(this.get("element").tagName.toLowerCase()!=="textarea"){this._textarea=false;}}else{return false;}}else{return false;}this._rendered=true;var E=this;window.setTimeout(function(){E._render.call(E);},4);},_render:function(){var E=this;this.set("textarea",this.get("element"));this.get("element_cont").setStyle("display","none");this.get("element_cont").addClass(this.CLASS_CONTAINER);this.set("iframe",this._createIframe());window.setTimeout(function(){E._setInitialContent.call(E);},10);this.get("editor_wrapper").appendChild(this.get("iframe").get("element"));if(this.get("disabled")){this._disableEditor(true);}var F=this.get("toolbar");if(F instanceof B){this.toolbar=F;this.toolbar.set("disabled",true);}else{F.disabled=true;this.toolbar=new B(this.get("toolbar_cont"),F);}this.fireEvent("toolbarLoaded",{type:"toolbarLoaded",target:this.toolbar});this.toolbar.on("toolbarCollapsed",function(){if(this.currentWindow){this.moveWindow();}},this,true);this.toolbar.on("toolbarExpanded",function(){if(this.currentWindow){this.moveWindow();}},this,true);this.toolbar.on("fontsizeClick",this._handleFontSize,this,true);this.toolbar.on("colorPickerClicked",function(G){this._handleColorPicker(G);return false;},this,true);this.toolbar.on("alignClick",this._handleAlign,this,true);this.on("afterNodeChange",this._handleAfterNodeChange,this,true);this.toolbar.on("insertimageClick",this._handleInsertImageClick,this,true);this.on("windowinsertimageClose",this._handleInsertImageWindowClose,this,true);this.toolbar.on("createlinkClick",this._handleCreateLinkClick,this,true);this.on("windowcreatelinkClose",this._handleCreateLinkWindowClose,this,true);this.get("parentNode").replaceChild(this.get("element_cont").get("element"),this.get("element"));this.setStyle("visibility","hidden");this.setStyle("position","absolute");this.setStyle("top","-9999px");this.setStyle("left","-9999px");this.get("element_cont").appendChild(this.get("element"));this.get("element_cont").setStyle("display","block");C.addClass(this.get("iframe").get("parentNode"),this.CLASS_EDITABLE_CONT);this.get("iframe").addClass(this.CLASS_EDITABLE);this.get("element_cont").setStyle("width",this.get("width"));C.setStyle(this.get("iframe").get("parentNode"),"height",this.get("height"));this.get("iframe").setStyle("width","100%");this.get("iframe").setStyle("height","100%");this._setupDD();window.setTimeout(function(){E._setupAfterElement.call(E);},0);this.fireEvent("afterRender",{type:"afterRender",target:this});},execCommand:function(G,F){var J=this.fireEvent("beforeExecCommand",{type:"beforeExecCommand",target:this,args:arguments});if((J===false)||(this.STOP_EXEC_COMMAND)){this.STOP_EXEC_COMMAND=false;return false;}this._lastCommand=G;this._setMarkupType(G);if(this.browser.ie){this._getWindow().focus();}var E=true;if(this.get("limitCommands")){if(!this.toolbar.getButtonByValue(G)){E=false;}}this.editorDirty=true;if((typeof this["cmd_"+G.toLowerCase()]=="function")&&E){var I=this["cmd_"+G.toLowerCase()](F);E=I[0];if(I[1]){G=I[1];}if(I[2]){F=I[2];}}if(E){try{this._getDoc().execCommand(G,false,F);}catch(H){}}else{}this.on("afterExecCommand",function(){this.unsubscribeAll("afterExecCommand");this.nodeChange();},this,true);this.fireEvent("afterExecCommand",{type:"afterExecCommand",target:this});},cmd_underline:function(F){if(!this.browser.webkit){var E=this._getSelectedElement();if(E&&this._isElement(E,"span")){if(E.style.textDecoration=="underline"){E.style.textDecoration="none";}else{E.style.textDecoration="underline";}return[false];}}return[true];},cmd_backcolor:function(H){var E=true,F=this._getSelectedElement(),G="backcolor";if(this.browser.gecko||this.browser.opera){this._setEditorStyle(true);G="hilitecolor";}if(!this._isElement(F,"body")&&!this._hasSelection()){C.setStyle(F,"background-color",H);this._selectNode(F);E=false;}else{if(!this._isElement(F,"body")&&this._hasSelection()){C.setStyle(F,"background-color",H);this._selectNode(F);E=false;}else{if(this.get("insert")){F=this._createInsertElement({backgroundColor:H});}else{this._createCurrentElement("span",{backgroundColor:H});this._selectNode(this.currentElement[0]);}E=false;}}return[E,G];},cmd_forecolor:function(G){var E=true,F=this._getSelectedElement();if(!this._isElement(F,"body")&&!this._hasSelection()){C.setStyle(F,"color",G);this._selectNode(F);E=false;}else{if(!this._isElement(F,"body")&&this._hasSelection()){C.setStyle(F,"color",G);this._selectNode(F);E=false;}else{if(this.get("insert")){F=this._createInsertElement({color:G});}else{this._createCurrentElement("span",{color:G});this._selectNode(this.currentElement[0]);}E=false;}}return[E];},cmd_unlink:function(E){this._swapEl(this.currentElement[0],"span",function(F){F.className="yui-non";});return[false];},cmd_createlink:function(G){var F=this._getSelectedElement(),E=null;if(this._hasParent(F,"a")){this.currentElement[0]=this._hasParent(F,"a");}else{if(!this._isElement(F,"a")){this._createCurrentElement("a");E=this._swapEl(this.currentElement[0],"a");this.currentElement[0]=E;}else{this.currentElement[0]=F;}}return[false];},cmd_insertimage:function(J){var E=true,F=null,I="insertimage",H=this._getSelectedElement();if(J===""){J=this.get("blankimage");}if(this._isElement(H,"img")){this.currentElement[0]=H;E=false;}else{if(this._getDoc().queryCommandEnabled(I)){this._getDoc().execCommand("insertimage",false,J);var K=this._getDoc().getElementsByTagName("img");for(var G=0;G<K.length;G++){if(!YAHOO.util.Dom.hasClass(K[G],"yui-img")){YAHOO.util.Dom.addClass(K[G],"yui-img");this.currentElement[0]=K[G];}}E=false;}else{if(H==this._getDoc().body){F=this._getDoc().createElement("img");F.setAttribute("src",J);YAHOO.util.Dom.addClass(F,"yui-img");this._getDoc().body.appendChild(F);}else{this._createCurrentElement("img");F=this._getDoc().createElement("img");F.setAttribute("src",J);YAHOO.util.Dom.addClass(F,"yui-img");this.currentElement[0].parentNode.replaceChild(F,this.currentElement[0]);}this.currentElement[0]=F;E=false;}}return[E];},cmd_inserthtml:function(H){var E=true,G="inserthtml",F=null,I=null;if(this.browser.webkit&&!this._getDoc().queryCommandEnabled(G)){this._createCurrentElement("img");F=this._getDoc().createElement("span");F.innerHTML=H;this.currentElement[0].parentNode.replaceChild(F,this.currentElement[0]);E=false;}else{if(this.browser.ie){I=this._getRange();if(I.item){I.item(0).outerHTML=H;}else{I.pasteHTML(H);}E=false;}}return[E];},cmd_list:function(Y){var S=true,V=null,M=0,G=null,R="",W=this._getSelectedElement(),T="insertorderedlist";if(Y=="ul"){T="insertunorderedlist";}if(this.browser.webkit){if(this._isElement(W,"li")&&this._isElement(W.parentNode,Y)){G=W.parentNode;V=this._getDoc().createElement("span");YAHOO.util.Dom.addClass(V,"yui-non");R="";var F=G.getElementsByTagName("li");for(M=0;M<F.length;M++){R+="<div>"+F[M].innerHTML+"</div>";}V.innerHTML=R;this.currentElement[0]=G;this.currentElement[0].parentNode.replaceChild(V,this.currentElement[0]);}else{this._createCurrentElement(Y.toLowerCase());V=this._getDoc().createElement(Y);for(M=0;M<this.currentElement.length;M++){var J=this._getDoc().createElement("li");J.innerHTML=this.currentElement[M].innerHTML+'<span class="yui-non"> </span> ';V.appendChild(J);if(M>0){this.currentElement[M].parentNode.removeChild(this.currentElement[M]);}}this.currentElement[0].parentNode.replaceChild(V,this.currentElement[0]);this.currentElement[0]=V;var H=this.currentElement[0].firstChild;H=C.getElementsByClassName("yui-non","span",H)[0];this._getSelection().setBaseAndExtent(H,1,H,H.innerText.length);}S=false;}else{G=this._getSelectedElement();if(this._isElement(G,"li")&&this._isElement(G.parentNode,Y)||(this.browser.ie&&this._isElement(this._getRange().parentElement,"li"))||(this.browser.ie&&this._isElement(G,"ul"))||(this.browser.ie&&this._isElement(G,"ol"))){if(this.browser.ie){if((this.browser.ie&&this._isElement(G,"ul"))||(this.browser.ie&&this._isElement(G,"ol"))){G=G.getElementsByTagName("li")[0];}R="";var I=G.parentNode.getElementsByTagName("li");for(var U=0;U<I.length;U++){R+=I[U].innerHTML+"<br>";}var X=this._getDoc().createElement("span");X.innerHTML=R;G.parentNode.parentNode.replaceChild(X,G.parentNode);}else{this.nodeChange();this._getDoc().execCommand(T,"",G.parentNode);this.nodeChange();}S=false;}if(this.browser.opera){var Q=this;window.setTimeout(function(){var Z=Q._getDoc().getElementsByTagName("li");for(var a=0;a<Z.length;a++){if(Z[a].innerHTML.toLowerCase()=="<br>"){Z[a].parentNode.parentNode.removeChild(Z[a].parentNode);}}},30);}if(this.browser.ie&&S){var K="";if(this._getRange().html){K="<li>"+this._getRange().html+"</li>";}else{var L=this._getRange().text.split("\n");if(L.length>1){K="";for(var P=0;P<L.length;P++){K+="<li>"+L[P]+"</li>";}}else{var O=this._getRange().text;if(O===""){K='<li id="new_list_item">'+O+"</li>";}else{K="<li>"+O+"</li>";}}}this._getRange().pasteHTML("<"+Y+">"+K+"</"+Y+">");var E=this._getDoc().getElementById("new_list_item");if(E){var N=this._getDoc().body.createTextRange();N.moveToElementText(E);N.collapse(false);N.select();E.id="";}S=false;}}return S;},cmd_insertorderedlist:function(E){return[this.cmd_list("ol")];},cmd_insertunorderedlist:function(E){return[this.cmd_list("ul")];},cmd_fontname:function(H){var E=true,G=this._getSelectedElement();this.currentFont=H;if(G&&G.tagName&&!this._hasSelection()&&!this._isElement(G,"body")&&!this.get("insert")){YAHOO.util.Dom.setStyle(G,"font-family",H);E=false;}else{if(this.get("insert")&&!this._hasSelection()){var F=this._createInsertElement({fontFamily:H});E=false;}}return[E];},cmd_fontsize:function(G){var E=null;if(this.currentElement&&(this.currentElement.length>0)&&(!this._hasSelection())&&(!this.get("insert"))){YAHOO.util.Dom.setStyle(this.currentElement,"fontSize",G);}else{if(!this._isElement(this._getSelectedElement(),"body")){E=this._getSelectedElement();YAHOO.util.Dom.setStyle(E,"fontSize",G);if(this.get("insert")&&this.browser.ie){var F=this._getRange();F.collapse(false);F.select();}else{this._selectNode(E);}}else{if(this.get("insert")&&!this._hasSelection()){E=this._createInsertElement({fontSize:G});this.currentElement[0]=E;this._selectNode(this.currentElement[0]);}else{this._createCurrentElement("span",{"fontSize":G});this._selectNode(this.currentElement[0]);}}}return[false];},_swapEl:function(F,E,H){var G=this._getDoc().createElement(E);if(F){G.innerHTML=F.innerHTML;}if(typeof H=="function"){H.call(this,G);}if(F){F.parentNode.replaceChild(G,F);}return G;},_createInsertElement:function(E){this._createCurrentElement("span",E);var F=this.currentElement[0];if(this.browser.webkit){F.innerHTML='<span class="yui-non"> </span>';F=F.firstChild;this._getSelection().setBaseAndExtent(F,1,F,F.innerText.length);}else{if(this.browser.ie||this.browser.opera){F.innerHTML=" ";}}this._focusWindow();this._selectNode(F,true);return F;},_createCurrentElement:function(G,J){G=((G)?G:"a");var R=null,F=[],H=this._getDoc();if(this.currentFont){if(!J){J={};}J.fontFamily=this.currentFont;this.currentFont=null;}this.currentElement=[];var M=function(X,Z){var Y=null;X=((X)?X:"span");X=X.toLowerCase();switch(X){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":Y=H.createElement(X);break;default:Y=H.createElement(X);if(X==="span"){YAHOO.util.Dom.addClass(Y,"yui-tag-"+X);YAHOO.util.Dom.addClass(Y,"yui-tag");Y.setAttribute("tag",X);}for(var W in Z){if(YAHOO.lang.hasOwnProperty(Z,W)){Y.style[W]=Z[W];}}break;}return Y;};if(!this._hasSelection()){if(this._getDoc().queryCommandEnabled("insertimage")){this._getDoc().execCommand("insertimage",false,"yui-tmp-img");var L=this._getDoc().getElementsByTagName("img");for(var Q=0;Q<L.length;Q++){if(L[Q].getAttribute("src",2)=="yui-tmp-img"){F=M(G,J);L[Q].parentNode.replaceChild(F,L[Q]);this.currentElement[this.currentElement.length]=F;}}}else{if(this.currentEvent){R=YAHOO.util.Event.getTarget(this.currentEvent);
|
}
|
};
|
YAHOO.xbl.fr.Datatable.colResizer = function (index, th, datatable) { this.index = index; this.th = th; this.datatable = datatable; this.rule = null; this.styles = null; this.resizerliner = YAHOO.xbl.fr.Datatable.utils.getFirstChildByTagName(th, 'div') var childrenDivs = this.resizerliner.getElementsByTagName('div'); this.liner = childrenDivs[0]; this.resizer = childrenDivs[1];}
|
var a = YAHOO.util.Selector.query('a.xforms-trigger:not(.xforms-disabled)', liner, true); if (YAHOO.util.Event.getTarget(ev) != a) {
|
var triggerControl = YAHOO.util.Selector.query('.xforms-trigger:not(.xforms-disabled)', liner, true); var a = ORBEON.util.Dom.getElementByTagName(triggerControl, "a"); if (a != undefined && YAHOO.util.Event.getTarget(ev) != a) {
|
ORBEON.widgets.datatable.colSorter = function (th) { var liner = YAHOO.util.Selector.query('div.yui-dt-liner', th, true); YAHOO.util.Event.addListener(liner, "click", function (ev) { var a = YAHOO.util.Selector.query('a.xforms-trigger:not(.xforms-disabled)', liner, true); if (YAHOO.util.Event.getTarget(ev) != a) { ORBEON.xforms.Document.dispatchEvent(a.id, "DOMActivate"); } });}
|
var a = YAHOO.util.Selector.query('a.xforms-trigger:not(.xforms-disabled)', liner, true);
|
var triggerControl = YAHOO.util.Selector.query('.xforms-trigger:not(.xforms-disabled)', liner, true); var a = ORBEON.util.Dom.getElementByTagName(triggerControl, "a");
|
ORBEON.widgets.datatable.colSorter = function (th) { var liner = YAHOO.util.Selector.query('div.yui-dt-liner', th, true); YAHOO.util.Event.addListener(liner, "click", function (ev) { var a = YAHOO.util.Selector.query('a.xforms-trigger:not(.xforms-disabled)', liner, true); if (YAHOO.util.Event.getTarget(ev) != a) { ORBEON.xforms.Document.dispatchEvent(a.id, "DOMActivate"); } });}
|
ORBEON.xforms.Document.dispatchEvent(a.id, "DOMActivate");
|
ORBEON.xforms.Document.dispatchEvent(triggerControl.id, "DOMActivate");
|
ORBEON.widgets.datatable.colSorter = function (th) { var liner = YAHOO.util.Selector.query('div.yui-dt-liner', th, true); YAHOO.util.Event.addListener(liner, "click", function (ev) { var a = YAHOO.util.Selector.query('a.xforms-trigger:not(.xforms-disabled)', liner, true); if (YAHOO.util.Event.getTarget(ev) != a) { ORBEON.xforms.Document.dispatchEvent(a.id, "DOMActivate"); } });}
|
}
|
};
|
YAHOO.xbl.fr.Datatable.colSorter = function (th) { var liner = YAHOO.util.Selector.query('div.yui-dt-liner', th, true); YAHOO.util.Event.addListener(liner, "click", function (ev) { var triggerControl = YAHOO.util.Selector.query('.xforms-trigger:not(.xforms-disabled)', liner, true); var a = ORBEON.util.Dom.getElementByTagName(triggerControl, "a"); if (a != undefined && YAHOO.util.Event.getTarget(ev) != a) { ORBEON.xforms.Document.dispatchEvent(a.id, "DOMActivate"); } });}
|
iQ(this).remove();
|
self._children.forEach(function(child) { iQ(child.container).show(); });
|
complete: function() { iQ(this).remove(); }
|
"+=":"-=":b=="pos"?"-=":"+=")+g;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){e=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
|
h)).match(/^([\d+-.]+)(.*)$/);g[h]={value:i[1],unit:i[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(e,{step:function(i,h){if(h.prop=="height")f=h.end-h.start===0?0:(h.now-h.start)/(h.end-h.start);a.toShow[0].style[h.prop]=f*g[h.prop].value+g[h.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css("width",k);a.toShow.css({overflow:d});a.complete()}})}else a.toHide.animate({height:"hide"},
|
"+=":"-=":b=="pos"?"-=":"+=")+g;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){e=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
|
var sID = args[0], oElement;
|
var sID = args[0];
|
configDescribedBy: function (type, args) { var sID = args[0], oElement; if (this.cfg.getProperty(_USE_ARIA) && sID) { oElement = this.cfg.getProperty(_ROLE) === _DIALOG ? this.innerElement : this.body; setARIAProperty(oElement, _DESCRIBED_BY, sID); } },
|
oElement = this.cfg.getProperty(_ROLE) === _DIALOG ? this.innerElement : this.body; setARIAProperty(oElement, _DESCRIBED_BY, sID);
|
setARIAProperty(this.innerElement, _DESCRIBED_BY, sID);
|
configDescribedBy: function (type, args) { var sID = args[0], oElement; if (this.cfg.getProperty(_USE_ARIA) && sID) { oElement = this.cfg.getProperty(_ROLE) === _DIALOG ? this.innerElement : this.body; setARIAProperty(oElement, _DESCRIBED_BY, sID); } },
|
var sID = args[0], oElement;
|
var sID = args[0];
|
configLabelledBy: function (type, args) { var sID = args[0], oElement; if (this.cfg.getProperty(_USE_ARIA) && sID) { oElement = this.cfg.getProperty(_ROLE) === _DIALOG ? this.innerElement : this.body; setARIAProperty(oElement, _LABELLED_BY, sID); } },
|
oElement = this.cfg.getProperty(_ROLE) === _DIALOG ? this.innerElement : this.body; setARIAProperty(oElement, _LABELLED_BY, sID);
|
setARIAProperty(this.innerElement, _LABELLED_BY, sID);
|
configLabelledBy: function (type, args) { var sID = args[0], oElement; if (this.cfg.getProperty(_USE_ARIA) && sID) { oElement = this.cfg.getProperty(_ROLE) === _DIALOG ? this.innerElement : this.body; setARIAProperty(oElement, _LABELLED_BY, sID); } },
|
switch (sRole) {
|
oBody = this.body; sID = oBody.id || Dom.generateId(oBody); this.cfg.setProperty(_DESCRIBED_BY, sID);
|
configRole: function (type, args) { var sRole = args[0], oBody, oHeader, sID; if (sRole) { switch (sRole) { case _ALERT_DIALOG: oBody = this.body; sID = oBody.id || Dom.generateId(oBody); this.cfg.setProperty(_DESCRIBED_BY, sID); break; case _DIALOG: oHeader = this.header; sID = oHeader.id || Dom.generateId(oHeader); this.cfg.setProperty(_LABELLED_BY, sID); break; } setARIARole(this.innerElement, sRole); setRoleForCloseButton.call(this); } },
|
case _ALERT_DIALOG: oBody = this.body; sID = oBody.id || Dom.generateId(oBody); this.cfg.setProperty(_DESCRIBED_BY, sID); break; case _DIALOG: oHeader = this.header; sID = oHeader.id || Dom.generateId(oHeader); this.cfg.setProperty(_LABELLED_BY, sID); break; }
|
oHeader = this.header; if (oHeader != null) { sID = oHeader.id || Dom.generateId(oHeader); this.cfg.setProperty(_LABELLED_BY, sID); }
|
configRole: function (type, args) { var sRole = args[0], oBody, oHeader, sID; if (sRole) { switch (sRole) { case _ALERT_DIALOG: oBody = this.body; sID = oBody.id || Dom.generateId(oBody); this.cfg.setProperty(_DESCRIBED_BY, sID); break; case _DIALOG: oHeader = this.header; sID = oHeader.id || Dom.generateId(oHeader); this.cfg.setProperty(_LABELLED_BY, sID); break; } setARIARole(this.innerElement, sRole); setRoleForCloseButton.call(this); } },
|
oElement,
|
oBody,
|
configRole: function (type, args) { var sRole = args[0], oElement, oHeader, sHeaderId; if (sRole) { switch (sRole) { case _DIALOG: oElement = this.innerElement; break; case _ALERT_DIALOG: oElement = this.body; break; } if (oElement) { setARIARole(oElement, sRole); oHeader = this.header; sHeaderId = oHeader.id || Dom.generateId(oHeader); this.cfg.setProperty(_LABELLED_BY, sHeaderId); setRoleForCloseButton.call(this); } } },
|
sHeaderId;
|
sID;
|
configRole: function (type, args) { var sRole = args[0], oElement, oHeader, sHeaderId; if (sRole) { switch (sRole) { case _DIALOG: oElement = this.innerElement; break; case _ALERT_DIALOG: oElement = this.body; break; } if (oElement) { setARIARole(oElement, sRole); oHeader = this.header; sHeaderId = oHeader.id || Dom.generateId(oHeader); this.cfg.setProperty(_LABELLED_BY, sHeaderId); setRoleForCloseButton.call(this); } } },
|
switch (sRole) {
|
case _ALERT_DIALOG: oBody = this.body; sID = oBody.id || Dom.generateId(oBody); this.cfg.setProperty(_DESCRIBED_BY, sID); break;
|
configRole: function (type, args) { var sRole = args[0], oElement, oHeader, sHeaderId; if (sRole) { switch (sRole) { case _DIALOG: oElement = this.innerElement; break; case _ALERT_DIALOG: oElement = this.body; break; } if (oElement) { setARIARole(oElement, sRole); oHeader = this.header; sHeaderId = oHeader.id || Dom.generateId(oHeader); this.cfg.setProperty(_LABELLED_BY, sHeaderId); setRoleForCloseButton.call(this); } } },
|
oElement = this.innerElement;
|
oHeader = this.header;
|
configRole: function (type, args) { var sRole = args[0], oElement, oHeader, sHeaderId; if (sRole) { switch (sRole) { case _DIALOG: oElement = this.innerElement; break; case _ALERT_DIALOG: oElement = this.body; break; } if (oElement) { setARIARole(oElement, sRole); oHeader = this.header; sHeaderId = oHeader.id || Dom.generateId(oHeader); this.cfg.setProperty(_LABELLED_BY, sHeaderId); setRoleForCloseButton.call(this); } } },
|
break;
|
sID = oHeader.id || Dom.generateId(oHeader);
|
configRole: function (type, args) { var sRole = args[0], oElement, oHeader, sHeaderId; if (sRole) { switch (sRole) { case _DIALOG: oElement = this.innerElement; break; case _ALERT_DIALOG: oElement = this.body; break; } if (oElement) { setARIARole(oElement, sRole); oHeader = this.header; sHeaderId = oHeader.id || Dom.generateId(oHeader); this.cfg.setProperty(_LABELLED_BY, sHeaderId); setRoleForCloseButton.call(this); } } },
|
case _ALERT_DIALOG: oElement = this.body;
|
this.cfg.setProperty(_LABELLED_BY, sID);
|
configRole: function (type, args) { var sRole = args[0], oElement, oHeader, sHeaderId; if (sRole) { switch (sRole) { case _DIALOG: oElement = this.innerElement; break; case _ALERT_DIALOG: oElement = this.body; break; } if (oElement) { setARIARole(oElement, sRole); oHeader = this.header; sHeaderId = oHeader.id || Dom.generateId(oHeader); this.cfg.setProperty(_LABELLED_BY, sHeaderId); setRoleForCloseButton.call(this); } } },
|
if (oElement) { setARIARole(oElement, sRole); oHeader = this.header; sHeaderId = oHeader.id || Dom.generateId(oHeader); this.cfg.setProperty(_LABELLED_BY, sHeaderId); setRoleForCloseButton.call(this); }
|
setRoleForCloseButton.call(this);
|
configRole: function (type, args) { var sRole = args[0], oElement, oHeader, sHeaderId; if (sRole) { switch (sRole) { case _DIALOG: oElement = this.innerElement; break; case _ALERT_DIALOG: oElement = this.body; break; } if (oElement) { setARIARole(oElement, sRole); oHeader = this.header; sHeaderId = oHeader.id || Dom.generateId(oHeader); this.cfg.setProperty(_LABELLED_BY, sHeaderId); setRoleForCloseButton.call(this); } } },
|
var transport, connectParams = {} switch(jsio.__env.name) { case 'node': transport = 'tcp' connectParams.host = '127.0.0.1' connectParams.port = 5556 connectParams.timeout = 0 break; case 'browser': transport = location.hash.match(/fin-postmessage/) ? 'postmessage' : 'csp' connectParams.url = 'http: break; } this._client.connect(transport, connectParams, callback) this._sessionId = 'fin_random_session_' + Math.floor(Math.random() * 100000)
|
this._connect(callback)
|
this.connect = function(callback) { var transport, connectParams = {} switch(jsio.__env.name) { case 'node': transport = 'tcp' connectParams.host = '127.0.0.1' connectParams.port = 5556 connectParams.timeout = 0 break; case 'browser': transport = location.hash.match(/fin-postmessage/) ? 'postmessage' : 'csp' connectParams.url = 'http://' + (document.domain || '127.0.0.1') + ':5555' break; } this._client.connect(transport, connectParams, callback) // TODO Get the session key from the server this._sessionId = 'fin_random_session_' + Math.floor(Math.random() * 100000) }
|
self._con = __.path(__.conPathCommands, self._opt.attrs); self._con.node.style.cursor = self._opt.cursor;
|
var opt = self._opt; self._con = gprimitives.path(csolver.conPathCommands(), opt.attrs); var con = self._con; con.node.style.cursor = opt.cursor;
|
connection: function(){ // self._con = __.line(__.sPoint, __.ePoint, self._opt.attrs); self._con = __.path(__.conPathCommands, self._opt.attrs); self._con.node.style.cursor = self._opt.cursor; // self._con.toBack(); self._con.show(); return this; },
|
self._con.show();
|
con.show();
|
connection: function(){ // self._con = __.line(__.sPoint, __.ePoint, self._opt.attrs); self._con = __.path(__.conPathCommands, self._opt.attrs); self._con.node.style.cursor = self._opt.cursor; // self._con.toBack(); self._con.show(); return this; },
|
this.server.unsubscribeFromItemSetMutations(itemSetId, this._itemSetSubs[itemId])
|
this.server.unsubscribeFromItemSetMutations(itemSetId, this._itemSetSubs[itemSetId])
|
this.connectionLost = function() { logger.log('connection lost - unsubscribing from item mutation subscriptions') for (var itemId in this._itemSubs) { this.server.unsubscribeFromItemMutations(itemId, this._itemSubs[itemId]) } for (var itemSetId in this._itemSetSubs) { this.server.unsubscribeFromItemSetMutations(itemSetId, this._itemSetSubs[itemId]) } }
|
logger.log('connection lost - unsubscribing from item mutation subscriptions') for (var itemId in this._itemSubs) { this.server.unsubscribeFromItemMutations(itemId, this._itemSubs[itemId]) } for (var itemSetId in this._itemSetSubs) { this.server.unsubscribeFromItemSetMutations(itemSetId, this._itemSetSubs[itemSetId]) }
|
this._log('connection lost - closing redis client') this._redisClient.close()
|
this.connectionLost = function() { logger.log('connection lost - unsubscribing from item mutation subscriptions') for (var itemId in this._itemSubs) { this.server.unsubscribeFromItemMutations(itemId, this._itemSubs[itemId]) } for (var itemSetId in this._itemSetSubs) { this.server.unsubscribeFromItemSetMutations(itemSetId, this._itemSetSubs[itemSetId]) } }
|
for (var itemId in this._itemSubscriptions) { this.server.unsubscribeFromItemMutations(itemId, this._itemSubscriptions[itemId]);
|
for (var itemId in this._itemSubs) { this.server.unsubscribeFromItemMutations(itemId, this._itemSubs[itemId]); } for (var itemSetId in this._itemSetSubs) { this.server.unsubscribeFromItemSetMutations(itemSetId, this._itemSetSubs[itemId]);
|
this.connectionLost = function() { logger.log('connection lost - unsubscribing from item mutation subscriptions'); for (var itemId in this._itemSubscriptions) { this.server.unsubscribeFromItemMutations(itemId, this._itemSubscriptions[itemId]); } }
|
logger.info("Connection made", arguments)
|
this.connectionMade = function() { this._isConnected = true for (var i=0, cb; cb = this._onConnectedCallbacks[i]; i++) { cb() } delete this._onConnectedCallbacks }
|
|
this._itemSubscriptions = {};
|
this._itemSubs = {}; this._itemSetSubs = {};
|
this.connectionMade = function() { this._log('connectionMade'); this._itemSubscriptions = {}; }
|
construct : function(tag, attr, content) { if (typeof content == 'undefined' && (typeof attr != 'object' || attr instanceof JX.HTML)) { content = attr; attr = {}; } var node = document.createElement(tag); if (attr.style) { JX.copy(node.style, attr.style); delete attr.style; } if (attr.sigil) { JX.Stratcom.sigilize(node, attr.sigil, attr.meta); delete attr.sigil; delete attr.meta;
|
construct : function(str) { if (this == JX || this == window) { return new JX.HTML(str);
|
construct : function(tag, attr, content) { if (typeof content == 'undefined' && (typeof attr != 'object' || attr instanceof JX.HTML)) { content = attr; attr = {}; } var node = document.createElement(tag); if (attr.style) { JX.copy(node.style, attr.style); delete attr.style; } if (attr.sigil) { JX.Stratcom.sigilize(node, attr.sigil, attr.meta); delete attr.sigil; delete attr.meta; } if (__DEV__) { if (attr.meta) { throw new Error( '$N('+tag+', ...): '+ 'if you specify `meta` metadata, you must also specify a `sigil`.'); } } JX.copy(node, attr); if (content) { JX.DOM.setContent(node, content); } return node; }
|
if (attr.meta) {
|
var tags = ['legend', 'thead', 'tbody', 'tfoot', 'column', 'colgroup', 'caption', 'tr', 'th', 'td', 'option']; var evil_stuff = new RegExp('^\\s*<('+tags.join('|')+')\\b', 'i'); var match = null; if (match = str.match(evil_stuff)) {
|
construct : function(tag, attr, content) { if (typeof content == 'undefined' && (typeof attr != 'object' || attr instanceof JX.HTML)) { content = attr; attr = {}; } var node = document.createElement(tag); if (attr.style) { JX.copy(node.style, attr.style); delete attr.style; } if (attr.sigil) { JX.Stratcom.sigilize(node, attr.sigil, attr.meta); delete attr.sigil; delete attr.meta; } if (__DEV__) { if (attr.meta) { throw new Error( '$N('+tag+', ...): '+ 'if you specify `meta` metadata, you must also specify a `sigil`.'); } } JX.copy(node, attr); if (content) { JX.DOM.setContent(node, content); } return node; }
|
'$N('+tag+', ...): '+ 'if you specify `meta` metadata, you must also specify a `sigil`.');
|
'JX.HTML("<'+match[1]+'>..."): '+ 'call initializes an HTML object with an invalid partial fragment '+ 'and can not be converted into DOM nodes. The enclosing tag of an '+ 'HTML content string must be appendable to a document fragment. '+ 'For example, <table> is allowed but <tr> or <tfoot> are not.');
|
construct : function(tag, attr, content) { if (typeof content == 'undefined' && (typeof attr != 'object' || attr instanceof JX.HTML)) { content = attr; attr = {}; } var node = document.createElement(tag); if (attr.style) { JX.copy(node.style, attr.style); delete attr.style; } if (attr.sigil) { JX.Stratcom.sigilize(node, attr.sigil, attr.meta); delete attr.sigil; delete attr.meta; } if (__DEV__) { if (attr.meta) { throw new Error( '$N('+tag+', ...): '+ 'if you specify `meta` metadata, you must also specify a `sigil`.'); } } JX.copy(node, attr); if (content) { JX.DOM.setContent(node, content); } return node; }
|
JX.copy(node, attr); if (content) { JX.DOM.setContent(node, content); } return node; }
|
this._content = str; },
|
construct : function(tag, attr, content) { if (typeof content == 'undefined' && (typeof attr != 'object' || attr instanceof JX.HTML)) { content = attr; attr = {}; } var node = document.createElement(tag); if (attr.style) { JX.copy(node.style, attr.style); delete attr.style; } if (attr.sigil) { JX.Stratcom.sigilize(node, attr.sigil, attr.meta); delete attr.sigil; delete attr.meta; } if (__DEV__) { if (attr.meta) { throw new Error( '$N('+tag+', ...): '+ 'if you specify `meta` metadata, you must also specify a `sigil`.'); } } JX.copy(node, attr); if (content) { JX.DOM.setContent(node, content); } return node; }
|
if (__DEV__) { this.toString = function() { return '<'+this.x+', '+this.y+'>'; } }
|
construct : function(x, y) { if (this == JX || this == window) { return new JX.$V(x, y); } if (typeof y == 'undefined') { return JX.$V.getPos(x); } this.x = parseFloat(x); this.y = parseFloat(y); if (__DEV__) { this.toString = function() { return '<'+this.x+', '+this.y+'>'; } } },
|
|
var template = $(source).clone();
|
var template = $(source).clone(true);
|
var construct = function(source) { var template = $(source).clone(); var instance = prepare(template); widgets.controls.before(instance); object.trigger('construct', [instance]); refresh(true); return instance; };
|
if (window.G_vmlCanvasManager)
|
if (window.G_vmlCanvasManager && !window.G_vmlCanvasManager.inited) { window.G_vmlCanvasManager.inited = true;
|
function constructCanvas() { canvasWidth = placeholder.width(); canvasHeight = placeholder.height(); placeholder.html(""); // clear placeholder if (placeholder.css("position") == 'static') placeholder.css("position", "relative"); // for positioning labels and overlay if (canvasWidth <= 0 || canvasHeight <= 0) throw "Invalid dimensions for plot, width = " + canvasWidth + ", height = " + canvasHeight; if (window.G_vmlCanvasManager) // excanvas hack, make sure everything is setup window.G_vmlCanvasManager.init_(document); function makeCanvas(skipPositioning) { var c = document.createElement('canvas'); c.width = canvasWidth; c.height = canvasHeight; if (!skipPositioning) $(c).css({ position: 'absolute', left: 0, top: 0 }); $(c).appendTo(placeholder); if (!c.getContext) // excanvas hack c = window.G_vmlCanvasManager.initElement(c); return c; } // the canvas canvas = makeCanvas(true); ctx = canvas.getContext("2d"); // overlay canvas for interactive features overlay = makeCanvas(); octx = overlay.getContext("2d"); }
|
}
|
function constructCanvas() { canvasWidth = placeholder.width(); canvasHeight = placeholder.height(); placeholder.html(""); // clear placeholder if (placeholder.css("position") == 'static') placeholder.css("position", "relative"); // for positioning labels and overlay if (canvasWidth <= 0 || canvasHeight <= 0) throw "Invalid dimensions for plot, width = " + canvasWidth + ", height = " + canvasHeight; if (window.G_vmlCanvasManager) // excanvas hack, make sure everything is setup window.G_vmlCanvasManager.init_(document); function makeCanvas(skipPositioning) { var c = document.createElement('canvas'); c.width = canvasWidth; c.height = canvasHeight; if (!skipPositioning) $(c).css({ position: 'absolute', left: 0, top: 0 }); $(c).appendTo(placeholder); if (!c.getContext) // excanvas hack c = window.G_vmlCanvasManager.initElement(c); return c; } // the canvas canvas = makeCanvas(true); ctx = canvas.getContext("2d"); // overlay canvas for interactive features overlay = makeCanvas(); octx = overlay.getContext("2d"); }
|
|
my_store.groupField != 'idx'+i) {
|
my_store.groupField != dataIndex) {
|
constructor: function (config) { Ext.apply(this, { table_id: null, showExpandCollapseGroupsButton: true, showAllColumnsButton: true, showDefaultStateButton: true, showRefreshButton: true }); Ext.ux.TableToolbar.superclass.constructor.apply(this, arguments); Ext.applyIf(this.labels, { button_refresh: "localize", default_state: "localize", expand_collapse_groups: "localize", show_all_columns: "localize", show_all_columns_tooltip: "localize" }); if (this.table_id === null) { throw "table_id not set in config"; } var table_id = this.table_id; if (this.showExpandCollapseGroupsButton) { this.add({ text: this.labels.expand_collapse_groups, last_state: 'expanded', iconCls: 'x-group-by-icon', handler: function () { var g = grid[table_id]; if (this.last_state == 'expanded') { g.getView().collapseAllGroups(); this.last_state = 'collapsed'; } else { g.getView().expandAllGroups() this.last_state = 'expanded'; } } }); } if (this.showAllColumnsButton) { this.add({ text: this.labels.show_all_columns, tooltip: this.labels.show_all_columns_tooltip, tooltipType: 'title', iconCls: 'x-cols-icon', handler: function (button, state) { var my_grid = grid[table_id]; var my_store = store[table_id]; var cm = my_grid.getColumnModel(); for (var i=0;i<cm.getColumnCount();i++) { //do not show grouped column if hideGroupedColumn is true if (my_grid.getView().hideGroupedColumn === false || my_store.groupField != 'idx'+i) { cm.setHidden(i, false); } } } }); } if (this.showDefaultStateButton) { this.add({ text: this.labels.default_state, iconCls: 'tbar-default-state', handler: function (button, state) { Ext.state.Manager.clear(grid[table_id].getStateId()); window.location = window.location; } }); } if (this.showRefreshButton) { this.add({ text: this.labels.button_refresh, iconCls: 'x-tbar-loading', handler: function (button, state) { window.location = window.location; } }); } }
|
d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
|
2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,
|
d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
|
this.filters = require('./template_defaults').filters;
|
function Context(o) { this.scope = [ o || {} ]; this.extends = ''; this.blocks = {}; this.autoescaping = true;}
|
|
dA=dS.split("/");
|
var dA=dS.split("/");
|
function convertDate(dS,dF){var d,m,y;if (dF=="d.m.Y")dA=dS.split(".")elsedA=dS.split("/");switch (dF){case "d/m/Y","d.m.Y":d=parseInt(dA[0],10);m=parseInt(dA[1],10)-1;y=parseInt(dA[2],10);break;case "Y/m/d":d=parseInt(dA[2],10);m=parseInt(dA[1],10)-1;y=parseInt(dA[0],10);break;default :d=parseInt(dA[1],10);m=parseInt(dA[0],10)-1;y=parseInt(dA[2],10);break;}return new Date(y,m,d);}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.