fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [12508]


From: Nelson Guerra
Subject: [Fmsystem-commits] [12508]
Date: Fri, 26 Dec 2014 23:12:01 +0000

Revision: 12508
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12508
Author:   nelson224
Date:     2014-12-26 23:12:01 +0000 (Fri, 26 Dec 2014)
Log Message:
-----------


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        2014-12-26 
23:11:27 UTC (rev 12507)
+++ branches/dev-syncromind/phpgwapi/js/jquery/common.js        2014-12-26 
23:12:01 UTC (rev 12508)
@@ -226,6 +226,63 @@
        api.ajax.url( requestUrl ).load();
 };
 
+JqueryPortico.fnGetSelected = function(oTable)
+{
+       var aReturn = new Array();
+       var aTrs = oTable.fnGetNodes();
+       for ( var i=0 ; i < aTrs.length ; i++ )
+       {
+               if ( $(aTrs[i]).hasClass('selected') )
+               {
+                       aReturn.push( i );
+               }
+       }
+       return aReturn;
+};
+
+JqueryPortico.execute_ajax = function(requestUrl, callback, data,type, 
dataType)
+{                                       
+       type = typeof type !== 'undefined' ? type : 'POST';
+       dataType = typeof dataType !== 'undefined' ? dataType : 'html';
+       data = typeof data !== 'undefined' ? data : {};
+
+       $.ajax({
+               type: type,
+               dataType: dataType,
+               data: data,
+               url: requestUrl,
+               success: function(result) 
+               {
+                       callback(result);
+               }
+       });
+};
+
+JqueryPortico.substr_count = function(haystack, needle, offset, length)
+{
+       var pos = 0, cnt = 0;
+
+       haystack += '';
+       needle += '';
+       if(isNaN(offset)) offset = 0;
+       if(isNaN(length)) length = 0;
+       offset--;
+
+       while( (offset = haystack.indexOf(needle, offset+1)) != -1 )
+       {
+               if(length > 0 && (offset+needle.length) > length)
+               {
+                       return false;
+               } 
+               else
+               {
+                       cnt++;
+               }
+       }
+       return cnt;
+};
+               
+               
 JqueryPortico.autocompleteHelper = function(baseUrl, field, hidden, container, 
label_attr) {
        $(document).ready(function () 
        {




reply via email to

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