mirror of
https://github.com/myvesta/vesta
synced 2025-07-05 20:41:53 -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;
|
||||
}
|
||||
|
||||
.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:after {
|
||||
content: '';
|
||||
|
@ -830,6 +839,8 @@ input[type="checkbox"] {
|
|||
font-size: 12px;
|
||||
padding: 0;
|
||||
color: #7f7f7f;
|
||||
max-height: 95%;
|
||||
overflow: auto;
|
||||
}
|
||||
.notification-container .unseen {
|
||||
color: #ABABAB;
|
||||
|
@ -840,21 +851,33 @@ input[type="checkbox"] {
|
|||
border-bottom: 1px solid #555;
|
||||
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 {
|
||||
background-color: #abc04b;
|
||||
border: 2px solid #454545;
|
||||
border-radius: 10px;
|
||||
background: rgba(0, 0, 0, 0) url("/images/sprite.png?1446554103") repeat scroll -426px 165px;
|
||||
border: 3px solid #454545;
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
float: right;
|
||||
height: 7px;
|
||||
height:11px;
|
||||
margin-right: -5px;
|
||||
margin-top: 0;
|
||||
width: 7px;
|
||||
width: 11px;
|
||||
opacity: 0.5;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.notification-container .mark-seen:hover {
|
||||
background-color: #333;
|
||||
border-color: #abc04b;
|
||||
border-color: #333;
|
||||
|
||||
opacity: 0.8;
|
||||
}
|
||||
.notification-container .mark-seen:active {
|
||||
background-color: #777;
|
||||
|
|
|
@ -751,6 +751,8 @@ $LANG['ar'] = array(
|
|||
|
||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||
|
||||
'no notifications' => 'no notifications',
|
||||
|
||||
// Texts below doesn't exist in en.php
|
||||
'%s rule' => 'قواعد %s',
|
||||
'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',
|
||||
|
||||
'no notifications' => 'no notifications',
|
||||
);
|
|
@ -751,4 +751,5 @@ $LANG['cn'] = array(
|
|||
|
||||
'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',
|
||||
|
||||
'no notifications' => 'no notifications',
|
||||
);
|
||||
|
|
|
@ -753,4 +753,5 @@ $LANG['da'] = array(
|
|||
|
||||
'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',
|
||||
|
||||
'no notifications' => 'no notifications',
|
||||
);
|
||||
|
|
|
@ -752,4 +752,5 @@ $LANG['el'] = array(
|
|||
|
||||
'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',
|
||||
|
||||
'no notifications' => 'no notifications',
|
||||
);
|
||||
|
|
|
@ -749,4 +749,5 @@ $LANG['es'] = array(
|
|||
|
||||
'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',
|
||||
|
||||
'no notifications' => 'no notifications',
|
||||
|
||||
// Texts below doesn't exist in en.php
|
||||
'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',
|
||||
|
||||
'no notifications' => 'no notifications',
|
||||
// Texts below doesn't exist in en.php
|
||||
'traffic' => 'tiedonsiirto',
|
||||
'disk' => 'levytila',
|
||||
|
|
|
@ -751,6 +751,7 @@ $LANG['fr'] = array(
|
|||
|
||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||
|
||||
'no notifications' => 'no notifications',
|
||||
// Texts below doesn't exist in en.php
|
||||
'disk' => 'disque',
|
||||
'traffic' => 'traffic',
|
||||
|
|
|
@ -755,6 +755,7 @@ $LANG['hu'] = array(
|
|||
|
||||
'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
|
||||
|
||||
'no notifications' => 'no notifications',
|
||||
// Texts below doesn't exist in en.php
|
||||
'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',
|
||||
|
||||
'no notifications' => 'no notifications',
|
||||
);
|
||||
|
|
|
@ -752,4 +752,5 @@ $LANG['it'] = array(
|
|||
|
||||
'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',
|
||||
|
||||
'no notifications' => 'no notifications',
|
||||
);
|
||||
|
|
|
@ -751,4 +751,5 @@ $LANG['ka'] = array(
|
|||
|
||||
'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',
|
||||
|
||||
'no notifications' => 'no notifications',
|
||||
);
|
||||
|
|
|
@ -752,4 +752,5 @@ $LANG['no'] = array(
|
|||
|
||||
'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',
|
||||
|
||||
'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',
|
||||
|
||||
'no notifications' => 'no notifications',
|
||||
);
|
||||
|
|
|
@ -751,4 +751,5 @@ $LANG['pt'] = array(
|
|||
|
||||
'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',
|
||||
|
||||
'no notifications' => 'no notifications',
|
||||
);
|
||||
|
|
|
@ -752,4 +752,5 @@ $LANG['ru'] = array(
|
|||
|
||||
'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',
|
||||
|
||||
'no notifications' => 'no notifications',
|
||||
);
|
||||
|
|
|
@ -752,4 +752,5 @@ $LANG['tr'] = array(
|
|||
|
||||
'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',
|
||||
|
||||
'no notifications' => 'no notifications',
|
||||
);
|
||||
|
|
|
@ -752,4 +752,5 @@ $LANG['ua'] = array(
|
|||
|
||||
'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',
|
||||
|
||||
'no notifications' => 'no notifications',
|
||||
);
|
||||
|
|
|
@ -406,12 +406,16 @@ VE.notifications.get_list = function(){
|
|||
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 .mark-seen').click(function(event){
|
||||
/// TODO add token
|
||||
VE.notifications.mark_seen($(event.target).attr('id').replace("notification-", ""));
|
||||
// VE.notifications.delete($(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-", ""));
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -419,10 +423,12 @@ VE.notifications.get_list = function(){
|
|||
|
||||
|
||||
VE.notifications.delete = function(id){
|
||||
$('#notification-'+id).parents('li').remove();
|
||||
$('#notification-'+id).parents('li').hide();
|
||||
$.ajax({
|
||||
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){
|
||||
|
|
|
@ -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_EXECUTE_BY_OTHERS = '<?=__('execute/search by others')?>';
|
||||
|
||||
App.Constants.NOTIFICATIONS_EMPTY = '<?=__('no notifications')?>';
|
||||
|
|
|
@ -6,13 +6,18 @@ App.Templates.html = {
|
|||
WEB: {
|
||||
hint: [''],
|
||||
notification: [
|
||||
'<li class="~!:UNSEEN~!"><span class="mark-seen" id="notification-~!:ID~!"> </span>\
|
||||
<span class="title"><span class="icon ~!:TYPE~!"> </span>~!:TOPIC~!</span>\
|
||||
'<li class="~!:UNSEEN~!"><span class="unselectable mark-seen" id="notification-~!:ID~!"> </span>\
|
||||
<span class="title"><span class="unselectable icon ~!:TYPE~!"> </span>~!:TOPIC~!</span>\
|
||||
~!:NOTICE~!\
|
||||
</li>'
|
||||
],
|
||||
notification_empty: [
|
||||
'<li class="empty">\
|
||||
'+App.Constants.NOTIFICATIONS_EMPTY+'\
|
||||
</li>'
|
||||
]
|
||||
|
||||
},
|
||||
|
||||
// file manager
|
||||
//
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<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/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/jquery.finder.js?<?=JS_LATEST_UPDATE?>"></script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue