mirror of
https://github.com/myvesta/vesta
synced 2025-07-06 04:51:54 -07:00
notification centre improvements
This commit is contained in:
parent
1bb6ecb2ba
commit
addd9a8f02
34 changed files with 80 additions and 13 deletions
35
web/css/styles.min.css
vendored
35
web/css/styles.min.css
vendored
|
@ -595,6 +595,15 @@ a {
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.unselectable {
|
||||||
|
-webkit-touch-callout: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-khtml-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
.clearfix:before,
|
.clearfix:before,
|
||||||
.clearfix:after {
|
.clearfix:after {
|
||||||
content: '';
|
content: '';
|
||||||
|
@ -830,6 +839,8 @@ input[type="checkbox"] {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
color: #7f7f7f;
|
color: #7f7f7f;
|
||||||
|
max-height: 95%;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
.notification-container .unseen {
|
.notification-container .unseen {
|
||||||
color: #ABABAB;
|
color: #ABABAB;
|
||||||
|
@ -840,21 +851,33 @@ input[type="checkbox"] {
|
||||||
border-bottom: 1px solid #555;
|
border-bottom: 1px solid #555;
|
||||||
padding: 10px 15px 24px;
|
padding: 10px 15px 24px;
|
||||||
}
|
}
|
||||||
|
.notification-container li.empty {
|
||||||
|
padding-top: 50px;
|
||||||
|
height: 50px;
|
||||||
|
font-size: 15px;
|
||||||
|
font-style: italic;
|
||||||
|
text-align: center;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
.notification-container .mark-seen {
|
.notification-container .mark-seen {
|
||||||
background-color: #abc04b;
|
background: rgba(0, 0, 0, 0) url("/images/sprite.png?1446554103") repeat scroll -426px 165px;
|
||||||
border: 2px solid #454545;
|
border: 3px solid #454545;
|
||||||
border-radius: 10px;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: none;
|
display: none;
|
||||||
float: right;
|
float: right;
|
||||||
height: 7px;
|
height:11px;
|
||||||
margin-right: -5px;
|
margin-right: -5px;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
width: 7px;
|
width: 11px;
|
||||||
|
opacity: 0.5;
|
||||||
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
.notification-container .mark-seen:hover {
|
.notification-container .mark-seen:hover {
|
||||||
background-color: #333;
|
background-color: #333;
|
||||||
border-color: #abc04b;
|
border-color: #333;
|
||||||
|
|
||||||
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
.notification-container .mark-seen:active {
|
.notification-container .mark-seen:active {
|
||||||
background-color: #777;
|
background-color: #777;
|
||||||
|
|
|
@ -751,6 +751,8 @@ $LANG['ar'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
|
|
||||||
// Texts below doesn't exist in en.php
|
// Texts below doesn't exist in en.php
|
||||||
'%s rule' => 'قواعد %s',
|
'%s rule' => 'قواعد %s',
|
||||||
'MainDomain' => 'النطاق الرئيسي',
|
'MainDomain' => 'النطاق الرئيسي',
|
||||||
|
|
|
@ -750,4 +750,5 @@ $LANG['bs'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maksimalna dužina sme biti %s karaktera, uključujući i prefix',
|
'maximum characters length, including prefix' => 'maksimalna dužina sme biti %s karaktera, uključujući i prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
|
@ -751,4 +751,5 @@ $LANG['cn'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -752,4 +752,5 @@ $LANG['cz'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -753,4 +753,5 @@ $LANG['da'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -751,4 +751,5 @@ $LANG['de'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -752,4 +752,5 @@ $LANG['el'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -751,4 +751,5 @@ $LANG['en'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -749,4 +749,5 @@ $LANG['es'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'usar un máximo de %s, incluyendo prefijo',
|
'maximum characters length, including prefix' => 'usar un máximo de %s, incluyendo prefijo',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -754,6 +754,8 @@ $LANG['fa'] = [
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
|
|
||||||
// Texts below doesn't exist in en.php
|
// Texts below doesn't exist in en.php
|
||||||
'70 خط اخر %s.%s.log' => 'هفتاد خط انتهايي از %s.%s.log',
|
'70 خط اخر %s.%s.log' => 'هفتاد خط انتهايي از %s.%s.log',
|
||||||
];
|
];
|
||||||
|
|
|
@ -753,6 +753,7 @@ $LANG['fi'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
// Texts below doesn't exist in en.php
|
// Texts below doesn't exist in en.php
|
||||||
'traffic' => 'tiedonsiirto',
|
'traffic' => 'tiedonsiirto',
|
||||||
'disk' => 'levytila',
|
'disk' => 'levytila',
|
||||||
|
|
|
@ -751,6 +751,7 @@ $LANG['fr'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
// Texts below doesn't exist in en.php
|
// Texts below doesn't exist in en.php
|
||||||
'disk' => 'disque',
|
'disk' => 'disque',
|
||||||
'traffic' => 'traffic',
|
'traffic' => 'traffic',
|
||||||
|
|
|
@ -755,6 +755,7 @@ $LANG['hu'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
// Texts below doesn't exist in en.php
|
// Texts below doesn't exist in en.php
|
||||||
'Bandwidth Usage eth1' => 'eth1 sávszélesség használat',
|
'Bandwidth Usage eth1' => 'eth1 sávszélesség használat',
|
||||||
);
|
);
|
||||||
|
|
|
@ -754,4 +754,5 @@ $LANG['id'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -752,4 +752,5 @@ $LANG['it'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -751,4 +751,5 @@ $LANG['ja'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -751,4 +751,5 @@ $LANG['ka'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -752,4 +752,5 @@ $LANG['nl'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -752,4 +752,5 @@ $LANG['no'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -751,4 +751,5 @@ $LANG['pl'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -751,4 +751,5 @@ $LANG['pt-BR'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'comprimento máximo de % caracteres, incluindo o prefixo',
|
'maximum characters length, including prefix' => 'comprimento máximo de % caracteres, incluindo o prefixo',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -751,4 +751,5 @@ $LANG['pt'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -753,4 +753,5 @@ $LANG['ro'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s caractere, incluzând prefixul',
|
'maximum characters length, including prefix' => 'maximum %s caractere, incluzând prefixul',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -752,4 +752,5 @@ $LANG['ru'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -751,4 +751,5 @@ $LANG['se'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -752,4 +752,5 @@ $LANG['tr'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -774,4 +774,5 @@ $LANG['tw'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -752,4 +752,5 @@ $LANG['ua'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
|
@ -750,4 +750,5 @@ $LANG['vi'] = array(
|
||||||
|
|
||||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||||
|
|
||||||
|
'no notifications' => 'no notifications',
|
||||||
);
|
);
|
||||||
|
|
|
@ -406,12 +406,16 @@ VE.notifications.get_list = function(){
|
||||||
acc.push(tpl.finalize());
|
acc.push(tpl.finalize());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if(!Object.keys(data).length){
|
||||||
|
var tpl = Tpl.get('notification_empty', 'WEB');
|
||||||
|
acc.push(tpl.finalize());
|
||||||
|
}
|
||||||
|
|
||||||
$('.notification-container').html(acc.done()).show();
|
$('.notification-container').html(acc.done()).show();
|
||||||
|
|
||||||
$('.notification-container .mark-seen').click(function(event){
|
$('.notification-container .mark-seen').click(function(event){
|
||||||
/// TODO add token
|
// VE.notifications.mark_seen($(event.target).attr('id').replace("notification-", ""));
|
||||||
VE.notifications.mark_seen($(event.target).attr('id').replace("notification-", ""));
|
VE.notifications.delete($(event.target).attr('id').replace("notification-", ""));
|
||||||
// VE.notifications.delete($(event.target).attr('id').replace("notification-", ""));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -419,10 +423,12 @@ VE.notifications.get_list = function(){
|
||||||
|
|
||||||
|
|
||||||
VE.notifications.delete = function(id){
|
VE.notifications.delete = function(id){
|
||||||
$('#notification-'+id).parents('li').remove();
|
$('#notification-'+id).parents('li').hide();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/delete/notification/?delete=1¬ification_id="+id+"&token="+$('#token').attr('token')
|
url: "/delete/notification/?delete=1¬ification_id="+id+"&token="+$('#token').attr('token')
|
||||||
});
|
});
|
||||||
|
if($('.notification-container li:visible').length == 0)
|
||||||
|
$('.l-profile__notifications').removeClass('updates').removeClass('active');
|
||||||
}
|
}
|
||||||
|
|
||||||
VE.notifications.mark_seen = function(id){
|
VE.notifications.mark_seen = function(id){
|
||||||
|
|
|
@ -63,3 +63,4 @@ App.Constants.FM_READ_BY_OTHERS = '<?=__('read by others')?>';
|
||||||
App.Constants.FM_WRITE_BY_OTHERS = '<?=__('write by others')?>';
|
App.Constants.FM_WRITE_BY_OTHERS = '<?=__('write by others')?>';
|
||||||
App.Constants.FM_EXECUTE_BY_OTHERS = '<?=__('execute/search by others')?>';
|
App.Constants.FM_EXECUTE_BY_OTHERS = '<?=__('execute/search by others')?>';
|
||||||
|
|
||||||
|
App.Constants.NOTIFICATIONS_EMPTY = '<?=__('no notifications')?>';
|
||||||
|
|
|
@ -6,13 +6,18 @@ App.Templates.html = {
|
||||||
WEB: {
|
WEB: {
|
||||||
hint: [''],
|
hint: [''],
|
||||||
notification: [
|
notification: [
|
||||||
'<li class="~!:UNSEEN~!"><span class="mark-seen" id="notification-~!:ID~!"> </span>\
|
'<li class="~!:UNSEEN~!"><span class="unselectable mark-seen" id="notification-~!:ID~!"> </span>\
|
||||||
<span class="title"><span class="icon ~!:TYPE~!"> </span>~!:TOPIC~!</span>\
|
<span class="title"><span class="unselectable icon ~!:TYPE~!"> </span>~!:TOPIC~!</span>\
|
||||||
~!:NOTICE~!\
|
~!:NOTICE~!\
|
||||||
</li>'
|
</li>'
|
||||||
|
],
|
||||||
|
notification_empty: [
|
||||||
|
'<li class="empty">\
|
||||||
|
'+App.Constants.NOTIFICATIONS_EMPTY+'\
|
||||||
|
</li>'
|
||||||
]
|
]
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// file manager
|
// file manager
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
<script type="text/javascript" src="/js/events.js?<?=JS_LATEST_UPDATE?>"></script>
|
<script type="text/javascript" src="/js/events.js?<?=JS_LATEST_UPDATE?>"></script>
|
||||||
<script type="text/javascript" src="/js/app.js?<?=JS_LATEST_UPDATE?>"></script>
|
<script type="text/javascript" src="/js/app.js?<?=JS_LATEST_UPDATE?>"></script>
|
||||||
<script type="text/javascript" src="/js/init.js?<?=JS_LATEST_UPDATE?>"></script>
|
<script type="text/javascript" src="/js/init.js?<?=JS_LATEST_UPDATE?>"></script>
|
||||||
|
<script type="text/javascript" src="/js/i18n.js.php?<?=JS_LATEST_UPDATE?>"></script>
|
||||||
<script type="text/javascript" src="/js/templates.js?<?=JS_LATEST_UPDATE?>"></script>
|
<script type="text/javascript" src="/js/templates.js?<?=JS_LATEST_UPDATE?>"></script>
|
||||||
<script type="text/javascript" src="/js/jquery.finder.js?<?=JS_LATEST_UPDATE?>"></script>
|
<script type="text/javascript" src="/js/jquery.finder.js?<?=JS_LATEST_UPDATE?>"></script>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue