File indexing completed on 2025-05-04 05:29:39

0001 /* 
0002 ASP.NET WEB FORMS PAGE METHODS EXTENSION FOR JTABLE
0003 http://www.jtable.org
0004 ---------------------------------------------------------------------------
0005 Copyright (C) 2011 by Halil Ýbrahim Kalkan (http://www.halilibrahimkalkan.com)
0006 
0007 Permission is hereby granted, free of charge, to any person obtaining a copy
0008 of this software and associated documentation files (the "Software"), to deal
0009 in the Software without restriction, including without limitation the rights
0010 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
0011 copies of the Software, and to permit persons to whom the Software is
0012 furnished to do so, subject to the following conditions:
0013 
0014 The above copyright notice and this permission notice shall be included in
0015 all copies or substantial portions of the Software.
0016 
0017 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0018 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0019 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
0020 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
0021 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
0022 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
0023 THE SOFTWARE.
0024 */
0025 (function(d){d.extend(!0,d.hik.jtable.prototype,{_performAjaxCall:function(b,c,a,e,f){this._ajax({url:b,data:c,async:a,success:e,error:f})},_ajax:function(b){var c=this,a=d.extend({},this.options.ajaxSettings,b);null==a.data||void 0==a.data?a.data={}:"string"==typeof a.data&&(a.data=c._convertQueryStringToObject(a.data));var e=a.url.indexOf("?");-1<e&&d.extend(a.data,c._convertQueryStringToObject(a.url.substring(e+1)));a.data=JSON.stringify(a.data);a.contentType="application/json; charset=utf-8";
0026 a.success=function(a){a=c._normalizeJSONReturnData(a);b.success&&b.success(a)};a.error=function(){b.error&&b.error()};a.complete=function(){b.complete&&b.complete()};d.ajax(a)},_submitFormUsingAjax:function(b,c,a,e){var f=this;c={record:f._convertQueryStringToObject(c)};var g=b.indexOf("?");-1<g&&d.extend(c,f._convertQueryStringToObject(b.substring(g+1)));c=JSON.stringify(c);d.ajax({url:b,type:"POST",dataType:"json",contentType:"application/json; charset=utf-8",data:c,success:function(b){b=f._normalizeJSONReturnData(b);
0027 a(b)},error:function(){e()}})},_convertQueryStringToObject:function(b){for(var c={},a,e=/\+/g,d=/([^&=]+)=?([^&]*)/g;a=d.exec(b);)c[decodeURIComponent(a[1].replace(e," "))]=decodeURIComponent(a[2].replace(e," "));return c},_normalizeJSONReturnData:function(b){return b.hasOwnProperty("d")?b.d:b}})})(jQuery);