Removed required from all code/editor field to improve the behavior of the codemirror editor. Improved the token validation via Ajax.

This commit is contained in:
2019-07-08 18:05:54 +02:00
parent 3497104f41
commit 2af4b8cf50
66 changed files with 870 additions and 2393 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -386,16 +386,16 @@ function bulkSnippetGithub(status) {
function doBulkUpdate_server(path, status) {
// set the ajax scope
ajaxcall = null;
var getUrl = "index.php?option=com_componentbuilder&task=ajax.setSnippetGithub&format=json";
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.setSnippetGithub&format=json&raw=true");
if (token.length > 0 && path.length > 0 && status.length > 0) {
var request = 'token='+token+'&path='+path+'&status='+status;
var request = token+'=1&path='+path+'&status='+status;
}
return jQuery.ajax({
type: 'POST',
url: getUrl,
dataType: 'jsonp',
dataType: 'json',
data: request,
jsonp: 'callback'
jsonp: false
});
}
@ -423,16 +423,16 @@ function setSnippetGithub(key, status) {
function setSnippetGithub_server(path, status) {
// set the ajax scope
ajaxcall = null;
var getUrl = "index.php?option=com_componentbuilder&task=ajax.setSnippetGithub&format=json";
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.setSnippetGithub&format=json&raw=true");
if (token.length > 0 && path.length > 0 && status.length > 0) {
var request = 'token='+token+'&path='+path+'&status='+status;
var request = token+'=1&path='+path+'&status='+status;
}
return jQuery.ajax({
type: 'POST',
url: getUrl,
dataType: 'jsonp',
dataType: 'json',
data: request,
jsonp: 'callback'
jsonp: false
});
}