fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [12553] fix autocomplete and allow local drawcallback


From: Sigurd Nes
Subject: [Fmsystem-commits] [12553] fix autocomplete and allow local drawcallback per inline table
Date: Wed, 07 Jan 2015 15:16:04 +0000

Revision: 12553
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12553
Author:   sigurdne
Date:     2015-01-07 15:16:03 +0000 (Wed, 07 Jan 2015)
Log Message:
-----------
fix autocomplete and allow local drawcallback per inline table

Modified Paths:
--------------
    branches/dev-syncromind/phpgwapi/js/jquery/common.js

Modified: branches/dev-syncromind/phpgwapi/js/jquery/common.js
===================================================================
--- branches/dev-syncromind/phpgwapi/js/jquery/common.js        2015-01-07 
15:06:53 UTC (rev 12552)
+++ branches/dev-syncromind/phpgwapi/js/jquery/common.js        2015-01-07 
15:16:03 UTC (rev 12553)
@@ -169,6 +169,8 @@
        }
 //     $(document).ready(function ()
 //     {
+               JqueryPortico.inlineTablesRendered += 1;
+
                var oTable = $("#" + container).dataTable({
                        paginate:               disablePagination ? false : 
true,
                        filter:                 disableFilter ? false : true,
@@ -181,7 +183,6 @@
                        ajax:                   ajax_def,
                        fnInitComplete: function (oSettings, json)
                        {
-                               JqueryPortico.inlineTablesRendered += 1;
                                if(JqueryPortico.inlineTablesRendered == 
JqueryPortico.inlineTablesDefined)
                                {
                                        if(typeof(JqueryPortico.render_tabs) == 
'function')
@@ -206,10 +207,14 @@
                //      stateDuration: -1, //sessionstorage
                //      tabIndex:               1,
                        fnDrawCallback: function () {
-                               if(typeof(local_DrawCallback) == 'function')
-                               {
-                                       DrawCallback(oTable);
-                               }
+                                       try
+                                       {
+                                               window['local_DrawCallback' + 
JqueryPortico.inlineTablesRendered](oTable);
+                                       }
+                                       catch(err)
+                                       {
+                                               //nothing
+                                       }
                        },
                        sDom: sDom_def,
                        oTableTools: TableTools_def
@@ -313,8 +318,9 @@
                        },
                        minLength: 1,
                        select: function( event, ui ) {
-                               $("#" + hidden).val(ui.item.value); 
-                               chooseLocation( ui.item.label, ui.item.value);
+                               $("#" + hidden).val(ui.item.value);
+                               // have to wait to set the value
+                               setTimeout(function() { $("#" + 
field).val(ui.item.label); }, 1);
                        }
         });
        });




reply via email to

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