Implement widget historylog resize handler and fix historylog template in all apps

This commit is contained in:
Hadi Nategh 2015-02-25 16:30:49 +00:00
parent 7d7430c0a6
commit 32596fb0e0
7 changed files with 21 additions and 13 deletions

View File

@ -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, ..."/>

View File

@ -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>

View File

@ -1270,9 +1270,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%;

View File

@ -682,7 +682,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%;

View File

@ -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: {
@ -480,5 +480,19 @@ 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)
{
this.div.height(this.div.height() + _height);
}
}
}
}); });
et2_register_widget(et2_historylog, ['historylog']); et2_register_widget(et2_historylog, ['historylog']);

View File

@ -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 , ..."/>

View File

@ -83,9 +83,7 @@
</box> </box>
</template> </template>
<template id="timesheet.edit.history" template="" lang="" group="0" version="1.7.001"> <template id="timesheet.edit.history" template="" lang="" group="0" version="1.7.001">
<box width="100%" overflow="auto">
<historylog id="history"/> <historylog id="history"/>
</box>
</template> </template>
<template id="timesheet.edit" template="" lang="" group="0" version="1.9.002"> <template id="timesheet.edit" template="" lang="" group="0" version="1.9.002">
<grid width="100%"> <grid width="100%">