Skip to content

Commit

Permalink
Adjust table elements for mobile view.
Browse files Browse the repository at this point in the history
- we changed table structure of `toolbar-wrapper` with `div`
- so we also need to consider mobile view
- made some neccessary changes for mobileview because of structure change in cool.html.m4 ('toolbar-wrapper')
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I91cd2c3ffbb0d625a78852398f6773136e9a7f6b
  • Loading branch information
Darshan-upadhyay1110 committed Mar 22, 2024
1 parent 74b3d2f commit d7668b7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
9 changes: 9 additions & 0 deletions browser/css/device-mobile.css
Expand Up @@ -83,6 +83,8 @@ div#w2ui-overlay-actionbar.w2ui-overlay{
height: 36px;
position: relative;
z-index: 1002;
display: flex;
align-items: center; /* Align items vertically */
}
#toolbar-hamburger.menuwizard-opened {
width: 36px;
Expand All @@ -109,6 +111,12 @@ div#w2ui-overlay-actionbar.w2ui-overlay{
position: relative;
z-index: 1003;
}
#toolbar-mobile-center-space {
display: flex;
justify-content: center;
align-items: center;
flex: 1;
}
.editmode-off {
background: url('images/lc_closedocmobile.svg') no-repeat center !important;
}
Expand Down Expand Up @@ -253,6 +261,7 @@ textarea.cool-annotation-textarea {
#toolbar-wrapper.mobile{
border-top: none;
z-index: auto !important;
flex-direction: row;
}

.insertshape-grid {
Expand Down
3 changes: 2 additions & 1 deletion browser/css/toolbar.css
Expand Up @@ -69,7 +69,8 @@
padding: 4px;
}
#InsertMode.insert-mode-false,
#PermissionMode.status-readonly-mode {
#PermissionMode.status-readonly-mode,
#MobilePermissionMode.status-readonly-mode {
background-color: var(--color-warning);
color: var(--color-primary-text);
border-radius: var(--border-radius);
Expand Down
3 changes: 3 additions & 0 deletions browser/html/cool.html.m4
Expand Up @@ -205,6 +205,9 @@ m4_ifelse(MOBILEAPP,[true],
<div id="toolbar-wrapper">
<div id="toolbar-logo"></div>
<div id="toolbar-mobile-back" class="editmode-off"></div>
<div id="toolbar-mobile-center-space">
<div id="MobilePermissionMode" class="cool-font status-readonly-mode" style="padding: 3px 10px; display: none"> Read-only</div>
</div>
<div id="toolbar-up"></div>
<div id="toolbar-hamburger">
<label class="main-menu-btn" for="main-menu-state">
Expand Down
9 changes: 2 additions & 7 deletions browser/src/control/Control.MobileTopBar.js
Expand Up @@ -205,9 +205,7 @@ L.Control.MobileTopBar = L.Control.extend({
toolbarDownButtons.forEach(function(id) {
toolbar.enable(id);
});
toolbar.hide('PermissionMode');
toolbar.hide('after-PermissionMode');
$('#tb_actionbar_item_before-PermissionMode').width('');
document.getElementById('MobilePermissionMode').style.display = 'none';
}
} else {
toolbar = w2ui['actionbar'];
Expand All @@ -217,10 +215,7 @@ L.Control.MobileTopBar = L.Control.extend({
});
toolbar.enable('comment_wizard');
if ($('#mobile-edit-button').is(':hidden')) {
toolbar.show('PermissionMode');
toolbar.show('after-PermissionMode');
$('#tb_actionbar_item_before-PermissionMode').width('50%');
$('#tb_actionbar_item_after-PermissionMode').width('50%');
document.getElementById('MobilePermissionMode').style.display = 'block';
}
}
}
Expand Down

0 comments on commit d7668b7

Please sign in to comment.