},
error: function(request, textStatus, errorThrown) {
$.log('ajax', url, this.target, 'error:', textStatus, errorThrown);
+ $(self.contentDiv).html("<p>Wystapił błąd podczas wczytywania panelu.");
}
});
}
var self = this;
$.log('Saving to local branch - panel:', changed_panel);
- if(!msg) msg = "Zapis z edytora platformy.";
+ if(!msg) msg = "Zapis z edytora platformy.";
if( changed_panel.length == 0) {
$.log('Nothing to save.');
}
saveInfo = changed_panel.data('ctrl').saveInfo();
- $.extend(saveInfo.postData, {'commit_message': msg});
+ var postData = ''
+ if(saveInfo.postData instanceof Object)
+ postData = $.param(saveInfo.postData);
+ else
+ postData = saveInfo.postData;
+
+ postData += '&' + $.param({'commit_message': msg})
$.ajax({
url: saveInfo.url,
self.showPopup('save-error');
},
type: 'POST',
- data: saveInfo.postData
+ data: postData
});
return true;