Ticket #117: configURI.patch

File configURI.patch, 4.1 KB (added by mokhet, 15 years ago)

patch for revision 59

  • htmlarea.js

     
    327327 
    328328  this.debug = true; 
    329329 
     330  this.URIs = { 
     331   "blank": "popups/blank.html", 
     332   "link": "link.html", 
     333   "insert_image": "insert_image.html", 
     334   "insert_table": "insert_table.html", 
     335   "select_color": "select_color.html", 
     336   "fullscreen": "fullscreen.html", 
     337   "about": "about.html", 
     338   "mozilla_security": "http://mozilla.org/editor/midasdemo/securityprefs.html" 
     339  }; 
     340   
     341 
    330342  // ADDING CUSTOM BUTTONS: please read below! 
    331343  // format of the btnList elements is "ID: [ ToolTip, Icon, Enabled in text mode?, ACTION ]" 
    332344  //    - ID: unique ID for the button.  If the button calls document.execCommand 
     
    10151027  // create the IFRAME & add to container 
    10161028  var iframe = document.createElement("iframe"); 
    10171029  innerEditor.appendChild(iframe); 
    1018   iframe.src = _editor_url + "popups/blank.html"; 
     1030  iframe.src = _editor_url + editor.config.URIs["blank"]; 
    10191031  this._iframe = iframe; 
    10201032 
    10211033 
     
    27982810      f_target : link.target, 
    27992811      f_usetarget : editor.config.makeLinkShowsTarget 
    28002812    }; 
    2801   this._popupDialog("link.html", function(param) { 
     2813  this._popupDialog(editor.config.URIs["link"], function(param) { 
    28022814    if (!param) 
    28032815      return false; 
    28042816    var a = link; 
     
    28562868    f_vert   : image.vspace, 
    28572869    f_horiz  : image.hspace 
    28582870  }; 
    2859   this._popupDialog("insert_image.html", function(param) { 
     2871  this._popupDialog(editor.config.URIs["insert_image"], function(param) { 
    28602872    if (!param) {       // user must have pressed Cancel 
    28612873      return false; 
    28622874    } 
     
    28962908  var sel = this._getSelection(); 
    28972909  var range = this._createRange(sel); 
    28982910  var editor = this;    // for nested functions 
    2899   this._popupDialog("insert_table.html", function(param) { 
     2911  this._popupDialog(editor.config.URIs["insert_table"], function(param) { 
    29002912    if (!param) {       // user must have pressed Cancel 
    29012913      return false; 
    29022914    } 
     
    29852997      case "hilitecolor": 
    29862998    (HTMLArea.is_ie) && (cmdID = "backcolor"); 
    29872999      case "forecolor": 
    2988     this._popupDialog("select_color.html", function(color) { 
     3000    this._popupDialog(editor.config.URIs["select_color"], function(color) { 
    29893001      if (color) { // selection not canceled 
    29903002        editor._doc.execCommand(cmdID, false, "#" + color); 
    29913003      } 
     
    30013013    if (HTMLArea.is_ie) { 
    30023014      //if (confirm(HTMLArea.I18N.msg["IE-sucks-full-screen"])) 
    30033015      { 
    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,location=no,directories=no,status=no,menubar=no," + 
    30063018              "scrollbars=no,resizable=yes,width=640,height=480"); 
    30073019      } 
    30083020    } else { 
    3009                             win = window.open(this.popupURL("fullscreen.html"), "ha_fullscreen", 
     3021                            win = window.open(this.popupURL(editor.config.URIs["fullscreen"]), "ha_fullscreen", 
    30103022            "toolbar=no,menubar=no,personalbar=no,width=640,height=480," + 
    30113023            "scrollbars=no,resizable=yes"); 
    30123024    } 
     
    30213033    break; 
    30223034      case "inserttable": this._insertTable(); break; 
    30233035      case "insertimage": this._insertImage(); break; 
    3024       case "about"    : this._popupDialog("about.html", null, this); break; 
     3036      case "about"    : this._popupDialog(editor.config.URIs["about"], null, this); break; 
    30253037      case "showhelp" : window.open(this.config.helpURL, "ha_help"); break; 
    30263038 
    30273039      case "killword": this._wordClean(); break; 
     
    30433055            "[FIXME: please translate this message in your language definition file.]"; 
    30443056        } 
    30453057        if (confirm(HTMLArea.I18N.msg["Moz-Clipboard"])) 
    3046           window.open("http://mozilla.org/editor/midasdemo/securityprefs.html"); 
     3058          window.open(editor.config.URIs["mozilla_security"]); 
    30473059      } 
    30483060    } 
    30493061    break; 
     
    46544666} 
    46554667 
    46564668 
    4657 HTMLArea.init(); 
     4669HTMLArea.init(); 
     4670 No newline at end of file