slightly change the way fullscreen works and bring it to mod mail

This commit is contained in:
Mario Vavti 2016-04-01 00:16:39 +02:00
parent 90a5ba01a3
commit 50d9b29347
5 changed files with 26 additions and 14 deletions

View File

@ -1,5 +1,4 @@
#chatroom-new,
#inline {
#chatroom-new {
display: none;
}
@ -31,7 +30,6 @@ aside {
}
#chatTopBar {
float: left;
width: 100%;
overflow-y: auto;
}

View File

@ -1454,13 +1454,15 @@ function zid(s) {
function makeFullScreen(full) {
if(typeof full=='undefined' || full == true) {
$('#fullscreen, aside').hide();
$('#inline').show();
$('#fullscreen-btn, header, nav, aside').hide();
$('main').css({'width': '100%', 'max-width': 'none'});
$('#inline-btn').show();
$('.generic-content-wrapper').addClass('fullscreen');
}
else {
$('#fullscreen, aside').show();
$('#inline').hide();
$('#fullscreen-btn, header, nav, aside').show();
$('main').removeAttr('style');
$('#inline-btn').hide();
$('.generic-content-wrapper').removeClass('fullscreen');
}
}

View File

@ -1519,19 +1519,27 @@ nav .dropdown-menu {
}
.generic-content-wrapper.fullscreen {
position: fixed;
position: absolute;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
border: 0px;
border-radius: 0px;
z-index: 10000;
}
.generic-content-wrapper.fullscreen .section-title-wrapper {
border-radius: 0px;
}
.generic-content-wrapper.fullscreen .section-content-wrapper {
border-radius: 0px;
}
#inline-btn {
display: none;
}
.chatroom-index-row:hover td,
.locs-index-row:hover td,
[id^="cloud-index-"]:hover td,

View File

@ -1,8 +1,8 @@
<div class="generic-content-wrapper">
<div class="section-title-wrapper">
<div class="pull-right">
<button id="fullscreen" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen(); adjustFullscreenTopBarHeight();"><i class="icon-resize-full"></i></button>
<button id="inline" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen(false); adjustInlineTopBarHeight();"><i class="icon-resize-small"></i></button>
<button id="fullscreen-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen(); adjustFullscreenTopBarHeight();"><i class="icon-resize-full"></i></button>
<button id="inline-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen(false); adjustInlineTopBarHeight();"><i class="icon-resize-small"></i></button>
{{if $is_owner}}
<form id="chat-destroy" method="post" action="chat">
<input type="hidden" name="room_name" value="{{$room_name}}" />

View File

@ -1,8 +1,12 @@
<div class="generic-content-wrapper">
<div class="section-title-wrapper">
{{if $mailbox == 'combined'}}
<a class="btn btn-xs btn-danger pull-right" href="mail/{{$mailbox}}/dropconv/{{$thread_id}}" onclick="return confirmDelete();"><i class="icon-trash"></i> {{$delete}}</a>
{{/if}}
<div class="pull-right">
<button id="fullscreen-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen();"><i class="icon-resize-full"></i></button>
<button id="inline-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen(false);"><i class="icon-resize-small"></i></button>
{{if $mailbox == 'combined'}}
<a class="btn btn-xs btn-danger" href="mail/{{$mailbox}}/dropconv/{{$thread_id}}" onclick="return confirmDelete();"><i class="icon-trash"></i> {{$delete}}</a>
{{/if}}
</div>
<h2>{{$prvmsg_header}}</h2>
<div class="clear"></div>
</div>