Minor GUI improvements

This commit is contained in:
Christophe Maudoux 2020-02-13 20:10:27 +01:00
parent 3b6fbdf92a
commit ce65b712b0
14 changed files with 17 additions and 13 deletions

View File

@ -609,11 +609,11 @@ sub tree {
nodes => [
'notification',
'notificationsExplorer',
'notificationWildcard',
'oldNotifFormat',
'notificationXSLTfile',
'notificationStorage',
'notificationStorageOptions',
'notificationWildcard',
'notificationXSLTfile',
{
title => 'serverNotification',
help => 'notifications.html#server',

View File

@ -525,7 +525,7 @@
"notificationDeleted":"تم حذف الإشعار",
"notificationDone":"انتهى الإشعار",
"notificationsDone":"انتهت الإشعارات",
"notificationsExplorer":"Notifications explorer",
"notificationsExplorer":"Explorer",
"notificationNotCreated":"لم يتم إنشاء الإشعار",
"notificationNotDeleted":"لم يتم وضع علامة على الإشعار بأنه تم الاطلاع عليه",
"notificationNotFound":"لم يتم العثور على الإشعار",

View File

@ -525,7 +525,7 @@
"notificationDeleted":"Notification deleted",
"notificationDone":"Notification done",
"notificationsDone":"Notifications done",
"notificationsExplorer":"Notifications explorer",
"notificationsExplorer":"Explorer",
"notificationNotCreated":"The notification was not created",
"notificationNotDeleted":"The notification was not marked as done",
"notificationNotFound":"The notification was not found",

View File

@ -525,7 +525,7 @@
"notificationDeleted":"Notification deleted",
"notificationDone":"Notification done",
"notificationsDone":"Notifications done",
"notificationsExplorer":"Notifications explorer",
"notificationsExplorer":"Explorer",
"notificationNotCreated":"The notification was not created",
"notificationNotDeleted":"The notification was not marked as done",
"notificationNotFound":"The notification was not found",

View File

@ -525,7 +525,7 @@
"notificationDeleted":"La notification a été marquée comme lue",
"notificationDone":"Notification validée",
"notificationsDone":"Notifications validées",
"notificationsExplorer":"Explorateur de notifications",
"notificationsExplorer":"Explorateur",
"notificationNotCreated":"La notification n'a pas été créée",
"notificationNotDeleted":"La notification n'a pas été marquée comme lue",
"notificationNotFound":"La notification n'a pas été trouvée",

View File

@ -525,7 +525,7 @@
"notificationDeleted":"La notifica è stata cancellata",
"notificationDone":"La notifica è stata effettuata",
"notificationsDone":"Notifiche effettuate",
"notificationsExplorer":"Notifications explorer",
"notificationsExplorer":"Explorer",
"notificationNotCreated":"La notifica non è stata creata",
"notificationNotDeleted":"La notifica non è stata contrassegnata come eseguita",
"notificationNotFound":"La notifica non é stata trovata",

View File

@ -525,7 +525,7 @@
"notificationDeleted":"Bildirim silindi",
"notificationDone":"Bildirim tamamlandı",
"notificationsDone":"Bildirimler tamamlandı",
"notificationsExplorer":"Notifications explorer",
"notificationsExplorer":"Explorer",
"notificationNotCreated":"Bildirim oluşturulmadı",
"notificationNotDeleted":"Bildirim tamamlandı olarak işaretlenmedi",
"notificationNotFound":"Bildirim bulunamadı",

View File

@ -525,7 +525,7 @@
"notificationDeleted":"Thông báo đã xoá",
"notificationDone":"Thông báo được thực hiện",
"notificationsDone":"Thông báo đã hoàn tất",
"notificationsExplorer":"Notifications explorer",
"notificationsExplorer":"Explorer",
"notificationNotCreated":"Thông báo không được tạo ra",
"notificationNotDeleted":"Thông báo không được đánh dấu là đã hoàn tất",
"notificationNotFound":"Không tìm thấy thông báo",

View File

@ -525,7 +525,7 @@
"notificationDeleted":"Notification deleted",
"notificationDone":"Notification done",
"notificationsDone":"Notifications done",
"notificationsExplorer":"Notifications explorer",
"notificationsExplorer":"Explorer",
"notificationNotCreated":"The notification was not created",
"notificationNotDeleted":"The notification was not marked as done",
"notificationNotFound":"The notification was not found",

File diff suppressed because one or more lines are too long

View File

@ -74,9 +74,11 @@ $(document).ready ->
$('body').on 'click', '.btn-info', () ->
if $('#explorer').is(':visible')
$('#explorer').hide()
$('#color').hide()
$("#icon-explorer-button").removeClass 'fa-eye-slash'
$("#icon-explorer-button").addClass 'fa-eye'
else
$('#explorer').show()
$('#color').show()
$("#icon-explorer-button").removeClass 'fa-eye'
$("#icon-explorer-button").addClass 'fa-eye-slash'

View File

@ -101,10 +101,12 @@ LemonLDAP::NG Notifications script
return $('body').on('click', '.btn-info', function() {
if ($('#explorer').is(':visible')) {
$('#explorer').hide();
$('#color').hide();
$("#icon-explorer-button").removeClass('fa-eye-slash');
return $("#icon-explorer-button").addClass('fa-eye');
} else {
$('#explorer').show();
$('#color').show();
$("#icon-explorer-button").removeClass('fa-eye');
return $("#icon-explorer-button").addClass('fa-eye-slash');
}

View File

@ -1 +1 @@
(function(){var e,o,r,s,t;o=$("#msg").attr("trspan"),r=function(e,t){return $("#msg").html(window.translate(e)),$("#color").removeClass("message-positive message-warning alert-success alert-warning"),$("#color").addClass("message-"+t),"positive"===t&&(t="success"),$("#color").addClass("alert-"+t)},e=function(e,t,n){return r("notificationRetreiveFailed","warning")},s=function(e,t,n){return r(o,"positive"),$(".btn-danger").each(function(){return $(this).removeClass("btn-danger"),$(this).addClass("btn-success")}),$(".fa-eye-slash").each(function(){return $(this).removeClass("fa-eye-slash"),$(this).addClass("fa-eye")}),$(".verify").each(function(){return $(this).text(window.translate("verify")),$(this).attr("trspan","verify")}),t&&n?($("#icon-"+t+"-"+n).removeClass("fa-eye"),$("#icon-"+t+"-"+n).addClass("fa-eye-slash"),$("#text-"+t+"-"+n).text(window.translate("hide")),$("#text-"+t+"-"+n).attr("trspan","hide"),e.removeClass("btn-success"),e.addClass("btn-danger"),$("#myNotification").removeAttr("hidden")):($("#icon-explorer-button").removeClass("fa-eye"),$("#icon-explorer-button").addClass("fa-eye-slash"),$("#myNotification").attr("hidden","true"),$("#explorer-button").attr("hidden","true"))},t=function(n,o,a){return console.log("Ref:",n,"epoch:",o),n&&o?(console.log("Send AJAX request"),$.ajax({type:"GET",url:portal+"mynotifications/"+n,data:{epoch:o},dataType:"json",error:e,success:function(e){var t;return e.result?(console.log("Notification:",e.notification),s(a,n,o),$("#displayNotif").html(e.notification),$("#notifRef").text(n),t=new Date(1e3*o),$("#notifEpoch").text(t.toLocaleString()),$("#explorer-button").removeAttr("hidden")):r("notificationNotFound","warning")}})):r("notificationRetreiveFailed","warning")},$(document).ready(function(){return $(".data-epoch").each(function(){var e;return e=new Date(1e3*$(this).text()),$(this).text(e.toLocaleString())}),$("#goback").attr("href",portal),$("body").on("click",".btn-success",function(){return t($(this).attr("notif"),$(this).attr("epoch"),$(this))}),$("body").on("click",".btn-danger",function(){return s($(this))}),$("body").on("click",".btn-info",function(){return $("#explorer").is(":visible")?($("#explorer").hide(),$("#icon-explorer-button").removeClass("fa-eye-slash"),$("#icon-explorer-button").addClass("fa-eye")):($("#explorer").show(),$("#icon-explorer-button").removeClass("fa-eye"),$("#icon-explorer-button").addClass("fa-eye-slash"))})})}).call(this);
(function(){var e,o,a,s,t;o=$("#msg").attr("trspan"),a=function(e,t){return $("#msg").html(window.translate(e)),$("#color").removeClass("message-positive message-warning alert-success alert-warning"),$("#color").addClass("message-"+t),"positive"===t&&(t="success"),$("#color").addClass("alert-"+t)},e=function(e,t,n){return a("notificationRetreiveFailed","warning")},s=function(e,t,n){return a(o,"positive"),$(".btn-danger").each(function(){return $(this).removeClass("btn-danger"),$(this).addClass("btn-success")}),$(".fa-eye-slash").each(function(){return $(this).removeClass("fa-eye-slash"),$(this).addClass("fa-eye")}),$(".verify").each(function(){return $(this).text(window.translate("verify")),$(this).attr("trspan","verify")}),t&&n?($("#icon-"+t+"-"+n).removeClass("fa-eye"),$("#icon-"+t+"-"+n).addClass("fa-eye-slash"),$("#text-"+t+"-"+n).text(window.translate("hide")),$("#text-"+t+"-"+n).attr("trspan","hide"),e.removeClass("btn-success"),e.addClass("btn-danger"),$("#myNotification").removeAttr("hidden")):($("#icon-explorer-button").removeClass("fa-eye"),$("#icon-explorer-button").addClass("fa-eye-slash"),$("#myNotification").attr("hidden","true"),$("#explorer-button").attr("hidden","true"))},t=function(n,o,r){return console.log("Ref:",n,"epoch:",o),n&&o?(console.log("Send AJAX request"),$.ajax({type:"GET",url:portal+"mynotifications/"+n,data:{epoch:o},dataType:"json",error:e,success:function(e){var t;return e.result?(console.log("Notification:",e.notification),s(r,n,o),$("#displayNotif").html(e.notification),$("#notifRef").text(n),t=new Date(1e3*o),$("#notifEpoch").text(t.toLocaleString()),$("#explorer-button").removeAttr("hidden")):a("notificationNotFound","warning")}})):a("notificationRetreiveFailed","warning")},$(document).ready(function(){return $(".data-epoch").each(function(){var e;return e=new Date(1e3*$(this).text()),$(this).text(e.toLocaleString())}),$("#goback").attr("href",portal),$("body").on("click",".btn-success",function(){return t($(this).attr("notif"),$(this).attr("epoch"),$(this))}),$("body").on("click",".btn-danger",function(){return s($(this))}),$("body").on("click",".btn-info",function(){return $("#explorer").is(":visible")?($("#explorer").hide(),$("#color").hide(),$("#icon-explorer-button").removeClass("fa-eye-slash"),$("#icon-explorer-button").addClass("fa-eye")):($("#explorer").show(),$("#color").show(),$("#icon-explorer-button").removeClass("fa-eye"),$("#icon-explorer-button").addClass("fa-eye-slash"))})})}).call(this);

View File

@ -1 +1 @@
{"version":3,"sources":["lemonldap-ng-portal/site/htdocs/static/common/js/notifications.js"],"names":["displayError","msg","setMsg","toggle","viewNotif","$","attr","level","html","window","translate","removeClass","addClass","j","status","err","button","notif","epoch","each","this","text","removeAttr","console","log","ajax","type","url","portal","data","dataType","error","success","resp","myDate","result","notification","Date","toLocaleString","document","ready","on","is","hide","show","call"],"mappings":"CAMA,WACE,IAAIA,EAAcC,EAAKC,EAAQC,EAAQC,EAEvCH,EAAMI,EAAE,QAAQC,KAAK,UAErBJ,EAAS,SAASD,EAAKM,GAOrB,OANAF,EAAE,QAAQG,KAAKC,OAAOC,UAAUT,IAChCI,EAAE,UAAUM,YAAY,gEACxBN,EAAE,UAAUO,SAAS,WAAaL,GACpB,aAAVA,IACFA,EAAQ,WAEHF,EAAE,UAAUO,SAAS,SAAWL,IAGzCP,EAAe,SAASa,EAAGC,EAAQC,GACjC,OAAOb,EAAO,6BAA8B,YAG9CC,EAAS,SAASa,EAAQC,EAAOC,GAc/B,OAbAhB,EAAOD,EAAK,YACZI,EAAE,eAAec,KAAK,WAEpB,OADAd,EAAEe,MAAMT,YAAY,cACbN,EAAEe,MAAMR,SAAS,iBAE1BP,EAAE,iBAAiBc,KAAK,W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AAK,WACpB,IAAIe,EAEJ,OADAA,EAAS,IAAIG,KAAsB,IAAjBhC,EAAEe,MAAMC,QACnBhB,EAAEe,MAAMC,KAAKa,EAAOI,oBAE7BjC,EAAE,WAAWC,KAAK,OAAQsB,QAC1BvB,EAAE,QAAQoC,GAAG,QAAS,eAAgB,WACpC,OAAOrC,EAAUC,EAAEe,MAAMd,KAAK,SAAUD,EAAEe,MAAMd,KAAK,SAAUD,EAAEe,SAEnEf,EAAE,QAAQoC,GAAG,QAAS,cAAe,WACnC,OAAOtC,EAAOE,EAAEe,SAEXf,EAAE,QAAQoC,GAAG,QAAS,YAAa,WACxC,OAAIpC,EAAE,aAAaqC,GAAG,aACpBrC,EAAE,aAAasC,OACftC,EAAE,yBAAyBM,YAAY,gBAChCN,EAAE,yBAAyBO,SAAS,YAE3CP,EAAE,aAAauC,OACfvC,EAAE,yBAAyBM,YAAY,UAChCN,EAAE,yBAAyBO,SAAS,uBAKhDiC,KAAKzB"}
{"version":3,"sources":["lemonldap-ng-portal/site/htdocs/static/common/js/notifications.js"],"names":["displayError","msg","setMsg","toggle","viewNotif","$","attr","level","html","window","translate","removeClass","addClass","j","status","err","button","notif","epoch","each","this","text","removeAttr","console","log","ajax","type","url","portal","data","dataType","error","success","resp","myDate","result","notification","Date","toLocaleString","document","ready","on","is","hide","show","call"],"mappings":"CAMA,WACE,IAAIA,EAAcC,EAAKC,EAAQC,EAAQC,EAEvCH,EAAMI,EAAE,QAAQC,KAAK,UAErBJ,EAAS,SAASD,EAAKM,GAOrB,OANAF,EAAE,QAAQG,KAAKC,OAAOC,UAAUT,IAChCI,EAAE,UAAUM,YAAY,gEACxBN,EAAE,UAAUO,SAAS,WAAaL,GACpB,aAAVA,IACFA,EAAQ,WAEHF,EAAE,UAAUO,SAAS,SAAWL,IAGzCP,EAAe,SAASa,EAAGC,EAAQC,GACjC,OAAOb,EAAO,6BAA8B,YAG9CC,EAAS,SAASa,EAAQC,EAAOC,GAc/B,OAbAhB,EAAOD,E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