Merge branch 'master' into master
This commit is contained in:
@@ -284,11 +284,7 @@ $(function() {
|
||||
}
|
||||
|
||||
function fillFileTable(path, type, folder, filt) {
|
||||
if (window.location.pathname.endsWith("/basicconfig")) {
|
||||
var request_path = "/../basicconfig/pathchooser/";
|
||||
} else {
|
||||
var request_path = "/../../ajax/pathchooser/";
|
||||
}
|
||||
var request_path = "/../../ajax/pathchooser/";
|
||||
$.ajax({
|
||||
dataType: "json",
|
||||
data: {
|
||||
@@ -521,6 +517,7 @@ $(function() {
|
||||
.on("hidden.bs.modal", function() {
|
||||
$(this).find(".modal-body").html("...");
|
||||
$("#config_delete_kobo_token").show();
|
||||
$("#kobo_full_sync").show();
|
||||
});
|
||||
|
||||
$("#config_delete_kobo_token").click(function() {
|
||||
@@ -534,6 +531,7 @@ $(function() {
|
||||
url: getPath() + "/kobo_auth/deleteauthtoken/" + value,
|
||||
});
|
||||
$("#config_delete_kobo_token").hide();
|
||||
$("#kobo_full_sync").hide();
|
||||
}
|
||||
);
|
||||
});
|
||||
@@ -567,6 +565,33 @@ $(function() {
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$("#kobo_full_sync").click(function() {
|
||||
confirmDialog(
|
||||
"btnfullsync",
|
||||
"GeneralDeleteModal",
|
||||
$(this).data('value'),
|
||||
function(value){
|
||||
path = getPath() + "/ajax/fullsync"
|
||||
$.ajax({
|
||||
method:"get",
|
||||
url: path,
|
||||
timeout: 900,
|
||||
success:function(data) {
|
||||
data.forEach(function(item) {
|
||||
if (!jQuery.isEmptyObject(item)) {
|
||||
$( ".navbar" ).after( '<div class="row-fluid text-center" >' +
|
||||
'<div id="flash_'+item.type+'" class="alert alert-'+item.type+'">'+item.message+'</div>' +
|
||||
'</div>');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
$("#user_submit").click(function() {
|
||||
this.closest("form").submit();
|
||||
});
|
||||
|
||||
@@ -631,14 +631,14 @@ function singleUserFormatter(value, row) {
|
||||
}
|
||||
|
||||
function checkboxFormatter(value, row){
|
||||
if(value & this.column)
|
||||
if (value & this.column)
|
||||
return '<input type="checkbox" class="chk" data-pk="' + row.id + '" data-name="' + this.field + '" checked onchange="checkboxChange(this, ' + row.id + ', \'' + this.name + '\', ' + this.column + ')">';
|
||||
else
|
||||
return '<input type="checkbox" class="chk" data-pk="' + row.id + '" data-name="' + this.field + '" onchange="checkboxChange(this, ' + row.id + ', \'' + this.name + '\', ' + this.column + ')">';
|
||||
}
|
||||
|
||||
function singlecheckboxFormatter(value, row){
|
||||
if(value)
|
||||
if (value)
|
||||
return '<input type="checkbox" class="chk" data-pk="' + row.id + '" data-name="' + this.field + '" checked onchange="checkboxChange(this, ' + row.id + ', \'' + this.name + '\', 0)">';
|
||||
else
|
||||
return '<input type="checkbox" class="chk" data-pk="' + row.id + '" data-name="' + this.field + '" onchange="checkboxChange(this, ' + row.id + ', \'' + this.name + '\', 0)">';
|
||||
@@ -793,7 +793,7 @@ function handleListServerResponse (data) {
|
||||
function checkboxChange(checkbox, userId, field, field_index) {
|
||||
$.ajax({
|
||||
method: "post",
|
||||
url: window.location.pathname + "/../../ajax/editlistusers/" + field,
|
||||
url: getPath() + "/ajax/editlistusers/" + field,
|
||||
data: {"pk": userId, "field_index": field_index, "value": checkbox.checked},
|
||||
error: function(data) {
|
||||
handleListServerResponse([{type:"danger", message:data.responseText}])
|
||||
|
||||
Reference in New Issue
Block a user