Changeset 63


Ignore:
Timestamp:
04/07/05 11:18:56 (14 years ago)
Author:
gogo
Message:

Apply patch from #117 allowing configurable filenames/urls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/htmlarea.js

    r60 r63  
    175175  this.width = "toolbar"; 
    176176  this.height = "auto"; 
    177    
     177 
    178178  //language of the editor 
    179179  this.lang = "en"; 
    180    
     180 
    181181  // 
    182182  this.lcBackend = "lcbackend.php?lang=$lang&context=$context"; 
    183    
     183 
    184184  // enable creation of a status bar? 
    185185  this.statusBar = true; 
     
    332332 
    333333  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 
    334346 
    335347  // ADDING CUSTOM BUTTONS: please read below! 
     
    10141026  var iframe = document.createElement("iframe"); 
    10151027  innerEditor.appendChild(iframe); 
    1016   iframe.src = _editor_url + "popups/blank.html"; 
     1028  iframe.src = _editor_url + editor.config.URIs["blank"]; 
    10171029  this._iframe = iframe; 
    10181030 
     
    27952807      f_usetarget : editor.config.makeLinkShowsTarget 
    27962808    }; 
    2797   this._popupDialog("link.html", function(param) { 
     2809  this._popupDialog(editor.config.URIs["link"], function(param) { 
    27982810    if (!param) 
    27992811      return false; 
     
    28532865    f_horiz  : image.hspace 
    28542866  }; 
    2855   this._popupDialog("insert_image.html", function(param) { 
     2867  this._popupDialog(editor.config.URIs["insert_image"], function(param) { 
    28562868    if (!param) {       // user must have pressed Cancel 
    28572869      return false; 
     
    28932905  var range = this._createRange(sel); 
    28942906  var editor = this;    // for nested functions 
    2895   this._popupDialog("insert_table.html", function(param) { 
     2907  this._popupDialog(editor.config.URIs["insert_table"], function(param) { 
    28962908    if (!param) {       // user must have pressed Cancel 
    28972909      return false; 
     
    29822994    (HTMLArea.is_ie) && (cmdID = "backcolor"); 
    29832995      case "forecolor": 
    2984     this._popupDialog("select_color.html", function(color) { 
     2996    this._popupDialog(editor.config.URIs["select_color"], function(color) { 
    29852997      if (color) { // selection not canceled 
    29862998        editor._doc.execCommand(cmdID, false, "#" + color); 
     
    29973009    if (HTMLArea.is_ie) { 
    29983010      { 
    2999                                 win = window.open(this.popupURL("fullscreen.html"), "ha_fullscreen", 
     3011                                win = window.open(this.popupURL(editor.config.URIs["fullscreen"]), "ha_fullscreen", 
    30003012              "toolbar=no,location=no,directories=no,status=no,menubar=no," + 
    30013013              "scrollbars=no,resizable=yes,width=640,height=480"); 
    30023014      } 
    30033015    } else { 
    3004                             win = window.open(this.popupURL("fullscreen.html"), "ha_fullscreen", 
     3016                            win = window.open(this.popupURL(editor.config.URIs["fullscreen"]), "ha_fullscreen", 
    30053017            "toolbar=no,menubar=no,personalbar=no,width=640,height=480," + 
    30063018            "scrollbars=no,resizable=yes"); 
     
    30173029      case "inserttable": this._insertTable(); break; 
    30183030      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; 
    30203032      case "showhelp" : window.open(this.config.helpURL, "ha_help"); break; 
    30213033 
     
    30663078    editor._textArea['on'+ev.type](); 
    30673079  } 
    3068    
     3080 
    30693081  if(HTMLArea.is_gecko && keyEvent && ev.ctrlKey &&  this._unLink && this._unlinkOnUndo) 
    30703082  { 
     
    33323344  var sel = this._getSelection(); 
    33333345  var range = this._createRange(sel); 
    3334    
     3346 
    33353347  // the selection must contain at least some text 
    33363348  if (range.text == "undefined") return true; 
    3337    
     3349 
    33383350  // to remove a link (should be done like this?) 
    33393351  var r2 = range.duplicate(); 
     
    45224534 */ 
    45234535HTMLArea._loadlang = function(context) 
    4524 {  
     4536{ 
    45254537  if(typeof _editor_lcbackend == "string") 
    45264538  { 
     
    45394551    } 
    45404552  } 
    4541    
     4553 
    45424554  var lang; 
    45434555  var langData = HTMLArea._geturlcontent(url); 
     
    45664578    return string; 
    45674579  } 
    4568    
     4580 
    45694581  if(typeof HTMLArea._lc_catalog == 'undefined') 
    45704582  { 
Note: See TracChangeset for help on using the changeset viewer.