Ralf Becker
033c1f4a9f
fixing scope of "use strict", so we do not need to remove it when concatinating our scripts like we do now with minjs
2016-02-29 15:50:24 +00:00
Nathan Gray
62eb8e00f2
Add support for global json handlers, and register a global handler for storing data entries
2016-02-04 19:26:37 +00:00
Ralf Becker
284ffa7f13
IE JSON-serializes arrays passed in from different window contextx (eg. popups) as objects (it looses object-type of array), causing them to be JSON serialized as objects and loosing parameters which are undefined
...
JSON.strigify([123,undefined]) --> "{0:123}" instead of "[123,null]"
2015-08-31 12:21:11 +00:00
Nathan Gray
a304a6b28e
Avoid occasional 'TypeError: Cannot read property '0' of null' error from aborted JSON when debugging.
2015-03-09 15:23:07 +00:00
Ralf Becker
9e20212b3e
* API: report failed Ajax requests to user incl. a hint that server error-log should contain more information
2014-11-21 16:16:24 +00:00
Ralf Becker
8aa71722ee
clientside redirect ignore appname only for popups, not eg. iframes like in admin
2014-11-19 16:10:39 +00:00
Hadi Nategh
23c0285825
Make sure the this object is avaliable before addressing it.
...
-Fix error in calender views which was happening after dnd
2014-10-21 08:58:33 +00:00
Ralf Becker
424b4c451c
fix redirects in a popup and new egw_exception_redirect to be used in hooks/callbacks like for addressbook.edit to redirect to a different location
2014-10-15 14:55:08 +00:00
Nathan Gray
eaccfdfe1d
Enhance error message to include request info
2014-05-27 14:53:34 +00:00
Nathan Gray
e7fd500006
Store the jQuery jqXHR request object in the json_request, and return it from sendRequest() so caller can access it, if needed.
2014-03-26 17:53:09 +00:00
Ralf Becker
99ce5b41f9
allow to optionally specify app for redirect instead of always using current app
2014-01-27 16:28:39 +00:00
Ralf Becker
a788827c1e
check if json apply needs a not yet instanciated app.js object and instanciate it in that case
2014-01-23 09:03:30 +00:00
Nathan Gray
e103145a53
Fix JSON to call callback even if server does not return anything in particular.
2014-01-22 09:30:22 +00:00
Ralf Becker
5a8b145b7f
fixed caching in a couple of places:
...
- user.php was not reloaded if (session-)preferences changed eg. language via select-box in login, because we used Expires header, but did not force a different url
- (user|config|images).php now has etag on url, to force reload by browser as we use an Expires header (changed images still need Admin >> clear cache to rebuild image cache)
- preferences are now loaded via a cachable GET request
2014-01-18 17:43:15 +00:00
Nathan Gray
8e69a1e23b
Only call request callback once, when the request is finished.
...
Callback is not called if the response only has 'data' type responses, since data handler calls callback already.
2014-01-11 14:47:31 +00:00
Nathan Gray
d94fc6b492
Fix not called callback
2014-01-11 11:41:05 +00:00
Ralf Becker
90edb55ec5
add async include and et2 render times to page-generation-times shown
2014-01-09 12:20:13 +00:00
Nathan Gray
4d29125c41
Fix some window/scope issues with jquery & plain assign handlers to make sure they operate on the window, not the request context (which can be anything)
2013-10-28 22:22:09 +00:00
Nathan Gray
f6526a30e8
Fix intermittent issue with missing window breaking ajax
2013-10-18 21:01:53 +00:00
Ralf Becker
998d568ef4
for egw.json calls in a popup we need to use jQuery object of that window, as otherwise eg. apply from server with app.$app.method to run in main window instead of popup
2013-10-18 16:14:36 +00:00
Nathan Gray
282fb76cb6
Improve error message
2013-10-04 09:40:35 +00:00
Nathan Gray
756b3d3380
Fix app-level redirect affects whole page
2013-09-30 12:34:45 +00:00
Nathan Gray
07b311d495
Enhance error message to actually include the original error message
2013-09-17 20:17:20 +00:00
Nathan Gray
68b1178657
Undefined needs quotes.
2013-09-16 14:35:55 +00:00
Nathan Gray
b4007621f7
When applying (call a function) call it on the request window, not current - they may be different
2013-09-11 15:52:49 +00:00
Nathan Gray
958167b0f7
Add an optional async parameter to sendRequest() to make simple async calls easier
2013-09-10 20:22:47 +00:00
Nathan Gray
26e9792256
Load javascript files before processing other response types, so all JS is available.
2013-07-20 13:41:17 +00:00
Ralf Becker
34a2f8c6e0
support for non-global func eg. "app.someapp.func" need to be in both egw_json objects (until we fix it so one calls the other)
2013-04-12 16:03:45 +00:00
Nathan Gray
19aef757f6
Use window from egw object, if available - still not quite right
2013-03-25 16:58:33 +00:00
Nathan Gray
588c6141c9
Return true to not throw an exception if the plugin worked
2013-02-14 11:01:50 +00:00
Andreas Stöckel
b134b36678
fixed some issues with egw_data, improved egw_json exception handling
2012-03-23 12:45:13 +00:00
Andreas Stöckel
c8bf9ed6ef
Fixed design problem in egw_core, which caused window-local modules to be instanciated multiple times if used for multiple applications inside a window. Added egw_css.js as replacement for et2_core_stylesheet.js, which allows to add stylesheet rules at runtime
2012-03-07 14:04:25 +00:00
Andreas Stöckel
d996537c35
Improved error message for exception in JSON plugins
2012-03-06 15:25:27 +00:00
Andreas Stöckel
049cbd88dc
Now using the etemplate code from the root instance (etemplate2.js acts as a egw api plugin); fixed egw.json plugins; fixed problem with 'instanceof Object', which does not work when sharing code over multiple windows
2012-03-06 13:22:01 +00:00
Ralf Becker
4a88a9558c
egw_json plugin "html" replacing document content with send html
2012-03-06 09:50:43 +00:00
Andreas Stöckel
1bc16c1b8e
Finished egw json api
2012-03-05 15:02:00 +00:00
Andreas Stöckel
d310b14ecf
Client side API now supports modules which are instanciated per application or per window; removed et2_debug function from et2_core_common, now using corresponding API function.
2012-03-05 13:07:38 +00:00