forked from extern/egroupware
Popup resize handler enhancement:
- Fix multi-line textbox resizing - Introduce tab_height to tab widget and remove extra height set on tab containers children - Let mail compose uses its own resize handling as it deals with some special resizing
This commit is contained in:
parent
42b0814429
commit
1869e94f84
@ -35,7 +35,6 @@ div#addressbook_view_sidebox img.photo {
|
||||
* new addressbook.edit
|
||||
*/
|
||||
div#addressbook-edit.et2_container {
|
||||
width: 842px;
|
||||
}
|
||||
div.addressbook_edit_general_picture {
|
||||
position: relative;
|
||||
|
@ -54,7 +54,7 @@
|
||||
</grid>
|
||||
</template>
|
||||
<template id="addressbook.edit.general" template="" lang="" group="0" version="1.9.003">
|
||||
<grid width="100%" height="200">
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column width="82"/>
|
||||
<column width="300"/>
|
||||
@ -162,7 +162,7 @@
|
||||
</grid>
|
||||
</template>
|
||||
<template id="addressbook.edit.details" template="" lang="" group="0" version="1.9.002">
|
||||
<grid width="100%" height="200" overflow="auto">
|
||||
<grid width="100%" overflow="auto">
|
||||
<columns>
|
||||
<column disabled="!@cat_tab=Tree"/>
|
||||
<column disabled="@cat_tab=Tree"/>
|
||||
@ -172,7 +172,7 @@
|
||||
<row valign="top">
|
||||
<tree-cat id="cat_id_tree" options="13,,width:99%"/>
|
||||
<listbox type="select-cat" id="cat_id" rows="013" options=",width:99%"/>
|
||||
<grid width="100%" height="200">
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column width="80"/>
|
||||
<column/>
|
||||
@ -192,7 +192,7 @@
|
||||
</row>
|
||||
<row valign="top">
|
||||
<description for="pubkey" value="Public key"/>
|
||||
<textbox multiline="true" id="pubkey" rows="4" class="et2_fullWidth"/>
|
||||
<textbox multiline="true" id="pubkey" rows="4" resize_ratio="0" class="et2_fullWidth"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
@ -201,7 +201,7 @@
|
||||
</grid>
|
||||
</template>
|
||||
<template id="addressbook.edit.home" template="" lang="" group="0" version="1.9.001">
|
||||
<grid width="100%" height="200">
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column width="82"/>
|
||||
<column width="300"/>
|
||||
@ -304,7 +304,7 @@
|
||||
</grid>
|
||||
</template>
|
||||
<template id="addressbook.edit.links" template="" lang="" group="0" version="1.9.001">
|
||||
<grid width="100%" height="200" overflow="auto">
|
||||
<grid width="100%" overflow="auto">
|
||||
<columns>
|
||||
<column/>
|
||||
</columns>
|
||||
@ -325,26 +325,26 @@
|
||||
</grid>
|
||||
</template>
|
||||
<template id="addressbook.edit.distribution_list" template="" lang="" group="0" version="1.9.001">
|
||||
<box height="200" width="100%" overflow="auto">
|
||||
<box width="100%" overflow="auto">
|
||||
<description id="distrib_lists" span="all"/>
|
||||
</box>
|
||||
</template>
|
||||
<template id="addressbook.edit.custom" template="" lang="" group="0" version="1.9.001">
|
||||
<box height="200" width="100%" overflow="auto">
|
||||
<box width="100%" overflow="auto">
|
||||
<customfields options="$cont[tid],$cont[no_private_cfs]"/>
|
||||
</box>
|
||||
</template>
|
||||
<template id="addressbook.edit.custom_private" template="" lang="" group="0" version="1.9.001">
|
||||
<box height="200" width="100%" overflow="auto">
|
||||
<box width="100%" overflow="auto">
|
||||
<customfields id="private_cfs" options="$cont[tid],1"/>
|
||||
</box>
|
||||
</template>
|
||||
<template id="addressbook.edit.history" template="" lang="" group="0" version="1.9.001">
|
||||
<historylog id="history" height="200" width="100%" overflow="hidden"/>
|
||||
<historylog id="history" width="100%" overflow="hidden"/>
|
||||
</template>
|
||||
<template id="addressbook.edit" template="" lang="" group="0" version="1.9.004" class="addressbook_edit">
|
||||
<template id="addressbook.editname"/>
|
||||
<grid class="addressbook_edit" border="1">
|
||||
<grid class="addressbook_edit" border="1" width="100%">
|
||||
<columns>
|
||||
<column width="90"/>
|
||||
<column width="90"/>
|
||||
@ -394,7 +394,7 @@
|
||||
<description/>
|
||||
</row>
|
||||
<row>
|
||||
<tabbox id="tabs" span="all" width="100%">
|
||||
<tabbox id="tabs" span="all" width="100%" tab_height="200">
|
||||
<tabs>
|
||||
<tab id="general" label="Organisation"/>
|
||||
<tab id="home" label="Private" statustext="Home address, Birthday, ..."/>
|
||||
|
@ -46,9 +46,6 @@ div#addressbook_view_sidebox img.photo {
|
||||
/**
|
||||
* new addressbook.edit
|
||||
*/
|
||||
div#addressbook-edit.et2_container {
|
||||
width: 842px;
|
||||
}
|
||||
div.addressbook_edit_general_picture {
|
||||
position: relative;
|
||||
}
|
||||
@ -522,9 +519,6 @@ div#addressbook-index img.iphoto {
|
||||
# #
|
||||
# #
|
||||
##############################################*/
|
||||
div#addressbook-edit.et2_container {
|
||||
width: 842px;
|
||||
}
|
||||
div.addressbook_edit_general_picture img {
|
||||
top: -4px;
|
||||
width: 70px;
|
||||
|
@ -394,7 +394,6 @@ button#tracker-index-addressbook_add{
|
||||
##############################################*/
|
||||
|
||||
div#addressbook-edit.et2_container {
|
||||
width: 842px;
|
||||
}
|
||||
|
||||
// person image
|
||||
|
@ -985,12 +985,11 @@ var et2_grid = et2_DOMWidget.extend([et2_IDetachedDOM, et2_IAligned, et2_IResize
|
||||
|
||||
resize: function (_height)
|
||||
{
|
||||
if (typeof this.options.resize_ratio != 'undefined'
|
||||
&&this.options.resize_ratio !='' && _height)
|
||||
if (typeof this.options != 'undefined' && _height)
|
||||
{
|
||||
// apply the ratio
|
||||
_height *= this.options.resize_ratio;
|
||||
//this.table.height(this.table.height() + _height);
|
||||
_height = (this.options.resize_ratio != '')? _height * this.options.resize_ratio: _height;
|
||||
//if (_height != 0) this.table.height(this.table.height() + _height );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -35,6 +35,11 @@ var et2_tabbox = et2_valueWidget.extend([et2_IInput,et2_IResizeable],
|
||||
'name': 'Add tabs',
|
||||
'default': false,
|
||||
'description': 'Set to true if tabs should be added to tabs from read from template, default false if not'
|
||||
},
|
||||
tab_height: {
|
||||
name: 'Tabs innerHeight',
|
||||
default: '',
|
||||
description: 'Set the innerHeight for the tab content'
|
||||
}
|
||||
},
|
||||
|
||||
@ -415,6 +420,12 @@ var et2_tabbox = et2_valueWidget.extend([et2_IInput,et2_IResizeable],
|
||||
}
|
||||
},
|
||||
|
||||
set_tab_height: function (_height)
|
||||
{
|
||||
this.tab_height = _height;
|
||||
this.tabContainer.css("height", _height);
|
||||
},
|
||||
|
||||
set_height: function(_value) {
|
||||
this.height = _value;
|
||||
|
||||
@ -451,7 +462,12 @@ var et2_tabbox = et2_valueWidget.extend([et2_IInput,et2_IResizeable],
|
||||
{
|
||||
if(_height)
|
||||
{
|
||||
this.tabContainer.height(this.tabContainer.height() + _height);
|
||||
this.set_height(this.tabContainer.height() + _height);
|
||||
}
|
||||
//Set the height of tabs with the heighest height
|
||||
else if(_height === 0)
|
||||
{
|
||||
this.set_height(this.tabContainer.height());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -235,13 +235,11 @@ var et2_textbox = et2_inputWidget.extend([et2_IResizeable],
|
||||
|
||||
resize: function (_height)
|
||||
{
|
||||
if (typeof this.options.resize_ratio != 'undefined'
|
||||
&&this.options.resize_ratio !='' && _height)
|
||||
if (_height && this.options.multiline)
|
||||
{
|
||||
// apply the ratio
|
||||
_height *= this.options.resize_ratio;
|
||||
|
||||
this.input.height(this.input.height() + _height);
|
||||
_height = (this.options.resize_ratio != '')? _height * this.options.resize_ratio: _height;
|
||||
if (_height != 0) this.input.height(this.input.height() + _height);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -106,12 +106,14 @@ etemplate2.prototype.templates = {};
|
||||
/**
|
||||
* Calls the resize event of all widgets
|
||||
*/
|
||||
etemplate2.prototype.resize = function()
|
||||
etemplate2.prototype.resize = function(e)
|
||||
{
|
||||
if (this.widgetContainer)
|
||||
{
|
||||
//Calculate the excess height
|
||||
var excess_height = egw(window).is_popup()? $j(window).height() - $j('.et2_container').height() - 20: false;
|
||||
var excess_height = egw(window).is_popup()? $j(window).height() - $j('.et2_container').height() - 26: false;
|
||||
if (typeof e != 'undefined' && e.type !== 'resize') excess_height = 0;
|
||||
|
||||
// Call the "resize" event of all functions which implement the
|
||||
// "IResizeable" interface
|
||||
this.widgetContainer.iterateOver(function(_widget) {
|
||||
@ -395,7 +397,7 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback)
|
||||
this.widgetContainer.loadingFinished(deferred);
|
||||
|
||||
// Connect to the window resize event
|
||||
$j(window).on("resize."+this.uniqueId, this, function(e) {e.data.resize();});
|
||||
$j(window).on("resize."+this.uniqueId, this, function(e) {e.data.resize(e);});
|
||||
|
||||
// Insert the document fragment to the DOM Container
|
||||
this.DOMContainer.appendChild(frag);
|
||||
|
@ -5,7 +5,7 @@
|
||||
<textbox multiline="true" id="info_des" no_lang="1" width="99%" height="243px"/>
|
||||
</template>
|
||||
<template id="infolog.edit.links" template="" lang="" group="0" version="1.3.001">
|
||||
<grid width="100%" height="245" overflow="auto">
|
||||
<grid width="100%" overflow="auto">
|
||||
<columns>
|
||||
<column width="99%"/>
|
||||
<column/>
|
||||
@ -27,7 +27,7 @@
|
||||
</grid>
|
||||
</template>
|
||||
<template id="infolog.edit.project" template="" lang="" group="0" version="1.5.004">
|
||||
<grid width="100%" height="245">
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column width="80" class="infolog_normalWrap"/>
|
||||
<column width="190"/>
|
||||
@ -67,7 +67,7 @@
|
||||
</grid>
|
||||
</template>
|
||||
<template id="infolog.edit.customfields" template="" lang="" group="0" version="1.0.1.001">
|
||||
<grid width="100%" height="245" class="row_on" spacing="0" padding="0" overflow="auto">
|
||||
<grid width="100%" class="row_on" spacing="0" padding="0" overflow="auto">
|
||||
<columns>
|
||||
<column/>
|
||||
</columns>
|
||||
@ -82,10 +82,10 @@
|
||||
</grid>
|
||||
</template>
|
||||
<template id="infolog.edit.history" template="" lang="" group="0" version="1.3.002">
|
||||
<historylog id="history" height="245" width="100%" overflow="hidden"/>
|
||||
<historylog id="history" width="100%" overflow="hidden"/>
|
||||
</template>
|
||||
<template id="infolog.edit.details" template="" lang="" group="0" version="1.9.001">
|
||||
<grid height="245" width="100%">
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column width="46%"/>
|
||||
<column width="4%"/>
|
||||
@ -212,8 +212,8 @@
|
||||
<date-time statustext="til when should the ToDo or Phonecall be finished" id="info_enddate" class="et2_fullWidth" span="4"/>
|
||||
<description/>
|
||||
</row>
|
||||
<row height="250">
|
||||
<tabbox id="tabs" class="et2_nowrap" span="all" width="100%">
|
||||
<row>
|
||||
<tabbox id="tabs" class="et2_nowrap" span="all" width="100%" tab_height="246px">
|
||||
<tabs>
|
||||
<tab id="description" label="Description" statustext="longer textual description"/>
|
||||
<tab id="details" label="Details" statustext="Location, priority , ..."/>
|
||||
|
@ -37,7 +37,7 @@
|
||||
</menulist>
|
||||
</description>
|
||||
</hbox>
|
||||
<grid width="100%">
|
||||
<grid width="100%" resize_ratio="0">
|
||||
<columns>
|
||||
<column widtd="10%"/>
|
||||
<column width="84%"/>
|
||||
@ -109,7 +109,7 @@
|
||||
<htmlarea span="all" name="mail_htmltext" id="mail_htmltext" imageDataUrl="true" expand_toolbar="true" height="478px" width="100%" />
|
||||
</hbox>
|
||||
<hbox disabled="@is_html" class="mailComposeBody">
|
||||
<textbox multiline="true" rows="40" cols="120" width="100%" span="all" no_lang="1" name="mail_plaintext" id="mail_plaintext"/>
|
||||
<textbox multiline="true" rows="40" cols="120" width="100%" span="all" no_lang="1" name="mail_plaintext" id="mail_plaintext" resize_ratio="0"/>
|
||||
</hbox>
|
||||
<vbox class="et2_file mailUploadSection" disabled="@no_griddata">
|
||||
<hbox>
|
||||
@ -117,7 +117,7 @@
|
||||
<date id="expiration" label="Expiration" blur="EPL only" data_format="Y-m-d"/>
|
||||
<passwd id="password" blur="password protect" statustext="Only makes sense, if you transport password through a different channel / outside of this mail to recipients!"/>
|
||||
</hbox>
|
||||
<grid id="attachments" width="100%" maxheight="165" class="egwGridView_grid">
|
||||
<grid id="attachments" width="100%" maxheight="165" class="egwGridView_grid" resize_ratio="0">
|
||||
<columns>
|
||||
<column disabled="!@showtempname" width="10%"/>
|
||||
<column width="85%"/>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!-- $Id$ -->
|
||||
<overlay>
|
||||
<template id="timesheet.edit.general" template="" lang="" group="0" version="1.7.002">
|
||||
<grid width="100%" height="165">
|
||||
<grid width="100%" >
|
||||
<columns>
|
||||
<column width="72"/>
|
||||
<column width="192"/>
|
||||
@ -53,10 +53,10 @@
|
||||
</grid>
|
||||
</template>
|
||||
<template id="timesheet.edit.notes" template="" lang="" group="0" version="1.5.001">
|
||||
<textbox multiline="true" height="120" id="ts_description" rows="9" cols="70" class="et2_fullWidth"/>
|
||||
<textbox multiline="true" id="ts_description" rows="9" cols="70" class="et2_fullWidth"/>
|
||||
</template>
|
||||
<template id="timesheet.edit.links" template="" lang="" group="0" version="0.1.001">
|
||||
<grid width="100%" height="165" overflow="auto">
|
||||
<grid width="100%" overflow="auto">
|
||||
<columns>
|
||||
<column width="99%"/>
|
||||
</columns>
|
||||
@ -77,12 +77,12 @@
|
||||
</grid>
|
||||
</template>
|
||||
<template id="timesheet.edit.customfields" template="" lang="" group="0" version="1.5.001">
|
||||
<box height="165" width="100%" overflow="auto">
|
||||
<customfields class="et2_fullWidth" height="165"/>
|
||||
<box width="100%" overflow="auto">
|
||||
<customfields class="et2_fullWidth"/>
|
||||
</box>
|
||||
</template>
|
||||
<template id="timesheet.edit.history" template="" lang="" group="0" version="1.7.001">
|
||||
<box height="165" width="100%" overflow="auto">
|
||||
<box width="100%" overflow="auto">
|
||||
<historylog id="history"/>
|
||||
</box>
|
||||
</template>
|
||||
@ -123,7 +123,7 @@
|
||||
<description/>
|
||||
</row>
|
||||
<row>
|
||||
<tabbox id="tabs" class="et2_nowrap" width="100%" span="all">
|
||||
<tabbox id="tabs" class="et2_nowrap" width="100%" span="all" tab_height="165">
|
||||
<tabs>
|
||||
<tab id="notes" label="Description"/>
|
||||
<tab id="general" label="Details"/>
|
||||
|
Loading…
Reference in New Issue
Block a user