mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-15 04:27:14 +01:00
51 lines
1.6 KiB
JavaScript
51 lines
1.6 KiB
JavaScript
var Trigger = function ($) {
|
|
"use strict";
|
|
|
|
var me = {
|
|
init: function(){
|
|
$('#trigger_list').on('afterreload', function(){
|
|
$('#trigger_list input.alias').on('change',function(){
|
|
$.ajax({
|
|
url: 'index.php?module=trigger&action=list&cmd=changealias',
|
|
type: 'POST',
|
|
dataType: 'json',
|
|
data: {
|
|
id:$(this).data('id'),
|
|
value:$(this).val()
|
|
},
|
|
success: function(data){
|
|
if(data.status == 0) {
|
|
alert(data.error);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
$('#trigger_list input.description').on('change',function(){
|
|
$.ajax({
|
|
url: 'index.php?module=trigger&action=list&cmd=changedescription',
|
|
type: 'POST',
|
|
dataType: 'json',
|
|
data: {
|
|
id:$(this).data('id'),
|
|
value:$(this).val()
|
|
},
|
|
success: function(data){
|
|
if(data.status == 0) {
|
|
alert(data.error);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
}
|
|
};
|
|
|
|
return {
|
|
init: me.init
|
|
};
|
|
|
|
}(jQuery);
|
|
|
|
$(document).ready(function () {
|
|
Trigger.init();
|
|
}); |