Update ajax.lib.php
This commit is contained in:
parent
830ec9c9cb
commit
dd5ea670e2
@ -469,7 +469,6 @@ function ajax_constantonoff($code, $input=array(), $entity=null, $revertonoff=0,
|
|||||||
*/
|
*/
|
||||||
function ajax_object_onoff($object, $code, $input=array())
|
function ajax_object_onoff($object, $code, $input=array())
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
|
||||||
global $conf, $langs, $db;
|
global $conf, $langs, $db;
|
||||||
|
|
||||||
$out= '<script type="text/javascript">
|
$out= '<script type="text/javascript">
|
||||||
@ -478,7 +477,7 @@ function ajax_object_onoff($object, $code, $input=array())
|
|||||||
|
|
||||||
// Set constant
|
// Set constant
|
||||||
$("#set_'.$code.'_'.$object->id.'").click(function() {
|
$("#set_'.$code.'_'.$object->id.'").click(function() {
|
||||||
$.get( "'.DOL_URL_ROOT.'/core/ajax/productonoff.php", {
|
$.get( "'.DOL_URL_ROOT.'/core/ajax/objectonoff.php", {
|
||||||
action: \'set'.$code.'\',
|
action: \'set'.$code.'\',
|
||||||
value: \'1\',
|
value: \'1\',
|
||||||
id: \''.$object->id.'\'
|
id: \''.$object->id.'\'
|
||||||
@ -506,7 +505,7 @@ function ajax_object_onoff($object, $code, $input=array())
|
|||||||
|
|
||||||
// Del constant
|
// Del constant
|
||||||
$("#del_'.$code.'_'.$object->id.'").click(function() {
|
$("#del_'.$code.'_'.$object->id.'").click(function() {
|
||||||
$.get( "'.DOL_URL_ROOT.'/core/ajax/productonoff.php", {
|
$.get( "'.DOL_URL_ROOT.'/core/ajax/objectonoff.php", {
|
||||||
action: \'set'.$code.'\',
|
action: \'set'.$code.'\',
|
||||||
value: \'0\',
|
value: \'0\',
|
||||||
id: \''.$object->id.'\'
|
id: \''.$object->id.'\'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user