noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 61/219: Inplace_Edit : improve button + test


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 61/219: Inplace_Edit : improve button + test
Date: Mon, 18 Dec 2017 13:22:38 -0500 (EST)

sparkyx pushed a commit to branch master
in repository noalyss.

commit d3a8fc07240b515f2258230fa7f389c7f37ec8e9
Author: Dany De Bontridder <address@hidden>
Date:   Tue Sep 26 22:56:59 2017 +0200

    Inplace_Edit : improve button + test
---
 include/lib/inplace_edit.class.php | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/include/lib/inplace_edit.class.php 
b/include/lib/inplace_edit.class.php
index 855773e..3de0fac 100644
--- a/include/lib/inplace_edit.class.php
+++ b/include/lib/inplace_edit.class.php
@@ -71,9 +71,10 @@ class Inplace_Edit
      * @brief response in ajax to be edited
      */
      function ajax_input() {
+         ob_start();
         echo $this->input->input();
-        echo '<a class="smallbutton"  
id="inplace_edit_ok'.$this->input->id.'">'._('ok').'</a>';
-        echo '<a class="smallbutton" 
id="inplace_edit_cancel'.$this->input->id.'">'._('cancel').'</a>';
+        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
         <script>
             {$this->input->id}edit.onclick=null;
@@ -93,12 +94,16 @@ class Inplace_Edit
             
         </script>
 EOF;
+                $ret= ob_get_contents();
+                ob_end_clean();
+                return $ret;
     }
     
     /***
      * @brief display the value with the click event
      */
     function input() {
+        ob_start();
         echo <<<EOF
             <span class="inplace_edit" id="{$this->input->id}edit" >
 EOF;
@@ -111,7 +116,10 @@ EOF;
                 ,'{$this->callback}',
                  {parameters:  {$this->json} ,evalScripts:true});}
             </script>
-              ";      
+              ";   
+         $ret= ob_get_contents();
+         ob_end_clean();
+         return $ret;
     }
     /**
      * @brief the php callback file to call for ajax



reply via email to

[Prev in Thread] Current Thread [Next in Thread]