mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Fixed url concat in SiteTreURLSegmentField.js
Needed to handle existing GET params, e.g. added from the translatable module
This commit is contained in:
parent
ef651d9d93
commit
db47dcff47
@ -127,13 +127,13 @@
|
||||
* (Function) callback
|
||||
*/
|
||||
suggest: function(val, callback) {
|
||||
var field = this.find(':text');
|
||||
var field = this.find(':text'), urlParts = $.path.parseUrl(this.closest('form').attr('action')),
|
||||
url = urlParts.hrefNoSearch + '/field/' + field.attr('name') + '/suggest/?value=' + encodeURIComponent(val);
|
||||
if(urlParts.search) url += '&' + urlParts.search.replace(/^\?/, '');
|
||||
|
||||
$.get(
|
||||
this.closest('form').attr('action') +
|
||||
'/field/' + field.attr('name') + '/suggest/?value=' + encodeURIComponent(val),
|
||||
function(data) {
|
||||
callback.apply(this, arguments);
|
||||
}
|
||||
url,
|
||||
function(data) {callback.apply(this, arguments);}
|
||||
);
|
||||
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user