Permalink
Browse files

MINOR More robust path concat in HtmlEditorField.js (means it doesn't…

… break with translatable module enabled)
  • Loading branch information...
1 parent 5010d95 commit f01ca808db7dcf5dd21df99fbbbff7534ea82c6b @chillu chillu committed May 15, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 javascript/HtmlEditorField.js
@@ -730,14 +730,14 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
return this.find('.ss-htmleditorfield-file[data-id=' + idOrUrl + ']');
},
showFileView: function(idOrUrl, successCallback) {
- var self = this, params = (Number(idOrUrl) == idOrUrl) ? '?ID=' + idOrUrl : '?FileURL=' + idOrUrl,
+ var self = this, params = (Number(idOrUrl) == idOrUrl) ? {ID: idOrUrl} : {FileURL: idOrUrl},
item = $('<div class="ss-htmleditorfield-file" />');
item.addClass('loading');
this.find('.content-edit').append(item);
$.ajax({
// url: this.data('urlViewfile') + '?ID=' + id,
- url: this.attr('action').replace(/MediaForm/, 'viewfile') + params,
+ url: $.path.addSearchParams(this.attr('action').replace(/MediaForm/, 'viewfile'), params),
success: function(html, status, xhr) {
var newItem = $(html);
item.replaceWith(newItem);

0 comments on commit f01ca80

Please sign in to comment.