[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 09/29: Adapt for Textarea
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 09/29: Adapt for Textarea |
Date: |
Wed, 4 Nov 2020 11:08:40 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 2a5581b173838a701cc73a350ff29d43b2c9a813
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Thu Oct 29 18:27:35 2020 +0100
Adapt for Textarea
---
include/lib/inplace_edit.class.php | 41 +++++++++++++++++++++++++++++---------
1 file changed, 32 insertions(+), 9 deletions(-)
diff --git a/include/lib/inplace_edit.class.php
b/include/lib/inplace_edit.class.php
index 0d372de..2a492dd 100644
--- a/include/lib/inplace_edit.class.php
+++ b/include/lib/inplace_edit.class.php
@@ -75,6 +75,9 @@ class Inplace_Edit
function ajax_input() {
ob_start();
echo $this->input->input();
+ if ($this->input instanceof ITextarea) {
+ echo '<br>';
+ }
echo '<a style="display:inline" class="smallbutton"
id="inplace_edit_ok'.$this->input->id.'">'._('ok').'</a>';
echo '<a style="display:inline" class="smallbutton"
id="inplace_edit_cancel'.$this->input->id.'">'._('cancel').'</a>';
echo <<<EOF
@@ -108,11 +111,21 @@ EOF;
function value()
{
$v=$this->input->get_value();
- $v=(trim($v)=="")?$this->message:$v;
- echo $v,
- '<span class="smallicon icon"
style="margin-left:5px"></span> ',
- "
- <script>
+ if ( $this->input instanceof ITextarea) {
+ echo '<span class="input_text" id="'.$this->input->id.'edit" >';
+ echo '<pre class="field_follow_up">';
+ $v=(trim($v)=="")?$this->message:$v;
+ echo $v;
+ echo '</pre>';
+ echo'<span class="smallbutton" style="margin-left:5px">Cliquer
pour changer</span> ';
+ } else {
+ $v=(trim($v)=="")?$this->message:$v;
+ echo $v,
+ '<span class="smallicon icon"
style="margin-left:5px"></span> ';
+ }
+
+ echo "
+ <script>
$('{$this->input->id}edit').removeClassName('inplace_edit_input');
{$this->input->id}edit.onclick=function() {
new Ajax.Updater('{$this->input->id}edit'
@@ -126,13 +139,23 @@ EOF;
*/
function input() {
ob_start();
+ $v=$this->input->get_value();
+ if ( $this->input instanceof ITextarea) {
+ echo '<span class="" id="'.$this->input->id.'edit" >';
+ echo '<pre class="field_follow_up">';
+ $v=(trim($v)=="")?$this->message:$v;
+ echo $v;
+ echo '</pre>';
+ echo'<span class="smallbutton" style="margin-left:5px">Cliquer
pour changer</span> ';
+ } else {
+ $v=(trim($v)=="")?$this->message:$v;
echo <<<EOF
<span class="inplace_edit" id="{$this->input->id}edit" >
EOF;
- $v=$this->input->get_value();
- $v=(trim($v)=="")?$this->message:$v;
- echo $v;
- echo'<span class="smallicon icon"
style="margin-left:5px"></span> ';
+ echo $v;
+
+ echo'<span class="smallicon icon"
style="margin-left:5px"></span> ';
+ }
echo "</span>";
echo "
- [Noalyss-commit] [noalyss] 16/29: Security Can_Request log the security for Ajax, (continued)
- [Noalyss-commit] [noalyss] 16/29: Security Can_Request log the security for Ajax, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 05/29: Balise : nouveau STATUS , etat du document, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 11/29: Style : improve h2, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 22/29: Cosmetic, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 25/29: cosmetic : waiting box, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 19/29: Predefined Operation filter by ledger, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 21/29: cosmetic , remove myfiedset class, unclosed tag , the title comment is not show if there is no comment, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 20/29: Cosmetic Admin List Folders : add close button, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 02/29: Sort by earliest one, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 07/29: 0001827: Delta des opérations liées basé sur le montant d'une seule opération, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 09/29: Adapt for Textarea,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 04/29: Followup : change moyenne par normale, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 08/29: FollowUp commentaire unique et modifiable, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 18/29: Follow UP detail do not show the "Add Rows button" in READ mode, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 23/29: Cosmetic : ledger name, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 24/29: Contact : navigation bar was not correct, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 29/29: Merge branch 'checkbox-range', Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 28/29: Task #0001861: Plage de cases à cocher, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 12/29: Suivi : description modifiable, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 15/29: Document_State : rewriting, Dany De Bontridder, 2020/11/04
- [Noalyss-commit] [noalyss] 17/29: Security For document_state and tag_group, Dany De Bontridder, 2020/11/04