FIX 'Add new' page button missing ParentID

Slight typo causing this. Also slightly amended how extra URL
parameters are tagged on to prevent &undefined being appended to URL
This commit is contained in:
Loz Calver 2013-05-14 15:38:07 +01:00
parent 89bf063880
commit f51448ced4

View File

@ -99,8 +99,9 @@
}
var data = {selector: this.data('targetPanel'),pjax: this.data('pjax')}, url;
if(parentID) {
url = $.path.addSearchParams(ss.i18n.sprintf(this.data('urlAddpage'), parentId), this.data('extraParams'));
if(parentId) {
extraParams = this.data('extraParams') ? this.data('extraParams') : '';
url = $.path.addSearchParams(ss.i18n.sprintf(this.data('urlAddpage'), parentId), extraParams);
} else {
url = this.attr('href');
}