mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Etemplate: Fix nextmatch printing failed after TypeScript conversion
This commit is contained in:
parent
a2d9e8cae0
commit
c04915ae09
@ -76,6 +76,7 @@ var et2_INextmatchSortable = "et2_INextmatchSortable";
|
|||||||
function implements_et2_INextmatchSortable(obj) {
|
function implements_et2_INextmatchSortable(obj) {
|
||||||
return implements_methods(obj, ["setSortmode"]);
|
return implements_methods(obj, ["setSortmode"]);
|
||||||
}
|
}
|
||||||
|
;
|
||||||
/**
|
/**
|
||||||
* Class which implements the "nextmatch" XET-Tag
|
* Class which implements the "nextmatch" XET-Tag
|
||||||
*
|
*
|
||||||
@ -104,7 +105,13 @@ var et2_nextmatch = /** @class */ (function (_super) {
|
|||||||
*/
|
*/
|
||||||
function et2_nextmatch(_parent, _attrs, _child) {
|
function et2_nextmatch(_parent, _attrs, _child) {
|
||||||
var _this = _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_nextmatch._attributes, _child || {})) || this;
|
var _this = _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_nextmatch._attributes, _child || {})) || this;
|
||||||
_this.activeFilters = { col_filter: {} };
|
// When printing, we change the layout around. Keep some values so it can be restored after
|
||||||
|
_this.print = {
|
||||||
|
old_height: 0,
|
||||||
|
row_selector: '',
|
||||||
|
orientation_style: null
|
||||||
|
};
|
||||||
|
_this.activeFilters = {col_filter: {}};
|
||||||
_this.columns = [];
|
_this.columns = [];
|
||||||
// keeps sorted columns
|
// keeps sorted columns
|
||||||
_this.sortedColumnsList = [];
|
_this.sortedColumnsList = [];
|
||||||
@ -1116,15 +1123,15 @@ var et2_nextmatch = /** @class */ (function (_super) {
|
|||||||
});
|
});
|
||||||
autoRefresh_1.set_value(this._get_autorefresh());
|
autoRefresh_1.set_value(this._get_autorefresh());
|
||||||
autoRefresh_1.set_statustext(egw.lang("Automatically refresh list"));
|
autoRefresh_1.set_statustext(egw.lang("Automatically refresh list"));
|
||||||
var defaultCheck = et2_createWidget("select", { "empty_label": "Preference" }, this);
|
var defaultCheck = et2_createWidget("select", {"empty_label": "Preference"}, this);
|
||||||
defaultCheck.set_id('nm_col_preference');
|
defaultCheck.set_id('nm_col_preference');
|
||||||
defaultCheck.set_select_options({
|
defaultCheck.set_select_options({
|
||||||
'default': { label: 'Default', title: 'Set these columns as the default' },
|
'default': {label: 'Default', title: 'Set these columns as the default'},
|
||||||
'reset': { label: 'Reset', title: "Reset all user's column preferences" },
|
'reset': {label: 'Reset', title: "Reset all user's column preferences"},
|
||||||
'force': { label: 'Force', title: 'Force column preference so users cannot change it' }
|
'force': {label: 'Force', title: 'Force column preference so users cannot change it'}
|
||||||
});
|
});
|
||||||
defaultCheck.set_value(this.options.settings.columns_forced ? 'force' : '');
|
defaultCheck.set_value(this.options.settings.columns_forced ? 'force' : '');
|
||||||
var okButton = et2_createWidget("buttononly", { "background_image": true, image: "check" }, this);
|
var okButton = et2_createWidget("buttononly", {"background_image": true, image: "check"}, this);
|
||||||
okButton.set_label(this.egw().lang("ok"));
|
okButton.set_label(this.egw().lang("ok"));
|
||||||
okButton.onclick = function () {
|
okButton.onclick = function () {
|
||||||
// Update visibility
|
// Update visibility
|
||||||
|
@ -79,14 +79,24 @@ function implements_et2_INextmatchHeader(obj : et2_widget)
|
|||||||
|
|
||||||
export interface et2_INextmatchSortable
|
export interface et2_INextmatchSortable
|
||||||
{
|
{
|
||||||
setSortmode(_sort_mode) : void
|
setSortmode(_sort_mode): void
|
||||||
}
|
}
|
||||||
|
|
||||||
var et2_INextmatchSortable = "et2_INextmatchSortable";
|
var et2_INextmatchSortable = "et2_INextmatchSortable";
|
||||||
function implements_et2_INextmatchSortable(obj : et2_widget)
|
|
||||||
|
function implements_et2_INextmatchSortable(obj: et2_widget)
|
||||||
{
|
{
|
||||||
return implements_methods(obj, ["setSortmode"]);
|
return implements_methods(obj, ["setSortmode"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For holding settings while whe print
|
||||||
|
interface PrintSettings
|
||||||
|
{
|
||||||
|
old_height: number,
|
||||||
|
row_selector: string,
|
||||||
|
orientation_style: HTMLStyleElement
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class which implements the "nextmatch" XET-Tag
|
* Class which implements the "nextmatch" XET-Tag
|
||||||
*
|
*
|
||||||
@ -227,10 +237,10 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
|
|||||||
private _autorefresh_timer: number;
|
private _autorefresh_timer: number;
|
||||||
|
|
||||||
// When printing, we change the layout around. Keep some values so it can be restored after
|
// When printing, we change the layout around. Keep some values so it can be restored after
|
||||||
private print: {
|
private print: PrintSettings = {
|
||||||
old_height: number,
|
old_height: 0,
|
||||||
row_selector: string,
|
row_selector: '',
|
||||||
orientation_style: HTMLStyleElement
|
orientation_style: null
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -238,7 +248,8 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
|
|||||||
*
|
*
|
||||||
* @memberOf et2_nextmatch
|
* @memberOf et2_nextmatch
|
||||||
*/
|
*/
|
||||||
constructor(_parent?, _attrs? : WidgetConfig, _child? : object) {
|
constructor(_parent?, _attrs?: WidgetConfig, _child?: object)
|
||||||
|
{
|
||||||
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_nextmatch._attributes, _child || {}));
|
super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_nextmatch._attributes, _child || {}));
|
||||||
|
|
||||||
this.activeFilters = {col_filter:{}};
|
this.activeFilters = {col_filter:{}};
|
||||||
|
Loading…
Reference in New Issue
Block a user