Index: openacs-4/packages/xowiki/www/resources/ckeditor4/plugins/syntaxhighlight/dialogs/syntaxhighlight.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/ckeditor4/plugins/syntaxhighlight/dialogs/syntaxhighlight.js,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/www/resources/ckeditor4/plugins/syntaxhighlight/dialogs/syntaxhighlight.js 11 Feb 2015 11:29:53 -0000 1.1.2.1 @@ -0,0 +1,16 @@ +CKEDITOR.dialog.add("syntaxhighlightDialog",function(c){var f=function(){var b={};b.hideGutter="true"===(""+c.config.syntaxhighlight_hideGutter).toLowerCase();b.hideControls="true"===(""+c.config.syntaxhighlight_hideControls).toLowerCase();b.collapse="true"===(""+c.config.syntaxhighlight_collapse).toLowerCase();b.codeTitle=c.config.syntaxhighlight_codeTitle;b.showColumns="true"===(""+c.config.syntaxhighlight_showColumns).toLowerCase();b.noWrap="true"===(""+c.config.syntaxhighlight_noWrap).toLowerCase(); +b.firstLine=c.config.syntaxhighlight_firstLine;b.highlightChecked="true"===(""+c.config.syntaxhighlight_highlightChecked).toLowerCase();b.highlight=c.config.syntaxhighlight_highlight;b.lang=-1<"applescript actionscript3 as3 bash shell sh coldfusion cf cpp c c# c-sharp csharp css delphi pascal pas diff patch erl erlang groovy haxe hx java jfx javafx js jscript javascript perl Perl pl php text plain powershell ps posh py python ruby rails ror rb sass scss scala sql tap Tap TAP ts typescript vb vbnet xml xhtml xslt html".split(" ").indexOf(c.config.syntaxhighlight_lang)? +c.config.syntaxhighlight_lang:"as3";b.code=c.config.syntaxhighlight_code;return b};return{title:c.lang.syntaxhighlight.title,minWidth:500,minHeight:400,contents:[{id:"source",label:c.lang.syntaxhighlight.sourceTab,accessKey:"S",elements:[{type:"vbox",children:[{id:"cmbLang",type:"select",labelLayout:"horizontal",label:c.lang.syntaxhighlight.langLbl,widths:["25%","75%"],items:[["ActionScript3","as3"],["AppleScript","applescript"],["Bash (Shell)","bash"],["ColdFusion","cf"],["C#","csharp"],["C++","cpp"], +["CSS","css"],["Delphi","delphi"],["Diff","diff"],["Erlang","erl"],["Groovy","groovy"],["Haxe","hx"],["Javascript","jscript"],["Java","java"],["Java FX","javafx"],["Perl","perl"],["PHP","php"],["Plain (Text)","plain"],["PowerShell","ps"],["Python","python"],["Ruby","ruby"],["Sass","scss"],["Scala","scala"],["SQL","sql"],["TAP","tap"],["TypeScript","ts"],["VB","vb"],["XML/XHTML","xml"]],setup:function(b){b.lang&&this.setValue(b.lang)},commit:function(b){b.lang=this.getValue()}}]},{type:"textarea", +id:"hl_code",rows:22,style:"width:100%",validate:CKEDITOR.dialog.validate.notEmpty(c.lang.syntaxhighlight.sourceTextareaEmptyError),setup:function(b){b.code&&this.setValue(b.code)},commit:function(b){b.code=this.getValue()}}]},{id:"advanced",label:c.lang.syntaxhighlight.advancedTab,accessKey:"A",elements:[{type:"vbox",children:[{type:"html",html:""+c.lang.syntaxhighlight.hideGutter+""},{type:"checkbox",id:"hide_gutter",label:c.lang.syntaxhighlight.hideGutterLbl,setup:function(b){this.setValue(b.hideGutter)}, +commit:function(b){b.hideGutter=this.getValue()}},{type:"html",html:""+c.lang.syntaxhighlight.hideControls+""},{type:"checkbox",id:"hide_controls",label:c.lang.syntaxhighlight.hideControlsLbl,setup:function(b){this.setValue(b.hideControls)},commit:function(b){b.hideControls=this.getValue()}},{type:"html",html:""+c.lang.syntaxhighlight.collapse+""},{type:"checkbox",id:"collapse",label:c.lang.syntaxhighlight.collapseLbl,setup:function(b){this.setValue(b.collapse)}, +commit:function(b){b.collapse=this.getValue()}},{type:"html",html:""+c.lang.syntaxhighlight.codeTitleLbl+""},{type:"hbox",widths:["5%","95%"],children:[{type:"text",id:"default_ti",style:"width:40%",label:"",setup:function(b){null!=b.codeTitle&&this.setValue(b.codeTitle)},commit:function(b){this.getValue()&&""!=this.getValue()&&(b.codeTitle=this.getValue())}}]},{type:"html",html:""+c.lang.syntaxhighlight.showColumns+""},{type:"checkbox",id:"show_columns",label:c.lang.syntaxhighlight.showColumnsLbl, +setup:function(b){this.setValue(b.showColumns)},commit:function(b){b.showColumns=this.getValue()}},{type:"html",html:""+c.lang.syntaxhighlight.lineWrap+""},{type:"checkbox",id:"line_wrap",label:c.lang.syntaxhighlight.lineWrapLbl,setup:function(b){this.setValue(b.noWrap)},commit:function(b){b.noWrap=this.getValue()}},{type:"html",html:""+c.lang.syntaxhighlight.lineCount+""},{type:"hbox",widths:["5%","95%"],children:[{type:"text",id:"default_lc",style:"width:15%",label:"", +setup:function(b){1"+c.lang.syntaxhighlight.highlight+""},{type:"hbox",widths:["5%","95%"],children:[{type:"text",id:"default_hl",style:"width:40%",label:"",setup:function(b){null!=b.highlight&&this.setValue(b.highlight)},commit:function(b){this.getValue()&&""!=this.getValue()&&(b.highlight=this.getValue())}}]},{type:"hbox",widths:["5%", +"95%"],children:[{type:"html",html:""+c.lang.syntaxhighlight.highlightLbl+""}]}]}]}],onShow:function(){var b=this.getParentEditor().getSelection().getStartElement(),b=b&&b.getAscendant("pre",!0),a=null;if(b){code=b.getHtml().replace(/
/g,"\n").replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/&/g,"&");var a=f(),c=b.getAttribute("class");if(c){if(-1