comfortable_mexican_sofa 1.0.40 → 1.0.41

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. data/VERSION +1 -1
  2. data/app/controllers/cms_admin/layouts_controller.rb +1 -1
  3. data/app/views/cms_admin/layouts/_form.html.erb +3 -3
  4. data/app/views/cms_admin/layouts/_index_branch.html.erb +1 -5
  5. data/app/views/cms_admin/layouts/index.html.erb +1 -1
  6. data/app/views/cms_admin/pages/_form.html.erb +2 -2
  7. data/app/views/cms_admin/pages/form_blocks.js.erb +2 -1
  8. data/app/views/cms_admin/pages/index.html.erb +1 -1
  9. data/app/views/cms_admin/sites/index.html.erb +1 -1
  10. data/app/views/cms_admin/snippets/_form.html.erb +1 -1
  11. data/app/views/cms_admin/snippets/index.html.erb +1 -1
  12. data/app/views/cms_admin/uploads/_index.html.erb +1 -1
  13. data/app/views/layouts/cms_admin.html.erb +2 -2
  14. data/comfortable_mexican_sofa.gemspec +13 -5
  15. data/config/initializers/comfortable_mexican_sofa.rb +1 -1
  16. data/lib/comfortable_mexican_sofa/controller_methods.rb +1 -1
  17. data/lib/comfortable_mexican_sofa/form_builder.rb +15 -15
  18. data/lib/comfortable_mexican_sofa/view_methods.rb +3 -0
  19. data/public/images/comfortable_mexican_sofa/icon_layout.gif +0 -0
  20. data/public/images/comfortable_mexican_sofa/icon_snippet.gif +0 -0
  21. data/public/javascripts/comfortable_mexican_sofa/cms.js +43 -8
  22. data/public/javascripts/comfortable_mexican_sofa/codemirror/codemirror.css +102 -0
  23. data/public/javascripts/comfortable_mexican_sofa/codemirror/codemirror.js +23 -0
  24. data/public/javascripts/comfortable_mexican_sofa/codemirror/codemirror_base.js +88 -0
  25. data/public/javascripts/comfortable_mexican_sofa/codemirror/parse_css.js +4 -0
  26. data/public/javascripts/comfortable_mexican_sofa/codemirror/parse_html_mixed.js +3 -0
  27. data/public/javascripts/comfortable_mexican_sofa/codemirror/parse_js.js +12 -0
  28. data/public/javascripts/comfortable_mexican_sofa/codemirror/parse_xml.js +7 -0
  29. data/public/stylesheets/comfortable_mexican_sofa/content.css +184 -0
  30. data/public/stylesheets/comfortable_mexican_sofa/form.css +93 -0
  31. data/public/stylesheets/comfortable_mexican_sofa/structure.css +27 -294
  32. data/public/stylesheets/comfortable_mexican_sofa/typography.css +1 -1
  33. data/test/functional/cms_admin/layouts_controller_test.rb +1 -1
  34. data/test/functional/cms_content_controller_test.rb +1 -1
  35. data/test/integration/render_cms_test.rb +21 -1
  36. metadata +15 -7
  37. data/app/views/cms_admin/common/desc/_layout_content.html.erb +0 -25
  38. data/app/views/cms_admin/common/desc/_layout_css.html.erb +0 -1
  39. data/app/views/cms_admin/common/desc/_layout_js.html.erb +0 -1
@@ -0,0 +1,23 @@
1
+ var CodeMirrorConfig=window.CodeMirrorConfig||{},CodeMirror=function(){function D(a,b){for(var c in b)a.hasOwnProperty(c)||(a[c]=b[c])}function E(a,b){for(var c=0;c<a.length;c++)b(a[c])}function s(a){return document.createElementNS&&document.documentElement.namespaceURI!==null?document.createElementNS("http://www.w3.org/1999/xhtml",a):document.createElement(a)}function F(a,b){var c=s("div"),d=s("div");c.style.position="absolute";c.style.height="100%";if(c.style.setExpression)try{c.style.setExpression("height",
2
+ "this.previousSibling.offsetHeight + 'px'")}catch(h){}c.style.top="0px";c.style.left="0px";c.style.overflow="hidden";a.appendChild(c);d.className="CodeMirror-line-numbers";c.appendChild(d);d.innerHTML="<div>"+b+"</div>";return c}function G(a){if(typeof a.parserfile=="string")a.parserfile=[a.parserfile];if(typeof a.basefiles=="string")a.basefiles=[a.basefiles];if(typeof a.stylesheet=="string")a.stylesheet=[a.stylesheet];var b=['<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head>'];
3
+ b.push('<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>');var c=a.noScriptCaching?"?nocache="+(new Date).getTime().toString(16):"";E(a.stylesheet,function(d){b.push('<link rel="stylesheet" type="text/css" href="'+d+c+'"/>')});E(a.basefiles.concat(a.parserfile),function(d){/^https?:/.test(d)||(d=a.path+d);b.push('<script type="text/javascript" src="'+d+c+'"><\/script>')});b.push('</head><body style="border-width: 0;" class="editbox" spellcheck="'+(a.disableSpellcheck?"false":"true")+'"></body></html>');
4
+ return b.join("")}function t(a,b){this.options=b=b||{};D(b,CodeMirrorConfig);if(b.dumbTabs)b.tabMode="spaces";else if(b.normalTab)b.tabMode="default";if(b.cursorActivity)b.onCursorActivity=b.cursorActivity;var c=this.frame=s("iframe");if(b.iframeClass)c.className=b.iframeClass;c.frameBorder=0;c.style.border="0";c.style.width="100%";c.style.height="100%";c.style.display="block";var d=this.wrapping=s("div");d.style.position="relative";d.className="CodeMirror-wrapping";d.style.width=b.width;d.style.height=
5
+ b.height=="dynamic"?b.minHeight+"px":b.height;var h=this.textareaHack=s("textarea");d.appendChild(h);h.style.position="absolute";h.style.left="-10000px";h.style.width="10px";h.tabIndex=1E5;c.CodeMirror=this;if(b.domain&&H){this.html=G(b);c.src="javascript:(function(){document.open();"+(b.domain?'document.domain="'+b.domain+'";':"")+"document.write(window.frameElement.CodeMirror.html);document.close();})()"}else c.src="javascript:;";a.appendChild?a.appendChild(d):a(d);d.appendChild(c);if(b.lineNumbers)this.lineNumbers=
6
+ F(d,b.firstLineNumber);this.win=c.contentWindow;if(!b.domain||!H){this.win.document.open();this.win.document.write(G(b));this.win.document.close()}}D(CodeMirrorConfig,{stylesheet:[],path:"",parserfile:[],basefiles:["util.js","stringstream.js","select.js","undo.js","editor.js","tokenize.js"],iframeClass:null,passDelay:200,passTime:50,lineNumberDelay:200,lineNumberTime:50,continuousScanning:false,saveFunction:null,onLoad:null,onChange:null,undoDepth:50,undoDelay:800,disableSpellcheck:true,textWrapping:true,
7
+ readOnly:false,width:"",height:"300px",minHeight:100,autoMatchParens:false,markParen:null,unmarkParen:null,parserConfig:null,tabMode:"indent",enterMode:"indent",electricChars:true,reindentOnLoad:false,activeTokens:null,onCursorActivity:null,lineNumbers:false,firstLineNumber:1,onLineNumberClick:null,indentUnit:2,domain:null,noScriptCaching:false,incrementalLoading:false});var H=document.selection&&window.ActiveXObject&&/MSIE/.test(navigator.userAgent);t.prototype={init:function(){this.options.initCallback&&
8
+ this.options.initCallback(this);this.options.onLoad&&this.options.onLoad(this);this.options.lineNumbers&&this.activateLineNumbers();this.options.reindentOnLoad&&this.reindent();this.options.height=="dynamic"&&this.setDynamicHeight()},getCode:function(){return this.editor.getCode()},setCode:function(a){this.editor.importCode(a)},selection:function(){this.focusIfIE();return this.editor.selectedText()},reindent:function(){this.editor.reindent()},reindentSelection:function(){this.focusIfIE();this.editor.reindentSelection(null)},
9
+ focusIfIE:function(){this.win.select.ie_selection&&document.activeElement!=this.frame&&this.focus()},focus:function(){this.win.focus();this.editor.selectionSnapshot&&this.win.select.setBookmark(this.win.document.body,this.editor.selectionSnapshot)},replaceSelection:function(a){this.focus();this.editor.replaceSelection(a);return true},replaceChars:function(a,b,c){this.editor.replaceChars(a,b,c)},getSearchCursor:function(a,b,c){return this.editor.getSearchCursor(a,b,c)},undo:function(){this.editor.history.undo()},
10
+ redo:function(){this.editor.history.redo()},historySize:function(){return this.editor.history.historySize()},clearHistory:function(){this.editor.history.clear()},grabKeys:function(a,b){this.editor.grabKeys(a,b)},ungrabKeys:function(){this.editor.ungrabKeys()},setParser:function(a,b){this.editor.setParser(a,b)},setSpellcheck:function(a){this.win.document.body.spellcheck=a},setStylesheet:function(a){if(typeof a==="string")a=[a];for(var b={},c={},d=this.win.document.getElementsByTagName("link"),h=0,
11
+ e;e=d[h];h++)if(e.rel.indexOf("stylesheet")!==-1)for(var f=0;f<a.length;f++){var n=a[f];if(e.href.substring(e.href.length-n.length)===n){b[e.href]=true;c[n]=true}}for(h=0;e=d[h];h++)if(e.rel.indexOf("stylesheet")!==-1)e.disabled=!(e.href in b);for(f=0;f<a.length;f++){n=a[f];if(!(n in c)){e=this.win.document.createElement("link");e.rel="stylesheet";e.type="text/css";e.href=n;this.win.document.getElementsByTagName("head")[0].appendChild(e)}}},setTextWrapping:function(a){if(a!=this.options.textWrapping){this.win.document.body.style.whiteSpace=
12
+ a?"":"nowrap";this.options.textWrapping=a;if(this.lineNumbers){this.setLineNumbers(false);this.setLineNumbers(true)}}},setIndentUnit:function(a){this.win.indentUnit=a},setUndoDepth:function(a){this.editor.history.maxDepth=a},setTabMode:function(a){this.options.tabMode=a},setEnterMode:function(a){this.options.enterMode=a},setLineNumbers:function(a){if(a&&!this.lineNumbers){this.lineNumbers=F(this.wrapping,this.options.firstLineNumber);this.activateLineNumbers()}else if(!a&&this.lineNumbers){this.wrapping.removeChild(this.lineNumbers);
13
+ this.wrapping.style.paddingLeft="";this.lineNumbers=null}},cursorPosition:function(a){this.focusIfIE();return this.editor.cursorPosition(a)},firstLine:function(){return this.editor.firstLine()},lastLine:function(){return this.editor.lastLine()},nextLine:function(a){return this.editor.nextLine(a)},prevLine:function(a){return this.editor.prevLine(a)},lineContent:function(a){return this.editor.lineContent(a)},setLineContent:function(a,b){this.editor.setLineContent(a,b)},removeLine:function(a){this.editor.removeLine(a)},
14
+ insertIntoLine:function(a,b,c){this.editor.insertIntoLine(a,b,c)},selectLines:function(a,b,c,d){this.win.focus();this.editor.selectLines(a,b,c,d)},nthLine:function(a){for(var b=this.firstLine();a>1&&b!==false;a--)b=this.nextLine(b);return b},lineNumber:function(a){for(var b=0;a!==false;){b++;a=this.prevLine(a)}return b},jumpToLine:function(a){if(typeof a=="number")a=this.nthLine(a);this.selectLines(a,0);this.win.focus()},currentLine:function(){return this.lineNumber(this.cursorLine())},cursorLine:function(){return this.cursorPosition().line},
15
+ cursorCoords:function(a){return this.editor.cursorCoords(a)},activateLineNumbers:function(){function a(){if(e.offsetWidth!=0){for(var g=e;g.parentNode;g=g.parentNode);if(!i.parentNode||g!=document||!f.Editor){try{z()}catch(k){}clearInterval(J)}else if(i.offsetWidth!=A){A=i.offsetWidth;e.parentNode.style.paddingLeft=A+"px"}}}function b(){i.scrollTop=q.scrollTop||n.documentElement.scrollTop||0}function c(g){var k=l.firstChild.offsetHeight;if(k!=0){k=Math.ceil((50+Math.max(q.offsetHeight,Math.max(e.offsetHeight,
16
+ q.scrollHeight||0)))/k);for(var o=l.childNodes.length;o<=k;o++){var w=s("div");w.appendChild(document.createTextNode(g?String(o+j.options.firstLineNumber):"\u00a0"));l.appendChild(w)}}}function d(){function g(){c(true);b()}j.updateNumbers=g;var k=f.addEventHandler(f,"scroll",b,true),o=f.addEventHandler(f,"resize",g,true);z=function(){k();o();if(j.updateNumbers==g)j.updateNumbers=null};g()}function h(){function g(p,B){r||(r=l.appendChild(s("div")));I&&I(r,B,p);u.push(r);u.push(p);x=r.offsetHeight+
17
+ r.offsetTop;r=r.nextSibling}function k(){for(var p=0;p<u.length;p+=2)u[p].innerHTML=u[p+1];u=[]}function o(){if(!(!l.parentNode||l.parentNode!=j.lineNumbers)){for(var p=(new Date).getTime()+j.options.lineNumberTime;m;){for(g(C++,m.previousSibling);m&&!f.isBR(m);m=m.nextSibling)for(var B=m.offsetTop+m.offsetHeight;l.offsetHeight&&B-3>x;){var K=x;g("&nbsp;");if(x<=K)break}if(m)m=m.nextSibling;if((new Date).getTime()>p){k();v=setTimeout(o,j.options.lineNumberDelay);return}}for(;r;)g(C++);k();b()}}function w(p){b();
18
+ c(p);m=q.firstChild;r=l.firstChild;x=0;C=j.options.firstLineNumber;o()}function y(){v&&clearTimeout(v);if(j.editor.allClean())w();else v=setTimeout(y,200)}var m,r,C,x,u=[],I=j.options.styleNumbers;w(true);var v=null;j.updateNumbers=y;var L=f.addEventHandler(f,"scroll",b,true),M=f.addEventHandler(f,"resize",y,true);z=function(){v&&clearTimeout(v);if(j.updateNumbers==y)j.updateNumbers=null;L();M()}}var e=this.frame,f=e.contentWindow,n=f.document,q=n.body,i=this.lineNumbers,l=i.firstChild,j=this,A=null;
19
+ i.onclick=function(g){var k=j.options.onLineNumberClick;if(k){g=(g||window.event).target||(g||window.event).srcElement;var o=g==i?NaN:Number(g.innerHTML);isNaN(o)||k(o,g)}};var z=function(){};a();var J=setInterval(a,500);(this.options.textWrapping||this.options.styleNumbers?h:d)()},setDynamicHeight:function(){function a(){for(var q=0,i=h.lastChild,l;i&&d.isBR(i);){i.hackBR||q++;i=i.previousSibling}if(i){e=i.offsetHeight;l=i.offsetTop+(1+q)*e}else if(e)l=q*e;if(l)b.wrapping.style.height=Math.max(n+
20
+ l,b.options.minHeight)+"px"}var b=this,c=b.options.onCursorActivity,d=b.win,h=d.document.body,e=null,f=null,n=2*b.frame.offsetTop;h.style.overflowY="hidden";d.document.documentElement.style.overflowY="hidden";this.frame.scrolling="no";setTimeout(a,300);b.options.onCursorActivity=function(q){c&&c(q);clearTimeout(f);f=setTimeout(a,100)}}};t.InvalidLineHandle={toString:function(){return"CodeMirror.InvalidLineHandle"}};t.replace=function(a){if(typeof a=="string")a=document.getElementById(a);return function(b){a.parentNode.replaceChild(b,
21
+ a)}};t.fromTextArea=function(a,b){function c(){a.value=e.getCode()}if(typeof a=="string")a=document.getElementById(a);b=b||{};if(a.style.width&&b.width==null)b.width=a.style.width;if(a.style.height&&b.height==null)b.height=a.style.height;if(b.content==null)b.content=a.value;if(a.form){typeof a.form.addEventListener=="function"?a.form.addEventListener("submit",c,false):a.form.attachEvent("onsubmit",c);var d=a.form.submit,h=function(){c();a.form.submit=d;a.form.submit();a.form.submit=h};a.form.submit=
22
+ h}a.style.display="none";var e=new t(function(f){a.nextSibling?a.parentNode.insertBefore(f,a.nextSibling):a.parentNode.appendChild(f)},b);e.save=c;e.toTextArea=function(){c();a.parentNode.removeChild(e.wrapping);a.style.display="";if(a.form){a.form.submit=d;typeof a.form.removeEventListener=="function"?a.form.removeEventListener("submit",c,false):a.form.detachEvent("onsubmit",c)}};return e};t.isProbablySupported=function(){var a;return window.opera?Number(window.opera.version())>=9.52:/Apple Computer, Inc/.test(navigator.vendor)&&
23
+ (a=navigator.userAgent.match(/Version\/(\d+(?:\.\d+)?)\./))?Number(a[1])>=3:document.selection&&window.ActiveXObject&&(a=navigator.userAgent.match(/MSIE (\d+(?:\.\d*)?)\b/))?Number(a[1])>=6:(a=navigator.userAgent.match(/gecko\/(\d{8})/i))?Number(a[1])>=20050901:(a=navigator.userAgent.match(/AppleWebKit\/(\d+)/))?Number(a[1])>=525:null};return t}();
@@ -0,0 +1,88 @@
1
+ function method(f,l){return function(){f[l].apply(f,arguments)}}var StopIteration={toString:function(){return"StopIteration"}};function forEach(f,l){if(f.next)try{for(;;)l(f.next())}catch(k){if(k!=StopIteration)throw k;}else for(var m=0;m<f.length;m++)l(f[m])}function map(f,l){var k=[];forEach(f,function(m){k.push(l(m))});return k}function matcher(f){return function(l){return f.test(l)}}function hasClass(f,l){var k=f.className;return k&&RegExp("(^| )"+l+"($| )").test(k)}
2
+ function removeClass(f,l){f.className=f.className.replace(RegExp(" "+l+"\\b","g"),"");return f}function insertAfter(f,l){l.parentNode.insertBefore(f,l.nextSibling);return f}function removeElement(f){f.parentNode&&f.parentNode.removeChild(f)}function clearElement(f){for(;f.firstChild;)f.removeChild(f.firstChild)}function isAncestor(f,l){for(;l=l.parentNode;)if(f==l)return true;return false}var nbsp="\u00a0",matching={"{":"}","[":"]","(":")","}":"{","]":"[",")":"("};
3
+ function normalizeEvent(f){if(!f.stopPropagation){f.stopPropagation=function(){this.cancelBubble=true};f.preventDefault=function(){this.returnValue=false}}if(!f.stop)f.stop=function(){this.stopPropagation();this.preventDefault()};if(f.type=="keypress"){f.code=f.charCode==null?f.keyCode:f.charCode;f.character=String.fromCharCode(f.code)}return f}
4
+ function addEventHandler(f,l,k,m){function q(p){k(normalizeEvent(p||window.event))}if(typeof f.addEventListener=="function"){f.addEventListener(l,q,false);if(m)return function(){f.removeEventListener(l,q,false)}}else{f.attachEvent("on"+l,q);if(m)return function(){f.detachEvent("on"+l,q)}}}function nodeText(f){return f.textContent||f.innerText||f.nodeValue||""}function nodeTop(f){for(var l=0;f.offsetParent;){l+=f.offsetTop;f=f.offsetParent}return l}
5
+ function isBR(f){f=f.nodeName;return f=="BR"||f=="br"}function isSpan(f){f=f.nodeName;return f=="SPAN"||f=="span"};var stringStream=function(f){function l(){for(;m==k.length;){q+=k;k="";m=0;try{k=f.next()}catch(p){if(p!=StopIteration)throw p;else return false}}return true}var k="",m=0,q="";return{peek:function(){if(!l())return null;return k.charAt(m)},next:function(){if(!l())if(q.length>0)throw"End of stringstream reached without emptying buffer ('"+q+"').";else throw StopIteration;return k.charAt(m++)},get:function(){var p=q;q="";if(m>0){p+=k.slice(0,m);k=k.slice(m);m=0}return p},push:function(p){k=k.slice(0,
6
+ m)+p+k.slice(m)},lookAhead:function(p,w,a,d){function g(i){return d?i.toLowerCase():i}p=g(p);var b=false,c=q,e=m;for(a&&this.nextWhileMatches(/[\s\u00a0]/);;){a=m+p.length;var h=k.length-m;if(a<=k.length){b=p==g(k.slice(m,a));m=a;break}else if(p.slice(0,h)==g(k.slice(m))){q+=k;k="";try{k=f.next()}catch(j){if(j!=StopIteration)throw j;break}m=0;p=p.slice(h)}else break}if(!(b&&w)){k=q.slice(c.length)+k;m=e;q=c}return b},lookAheadRegex:function(p,w){if(p.source.charAt(0)!="^")throw Error("Regexps passed to lookAheadRegex must start with ^");
7
+ for(;k.indexOf("\n",m)==-1;)try{k+=f.next()}catch(a){if(a!=StopIteration)throw a;break}var d=k.slice(m).match(p);if(d&&w)m+=d[0].length;return d},more:function(){return this.peek()!==null},applies:function(p){var w=this.peek();return w!==null&&p(w)},nextWhile:function(p){for(var w;(w=this.peek())!==null&&p(w);)this.next()},matches:function(p){var w=this.peek();return w!==null&&p.test(w)},nextWhileMatches:function(p){for(var w;(w=this.peek())!==null&&p.test(w);)this.next()},equals:function(p){return p===
8
+ this.peek()},endOfLine:function(){var p=this.peek();return p==null||p=="\n"}}};var select={};
9
+ (function(){function f(b,c){for(;b&&b.parentNode!=c;)b=b.parentNode;return b}function l(b,c){for(;!b.previousSibling&&b.parentNode!=c;)b=b.parentNode;return f(b.previousSibling,c)}function k(b){var c=b.nextSibling;if(c){for(;c.firstChild;)c=c.firstChild;return c.nodeType==3||isBR(c)?c:k(c)}else{for(b=b.parentNode;b&&!b.nextSibling;)b=b.parentNode;return b&&k(b)}}select.ie_selection=document.selection&&document.selection.createRangeCollection;select.scrollToNode=function(b,c){if(b){for(var e=b,h=document.body,
10
+ j=document.documentElement,i=!e.nextSibling||!e.nextSibling.nextSibling||!e.nextSibling.nextSibling.nextSibling,n=0;e&&!e.offsetTop;){n++;e=e.previousSibling}if(n==0)i=false;if(!(webkit&&e&&e.offsetTop==5&&e.offsetLeft==5)){n=n*(e?e.offsetHeight:0);var r=0,t=b?b.offsetWidth:0;for(e=e;e&&e.offsetParent;){n+=e.offsetTop;isBR(e)||(r+=e.offsetLeft);e=e.offsetParent}e=h.scrollLeft||j.scrollLeft||0;h=h.scrollTop||j.scrollTop||0;var o=false,u=window.innerWidth||j.clientWidth||0;if(c||t<u){if(c){var x=select.offsetInNode(b),
11
+ s=nodeText(b).length;if(s)r+=t*(x/s)}t=r-e;if(t<0||t>u){e=r;o=true}}r=n-h;if(r<0||i||r>(window.innerHeight||j.clientHeight||0)-50){h=i?1E6:n;o=true}o&&window.scrollTo(e,h)}}};select.scrollToCursor=function(b){select.scrollToNode(select.selectionTopNode(b,true)||b.firstChild,true)};var m=null;select.snapshotChanged=function(){if(m)m.changed=true};select.snapshotReplaceNode=function(b,c,e,h){function j(i){if(b==i.node){m.changed=true;if(e&&i.offset>e)i.offset-=e;else{i.node=c;i.offset+=h||0}}else if(select.ie_selection&&
12
+ i.offset==0&&i.node==k(b))m.changed=true}if(m){j(m.start);j(m.end)}};select.snapshotMove=function(b,c,e,h,j){function i(n){if(b==n.node&&(!j||n.offset==0)){m.changed=true;n.node=c;n.offset=h?Math.max(0,n.offset+e):e}}if(m){i(m.start);i(m.end)}};if(select.ie_selection){var q=function(){var b=document.selection;return b&&(b.createRange||b.createTextRange)()},p=function(b){function c(t){for(var o=null;!o&&t;){o=t.nextSibling;t=t.parentNode}return e(o)}function e(t){for(;t&&t.firstChild;)t=t.firstChild;
13
+ return{node:t,offset:0}}var h=q();h.collapse(b);b=h.parentElement();if(!isAncestor(document.body,b))return null;if(!b.firstChild)return e(b);var j=h.duplicate();j.moveToElementText(b);j.collapse(true);for(var i=b.firstChild;i;i=i.nextSibling){if(i.nodeType==3){var n=i.nodeValue.length;j.move("character",n)}else{j.moveToElementText(i);j.collapse(false)}var r=h.compareEndPoints("StartToStart",j);if(r==0)return c(i);if(r!=1){if(i.nodeType!=3)return e(i);j.setEndPoint("StartToEnd",h);return{node:i,offset:n-
14
+ j.text.length}}}return c(b)};select.markSelection=function(){m=null;if(document.selection){var b=p(true),c=p(false);if(b&&c)m={start:b,end:c,changed:false}}};select.selectMarked=function(){function b(h){var j=document.body.createTextRange(),i=h.node;if(i)if(i.nodeType==3){j.moveToElementText(i.parentNode);for(h=h.offset;i.previousSibling;){i=i.previousSibling;h+=(i.innerText||"").length}j.move("character",h)}else{j.moveToElementText(i);j.collapse(true)}else{j.moveToElementText(document.body);j.collapse(false)}return j}
15
+ if(m&&m.changed){var c=b(m.start),e=b(m.end);c.setEndPoint("StartToEnd",e);c.select()}};select.offsetInNode=function(b){var c=q();if(!c)return 0;var e=c.duplicate();try{e.moveToElementText(b)}catch(h){return 0}c.setEndPoint("StartToStart",e);return c.text.length};select.selectionTopNode=function(b,c){function e(o,u){if(u.nodeType==3){for(var x=0,s=u.previousSibling;s&&s.nodeType==3;){x+=s.nodeValue.length;s=s.previousSibling}if(s){try{o.moveToElementText(s)}catch(v){return false}o.collapse(false)}else o.moveToElementText(u.parentNode);
16
+ x&&o.move("character",x)}else try{o.moveToElementText(u)}catch(y){return false}return true}var h=q();if(!h)return false;var j=h.duplicate();h.collapse(c);var i=h.parentElement();if(i&&isAncestor(b,i)){j.moveToElementText(i);if(h.compareEndPoints("StartToStart",j)==1)return f(i,b)}c=0;for(i=b.childNodes.length-1;c<i;){var n=Math.ceil((i+c)/2),r=b.childNodes[n];if(!r)return false;if(!e(j,r))return false;if(h.compareEndPoints("StartToStart",j)==1)c=n;else i=n-1}if(c==0){h=q();j=h.duplicate();try{j.moveToElementText(b)}catch(t){return null}if(h.compareEndPoints("StartToStart",
17
+ j)==0)return null}return b.childNodes[c]||null};select.focusAfterNode=function(b,c){var e=document.body.createTextRange();e.moveToElementText(b||c);e.collapse(!b);e.select()};select.somethingSelected=function(){var b=q();return b&&b.text!=""};var w=function(b){var c=q();if(c){c.pasteHTML(b);c.collapse(false);c.select()}};select.insertNewlineAtCursor=function(){w("<br>")};select.insertTabAtCursor=function(){w("\u00a0\u00a0\u00a0\u00a0")};select.cursorPos=function(b,c){var e=q();if(!e)return null;for(var h=
18
+ select.selectionTopNode(b,c);h&&!isBR(h);)h=h.previousSibling;var j=e.duplicate();e.collapse(c);if(h){j.moveToElementText(h);j.collapse(false)}else{try{j.moveToElementText(b)}catch(i){return null}j.collapse(true)}e.setEndPoint("StartToStart",j);return{node:h,offset:e.text.length}};select.setCursorPos=function(b,c,e){function h(i){var n=document.body.createTextRange();if(i.node){n.moveToElementText(i.node);n.collapse(false)}else{n.moveToElementText(b);n.collapse(true)}n.move("character",i.offset);
19
+ return n}var j=h(c);e&&e!=c&&j.setEndPoint("EndToEnd",h(e));j.select()};select.getBookmark=function(b){var c=select.cursorPos(b,true);b=select.cursorPos(b,false);if(c&&b)return{from:c,to:b}};select.setBookmark=function(b,c){c&&select.setCursorPos(b,c.from,c.to)}}else{var a=function(b,c){for(;b.nodeType!=3&&!isBR(b);){var e=b.childNodes[c]||b.nextSibling;for(c=0;!e&&b.parentNode;){b=b.parentNode;e=b.nextSibling}b=e;if(!e)break}return{node:b,offset:c}};select.markSelection=function(){var b=window.getSelection();
20
+ if(!b||b.rangeCount==0)return m=null;b=b.getRangeAt(0);m={start:a(b.startContainer,b.startOffset),end:a(b.endContainer,b.endOffset),changed:false}};select.selectMarked=function(){function b(){if(e.start.node==e.end.node&&e.start.offset==e.end.offset){var j=window.getSelection();if(!j||j.rangeCount==0)return true;j=j.getRangeAt(0);j=a(j.startContainer,j.startOffset);return e.start.node!=j.node||e.start.offset!=j.offset}}function c(j,i){if(j.node)j.offset==0?h["set"+i+"Before"](j.node):h["set"+i](j.node,
21
+ j.offset);else h.setStartAfter(document.body.lastChild||document.body)}var e=m;if(e&&(e.changed||webkit&&b())){var h=document.createRange();c(e.end,"End");c(e.start,"Start");d(h)}};var d=function(b){var c=window.getSelection();if(c){c.removeAllRanges();c.addRange(b)}},g=function(){var b=window.getSelection();return!b||b.rangeCount==0?false:b.getRangeAt(0)};select.selectionTopNode=function(b,c){var e=g();if(!e)return false;var h=c?e.startContainer:e.endContainer,j=c?e.startOffset:e.endOffset;window.opera&&
22
+ !c&&e.endContainer==b&&e.endOffset==e.startOffset+1&&b.childNodes[e.startOffset]&&isBR(b.childNodes[e.startOffset])&&j--;return h.nodeType==3?j>0?f(h,b):l(h,b):h.nodeName.toUpperCase()=="HTML"?j==1?null:b.lastChild:h==b?j==0?null:h.childNodes[j-1]:j==h.childNodes.length?f(h,b):j==0?l(h,b):f(h.childNodes[j-1],b)};select.focusAfterNode=function(b,c){var e=document.createRange();e.setStartBefore(c.firstChild||c);if(b&&!b.firstChild)e.setEndAfter(b);else b?e.setEnd(b,b.childNodes.length):e.setEndBefore(c.firstChild||
23
+ c);e.collapse(false);d(e)};select.somethingSelected=function(){var b=g();return b&&!b.collapsed};select.offsetInNode=function(b){var c=g();if(!c)return 0;c=c.cloneRange();c.setStartBefore(b);return c.toString().length};select.insertNodeAtCursor=function(b){var c=g();if(c){c.deleteContents();c.insertNode(b);webkitLastLineHack(document.body);if(window.opera&&isBR(b)&&isSpan(b.parentNode)){c=b.nextSibling;var e=b.parentNode,h=e.parentNode;h.insertBefore(b,e.nextSibling);for(e="";c&&c.nodeType==3;c=c.nextSibling){e+=
24
+ c.nodeValue;removeElement(c)}h.insertBefore(makePartSpan(e,document),b.nextSibling)}c=document.createRange();c.selectNode(b);c.collapse(false);d(c)}};select.insertNewlineAtCursor=function(){select.insertNodeAtCursor(document.createElement("BR"))};select.insertTabAtCursor=function(){select.insertNodeAtCursor(document.createTextNode("\u00a0\u00a0\u00a0\u00a0"))};select.cursorPos=function(b,c){var e=g();if(e){for(var h=select.selectionTopNode(b,c);h&&!isBR(h);)h=h.previousSibling;e=e.cloneRange();e.collapse(c);
25
+ h?e.setStartAfter(h):e.setStartBefore(b);e=e.toString();return{node:h,offset:e.length}}};select.setCursorPos=function(b,c,e){function h(i,n,r){function t(s){s.nodeType==3?o.push(s):forEach(s.childNodes,t)}if(n==0&&i&&!i.nextSibling){j["set"+r+"After"](i);return true}if(i=i?i.nextSibling:b.firstChild){if(n==0){j["set"+r+"Before"](i);return true}for(var o=[];;){for(;i&&!o.length;){t(i);i=i.nextSibling}var u=o.shift();if(!u)return false;var x=u.nodeValue.length;if(x>=n){j["set"+r](u,n);return true}n-=
26
+ x}}}var j=document.createRange();e=e||c;h(e.node,e.offset,"End")&&h(c.node,c.offset,"Start")&&d(j)}}})();function UndoHistory(f,l,k,m){this.container=f;this.maxDepth=l;this.commitDelay=k;this.editor=m;this.last=this.first=f={text:"",from:null,to:null};this.firstTouched=false;this.history=[];this.redoHistory=[];this.touched=[];this.lostundo=0}
27
+ UndoHistory.prototype={scheduleCommit:function(){var f=this;parent.clearTimeout(this.commitTimeout);this.commitTimeout=parent.setTimeout(function(){f.tryCommit()},this.commitDelay)},touch:function(f){this.setTouched(f);this.scheduleCommit()},undo:function(){this.commit();if(this.history.length){var f=this.history.pop();this.redoHistory.push(this.updateTo(f,"applyChain"));this.notifyEnvironment();return this.chainNode(f)}},redo:function(){this.commit();if(this.redoHistory.length){var f=this.redoHistory.pop();
28
+ this.addUndoLevel(this.updateTo(f,"applyChain"));this.notifyEnvironment();return this.chainNode(f)}},clear:function(){this.history=[];this.redoHistory=[];this.lostundo=0},historySize:function(){return{undo:this.history.length,redo:this.redoHistory.length,lostundo:this.lostundo}},push:function(f,l,k){for(var m=[],q=0;q<k.length;q++){var p=q==k.length-1?l:document.createElement("br");m.push({from:f,to:p,text:cleanText(k[q])});f=p}this.pushChains([m],f==null&&l==null);this.notifyEnvironment()},pushChains:function(f,
29
+ l){this.commit(l);this.addUndoLevel(this.updateTo(f,"applyChain"));this.redoHistory=[]},chainNode:function(f){for(var l=0;l<f.length;l++){var k=f[l][0];if(k=k&&(k.from||k.to))return k}},reset:function(){this.history=[];this.redoHistory=[];this.lostundo=0},textAfter:function(f){return this.after(f).text},nodeAfter:function(f){return this.after(f).to},nodeBefore:function(f){return this.before(f).from},tryCommit:function(){!window||!window.parent||!window.UndoHistory||(this.editor.highlightDirty()?this.commit(true):
30
+ this.scheduleCommit())},commit:function(f){parent.clearTimeout(this.commitTimeout);f||this.editor.highlightDirty(true);f=this.touchedChains();if(f.length){this.addUndoLevel(this.updateTo(f,"linkChain"));this.redoHistory=[];this.notifyEnvironment()}},updateTo:function(f,l){for(var k=[],m=[],q=0;q<f.length;q++){k.push(this.shadowChain(f[q]));m.push(this[l](f[q]))}l=="applyChain"&&this.notifyDirty(m);return k},notifyDirty:function(f){forEach(f,method(this.editor,"addDirtyNode"));this.editor.scheduleHighlight()},
31
+ notifyEnvironment:function(){this.onChange&&this.onChange(this.editor);window.frameElement&&window.frameElement.CodeMirror.updateNumbers&&window.frameElement.CodeMirror.updateNumbers()},linkChain:function(f){for(var l=0;l<f.length;l++){var k=f[l];if(k.from)k.from.historyAfter=k;else this.first=k;if(k.to)k.to.historyBefore=k;else this.last=k}},after:function(f){return f?f.historyAfter:this.first},before:function(f){return f?f.historyBefore:this.last},setTouched:function(f){if(f){if(!f.historyTouched){this.touched.push(f);
32
+ f.historyTouched=true}}else this.firstTouched=true},addUndoLevel:function(f){this.history.push(f);if(this.history.length>this.maxDepth){this.history.shift();lostundo+=1}},touchedChains:function(){function f(a,d){if(a)a.historyTemp=d;else q=d}function l(a){for(var d=[],g=a?a.nextSibling:m.container.firstChild;g&&(!isBR(g)||g.hackBR);g=g.nextSibling)!g.hackBR&&g.currentText&&d.push(g.currentText);return{from:a,to:g,text:cleanText(d.join(""))}}function k(a,d){for(var g=d+"Sibling",b=a[g];b&&!isBR(b);)b=
33
+ b[g];return b}var m=this,q=null,p=[];m.firstTouched&&m.touched.push(null);forEach(m.touched,function(a){if(!(a&&(a.parentNode!=m.container||a.hackBR))){if(a)a.historyTouched=false;else m.firstTouched=false;var d=l(a),g=m.after(a);if(!g||g.text!=d.text||g.to!=d.to){p.push(d);f(a,d)}}});var w=[];m.touched=[];forEach(p,function(a){if(a.from?a.from.historyTemp:q){for(var d=[],g=a.from,b=true;;){var c=g?g.historyTemp:q;if(!c)if(b)break;else c=l(g);d.unshift(c);f(g,null);if(!g)break;b=m.after(g);g=k(g,
34
+ "previous")}g=a.to;for(b=m.before(a.from);;){if(!g)break;c=g?g.historyTemp:q;if(!c)if(b)break;else c=l(g);d.push(c);f(g,null);b=m.before(g);g=k(g,"next")}w.push(d)}});return w},shadowChain:function(f){var l=[],k=this.after(f[0].from);for(f=f[f.length-1].to;;){l.push(k);k=k.to;if(!k||k==f)break;else k=k.historyAfter||this.before(f)}return l},applyChain:function(f){var l=select.cursorPos(this.container,false),k=this,m=f[0].from,q=f[f.length-1].to;(function(b,c){for(var e=b?b.nextSibling:k.container.firstChild;e!=
35
+ c;){var h=e.nextSibling;removeElement(e);e=h}})(m,q);for(var p=0;p<f.length;p++){var w=f[p];p>0&&k.container.insertBefore(w.from,q);var a=makePartSpan(fixSpaces(w.text));k.container.insertBefore(a,q);if(l&&l.node==w.from){a=0;var d=this.after(w.from);if(d&&p==f.length-1){for(var g=0;g<l.offset&&w.text.charAt(g)==d.text.charAt(g);g++);if(l.offset>g)a=w.text.length-d.text.length}select.setCursorPos(this.container,{node:w.from,offset:Math.max(0,l.offset+a)})}else l&&p==f.length-1&&l.node&&l.node.parentNode!=
36
+ this.container&&select.setCursorPos(this.container,{node:w.from,offset:w.text.length})}this.linkChain(f);return m}};var internetExplorer=document.selection&&window.ActiveXObject&&/MSIE/.test(navigator.userAgent),webkit=/AppleWebKit/.test(navigator.userAgent),safari=/Apple Computer, Inc/.test(navigator.vendor),gecko=navigator.userAgent.match(/gecko\/(\d{8})/i);if(gecko)gecko=Number(gecko[1]);var mac=/Mac/.test(navigator.platform),brokenOpera=window.opera&&/Version\/10.[56]/.test(navigator.userAgent),slowWebkit=/AppleWebKit\/533/.test(navigator.userAgent);
37
+ function makeWhiteSpace(f){for(var l=[],k=true;f>0;f--){l.push(k||f==1?nbsp:" ");k^=true}return l.join("")}function fixSpaces(f){if(f.charAt(0)==" ")f=nbsp+f.slice(1);return f.replace(/\t/g,function(){return makeWhiteSpace(indentUnit)}).replace(/[ \u00a0]{2,}/g,function(l){return makeWhiteSpace(l.length)})}function cleanText(f){return f.replace(/\u00a0/g," ").replace(/\u200b/g,"")}
38
+ function makePartSpan(f){var l=f;if(f.nodeType==3)l=f.nodeValue;else f=document.createTextNode(l);var k=document.createElement("span");k.isPart=true;k.appendChild(f);k.currentText=l;return k}function alwaysZero(){return 0}var webkitLastLineHack=webkit?function(f){var l=f.lastChild;if(!l||!l.hackBR){l=document.createElement("br");l.hackBR=true;f.appendChild(l)}}:function(){};
39
+ function asEditorLines(f){var l=makeWhiteSpace(indentUnit);return map(f.replace(/\t/g,l).replace(/\u00a0/g," ").replace(/\r\n?/g,"\n").split("\n"),fixSpaces)}
40
+ var Editor=function(){function f(a,d){function g(e,h){if(e.nodeType==3){if((e.nodeValue=fixSpaces(e.nodeValue.replace(/[\r\u200b]/g,"").replace(/\n/g," "))).length)c=false;b.push(e)}else if(isBR(e)&&e.childNodes.length==0){c=true;b.push(e)}else{for(var j=e.firstChild;j;j=j.nextSibling)g(j);if(!c&&w.hasOwnProperty(e.nodeName.toUpperCase())){c=true;if(!d||!h)b.push(document.createElement("br"))}}}var b=[],c=true;g(a,true);return b}function l(a){function d(e){var h=e.parentNode,j=e.nextSibling;return function(i){h.insertBefore(i,
41
+ j)}}var g=[],b=null,c=true;return{next:function(){if(!a)throw StopIteration;var e=a;a=e.nextSibling;var h;if(e.isPart&&e.childNodes.length==1&&e.firstChild.nodeType==3){h=e.firstChild.nodeValue;e.dirty=e.dirty||h!=e.currentText;e.currentText=h;h=!/[\n\t\r]/.test(e.currentText)}else h=false;if(h){g.push(e);c=false;return e.currentText}else if(isBR(e)){c&&window.opera&&e.parentNode.insertBefore(makePartSpan(""),e);g.push(e);c=true;return"\n"}else{h=!e.nextSibling;b=d(e);removeElement(e);e=f(e,h);for(h=
42
+ 0;h<e.length;h++){var j=e,i=h,n=e[h],r="\n";if(n.nodeType==3){select.snapshotChanged();n=makePartSpan(n);r=n.currentText;c=false}else{c&&window.opera&&b(makePartSpan(""));c=true}n.dirty=true;g.push(n);b(n);j[i]=r}return e.join("")}},nodes:g}}function k(a){for(;a&&!isBR(a);)a=a.previousSibling;return a}function m(a,d){if(a){if(isBR(a))a=a.nextSibling}else a=d.firstChild;for(;a&&!isBR(a);)a=a.nextSibling;return a}function q(a,d,g,b){function c(i){i=cleanText(a.history.textAfter(i));return b?i.toLowerCase():
43
+ i}this.editor=a;this.history=a.history;this.history.commit();this.valid=!!d;this.atOccurrence=false;if(b==undefined)b=typeof d=="string"&&d==d.toLowerCase();var e={node:null,offset:0},h=this;if(g&&typeof g=="object"&&typeof g.character=="number"){a.checkLine(g.line);g={node:g.line,offset:g.character};this.pos={from:g,to:g}}else this.pos=g?{from:select.cursorPos(a.container,true)||e,to:select.cursorPos(a.container,false)||e}:{from:e,to:e};if(typeof d!="string")this.matches=function(i,n,r){if(i){i=
44
+ c(n).slice(0,r);var t=i.match(d);for(r=0;t;){var o=i.indexOf(t[0]);r+=o;i=i.slice(o+1);if(o=i.match(d))t=o;else break}}else{i=c(n).slice(r);r=(t=i.match(d))&&r+i.indexOf(t[0])}if(t){h.currentMatch=t;return{from:{node:n,offset:r},to:{node:n,offset:r+t[0].length}}}};else{if(b)d=d.toLowerCase();var j=d.split("\n");this.matches=j.length==1?function(i,n,r){var t=c(n),o=d.length,u;if(i?r>=o&&(u=t.lastIndexOf(d,r-o))!=-1:(u=t.indexOf(d,r))!=-1)return{from:{node:n,offset:u},to:{node:n,offset:u+o}}}:function(i,
45
+ n,r){var t=i?j.length-1:0,o=j[t],u=c(n),x=i?u.indexOf(o)+o.length:u.lastIndexOf(o);if(!(i?x>=r||x!=o.length:x<=r||x!=u.length-o.length))for(r=n;;){if(i&&!r)break;r=i?this.history.nodeBefore(r):this.history.nodeAfter(r);if(!i&&!r)break;u=c(r);o=j[i?--t:++t];if(t>0&&t<j.length-1)if(u!=o)break;else continue;t=i?u.lastIndexOf(o):u.indexOf(o)+o.length;if(i?t!=u.length-o.length:t!=o.length)break;return{from:{node:i?r:n,offset:i?t:x},to:{node:i?n:r,offset:i?x:t}}}}}}function p(a){this.options=a;window.indentUnit=
46
+ a.indentUnit;var d=this.container=document.body;this.history=new UndoHistory(d,a.undoDepth,a.undoDelay,this);var g=this;if(!p.Parser)throw"No parser loaded.";a.parserConfig&&p.Parser.configure&&p.Parser.configure(a.parserConfig);!a.readOnly&&!internetExplorer&&select.setCursorPos(d,{node:null,offset:0});this.dirty=[];this.importCode(a.content||"");this.history.onChange=a.onChange;if(a.readOnly){if(!a.textWrapping)d.style.whiteSpace="nowrap"}else{if(a.continuousScanning!==false){this.scanner=this.documentScanner(a.passTime);
47
+ this.delayScanning()}var b=function(){if(document.body.contentEditable!=undefined&&internetExplorer)document.body.contentEditable="true";else document.designMode="on";if(internetExplorer&&a.height!="dynamic")document.body.style.minHeight=window.frameElement.clientHeight-2*document.body.offsetTop-5+"px";document.documentElement.style.borderWidth="0";if(!a.textWrapping)d.style.whiteSpace="nowrap"};try{b()}catch(c){var e=addEventHandler(document,"focus",function(){e();b()},true)}addEventHandler(document,
48
+ "keydown",method(this,"keyDown"));addEventHandler(document,"keypress",method(this,"keyPress"));addEventHandler(document,"keyup",method(this,"keyUp"));var h=function(){g.cursorActivity(false)};addEventHandler(internetExplorer?document.body:window,"mouseup",h);addEventHandler(document.body,"cut",h);gecko&&addEventHandler(window,"pagehide",function(){g.unloaded=true});addEventHandler(document.body,"paste",function(j){h();var i=null;try{var n=j.clipboardData||window.clipboardData;if(n)i=n.getData("Text")}catch(r){}if(i!==
49
+ null){j.stop();g.replaceSelection(i);select.scrollToCursor(g.container)}});this.options.autoMatchParens&&addEventHandler(document.body,"click",method(this,"scheduleParenHighlight"))}}var w={P:true,DIV:true,LI:true};q.prototype={findNext:function(){return this.find(false)},findPrevious:function(){return this.find(true)},find:function(a){function d(){var h={node:c,offset:e};g.pos={from:h,to:h};return g.atOccurrence=false}if(!this.valid)return false;var g=this,b=a?this.pos.from:this.pos.to,c=b.node,
50
+ e=b.offset;if(c&&!c.parentNode){c=null;e=0}for(;;){if(this.pos=this.matches(a,c,e))return this.atOccurrence=true;if(a){if(!c)return d();c=this.history.nodeBefore(c);e=this.history.textAfter(c).length}else{b=this.history.nodeAfter(c);if(!b){e=this.history.textAfter(c).length;return d()}c=b;e=0}}},select:function(){if(this.atOccurrence){select.setCursorPos(this.editor.container,this.pos.from,this.pos.to);select.scrollToCursor(this.editor.container)}},replace:function(a){if(this.atOccurrence){var d=
51
+ this.currentMatch;if(d)a=a.replace(/\\(\d)/,function(g,b){return d[b]});this.pos.to=this.editor.replaceRange(this.pos.from,this.pos.to,a);this.atOccurrence=false}},position:function(){if(this.atOccurrence)return{line:this.pos.from.node,character:this.pos.from.offset}}};p.prototype={importCode:function(a){var d=asEditorLines(a);if(!this.options.incrementalLoading||d.length<1E3){this.history.push(null,null,d);this.history.reset()}else{var g=0,b=this,c=function(){var e=d.slice(g,g+1E3);e.push("");b.history.push(b.history.nodeBefore(null),
52
+ null,e);b.history.reset();g+=1E3;g<d.length&&parent.setTimeout(c,1E3)};c()}},getCode:function(){if(!this.container.firstChild)return"";var a=[];select.markSelection();forEach(l(this.container.firstChild),method(a,"push"));select.selectMarked();webkit&&this.container.lastChild.hackBR&&a.pop();webkitLastLineHack(this.container);return cleanText(a.join(""))},checkLine:function(a){if(a===false||!(a==null||a.parentNode==this.container||a.hackBR))throw parent.CodeMirror.InvalidLineHandle;},cursorPosition:function(a){if(a==
53
+ null)a=true;return(a=select.cursorPos(this.container,a))?{line:a.node,character:a.offset}:{line:null,character:0}},firstLine:function(){return null},lastLine:function(){var a=this.container.lastChild;if(a)a=k(a);if(a&&a.hackBR)a=k(a.previousSibling);return a},nextLine:function(a){this.checkLine(a);a=m(a,this.container);return!a||a.hackBR?false:a},prevLine:function(a){this.checkLine(a);if(a==null)return false;return k(a.previousSibling)},visibleLineCount:function(){for(var a=this.container.firstChild;a&&
54
+ isBR(a);)a=a.nextSibling;if(!a)return false;return Math.floor((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)/a.offsetHeight)},selectLines:function(a,d,g,b){this.checkLine(a);a={node:a,offset:d};d=null;if(b!==undefined){this.checkLine(g);d={node:g,offset:b}}select.setCursorPos(this.container,a,d);select.scrollToCursor(this.container)},lineContent:function(a){var d=[];for(a=a?a.nextSibling:this.container.firstChild;a&&!isBR(a);a=a.nextSibling)d.push(nodeText(a));
55
+ return cleanText(d.join(""))},setLineContent:function(a,d){this.history.commit();this.replaceRange({node:a,offset:0},{node:a,offset:this.history.textAfter(a).length},d);this.addDirtyNode(a);this.scheduleHighlight()},removeLine:function(a){for(var d=a?a.nextSibling:this.container.firstChild;d;){var g=d.nextSibling;removeElement(d);if(isBR(d))break;d=g}this.addDirtyNode(a);this.scheduleHighlight()},insertIntoLine:function(a,d,g){var b=null;if(d=="end")b=m(a,this.container);else for(var c=a?a.nextSibling:
56
+ this.container.firstChild;c;c=c.nextSibling){if(d==0){b=c;break}var e=nodeText(c);if(e.length>d){b=c.nextSibling;g=e.slice(0,d)+g+e.slice(d);removeElement(c);break}d-=e.length}d=asEditorLines(g);for(g=0;g<d.length;g++){g>0&&this.container.insertBefore(document.createElement("BR"),b);this.container.insertBefore(makePartSpan(d[g]),b)}this.addDirtyNode(a);this.scheduleHighlight()},selectedText:function(){var a=this.history;a.commit();var d=select.cursorPos(this.container,true),g=select.cursorPos(this.container,
57
+ false);if(!d||!g)return"";if(d.node==g.node)return a.textAfter(d.node).slice(d.offset,g.offset);var b=[a.textAfter(d.node).slice(d.offset)];for(d=a.nodeAfter(d.node);d!=g.node;d=a.nodeAfter(d))b.push(a.textAfter(d));b.push(a.textAfter(g.node).slice(0,g.offset));return cleanText(b.join("\n"))},replaceSelection:function(a){this.history.commit();var d=select.cursorPos(this.container,true),g=select.cursorPos(this.container,false);if(d&&g){g=this.replaceRange(d,g,a);select.setCursorPos(this.container,
58
+ g);webkitLastLineHack(this.container)}},cursorCoords:function(a,d){function g(i,n){var r=-(document.body.scrollTop||document.documentElement.scrollTop||0),t=-(document.body.scrollLeft||document.documentElement.scrollLeft||0)+n;forEach([i,d?null:window.frameElement],function(o){for(;o;){t+=o.offsetLeft;r+=o.offsetTop;o=o.offsetParent}});return{x:t,y:r,yBot:r+i.offsetHeight}}function b(i,n){var r=document.createElement("SPAN");r.appendChild(document.createTextNode(i));try{return n(r)}finally{r.parentNode&&
59
+ r.parentNode.removeChild(r)}}var c=select.cursorPos(this.container,a);if(!c)return null;for(var e=c.offset,h=c.node,j=this;e;){h=h?h.nextSibling:this.container.firstChild;c=nodeText(h);if(e<c.length)return b(c.substr(0,e),function(i){i.style.position="absolute";i.style.visibility="hidden";i.className=h.className;j.container.appendChild(i);return g(h,i.offsetWidth)});e-=c.length}return h&&isSpan(h)?g(h,h.offsetWidth):h&&h.nextSibling&&isSpan(h.nextSibling)?g(h.nextSibling,0):b("\u200b",function(i){h?
60
+ h.parentNode.insertBefore(i,h.nextSibling):j.container.insertBefore(i,j.container.firstChild);return g(i,0)})},reroutePasteEvent:function(){if(!(this.capturingPaste||window.opera||gecko&&gecko>=20101026)){this.capturingPaste=true;var a=window.frameElement.CodeMirror.textareaHack,d=this.cursorCoords(true,true);a.style.top=d.y+"px";if(internetExplorer)if(d=select.getBookmark(this.container))this.selectionSnapshot=d;parent.focus();a.value="";a.focus();var g=this;parent.setTimeout(function(){g.capturingPaste=
61
+ false;window.focus();g.selectionSnapshot&&window.select.setBookmark(g.container,g.selectionSnapshot);var b=a.value;if(b){g.replaceSelection(b);select.scrollToCursor(g.container)}},10)}},replaceRange:function(a,d,g){g=asEditorLines(g);g[0]=this.history.textAfter(a.node).slice(0,a.offset)+g[0];var b=g[g.length-1];g[g.length-1]=b+this.history.textAfter(d.node).slice(d.offset);d=this.history.nodeAfter(d.node);this.history.push(a.node,d,g);return{node:this.history.nodeBefore(d),offset:b.length}},getSearchCursor:function(a,
62
+ d,g){return new q(this,a,d,g)},reindent:function(){this.container.firstChild&&this.indentRegion(null,this.container.lastChild)},reindentSelection:function(a){if(select.somethingSelected()){var d=select.selectionTopNode(this.container,true),g=select.selectionTopNode(this.container,false);d===false||g===false||this.indentRegion(d,g,a)}else this.indentAtCursor(a)},grabKeys:function(a,d){this.frozen=a;this.keyFilter=d},ungrabKeys:function(){this.frozen="leave"},setParser:function(a,d){p.Parser=window[a];
63
+ (d=d||this.options.parserConfig)&&p.Parser.configure&&p.Parser.configure(d);if(this.container.firstChild){forEach(this.container.childNodes,function(g){if(g.nodeType!=3)g.dirty=true});this.addDirtyNode(this.firstChild);this.scheduleHighlight()}},keyDown:function(a){if(this.frozen=="leave")this.keyFilter=this.frozen=null;if(this.frozen&&(!this.keyFilter||this.keyFilter(a.keyCode,a))){a.stop();this.frozen(a)}else{var d=a.keyCode;this.delayScanning();this.options.autoMatchParens&&this.scheduleParenHighlight();
64
+ if(d==13){if(a.ctrlKey&&!a.altKey)this.reparseBuffer();else{select.insertNewlineAtCursor();d=this.options.enterMode;if(d!="flat")this.indentAtCursor(d=="keep"?"keep":undefined);select.scrollToCursor(this.container)}a.stop()}else if(d==9&&this.options.tabMode!="default"&&!a.ctrlKey){this.handleTab(!a.shiftKey);a.stop()}else if(d==32&&a.shiftKey&&this.options.tabMode=="default"){this.handleTab(true);a.stop()}else if(d==36&&!a.shiftKey&&!a.ctrlKey)this.home()&&a.stop();else if(d==35&&!a.shiftKey&&!a.ctrlKey)this.end()&&
65
+ a.stop();else if(d==33&&!a.shiftKey&&!a.ctrlKey&&!gecko)this.pageUp()&&a.stop();else if(d==34&&!a.shiftKey&&!a.ctrlKey&&!gecko)this.pageDown()&&a.stop();else if((d==219||d==221)&&a.ctrlKey&&!a.altKey){this.highlightParens(a.shiftKey,true);a.stop()}else if(a.metaKey&&!a.shiftKey&&(d==37||d==39)){var g=select.selectionTopNode(this.container);if(!(g===false||!this.container.firstChild)){if(d==37)select.focusAfterNode(k(g),this.container);else{d=m(g,this.container);select.focusAfterNode(d?d.previousSibling:
66
+ this.container.lastChild,this.container)}a.stop()}}else if((a.ctrlKey||a.metaKey)&&!a.altKey)if(a.shiftKey&&d==90||d==89){select.scrollToNode(this.history.redo());a.stop()}else if(d==90||safari&&d==8){select.scrollToNode(this.history.undo());a.stop()}else if(d==83&&this.options.saveFunction){this.options.saveFunction();a.stop()}else d==86&&!mac&&this.reroutePasteEvent()}},keyPress:function(a){var d=this.options.electricChars&&p.Parser.electricChars,g=this;if(this.frozen&&(!this.keyFilter||this.keyFilter(a.keyCode||
67
+ a.code,a))||a.code==13||a.code==9&&this.options.tabMode!="default"||a.code==32&&a.shiftKey&&this.options.tabMode=="default")a.stop();else if(mac&&(a.ctrlKey||a.metaKey)&&a.character=="v")this.reroutePasteEvent();else if(d&&d.indexOf(a.character)!=-1)parent.setTimeout(function(){g.indentAtCursor(null)},0);else if(brokenOpera)if(a.code==8){var b=select.selectionTopNode(this.container);g=this;var c=b?b.nextSibling:this.container.firstChild;b!==false&&c&&isBR(c)&&parent.setTimeout(function(){select.selectionTopNode(g.container)==
68
+ c&&select.focusAfterNode(c.previousSibling,g.container)},20)}else{if(a.code==46){b=select.selectionTopNode(this.container);g=this;b&&isBR(b)&&parent.setTimeout(function(){select.selectionTopNode(g.container)!=b&&select.focusAfterNode(b,g.container)},20)}}else if(slowWebkit){c=(b=select.selectionTopNode(this.container))?b.nextSibling:this.container.firstChild;if(b&&c&&isBR(c)&&!isBR(b)){var e=document.createTextNode("\u200b");this.container.insertBefore(e,c);parent.setTimeout(function(){if(e.nodeValue==
69
+ "\u200b")removeElement(e);else e.nodeValue=e.nodeValue.replace("\u200b","")},20)}}webkit&&!this.options.textWrapping&&setTimeout(function(){var h=select.selectionTopNode(g.container,true);h&&h.nodeType==3&&h.previousSibling&&isBR(h.previousSibling)&&h.nextSibling&&isBR(h.nextSibling)&&h.parentNode.replaceChild(document.createElement("BR"),h.previousSibling)},50)},keyUp:function(a){this.cursorActivity(a.keyCode>=16&&a.keyCode<=18||a.keyCode>=33&&a.keyCode<=40)},indentLineAfter:function(a,d){function g(n){n=
70
+ n?n.nextSibling:b.container.firstChild;if(!n||!hasClass(n,"whitespace"))return null;return n}var b=this,c=g(a),e=0,h=c?c.currentText.length:0,j=c?c.nextSibling:a?a.nextSibling:this.container.firstChild;if(d=="keep"){if(a){var i=g(k(a.previousSibling));if(i)e=i.currentText.length}}else{i=a&&j&&j.currentText?j.currentText:"";if(d!=null&&this.options.tabMode=="shift")e=d?h+indentUnit:Math.max(0,h-indentUnit);else if(a)e=a.indentation(i,h,d,j);else if(p.Parser.firstIndentation)e=p.Parser.firstIndentation(i,
71
+ h,d,j)}h=e-h;if(h<0)if(e==0){if(j)select.snapshotMove(c.firstChild,j.firstChild||j,0);removeElement(c);c=null}else{select.snapshotMove(c.firstChild,c.firstChild,h,true);c.currentText=makeWhiteSpace(e);c.firstChild.nodeValue=c.currentText}else if(h>0)if(c){c.currentText=makeWhiteSpace(e);c.firstChild.nodeValue=c.currentText;select.snapshotMove(c.firstChild,c.firstChild,h,true)}else{c=makePartSpan(makeWhiteSpace(e));c.className="whitespace";a?insertAfter(c,a):this.container.insertBefore(c,this.container.firstChild);
72
+ select.snapshotMove(j&&(j.firstChild||j),c.firstChild,e,false,true)}else c&&select.snapshotMove(c.firstChild,c.firstChild,e,false);h!=0&&this.addDirtyNode(a)},highlightAtCursor:function(){var a=select.selectionTopNode(this.container,true),d=select.selectionTopNode(this.container,false);if(a===false||d===false)return false;select.markSelection();if(this.highlight(a,m(d,this.container),true,20)===false)return false;select.selectMarked();return true},handleTab:function(a){this.options.tabMode=="spaces"?
73
+ select.insertTabAtCursor():this.reindentSelection(a)},home:function(){var a=select.selectionTopNode(this.container,true),d=a;if(a===false||!(!a||a.isPart||isBR(a))||!this.container.firstChild)return false;for(;a&&!isBR(a);)a=a.previousSibling;var g=a?a.nextSibling:this.container.firstChild;g&&g!=d&&g.isPart&&hasClass(g,"whitespace")?select.focusAfterNode(g,this.container):select.focusAfterNode(a,this.container);select.scrollToCursor(this.container);return true},end:function(){var a=select.selectionTopNode(this.container,
74
+ true);if(a===false)return false;a=m(a,this.container);if(!a)return false;select.focusAfterNode(a.previousSibling,this.container);select.scrollToCursor(this.container);return true},pageUp:function(){var a=this.cursorPosition().line,d=this.visibleLineCount();if(a===false||d===false)return false;d-=2;for(var g=0;g<d;g++){a=this.prevLine(a);if(a===false)break}if(g==0)return false;select.setCursorPos(this.container,{node:a,offset:0});select.scrollToCursor(this.container);return true},pageDown:function(){var a=
75
+ this.cursorPosition().line,d=this.visibleLineCount();if(a===false||d===false)return false;d-=2;for(var g=0;g<d;g++){var b=this.nextLine(a);if(b===false)break;a=b}if(g==0)return false;select.setCursorPos(this.container,{node:a,offset:0});select.scrollToCursor(this.container);return true},scheduleParenHighlight:function(){this.parenEvent&&parent.clearTimeout(this.parenEvent);var a=this;this.parenEvent=parent.setTimeout(function(){a.highlightParens()},300)},highlightParens:function(a,d){function g(u,
76
+ x){if(u)if(j)if(j.call)j(u,x);else u.className+=" "+j[x?0:1];else{u.style.fontWeight="bold";u.style.color=x?"#8F8":"#F88"}}function b(u){if(u)if(j&&!j.call)removeClass(removeClass(u,j[0]),j[1]);else if(h.options.unmarkParen)h.options.unmarkParen(u);else{u.style.fontWeight="";u.style.color=""}}function c(u){if(u.currentText)return(u=u.currentText.match(/^[\s\u00a0]*([\(\)\[\]{}])[\s\u00a0]*$/))&&u[1]}function e(){for(var u=[],x,s=true,v=n;v;v=t?v.nextSibling:v.previousSibling)if(v.className==r&&isSpan(v)&&
77
+ (x=c(v))){if(/[\(\[\{]/.test(x)==t)u.push(x);else if(u.length){if(u.pop()!=matching[x])s=false}else s=false;if(!u.length)break}else if(v.dirty||!isSpan(v)&&!isBR(v))return{node:v,status:"dirty"};return{node:v,status:v&&s}}var h=this,j=this.options.markParen;if(typeof j=="string")j=[j,j];if(!d&&h.highlighted){b(h.highlighted[0]);b(h.highlighted[1])}if(!(!window||!window.parent||!window.select)){this.parenEvent&&parent.clearTimeout(this.parenEvent);this.parenEvent=null;var i,n=select.selectionTopNode(this.container,
78
+ true);if(n&&this.highlightAtCursor())if((n=select.selectionTopNode(this.container,true))&&((i=c(n))||(n=n.nextSibling)&&(i=c(n))))for(var r=n.className,t=/[\(\[\{]/.test(i);;){var o=e();if(o.status=="dirty"){this.highlight(o.node,m(o.node));o.node.dirty=false}else{g(n,o.status);g(o.node,o.status);if(d)parent.setTimeout(function(){b(n);b(o.node)},500);else h.highlighted=[n,o.node];a&&o.node&&select.focusAfterNode(o.node.previousSibling,this.container);break}}}},indentAtCursor:function(a){if(this.container.firstChild)if(this.highlightAtCursor()){var d=
79
+ select.selectionTopNode(this.container,false);if(d!==false){select.markSelection();this.indentLineAfter(k(d),a);select.selectMarked()}}},indentRegion:function(a,d,g){var b=a=k(a),c=a&&k(a.previousSibling);isBR(d)||(d=m(d,this.container));this.addDirtyNode(a);do{var e=m(b,this.container);b&&this.highlight(c,e,true);this.indentLineAfter(b,g);c=b;b=e}while(b!=d);select.setCursorPos(this.container,{node:a,offset:0},{node:d,offset:0})},cursorActivity:function(a){if(this.unloaded){window.document.designMode=
80
+ "off";window.document.designMode="on";this.unloaded=false}if(internetExplorer){this.container.createTextRange().execCommand("unlink");clearTimeout(this.saveSelectionSnapshot);var d=this;this.saveSelectionSnapshot=setTimeout(function(){var c=select.getBookmark(d.container);if(c)d.selectionSnapshot=c},200)}var g=this.options.onCursorActivity;if(!a||g){var b=select.selectionTopNode(this.container,false);if(!(b===false||!this.container.firstChild)){b=b||this.container.firstChild;g&&g(b);if(!a){this.scheduleHighlight();
81
+ this.addDirtyNode(b)}}}},reparseBuffer:function(){forEach(this.container.childNodes,function(a){a.dirty=true});this.container.firstChild&&this.addDirtyNode(this.container.firstChild)},addDirtyNode:function(a){if(a=a||this.container.firstChild){for(var d=0;d<this.dirty.length;d++)if(this.dirty[d]==a)return;if(a.nodeType!=3)a.dirty=true;this.dirty.push(a)}},allClean:function(){return!this.dirty.length},scheduleHighlight:function(){var a=this;parent.clearTimeout(this.highlightTimeout);this.highlightTimeout=
82
+ parent.setTimeout(function(){a.highlightDirty()},this.options.passDelay)},getDirtyNode:function(){for(;this.dirty.length>0;){var a=this.dirty.pop();try{for(;a&&a.parentNode!=this.container;)a=a.parentNode;if(a&&(a.dirty||a.nodeType==3))return a}catch(d){}}return null},highlightDirty:function(a){if(!window||!window.parent||!window.select)return false;this.options.readOnly||select.markSelection();for(var d,g=a?null:(new Date).getTime()+this.options.passTime;((new Date).getTime()<g||a)&&(d=this.getDirtyNode());){var b=
83
+ this.highlight(d,g);b&&b.node&&b.dirty&&this.addDirtyNode(b.node.nextSibling)}this.options.readOnly||select.selectMarked();d&&this.scheduleHighlight();return this.dirty.length==0},documentScanner:function(a){var d=this,g=null;return function(){if(!(!window||!window.parent||!window.select)){if(g&&g.parentNode!=d.container)g=null;select.markSelection();var b=d.highlight(g,(new Date).getTime()+a,true);select.selectMarked();b=b?b.node&&b.node.nextSibling:null;g=g==b?null:b;d.delayScanning()}}},delayScanning:function(){if(this.scanner){parent.clearTimeout(this.documentScan);
84
+ this.documentScan=parent.setTimeout(this.scanner,this.options.continuousScanning)}},highlight:function(a,d,g,b){function c(s){if(s){var v=s.oldNextSibling;if(o||v===undefined||s.nextSibling!=v)h.history.touch(s);s.oldNextSibling=s.nextSibling}else{v=h.container.oldFirstChild;if(o||v===undefined||h.container.firstChild!=v)h.history.touch(null);h.container.oldFirstChild=h.container.firstChild}}var e=this.container,h=this,j=this.options.activeTokens,i=typeof d=="number"?d:null;if(!e.firstChild)return false;
85
+ for(;a&&(!a.parserFromHere||a.dirty);){if(b!=null&&isBR(a)&&--b<0)return false;a=a.previousSibling}if(a&&!a.nextSibling)return false;var n=l(a?a.nextSibling:e.firstChild);b=stringStream(n);var r=a?a.parserFromHere(b):p.Parser.make(b),t={current:null,get:function(){if(!this.current)this.current=n.nodes.shift();return this.current},next:function(){this.current=null},remove:function(){e.removeChild(this.get());this.current=null},getNonEmpty:function(){for(var s=this.get();s&&isSpan(s)&&s.currentText==
86
+ "";)if(window.opera&&(s.previousSibling==null||isBR(s.previousSibling))&&(s.nextSibling==null||isBR(s.nextSibling))){this.next();s=this.get()}else{var v=s;this.remove();s=this.get();select.snapshotMove(v.firstChild,s&&(s.firstChild||s),0)}return s}},o=false,u=true,x=0;forEach(r,function(s){var v=t.getNonEmpty();if(s.value=="\n"){if(!isBR(v))throw"Parser out of sync. Expected BR.";if(v.dirty||!v.indentation)o=true;c(a);a=v;v.parserFromHere=r.copy();v.indentation=s.indentation||alwaysZero;v.dirty=false;
87
+ if(i==null&&v==d)throw StopIteration;if(i!=null&&(new Date).getTime()>=i||!o&&!u&&x>1&&!g)throw StopIteration;u=o;o=false;x=0;t.next()}else{if(!isSpan(v))throw"Parser out of sync. Expected SPAN.";if(v.dirty)o=true;x++;if(!v.reduced&&v.currentText==s.value&&v.className==s.style){j&&v.dirty&&j(v,s,h);v.dirty=false;t.next()}else{o=true;var y=makePartSpan(s.value);y.className=s.style;e.insertBefore(y,v);j&&j(y,s,h);s=s.value.length;for(var A=0;s>0;){v=t.get();var z=v.currentText.length;select.snapshotReplaceNode(v.firstChild,
88
+ y.firstChild,s,A);if(z>s){v=v;v.currentText=v.currentText.substring(s);v.reduced=true;s=0}else{s-=z;A+=z;t.remove()}}}}});c(a);webkitLastLineHack(this.container);return{node:t.getNonEmpty(),dirty:o}}};return p}();addEventHandler(window,"load",function(){var f=window.frameElement.CodeMirror;f.editor=new Editor(f.options);parent.setTimeout(method(f,"init"),0)});function tokenizer(f,l){function k(q){return q!="\n"&&/^[\s\u00a0]*$/.test(q)}var m={state:l,take:function(q){if(typeof q=="string")q={style:q,type:q};q.content=(q.content||"")+f.get();/\n$/.test(q.content)||f.nextWhile(k);q.value=q.content+f.get();return q},next:function(){if(!f.more())throw StopIteration;var q;if(f.equals("\n")){f.next();return this.take("whitespace")}if(f.applies(k))q="whitespace";else for(;!q;)q=this.state(f,function(p){m.state=p});return this.take(q)}};return m};
@@ -0,0 +1,4 @@
1
+ var CSSParser=Editor.Parser=function(){function l(h,j,g){return function(e){return!h||/^\}/.test(e)?g:j?g+indentUnit*2:g+indentUnit}}var k=function(){function h(a,d){var b=a.next();if(b=="@"){a.nextWhileMatches(/\w/);return"css-at"}else if(b=="/"&&a.equals("*")){d(j);return null}else if(b=="<"&&a.equals("!")){d(g);return null}else if(b=="=")return"css-compare";else if(a.equals("=")&&(b=="~"||b=="|")){a.next();return"css-compare"}else if(b=='"'||b=="'"){d(e(b));return null}else if(b=="#"){a.nextWhileMatches(/\w/);
2
+ return"css-hash"}else if(b=="!"){a.nextWhileMatches(/[ \t]/);a.nextWhileMatches(/\w/);return"css-important"}else if(/\d/.test(b)){a.nextWhileMatches(/[\w.%]/);return"css-unit"}else if(/[,.+>*\/]/.test(b))return"css-select-op";else if(/[;{}:\[\]]/.test(b))return"css-punctuation";else{a.nextWhileMatches(/[\w\\\-_]/);return"css-identifier"}}function j(a,d){for(var b=false;!a.endOfLine();){var c=a.next();if(b&&c=="/"){d(h);break}b=c=="*"}return"css-comment"}function g(a,d){for(var b=0;!a.endOfLine();){var c=
3
+ a.next();if(b>=2&&c==">"){d(h);break}b=c=="-"?b+1:0}return"css-comment"}function e(a){return function(d,b){for(var c=false;!d.endOfLine();){var f=d.next();if(f==a&&!c)break;c=!c&&f=="\\"}c||b(h);return"css-string"}}return function(a,d){return tokenizer(a,d||h)}}();return{make:function(h,j){j=j||0;var g=k(h),e=false,a=false,d=false,b={next:function(){var c=g.next(),f=c.style,i=c.content;if(f=="css-hash")f=c.style=a?"css-colorcode":"css-identifier";if(f=="css-identifier")if(a)c.style="css-value";else if(!e&&
4
+ !d)c.style="css-selector";if(i=="\n")c.indentation=l(e,a,j);if(i=="{"&&d=="@media")d=false;else if(i=="{")e=true;else if(i=="}")e=a=d=false;else if(i==";")a=d=false;else if(e&&f!="css-comment"&&f!="whitespace")a=true;else if(!e&&f=="css-at")d=i;return c},copy:function(){var c=e,f=a,i=g.state;return function(m){g=k(m,i);e=c;a=f;return b}}};return b},electricChars:"}"}}();
@@ -0,0 +1,3 @@
1
+ var HTMLMixedParser=Editor.Parser=function(){function p(){var a=["XMLParser"],g;for(g in j)a.push(j[g]);for(var k in a)if(!window[a[k]])throw Error(a[k]+" parser must be loaded for HTML mixed mode to work.");XMLParser.configure({useHTMLKludges:true})}var j={script:"JSParser",style:"CSSParser"};return{make:function(a){function g(){var d=l.next();if(d.content=="<")e=true;else if(d.style=="xml-tagname"&&e===true)e=d.content.toLowerCase();else if(d.content==">"){if(j[e])h.next=k(window[j[e]],"</"+e);
2
+ e=false}return d}function k(d,f){var m=l.indentation();i=d.make(a,m+indentUnit);return function(){if(a.lookAhead(f,false,false,true)){i=null;h.next=g;return g()}var b=i.next(),c=b.value.lastIndexOf("<"),n=Math.min(b.value.length-c,f.length);if(c!=-1&&b.value.slice(c,c+n).toLowerCase()==f.slice(0,n)&&a.lookAhead(f.slice(n),false,false,true)){a.push(b.value.slice(c));b.value=b.value.slice(0,c)}if(b.indentation){var q=b.indentation;b.indentation=function(o){return o=="</"?m:q(o)}}return b}}p();var l=
3
+ XMLParser.make(a),i=null,e=false,h={next:g,copy:function(){var d=l.copy(),f=i&&i.copy(),m=h.next,b=e;return function(c){a=c;l=d(c);i=f&&f(c);h.next=m;e=b;return h}}};return h},electricChars:"{}/:",configure:function(a){if(a.triggers)j=a.triggers}}}();
@@ -0,0 +1,12 @@
1
+ var tokenizeJavaScript=function(){function w(a,f){for(var c=false;!a.endOfLine();){var k=a.next();if(k==f&&!c)return false;c=!c&&k=="\\"}return c}function C(a,f){return function(c,k){var o=a,e=D(a,f,c,function(h){o=h}),g=e.type=="operator"||e.type=="keyword c"||e.type.match(/^[\[{}\(,;:]$/);if(g!=f||o!=a)k(C(o,g));return e}}function D(a,f,c,k){function o(){c.nextWhileMatches(r);var m=c.get(),l=x.hasOwnProperty(m)&&x.propertyIsEnumerable(m)&&x[m];return l?{type:l.type,style:l.style,content:m}:{type:"variable",
2
+ style:"js-variable",content:m}}function e(m){var l="/*";for(m=m=="*";;){if(c.endOfLine())break;var i=c.next();if(i=="/"&&m){l=null;break}m=i=="*"}k(l);return{type:"comment",style:"js-comment"}}function g(){c.nextWhileMatches(j);return{type:"operator",style:"js-operator"}}function h(m){var l=w(c,m);k(l?m:null);return{type:"string",style:"js-string"}}if(a=='"'||a=="'")return h(a);var n=c.next();if(a=="/*")return e(n);else if(n=='"'||n=="'")return h(n);else if(/[\[\]{}\(\),;\:\.]/.test(n))return{type:n,
3
+ style:"js-punctuation"};else if(n=="0"&&(c.equals("x")||c.equals("X"))){c.next();c.nextWhileMatches(s);return{type:"number",style:"js-atom"}}else if(/[0-9]/.test(n)){c.nextWhileMatches(/[0-9]/);if(c.equals(".")){c.next();c.nextWhileMatches(/[0-9]/)}if(c.equals("e")||c.equals("E")){c.next();c.equals("-")&&c.next();c.nextWhileMatches(/[0-9]/)}return{type:"number",style:"js-atom"}}else if(n=="/")if(c.equals("*")){c.next();return e(n)}else if(c.equals("/")){w(c,null);return{type:"comment",style:"js-comment"}}else{if(f){w(c,
4
+ "/");c.nextWhileMatches(/[gimy]/);a={type:"regexp",style:"js-string"}}else a=g();return a}else return j.test(n)?g():o()}var x=function(){function a(g,h){return{type:g,style:"js-"+h}}var f=a("keyword a","keyword"),c=a("keyword b","keyword"),k=a("keyword c","keyword"),o=a("operator","keyword"),e=a("atom","atom");return{"if":f,"while":f,"with":f,"else":c,"do":c,"try":c,"finally":c,"return":k,"break":k,"continue":k,"new":k,"delete":k,"throw":k,"in":o,"typeof":o,"instanceof":o,"var":a("var","keyword"),
5
+ "function":a("function","keyword"),"catch":a("catch","keyword"),"for":a("for","keyword"),"switch":a("switch","keyword"),"case":a("case","keyword"),"default":a("default","keyword"),"true":e,"false":e,"null":e,undefined:e,NaN:e,Infinity:e}}(),j=/[+\-*&%=<>!?|]/,s=/[0-9A-Fa-f]/,r=/[\w\$_]/;return function(a,f){return tokenizer(a,f||C(false,true))}}();var JSParser=Editor.Parser=function(){function w(j,s,r,a,f,c){this.indented=j;this.column=s;this.type=r;if(a!=null)this.align=a;this.prev=f;this.info=c}function C(j){return function(s){var r=s&&s.charAt(0),a=j.type,f=r==a;return a=="vardef"?j.indented+4:a=="form"&&r=="{"?j.indented:a=="stat"||a=="form"?j.indented+indentUnit:j.info=="switch"&&!f?j.indented+(/^(?:case|default)\b/.test(s)?indentUnit:2*indentUnit):j.align?j.column-(f?1:0):j.indented+(f?0:indentUnit)}}var D={atom:true,number:true,variable:true,
6
+ string:true,regexp:true},x=false;return{make:function(j,s){function r(b){for(var d=b.length-1;d>=0;d--)u.push(b[d])}function a(){r(arguments);E=true}function f(){r(arguments);E=false}function c(){t={prev:t,vars:{"this":true,arguments:true}}}function k(){t=t.prev}function o(b){if(t){y="js-variabledef";t.vars[b]=true}}function e(b,d){var v=function(){p=new w(A,B,b,null,p,d)};v.lex=true;return v}function g(){if(p.type==")")A=p.indented;p=p.prev}function h(b){return function(d){if(d==b)a();else b==";"?
7
+ f():a(arguments.callee)}}function n(){return f(l,n)}function m(){return f(i,m)}function l(b){if(b=="var")a(e("vardef"),H,h(";"),g);else if(b=="keyword a")a(e("form"),i,l,g);else if(b=="keyword b")a(e("form"),l,g);else if(b=="{")a(e("}"),I,g);else if(b==";")a();else if(b=="function")a(J);else if(b=="for")a(e("form"),h("("),e(")"),P,h(")"),g,l,g);else if(b=="variable")a(e("stat"),Q);else if(b=="switch")a(e("form"),i,e("}","switch"),h("{"),I,g,g);else if(b=="case")a(i,h(":"));else if(b=="default")a(h(":"));
8
+ else b=="catch"?a(e("form"),c,h("("),L,h(")"),l,g,k):f(e("stat"),i,h(";"),g)}function i(b){if(D.hasOwnProperty(b))a(q);else if(b=="function")a(J);else if(b=="keyword c")a(i);else if(b=="(")a(e(")"),i,h(")"),g,q);else if(b=="operator")a(i);else if(b=="[")a(e("]"),F(i,"]"),g,q);else b=="{"?a(e("}"),F(R,"}"),g,q):a()}function q(b,d){if(b=="operator"&&/\+\+|--/.test(d))a(q);else if(b=="operator")a(i);else if(b==";")f();else if(b=="(")a(e(")"),F(i,")"),g,q);else if(b==".")a(S,q);else b=="["&&a(e("]"),
9
+ i,h("]"),g,q)}function Q(b){b==":"?a(g,l):f(q,h(";"),g)}function S(b){if(b=="variable"){y="js-property";a()}}function R(b){if(b=="variable")y="js-property";D.hasOwnProperty(b)&&a(h(":"),i)}function F(b,d){function v(z){if(z==",")a(b,v);else z==d?a():a(h(d))}return function(z){z==d?a():f(b,v)}}function I(b){b=="}"?a():f(l,I)}function H(b,d){if(b=="variable"){o(d);a(M)}else a()}function M(b,d){if(d=="=")a(i,M);else b==","&&a(H)}function P(b){if(b=="var")a(H,G);else if(b==";")f(G);else b=="variable"?
10
+ a(T):f(G)}function T(b,d){d=="in"?a(i):a(q,G)}function G(b,d){if(b==";")a(N);else d=="in"?a(i):a(i,h(";"),N)}function N(b){b==")"?f():a(i)}function J(b,d){if(b=="variable"){o(d);a(J)}else b=="("&&a(c,F(L,")"),l,k)}function L(b,d){if(b=="variable"){o(d);a()}}var K=tokenizeJavaScript(j),u=[x?m:n],t=null,p=new w((s||0)-indentUnit,0,"block",false),B=0,A=0,E,y,O={next:function(){for(;u[u.length-1].lex;)u.pop()();var b=K.next();if(b.type=="whitespace"&&B==0)A=b.value.length;B+=b.value.length;if(b.content==
11
+ "\n"){A=B=0;if(!("align"in p))p.align=false;b.indentation=C(p)}if(b.type=="whitespace"||b.type=="comment")return b;if(!("align"in p))p.align=true;for(;;){E=y=false;u.pop()(b.type,b.content);if(E){if(y)b.style=y;else{var d;if(d=b.type=="variable")a:{for(d=t;d;){if(d.vars[b.content]){d=true;break a}d=d.prev}d=false}if(d)b.style="js-localvariable"}return b}}},copy:function(){var b=t,d=p,v=u.concat([]),z=K.state;return function(U){t=b;p=d;u=v.concat([]);B=A=0;K=tokenizeJavaScript(U,z);return O}}};g.lex=
12
+ true;return O},electricChars:"{}:",configure:function(j){if(j.json!=null)x=j.json}}}();
@@ -0,0 +1,7 @@
1
+ var XMLParser=Editor.Parser=function(){var v={autoSelfClosers:{br:true,img:true,hr:true,link:true,input:true,meta:true,col:true,frame:true,base:true,area:true},doNotIndent:{pre:true,"!cdata":true}},C={autoSelfClosers:{},doNotIndent:{"!cdata":true}},s=v,w=false,x=function(){function j(a,d){var e=a.next();if(e=="<")if(a.equals("!")){a.next();if(a.equals("["))if(a.lookAhead("[CDATA[",true)){d(k("xml-cdata","]]\>"));return null}else return"xml-text";else if(a.lookAhead("--",true)){d(k("xml-comment","--\>"));
2
+ return null}else if(a.lookAhead("DOCTYPE",true)){a.nextWhileMatches(/[\w\._\-]/);d(k("xml-doctype",">"));return"xml-doctype"}else return"xml-text"}else if(a.equals("?")){a.next();a.nextWhileMatches(/[\w\._\-]/);d(k("xml-processing","?>"));return"xml-processing"}else{a.equals("/")&&a.next();d(m);return"xml-punctuation"}else if(e=="&"){for(;!a.endOfLine();)if(a.next()==";")break;return"xml-entity"}else{a.nextWhileMatches(/[^&<\n]/);return"xml-text"}}function m(a,d){var e=a.next();if(e==">"){d(j);return"xml-punctuation"}else if(/[?\/]/.test(e)&&
3
+ a.equals(">")){a.next();d(j);return"xml-punctuation"}else if(e=="=")return"xml-punctuation";else if(/[\'\"]/.test(e)){d(f(e));return null}else{a.nextWhileMatches(/[^\s\u00a0=<>\"\'\/?]/);return"xml-name"}}function f(a){return function(d,e){for(;!d.endOfLine();)if(d.next()==a){e(m);break}return"xml-attribute"}}function k(a,d){return function(e,t){for(;!e.endOfLine();){if(e.lookAhead(d,true)){t(j);break}e.next()}return a}}return function(a,d){return tokenizer(a,d||j)}}();return{make:function(j){function m(b){for(var c=
4
+ b.length-1;c>=0;c--)p.push(b[c])}function f(){m(arguments);q=true}function k(){m(arguments);q=false}function a(){g.style+=" xml-error"}function d(b){return function(c,l){if(l==b)f();else{a();f(arguments.callee)}}}function e(b,c){var l=s.doNotIndent.hasOwnProperty(b)||h&&h.noIndent;h={prev:h,name:b,indent:n,startOfLine:c,noIndent:l}}function t(b){return function(c,l){var i=b;if(i&&i.noIndent)return l;if(w&&/<!\[CDATA\[/.test(c))return 0;if(i&&/^<\//.test(c))i=i.prev;for(;i&&!i.startOfLine;)i=i.prev;
5
+ return i?i.indent+indentUnit:0}}function y(){return k(D,y)}function D(b,c){if(c=="<")f(E,z,A(o==1));else if(c=="</")f(F,d(">"));else{if(b=="xml-cdata"){if(!h||h.name!="!cdata")e("!cdata");if(/\]\]>$/.test(c))h=h.prev}else G.hasOwnProperty(b)||a();f()}}function E(b,c){if(b=="xml-name"){r=c.toLowerCase();g.style="xml-tagname";f()}else{r=null;k()}}function F(b,c){if(b=="xml-name"){g.style="xml-tagname";if(h&&c.toLowerCase()==h.name)h=h.prev;else a()}f()}function A(b){return function(c,l){if(l=="/>"||
6
+ l==">"&&s.autoSelfClosers.hasOwnProperty(r))f();else if(l==">"){e(r,b);f()}else{a();f(arguments.callee)}}}function z(b){if(b=="xml-name"){g.style="xml-attname";f(H,z)}else k()}function H(b,c){if(c=="=")f(B);else c==">"||c=="/>"?k(A):k()}function B(b){b=="xml-attribute"?f(B):k()}var u=x(j),g,p=[y],o=0,n=0,r=null,h=null,q,G={"xml-text":true,"xml-entity":true,"xml-comment":true,"xml-processing":true,"xml-doctype":true};return{indentation:function(){return n},next:function(){g=u.next();if(g.style=="whitespace"&&
7
+ o==0)n=g.value.length;else o++;if(g.content=="\n"){n=o=0;g.indentation=t(h)}if(g.style=="whitespace"||g.type=="xml-comment")return g;for(;;){q=false;p.pop()(g.style,g.content);if(q)return g}},copy:function(){var b=p.concat([]),c=u.state,l=h,i=this;return function(I){p=b.concat([]);o=n=0;h=l;u=x(I,c);return i}}}},electricChars:"/",configure:function(j){if(j.useHTMLKludges!=null)s=j.useHTMLKludges?v:C;if(j.alignCDATA)w=j.alignCDATA}}}();
@@ -0,0 +1,184 @@
1
+ /* -- Page saving widget ------------------------------------------------- */
2
+ #page_save button {
3
+ float: right;
4
+ }
5
+ #page_save label {
6
+ line-height: 20px;
7
+ padding-left: 5px;
8
+ }
9
+ #page_save input {
10
+ margin-right: 5px;
11
+ }
12
+
13
+ /* -- File Upload widget ------------------------------------------------- */
14
+ #file_uploads .actions {
15
+ overflow: hidden;
16
+ }
17
+ #file_uploads .actions a.button {
18
+ float: right;
19
+ }
20
+ #file_uploads #uploaded_files {
21
+ max-height: 500px;
22
+ overflow-y: auto;
23
+ }
24
+ #file_uploads #uploaded_files .file {
25
+ position: relative;
26
+ overflow: hidden;
27
+ font-size: 11px;
28
+ background-color: #252525;
29
+ margin-top: 2px;
30
+ padding: 0px 3px;
31
+ opacity: 0.5;
32
+ border-radius: 2px;
33
+ -moz-border-radius: 2px;
34
+ }
35
+ #file_uploads #uploaded_files .file.pending {
36
+ opacity: 0.3;
37
+ }
38
+ #file_uploads #uploaded_files .file:hover {
39
+ opacity: 1;
40
+ }
41
+ #file_uploads #uploaded_files .file a {
42
+ color: #fff;
43
+ }
44
+ #file_uploads #uploaded_files .file a.delete {
45
+ position: absolute;
46
+ display: block;
47
+ right: 0px;
48
+ top: 0px;
49
+ height: 13px;
50
+ width: 13px;
51
+ font-weight: bold;
52
+ }
53
+ #file_uploads #uploaded_files .file:hover a.delete {
54
+ color: #9e0b0f;
55
+ }
56
+
57
+ /* -- Listings ----------------------------------------------------------- */
58
+ ul.list li .item {
59
+ overflow: hidden;
60
+ padding: 5px;
61
+ background-color: #f1f1f1;
62
+ border-radius: 3px;
63
+ -moz-border-radius: 3px;
64
+ margin-bottom: 5px;
65
+ }
66
+ ul.list li .item .toggle {
67
+ float: left;
68
+ height: 28px;
69
+ width: 28px;
70
+ }
71
+ ul.list li .item .toggle a {
72
+ display: block;
73
+ height: 28px;
74
+ width: 28px;
75
+ background: url(/images/comfortable_mexican_sofa/arrow_right.gif) center center no-repeat;
76
+ }
77
+ ul.list li .item .toggle a span {
78
+ display: none;
79
+ }
80
+ ul.list li .item .toggle.open a {
81
+ background-image: url(/images/comfortable_mexican_sofa/arrow_bottom.gif);
82
+ }
83
+ ul.list li .item .icon {
84
+ float: left;
85
+ width: 28px;
86
+ height: 28px;
87
+ background: url(/images/comfortable_mexican_sofa/icon_regular.gif);
88
+ }
89
+ ul.list li .item .icon .dragger {
90
+ width: 28px;
91
+ height: 28px;
92
+ background: url(/images/comfortable_mexican_sofa/icon_move.gif);
93
+ display: none;
94
+ }
95
+ ul.list li .item .icon:hover .dragger {
96
+ display: block;
97
+ }
98
+ ul.list li .item .icon .dragger span {
99
+ display: none;
100
+ }
101
+ ul.list li .item .label {
102
+ margin-left: 60px;
103
+ font-size: 14px;
104
+ font-weight: bold;
105
+ }
106
+ ul.list li .item .label .sublabel {
107
+ font-size: 10px;
108
+ font-weight: normal;
109
+ }
110
+ ul.list li ul {
111
+ margin-left: 28px;
112
+ }
113
+ ul.list li .action_links {
114
+ float: right;
115
+ opacity: 0.2;
116
+ }
117
+ table.formatted td.action_links a {
118
+ opacity: 0.2;
119
+ }
120
+ ul.list li .item:hover .action_links,
121
+ table.formatted tr:hover td.action_links a {
122
+ opacity: 1;
123
+ }
124
+ ul.list li .item:hover,
125
+ table.formatted tr:hover td {
126
+ background-color: #fff;
127
+ }
128
+ table.formatted {
129
+ clear: both;
130
+ }
131
+ table.formatted th {
132
+ background: url(/images/comfortable_mexican_sofa/body_bg.jpg);
133
+ color: #ececec;
134
+ text-transform: uppercase;
135
+ font-size: 10px;
136
+ letter-spacing: 1px;
137
+ }
138
+ table.formatted th,
139
+ table.formatted td {
140
+ white-space: nowrap;
141
+ vertical-align: top;
142
+ padding: 5px;
143
+ border-bottom: 1px solid #fff;
144
+ }
145
+ table.formatted th.main,
146
+ table.formatted td.main {
147
+ width: 100%;
148
+ white-space: normal;
149
+ }
150
+ .pagination {
151
+ margin: 10px 0px;
152
+ }
153
+ .pagination span,
154
+ .pagination em,
155
+ .pagination a {
156
+ padding: 2px 5px;
157
+ margin-right: 2px;
158
+ background-color: #fff;
159
+ border-radius: 3px;
160
+ -moz-border-radius: 3px;
161
+ }
162
+ .pagination span {
163
+ color: #ececec;
164
+ }
165
+ .pagination em {
166
+ background-color: #1C1F22;
167
+ color: #fff;
168
+ }
169
+ form.search {
170
+ float: right;
171
+ margin: 5px 0px;
172
+ }
173
+
174
+ /* -- Page Specific stuff ------------------------------------------------ */
175
+ .c_cms_admin_layouts.a_index ul.list li .item .label,
176
+ .c_cms_admin_snippets.a_index ul.list li .item .label {
177
+ margin-left: 32px;
178
+ }
179
+ .c_cms_admin_layouts.a_index ul.list li .item .icon {
180
+ background-image: url(/images/comfortable_mexican_sofa/icon_layout.gif);
181
+ }
182
+ .c_cms_admin_snippets.a_index ul.list li .item .icon {
183
+ background-image: url(/images/comfortable_mexican_sofa/icon_snippet.gif);
184
+ }
@@ -0,0 +1,93 @@
1
+ /* -- Forms -------------------------------------------------------------- */
2
+ .form_element {
3
+ overflow: hidden;
4
+ margin-bottom: 5px;
5
+ }
6
+ .form_element .label {
7
+ width: 117px;
8
+ float: left;
9
+ text-align: right;
10
+ font: 13px/19px 'Lucida Grande', 'Tahoma', serif;
11
+ text-shadow: #fff 1px 1px;
12
+ padding: 0px 10px;
13
+ background-color: #f1f1f1;
14
+ border-top-left-radius: 3px;
15
+ border-bottom-left-radius: 3px ;
16
+ -moz-border-radius-topleft: 3px;
17
+ -moz-border-radius-bottomleft: 3px;
18
+ border-right: 3px solid #bbb;
19
+ }
20
+ .form_element .value {
21
+ margin-left: 150px;
22
+ }
23
+ .form_element .value input[type='text'],
24
+ .form_element .value input[type='password'],
25
+ .form_element .value select,
26
+ .form_element .value textarea {
27
+ border: 0px;
28
+ width: 100%;
29
+ padding: 2px 0px;
30
+ font-family: 'Courier New', Courier, monospace;
31
+ }
32
+ .form_element .value textarea {
33
+ height: 300px;
34
+ }
35
+ .form_element .value .CodeMirror-wrapping {
36
+ background-color: #fff;
37
+ }
38
+ .form_element.check_box_element input {
39
+ width: auto;
40
+ }
41
+ .page_form_extras {
42
+ margin-bottom: 10px;
43
+ }
44
+ .form_element.cms_tag_field_datetime .label,
45
+ .form_element.cms_tag_field_integer .label,
46
+ .form_element.cms_tag_field_string .label,
47
+ .form_element.cms_tag_field_text .label {
48
+ border-color: #48699C;
49
+ }
50
+ .form_element.cms_tag_page_datetime .label,
51
+ .form_element.cms_tag_page_integer .label,
52
+ .form_element.cms_tag_page_string .label,
53
+ .form_element.cms_tag_page_text .label,
54
+ .form_element.cms_tag_page_rich_text .label {
55
+ border-color: #3F7300;
56
+ }
57
+ .form_error {
58
+ background-color: #9e0b0f;
59
+ font-size: 14px;
60
+ color: #fff;
61
+ padding: 5px;
62
+ text-align: center;
63
+ margin-bottom: 10px;
64
+ }
65
+ .form_element.errors .label {
66
+ border-color: #9e0b0f;
67
+ }
68
+ .form_element.errors .errors {
69
+ margin: 2px 0px 0px 150px;
70
+ font-size: 11px;
71
+ color: #9e0b0f;
72
+ }
73
+ .form_element.submit_element {
74
+ margin-top: 10px;
75
+ }
76
+ .form_element.submit_element .value {
77
+ background-color: #f1f1f1;
78
+ border-radius: 3px;
79
+ -moz-border-radius: 3px;
80
+ padding: 5px;
81
+ }
82
+ .form_element.submit_element label {
83
+ margin: 0px 5px;
84
+ }
85
+ .form_element .desc {
86
+ margin: 2px 0px 0px 150px;
87
+ font-size: 11px;
88
+ color: #777;
89
+ background-color: #fff;
90
+ padding: 5px;
91
+ border-radius: 3px;
92
+ -moz-border-radius: 3px;
93
+ }
@@ -15,7 +15,7 @@ html, body {
15
15
  min-height: 100%;
16
16
  overflow: hidden;
17
17
  background-color: #D8D8D8;
18
- border-left: 1px solid #484844;
18
+ border-left: 1px solid #484848;
19
19
  border-right: 1px solid #484848;
20
20
  }
21
21
  .center_column_content {
@@ -45,8 +45,8 @@ html, body {
45
45
  -moz-border-radius-topleft: 4px;
46
46
  -moz-border-radius-bottomleft: 4px;
47
47
  background: #2D2D2D;
48
- background: -moz-linear-gradient(left, #2D2D2D 0%, #3A3A3A 100%);
49
- background: -webkit-gradient(linear, left top, right top, color-stop(0%,#2D2D2D), color-stop(100%,#3A3A3A));
48
+ background: -moz-linear-gradient(left, #2D2D2D 0%, #484848 100%);
49
+ background: -webkit-gradient(linear, left top, right top, color-stop(0%,#2D2D2D), color-stop(100%,#484848));
50
50
  color: #fff;
51
51
  opacity: 0.3;
52
52
  }
@@ -55,67 +55,18 @@ html, body {
55
55
  color: #fff;
56
56
  opacity: 1;
57
57
  }
58
- /* -- Right Column ------------------------------------------------------- */
58
+
59
59
  .right_column_content .box {
60
- background-color: #ececec;
60
+ background-color: #484848;
61
61
  padding: 5px;
62
62
  border-radius: 3px;
63
63
  -moz-border-radius: 3px;
64
64
  margin-bottom: 10px;
65
65
  overflow: hidden;
66
- }
67
- #page_save button {
68
- float: right;
69
- }
70
- #page_save label {
71
- line-height: 20px;
72
- padding-left: 5px;
73
- }
74
- #page_save input {
75
- margin-right: 5px;
76
- }
77
-
78
- #file_uploads .actions {
79
- overflow: hidden;
80
- }
81
- #file_uploads .actions button {
82
- float: right;
83
- }
84
- #file_uploads #uploaded_files {
85
- max-height: 500px;
86
- overflow-y: auto;
87
- }
88
- #file_uploads #uploaded_files .file {
89
- position: relative;
90
- overflow: hidden;
91
- font-size: 11px;
92
- background-color: #fff;
93
- margin-top: 2px;
94
- opacity: 0.8;
95
- }
96
- #file_uploads #uploaded_files .file.pending {
97
- opacity: 0.3;
98
- }
99
- #file_uploads #uploaded_files .file:hover {
100
- opacity: 1;
101
- }
102
- #file_uploads #uploaded_files .file:hover a {
103
- color: #000;
104
- }
105
- #file_uploads #uploaded_files .file a.delete {
106
- position: absolute;
107
- display: block;
108
- right: 0px;
109
- top: 0px;
110
- height: 13px;
111
- width: 13px;
112
- font-weight: bold;
113
- }
114
- #file_uploads #uploaded_files .file:hover a.delete {
115
- color: #9e0b0f;
66
+ color: #fff;
116
67
  }
117
68
 
118
- /* -- Common Elements ---------------------------------------------------- */
69
+ /* -- Flash Messages ----------------------------------------------------- */
119
70
  .flash {
120
71
  text-align: center;
121
72
  line-height: 25px;
@@ -126,195 +77,20 @@ html, body {
126
77
  .flash.error {
127
78
  background-color: #9e0b0f;
128
79
  }
129
- .big_button {
130
- float: right;
131
- padding: 4px 10px;
132
- font-size: 10px;
133
- font-weight: bold;
134
- text-transform: uppercase;
135
- border-radius: 3px;
136
- -moz-border-radius: 3px;
137
- border: 1px solid #9f9f9f;
138
- background: -moz-linear-gradient(top, #F9F9F9 0%, #D5D5D5 34%, #B4B4B4 100%);
139
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F9F9F9), color-stop(34%,#D5D5D5), color-stop(100%,#B4B4B4));
140
- text-shadow: #f5f5f5 1px 1px;
141
- letter-spacing: 0.5px;
142
- color: #1b1b1b;
143
- }
144
-
145
- /* -- Forms -------------------------------------------------------------- */
146
- .form_element {
147
- overflow: hidden;
148
- margin-bottom: 10px;
149
- }
150
- .form_element .label {
151
- width: 137px;
152
- float: left;
153
- text-align: right;
154
- font: 15px/21px 'Lucida Grande', 'Tahoma', serif;
155
- text-shadow: #fff 1px 1px;
156
- padding-right: 10px;
157
- background-color: #e0e0e0;
158
- border-top-left-radius: 3px;
159
- border-bottom-left-radius: 3px ;
160
- -moz-border-radius-topleft: 3px;
161
- -moz-border-radius-bottomleft: 3px;
162
- border-right: 3px solid #bbb;
163
- }
164
- .form_element .value {
165
- margin-left: 160px;
166
- }
167
- .form_element .value input[type='text'],
168
- .form_element .value input[type='password'],
169
- .form_element .value textarea,
170
- .form_element .value select {
171
- width: 100%;
172
- }
173
- .form_element .value input[type='text'],
174
- .form_element .value input[type='password'],
175
- .form_element .value select,
176
- .form_element .value textarea {
177
- border: 0px;
178
- border-top: 1px solid #ccc;
179
- border-bottom: 1px solid #ccc;
180
- padding: 2px 0px;
181
- font-family: 'Courier New', Courier, monospace;
182
- }
183
- .form_element .value textarea {
184
- height: 300px;
185
- }
186
- .form_element.submit_element {
187
- margin-left: 160px;
188
- }
189
- .form_element.check_box_element input {
190
- width: auto;
191
- }
192
- .page_form_extras {
193
- margin-bottom: 25px;
194
- }
195
- .form_element.cms_tag_field_datetime .label,
196
- .form_element.cms_tag_field_integer .label,
197
- .form_element.cms_tag_field_string .label,
198
- .form_element.cms_tag_field_text .label {
199
- border-color: #48699C;
200
- }
201
- .form_element.cms_tag_page_datetime .label,
202
- .form_element.cms_tag_page_integer .label,
203
- .form_element.cms_tag_page_string .label,
204
- .form_element.cms_tag_page_text .label,
205
- .form_element.cms_tag_page_rich_text .label {
206
- border-color: #3F7300;
207
- }
208
- .form_error {
209
- background-color: #9e0b0f;
210
- font-size: 14px;
211
- color: #fff;
212
- padding: 5px;
213
- text-align: center;
214
- margin-bottom: 10px;
215
- }
216
- .form_element .value .field_with_errors input,
217
- .form_element .value .field_with_errors textarea {
218
- border-color: #9e0b0f;
219
- }
220
- .form_element.form_save {
221
- background-color: #E0E0E0;
222
- border-radius: 3px;
223
- -moz-border-radius: 3px;
224
- padding: 5px 0px;
225
- }
226
- .form_element.form_save label {
227
- margin: 0px 5px;
228
- }
229
- .form_element .desc {
230
- margin: 3px 0px 0px 160px;
231
- font-size: 11px;
232
- color: #777;
233
- }
234
- .form_element .desc .desc_toggle {
235
- float: right;
236
- }
237
- .form_element .desc .desc_toggle:hover {
238
- text-decoration: underline;
239
- cursor: pointer;
240
- }
241
- .form_element .desc .desc_content {
242
- background-color: #fff;
243
- padding: 5px;
244
- border-radius: 3px;
245
- -moz-border-radius: 3px;
246
- }
247
- .form_element .desc.with_toggle .desc_content {
248
- display: none;
249
- }
250
- .form_element .desc.with_toggle .desc_content table td {
251
- vertical-align: top;
252
- padding: 5px;
253
- }
254
80
 
255
- /* -- Listings ----------------------------------------------------------- */
256
- ul.list li .item {
257
- overflow: hidden;
258
- padding: 5px;
259
- background-color: #ececec;
260
- border-radius: 3px;
261
- -moz-border-radius: 3px;
262
- margin-bottom: 5px;
263
- }
264
- ul.list li .item .toggle {
265
- float: left;
266
- height: 28px;
267
- width: 28px;
268
- }
269
- ul.list li .item .toggle a {
270
- display: block;
271
- height: 28px;
272
- width: 28px;
273
- background: url(/images/comfortable_mexican_sofa/arrow_right.gif) center center no-repeat;
274
- }
275
- ul.list li .item .toggle a span {
276
- display: none;
277
- }
278
- ul.list li .item .toggle.open a {
279
- background-image: url(/images/comfortable_mexican_sofa/arrow_bottom.gif);
280
- }
281
- ul.list li .item .icon {
282
- float: left;
283
- width: 28px;
284
- height: 28px;
285
- background: url(/images/comfortable_mexican_sofa/icon_regular.gif);
286
- }
287
- ul.list li .item .icon .dragger {
288
- width: 28px;
289
- height: 28px;
290
- background: url(/images/comfortable_mexican_sofa/icon_move.gif);
291
- display: none;
292
- }
293
- ul.list li .item .icon:hover .dragger {
294
- display: block;
295
- }
296
- ul.list li .item .icon .dragger span {
297
- display: none;
298
- }
299
- ul.list li .item .label {
300
- margin-left: 60px;
301
- font-size: 14px;
302
- font-weight: bold;
303
- }
304
- ul.list li .item .label .sublabel {
305
- font-size: 10px;
306
- font-weight: normal;
307
- }
308
- ul.list li ul {
309
- margin-left: 28px;
310
- }
81
+ /* -- Buttons ------------------------------------------------------------ */
82
+ a.button,
83
+ input[type='button'],
84
+ input[type='submit'],
85
+ input[type='reset'],
86
+ input[type='file'],
311
87
  ul.list .action_links a,
312
88
  table.formatted td.action_links a {
313
89
  margin-left: 3px;
314
90
  background-color: #b4b4b4;
315
91
  color: #1b1b1b;
316
92
  padding: 3px 5px;
317
- font-size: 9px;
93
+ font: 9px Arial, sans-serif;
318
94
  text-transform: uppercase;
319
95
  border-radius: 3px;
320
96
  -moz-border-radius: 3px;
@@ -323,6 +99,11 @@ table.formatted td.action_links a {
323
99
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F9F9F9), color-stop(34%,#D5D5D5), color-stop(100%,#B4B4B4));
324
100
  text-shadow: #f5f5f5 1px 1px;
325
101
  }
102
+ a.button:hover,
103
+ input[type='button']:hover,
104
+ input[type='submit']:hover,
105
+ input[type='reset']:hover,
106
+ input[type='file']:hover,
326
107
  ul.list .action_links a:hover,
327
108
  table.formatted td.action_links a:hover {
328
109
  box-shadow: inset 0px 0px 5px #aaa;
@@ -330,63 +111,15 @@ table.formatted td.action_links a:hover {
330
111
  -webkit-box-shadow: inset 0px 0px 5px #aaa;
331
112
  border-color: #484848;
332
113
  }
333
- ul.list li .action_links {
334
- float: right;
335
- opacity: 0.2;
336
- }
337
- table.formatted td.action_links a {
338
- opacity: 0.2;
339
- }
340
- ul.list li .item:hover .action_links,
341
- table.formatted tr:hover td.action_links a {
342
- opacity: 1;
343
- }
344
- ul.list li .item:hover,
345
- table.formatted tr:hover td {
346
- background-color: #fff;
347
- }
348
- table.formatted {
349
- clear: both;
350
- }
351
- table.formatted th {
352
- background: url(/images/comfortable_mexican_sofa/body_bg.jpg);
353
- color: #ececec;
354
- text-transform: uppercase;
114
+ a.button.big,
115
+ input[type='button'],
116
+ input[type='submit'],
117
+ input[type='reset'],
118
+ input[type='file'] {
119
+ padding: 3px 10px;
355
120
  font-size: 10px;
356
- letter-spacing: 1px;
357
- }
358
- table.formatted th,
359
- table.formatted td {
360
- white-space: nowrap;
361
- vertical-align: top;
362
- padding: 5px;
363
- border-bottom: 1px solid #fff;
364
- }
365
- table.formatted th.main,
366
- table.formatted td.main {
367
- width: 100%;
368
- white-space: normal;
369
- }
370
- .pagination {
371
- margin: 10px 0px;
372
- }
373
- .pagination span,
374
- .pagination em,
375
- .pagination a {
376
- padding: 2px 5px;
377
- margin-right: 2px;
378
- background-color: #fff;
379
- border-radius: 3px;
380
- -moz-border-radius: 3px;
381
- }
382
- .pagination span {
383
- color: #ececec;
384
- }
385
- .pagination em {
386
- background-color: #1C1F22;
387
- color: #fff;
121
+ letter-spacing: 0.5px;
388
122
  }
389
- form.search {
123
+ a.button.big {
390
124
  float: right;
391
- margin: 5px 0px;
392
125
  }