mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-26 21:01:30 +02:00
* Etemplate/historylog: Make history log resizable, base on popup window resize
This commit is contained in:
parent
d469a15ab1
commit
a7459e57b4
@ -341,7 +341,7 @@
|
|||||||
</box>
|
</box>
|
||||||
</template>
|
</template>
|
||||||
<template id="addressbook.edit.history" template="" lang="" group="0" version="1.9.001">
|
<template id="addressbook.edit.history" template="" lang="" group="0" version="1.9.001">
|
||||||
<historylog id="history" width="100%" overflow="hidden"/>
|
<historylog id="history" width="100%"/>
|
||||||
</template>
|
</template>
|
||||||
<template id="addressbook.edit" template="" lang="" group="0" version="1.9.004" class="addressbook_edit">
|
<template id="addressbook.edit" template="" lang="" group="0" version="1.9.004" class="addressbook_edit">
|
||||||
<template id="addressbook.editname"/>
|
<template id="addressbook.editname"/>
|
||||||
@ -395,7 +395,7 @@
|
|||||||
<description/>
|
<description/>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<tabbox id="tabs" span="all" width="100%" tab_height="200">
|
<tabbox id="tabs" span="all" width="100%" tab_height="250">
|
||||||
<tabs>
|
<tabs>
|
||||||
<tab id="general" label="Organisation"/>
|
<tab id="general" label="Organisation"/>
|
||||||
<tab id="home" label="Private" statustext="Home address, Birthday, ..."/>
|
<tab id="home" label="Private" statustext="Home address, Birthday, ..."/>
|
||||||
|
@ -241,7 +241,7 @@
|
|||||||
</grid>
|
</grid>
|
||||||
</template>
|
</template>
|
||||||
<template id="calendar.edit.history" template="" lang="" group="0" version="1.7.002">
|
<template id="calendar.edit.history" template="" lang="" group="0" version="1.7.002">
|
||||||
<historylog id="history" options="history_status" width="100%" overflow="hidden"/>
|
<historylog id="history" options="history_status" width="100%" />
|
||||||
</template>
|
</template>
|
||||||
<template id="calendar.delete_series" template="" lang="" group="0" version="1.7.003">
|
<template id="calendar.delete_series" template="" lang="" group="0" version="1.7.003">
|
||||||
<vbox>
|
<vbox>
|
||||||
|
@ -1268,9 +1268,6 @@ div.calendar {
|
|||||||
background-color: rgba(255, 221, 115, 0.1);
|
background-color: rgba(255, 221, 115, 0.1);
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
#calendar-edit #calendar-edit_calendar-edit-history {
|
|
||||||
max-width: 800px;
|
|
||||||
}
|
|
||||||
#calendar-edit #calendar-edit_calendar-edit-history tbody {
|
#calendar-edit #calendar-edit_calendar-edit-history tbody {
|
||||||
display: table-row-group;
|
display: table-row-group;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -680,7 +680,6 @@ div.calendar { position: relative; }
|
|||||||
/*// Historie*/
|
/*// Historie*/
|
||||||
|
|
||||||
#calendar-edit_calendar-edit-history{
|
#calendar-edit_calendar-edit-history{
|
||||||
max-width: 800px;
|
|
||||||
tbody{
|
tbody{
|
||||||
display: table-row-group;
|
display: table-row-group;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
*
|
*
|
||||||
* @augments et2_valueWidget
|
* @augments et2_valueWidget
|
||||||
*/
|
*/
|
||||||
var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],
|
var et2_historylog = et2_valueWidget.extend([et2_IDataProvider,et2_IResizeable],
|
||||||
{
|
{
|
||||||
createNamespace: true,
|
createNamespace: true,
|
||||||
attributes: {
|
attributes: {
|
||||||
@ -96,6 +96,15 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],
|
|||||||
// Bind the action to when the tab is selected
|
// Bind the action to when the tab is selected
|
||||||
var handler = function(e) {
|
var handler = function(e) {
|
||||||
e.data.div.unbind("click.history");
|
e.data.div.unbind("click.history");
|
||||||
|
// Bind on click tap, because we need to update history size
|
||||||
|
// after a rezise happend and history log was not the active tab
|
||||||
|
e.data.div.bind("click.history",{"history": e.data.history, div: tabs.tabData[i].flagDiv}, function(e){
|
||||||
|
e.data.history.dynheight.update(function(_w, _h)
|
||||||
|
{
|
||||||
|
e.data.history.dataview.resize(_w, _h);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
e.data.history.finishInit();
|
e.data.history.finishInit();
|
||||||
e.data.history.dynheight.update(function(_w, _h) {
|
e.data.history.dynheight.update(function(_w, _h) {
|
||||||
e.data.history.dataview.resize(_w, _h);
|
e.data.history.dataview.resize(_w, _h);
|
||||||
@ -546,5 +555,27 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],
|
|||||||
}
|
}
|
||||||
return columnName == 'note' || columnName == 'description' || (value && (value.length > 50 || value.match(/\n/g)));
|
return columnName == 'note' || columnName == 'description' || (value && (value.length > 50 || value.match(/\n/g)));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
resize: function (_height)
|
||||||
|
{
|
||||||
|
if (typeof this.options != 'undefined' && _height
|
||||||
|
&& typeof this.options.resize_ratio != 'undefined')
|
||||||
|
{
|
||||||
|
// apply the ratio
|
||||||
|
_height = (this.options.resize_ratio != '')? _height * this.options.resize_ratio: _height;
|
||||||
|
if (_height != 0)
|
||||||
|
{
|
||||||
|
// 250px is the default value for history widget
|
||||||
|
// if it's not loaded yet and window is resized
|
||||||
|
// then add the default height with excess_height
|
||||||
|
if (this.div.height() == 0) _height += 250;
|
||||||
|
this.div.height(this.div.height() + _height);
|
||||||
|
|
||||||
|
// trigger the history registered resize
|
||||||
|
// in order to update the height with new value
|
||||||
|
this.div.trigger('resize.' +this.options.value.app + this.options.value.id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
et2_register_widget(et2_historylog, ['historylog']);
|
et2_register_widget(et2_historylog, ['historylog']);
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
</grid>
|
</grid>
|
||||||
</template>
|
</template>
|
||||||
<template id="infolog.edit.history" template="" lang="" group="0" version="1.3.002">
|
<template id="infolog.edit.history" template="" lang="" group="0" version="1.3.002">
|
||||||
<historylog id="history" width="100%" overflow="hidden"/>
|
<historylog id="history" width="100%"/>
|
||||||
</template>
|
</template>
|
||||||
<template id="infolog.edit.details" template="" lang="" group="0" version="1.9.001">
|
<template id="infolog.edit.details" template="" lang="" group="0" version="1.9.001">
|
||||||
<grid width="100%">
|
<grid width="100%">
|
||||||
@ -214,7 +214,7 @@
|
|||||||
<description/>
|
<description/>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<tabbox id="tabs" class="et2_nowrap" span="all" width="100%" tab_height="246px">
|
<tabbox id="tabs" class="et2_nowrap" span="all" width="100%" tab_height="250px">
|
||||||
<tabs>
|
<tabs>
|
||||||
<tab id="description" label="Description" statustext="longer textual description"/>
|
<tab id="description" label="Description" statustext="longer textual description"/>
|
||||||
<tab id="details" label="Details" statustext="Location, priority , ..."/>
|
<tab id="details" label="Details" statustext="Location, priority , ..."/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user