got admin index incl. et2_tree and et2_date_ro working

This commit is contained in:
Ralf Becker 2021-06-10 13:53:07 +02:00
parent 5298336886
commit c51275fde3
8 changed files with 27 additions and 20 deletions

View File

@ -10,11 +10,10 @@
/*egw:uses
/api/js/jsapi/egw_app.js
*/
import 'jquery';
import 'jqueryui';
import '../jsapi/egw_global';
import '../etemplate/et2_types';
import { EgwApp } from '../../api/js/jsapi/egw_app';
import { etemplate2 } from "../../api/js/etemplate/etemplate2";
import { et2_dialog } from "../../api/js/etemplate/et2_widget_dialog";
import { et2_createWidget } from "../../api/js/etemplate/et2_core_widget";
/**
* UI for Admin
*
@ -851,7 +850,7 @@ class AdminApp extends EgwApp {
if (_button == et2_dialog.YES_BUTTON) {
submit();
}
}, this.egw.lang('Submit displayed information?'), '', {}, et2_dialog.BUTTON_YES_NO, et2_dialog.QUESTION_MESSAGE, undefined, egw);
}, this.egw.lang('Submit displayed information?'), '', {}, et2_dialog.BUTTONS_YES_NO, et2_dialog.QUESTION_MESSAGE, undefined, egw);
}
return false;
}
@ -942,7 +941,7 @@ class AdminApp extends EgwApp {
}
};
// confirmation dialog
et2_dialog.show_dialog(callbackDialog, egw.lang('Are you sure you want to %1 mail for selected accounts?', egw.lang(_action.id)), egw.lang('Active Mail Accounts'), {}, et2_dialog.BUTTON_YES_NO, et2_dialog.WARNING_MESSAGE, undefined, egw);
et2_dialog.show_dialog(callbackDialog, egw.lang('Are you sure you want to %1 mail for selected accounts?', egw.lang(_action.id)), egw.lang('Active Mail Accounts'), {}, et2_dialog.BUTTONS_YES_NO, et2_dialog.WARNING_MESSAGE, undefined, egw);
}
/**
* Resize window methode

View File

@ -12,12 +12,10 @@
/api/js/jsapi/egw_app.js
*/
import 'jquery';
import 'jqueryui';
import '../jsapi/egw_global';
import '../etemplate/et2_types';
import {EgwApp, PushData} from '../../api/js/jsapi/egw_app';
import {etemplate2} from "../../api/js/etemplate/etemplate2";
import {et2_dialog} from "../../api/js/etemplate/et2_widget_dialog";
import {et2_createWidget} from "../../api/js/etemplate/et2_core_widget";
/**
* UI for Admin
@ -1021,7 +1019,7 @@ class AdminApp extends EgwApp
submit();
}
}, this.egw.lang('Submit displayed information?'), '', {},
et2_dialog.BUTTON_YES_NO, et2_dialog.QUESTION_MESSAGE, undefined, egw);
et2_dialog.BUTTONS_YES_NO, et2_dialog.QUESTION_MESSAGE, undefined, egw);
}
return false;
}
@ -1141,7 +1139,7 @@ class AdminApp extends EgwApp
};
// confirmation dialog
et2_dialog.show_dialog(callbackDialog, egw.lang('Are you sure you want to %1 mail for selected accounts?', egw.lang(_action.id)), egw.lang('Active Mail Accounts'), {},
et2_dialog.BUTTON_YES_NO, et2_dialog.WARNING_MESSAGE, undefined, egw);
et2_dialog.BUTTONS_YES_NO, et2_dialog.WARNING_MESSAGE, undefined, egw);
}
/**

View File

@ -22,6 +22,7 @@ import { et2_valueWidget } from './et2_core_valueWidget';
import { et2_inputWidget } from './et2_core_inputWidget';
import { et2_DOMWidget } from "./et2_core_DOMWidget";
import { egw } from "../jsapi/egw_global";
import { date } from "./lib/date.js";
// all calls to jQueryUI.datetimepicker as jQuery.datepicker give errors which are currently suppressed with @ts-ignore
// adding npm package @types/jquery.ui.datetimepicker did NOT help :(
/**

View File

@ -28,9 +28,6 @@ import {et2_IDetachedDOM} from "./et2_core_interfaces";
import {egw} from "../jsapi/egw_global";
import {date} from "./lib/date.js";
// lib/date.js:
declare function date (format : string, timestamp? : string | number | Date);
// all calls to jQueryUI.datetimepicker as jQuery.datepicker give errors which are currently suppressed with @ts-ignore
// adding npm package @types/jquery.ui.datetimepicker did NOT help :(

View File

@ -24,10 +24,15 @@ import { et2_inputWidget } from "./et2_core_inputWidget";
import { ClassWithAttributes } from "./et2_core_inheritance";
import { et2_no_init } from "./et2_core_common";
import { egw, framework } from "../jsapi/egw_global";
/* no module, but egw:uses is ignored, so adding it here commented out
import '../../../api/js/dhtmlxtree/sources/dhtmlxtree.js';
import '../../../api/js/dhtmlxtree/sources/ext/dhtmlxtree_json.js';
import '../../../api/js/dhtmlxtree/sources/ext/dhtmlxtree_start.js';
*/
/**
* Tree widget
*
* For syntax of nodes supplied via sel_optons or autoloading refer to Etemplate\Widget\Tree class.
* For syntax of nodes supplied via sel_options or autoloading refer to Etemplate\Widget\Tree class.
*
* @augments et2_inputWidget
*/

View File

@ -27,10 +27,16 @@ import {ClassWithAttributes} from "./et2_core_inheritance";
import {et2_no_init} from "./et2_core_common";
import {egw, framework} from "../jsapi/egw_global";
/* no module, but egw:uses is ignored, so adding it here commented out
import '../../../api/js/dhtmlxtree/sources/dhtmlxtree.js';
import '../../../api/js/dhtmlxtree/sources/ext/dhtmlxtree_json.js';
import '../../../api/js/dhtmlxtree/sources/ext/dhtmlxtree_start.js';
*/
/**
* Tree widget
*
* For syntax of nodes supplied via sel_optons or autoloading refer to Etemplate\Widget\Tree class.
* For syntax of nodes supplied via sel_options or autoloading refer to Etemplate\Widget\Tree class.
*
* @augments et2_inputWidget
*/

1
api/js/etemplate/lib/date.d.ts vendored Normal file
View File

@ -0,0 +1 @@
declare function date (format : string, timestamp? : string | number | Date);

View File

@ -249,7 +249,7 @@ export function date (format, timestamp) {
return jsdate.getTime() / 1000 | 0;
}
};
this.date = function (format, timestamp) {
window.date = function (format, timestamp) {
that = this;
jsdate = ((typeof timestamp === 'undefined' ||isNaN(timestamp.valueOf())) ? new Date() : // Not provided
(timestamp instanceof Date) ? new Date(timestamp) : // JS Date()
@ -257,5 +257,5 @@ export function date (format, timestamp) {
);
return format.replace(formatChr, formatChrCb);
};
return this.date(format, timestamp);
return window.date(format, timestamp);
}