[Fusionforge-commits] FusionForge branch master updated. 2660b91c053a8bf16848cee12eae621e1ccb116f

Alain Peyrat aljeux at fusionforge.org
Fri Sep 13 18:15:33 CEST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  2660b91c053a8bf16848cee12eae621e1ccb116f (commit)
      from  dcd5e843f644a0310ee08cb0d5085cb48bbf4f7e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2660b91c053a8bf16848cee12eae621e1ccb116f
Author: Alain Peyrat <alain.peyrat at alcatel-lucent.com>
Date:   Fri Sep 13 18:13:07 2013 +0200

    clean code

diff --git a/src/www/js/common.js b/src/www/js/common.js
index 6ad966e..96fa43b 100644
--- a/src/www/js/common.js
+++ b/src/www/js/common.js
@@ -1,11 +1,11 @@
 
 function admin_window(adminurl) {
-	AdminWin = window.open( adminurl, 'AdminWindow','scrollbars=yes,resizable=yes, toolbar=yes, height=400, width=400, top=2, left=2');
+	var AdminWin = window.open( adminurl, 'AdminWindow','scrollbars=yes,resizable=yes, toolbar=yes, height=400, width=400, top=2, left=2');
 	AdminWin.focus();
 }
 
 function help_window(helpurl) {
-	HelpWin = window.open( helpurl,'HelpWindow','scrollbars=yes,resizable=yes,toolbar=no,height=400,width=600');
+	var HelpWin = window.open( helpurl,'HelpWindow','scrollbars=yes,resizable=yes,toolbar=no,height=400,width=600');
 }
 
 function MM_goToURL() { //v3.0
@@ -14,55 +14,54 @@ function MM_goToURL() { //v3.0
 }
 
 function toggledisplay(a,list) {
-  var elem=document.getElementById(list)
-  var open='/images/folderArrowOpen.png'
-  var close='/images/folderArrowClosed.png'
+  var elem = document.getElementById(list);
+  var open = '/images/folderArrowOpen.png';
+  var close = '/images/folderArrowClosed.png';
   if (elem.style.display=='none') {
-    elem.style.display='block'
-    a.title='Click to display only admins'
+    elem.style.display = 'block';
+    a.title = 'Click to display only admins';
     a.src = open
   } else {
     elem.style.display='none';
-    a.title='Click to display all members'
+    a.title = 'Click to display all members';
     a.src = close
   }
 }
 
 function switch2edit (a,show,edit) {
-  var elemshow=document.getElementById(show)
-  var elemedit=document.getElementById(edit)
+  var elemshow = document.getElementById(show);
+  var elemedit = document.getElementById(edit);
   if (elemedit.style.display=='none') {
-    elemedit.style.display='block'
-    elemshow.style.display='none'
+    elemedit.style.display = 'block';
+    elemshow.style.display = 'none';
     a.style.display='none'
   }
  }
 
  function switch2display (a,bt,disp,i) {
-  var elembt1=document.getElementById(bt+'1_'+i)
-  var elemdisp1=document.getElementById(disp+'1_'+i)
-  var elembt2=document.getElementById(bt+'2_'+i)
-  var elemdisp2=document.getElementById(disp+'2_'+i)
+  var elembt1 = document.getElementById(bt + '1_' + i);
+  var elemdisp1 = document.getElementById(disp + '1_' + i);
+  var elembt2 = document.getElementById(bt + '2_' + i);
+  var elemdisp2 = document.getElementById(disp + '2_' + i);
   
   if (elemdisp1.style.display=='none') {
-    elembt1.style.display='inline'
-    elemdisp1.style.display='block'
-    elembt2.style.display='none'
+    elembt1.style.display = 'inline';
+    elemdisp1.style.display = 'block';
+    elembt2.style.display = 'none';
     elemdisp2.style.display='none'
   }
   else {
-    elembt1.style.display='none'
-    elemdisp1.style.display='none'
-    elembt2.style.display='inline'
+    elembt1.style.display = 'none';
+    elemdisp1.style.display = 'none';
+    elembt2.style.display = 'inline';
     elemdisp2.style.display='block'
   }
 }
 
 function checkAllArtifacts(val) {
-  al=document.artifactList;
-  len = al.elements.length;
-  var i=0;
-  for( i=0 ; i<len ; i++) {
+  var al=document.artifactList;
+  var len = al.elements.length;
+  for(var i=0; i<len; i++) {
     if (al.elements[i].name=='artifact_id_list[]') {
       al.elements[i].checked=val;
     }
@@ -70,10 +69,9 @@ function checkAllArtifacts(val) {
 }
 
 function checkAllTasks(val) {
-  al=document.taskList;
-  len = al.elements.length;
-  var i=0;
-  for( i=0 ; i<len ; i++) {
+  var al=document.taskList;
+  var len = al.elements.length;
+  for(var i=0; i<len; i++) {
     if (al.elements[i].name=='project_task_id_list[]') {
       al.elements[i].checked=val;
     }
@@ -82,6 +80,7 @@ function checkAllTasks(val) {
 
 function flipAll(formObj) {
   var isFirstSet = -1;
+  var fldObj;
   for (var i=0; i < formObj.length; i++) {
       fldObj = formObj.elements[i];
       if ((fldObj.type == 'checkbox') && (fldObj.name.substring(0,2) == 'p[')) {
@@ -95,6 +94,5 @@ function flipAll(formObj) {
 function submitOrder() {
   var order = document.getElementById('order_span').getAttribute('sortdir');
   var myRand = Math.round(Math.random()*(1000000));
-  var imgSrc = '/tracker/setorder.php?' + 'order=' + order + '&rand=' + myRand;
-  document.getElementById('img_order').src = imgSrc;
+  document.getElementById('img_order').src = '/tracker/setorder.php?' + 'order=' + order + '&rand=' + myRand;
 }
diff --git a/src/www/js/sortable.js b/src/www/js/sortable.js
index 8f6c8c1..a1d5434 100644
--- a/src/www/js/sortable.js
+++ b/src/www/js/sortable.js
@@ -120,7 +120,7 @@ function ts_makeSortable(t) {
 
 function ts_getInnerText(el) {
 	if (typeof el == "string") return el;
-	if (typeof el == "undefined") { return el };
+	if (typeof el == "undefined") return el;
 	if (el.hasAttribute("content")) return el.getAttribute("content");
 	if (el.innerText) return el.innerText;	//Not needed but it is faster
 	var str = "";

-----------------------------------------------------------------------

Summary of changes:
 src/www/js/common.js   |   62 +++++++++++++++++++++++-------------------------
 src/www/js/sortable.js |    2 +-
 2 files changed, 31 insertions(+), 33 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list