952 days continuous production uptime, 40k+ tp/s single node. Original corpo Bitbucket history not included — clean archive commit.
71 lines
1.6 KiB
JavaScript
71 lines
1.6 KiB
JavaScript
/**
|
|
* gaAdmin.js
|
|
*
|
|
* This is the javascript file for the Namaste admin web-program: gaAdmin.php.
|
|
*
|
|
*
|
|
* @author mike@givingassistant.org
|
|
* @version 1.0
|
|
*
|
|
*
|
|
* HISTORY:
|
|
* ========
|
|
* 08-06-18 CORE-1113: original coding
|
|
*
|
|
*/
|
|
|
|
|
|
/**
|
|
*
|
|
* This stub handles the click event when a user clicks on the side-nav bar (Edit Constants) and selects the option
|
|
* to edit either the STATE or STATUS constants. The stub evaluates which link was clicked and passes the result back
|
|
* to the server via AJAX which, in turn, should spawn the events to fetch the systemData record and display the
|
|
* appropriate data field on-screen.
|
|
*
|
|
*
|
|
* @author mike@givingassistant.org
|
|
* @version 1.0
|
|
*
|
|
* HISTORY:
|
|
* ========
|
|
* 08-06-18 mks CORE-1113: original coding
|
|
*
|
|
*/
|
|
$('.getSysD').on('click', function () {
|
|
var id = this.id;
|
|
var which = 0;
|
|
|
|
// console.log('id: ' + id);
|
|
switch (id) {
|
|
case 'stateConstants' :
|
|
which = 'c=1';
|
|
break;
|
|
case 'statusConstants' :
|
|
which = 'c=2';
|
|
break;
|
|
}
|
|
|
|
// console.log('which: ' + which);
|
|
event.preventDefault();
|
|
event.stopImmediatePropagation();
|
|
$.ajax({
|
|
type : "POST",
|
|
data : which,
|
|
success: function ( response ) {
|
|
$('body').html(response);
|
|
console.log(response);
|
|
}
|
|
});
|
|
return false;
|
|
});
|
|
|
|
// $( "#gaConstants" ).submit(function() {
|
|
// alert( "Handler for .submit() called." );
|
|
// // event.preventDefault();
|
|
// $.ajax({
|
|
// type : "POST",
|
|
// data : 'stateConstants=1',
|
|
// success: function () {
|
|
// }
|
|
// })
|
|
// });
|