Archive: Namaste PHP AMQP framework v1.0 (2017-2020)
952 days continuous production uptime, 40k+ tp/s single node. Original corpo Bitbucket history not included — clean archive commit.
This commit is contained in:
71
utilities/admin/gaAdmin.js
Normal file
71
utilities/admin/gaAdmin.js
Normal file
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* 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 () {
|
||||
// }
|
||||
// })
|
||||
// });
|
||||
Reference in New Issue
Block a user