From: Kilian Saffran Date: Fri, 16 Aug 2019 05:30:27 +0000 (+0200) Subject: console log comments X-Git-Url: http://cloud.dks.lu/git/?a=commitdiff_plain;h=b8a798984fd86a602479918c4acbc8872e101700;p=juridig_lu.git console log comments --- diff --git a/backoffice/api/lib/dksapp.pm b/backoffice/api/lib/dksapp.pm index 6d94cb3..8c5215b 100644 --- a/backoffice/api/lib/dksapp.pm +++ b/backoffice/api/lib/dksapp.pm @@ -52,6 +52,12 @@ sub activate_app(){ } } } + if ($idapp eq "7"){ #billjee + my $sql = "update appaccess set privateenabled = true where id_user=".$iduser." and id_app=7;"; + if ($apacc == undef){ + $self->{db}->dbexec($sql); + } + } return $res; } diff --git a/backoffice/api/lib/dksinvoice.pm b/backoffice/api/lib/dksinvoice.pm index 123a334..d025780 100644 --- a/backoffice/api/lib/dksinvoice.pm +++ b/backoffice/api/lib/dksinvoice.pm @@ -117,10 +117,10 @@ sub newinvoice(){ } my @insql = $self->{db}->create_ddl_insert($inv); - open(LOG,">>tmp/sql.log"); - print LOG $insql[0]."\n"; - print LOG (); - close(LOG); + # open(LOG,">>tmp/sql.log"); + # print LOG $insql[0]."\n"; + # print LOG (); + # close(LOG); $insql[0] = encode("utf-8",$insql[0]); my $newinvid = $self->{db}->dbquery($insql[0]); $prd->{invoiceelements_id_invoice} = $newinvid->{id}; diff --git a/backoffice/api/process.cgi b/backoffice/api/process.cgi index 36c2e8c..328fd1a 100644 --- a/backoffice/api/process.cgi +++ b/backoffice/api/process.cgi @@ -57,17 +57,17 @@ if (($cgi->request_method() eq "GET") || ($cgi->request_method() eq "POST")){ } else { $sql = "insert into modulepreferences (id_user,page,preference) VALUES (".$sess->{id}.",'".$p->{page}."','".$p->{data}."');"; } - open(LOG,">>tmp/sql.log"); - print LOG $sql."\n"; - close(LOG); + # open(LOG,">>tmp/sql.log"); + # print LOG $sql."\n"; + # close(LOG); $db->dbexec($sql); $html->{result} = "Preference saved"; } elsif ($p->{fn} eq "getpref"){ my $sql = "select preference from modulepreferences where page='".$p->{page}."' AND id_user=".$sess->{id}.";"; - open(LOG,">>tmp/sql.log"); - print LOG $sql."\n"; - close(LOG); + # open(LOG,">>tmp/sql.log"); + # print LOG $sql."\n"; + # close(LOG); my $pref = $db->dbquerysorted($sql); if (defined($pref) && exists($pref->{0}->{preference})){ $html->{result} = $pref->{0}; diff --git a/backoffice/js/backoffice.js b/backoffice/js/backoffice.js index 158023d..04c7216 100644 --- a/backoffice/js/backoffice.js +++ b/backoffice/js/backoffice.js @@ -9,7 +9,7 @@ var backoffice = { $("#modulename").html(title); }, setPreference(page,data){ - console.log("set preference!" + page); + //console.log("set preference!" + page); var sdata = data; if (typeof(data) == "object"){ sdata = JSON.stringify(data); diff --git a/backoffice/js/fieldsave.js b/backoffice/js/fieldsave.js index 679d7d9..65b1992 100644 --- a/backoffice/js/fieldsave.js +++ b/backoffice/js/fieldsave.js @@ -10,8 +10,8 @@ function savefield(objid){ //console.log("is a select field"); //console.log($("#" + objid).selectpicker()); // if ($("#" + objid)[0].dataset.select2Id){ - // // console.log("is a select2 field!\n"); - // console.log($("#" +objid).attr('name') + "-> " + $("#" +objid).val() ); + // //console.log("is a select2 field!\n"); + //console.log($("#" +objid).attr('name') + "-> " + $("#" +objid).val() ); // field[$("#" +objid).attr('name')] = $("#" +objid).val(); // } // else { @@ -20,7 +20,7 @@ function savefield(objid){ // } // }if ($("#" + objid)[0].select2Id){ - // console.log("is a select2 field!\n"); + //console.log("is a select2 field!\n"); // } else { // field[$("#" +objid).attr('name')] = $("#" + objid + ":selected").val(); // } diff --git a/backoffice/js/module_global.js b/backoffice/js/module_global.js index fd8425e..53062bd 100644 --- a/backoffice/js/module_global.js +++ b/backoffice/js/module_global.js @@ -7,7 +7,7 @@ document.addEventListener("DOMContentLoaded", function() { function table_setbounds(tblmodule){ // var cols = $("#tbl_"+tblmodule+" > tbody > tr:first-child").children(); // var colnum = cols.length -1; - // console.log("childnum:" + colnum); + //console.log("childnum:" + colnum); // for (var i=1;i<=colnum;i++){ // wx = $("#tbl_"+tblmodule+" > tbody > tr:first-child > td:nth-child("+ i +")").width(); // // wx = wx +3; @@ -30,7 +30,7 @@ function sectionload(sectionid,callback){ function emptyform(id){ // $("#" + id + "> input,select,textarea").each( // function(){ - // console.log("Set Empty Value On" + $(this).id); + //console.log("Set Empty Value On" + $(this).id); // } // ); diff --git a/backoffice/js/request.js b/backoffice/js/request.js index ca99b5c..8dd6e55 100644 --- a/backoffice/js/request.js +++ b/backoffice/js/request.js @@ -40,14 +40,14 @@ var req = { if (method.toUpperCase() == 'GET'){ sendurl = sendurl + '?' + rdata; } - console.log("sending URL: " + method + " => " +sendurl); + //console.log("sending URL: " + method + " => " +sendurl); request.open(method.toUpperCase(), sendurl, false); request.onload = function(){ if (request.status >= 200 && request.status <= 400){ //console.log("Status returned: " + request.status + "resp:" + request.getResponseHeader("Content-Type")); if (request.getResponseHeader("Content-Type").indexOf('application/json') == 0){ var xparse = JSON.parse(request.responseText); - console.log(xparse); + //console.log(xparse); ret = xparse.result; }else if (request.getResponseHeader("Content-Type").indexOf('application/vnd.ms-excel') == 0){ var filename = ""; diff --git a/backoffice/tmpl/block/calendar.tt b/backoffice/tmpl/block/calendar.tt index 0716f5b..e52e8b8 100644 --- a/backoffice/tmpl/block/calendar.tt +++ b/backoffice/tmpl/block/calendar.tt @@ -95,8 +95,8 @@ function loadcalendars(){ } document.getElementById("day" + w + d).innerHTML = ''; var nday = cdate.getDate() + 1; - // console.log(cdate); - // console.log(nday); + //console.log(cdate); + //console.log(nday); cdate.setDate(nday); } document.getElementById("week" + w).innerHTML = ''; diff --git a/backoffice/tmpl/module/annuaire/index.js b/backoffice/tmpl/module/annuaire/index.js index feb161f..a55c5eb 100644 --- a/backoffice/tmpl/module/annuaire/index.js +++ b/backoffice/tmpl/module/annuaire/index.js @@ -17,8 +17,8 @@ tinymce.init({ image_advtab: true, init_instance_callback: function (editor) { editor.on('blur', function (e) { - // console.log('Editor was blurred!'); - // console.log(e.target.id); + //console.log('Editor was blurred!'); + //console.log(e.target.id); $("#" + e.target.id).html(editor.getContent()); //console.log(editor.getContent()); if (savefield){ @@ -30,16 +30,16 @@ tinymce.init({ } $('select').on('hidden.bs.select', function (event) { - // console.log(event); - // console.log(savefield); - // console.log("ID:" + event.currentTarget.id); + //console.log(event); + //console.log(savefield); + //console.log("ID:" + event.currentTarget.id); savefield(event.currentTarget.id); }); $("input,textarea").on('blur',function(event){ - // console.log(event); + //console.log(event); //console.log(event.currentTarget.tagName); //console.log(event.currentTarget.type); if (event.currentTarget.type != "file"){ @@ -50,13 +50,13 @@ $("input,textarea").on('blur',function(event){ function CropImageDlg(objid){ - // console.log("Crop Object ID:"+ objid); + //console.log("Crop Object ID:"+ objid); var obj = document.getElementById("files_" + objid); - // console.log(obj.files); + //console.log(obj.files); var file = obj.files[0]; - // console.log(file); + //console.log(file); var fileName = file.name; - // console.log(file.type); + //console.log(file.type); $('.label-files_'+ objid).html(file.name); if (!file.type.match('image.*')) { //console.log("is not an image"); @@ -109,7 +109,7 @@ function removephoto(objid,defaultimg){ } function LoadCropper(objid){ - // console.log("Preview load cropper!" + objid); + //console.log("Preview load cropper!" + objid); var objf = document.getElementById('files_' + objid); $('#cropdata_field_id').val(objid); diff --git a/backoffice/tmpl/module/applications/index.js b/backoffice/tmpl/module/applications/index.js index c7fed94..c6fe8cb 100644 --- a/backoffice/tmpl/module/applications/index.js +++ b/backoffice/tmpl/module/applications/index.js @@ -70,7 +70,7 @@ var iduser=[% session.id %]; function validate_voucher(){ - console.log("get voucher info!"); + //console.log("get voucher info!"); req.reqdata("POST",'process.cgi',{fn:"checkvoucher","voucher":$("#coupon").val()},voucher_callback); return false; } @@ -165,7 +165,7 @@ var iduser=[% session.id %]; // Finalize the transaction onApprove: function(data, actions) { return actions.order.capture().then(function(details) { - console.log(details); + //console.log(details); var pdata ={ "paypal": details, "appinfo": {},"fn":"paypal_payement"}; $("input[type='hidden']").each(function(){ pdata["appinfo"][$(this).attr("id")] = $(this).val(); diff --git a/backoffice/tmpl/module/billjee/form_billet.js b/backoffice/tmpl/module/billjee/form_billet.js index 685464a..1e283ae 100644 --- a/backoffice/tmpl/module/billjee/form_billet.js +++ b/backoffice/tmpl/module/billjee/form_billet.js @@ -9,11 +9,11 @@ function initpage(){ //console.log("vet:" + document.getElementById("eventtype").value); var optcourts = []; for (var i in court){ - console.log(i); + //console.log(i); var opt = { value: i, label: i }; optcourts.push(opt); } - console.log(optcourts); + //console.log(optcourts); selcourt = new Choices('#court',{ searchEnabled: false, itemSelectText: 'Sélectionner...', @@ -66,7 +66,7 @@ function initpage(){ language: 'fr_FR', init_instance_callback: function (editor) { editor.on('blur', function (e) { - // console.log('Editor was blurred!'); + //console.log('Editor was blurred!'); //console.log(e.target.id); document.getElementById(e.target.id).innerHTML = editor.getContent(); // $("#" + e.target.id).html(editor.getContent()); @@ -162,7 +162,7 @@ function cleanmsg(){ function setrooms(){ var tr = document.getElementById("court").value; var ro = document.getElementById("room").value; - console.log(ro); + //console.log(ro); var optrooms = []; //console.log(court[tr]); var sel = null; @@ -175,7 +175,7 @@ function setrooms(){ //console.log(optrooms); selroom.setChoices(optrooms,'value','label',true); if (!sel){ - console.log("clean selection"); + //console.log("clean selection"); selroom.setChoiceByValue(optrooms[0].value); //document.getElementById("room").value = ''; } diff --git a/backoffice/tmpl/module/billjee/form_settings.js b/backoffice/tmpl/module/billjee/form_settings.js index 98fe35e..77e4b89 100644 --- a/backoffice/tmpl/module/billjee/form_settings.js +++ b/backoffice/tmpl/module/billjee/form_settings.js @@ -22,8 +22,8 @@ function initpage(){ language: 'fr_FR', init_instance_callback: function (editor) { editor.on('blur', function (e) { - // console.log('Editor was blurred!'); - console.log(e.target.id); + //console.log('Editor was blurred!'); + //console.log(e.target.id); document.getElementById(e.target.id).innerHTML = editor.getContent(); // $("#" + e.target.id).html(editor.getContent()); //console.log(editor.getContent()); @@ -56,7 +56,7 @@ function save_settings(){ } req.reqdata("POST","process.cgi",tdata,saved_result); - console.log(JSON.stringify(tdata)); + //console.log(JSON.stringify(tdata)); return false; } diff --git a/backoffice/tmpl/module/dashboard/index.js b/backoffice/tmpl/module/dashboard/index.js index 38bf24e..129d8d3 100644 --- a/backoffice/tmpl/module/dashboard/index.js +++ b/backoffice/tmpl/module/dashboard/index.js @@ -4,7 +4,7 @@ function initpage(){ } function loadlastpage(data){ - console.log("pref lastpage = " + JSON.stringify(data)); + //console.log("pref lastpage = " + JSON.stringify(data)); if (data['preference']){ parent.backoffice.loadpage(data.preference); } else { diff --git a/backoffice/tmpl/module/rendezvous/index.js b/backoffice/tmpl/module/rendezvous/index.js index cae5417..1391d50 100644 --- a/backoffice/tmpl/module/rendezvous/index.js +++ b/backoffice/tmpl/module/rendezvous/index.js @@ -45,17 +45,17 @@ document.addEventListener('DOMContentLoaded', function() { // }, eventClick: function(info) { var eventObj = info.event; - console.log('Clicked Event'); - console.log(eventObj); + //console.log('Clicked Event'); + //console.log(eventObj); parent.backoffice.loadpage('module/[% module %]/form_rendezvous.html'); }, viewSkeletonRender: function(info){ - console.log("SKEL Render"); - console.log(info); + //console.log("SKEL Render"); + //console.log(info); getevents(); }, viewSkeletonDestroy: function(info){ - console.log("SKEL Destroy"); + //console.log("SKEL Destroy"); removeEvents(); }, businessHours: { @@ -64,7 +64,7 @@ document.addEventListener('DOMContentLoaded', function() { endTime: '18:00', // an end time (6pm in this example) }, viewRender: function(view, element){ - console.log("View Changed!"); + //console.log("View Changed!"); }, eventTimeFormat: { // like '14:30:00' hour: '2-digit', @@ -87,7 +87,7 @@ function getevents(){ rdvtypes.push($(this).val()); } }); - console.log(calendar); + //console.log(calendar); var pdata = {"fn":"getevents","types":rdvtypes,startdate:calendar.view.props.dateProfile.currentRange.start.toISOString().substring(0,10),enddate:calendar.view.props.dateProfile.currentRange.end.toISOString().substring(0,10)}; //console.log(pdata); diff --git a/backoffice/tmpl/module/rendezvous/timesheets.js b/backoffice/tmpl/module/rendezvous/timesheets.js index 7a150c7..074f58b 100644 --- a/backoffice/tmpl/module/rendezvous/timesheets.js +++ b/backoffice/tmpl/module/rendezvous/timesheets.js @@ -17,7 +17,7 @@ function delete_timesheet(id){ } function delete_ts_callback(data){ - console.log(data); + //console.log(data); } function add_exception(){ @@ -35,6 +35,6 @@ function delete_exception(id){ } function delete_ex_callback(data){ - console.log(data); + //console.log(data); } diff --git a/backoffice/vendors/choices/choices.js b/backoffice/vendors/choices/choices.js index 93e8b4e..1f7d638 100644 --- a/backoffice/vendors/choices/choices.js +++ b/backoffice/vendors/choices/choices.js @@ -4198,7 +4198,7 @@ module.exports = function (text, pattern, patternAlphabet, _ref) { currentLocation: expectedLocation, expectedLocation: expectedLocation, distance: distance - }); // console.log('score', score, finalScore) + }); //console.log('score', score, finalScore) if (_score2 > currentThreshold) { @@ -4206,7 +4206,7 @@ module.exports = function (text, pattern, patternAlphabet, _ref) { } lastBitArr = bitArr; - } // console.log('FINAL SCORE', finalScore) + } //console.log('FINAL SCORE', finalScore) // Count exact matches (those with a score of 0) to be "almost" exact @@ -4319,11 +4319,11 @@ function () { }); } }]); - - return Bitap; -}(); // let x = new Bitap("od mn war", {}) +turn Bitap; +}() + re; // let x = new Bitap("od mn war", {}) // let result = x.search("Old Man's War") -// console.log(result) +//console.log(result) module.exports = Bitap; diff --git a/backoffice/vendors/choices/scripts/choices.js b/backoffice/vendors/choices/scripts/choices.js index 93e8b4e..d93833d 100644 --- a/backoffice/vendors/choices/scripts/choices.js +++ b/backoffice/vendors/choices/scripts/choices.js @@ -4198,7 +4198,7 @@ module.exports = function (text, pattern, patternAlphabet, _ref) { currentLocation: expectedLocation, expectedLocation: expectedLocation, distance: distance - }); // console.log('score', score, finalScore) + }); //console.log('score', score, finalScore) if (_score2 > currentThreshold) { @@ -4206,7 +4206,7 @@ module.exports = function (text, pattern, patternAlphabet, _ref) { } lastBitArr = bitArr; - } // console.log('FINAL SCORE', finalScore) + } //console.log('FINAL SCORE', finalScore) // Count exact matches (those with a score of 0) to be "almost" exact @@ -4323,7 +4323,7 @@ function () { return Bitap; }(); // let x = new Bitap("od mn war", {}) // let result = x.search("Old Man's War") -// console.log(result) +//console.log(result) module.exports = Bitap; diff --git a/js/main.js b/js/main.js index 62c396e..f7a6aec 100644 --- a/js/main.js +++ b/js/main.js @@ -4,11 +4,11 @@ $( document ).ready(function() { // $('.cat a').click(function() { - // console.log("TEST"); + //console.log("TEST"); // $('.cat .active').removeClass('active'); // $(this).addClass('active'); // var selector = $(this).attr('data-filter'); - // console.log(selector); + //console.log(selector); // $('.avocat-items > div').hide(); // $('.avocat-items > div' + selector).show(); // return false;