Changeset 63
- Timestamp:
- 04/07/05 11:18:56 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/htmlarea.js
r60 r63 175 175 this.width = "toolbar"; 176 176 this.height = "auto"; 177 177 178 178 //language of the editor 179 179 this.lang = "en"; 180 180 181 181 // 182 182 this.lcBackend = "lcbackend.php?lang=$lang&context=$context"; 183 183 184 184 // enable creation of a status bar? 185 185 this.statusBar = true; … … 332 332 333 333 this.debug = true; 334 335 this.URIs = { 336 "blank": "popups/blank.html", 337 "link": "link.html", 338 "insert_image": "insert_image.html", 339 "insert_table": "insert_table.html", 340 "select_color": "select_color.html", 341 "fullscreen": "fullscreen.html", 342 "about": "about.html", 343 "mozilla_security": "http://mozilla.org/editor/midasdemo/securityprefs.html" 344 }; 345 334 346 335 347 // ADDING CUSTOM BUTTONS: please read below! … … 1014 1026 var iframe = document.createElement("iframe"); 1015 1027 innerEditor.appendChild(iframe); 1016 iframe.src = _editor_url + "popups/blank.html";1028 iframe.src = _editor_url + editor.config.URIs["blank"]; 1017 1029 this._iframe = iframe; 1018 1030 … … 2795 2807 f_usetarget : editor.config.makeLinkShowsTarget 2796 2808 }; 2797 this._popupDialog( "link.html", function(param) {2809 this._popupDialog(editor.config.URIs["link"], function(param) { 2798 2810 if (!param) 2799 2811 return false; … … 2853 2865 f_horiz : image.hspace 2854 2866 }; 2855 this._popupDialog( "insert_image.html", function(param) {2867 this._popupDialog(editor.config.URIs["insert_image"], function(param) { 2856 2868 if (!param) { // user must have pressed Cancel 2857 2869 return false; … … 2893 2905 var range = this._createRange(sel); 2894 2906 var editor = this; // for nested functions 2895 this._popupDialog( "insert_table.html", function(param) {2907 this._popupDialog(editor.config.URIs["insert_table"], function(param) { 2896 2908 if (!param) { // user must have pressed Cancel 2897 2909 return false; … … 2982 2994 (HTMLArea.is_ie) && (cmdID = "backcolor"); 2983 2995 case "forecolor": 2984 this._popupDialog( "select_color.html", function(color) {2996 this._popupDialog(editor.config.URIs["select_color"], function(color) { 2985 2997 if (color) { // selection not canceled 2986 2998 editor._doc.execCommand(cmdID, false, "#" + color); … … 2997 3009 if (HTMLArea.is_ie) { 2998 3010 { 2999 win = window.open(this.popupURL( "fullscreen.html"), "ha_fullscreen",3011 win = window.open(this.popupURL(editor.config.URIs["fullscreen"]), "ha_fullscreen", 3000 3012 "toolbar=no,location=no,directories=no,status=no,menubar=no," + 3001 3013 "scrollbars=no,resizable=yes,width=640,height=480"); 3002 3014 } 3003 3015 } else { 3004 win = window.open(this.popupURL( "fullscreen.html"), "ha_fullscreen",3016 win = window.open(this.popupURL(editor.config.URIs["fullscreen"]), "ha_fullscreen", 3005 3017 "toolbar=no,menubar=no,personalbar=no,width=640,height=480," + 3006 3018 "scrollbars=no,resizable=yes"); … … 3017 3029 case "inserttable": this._insertTable(); break; 3018 3030 case "insertimage": this._insertImage(); break; 3019 case "about" : this._popupDialog( "about.html", null, this); break;3031 case "about" : this._popupDialog(editor.config.URIs["about"], null, this); break; 3020 3032 case "showhelp" : window.open(this.config.helpURL, "ha_help"); break; 3021 3033 … … 3066 3078 editor._textArea['on'+ev.type](); 3067 3079 } 3068 3080 3069 3081 if(HTMLArea.is_gecko && keyEvent && ev.ctrlKey && this._unLink && this._unlinkOnUndo) 3070 3082 { … … 3332 3344 var sel = this._getSelection(); 3333 3345 var range = this._createRange(sel); 3334 3346 3335 3347 // the selection must contain at least some text 3336 3348 if (range.text == "undefined") return true; 3337 3349 3338 3350 // to remove a link (should be done like this?) 3339 3351 var r2 = range.duplicate(); … … 4522 4534 */ 4523 4535 HTMLArea._loadlang = function(context) 4524 { 4536 { 4525 4537 if(typeof _editor_lcbackend == "string") 4526 4538 { … … 4539 4551 } 4540 4552 } 4541 4553 4542 4554 var lang; 4543 4555 var langData = HTMLArea._geturlcontent(url); … … 4566 4578 return string; 4567 4579 } 4568 4580 4569 4581 if(typeof HTMLArea._lc_catalog == 'undefined') 4570 4582 {
Note: See TracChangeset
for help on using the changeset viewer.