dashboard improved

This commit is contained in:
Dro1d.Ru 2018-06-06 18:11:27 +05:00
parent fe12f0cba7
commit f5f8a69c25
9 changed files with 58 additions and 33 deletions

View file

@ -220,7 +220,7 @@ textarea {
background: rgba(45, 45, 45, .2);
border-radius: 30px;
}
.list .list-info-wrapper span {
.list .list-info-wrapper .list-info {
white-space: nowrap;
}
.pagination > li > a,

View file

@ -212,17 +212,18 @@
var last = $('.dashboard-notification:last-child');
$('body').append('<div class="dashboard-notification"><span class="dashboard-notification-close glyphicon glyphicon-remove-sign"></span>'+message+'</div>');
var t = 60;
if ($(last).length>0) {
t = $(last).offset().top + $(last).outerHeight() + 10;
}
var dn = $('.dashboard-notification:last-child');
var t = $(window).height() - $(dn).outerHeight() - 40;
if ($(last).length>0) {
t = $(last).offset().top - $(dn).outerHeight() - 10;
}
$(dn).css({
'top': t,
'left': ($(window).width() - $(dn).outerWidth()) / 2
//'left': $(window).width() - $(dn).outerWidth() - $('#dashboard-sidebar').outerWidth() - 20
}).fadeIn(1000);
//'left': ($(window).width() - $(dn).outerWidth()) / 2
'left': $(window).width() - $(dn).outerWidth() - 20
});
$(dn).click(function() {
desk_call(callback);
@ -242,17 +243,23 @@
};
dashboard_notification_update_position = function() {
var t = 60;
var t = null;
$('.dashboard-notification').each(function(){
if (t===null) {
t = $(window).height() - $(this).outerHeight() - 40;
} else {
t -= ($(this).outerHeight() + 10);
}
$(this).css({
'top': t,
'left': ($(window).width() - $('.dashboard-notification').outerWidth()) / 2
//'left': ($(window).width() - $('.dashboard-notification').outerWidth()) / 2
'left': $(window).width() - $(this).outerWidth() - 20
});
t += $(this).outerHeight() + 10;
});
};
dashboard_init_background_setter = function(callback) {
if (typeof desk_file_selector == "undefined") return;
var setter = $('#dashboard-background-setter');
if (!$(setter).length) return;
$(setter).show().tooltip();

View file

@ -22,10 +22,10 @@ class Index extends Dash\Controller {
$script .= 'for (var i=0; i<response.notifications.length; i++){';
$script .= 'window.setTimeout(zira_bind({message:response.notifications[i].message,callback:response.notifications[i].callback},function(){';
$script .= 'dashboard_notification(this.message,this.callback);';
$script .= '}), 500+500*i);';
$script .= '}), 5+200*i);';
$script .= '}';
$script .= '},\'json\');';
$script .= '}, 3000);';
$script .= '}, 1000);';
$script .= ' });';
$script .= Zira\Helper::tag_close('script');
//Zira\View::addHTML($script, Zira\View::VAR_HEAD_BOTTOM);

View file

@ -789,10 +789,12 @@ body.dashboard #dashboard-sidebar {
z-index: 2;
}
body.dashboard #remote-clock-wrapper {
display: none;
display: block;
width: 230px;
height: 230px;
margin: 25px 0px 25px 25px;
opacity: 0;
transition: opacity 1s ease;
}
body.dashboard #remote-clock-wrapper canvas {
display: block;
@ -834,6 +836,8 @@ body.dashboard #memory-stick-wrapper {
height: 300px;
background: url(../images/dash-memo-stick.png) no-repeat 0 0;
z-index: 2;
opacity: 0;
transition: opacity 1s ease;
}
body.dashboard #memory-stick-wrapper textarea {
border: none;
@ -856,8 +860,9 @@ body.dashboard #memory-stick-save span {
cursor: pointer;
}
body.dashboard .dashboard-notification {
display: none;
display: block;
position: fixed;
left: 9999px;
width: 500px;
margin: 0px auto;
font-size: 16px;
@ -868,8 +873,8 @@ body.dashboard .dashboard-notification {
box-shadow: 0px 0px 2px #7F6A8F;
cursor: pointer;
text-shadow: 1px 1px 0px #3E354E;
transition: top .5s ease;
z-index: 3;
transition: all 1s ease;
z-index: 99999;
}
body.dashboard .dashboard-notification .dashboard-notification-close {
float: right;

View file

@ -30,13 +30,14 @@
<script type="text/javascript">
(function($) {
$(document).ready(function(){
$('#remote-clock-wrapper').show();
$('#remote-clock-wrapper').css('opacity',1);
var date = new Date();
dashboard_remote_clock.start_timestamp = Math.floor(date.getTime() / 1000);
dashboard_remote_clock.remote_timestamp = <?php echo Zira\Datetime::getOffsetTime(); ?>;
dashboard_clock();
window.setInterval(dashboard_clock, 1000);
$('#memory-stick-wrapper').css('opacity',1);
$('textarea[name=memory-stick]').keydown(function(){
$('#memory-stick-save').show();
});

View file

@ -802,10 +802,12 @@ body.dashboard #dashboard-sidebar {
z-index: 2;
}
body.dashboard #remote-clock-wrapper {
display: none;
display: block;
width: 230px;
height: 230px;
margin: 25px 0px 25px 25px;
opacity: 0;
transition: opacity 1s ease;
}
body.dashboard #remote-clock-wrapper canvas {
display: block;
@ -847,6 +849,8 @@ body.dashboard #memory-stick-wrapper {
height: 300px;
background: url(../images/dash-memo-stick.png) no-repeat 0 0;
z-index: 2;
opacity: 0;
transition: opacity 1s ease;
}
body.dashboard #memory-stick-wrapper textarea {
border: none;
@ -869,8 +873,9 @@ body.dashboard #memory-stick-save span {
cursor: pointer;
}
body.dashboard .dashboard-notification {
display: none;
display: block;
position: fixed;
left: 9999px;
width: 500px;
margin: 0px auto;
font-size: 16px;
@ -881,8 +886,8 @@ body.dashboard .dashboard-notification {
box-shadow: 0px 0px 2px #7F6A8F;
cursor: pointer;
text-shadow: 1px 1px 0px #3E354E;
transition: top .5s ease;
z-index: 3;
transition: all 1s ease;
z-index: 99999;
}
body.dashboard .dashboard-notification .dashboard-notification-close {
float: right;
@ -970,8 +975,8 @@ body.dashboard .tooltip-inner {
transition: background .2s linear;
}
.pretty-checkbox.active .pretty-checkbox-line {
border-color: #7e1dcc;
background: #a034d0;
border-color: #775ad7;
background: #8872ad;
}
.pretty-checkbox .pretty-checkbox-circle {
position: absolute;
@ -1014,8 +1019,8 @@ body.dashboard .tooltip-inner {
transition: background-color .2s linear;
}
.pretty-checkbox-inline.active .pretty-checkbox-circle {
border-color: #7e1dcc;
background-color: #a034d0;
border-color: #775ad7;
background-color: #8872ad;
}
@media (min-width: 768px) {

View file

@ -30,13 +30,14 @@
<script type="text/javascript">
(function($) {
$(document).ready(function(){
$('#remote-clock-wrapper').show();
$('#remote-clock-wrapper').css('opacity',1);
var date = new Date();
dashboard_remote_clock.start_timestamp = Math.floor(date.getTime() / 1000);
dashboard_remote_clock.remote_timestamp = <?php echo Zira\Datetime::getOffsetTime(); ?>;
dashboard_clock();
window.setInterval(dashboard_clock, 1000);
$('#memory-stick-wrapper').css('opacity',1);
$('textarea[name=memory-stick]').keydown(function(){
$('#memory-stick-save').show();
});

View file

@ -789,10 +789,12 @@ body.dashboard #dashboard-sidebar {
z-index: 2;
}
body.dashboard #remote-clock-wrapper {
display: none;
display: block;
width: 230px;
height: 230px;
margin: 25px 0px 25px 25px;
opacity: 0;
transition: opacity 1s ease;
}
body.dashboard #remote-clock-wrapper canvas {
display: block;
@ -834,6 +836,8 @@ body.dashboard #memory-stick-wrapper {
height: 300px;
background: url(../images/dash-memo-stick.png) no-repeat 0 0;
z-index: 2;
opacity: 0;
transition: opacity 1s ease;
}
body.dashboard #memory-stick-wrapper textarea {
border: none;
@ -856,8 +860,9 @@ body.dashboard #memory-stick-save span {
cursor: pointer;
}
body.dashboard .dashboard-notification {
display: none;
display: block;
position: fixed;
left: 9999px;
width: 500px;
margin: 0px auto;
font-size: 16px;
@ -868,8 +873,8 @@ body.dashboard .dashboard-notification {
box-shadow: 0px 0px 2px #7F6A8F;
cursor: pointer;
text-shadow: 1px 1px 0px #3E354E;
transition: top .5s ease;
z-index: 3;
transition: all 1s ease;
z-index: 99999;
}
body.dashboard .dashboard-notification .dashboard-notification-close {
float: right;

View file

@ -30,13 +30,14 @@
<script type="text/javascript">
(function($) {
$(document).ready(function(){
$('#remote-clock-wrapper').show();
$('#remote-clock-wrapper').css('opacity',1);
var date = new Date();
dashboard_remote_clock.start_timestamp = Math.floor(date.getTime() / 1000);
dashboard_remote_clock.remote_timestamp = <?php echo Zira\Datetime::getOffsetTime(); ?>;
dashboard_clock();
window.setInterval(dashboard_clock, 1000);
$('#memory-stick-wrapper').css('opacity',1);
$('textarea[name=memory-stick]').keydown(function(){
$('#memory-stick-save').show();
});