[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 64/119: InPlace_Switch : do not echo , return
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 64/119: InPlace_Switch : do not echo , return a string instead |
Date: |
Mon, 26 Oct 2020 18:27:22 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit b6607f89d7f91c8704e631f6fc95bf7b5b814b99
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Thu Oct 8 20:07:59 2020 +0200
InPlace_Switch : do not echo , return a string instead
---
include/lib/inplace_switch.class.php | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/include/lib/inplace_switch.class.php
b/include/lib/inplace_switch.class.php
index 77d3953..914ca0f 100644
--- a/include/lib/inplace_switch.class.php
+++ b/include/lib/inplace_switch.class.php
@@ -70,16 +70,17 @@ class Inplace_Switch
throw new Exception(_("Invalide value"));
}
- printf('<span style="text-decoration: none;color:%s"
class="inplace_edit icon" id="%s">', $color,$this->name);
- echo $icon;
- echo '</span>';
- echo <<<EOF
+ $r=sprintf('<span style="text-decoration: none;color:%s"
class="inplace_edit icon" id="%s">', $color,$this->name);
+ $r.=$icon;
+ $r.= '</span>';
+ $r.=<<<EOF
<script>
{$this->name}.onclick=function() {new
Ajax.Updater({$this->name},'{$this->callback}',{method:"get",parameters:{$this->json},evalScripts:true}
);
{$this->jscript}
}
</script>
EOF;
+ return $r;
}
public function get_jscript()
{
- [Noalyss-commit] [noalyss] 44/119: Fix: predefined operation with overflow for details, (continued)
- [Noalyss-commit] [noalyss] 44/119: Fix: predefined operation with overflow for details, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 49/119: tag - cosmetic, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 47/119: Tag and Group Tag, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 53/119: NEW Security : add tag, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 56/119: Cosmetic for cells for tag and contact, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 55/119: not used anymore javascript:void(0), Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 58/119: Missing file, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 62/119: FOLLOWUP : generate doc. add new tag, DOCUMENT_ID, TITLE, DESCRIPTION, LABELOP, COMMENT, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 72/119: Tag Limit column size , replace input_switch by check_box, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 61/119: Search Card Paginate, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 64/119: InPlace_Switch : do not echo , return a string instead,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 68/119: Add new type of attribute : check, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 81/119: Search card :typo, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 90/119: select_box cosmetic font, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 92/119: Follow-Up create doc new Tags COMMENTS, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 93/119: Follow-up new column "Status", Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 98/119: Follow up add followup action, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 103/119: Improve : Quick filter on history, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 84/119: Merge extension-crm, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 96/119: Cosmetic, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 100/119: Notice, Dany De Bontridder, 2020/10/26