diff --git a/html/image/fontello/fontello.eot b/html/image/fontello/fontello.eot index b1e33b84a..6f3fe70ef 100644 Binary files a/html/image/fontello/fontello.eot and b/html/image/fontello/fontello.eot differ diff --git a/html/image/fontello/fontello.svg b/html/image/fontello/fontello.svg index ce270cb1a..1cedeb4cc 100644 --- a/html/image/fontello/fontello.svg +++ b/html/image/fontello/fontello.svg @@ -1,7 +1,7 @@ -Copyright (C) 2018 by original authors @ fontello.com +Copyright (C) 2019 by original authors @ fontello.com @@ -102,6 +102,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -116,10 +140,18 @@ + + + + + + + + @@ -130,8 +162,14 @@ + + + + + + diff --git a/html/image/fontello/fontello.ttf b/html/image/fontello/fontello.ttf index 5cc022c41..68203b8b1 100644 Binary files a/html/image/fontello/fontello.ttf and b/html/image/fontello/fontello.ttf differ diff --git a/html/image/fontello/fontello.woff b/html/image/fontello/fontello.woff index ed94d115e..e1dd8b033 100644 Binary files a/html/image/fontello/fontello.woff and b/html/image/fontello/fontello.woff differ diff --git a/html/image/fontello/fontello.woff2 b/html/image/fontello/fontello.woff2 index 88cd73057..0ae70a48d 100644 Binary files a/html/image/fontello/fontello.woff2 and b/html/image/fontello/fontello.woff2 differ diff --git a/html/js/scripts.js b/html/js/scripts.js index 694f3f358..7449e6657 100644 --- a/html/js/scripts.js +++ b/html/js/scripts.js @@ -3522,3 +3522,27 @@ function updatePeriode(p_dossier,p_exercice,p_periode_from,p_periode_to,p_last) new Ajax.Updater(p_periode_to,"ajax_misc.php",{method:"get",parameters:{op:"periode_change","gDossier":p_dossier,"exercice":exercice,field:p_periode_to,"type":"to","last":p_last}}); remove_waiting_box(); } +/** + * + * @param {string} p_domid DOM id of the span containing the padlock icon + * @returns none + */ +function toggle_lock(p_domid) +{ + var padlock=document.getElementById(p_domid); + if ( padlock == null) { + console.error("domid invalid"); + } + var status = padlock.getAttribute("is_locked"); + if ( status == 1 ) { + padlock.innerHTML=""; + padlock.setAttribute("is_locked",0); + } else if (status == 0) { + padlock.innerHTML=""; + padlock.setAttribute("is_locked",1); + } else { + throw "toggle_lock failed"; + } + + +} \ No newline at end of file diff --git a/include/lib/icon_action.class.php b/include/lib/icon_action.class.php index 4d1135ad0..a23ba44c9 100644 --- a/include/lib/icon_action.class.php +++ b/include/lib/icon_action.class.php @@ -251,5 +251,31 @@ class Icon_Action $p_javascript); return $r; } - + /** + * Display the icon of a padlock to lock or unlock element + * @param string $p_id DOMid + * @param string $p_javascript + * @return htmlString + */ + static function lock($p_id,$p_javascript) + { + $lock_cur=""; + $lock_next=""; + + $r=sprintf( '%s', + $p_id, + $p_id, + $p_javascript, + $lock_cur); + return $r; + } + /** + * Display the icon of a trashbin + * @param string $p_id DOMid + * @param string $p_javascript + * @return htmlString + */ + static function unlock($p_id,$p_javascript) + { + } } diff --git a/scenario/icon_actionTest.php b/scenario/icon_actionTest.php index c032d3e8b..fe9fa9c28 100644 --- a/scenario/icon_actionTest.php +++ b/scenario/icon_actionTest.php @@ -31,6 +31,9 @@ include_once NOALYSS_INCLUDE."/lib/icon_action.class.php";

iconon

+

+ iconoff +

close Close me ! @@ -67,4 +70,10 @@ include_once NOALYSS_INCLUDE."/lib/icon_action.class.php";

menu +

+

+ Lock +

+

+ Unlock

\ No newline at end of file