Added the option for automatic alias building, resolve gh-246. Made improvements to the buttons all over JCB, and the tweaked the field view a little more.

This commit is contained in:
2018-03-28 11:46:14 +02:00
parent 0ba2a0e8cf
commit 4e740f568e
57 changed files with 1217 additions and 590 deletions

View File

@ -453,10 +453,10 @@ function addButtonID(type, where, size){
});
}
function addButton_server(type){
function addButton_server(type, size){
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0){
var request = 'token='+token+'&type='+type;
var request = 'token='+token+'&type='+type+'&size='+size;
}
return jQuery.ajax({
type: 'GET',
@ -466,10 +466,16 @@ function addButton_server(type){
jsonp: 'callback'
});
}
function addButton(type,where){
addButton_server(type).done(function(result) {
function addButton(type, where, size){
// just to insure that default behaviour still works
size = typeof size !== 'undefined' ? size : 1;
addButton_server(type, size).done(function(result) {
if(result){
addData(result,'#jform_'+where);
if (2 == size) {
jQuery('#'+where).html(result);
} else {
addData(result, '#jform_'+where);
}
}
})
}