comparison admin.js @ 1061:7298b2898a6d

Merged.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 10 Feb 2016 16:20:56 +0200
parents fb5a468e647d
children 82ecea33c477
comparison
equal deleted inserted replaced
1060:280de0770798 1061:7298b2898a6d
58 var tabContent = document.getElementById("tabCont"+ tabset + id); 58 var tabContent = document.getElementById("tabCont"+ tabset + id);
59 var tabHead = document.getElementById("tabHead"+ tabset + id); 59 var tabHead = document.getElementById("tabHead"+ tabset + id);
60 if (tabContent && tabHead) 60 if (tabContent && tabHead)
61 { 61 {
62 tabContent.style.display = (tab == id) ? "block" : "none"; 62 tabContent.style.display = (tab == id) ? "block" : "none";
63 tabHead.style.borderTop = (tab == id) ? "4px solid white" : "none"; 63 tabHead.className = (tab == id) ? "active" : "inactive";
64 if (tab == id) 64 if (tab == id)
65 { 65 {
66 // Set active tab and refresh contents 66 // Set active tab and refresh contents
67 activeTabs[tabset] = id; 67 activeTabs[tabset] = id;
68 setTimeout("refreshDispatch"+ tabset +"('"+ id +"');", 10); 68 setTimeout("refreshDispatch"+ tabset +"('"+ id +"');", 10);
359 // 359 //
360 // Compo management 360 // Compo management
361 // 361 //
362 function addCompo() 362 function addCompo()
363 { 363 {
364 var args = jsMakePostArgs({"name":1, "description":1, "notes":1}, "nc", ""); 364 var args = jsMakePostArgs({"name":1, "description":1}, "nc", "");
365 365
366 var msuccess = function(txt) 366 var msuccess = function(txt)
367 { 367 {
368 setTimeout("refreshDispatchCC('Compos');", 50); 368 setTimeout("refreshDispatchCC('Compos');", 50);
369 } 369 }
380 { 380 {
381 jsRefreshItems("compo"+id, "compo", "&id="+id); 381 jsRefreshItems("compo"+id, "compo", "&id="+id);
382 } 382 }
383 383
384 jsSendPOSTRequest("action=update&type=compotype&id="+id+"&ctype="+jsGetValue("cotype"+id+"Sel", 4), msuccess); 384 jsSendPOSTRequest("action=update&type=compotype&id="+id+"&ctype="+jsGetValue("cotype"+id+"Sel", 4), msuccess);
385 }
386
387
388 function updateCompoVoting(id)
389 {
390 var msuccess = function(txt)
391 {
392 jsRefreshItems("covoting"+id, "compovoting", "&id="+id);
393 }
394
395 jsSendPOSTRequest("action=update&type=compovoting&id="+id+"&voting="+jsGetValue("covotingbutton"+id, 3), msuccess);
385 } 396 }
386 397
387 398
388 function updateCompo(id) 399 function updateCompo(id)
389 { 400 {