%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/985914/root/data/old/home/stash/atlassian-stash/static/lib/
Upload File :
Create Path :
Current File : //proc/985914/root/data/old/home/stash/atlassian-stash/static/lib/jquery.caretposition-min.js

(function(B){var A={primaryStyles:["fontFamily","fontSize","fontWeight","fontVariant","fontStyle","paddingLeft","paddingTop","paddingBottom","paddingRight","marginLeft","marginTop","marginBottom","marginRight","borderLeftColor","borderTopColor","borderBottomColor","borderRightColor","borderLeftStyle","borderTopStyle","borderBottomStyle","borderRightStyle","borderLeftWidth","borderTopWidth","borderBottomWidth","borderRightWidth","lineHeight","outline","letterSpacing","wordSpacing","textAlign","verticalAlign"],specificStyle:{"word-wrap":"break-word","overflow-x":"hidden","overflow-y":"auto"},toHtml:function(C){return C.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br>").split(" ").join('<span style="white-space:prev-wrap">&nbsp;</span>')},getCaretPosition:function(Q){var D=A,O=this,H=O[0],E=O.offset();if(B.browser.msie){if(H!==document.activeElement){H.focus()}var I=document.selection.createRange();B("#hskeywords").val(H.scrollTop);return{left:(I.boundingLeft)-E.left,top:parseInt(I.boundingTop)-E.top+H.scrollTop+document.documentElement.scrollTop+parseInt(O.getComputedStyle("fontSize"))}}D.simulator.empty();B.each(D.primaryStyles,function(R,S){O.cloneStyle(D.simulator,S)});D.simulator.css(B.extend({width:O.width(),height:O.height()},D.specificStyle));Q=Q||0;var M=O.val(),F=O.getCursorPosition()+Q;var G=M.substring(0,F),N=M.substring(F);var K=B('<span class="before"/>').html(D.toHtml(G)),P=B('<span class="focus"/>'),C=B('<span class="after"/>').html(D.toHtml(N));D.simulator.append(K).append(P).append(C);var J=P.offset(),L=D.simulator.offset();return{top:J.top-L.top-H.scrollTop+parseInt(O.getComputedStyle("fontSize")),left:P[0].offsetLeft-D.simulator[0].offsetLeft-H.scrollLeft}}};B(function(){A.simulator=B('<div id="textarea_simulator"/>').css({position:"absolute",top:0,left:0,visibility:"hidden"}).appendTo(document.body)});B.fn.extend({getComputedStyle:function(D){if(this.length==0){return }var E=this[0];var C=this.css(D);C=C||(B.browser.msie?E.currentStyle[D]:document.defaultView.getComputedStyle(E,null)[D]);return C},cloneStyle:function(D,C){var E=this.getComputedStyle(C);if(!!E){B(D).css(C,E)}},cloneAllStyle:function(F,E){var D=this[0];for(var C in D.style){var G=D.style[C];typeof G=="string"||typeof G=="number"?this.cloneStyle(F,C):NaN}},getCursorPosition:function(){var F=this[0],C=0;if("selectionStart" in F){C=F.selectionStart}else{if("selection" in document){var D=document.selection.createRange();if(parseInt(B.browser.version)>6){F.focus();var H=document.selection.createRange().text.length;D.moveStart("character",-F.value.length);C=D.text.length-H}else{var I=document.body.createTextRange();I.moveToElementText(F);for(;I.compareEndPoints("StartToStart",D)<0;C++){I.moveStart("character",1)}for(var E=0;E<=C;E++){if(F.value.charAt(E)=="\n"){C++}}var G=F.value.split("\n").length-1;C-=G;return C}}}return C},getCaretPosition:A.getCaretPosition})})(jQuery);

Zerion Mini Shell 1.0