Ralf Becker
3a618937a9
do NOT check Content-Type header as it's sometimes not set to application/json
...
parsing JSON will error out, if payload is no JSON anyway
happens with mark-as-spam and SpamTitan
2021-07-19 10:24:58 +02:00
Ralf Becker
59ac3f4bda
always name generated file app.min.js so client-side can load it without knowing source is .ts or .js
...
--> fixes client-side initiated load errors
2021-07-19 08:31:06 +02:00
Ralf Becker
ce0a513187
egw.preference(name, app, true) returns now a promise to query preference async
...
changed notifications to query preference async together with lang-files
fixed error-handling in new egw.json()
2021-07-16 14:50:06 +02:00
Ralf Becker
50b8839609
fix not working InfoLog index: synchronous request must return fulfilled promise
2021-07-16 11:49:53 +02:00
Ralf Becker
b780c7ebd8
replace jQuery.ajax with fetch (or XMLHttpRequest for synchronous requests)
2021-07-16 08:47:22 +02:00
Ralf Becker
a5ad691757
deprecated egw.includeJS() in favor of es6 import statement
...
with egw composition happening in main window the used import statement happens in that context and NOT in the window (eg. popup or iframe) this module is instantiated for!
2021-07-09 17:27:22 +02:00
Ralf Becker
65502ace6e
re-added daily cache-buster for app.js and removed explicit timepicker include causing a double include
...
(we still sometimes get a jQuery.datepicker is not defined, but it seems a timing issue and is NOT fixed by including it twice!)
2021-07-09 10:07:31 +02:00
Ralf Becker
8c7722c8b0
1. loading dhmtlx(tree|menu) again via script tag
...
2. fixed not loaded app.js in egw_json by using import direct and not includeJS (and therefore removed additional include in et2_load)
3. adding cache-buster for egw.js and app.js endpoints to force reloads (not adding them for anything else, as it interferes with rollup
2021-07-01 14:36:51 +02:00
nathangray
3add958afa
The results of Guy Bedford's help
...
Egroupware will load into addressbook & show rows
Most base files should be bundled server-side & included
rollup.config.js controls the process
Still needs work:
- consider /dist directory for best-practice
- cleanup
- other built-in apps
- EPL / external apps need Guy's multi-stage work
2021-06-25 14:49:24 -06:00
Ralf Becker
45758aaada
we must not make json_request object global as it interferes with registered plugins from different windows
...
Example was tracker site config opened in an iframe, then stopped further et2_load responses to the main window
because it still used window object from the iframe and therefore could not find the node
2021-06-18 11:09:53 +02:00
nathangray
5a209a00f0
Avoid infinite loop if loading JS file fails
2021-06-17 14:17:58 -06:00
Ralf Becker
af3193480c
fix not working applyFunc if app.js was not yet loaded (missing return of the Promise)
2021-06-15 11:51:10 +02:00
Ralf Becker
1f4ba0156a
remove (unused) etemplate2 import causing login page to constantly reload
2021-06-11 09:11:28 +02:00
Ralf Becker
e18832e110
defer calls to app.* after et2_load is finished
...
changing et2_load egw_json plugin to return a promise for that
2021-06-11 09:05:57 +02:00
Ralf Becker
bfea641321
fix async loading caused app.js not being loaded before et2.load() tried to instantiate it
2021-06-08 17:13:30 +02:00
Ralf Becker
592b7fb97d
replace LAB.js with native es5 loading
2021-06-05 20:39:39 +02:00
Ralf Becker
46c4e0e118
add daily cache-buster to client-side included app.js files for applyFunc
2021-03-12 11:23:26 +02:00
Ralf Becker
d2626085f6
fix wrong context causing eg. attachments to mail to no longer work
2021-03-08 21:20:11 +02:00
Ralf Becker
58ae23c74c
allow "app.<appname>.<method>" in link registry and use it to open CRM view
2021-03-04 11:50:13 +02:00
Ralf Becker
7a060b205b
not overwriting call and apply method of egw function/object using callFunc and applyFunc instead, fixes several problems
2021-03-02 12:16:47 +02:00
Ralf Becker
e36c6c4cec
move global et2_call function to egw.call and egw.apply methods, ensuring app.js is loaded, if not yet loaded, also using that as apply plugin for egw.json
2021-03-01 11:50:41 +02:00
Ralf Becker
086771ee66
try to fix race-condition in reconnecting a "lost" websocket connection
2020-10-27 14:19:25 +01:00
Ralf Becker
82d7a103a9
try to fix race-condition in reconnecting a "lost" websocket connection
2020-10-27 14:16:11 +01:00
nathangray
38ff63f778
Api: New JavaScript API method egw.request(menuaction : string, parameters : any[]) : Promise
...
Does an AJAX request, and resolves the returned Promise with just the data (no piggybacks) when it arrives from the server. Any registered data handlers are run before resolving the Promise.
2020-10-16 10:33:13 -06:00
Ralf Becker
1ef16c9c55
closing websocket explicit, before reopening it, to not end up with multiple connections and doublicated messages
2020-10-15 18:17:31 +02:00
Ralf Becker
663816769e
fix TypeError this.openWebSocket() is not a function
2020-10-14 22:28:32 +02:00
Ralf Becker
313a378539
* Swoolepush: periodically pinging server from browser to detect lost websocket connection and reconnect
2020-10-14 20:16:13 +02:00
Ralf Becker
7db25dce5e
* Admin: push server test to diagnose problems and improved recovery from failed requests / network problems
2020-10-02 20:28:02 +02:00
Ralf Becker
9817d25a47
move who is available via push to push class and backends
2020-04-20 13:07:58 +02:00
Ralf Becker
65294a3e19
fix error on window closing in Chrome 80+
...
caused by Chrome 80+ no longer allowing to send a synchronious ajax request from beforeunload handler, using sendBeacon (async request with keepalive=true) instead
2020-03-02 10:43:19 +01:00
Ralf Becker
bf844b7598
support for new Swoole push server
2019-11-04 09:29:49 +01:00
Hadi Nategh
72cad447b0
Do not check jsonp since we are not using it and it might cause errors by setting dataType to script falsely
2019-02-20 13:24:43 +01:00
Hadi Nategh
b16e93bfe3
Make sure we have a match before using it
2019-02-20 10:41:04 +01:00
Ralf Becker
5531844c0d
use correct window of includeJS and alert, also fixed in wrong order included first JS file
2019-01-15 14:34:52 +01:00
Ralf Becker
2f1333a116
return and show in browser JSON parsing errors maybe caused by network problems
...
server sends HTTP status "400 Bad Request" with JSON payload with "error" and "errno" attributes.
error is json_last_error_msg() prefixed with "JSON ".
Not yet implemented is resending the request (max. twice) for JSON parsing errors to try to work around network problems
2018-11-01 12:00:08 +01:00
Hadi Nategh
970fb80675
Respect async flag with set false value
2018-10-11 14:14:21 +02:00
Hadi Nategh
cceba01f87
Change default value for async json_request to true
2018-10-04 17:48:13 +02:00
Ralf Becker
bbe551d4cc
sending appliction/json aka JSON as direct payload for all POST ajax requests
...
instead of additionally encoding them as form-data
2018-08-16 11:07:50 +02:00
Ralf Becker
430368eab9
new JSON response method "message" to call egw.message eg. in a popup, by using the context from the egw.json call
2018-06-05 12:29:51 +02:00
Ralf Becker
96caf6effd
* Admin/APC(u): fix error in clear cache: if APC(u) runs out of memory clearing just instance cache clear whole cache
2016-07-28 12:02:21 +02:00
Ralf Becker
58d2e49843
fix two more cases in which "show_generation_time" is queried and should never trigger a request to server, see 1c6c930312
2016-07-21 10:51:17 +02:00
Ralf Becker
45111b8cd9
if "common" prefs are not loaded, do not display page generation time
...
Before we queried page_generation_time common preference without a callback, which send a synchronious request to server to fetch common preferences, when it returned it looked for the preference again and send the next synchronious request to the server, in an infinit loop. Now setting _callback parameter of egw.preference() to false, just returns undefined, if common preferences are not yet loaded, but dont try to query them from server
2016-07-20 17:15:41 +02:00
Hadi Nategh
1fcbb03153
Evaluate show_generation_time preference value before calling for pageGenTime
2016-07-15 17:25:07 +02:00
Hadi Nategh
9d054b9437
Fix asyncIncludetime in genPageTime repeats itself into DOM instead of updating the value
2016-07-15 09:35:02 +02:00
Hadi Nategh
eba29d3541
Create DOM node for pageGenTime data
2016-07-14 17:21:51 +02:00
Ralf Becker
82c4eecfa3
change wording of error message on server-side ajax requests
2016-06-28 20:40:11 +02:00
Hadi Nategh
93217a149d
jQuery libraries updates via composer
2016-06-06 17:38:20 +02:00
Hadi Nategh
87fb94a496
Deprecate $j global variable and replace them all with standard jQuery
2016-06-02 16:52:01 +02:00
Ralf Becker
2e3bd32721
moving all - non ancient ;-) - js files to api/js
2016-04-07 10:38:05 +00:00