Ticket #117 (closed defect: fixed)
custom linked files in core javascript
| Reported by: | mokhet | Owned by: | gogo |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Xinha Core | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | mokhet@… |
Description
in htmlarea.js we can find the following codes
this.helpURL = _editor_url + "reference.html";
iframe.src = _editor_url + "popups/blank.html";
this._popupDialog("link.html", function(param) {
this._popupDialog("insert_image.html", function(param) {
this._popupDialog("insert_table.html", function(param) {
this._popupDialog("select_color.html", function(color) {
win = window.open(this.popupURL("fullscreen.html"), "ha_fullscreen",
case "about" : this._popupDialog("about.html", null, this); break;
all this fonctions are hard linked to .html files, if we want to locally update one of thoses files, we have to manually update htmlarea.js which is a bad idea, cause it forces to manually check SVN updates.
I think it would be better to be allowed to update the files when configuring
think we could do it with something like that
HTMLArea.Config = function () {
var cfg = this;
...
this.hardlinked = {
'reference': 'reference.html',
'blank': 'blank.html',
'link': 'link.html',
'insert_image': 'insert_image.html',
'insert_table': 'insert_table.html',
'select_color': 'select_color.html',
'fullscreen': 'fullscreen.html',
'about': 'about.html'
};
...
}
Then to update for any reason link.html to my_own_link.php or link.jsp or anything else, we would just have to use the config way
var xinha_config = new HTMLArea.Config(); xinha_config.hardlinked["link"] = 'my_own_link.php';
Hope you see what i mean and that my little example didnt confused too much.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
