function SystemCore() { } SystemCore.language = "ro"; SystemCore.BASE_URL = "http://www.artool.ro/"; SystemCore.LIB_URL = "http://www.artool.ro/eob-libs/"; SystemCore.FILES_URL = "http://www.artool.ro/files_/"; SystemCore.MODULES_PATH = SystemCore.LIB_URL + "com/sds/eob/Modules/"; SystemCore.MODULES_GATEWAY = SystemCore.BASE_URL + "moduleGateway.php"; SystemCore.ADAPTERS_GATEWAY = SystemCore.BASE_URL + "adaptersGateway.php"; SystemCore.JS_LIB = SystemCore.BASE_URL + ""; SystemCore.USER_ID = ""; SystemCore.KEEP_ALIVE_TIME = 10000; SystemCore.TITAN_GATEWAY = "http://www.artool.ro/galileo/Application ERP2/jqueryGateway.php"; function isEmptyObject(obj) { for(var prop in obj) { if (Object.prototype.hasOwnProperty.call(obj, prop)) { return false; } } return true; } function objectLength(obj) { var nr=0; for(var prop in obj) { if (Object.prototype.hasOwnProperty.call(obj, prop)) { nr++; } } return nr; } function fillFormWithArray(form, data) { $.each(data, function(key, value){ for (var i=0;i'; this.tpl; this.activePage = 0; this.tpl = $.template(this.templateName,this.tplWrapper); this.setTotal = function(total,perPage) { this.total = total; this.perPage = perPage ? perPage : 30; this.totalPages = Math.ceil(this.total / this.perPage); } this.clearTemplate = function() { $(this.container).empty(); } this.render = function(activePage) { // tplPaginationPlaceHolder if (!this.tpl) { this.tpl = $.template(this.templateName,this.tplRow); } var pages = []; this.activePage = activePage>=0 ? activePage : 0; var obj = {}; for(var i=0; i'); $(this.container).append(''); //console.log($(this.container)); } this.registerField = function(name,servicePath,params,encodeToJSON) { var paramsStr = params.join(","); var fieldStr = ''; fieldStr += ''; fieldStr += ''; fieldStr += ''; $(this.container).append(fieldStr); } this.setParams = function(fieldName,params) { var paramsStr = params.join(","); $(this.container + " [name="+fieldName+"Params]").val(paramsStr); } } /* function inherit(Child,Parent){ Child.prototype = new Parent(); Child.prototype.constructor = Parent; if (!Parent.__proto__) { Parent.prototype.__proto__ = (new Function()).constructor; } if (!Child.__proto__) { Child.prototype.__proto__ = Parent.prototype; } Child.superClass = Parent.prototype; } */ function inherit(subClass, baseClass) { function inheritance() {} inheritance.prototype = baseClass.prototype; subClass.prototype = new inheritance(); subClass.prototype.constructor = subClass; subClass.baseConstructor = baseClass; subClass.superClass = baseClass.prototype; }