From: Joey Schulze Date: Mon, 17 Jul 2017 22:18:07 +0000 (+0200) Subject: Allow to edit account description in place X-Git-Url: https://git.infodrom.org/?p=infodrom.org%2Fservice.infodrom.org;a=commitdiff_plain;h=cfe1043827af50bf753a33fccc40294650b68be8 Allow to edit account description in place --- diff --git a/class/accounting.class.php b/class/accounting.class.php index b127b78..d506fee 100644 --- a/class/accounting.class.php +++ b/class/accounting.class.php @@ -8,6 +8,10 @@ class Accounting extends AccountTable { parent::__construct('account', $id); } -} + public function ajaxEditDescr(Array $data) + { + if (!strlen($data['content'])) return false; + return $this->modify('descr', $data['content']); + } -?> +} diff --git a/src/InfoCon/account/list.wml b/src/InfoCon/account/list.wml index adf4c54..292cbca 100644 --- a/src/InfoCon/account/list.wml +++ b/src/InfoCon/account/list.wml @@ -70,8 +70,12 @@ function filter_account() $out .= sprintf ("", $color); $out .= sprintf ("%s", $date); $out .= sprintf ("%s", $row['category']); - $out .= sprintf ("%s", - $row['id'], $add, $descr[0]); + if (strpos($_SERVER['HTTP_USER_AGENT'], 'Mozilla/') === false) + $out .= sprintf ("%s", + $row['id'], $add, $descr[0]); + else + $out .= sprintf ("%s", + $row['id'], $add, $descr[0]); $out .= sprintf ("%5.2f", $row[$value]>0?"in":"out", $row[$value]); $sum += $row[$value]; @@ -156,6 +160,7 @@ $(function(){ }); $('body').append('