From 45aac81b71a521c26fc1fb6e97334a49ed6badca Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Nov 2013 18:12:13 +0100 Subject: [PATCH] Doc: More comments --- htdocs/core/js/lib_head.js | 29 +++++++++++++++++++---------- htdocs/core/tpl/ajaxrow.tpl.php | 6 +++--- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/htdocs/core/js/lib_head.js b/htdocs/core/js/lib_head.js index ae6182177d7..cfb2977c370 100644 --- a/htdocs/core/js/lib_head.js +++ b/htdocs/core/js/lib_head.js @@ -1,4 +1,4 @@ -// Copyright (C) 2005-2010 Laurent Destailleur +// Copyright (C) 2005-2013 Laurent Destailleur // Copyright (C) 2005-2012 Regis Houssin // // This program is free software; you can redistribute it and/or modify @@ -290,8 +290,10 @@ function loadXMLDoc(url,readyStateFunction,async) return req; } -// To hide/show select Boxes with IE6 (and only IE6 because IE6 has a bug and -// not put popup completely on the front) +/* To hide/show select Boxes with IE6 (and only IE6 because IE6 has a bug and + * not put popup completely on the front) + * Used only bu popup calendar + */ function hideSelectBoxes() { var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10); if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE 6") > -1) @@ -304,6 +306,10 @@ function hideSelectBoxes() { } } } +/* To hide/show select Boxes with IE6 (and only IE6 because IE6 has a bug and + * not put popup completely on the front) + * Used only bu popup calendar + */ function displaySelectBoxes() { var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10); if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE 6") > -1) @@ -354,9 +360,7 @@ function formatDate(date,format) c=format.charAt(i); // Recupere char du format substr=""; j=i; - while ((format.charAt(j)==c) && (j < format.length)) // Recupere char - // successif - // identiques + while ((format.charAt(j)==c) && (j < format.length)) // Recupere char successif identiques { substr += format.charAt(j++); } @@ -623,8 +627,9 @@ function hideMessage(fieldId,message) { if (textbox.value == message) textbox.value = ''; } + /* - * + * TODO Used by admin page only ? */ function setConstant(url, code, input, entity) { $.get( url, { @@ -679,7 +684,7 @@ function setConstant(url, code, input, entity) { } /* - * + * TODO Used by admin page only ? */ function delConstant(url, code, input, entity) { $.get( url, { @@ -733,7 +738,7 @@ function delConstant(url, code, input, entity) { } /* - * + * TODO Used by admin page only ? */ function confirmConstantAction(action, url, code, input, box, entity, yesButton, noButton) { var boxConfirm = box; @@ -784,7 +789,9 @@ function confirmConstantAction(action, url, code, input, box, entity, yesButton, /* * ================================================================= * This is to allow to transform all select box into ajax autocomplete box - * with just one line: $(function() { $( "#idofmylist" ).combobox(); }); + * with just one line: + * $(function() { $( "#idofmylist" ).combobox(); }); + * Do not use it on large combo boxes * ================================================================= */ (function( $ ) { @@ -894,6 +901,8 @@ function confirmConstantAction(action, url, code, input, box, entity, yesButton, /* * Timer for delayed keyup function + * + * TODO Who use this ? */ (function($){ $.widget("ui.onDelayedKeyup", { diff --git a/htdocs/core/tpl/ajaxrow.tpl.php b/htdocs/core/tpl/ajaxrow.tpl.php index aa96b46a859..27b14d859f3 100644 --- a/htdocs/core/tpl/ajaxrow.tpl.php +++ b/htdocs/core/tpl/ajaxrow.tpl.php @@ -17,11 +17,11 @@ * * Javascript code to activate drag and drop on lines * You can use this if you want to be abale to drag and drop rows of a table. - * You must add id="tablelines" ont table level tag and have count($object->lines) or count($taskarray) > 0 + * You must add id="tablelines" ont table level tag and have count($object->lines) or count($taskarray) > 0 */ ?> - + id; $fk_element=$object->fk_element; @@ -84,4 +84,4 @@ $(document).ready(function(){ }); - \ No newline at end of file + \ No newline at end of file