forked from extern/egroupware
Infolog: Move timestamper & encrypt buttons into tabs using slot and parentID
Also, fix parentId was inconsistently applied
This commit is contained in:
parent
f85de279c6
commit
9db38979ef
@ -144,7 +144,7 @@ const Et2WidgetMixin = <T extends Constructor>(superClass : T) =>
|
||||
* Widget ID of another node to insert this node into instead of the normal location
|
||||
* This isn't a normal property...
|
||||
*/
|
||||
parentId: {type: String},
|
||||
parentId: {type: String, noAccessor: true},
|
||||
|
||||
/**
|
||||
* Tooltip which is shown for this element on hover
|
||||
@ -911,15 +911,27 @@ const Et2WidgetMixin = <T extends Constructor>(superClass : T) =>
|
||||
*/
|
||||
set parentId(parent : string | Element)
|
||||
{
|
||||
if(typeof parent === "string")
|
||||
this.__parentId = parent;
|
||||
|
||||
this.updateComplete.then(() =>
|
||||
{
|
||||
parent = document.querySelector("#" + parent);
|
||||
}
|
||||
if(parent)
|
||||
{
|
||||
parent.append(<Node><unknown>this);
|
||||
this._parent_node = parent;
|
||||
}
|
||||
if(!this.__parentId)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
let parent = document.querySelector("#" + this.__parentId) || this.__parentId;
|
||||
if(parent && parent instanceof Element)
|
||||
{
|
||||
parent.append(<Node><unknown>this);
|
||||
this._parent_node = parent;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
get parentId()
|
||||
{
|
||||
return this.__parentId;
|
||||
}
|
||||
|
||||
setParent(new_parent : Et2WidgetClass | et2_widget)
|
||||
|
@ -43,51 +43,36 @@ tr.infolog_rowHasParent > td:first-child {
|
||||
.et2_nextmatch .egwGridView_grid tr td div.et2_vbox .infoDes a{
|
||||
display: inline-table;
|
||||
}
|
||||
|
||||
/* break in words if necessary for description */
|
||||
#infolog-index_nm div.infoDes > span{
|
||||
overflow-wrap: break-word;
|
||||
#infolog-index_nm div.infoDes > span {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
/* Put line break for the first column*/
|
||||
#infolog-index .egwGridView_grid .et2_hbox.et2_box_widget.infolog_CompletedClmn {
|
||||
white-space: normal;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
button.infologExtraButton {
|
||||
background-position: center;
|
||||
background-size: 16px;
|
||||
padding: 0px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
button.infologExtraButton:hover {
|
||||
background-size: 16px;
|
||||
/* Right-align extra buttons in tab */
|
||||
.infologExtraButton {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
#infolog-edit .et2_toolbar {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tab_toolbar {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
right: 0;
|
||||
z-index: 10000; /* otherwise et2-tabs gets our clicks! */
|
||||
}
|
||||
|
||||
.tab_toolbar > button, .tab_toolbar > et2-button {
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
td.infologTimestamp {
|
||||
position: relative;
|
||||
.infologExtraButton ~ .infologExtraButton {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div#infolog-edit_infolog-edit-description {
|
||||
height: 100%;
|
||||
}
|
||||
div#infolog-edit_infolog-edit-description iframe {height: calc(100% - 1em) !important;}
|
||||
|
||||
div#infolog-edit_infolog-edit-description iframe {
|
||||
height: calc(100% - 1em) !important;
|
||||
}
|
||||
|
||||
#infolog-edit_info_responsible + .chzn-container .chzn-results {
|
||||
max-height: 150px;
|
||||
max-height: 150px;
|
||||
}
|
||||
|
||||
#infolog-index #infolog-index_nm .egwGridView_scrollarea table.egwGridView_grid ul.et2_link_string li.et2_link {
|
||||
|
@ -183,9 +183,15 @@
|
||||
<row class="et2_toolbar">
|
||||
<description id="spacer" span="5"/>
|
||||
<hbox class="tab_toolbar">
|
||||
<timestamper statustext="Insert timestamp into description field" id="timestamp" class="infologExtraButton infologTimestamp" target="info_des"/>
|
||||
<buttononly statustext="Encrypt description" id="encrypt" class="infologExtraButton infologEncrypt" background_image="1" image="lock" onclick="app.infolog.toggleEncrypt"/>
|
||||
</hbox>
|
||||
|
||||
<timestamper parentId="infolog-edit_tabs" slot="nav"
|
||||
statustext="Insert timestamp into description field" id="timestamp"
|
||||
class="infologExtraButton infologTimestamp" target="info_des"/>
|
||||
<buttononly parentId="infolog-edit_tabs" slot="nav" statustext="Encrypt description"
|
||||
id="encrypt"
|
||||
class="infologExtraButton infologEncrypt" background_image="1" image="lock"
|
||||
onclick="app.infolog.toggleEncrypt"/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<tabbox id="tabs" span="all" width="100%" tab_height="350px">
|
||||
@ -199,14 +205,14 @@
|
||||
</tabs>
|
||||
<tabpanels>
|
||||
<template id="infolog.edit.description"/>
|
||||
<template id="infolog.edit.details"/>
|
||||
<template id="infolog.edit.links"/>
|
||||
<template id="infolog.edit.project"/>
|
||||
<template id="infolog.edit.customfields"/>
|
||||
<template id="infolog.edit.history"/>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
</row>
|
||||
<template id="infolog.edit.details"/>
|
||||
<template id="infolog.edit.links"/>
|
||||
<template id="infolog.edit.project"/>
|
||||
<template id="infolog.edit.customfields"/>
|
||||
<template id="infolog.edit.history"/>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
</row>
|
||||
<row class="dialogOperators">
|
||||
<description value="Status" for="info_status"/>
|
||||
<select class="et2_fullWidth" statustext="@status_help" id="info_status" onchange="app.infolog.statusChanged"/>
|
||||
|
Loading…
Reference in New Issue
Block a user