jencil-rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Jencil 0.1.2
3
+ *
4
+ * Author: lambdalisue
5
+ * URL: http://hashnote.net/
6
+ * License: MIT License
7
+ *
8
+ * Copyright (C) 2012 lambdalisue, hashnote.net allright reserved.
9
+ *
10
+ * This application include following Library inside
11
+ *
12
+ * Tabby jQuery plugin version 0.12
13
+ * Ted Devito - http://teddevito.com/demos/textarea.html
14
+ * Copyright (c) 2009 Ted Devito
15
+ *
16
+ * shortcut.js
17
+ * http://www.openjs.com/scripts/events/keyboard_shortcuts/
18
+ * Version : 2.01.B
19
+ * By Binny V A
20
+ * License : BSD
21
+ */
22
+ shortcut={all_shortcuts:{},add:function(b,h,d){var g={type:"keydown",propagate:false,disable_in_input:false,target:document,keycode:false};if(!d){d=g}else{for(var a in g){if(typeof d[a]=="undefined"){d[a]=g[a]}}}var f=d.target;if(typeof d.target=="string"){f=document.getElementById(d.target)}var c=this;b=b.toLowerCase();var e=function(o){o=o||window.event;if(d.disable_in_input){var l;if(o.target){l=o.target}else{if(o.srcElement){l=o.srcElement}}if(l.nodeType==3){l=l.parentNode}if(l.tagName=="INPUT"||l.tagName=="TEXTAREA"){return}}if(o.keyCode){code=o.keyCode}else{if(o.which){code=o.which}}var n=String.fromCharCode(code).toLowerCase();if(code==188){n=","}if(code==190){n="."}var s=b.split("+");var r=0;var p={"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"};var m={esc:27,escape:27,tab:9,space:32,"return":13,enter:13,backspace:8,scrolllock:145,scroll_lock:145,scroll:145,capslock:20,caps_lock:20,caps:20,numlock:144,num_lock:144,num:144,pause:19,"break":19,insert:45,home:36,"delete":46,end:35,pageup:33,page_up:33,pu:33,pagedown:34,page_down:34,pd:34,left:37,up:38,right:39,down:40,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123};var q={shift:{wanted:false,pressed:false},ctrl:{wanted:false,pressed:false},alt:{wanted:false,pressed:false},meta:{wanted:false,pressed:false}};if(o.ctrlKey){q.ctrl.pressed=true}if(o.shiftKey){q.shift.pressed=true}if(o.altKey){q.alt.pressed=true}if(o.metaKey){q.meta.pressed=true}for(var j=0;k=s[j],j<s.length;j++){if(k=="ctrl"||k=="control"){r++;q.ctrl.wanted=true}else{if(k=="shift"){r++;q.shift.wanted=true}else{if(k=="alt"){r++;q.alt.wanted=true}else{if(k=="meta"){r++;q.meta.wanted=true}else{if(k.length>1){if(m[k]==code){r++}}else{if(d.keycode){if(d.keycode==code){r++}}else{if(n==k){r++}else{if(p[n]&&o.shiftKey){n=p[n];if(n==k){r++}}}}}}}}}}if(r==s.length&&q.ctrl.pressed==q.ctrl.wanted&&q.shift.pressed==q.shift.wanted&&q.alt.pressed==q.alt.wanted&&q.meta.pressed==q.meta.wanted){h(o);if(!d.propagate){o.cancelBubble=true;o.returnValue=false;if(o.stopPropagation){o.stopPropagation();o.preventDefault()}return false}}};this.all_shortcuts[b]={callback:e,target:f,event:d.type};if(f.addEventListener){f.addEventListener(d.type,e,false)}else{if(f.attachEvent){f.attachEvent("on"+d.type,e)}else{f["on"+d.type]=e}}},remove:function(a){a=a.toLowerCase();var d=this.all_shortcuts[a];delete (this.all_shortcuts[a]);if(!d){return}var b=d.event;var c=d.target;var e=d.callback;if(c.detachEvent){c.detachEvent("on"+b,e)}else{if(c.removeEventListener){c.removeEventListener(b,e,false)}else{c["on"+b]=false}}}};(function(d){d.fn.tabby=function(f){var g=d.extend({},d.fn.tabby.defaults,f);var h=d.fn.tabby.pressed;return this.each(function(){$this=d(this);var i=d.meta?d.extend({},g,$this.data()):g;$this.bind("keydown",function(l){var j=d.fn.tabby.catch_kc(l);if(16==j){h.shft=true}if(17==j){h.ctrl=true;setTimeout("$.fn.tabby.pressed.ctrl = false;",1000)}if(18==j){h.alt=true;setTimeout("$.fn.tabby.pressed.alt = false;",1000)}if(9==j&&!h.ctrl&&!h.alt){l.preventDefault;h.last=j;setTimeout("$.fn.tabby.pressed.last = null;",0);e(d(l.target).get(0),h.shft,i);return false}}).bind("keyup",function(j){if(16==d.fn.tabby.catch_kc(j)){h.shft=false}}).bind("blur",function(j){if(9==h.last){d(j.target).one("focus",function(l){h.last=null}).get(0).focus()}})})};d.fn.tabby.catch_kc=function(f){return f.keyCode?f.keyCode:f.charCode?f.charCode:f.which};d.fn.tabby.pressed={shft:false,ctrl:false,alt:false,last:null};function b(f){if(window.console&&window.console.log){window.console.log("textarea count: "+f.size())}}function e(i,h,g){var f=i.scrollTop;if(i.setSelectionRange){a(i,h,g)}else{if(document.selection){c(i,h,g)}}i.scrollTop=f}d.fn.tabby.defaults={tabString:String.fromCharCode(9)};function a(j,f,v){var u=j.selectionStart;var s=j.selectionEnd;if(u==s){if(f){if(v.tabString==j.value.substring(u-v.tabString.length,u)){j.value=j.value.substring(0,u-v.tabString.length)+j.value.substring(u);j.focus();j.setSelectionRange(u-v.tabString.length,u-v.tabString.length)}else{if(v.tabString==j.value.substring(u,u+v.tabString.length)){j.value=j.value.substring(0,u)+j.value.substring(u+v.tabString.length);j.focus();j.setSelectionRange(u,u)}}}else{j.value=j.value.substring(0,u)+v.tabString+j.value.substring(u);j.focus();j.setSelectionRange(u+v.tabString.length,u+v.tabString.length)}}else{var w=j.value.split("\n");var t=new Array();var m=0;var h=0;var g=false;for(var p in w){h=m+w[p].length;t.push({start:m,end:h,selected:(m<=u&&h>u)||(h>=s&&m<s)||(m>u&&h<s)});m=h+1}var l=0;for(var p in t){if(t[p].selected){var r=t[p].start+l;if(f&&v.tabString==j.value.substring(r,r+v.tabString.length)){j.value=j.value.substring(0,r)+j.value.substring(r+v.tabString.length);l-=v.tabString.length}else{if(!f){j.value=j.value.substring(0,r)+v.tabString+j.value.substring(r);l+=v.tabString.length}}}}j.focus();var q=u+((l>0)?v.tabString.length:(l<0)?-v.tabString.length:0);var n=s+l;j.setSelectionRange(q,n)}}function c(r,x,f){var q=document.selection.createRange();if(r==q.parentElement()){if(""==q.text){if(x){var m=q.getBookmark();q.moveStart("character",-f.tabString.length);if(f.tabString==q.text){q.text=""}else{q.moveToBookmark(m);q.moveEnd("character",f.tabString.length);if(f.tabString==q.text){q.text=""}}q.collapse(true);q.select()}else{q.text=f.tabString;q.collapse(false);q.select()}}else{var l=q.text;var p=l.length;var v=l.split("\r\n");var A=document.body.createTextRange();A.moveToElementText(r);A.setEndPoint("EndToStart",q);var n=A.text;var y=n.split("\r\n");var s=n.length;var z=document.body.createTextRange();z.moveToElementText(r);z.setEndPoint("StartToEnd",q);var w=z.text;var g=document.body.createTextRange();g.moveToElementText(r);g.setEndPoint("StartToEnd",A);var t=g.text;var h=d(r).html();d("#r3").text(s+" + "+p+" + "+w.length+" = "+h.length);if((s+t.length)<h.length){y.push("");s+=2;if(x&&f.tabString==v[0].substring(0,f.tabString.length)){v[0]=v[0].substring(f.tabString.length)}else{if(!x){v[0]=f.tabString+v[0]}}}else{if(x&&f.tabString==y[y.length-1].substring(0,f.tabString.length)){y[y.length-1]=y[y.length-1].substring(f.tabString.length)}else{if(!x){y[y.length-1]=f.tabString+y[y.length-1]}}}for(var u=1;u<v.length;u++){if(x&&f.tabString==v[u].substring(0,f.tabString.length)){v[u]=v[u].substring(f.tabString.length)}else{if(!x){v[u]=f.tabString+v[u]}}}if(1==y.length&&0==s){if(x&&f.tabString==v[0].substring(0,f.tabString.length)){v[0]=v[0].substring(f.tabString.length)}else{if(!x){v[0]=f.tabString+v[0]}}}if((s+p+w.length)<h.length){v.push("");p+=2}A.text=y.join("\r\n");q.text=v.join("\r\n");var j=document.body.createTextRange();j.moveToElementText(r);if(0<s){j.setEndPoint("StartToEnd",A)}else{j.setEndPoint("StartToStart",A)}j.setEndPoint("EndToEnd",q);j.select()}}}})(jQuery);(function(){var W,O,E,P,c,z,S,g,f,o,M,v,r,i,T,C,L,X,B,x,b,s,F,j,a,N,y,R,G,D,Y,J,t,Z,A,m,I,V,l,n,w,U,e,d,Q,p,K,u,h,H=[].slice,aa={}.hasOwnProperty,q=function(ae,ac){for(var ab in ac){if(aa.call(ac,ab)){ae[ab]=ac[ab]}}function ad(){this.constructor=ae}ad.prototype=ac.prototype;ae.prototype=new ad();ae.__super__=ac.prototype;return ae};window.namespace=function(ag,ab,ad){var aj,ah,ae,ai,af,ac;if(arguments.length<3){af=[(typeof exports!=="undefined"?exports:window)].concat(H.call(arguments)),ag=af[0],ab=af[1],ad=af[2]}ah=ag;ac=ab.split(".");for(ae=0,ai=ac.length;ae<ai;ae++){aj=ac[ae];ag=ag[aj]||(ag[aj]={})}return ad(ag,ah)};F=(function(){function ab(){}ab.prototype.createMemento=function(){throw new Error("NotImplementedError")};ab.prototype.setMemento=function(ac){throw new Error("NotImplementedError")};return ab})();g=(function(){function ab(ac){this._originator=ac;this._undoStack=[];this._redoStack=[]}ab.prototype.originator=function(ac){if(ac!=null){this._originator=ac;return this}return ac};ab.prototype.save=function(ac){ac=ac||this.originator().createMemento();this._undoStack.push(ac);return this._redoStack=[]};ab.prototype.undo=function(){var ac;if(!this.canUndo()){return false}ac=this.originator();this._redoStack.push(ac.createMemento());ac.setMemento(this._undoStack.pop());if(typeof ac.focus==="function"){ac.focus()}return true};ab.prototype.redo=function(){var ac;if(!this.canRedo()){return false}ac=this.originator();this._undoStack.push(ac.createMemento());ac.setMemento(this._redoStack.pop());if(typeof ac.focus==="function"){ac.focus()}return true};ab.prototype.canUndo=function(){return this._undoStack.length>0};ab.prototype.canRedo=function(){return this._redoStack.length>0};return ab})();N=(function(){function ab(ac,ad){this.document=ac;this.element=ad;this}ab.prototype._getCaret=function(){var af,ag,ae,ac,ad;if(this.document.selection!=null){ac=this.document.selection.createRange();ag=ac.duplicate();ag.moveToElementText(this.element);ag.setEndPoint("EndToEnd",ac);ad=ag.text.length-ac.text.length;ae=ad+ac.text.length}else{if(this.element.setSelectionRange!=null){ad=this.element.selectionStart;ae=this.element.selectionEnd}}af=[ad,ae];af.isCollapse=ad===ae;return af};ab.prototype._setCaret=function(af,ac){var ad,ae;ae=this.element.scrollTop;if(this.element.setSelectionRange!=null){this.element.setSelectionRange(af,ac)}else{if(this.element.createTextRange){ad=this.element.createTextRange();ad.collapse(true);ad.moveStart("character",af);ad.moveEnd("character",ac-af);ad.select()}}this.element.focus();this.element.scrollTop=ae;return this};ab.prototype.caret=function(ad,ac){if((ad!=null)&&typeof ad==="array"){ac=ad[1];ad=ad[0]}if((ad!=null)&&!(ac!=null)){ac=ad}if((ad!=null)&&(ac!=null)){return this._setCaret(ad,ac)}return this._getCaret()};ab.prototype.caretOffset=function(ad){var ac;ac=this.caret();return this.caret(ac[0]+ad)};ab.prototype._replace=function(ag,ah,ae){var ad,ac,af;af=this.element.scrollTop;ac=this.element.value.substring(0,ah);ad=this.element.value.substring(ae);this.element.value=ac+ag+ad;this.element.scrollTop=af;return this};ab.prototype._getText=function(){var af,ac,ad,ae;if(this.document.selection!=null){ac=this.document.selection.createRange();return ac.text}else{if(this.element.setSelectionRange){ae=this.caret(),ad=ae[0],af=ae[1];return this.element.value.substring(ad,af)}}return null};ab.prototype._setText=function(ah,ad){var ag,ac,af,ae;af=this.element.scrollTop;ae=this.caret(),ac=ae[0],ag=ae[1];this._replace(ah,ac,ag);ag=ac+ah.length;if(!ad){ac=ag}this.caret(ac,ag);this.element.focus();this.element.scrollTop=af;return this};ab.prototype.text=function(ad,ac){if(ad!=null){return this._setText(ad,ac)}return this._getText()};ab.prototype.insertBefore=function(ai,ad){var ag,ac,af,ah,ae;af=this.element.scrollTop;ae=this.caret(),ac=ae[0],ag=ae[1];ah=this.text();this._replace(ai+ah,ac,ag);ag=ac+ai.length;if(!ad){ac=ag}this.caret(ac,ag);this.element.focus();this.element.scrollTop=af;return this};ab.prototype.insertAfter=function(ai,ad){var ag,ac,af,ah,ae;af=this.element.scrollTop;ae=this.caret(),ac=ae[0],ag=ae[1];ah=this.text();this._replace(ah+ai,ac,ag);ac=ag;ag=ag+ai.length;if(!ad){ac=ag}this.caret(ac,ag);this.element.focus();this.element.scrollTop=af;return this};ab.prototype.enclose=function(ae,ag,ad){var ah,ak,ac,ai,aj,af;ac=this.element.scrollTop;aj=this.text();if(aj.indexOf(ae)===0&&aj.lastIndexOf(ag)===(aj.length-ag.length)){ai=aj.substring(ae.length,aj.length-ag.length);this.text(ai,ad)}else{af=this.caret(),ak=af[0],ah=af[1];this._replace(ae+aj+ag,ak,ah);ah=ak+ae.length+aj.length+ag.length;if(!ad){ak=ah}this.caret(ak,ah)}this.element.focus();this.element.scrollTop=ac;return this};ab.prototype._getLineCaretOfCaret=function(af){var ae,ac,ad;ad=this.element.value;ac=ad.lastIndexOf("\n",af-1)+1;ae=ad.indexOf("\n",af);if(ae===-1){ae=ad.length}return[ac,ae]};ab.prototype._getLineCaret=function(){return this._getLineCaretOfCaret(this.caret()[0])};ab.prototype._getLine=function(){var ae,ac,ad;ad=this._getLineCaret(),ac=ad[0],ae=ad[1];return this.element.value.substring(ac,ae)};ab.prototype._setLine=function(ac,ae){var ah,ad,ag,af;ag=this.element.scrollTop;af=this._getLineCaret(),ad=af[0],ah=af[1];this._replace(ac,ad,ah);ah=ad+ac.length;if(!ae){ad=ah}this.caret(ad,ah);this.element.focus();this.element.scrollTop=ag;return this};ab.prototype.line=function(ad,ac){if(ad!=null){return this._setLine(ad,ac)}return this._getLine()};ab.prototype.selectWholeLine=function(af){var ae,ac,ad;ad=this._getLineCaretOfCaret(af),ac=ad[0],ae=ad[1];return this.caret(ac,ae)};ab.prototype.selectWholeCurrentLine=function(){var ae,ac,ad;ad=this._getLineCaretOfCaret(this.caret()[0]),ac=ad[0],ae=ad[1];return this.caret(ac,ae)};return ab})();K=(function(){var ab,ap,af,ae,al,am,an,ad,aj,ac,ai,ak,ao,ah,ag;ai=function(aq){if(aq==null){aq=false}return this.outerWidth(aq)-this.width()};ac=function(aq){if(aq==null){aq=false}return this.outerHeight(aq)-this.height()};ao=function(aq,ar){var at;if(aq==null){aq=false}if(typeof aq==="number"){ar=aq;aq=false}if(ar!=null){at=this.nonContentWidth(aq);return this.width(ar-at)}return this._outerWidth(aq)};ak=function(aq,ar){var at;if(aq==null){aq=false}if(typeof aq==="number"){ar=aq;aq=false}if(ar!=null){at=this.nonContentHeight(aq);return this.height(ar-at)}return this._outerHeight(aq)};ai=function(aq){if(aq==null){aq=false}return this.outerWidth(aq)-this.width()};ac=function(aq){if(aq==null){aq=false}return this.outerHeight(aq)-this.height()};aj=function(ar,aq){var at;if(aq==null){aq=null}at=this.css(ar);if(at===""||at==="none"||at===null||at===(void 0)||at===NaN){return aq}at=parseInt(at,10);return at};ad=function(){return this.ncss("min-width")};an=function(){return this.ncss("min-height")};am=function(){return this.ncss("max-width")};al=function(){return this.ncss("max-height")};af=function(aq){var au,at,ar;if(aq==null){aq=false}at=aq?this.ncss("margin-left"):0;au=this.ncss("border-left-width");ar=this.ncss("padding-left");return at+au+ar};ae=function(aq){var au,at,ar;if(aq==null){aq=false}at=aq?this.ncss("margin-top"):0;au=this.ncss("border-top-width");ar=this.ncss("padding-top");return at+au+ar};ab=function(aq){var ar;ar=this.offset();if(aq!=null){ar.left=aq;return this.offset(ar)}return ar.left};ap=function(aq){var ar;ar=this.offset();if(aq!=null){ar.top=aq;return this.offset(ar)}return ar.top};ah=function(aq,at){var au,ar;if(aq==null){aq=false}if(typeof aq==="number"){at=aq;aq=false}ar=K(this.parent());au=ar.absoluteX()+ar.contentX(aq);if(at!=null){return this.absoluteX(at+au)}return this.absoluteX()-au};ag=function(aq,at){var au,ar;if(aq==null){aq=false}if(typeof aq==="number"){at=aq;aq=false}ar=K(this.parent());au=ar.absoluteY()+ar.contentY(aq);if(at!=null){return this.absoluteY(at+au)}return this.absoluteY()-au};K=function(aq){if(aq.__evoluted__===true){return aq}aq._outerWidth=aq.outerWidth;aq._outerHeight=aq.outerHeight;aq.nonContentWidth=ai;aq.nonContentHeight=ac;aq.outerWidth=ao;aq.outerHeight=ak;aq.nonContentWidth=ai;aq.nonContentHeight=ac;aq.ncss=aj;aq.minWidth=ad;aq.minHeight=an;aq.maxWidth=am;aq.maxHeight=al;aq.contentX=af;aq.contentY=ae;aq.absoluteX=ab;aq.absoluteY=ap;aq.relativeX=ah;aq.relativeY=ag;aq.__evoluted__=true;return aq};return K})();p=function(ac){var ab;ac.css("position","relative");ab=$("<div>").appendTo(ac).hide().css({position:"absolute",top:"0",left:"0",overflow:"hidden","z-index":99999});ab.on=function(){ab.refresh();return ab.show()};ab.refresh=function(){ab.width(ac.outerWidth(true));return ab.height(ac.outerHeight(true))};ab.off=function(){return ab.hide()};return ab};U=(function(){var ab,ac;ac=function(){return(new Date()).getTime()};ab={start:0,end:100,duration:1000,callbackEach:null,callbackDone:null,easing:jQuery.easing.swing};return function(ad){var ag,ae,af;ad=jQuery.extend(ab,ad);ae=ac();ag=ad.end-ad.start;af=function(){var ai,ah;ai=ac()-ae;ah=ad.easing(ai/ad.duration,ai,0,1,ad.duration);ah=ah*ag+ad.start;ad.callbackEach(ah,ai);if(ai<ad.duration){return setTimeout(af,1)}else{ad.callbackEach(ad.end,ad.duration);return typeof ad.callbackDone==="function"?ad.callbackDone():void 0}};return af()}})();e=(function(){var ab;ab=function(ah){var ad,ag,ae,af,ac;if(ah.which!==13){return}ae=this.selection.line();if((af=this.autoIndent.pre)!=null){af.call(this,ah,ae)}ad=ae.replace(/^([\t\s]*).*$/,"$1");ag="\n"+ad;this.selection.insertAfter(ag,false);if((ac=this.autoIndent.post)!=null){ac.call(this,ah,ae,ad,ag)}ah.stopPropagation();ah.stopImmediatePropagation();ah.preventDefault();this.focus();return false};return function(ac,ae,ad){if(!(ac instanceof jQuery)){ac=$(ac)}if(!(ac.selection!=null)){ac.selection=new N(document,ac.get(0))}ac.autoIndent=function(af){return ab.call(ac,af)};ac.autoIndent.enable=function(){ac.on("keydown",ac.autoIndent);return ac};ac.autoIndent.disable=function(){ac.off("keydown",ac.autoIndent);return ac};if(ae!=null){ac.autoIndent.pre=function(ag,af){return ae.call(ac,ag,af)}}if(ad!=null){ac.autoIndent.post=function(ai,ag,af,ah){return ad.call(ac,ai,ag,af,ah)}}return ac.autoIndent.enable()}})();if(window.i18n!=null){h=function(ab){return i18n.t(ab,{defaultValue:ab})}}else{h=function(ab){return ab}}o={mainPanelClass:null,editorClass:null,viewerClass:null,helperClass:null,toolbarButtons:[],statusbarButtons:[],defaultVolume:null,defaultVolume2:null};this.Jencil=(function(){function ab(ac,ad){var ae=this;this.options=jQuery.extend({profile:"Html",profiles:{Html:ab.profiles.HtmlProfile},resizable:true,enableTabIndent:true,enableAutoIndent:true,tabString:" ",defaultVolume:null,defaultVolume2:null,width:640,height:620,editorTemplatePath:null,viewerTemplatePath:null,helperTemplatePath:null},ad);this.element=ac.hide();this.caretaker=new g();this.caretaker.originator=function(){return ae.editor()};this.wrapper=new w(this,this.options.width,this.options.height);this.fullscreen=new v(this);this.element.after(this.wrapper.element).after(this.fullscreen.element);this.wrapper.init();this.wrapper.adjust();this.caretaker.save()}ab.prototype.editor=function(){return this.wrapper.workspace.mainPanel.editorPanel||null};ab.prototype.viewer=function(){return this.wrapper.workspace.mainPanel.viewerPanel||null};ab.prototype.helper=function(){return this.wrapper.workspace.mainPanel.helperPanel||null};return ab})();$.fn.jencil=function(ab){return new Jencil($(this),ab)};namespace("Jencil.profiles",function(ab){return ab.DefaultProfile=o});namespace("Jencil.utils",function(ab){return ab.namespace=namespace});namespace("Jencil",function(ab){return ab.t=h});l=(function(){function ab(ad,ac,ae){this.core=ad;if(ac==null){ac="<div>"}if(ac instanceof jQuery){this.element=ac}else{this.element=$(ac,ae)}this.element=K(this.element)}ab.prototype.init=function(){return this};ab.prototype.adjust=function(){return this};return ab})();j=(function(ab){q(ac,ab);function ac(ae,ad,af){if(ad==null){ad="<div>"}ac.__super__.constructor.call(this,ae,ad,af);this.element.addClass("panel")}return ac})(l);s=(function(ac){q(ab,ac);function ab(af,ag,ad,ai){var ah,ae,aj=this;this.fst=ag;this.snd=ad;this.splitter=ai;ab.__super__.constructor.call(this,af);this.element.addClass("multiple");this.element.append(this.fst.element);this.element.append(this.splitter.element);this.element.append(this.snd.element);ae=function(ak){if(!this.element.is(":visible")){return this.toggle(ak,null)}};ah=function(ak){if(this.element.is(":visible")){return this.toggle(null,ak)}};this.fst.toggle=function(al,ak){return aj._togglePanel(0,al,ak)};this.fst.show=ae;this.fst.hide=ah;this.snd.toggle=function(al,ak){return aj._togglePanel(1,al,ak)};this.snd.show=ae;this.snd.hide=ah;this.splitter.element.dblclick(function(){return aj.snd.toggle()})}ab.prototype.init=function(){this.splitter.init();this.fst.init();return this.snd.init()};ab.prototype._togglePanel=function(ak,ai,ae){var ag,ad,af,ah,aj=this;if(ab._animating){return}af=this.splitter.volume();ag=null;if((0<af&&af<1)){ad=ak;this.splitter._previousVolume=af;ah=ae}else{ad=this.splitter._previousVolume||this.splitter.defaultVolume;if(ad===ak){ad=0.5}ah=ai}ab._animating=true;ag=function(){ab._animating=false;return typeof ah==="function"?ah():void 0};return U({start:af,end:ad,duration:500,callbackEach:function(am,al){return aj.splitter.volume(am)},callbackDone:ag})};return ab})(j);m=(function(ac){q(ab,ac);function ab(ae,af,ad,ag){var ah;if(ag==null){ag=0.5}ah=new I(ae,af,ad,ag);ab.__super__.constructor.call(this,ae,af,ad,ah);this.element.addClass("vertical")}ab.prototype.adjust=function(){this.fst.element.outerHeight(true,this.element.height());this.snd.element.outerHeight(true,this.element.height());this.splitter.element.outerHeight(true,this.element.height());this.splitter.adjust();return this};return ab})(s);T=(function(ac){q(ab,ac);function ab(ae,af,ad,ag){var ah;if(ag==null){ag=0.5}ah=new C(ae,af,ad,ag);ab.__super__.constructor.call(this,ae,af,ad,ah);this.element.addClass("horizontal")}ab.prototype.adjust=function(){this.fst.element.outerWidth(true,this.element.width());this.snd.element.outerWidth(true,this.element.width());this.splitter.element.outerWidth(true,this.element.width());this.splitter.adjust();return this};return ab})(s);namespace("Jencil.ui.widgets",function(ab){return ab.Widget=l});namespace("Jencil.ui.widgets.panels",function(ab){ab.Panel=j;ab.MultiplePanel=s;ab.VerticalPanel=m;return ab.HorizontalPanel=T});R=(function(ab){q(ac,ab);function ac(ae,af,ad,ag){var ah,ai,aj=this;this.fst=af;this.snd=ad;this.defaultVolume=ag!=null?ag:0.5;ac.__super__.constructor.call(this,ae);this.element.addClass("splitter");this._volume=this.defaultVolume;ah=function(am){var al,ak;aj.mousemove(am);if((al=aj.fst.curtain)!=null){if(typeof al.refresh==="function"){al.refresh()}}if((ak=aj.snd.curtain)!=null){if(typeof ak.refresh==="function"){ak.refresh()}}am.stopPropagation();am.stopImmediatePropagation();return am.preventDefault()};ai=function(am){var an,al,ak;an=$(window);an.unbind("mousemove",ah);an.unbind("mouseup",ai);if((al=aj.fst.curtain)!=null){if(typeof al.off==="function"){al.off()}}if((ak=aj.snd.curtain)!=null){if(typeof ak.off==="function"){ak.off()}}am.stopPropagation();am.stopImmediatePropagation();return am.preventDefault()};this.element.mousedown(function(am){var an,al,ak;an=$(window);an.mousemove(ah);an.mouseup(ai);if((al=aj.fst.curtain)!=null){if(typeof al.on==="function"){al.on()}}if((ak=aj.snd.curtain)!=null){if(typeof ak.on==="function"){ak.on()}}am.stopPropagation();am.stopImmediatePropagation();return am.preventDefault()})}ac.prototype.init=function(){return this.container=K(this.element.parent())};ac.prototype.volume=function(ae,ad){if(ad==null){ad=false}if(ae!=null){this._volume=ae;if(!ad){this.adjust()}return this}return this._volume};ac.prototype.value=function(ag,af){var ad,ae;if(af==null){af=false}ad=this.valueWidth();if(ag!=null){ae=ag/ad;return this.volume(ae,af)}return this.volume()*ad};ac.prototype.regulateValue=function(ae){var af,ad;ad=this.minValue();af=this.maxValue();if(ae<ad){ae=ad}if(ae>af){ae=af}return ae};return ac})(l);I=(function(ab){q(ac,ab);function ac(af,ag,ae,ah){var ai,ad;ac.__super__.constructor.call(this,af,ag,ae,ah);this.element.addClass("vertical");this.fst.element.addClass("left");this.snd.element.addClass("right");this.fst.element.css({"float":"left"});this.snd.element.css({"float":"left"});if((ai=this.fst.curtain)!=null){ai.css("pointer","col-resize")}if((ad=this.snd.curtain)!=null){ad.css("pointer","col-resize")}}ac.prototype.mousemove=function(ae){var af,ad;af=this.container.absoluteX()+this.container.contentX(true);ad=ae.pageX-af;ad=this.regulateValue(ad);return this.value(ad)};ac.prototype.valueWidth=function(){return this.container.width()};ac.prototype.minValue=function(){var ae,ad;ae=this.fst.element.minWidth()+this.fst.element.nonContentWidth();ad=this.snd.element.maxWidth()+this.snd.element.nonContentWidth();if(ad!=null){ad=this.valueWidth()-ad}if((ae!=null)&&(ad!=null)){return Math.min(ae,ad)}return ae||ad||0};ac.prototype.maxValue=function(){var af,ae,ad;ad=this.valueWidth();af=this.fst.element.maxWidth()+this.fst.element.nonContentWidth();ae=this.snd.element.minWidth()+this.snd.element.nonContentWidth();if(ae!=null){ae=ad-ae}if((af!=null)&&(ae!=null)){return Math.max(af,ae)}return af||ae||ad};ac.prototype.adjust=function(){var ag,af,ae,ad;ae=this.value();ad=this.valueWidth();ag=ae-this.fst.element.nonContentWidth(true);af=(ad-ae)-this.snd.element.nonContentWidth(true);if(ag<=0){if(this.fst.element.is(":visible")){this.fst.element.hide()}if(!this.snd.element.is(":visible")){this.snd.element.show()}this.snd.element.outerWidth(true,ad);this._value=ae=0}else{if(af<=0){if(!this.fst.element.is(":visible")){this.fst.element.show()}if(this.snd.element.is(":visible")){this.snd.element.hide()}this.fst.element.outerWidth(true,ad);this._value=ae=ad}else{if(!this.fst.element.is(":visible")){this.fst.element.show()}if(!this.snd.element.is(":visible")){this.snd.element.show()}this.fst.element.width(ag);this.snd.element.width(af)}}this.fst.adjust();this.snd.adjust();this.element.relativeX(ae-this.element.outerWidth()/2);return this};return ac})(R);C=(function(ac){q(ab,ac);function ab(af,ag,ae,ah){var ai,ad;ab.__super__.constructor.call(this,af,ag,ae,ah);this.element.addClass("horizontal");this.fst.element.addClass("top");this.snd.element.addClass("bottom");if((ai=this.fst.curtain)!=null){ai.css("pointer","raw-resize")}if((ad=this.snd.curtain)!=null){ad.css("pointer","raw-resize")}}ab.prototype.mousemove=function(ae){var af,ad;af=this.container.absoluteY()+this.container.contentY(true);ad=ae.pageY-af;ad=this.regulateValue(ad);return this.value(ad)};ab.prototype.valueWidth=function(){return this.container.height()};ab.prototype.minValue=function(){var ae,ad;ae=this.fst.element.minHeight()+this.fst.element.nonContentHeight();ad=this.snd.element.maxHeight()+this.snd.element.nonContentHeight();if(ad!=null){ad=this.valueWidth()-ad}if((ae!=null)&&(ad!=null)){return Math.min(ae,ad)}return ae||ad||0};ab.prototype.maxValue=function(){var af,ae,ad;ad=this.valueWidth();af=this.fst.element.maxHeight()+this.fst.element.nonContentHeight();ae=this.snd.element.minHeight()+this.snd.element.nonContentHeight();if(ae!=null){ae=ad-ae}if((af!=null)&&(ae!=null)){return Math.max(af,ae)}return af||ae||ad};ab.prototype.adjust=function(){var ag,af,ae,ad;ae=this.value();ad=this.valueWidth();ag=ae-this.fst.element.nonContentHeight(true);af=(ad-ae)-this.snd.element.nonContentHeight(true);if(ag<=0){if(this.fst.element.is(":visible")){this.fst.element.hide()}if(!this.snd.element.is(":visible")){this.snd.element.show()}this.snd.element.outerHeight(true,ad);this._value=ae=0}else{if(af<=0){if(!this.fst.element.is(":visible")){this.fst.element.show()}if(this.snd.element.is(":visible")){this.snd.element.hide()}this.fst.element.outerHeight(true,ad);this._value=ae=ad}else{if(!this.fst.element.is(":visible")){this.fst.element.show()}if(!this.snd.element.is(":visible")){this.snd.element.show()}this.fst.element.height(ag);this.snd.element.height(af)}}this.fst.adjust();this.snd.adjust();this.element.relativeY(ae-this.element.outerHeight()/2);return this};return ab})(R);namespace("Jencil.ui.widgets.splitters",function(ab){ab.Splitter=R;ab.VerticalSplitter=I;return ab.HorizontalSplitter=C});P=(function(ac){q(ab,ac);function ab(ae,ad,af){if(ad==null){ad="<div>"}ab.__super__.constructor.call(this,ae,ad,af);this.element.addClass("editor");this._changeCallbacks=[]}ab.prototype.val=function(ad){throw new Error("NotImplementedError")};ab.prototype.change=function(ag){var af,ad,ae;if(ag!=null){this._changeCallbacks.push(ag);return this}ae=this._changeCallbacks;for(af=0,ad=ae.length;af<ad;af++){ag=ae[af];ag.call(this,this.val())}return this};ab.prototype.h1=null;ab.prototype.h2=null;ab.prototype.h3=null;ab.prototype.h4=null;ab.prototype.h5=null;ab.prototype.h6=null;ab.prototype.bold=null;ab.prototype.italic=null;ab.prototype.underline=null;ab.prototype.strike=null;ab.prototype.superscript=null;ab.prototype.subscript=null;ab.prototype.anchor=null;ab.prototype.image=null;ab.prototype.unorderedList=null;ab.prototype.orderedList=null;return ab})(j);J=(function(ab){q(ac,ab);function ac(ae,ad,af){var ag=this;if(ad==null){ad="<div>"}ac.__super__.constructor.call(this,ae,ad,af);this.textarea=$("<textarea>").appendTo(this.element).css({margin:"0",padding:"0",border:"none",outline:"none",resize:"none"});this.textarea=K(this.textarea);this.textarea.on("keydown",function(ah){if(ah.which!==13){return}return ag.core.caretaker.save()});if(($.fn.tabby!=null)&&this.core.options.enableTabIndent){this.textarea.tabby({tabString:this.core.options.tabString})}this.textarea=e(this.textarea);if(!this.core.options.enableAutoIndent){this.textarea.autoIndent.disable()}this.textarea.on("keypress keyup click blur",function(){return ag.change()})}ac.prototype.val=function(ad){if(ad!=null){this.textarea.val(ad);this.change();return this}return this.textarea.val()};ac.prototype.focus=function(){this.textarea.focus();return this};ac.prototype.createMemento=function(){return this.val()};ac.prototype.setMemento=function(ad){return this.val(ad)};ac.prototype.adjust=function(){this.textarea.outerWidth(this.element.width());this.textarea.outerHeight(this.element.height());return this};ac.prototype.selection=function(ae,ad){if(ad==null){ad=true}if(ae!=null){this.textarea.selection.text(ae,ad);this.core.caretaker.save();return this.change()}return this.textarea.selection.text()};ac.prototype.enclose=function(ad,ae,af){var ag;if(af==null){af=true}ag=this.textarea.selection.caret();if(ag[0]===ag[1]){this.textarea.selection.selectWholeCurrentLine()}this.textarea.selection.enclose(ad,ae,af);this.core.caretaker.save();return this.change()};ac.prototype.insertBefore=function(af,ad){var ae;if(ad==null){ad=true}ae=this.textarea.selection.caret();if(ae[0]===ae[1]){this.textarea.selection.selectWholeCurrentLine()}this.textarea.selection.insertBefore(af,ad);this.core.caretaker.save();return this.change()};ac.prototype.insertAfter=function(af,ad){var ae;if(ad==null){ad=true}ae=this.textarea.selection.caret();if(ae[0]===ae[1]){this.textarea.selection.selectWholeCurrentLine()}this.textarea.selection.insertAfter(af,ad);this.core.caretaker.save();return this.change()};return ac})(P);namespace("Jencil.ui.widgets.editors",function(ab){ab.BaseEditor=P;return ab.TextEditor=J});z=(function(ac){q(ab,ac);function ab(ae,ad,af){if(ad==null){ad="<div>"}ab.__super__.constructor.call(this,ae,ad,af);this.element.addClass("viewer")}ab.prototype.update=function(ae,ad){throw new Error("NotImplementedError")};return ab})(j);Y=(function(ac){q(ab,ac);function ab(ad){ab.__super__.constructor.call(this,ad);this.templatePath=this.core.options.viewerTemplatePath;this.element.css({position:"relative"});this.curtain=p(this.element);this.iframe=$("<iframe>").appendTo(this.element).css({margin:"0",padding:"0",border:"none",outline:"none",resize:"none",width:"100%",height:"100%",overflow:"visible"});this.iframe.attr("frameborder",0);this.iframe=K(this.iframe);this.iframe.init=function(){var ae;ae=this.get(0);if(ae.contentDocument!=null){this.document=ae.contentDocument}else{this.document=ae.contentWindow.document}return this.document.write("<body></body>")};this.iframe.write=function(ae){var ag;if(this.document!=null){try{ag=this.document.documentElement.scrollTop}catch(af){ag=0}this.document.open();this.document.write(ae);this.document.close();$("a",$(this.document)).attr("target","_blank");this.document.documentElement.scrollTop=ag;this.width(this.document.scrollLeft);this.height(this.document.scrollTop);return true}return false};this.iframe.loadTemplate=function(ae,af){var ag=this;return $.ajax({url:ae,success:function(ah){ag._template=ah;return ag.write(af)}})}}ab.prototype.init=function(){return this.iframe.init()};ab.prototype.update=function(ae,ad){if(this.iframe._template!=null){ae=this.iframe._template.replace("{{content}}",ae)}else{if(this.templatePath!=null){this.iframe.loadTemplate(this.templatePath,ae)}}return this.iframe.write(ae)};ab.prototype.adjust=function(){this.iframe.outerWidth(this.element.width());this.iframe.outerHeight(this.element.height());return this};return ab})(z);O=(function(ac){q(ab,ac);function ab(ad,ae){this.config=ae;ab.__super__.constructor.call(this,ad);this.config=jQuery.extend({type:"GET",dataType:"text",data:function(af){return encodeURIComponent(af)},url:null},this.config)}ab.prototype.update=function(ae,ad){var af=this;if(this._valueCache!==ae||ad){this._valueCache=ae;return $.ajax({type:this.config.type,dataType:this.config.dataType,data:JSON.stringify(this.config.data(ae)),url:this.config.url,success:function(ag){if(af.iframe._template!=null){ag=af.iframe._template.replace("{{content}}",ag)}else{if(af.templatePath!=null){af.iframe.loadTemplate(af.templatePath,ag)}}return af.iframe.write(ag)}})}};return ab})(Y);namespace("Jencil.ui.widgets.viewers",function(ab){ab.BaseViewer=z;ab.TemplateViewer=Y;return ab.AjaxViewer=O});c=(function(ac){q(ab,ac);function ab(ae,ad,af){if(ad==null){ad="<div>"}ab.__super__.constructor.call(this,ae,ad,af);this.element.addClass("helper")}return ab})(j);D=(function(ac){q(ab,ac);function ab(ad){ab.__super__.constructor.call(this,ad);this.templatePath=this.core.options.helperTemplatePath;this.element.css({position:"relative"});this.curtain=p(this.element);this.iframe=$("<iframe>").appendTo(this.element).css({margin:"0",padding:"0",border:"none",outline:"none",resize:"none",width:"100%",height:"100%",overflow:"visible"});this.iframe.attr("frameborder",0);this.iframe=K(this.iframe);this.iframe.init=function(){var ae;ae=this.get(0);if(ae.contentDocument!=null){this.document=ae.contentDocument}else{this.document=ae.contentWindow.document}return this.document.write("<body></body>")};this.iframe.write=function(ae){var ag;if(this.document!=null){try{ag=this.document.documentElement.scrollTop}catch(af){ag=0}this.document.open();this.document.write(ae);this.document.close();this.document.documentElement.scrollTop=ag;this.width(this.document.scrollLeft);this.height(this.document.scrollTop);return true}return false};this.iframe.loadTemplate=function(ae){var af=this;return $.ajax({url:ae,success:function(ag){return af.write(ag)}})}}ab.prototype.init=function(){this.iframe.init();if(this.templatePath!=null){return this.iframe.loadTemplate(this.templatePath)}};ab.prototype.adjust=function(){this.iframe.outerWidth(this.element.width());this.iframe.outerHeight(this.element.height());return this};return ab})(c);namespace("Jencil.ui.widgets.helpers",function(ab){ab.BaseHelper=c;return ab.TemplateHelper=D});y=(function(ab){q(ac,ab);function ac(ad){ac.__super__.constructor.call(this,ad,"<span>");this.element.addClass("separator")}return ac})(l);S=(function(ac){q(ab,ac);function ab(ad,ae,ag,af){this.name=ae;this.text=ag;this.title=af;ab.__super__.constructor.call(this,ad,"<a>");this.text=Jencil.t(this.text||this.name);this.title=Jencil.t(this.title||this.text);this.element.addClass("button").addClass(ae);this.element.append($("<span>"+this.text+"</span>"));this.element.attr("title",this.title)}ab.prototype.enable=function(){return this.element.removeClass("disable")};ab.prototype.disable=function(){return this.element.addClass("disable")};ab.prototype.validate=function(){return this};return ab})(l);W=(function(ac){q(ab,ac);function ab(ae,af,ah,ag,aj,ad){var ai=this;this.shortcut=ad;ab.__super__.constructor.call(this,ae,af,ah,ag);this.callback=function(){if(!ai.element.hasClass("disable")){return aj()}};this.callback.raw=aj;this.element.click(function(){return ai.callback()});if((this.shortcut!=null)&&(window.shortcut!=null)){window.shortcut.add(this.shortcut,function(ak){return ai.callback()});this.element.attr("title",""+this.title+" ("+this.shortcut+")")}}return ab})(S);f=(function(ab){q(ac,ab);function ac(ae,af,ai,ah,ag,ad){var aj;this.command=ag;aj=function(){var ak;ak=ae.editor();return ak[ag].call(ak)};ac.__super__.constructor.call(this,ae,af,ai,ah,aj,ad)}ac.prototype.init=function(){return this.validate()};ac.prototype.validate=function(){var ad;ad=this.core.editor();if(!(ad[this.command]!=null)){this.disable()}return this};ac.factory=function(ae,ag){var aj,af,ad,ai,ah;af=ai=ah=aj=ad=null;switch(ag.length){case 5:af=ag[0];ai=ag[1];ah=ag[2];aj=ag[3];ad=ag[4];break;case 4:af=ag[0];ai=ah=ag[1];aj=ag[2];ad=ag[3];break;case 3:af=aj=ag[0];ai=ah=ag[1];ad=ag[2];break;case 2:af=aj=ag[0];ai=ah=ag[1];ad=null;break;case 1:af=aj=ai=ah=ag[0];ad=null}return new ac(ae,af,ai,ah,aj,ad)};return ac})(W);A=(function(ab){q(ac,ab);function ac(ad){var af,ae=this;af=function(ag){return ae.core.caretaker.undo()};ac.__super__.constructor.call(this,ad,"undo","Undo","Undo",af,"Ctrl+Z")}ac.prototype.init=function(){var ad,ae=this;ad=function(){if(!ae.core.caretaker.canUndo()){ae.disable()}else{ae.enable()}return setTimeout(ad,100)};return ad()};return ac})(W);a=(function(ac){q(ab,ac);function ab(ad){var af,ae=this;af=function(ag){return ae.core.caretaker.redo()};ab.__super__.constructor.call(this,ad,"redo","Redo","Redo",af,"Ctrl+Shift+Z")}ab.prototype.init=function(){var ad,ae=this;ad=function(){if(!ae.core.caretaker.canRedo()){ae.disable()}else{ae.enable()}return setTimeout(ad,100)};return ad()};return ab})(W);r=(function(ac){q(ab,ac);function ab(ad){var af,ae=this;af=function(ag){return ae.core.fullscreen.toggle()};ab.__super__.constructor.call(this,ad,"fullscreen","Toggle fullscreen","Fullscreen",af,"Ctrl+F")}ab.prototype.init=function(){var ad,ae=this;ad=function(){if(ae.core.fullscreen.element.is(":visible")){ae.element.addClass("hide")}else{ae.element.removeClass("hide")}return setTimeout(ad,100)};return ad()};return ab})(W);V=(function(ac){q(ab,ac);function ab(ad){var af,ae=this;af=function(ag){return ae.core.viewer().toggle()};ab.__super__.constructor.call(this,ad,"viewer","Quick view","Quick view",af,"Ctrl+Q")}ab.prototype.validate=function(){if(!this.core.viewer()){this.disable();return false}return true};ab.prototype.init=function(){var ad,ae=this;if(!this.validate()){return}ad=function(){if(ae.core.viewer().element.is(":visible")){ae.element.addClass("hide")}else{ae.element.removeClass("hide")}return setTimeout(ad,100)};return ad()};return ab})(W);i=(function(ac){q(ab,ac);function ab(ad){var af,ae=this;af=function(ag){return ae.core.helper().toggle()};ab.__super__.constructor.call(this,ad,"helper","Help","Help",af,"Ctrl+H")}ab.prototype.validate=function(){if(!this.core.helper()){this.disable();return false}return true};ab.prototype.init=function(){var ad,ae=this;if(!this.validate()){return}ad=function(){if(ae.core.helper().element.is(":visible")){ae.element.addClass("hide")}else{ae.element.removeClass("hide")}return setTimeout(ad,100)};return ad()};return ab})(W);Q=function(ab,ac){if(ac instanceof Array){return f.factory(ab,ac)}if(typeof ac==="string"){switch(ac){case"Separator":return new y(ab);case"Undo":return new A(ab);case"Redo":return new a(ab);case"Fullscreen":return new r(ab);case"Viewer":return new V(ab);case"Helper":return new i(ab);default:throw new Exception(""+ac+" is not known Button type")}}return new ac(ab)};namespace("Jencil.ui.widgets.buttons",function(ab){ab.Separator=y;ab.Button=S;ab.ActionButton=W;ab.CommandButton=f;ab.UndoButton=A;ab.RedoButton=a;ab.FullscreenButton=r;ab.ViewerButton=V;return ab.HelperButton=i});w=(function(ab){q(ac,ab);function ac(ae,af,ad){ac.__super__.constructor.call(this,ae);this.element.addClass("jencil wrapper");this.element.width(af);this.element.height(ad);this.workspace=new n(this.core);this.workspace.element.appendTo(this.element)}ac.prototype.init=function(){var ad=this;if((this.element.resizable!=null)&&this.core.options.resizable===true){this.element.resizable({start:function(){var ag,ae,aj,ai,ah,af;if((ag=ad.core.editor())!=null){if((ae=ag.curtain)!=null){ae.on()}}if((aj=ad.core.viewer())!=null){if((ai=aj.curtain)!=null){ai.on()}}return(ah=ad.core.helper())!=null?(af=ah.curtain)!=null?af.on():void 0:void 0},resize:function(){var ag,ae,aj,ai,ah,af;if((ag=ad.core.editor())!=null){if((ae=ag.curtain)!=null){ae.refresh()}}if((aj=ad.core.viewer())!=null){if((ai=aj.curtain)!=null){ai.refresh()}}if((ah=ad.core.helper())!=null){if((af=ah.curtain)!=null){af.refresh()}}return ad.adjust()},stop:function(){var ag,ae,aj,ai,ah,af;if((ag=ad.core.editor())!=null){if((ae=ag.curtain)!=null){ae.off()}}if((aj=ad.core.viewer())!=null){if((ai=aj.curtain)!=null){ai.off()}}if((ah=ad.core.helper())!=null){if((af=ah.curtain)!=null){af.off()}}return ad.adjust()}})}return this.workspace.init()};ac.prototype.adjust=function(){this.workspace.element.outerWidth(true,this.element.width());this.workspace.element.outerHeight(true,this.element.height());this.workspace.adjust();return this};return ac})(j);n=(function(ac){q(ab,ac);function ab(ad){ab.__super__.constructor.call(this,ad);this.element.addClass("workspace");this.profile(ad.options.profile)}ab.prototype.profile=function(af){var al,aj,ah,an,ad,ak,ai,ag,ae,am=this;if(af!=null){if(typeof af==="string"){af=this.core.options.profiles[af]}af=jQuery.extend(o,af);af.defaultVolume=this.core.options.defaultVolume||af.defaultVolume;af.defaultVolume2=this.core.options.defaultVolume2||af.defaultVolume2;this.element.empty();this.mainPanel=new af.mainPanelClass(this.core,af);if((ak=this.mainPanel.editorPanel)!=null){ak.val(this.core.element.val())}if((ai=this.mainPanel.editorPanel)!=null){ai.change(function(ao){return am.core.element.val(ao)})}this.toolbar=new t(this.core);ag=af.toolbarButtons;for(aj=0,an=ag.length;aj<an;aj++){al=ag[aj];al=Q(this.core,al);this.toolbar.addButton(al)}this.statusbar=new G(this.core);ae=af.statusbarButtons;for(ah=0,ad=ae.length;ah<ad;ah++){al=ae[ah];al=Q(this.core,al);this.statusbar.addButton(al)}this.element.append(this.toolbar.element);this.element.append(this.mainPanel.element);this.element.append(this.statusbar.element);this._profile=af;return this}return this._profile};ab.prototype.init=function(){this.toolbar.init();this.statusbar.init();return this.mainPanel.init()};ab.prototype.adjust=function(){var ae,ad;this.toolbar.element.outerWidth(true,this.element.width());this.statusbar.element.outerWidth(true,this.element.width());this.mainPanel.element.outerWidth(true,this.element.width());this.mainPanel.element.outerHeight(true,this.element.height());this.mainPanel.adjust();ae=this.toolbar.element.outerHeight(true);ad=this.statusbar.element.outerHeight(true);this.mainPanel.element.outerHeight(true,this.element.height()-(ae+ad));this.toolbar.adjust();this.statusbar.adjust();this.mainPanel.adjust();return this};ab.prototype.update=function(ad){if(this.mainPanel.editorPanel&&this.mainPanel.viewerPanel){return this.mainPanel.viewerPanel.update(this.mainPanel.editorPanel.val(),ad)}};return ab})(j);E=(function(ac){q(ab,ac);function ab(ad){ab.__super__.constructor.call(this,ad);this._buttons=[]}ab.prototype.init=function(){var ae,ag,ad,af;af=this._buttons;for(ag=0,ad=af.length;ag<ad;ag++){ae=af[ag];ae.init()}return this};ab.prototype.addButton=function(ad){this._buttons.push(ad);return this.element.append(ad.element)};return ab})(j);t=(function(ac){q(ab,ac);function ab(ad){ab.__super__.constructor.call(this,ad);this.element.addClass("toolbar")}return ab})(E);G=(function(ac){q(ab,ac);function ab(ad){ab.__super__.constructor.call(this,ad);this.element.addClass("statusbar")}return ab})(E);b=(function(){function ab(ac,ae){var ad;ad=new ae.editorClass(ac);ad.element.addClass("mainPanel");return ad}return ab})();M=(function(ac){q(ab,ac);function ab(ad,ae){var af=this;this.editorPanel=new ae.editorClass(ad);this.viewerPanel=new ae.viewerClass(ad);ab.__super__.constructor.call(this,ad,this.editorPanel,this.viewerPanel,ae.defaultVolume);this.element.addClass("mainPanel");this.editorPanel.change(function(ag){return af.viewerPanel.update(ag)})}return ab})(m);Z=(function(ac){q(ab,ac);function ab(ad,ae){var af=this;this.editorPanel=new ae.editorClass(ad);this.viewerPanel=new ae.viewerClass(ad);this.helperPanel=new ae.helperClass(ad);this.verticalPanel=new m(ad,this.editorPanel,this.viewerPanel,ae.defaultVolume);ab.__super__.constructor.call(this,ad,this.verticalPanel,this.helperPanel,ae.defaultVolume2);this.element.addClass("mainPanel");this.editorPanel.change(function(ag){return af.viewerPanel.update(ag)})}return ab})(T);namespace("Jencil.ui.widgets.panels",function(ab){ab.MonomainPanel=b;ab.DimainPanel=M;return ab.TrimainPanel=Z});v=(function(ac){q(ab,ac);function ab(ad){var ae=this;ab.__super__.constructor.call(this,ad);this.element.addClass("fullscreen");this.element.css({position:"fixed",top:"0",left:"0",width:"100%",height:"100%","z-index":100});this.curtain=$("<div>").addClass("curtain");this.curtain.css({position:"absolute",top:"0",left:"0",width:"100%",height:"100%",background:"black",opacity:"0.6",cursor:"pointer"});this.cell=$("<div>").css({position:"absolute",top:"5%",left:"5%",width:"90%",height:"90%"});if($.browser.msie&&$.browser.version<7){this.element.css("position","absolute");$(window).scroll(function(){return ae.element.css("top",$(document).scrollTop())})}this.curtain.click(function(){return ae.off()});this.element.append(this.curtain);this.element.append(this.cell);this.element.hide();this.resize=function(){return ae.core.wrapper.adjust()}}ab.prototype.on=function(){var ad,ae=this;ad=9/10;this.cell.append(this.core.wrapper.element);this.core.wrapper.element.outerWidth(true,this.element.width()*ad);this.core.wrapper.element.outerHeight(true,this.element.height()*ad);this.core.wrapper.init();this.core.wrapper.adjust();this.core.wrapper.workspace.update(true);this.element.fadeIn("fast",function(){ae.core.wrapper.element.css("width","100%");ae.core.wrapper.element.css("height","100%");return ae.core.wrapper.adjust()});return $(window).on("resize",this.resize)};ab.prototype.off=function(){this.core.element.after(this.core.wrapper.element);this.core.wrapper.element.css("width","");this.core.wrapper.element.css("height","");this.core.wrapper.init();this.core.wrapper.adjust();this.core.wrapper.workspace.update(true);this.element.fadeOut("fast");return $(window).unbind("resize",this.resize)};ab.prototype.toggle=function(ae,ad){if(this.element.is(":visible")){this.off();return typeof ad==="function"?ad():void 0}else{this.on();return typeof ae==="function"?ae():void 0}};return ab})(j);d=(function(){var ac,ad,ae,ab;ac=(function(){var ai,ag,ah,af;ah=["p","li"];af=[];for(ai=0,ag=ah.length;ai<ag;ai++){ab=ah[ai];af.push([ab,new RegExp("^[s\t]*<"+ab+">"),new RegExp("</"+ab+">[s\t]*$")])}return af})();ae=function(ak,ag){var ah,aj,ai,af;console.log("@",this);if(ak.shiftKey){return}for(ai=0,af=ac.length;ai<af;ai++){aj=ac[ai];if(aj[1].test(ag)||aj[2].test(ag)){ah=this.selection._getLineCaret();this.selection.caret(ah[1]);return}}};ad=function(al,ah,af,ak){var aj,ai,ag;if(al.shiftKey){return}for(ai=0,ag=ac.length;ai<ag;ai++){aj=ac[ai];if(aj[2].test(ah)){ab=aj[0];this.selection.insertAfter("<"+ab+"></"+ab+">",false);this.selection.caretOffset(-(3+ab.length));return}}};return function(af){if(!(af.autoIndent!=null)){af=e(af)}af.autoIndent.pre=function(ah,ag){return ae.call(af,ah,ag)};af.autoIndent.post=function(aj,ah,ag,ai){return ad.call(af,aj,ah,ag,ai)};return af}})();u=(function(){var ab;ab=new RegExp("^<h([1-6])>(.*)</h[1-6]>\n?$");return function(af){var ae,ac,ad;ae=this.textarea.selection.caret();if(ae[0]===ae[1]){this.textarea.selection.selectWholeCurrentLine()}ad=this.selection();if(ab.test(ad)){if(RegExp.$1===af.toString()){ac=RegExp.$2}else{ac="<h"+af+">"+RegExp.$2+"</h"+af+">"}return this.selection(ac)}else{return this.enclose("<h"+af+">","</h"+af+">\n")}}})();L=(function(ac){q(ab,ac);function ab(ad){ab.__super__.constructor.call(this,ad);this.textarea=d(this.textarea)}ab.prototype.h1=function(){return u.call(this,1)};ab.prototype.h2=function(){return u.call(this,2)};ab.prototype.h3=function(){return u.call(this,3)};ab.prototype.h4=function(){return u.call(this,4)};ab.prototype.h5=function(){return u.call(this,5)};ab.prototype.h6=function(){return u.call(this,6)};ab.prototype.bold=function(){return this.enclose("<b>","</b>")};ab.prototype.italic=function(){return this.enclose("<i>","</i>")};ab.prototype.underline=function(){return this.enclose("<u>","</u>")};ab.prototype.strike=function(){return this.enclose("<s>","</s>")};ab.prototype.superscript=function(){return this.enclose("<sup>","</sup>")};ab.prototype.subscript=function(){return this.enclose("<sub>","</sub>")};ab.prototype.quote=function(){return this.enclose("<q>","</q>")};ab.prototype.blockquote=function(){return this.enclose("\n<blockquote>","</blockquote>\n")};ab.prototype.code=function(){return this.enclose("<code>","</code>")};ab.prototype.pre=function(){return this.enclose("<pre>","</pre>")};ab.prototype.anchorLink=function(){var ad,ae;ae=this.selection();if(!ae){ae=window.prompt("Please input a link text","Here")}ad=window.prompt("Please input a link url","http://");if(!(ad!=null)){return}return this.selection("<a href='"+ad+"'>"+ae+"</a>")};ab.prototype.image=function(){var ad,ae;ae=window.prompt("Please input a image url","http://");ad=window.prompt("(Optional) Please input a alt message","Image");if(!(ae!=null)){return}return this.selection("<img src='"+ae+"' alt='"+ad+"'>")};ab.prototype.unorderedList=function(){var ae,ad;ae=this.selection();ae=(function(){var ai,ag,ah,af;ah=ae.split("\n");af=[];for(ai=0,ag=ah.length;ai<ag;ai++){ad=ah[ai];af.push(" <li>"+ad+"</li>")}return af})();ae.unshift("<ul>");ae.push("</ul>");return this.selection(ae.join("\n"))};ab.prototype.orderedList=function(){var ae,ad;ae=this.selection();ae=(function(){var ai,ag,ah,af;ah=ae.split("\n");af=[];for(ai=0,ag=ah.length;ai<ag;ai++){ad=ah[ai];af.push(" <li>"+ad+"</li>")}return af})();ae.unshift("<ol>");ae.push("</ol>");return this.selection(ae.join("\n"))};return ab})(Jencil.ui.widgets.editors.TextEditor);Jencil.utils.namespace("Jencil.ui.widgets.editors",function(ab){return ab.HtmlEditor=L});x=Jencil.ui.widgets.viewers.TemplateViewer;Jencil.utils.namespace("Jencil.ui.widgets.viewers",function(ab){return ab.HtmlViewer=x});X=(function(ac){q(ab,ac);function ab(ad){var ae;ab.__super__.constructor.call(this,ad);ae='<p><span class="key">Ctrl+Z</span>'+(Jencil.t("Undo"))+'<p>\n<p><span class="key">Ctrl+Shift+Z</span>'+(Jencil.t("Redo"))+'<p>\n<p><span class="key">Ctrl+B</span>'+(Jencil.t("Make selected text property as <b>Bold</b>"))+'<p>\n<p><span class="key">Ctrl+I</span>'+(Jencil.t("Make selected text property as <i>Italic</i>"))+'<p>\n<p><span class="key">Ctrl+U</span>'+(Jencil.t("Underline selected text like <u>Underline</u>"))+'<p>\n<p><span class="key">Ctrl+F</span>'+(Jencil.t("Toggle fullscreen mode"))+'<p>\n<p><span class="key">Ctrl+Q</span>'+(Jencil.t("Toggle quick view"))+'<p>\n<p><span class="key">Ctrl+H</span>'+(Jencil.t("Toggle help"))+"<p>";this.element.html(ae)}return ab})(Jencil.ui.widgets.helpers.BaseHelper);namespace("Jencil.ui.widgets.helpers",function(ab){return ab.HtmlHelper=X});B={mainPanelClass:Jencil.ui.widgets.panels.TrimainPanel,editorClass:L,viewerClass:x,helperClass:X,defaultVolume:1,defaultVolume2:0.7,toolbarButtons:["Undo","Redo","Separator",["h1","H1"],["h2","H2"],["h3","H3"],["h4","H4"],["h5","H5"],["h6","H6"],"Separator",["bold","Bold","Ctrl+B"],["italic","Italic","Ctrl+I"],["underline","Underline","Ctrl+U"],["strike","Strikeout"],["superscript","Superscript"],["subscript","Subscript"],"Separator",["anchorLink","Anchor link"],["image","Image"],["unorderedList","Unordered list"],["orderedList","Ordered list"],["quote","Quote"],["blockquote","Blockquote"],["code","Code"],["pre","Pre"],"Separator","Fullscreen"],statusbarButtons:["Viewer","Helper"]};Jencil.utils.namespace("Jencil.profiles",function(ab){return ab.HtmlProfile=B})}).call(this);
@@ -0,0 +1,268 @@
1
+ /**
2
+ * Jencil 0.1.2
3
+ *
4
+ * Author: lambdalisue
5
+ * URL: http://hashnote.net/
6
+ * License: MIT License
7
+ *
8
+ * Copyright (C) 2012 lambdalisue, hashnote.net allright reserved.
9
+ *
10
+ * This application include following Library inside
11
+ *
12
+ * Tabby jQuery plugin version 0.12
13
+ * Ted Devito - http://teddevito.com/demos/textarea.html
14
+ * Copyright (c) 2009 Ted Devito
15
+ *
16
+ * shortcut.js
17
+ * http://www.openjs.com/scripts/events/keyboard_shortcuts/
18
+ * Version : 2.01.B
19
+ * By Binny V A
20
+ * License : BSD
21
+ */
22
+ .panelMixin {
23
+ border-radius: 5px;
24
+ -moz-border-radius: 5px;
25
+ -webkit-border-radius: 5px;
26
+ padding: 10px;
27
+ border: 1px solid #e4e4e4;
28
+ background: #f9f9f9;
29
+ }
30
+ .jencil {
31
+ border-radius: 5px;
32
+ -moz-border-radius: 5px;
33
+ -webkit-border-radius: 5px;
34
+ padding: 10px;
35
+ border: 1px solid #e4e4e4;
36
+ background: #f9f9f9;
37
+ }
38
+ .jencil .workspace .mainPanel {
39
+ padding: 5px 0;
40
+ background: #f9f9f9;
41
+ }
42
+ .jencil .workspace .mainPanel .panel.left {
43
+ margin-right: 5px;
44
+ }
45
+ .jencil .workspace .mainPanel .panel.right {
46
+ margin-left: 5px;
47
+ }
48
+ .jencil .workspace .mainPanel .panel.top {
49
+ margin-bottom: 5px;
50
+ }
51
+ .jencil .workspace .mainPanel .panel.bottom {
52
+ margin-top: 10px;
53
+ }
54
+ .jencil .workspace .mainPanel .panel.editor,
55
+ .jencil .workspace .mainPanel .panel.viewer {
56
+ border-radius: 5px;
57
+ -moz-border-radius: 5px;
58
+ -webkit-border-radius: 5px;
59
+ padding: 10px;
60
+ border: 1px solid #e4e4e4;
61
+ background: #f9f9f9;
62
+ background: #ffffff;
63
+ }
64
+
65
+ .panelMixin {
66
+ border-radius: 5px;
67
+ -moz-border-radius: 5px;
68
+ -webkit-border-radius: 5px;
69
+ padding: 10px;
70
+ border: 1px solid #e4e4e4;
71
+ background: #f9f9f9;
72
+ }
73
+ .jencil .workspace .toolbar,
74
+ .jencil .workspace .statusbar {
75
+ width: 100%;
76
+ height: auto;
77
+ }
78
+ .jencil .workspace .toolbar:before,
79
+ .jencil .workspace .statusbar:before,
80
+ .jencil .workspace .toolbar:after,
81
+ .jencil .workspace .statusbar:after {
82
+ content: "";
83
+ display: block;
84
+ clear: both;
85
+ }
86
+ .jencil .workspace .toolbar .separator,
87
+ .jencil .workspace .statusbar .separator,
88
+ .jencil .workspace .toolbar .button,
89
+ .jencil .workspace .statusbar .button {
90
+ display: block;
91
+ float: left;
92
+ }
93
+ .jencil .workspace .toolbar .separator,
94
+ .jencil .workspace .statusbar .separator {
95
+ height: 14px;
96
+ margin: 2px 0;
97
+ margin-left: 6px;
98
+ padding-right: 6px;
99
+ border-left: 1px solid #e4e4e4;
100
+ text-indent: -10000px;
101
+ }
102
+ .jencil .workspace .toolbar .button,
103
+ .jencil .workspace .statusbar .button {
104
+ margin: 0 1px;
105
+ padding: 2px;
106
+ outline: none;
107
+ border: 1px solid #f9f9f9;
108
+ cursor: pointer;
109
+ border-radius: 5px;
110
+ -moz-border-radius: 5px;
111
+ -webkit-border-radius: 5px;
112
+ }
113
+ .jencil .workspace .toolbar .button:hover,
114
+ .jencil .workspace .statusbar .button:hover {
115
+ background: #eaeaea;
116
+ }
117
+ .jencil .workspace .toolbar .button span,
118
+ .jencil .workspace .statusbar .button span {
119
+ display: block;
120
+ width: 16px;
121
+ height: 16px;
122
+ text-indent: -10000px;
123
+ background-image: url(img/sprite.png) !important;
124
+ background: url(img/sprite.gif) no-repeat;
125
+ }
126
+ .jencil .workspace .statusbar .separator,
127
+ .jencil .workspace .statusbar .button {
128
+ display: block;
129
+ float: right;
130
+ }
131
+ .jencil .workspace .button.hide span,
132
+ .jencil .workspace .button.disabled span {
133
+ opacity: 0.5;
134
+ }
135
+ .jencil .workspace .button.undo span {
136
+ background-position: 0px 0px;
137
+ }
138
+ .jencil .workspace .button.redo span {
139
+ background-position: -16px 0px;
140
+ }
141
+ .jencil .workspace .button.h1 span {
142
+ background-position: -32px 0px;
143
+ }
144
+ .jencil .workspace .button.h2 span {
145
+ background-position: -48px 0px;
146
+ }
147
+ .jencil .workspace .button.h3 span {
148
+ background-position: -64px 0px;
149
+ }
150
+ .jencil .workspace .button.h4 span {
151
+ background-position: -80px 0px;
152
+ }
153
+ .jencil .workspace .button.h5 span {
154
+ background-position: -96px 0px;
155
+ }
156
+ .jencil .workspace .button.h6 span {
157
+ background-position: -112px 0px;
158
+ }
159
+ .jencil .workspace .button.bold span {
160
+ background-position: -128px 0px;
161
+ }
162
+ .jencil .workspace .button.italic span {
163
+ background-position: -144px 0px;
164
+ }
165
+ .jencil .workspace .button.underline span {
166
+ background-position: -160px 0px;
167
+ }
168
+ .jencil .workspace .button.strike span {
169
+ background-position: -176px 0px;
170
+ }
171
+ .jencil .workspace .button.subscript span {
172
+ background-position: -192px 0px;
173
+ }
174
+ .jencil .workspace .button.superscript span {
175
+ background-position: -208px 0px;
176
+ }
177
+ .jencil .workspace .button.anchorLink span {
178
+ background-position: -224px 0px;
179
+ }
180
+ .jencil .workspace .button.image span {
181
+ background-position: -240px 0px;
182
+ }
183
+ .jencil .workspace .button.unorderedList span {
184
+ background-position: -256px 0px;
185
+ }
186
+ .jencil .workspace .button.orderedList span {
187
+ background-position: -272px 0px;
188
+ }
189
+ .jencil .workspace .button.pre span {
190
+ background-position: -288px 0px;
191
+ }
192
+ .jencil .workspace .button.code span {
193
+ background-position: -304px 0px;
194
+ }
195
+ .jencil .workspace .button.quote span {
196
+ background-position: -320px 0px;
197
+ }
198
+ .jencil .workspace .button.blockquote span {
199
+ background-position: -336px 0px;
200
+ }
201
+ .jencil .workspace .button.viewer span {
202
+ background-position: -352px 0px;
203
+ }
204
+ .jencil .workspace .button.helper span {
205
+ background-position: -368px 0px;
206
+ }
207
+ .jencil .workspace .button.fullscreen span {
208
+ background-position: -384px 0px;
209
+ }
210
+ .jencil .workspace .button.fullscreen.hide span {
211
+ background-position: -400px 0px;
212
+ }
213
+
214
+ .panelMixin {
215
+ border-radius: 5px;
216
+ -moz-border-radius: 5px;
217
+ -webkit-border-radius: 5px;
218
+ padding: 10px;
219
+ border: 1px solid #e4e4e4;
220
+ background: #f9f9f9;
221
+ }
222
+ .jencil .helper {
223
+ padding: 4px 11px;
224
+ color: #3d3d3d;
225
+ font-size: 12px;
226
+ overflow: auto;
227
+ }
228
+ .jencil .helper h1 {
229
+ font-size: 14px;
230
+ margin: 0;
231
+ padding: 0;
232
+ }
233
+ .jencil .helper p {
234
+ float: left;
235
+ }
236
+ .jencil .helper p .key {
237
+ display: inline-block;
238
+ margin: 0 10px 0 20px;
239
+ padding: 2px 5px;
240
+ background: #3d3d3d;
241
+ color: #f9f9f9;
242
+ text-align: center;
243
+ border-radius: 3px;
244
+ -moz-border-radius: 3px;
245
+ -webkit-border-radius: 3px;
246
+ }
247
+
248
+ .jencil .workspace .panel {
249
+ position: relative;
250
+ }
251
+ .jencil .workspace .panel .splitter {
252
+ position: absolute;
253
+ cursor: move;
254
+ }
255
+ .jencil .workspace .panel .splitter.vertical {
256
+ top: 0;
257
+ width: 7px;
258
+ height: 100%;
259
+ cursor: col-resize;
260
+ background: url(img/splitterv.png) 50% 50% no-repeat;
261
+ }
262
+ .jencil .workspace .panel .splitter.horizontal {
263
+ left: 0;
264
+ width: 100%;
265
+ height: 7px;
266
+ cursor: row-resize;
267
+ background: url(img/splitterh.png) 50% 50% no-repeat;
268
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Jencil 0.1.2
3
+ *
4
+ * Author: lambdalisue
5
+ * URL: http://hashnote.net/
6
+ * License: MIT License
7
+ *
8
+ * Copyright (C) 2012 lambdalisue, hashnote.net allright reserved.
9
+ *
10
+ * This application include following Library inside
11
+ *
12
+ * Tabby jQuery plugin version 0.12
13
+ * Ted Devito - http://teddevito.com/demos/textarea.html
14
+ * Copyright (c) 2009 Ted Devito
15
+ *
16
+ * shortcut.js
17
+ * http://www.openjs.com/scripts/events/keyboard_shortcuts/
18
+ * Version : 2.01.B
19
+ * By Binny V A
20
+ * License : BSD
21
+ */
22
+ .panelMixin{border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;padding:10px;border:1px solid #e4e4e4;background:#f9f9f9}.jencil{border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;padding:10px;border:1px solid #e4e4e4;background:#f9f9f9}.jencil .workspace .mainPanel{padding:5px 0;background:#f9f9f9}.jencil .workspace .mainPanel .panel.left{margin-right:5px}.jencil .workspace .mainPanel .panel.right{margin-left:5px}.jencil .workspace .mainPanel .panel.top{margin-bottom:5px}.jencil .workspace .mainPanel .panel.bottom{margin-top:10px}.jencil .workspace .mainPanel .panel.editor,.jencil .workspace .mainPanel .panel.viewer{border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;padding:10px;border:1px solid #e4e4e4;background:#f9f9f9;background:#fff}.panelMixin{border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;padding:10px;border:1px solid #e4e4e4;background:#f9f9f9}.jencil .workspace .toolbar,.jencil .workspace .statusbar{width:100%;height:auto}.jencil .workspace .toolbar:before,.jencil .workspace .statusbar:before,.jencil .workspace .toolbar:after,.jencil .workspace .statusbar:after{content:"";display:block;clear:both}.jencil .workspace .toolbar .separator,.jencil .workspace .statusbar .separator,.jencil .workspace .toolbar .button,.jencil .workspace .statusbar .button{display:block;float:left}.jencil .workspace .toolbar .separator,.jencil .workspace .statusbar .separator{height:14px;margin:2px 0;margin-left:6px;padding-right:6px;border-left:1px solid #e4e4e4;text-indent:-10000px}.jencil .workspace .toolbar .button,.jencil .workspace .statusbar .button{margin:0 1px;padding:2px;outline:0;border:1px solid #f9f9f9;cursor:pointer;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px}.jencil .workspace .toolbar .button:hover,.jencil .workspace .statusbar .button:hover{background:#eaeaea}.jencil .workspace .toolbar .button span,.jencil .workspace .statusbar .button span{display:block;width:16px;height:16px;text-indent:-10000px;background-image:url(img/sprite.png)!important;background:url(img/sprite.gif) no-repeat}.jencil .workspace .statusbar .separator,.jencil .workspace .statusbar .button{display:block;float:right}.jencil .workspace .button.hide span,.jencil .workspace .button.disabled span{opacity:.5}.jencil .workspace .button.undo span{background-position:0 0}.jencil .workspace .button.redo span{background-position:-16px 0}.jencil .workspace .button.h1 span{background-position:-32px 0}.jencil .workspace .button.h2 span{background-position:-48px 0}.jencil .workspace .button.h3 span{background-position:-64px 0}.jencil .workspace .button.h4 span{background-position:-80px 0}.jencil .workspace .button.h5 span{background-position:-96px 0}.jencil .workspace .button.h6 span{background-position:-112px 0}.jencil .workspace .button.bold span{background-position:-128px 0}.jencil .workspace .button.italic span{background-position:-144px 0}.jencil .workspace .button.underline span{background-position:-160px 0}.jencil .workspace .button.strike span{background-position:-176px 0}.jencil .workspace .button.subscript span{background-position:-192px 0}.jencil .workspace .button.superscript span{background-position:-208px 0}.jencil .workspace .button.anchorLink span{background-position:-224px 0}.jencil .workspace .button.image span{background-position:-240px 0}.jencil .workspace .button.unorderedList span{background-position:-256px 0}.jencil .workspace .button.orderedList span{background-position:-272px 0}.jencil .workspace .button.pre span{background-position:-288px 0}.jencil .workspace .button.code span{background-position:-304px 0}.jencil .workspace .button.quote span{background-position:-320px 0}.jencil .workspace .button.blockquote span{background-position:-336px 0}.jencil .workspace .button.viewer span{background-position:-352px 0}.jencil .workspace .button.helper span{background-position:-368px 0}.jencil .workspace .button.fullscreen span{background-position:-384px 0}.jencil .workspace .button.fullscreen.hide span{background-position:-400px 0}.panelMixin{border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;padding:10px;border:1px solid #e4e4e4;background:#f9f9f9}.jencil .helper{padding:4px 11px;color:#3d3d3d;font-size:12px;overflow:auto}.jencil .helper h1{font-size:14px;margin:0;padding:0}.jencil .helper p{float:left}.jencil .helper p .key{display:inline-block;margin:0 10px 0 20px;padding:2px 5px;background:#3d3d3d;color:#f9f9f9;text-align:center;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px}.jencil .workspace .panel{position:relative}.jencil .workspace .panel .splitter{position:absolute;cursor:move}.jencil .workspace .panel .splitter.vertical{top:0;width:7px;height:100%;cursor:col-resize;background:url(img/splitterv.png) 50% 50% no-repeat}.jencil .workspace .panel .splitter.horizontal{left:0;width:100%;height:7px;cursor:row-resize;background:url(img/splitterh.png) 50% 50% no-repeat}
metadata ADDED
@@ -0,0 +1,63 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jencil-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - miio
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-09-22 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: It gem are use jencil for Rails.
15
+ email:
16
+ - info@miio.info
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - .gitignore
22
+ - Gemfile
23
+ - LICENSE.txt
24
+ - README.md
25
+ - Rakefile
26
+ - app/helpers/jencil_text_area_helper.rb
27
+ - jencil-rails.gemspec
28
+ - lib/jencil-rails.rb
29
+ - lib/jencil/rails/engine.rb
30
+ - lib/jencil/rails/jencil.rb
31
+ - lib/jencil/rails/version.rb
32
+ - vendor/assets/javascripts/jencil.js
33
+ - vendor/assets/javascripts/jencil.min.js
34
+ - vendor/assets/stylesheets/img/splitterh.png
35
+ - vendor/assets/stylesheets/img/splitterv.png
36
+ - vendor/assets/stylesheets/img/sprite.png
37
+ - vendor/assets/stylesheets/jencil.css
38
+ - vendor/assets/stylesheets/jencil.min.css
39
+ homepage: ''
40
+ licenses: []
41
+ post_install_message:
42
+ rdoc_options: []
43
+ require_paths:
44
+ - lib
45
+ required_ruby_version: !ruby/object:Gem::Requirement
46
+ none: false
47
+ requirements:
48
+ - - ! '>='
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ required_rubygems_version: !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ! '>='
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ requirements: []
58
+ rubyforge_project:
59
+ rubygems_version: 1.8.11
60
+ signing_key:
61
+ specification_version: 3
62
+ summary: It gem are use jencil for Rails.
63
+ test_files: []