@qooxdoo/framework 7.0.0-beta.3 → 7.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/Manifest.json +1 -1
- package/README.md +9 -3
- package/lib/compiler/compile-info.json +60 -58
- package/lib/compiler/index.js +3242 -1883
- package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +1 -1
- package/lib/resource/qx/tool/loadsass.js +6 -4
- package/lib/resource/qx/tool/schema/compile-1-0-0.json +6 -11
- package/package.json +17 -3
- package/source/class/qx/Bootstrap.js +22 -1
- package/source/class/qx/bom/Blocker.js +2 -1
- package/source/class/qx/core/Environment.js +3 -12
- package/source/class/qx/core/MProperty.js +1 -1
- package/source/class/qx/dev/unit/Sinon.js +1 -1
- package/source/class/qx/io/__init__.js +5 -3
- package/source/class/qx/io/exception/Cancel.js +34 -0
- package/source/class/qx/io/exception/Exception.js +38 -0
- package/source/class/qx/io/exception/Protocol.js +26 -0
- package/source/class/qx/io/exception/Transport.js +39 -0
- package/source/class/qx/io/exception/__init__.js +4 -0
- package/source/class/qx/io/graphql/Client.js +112 -0
- package/source/class/qx/io/graphql/__init__.js +9 -0
- package/source/class/qx/io/graphql/protocol/Message.js +65 -0
- package/source/class/qx/io/graphql/protocol/Request.js +95 -0
- package/source/class/qx/io/graphql/protocol/Response.js +61 -0
- package/source/class/qx/io/graphql/protocol/__init__.js +6 -0
- package/source/class/qx/io/jsonrpc/Client.js +323 -0
- package/source/class/qx/io/jsonrpc/__init__.js +15 -0
- package/source/class/qx/io/jsonrpc/protocol/Batch.js +97 -0
- package/source/class/qx/io/jsonrpc/protocol/Error.js +63 -0
- package/source/class/qx/io/jsonrpc/protocol/Message.js +48 -0
- package/source/class/qx/io/jsonrpc/protocol/Notification.js +45 -0
- package/source/class/qx/io/jsonrpc/protocol/Parser.js +81 -0
- package/source/class/qx/io/jsonrpc/protocol/Request.js +93 -0
- package/source/class/qx/io/jsonrpc/protocol/Result.js +48 -0
- package/source/class/qx/io/jsonrpc/protocol/__init__.js +5 -0
- package/source/class/qx/io/request/authentication/Bearer.js +52 -0
- package/source/class/qx/io/transport/AbstractClient.js +100 -0
- package/source/class/qx/io/transport/AbstractTransport.js +41 -0
- package/source/class/qx/io/transport/Fetch.js +95 -0
- package/source/class/qx/io/transport/ITransport.js +40 -0
- package/source/class/qx/io/transport/PostMessage.js +55 -0
- package/source/class/qx/io/transport/Websocket.js +97 -0
- package/source/class/qx/io/transport/Xhr.js +139 -0
- package/source/class/qx/io/transport/__init__.js +18 -0
- package/source/class/qx/test/core/Assert.js +1 -1
- package/source/class/qx/test/core/Environment.js +0 -3
- package/source/class/qx/test/io/MAssert.js +46 -0
- package/source/class/qx/test/io/graphql/Client.js +169 -0
- package/source/class/qx/test/io/graphql/ClientFetch.js +34 -0
- package/source/class/qx/test/io/graphql/Request.js +42 -0
- package/source/class/qx/test/io/jsonrpc/Client.js +267 -0
- package/source/class/qx/test/io/jsonrpc/Protocol.js +80 -0
- package/source/class/qx/test/io/transport/PostMessage.js +56 -0
- package/source/class/qx/test/io/transport/Websocket.js +63 -0
- package/source/class/qx/test/ui/embed/Iframe.js +1 -1
- package/source/class/qx/test/util/DateFormat.js +45 -6
- package/source/class/qx/tool/cli/Cli.js +1 -0
- package/source/class/qx/tool/cli/commands/Compile.js +13 -3
- package/source/class/qx/tool/cli/commands/Es6ify.js +93 -0
- package/source/class/qx/tool/cli/commands/package/Install.js +1 -1
- package/source/class/qx/tool/cli/commands/package/Publish.js +14 -0
- package/source/class/qx/tool/compiler/ClassFile.js +67 -27
- package/source/class/qx/tool/compiler/Es6ify.js +368 -0
- package/source/class/qx/tool/compiler/makers/AppMaker.js +2 -1
- package/source/class/qx/tool/compiler/targets/Target.js +57 -47
- package/source/class/qx/tool/compiler/targets/meta/AbstractJavascriptMeta.js +25 -18
- package/source/class/qx/tool/compiler/targets/meta/BootJs.js +16 -16
- package/source/class/qx/tool/compiler/targets/meta/PolyfillJs.js +11 -3
- package/source/class/qx/tool/compiler/targets/meta/Uglify.js +10 -10
- package/source/class/qx/ui/core/Widget.js +70 -0
- package/source/class/qx/ui/decoration/MLinearBackgroundGradient.js +2 -1
- package/source/class/qx/ui/form/ComboBox.js +8 -3
- package/source/class/qx/ui/form/DateField.js +16 -1
- package/source/class/qx/ui/form/MenuButton.js +8 -4
- package/source/class/qx/ui/form/SelectBox.js +8 -3
- package/source/class/qx/ui/menu/AbstractButton.js +12 -8
- package/source/class/qx/ui/menu/Menu.js +18 -8
- package/source/class/qx/ui/table/pane/Model.js +10 -4
- package/source/class/qx/ui/window/Window.js +8 -0
- package/source/class/qx/util/format/DateFormat.js +44 -17
- package/source/resource/qx/tool/loadsass.js +6 -4
- package/source/resource/qx/tool/schema/compile-1-0-0.json +6 -11
- package/source/translation/hr.po +297 -0
- package/lib/resource/qx/static/blank.gif +0 -0
- package/source/class/qx/io/remote/Exchange.js +0 -1063
- package/source/class/qx/io/remote/Request.js +0 -1021
- package/source/class/qx/io/remote/RequestQueue.js +0 -521
- package/source/class/qx/io/remote/Response.js +0 -137
- package/source/class/qx/io/remote/Rpc.js +0 -1075
- package/source/class/qx/io/remote/RpcError.js +0 -198
- package/source/class/qx/io/remote/__init__.js +0 -88
- package/source/class/qx/io/remote/transport/Abstract.js +0 -513
- package/source/class/qx/io/remote/transport/Iframe.js +0 -652
- package/source/class/qx/io/remote/transport/Script.js +0 -475
- package/source/class/qx/io/remote/transport/XmlHttp.js +0 -1019
- package/source/class/qx/io/remote/transport/__init__.js +0 -3
- package/source/class/qx/test/io/remote/AbstractRequest.js +0 -150
- package/source/class/qx/test/io/remote/RequestIframe.js +0 -105
- package/source/class/qx/test/io/remote/RequestXhr.js +0 -151
- package/source/class/qx/test/io/remote/Rpc.js +0 -205
- package/source/class/qx/test/io/remote/__init__.js +0 -4
- package/source/class/qx/test/io/remote/transport/Iframe.js +0 -67
- package/source/class/qx/test/io/remote/transport/XmlHttp.js +0 -133
- package/source/class/qx/test/io/remote/transport/__init__.js +0 -4
|
@@ -1,475 +0,0 @@
|
|
|
1
|
-
/* ************************************************************************
|
|
2
|
-
|
|
3
|
-
qooxdoo - the new era of web development
|
|
4
|
-
|
|
5
|
-
http://qooxdoo.org
|
|
6
|
-
|
|
7
|
-
Copyright:
|
|
8
|
-
2004-2008 1&1 Internet AG, Germany, http://www.1und1.de
|
|
9
|
-
2006 Derrell Lipman
|
|
10
|
-
2006 STZ-IDA, Germany, http://www.stz-ida.de
|
|
11
|
-
|
|
12
|
-
License:
|
|
13
|
-
MIT: https://opensource.org/licenses/MIT
|
|
14
|
-
See the LICENSE file in the project's top-level directory for details.
|
|
15
|
-
|
|
16
|
-
Authors:
|
|
17
|
-
* Sebastian Werner (wpbasti)
|
|
18
|
-
* Andreas Ecker (ecker)
|
|
19
|
-
* Derrell Lipman (derrell)
|
|
20
|
-
* Andreas Junghans (lucidcake)
|
|
21
|
-
|
|
22
|
-
************************************************************************ */
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Transports requests to a server using dynamic script tags.
|
|
26
|
-
*
|
|
27
|
-
* This class should not be used directly by client programmers.
|
|
28
|
-
*
|
|
29
|
-
* NOTE: Instances of this class must be disposed of after use
|
|
30
|
-
*
|
|
31
|
-
*/
|
|
32
|
-
qx.Class.define("qx.io.remote.transport.Script",
|
|
33
|
-
{
|
|
34
|
-
extend : qx.io.remote.transport.Abstract,
|
|
35
|
-
implement: [ qx.core.IDisposable ],
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
/*
|
|
41
|
-
*****************************************************************************
|
|
42
|
-
CONSTRUCTOR
|
|
43
|
-
*****************************************************************************
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
|
-
construct : function()
|
|
47
|
-
{
|
|
48
|
-
this.base(arguments);
|
|
49
|
-
|
|
50
|
-
var vUniqueId = ++qx.io.remote.transport.Script.__uniqueId;
|
|
51
|
-
|
|
52
|
-
if (vUniqueId >= 2000000000) {
|
|
53
|
-
qx.io.remote.transport.Script.__uniqueId = vUniqueId = 1;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
this.__element = null;
|
|
57
|
-
this.__uniqueId = vUniqueId;
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
/*
|
|
64
|
-
*****************************************************************************
|
|
65
|
-
STATICS
|
|
66
|
-
*****************************************************************************
|
|
67
|
-
*/
|
|
68
|
-
|
|
69
|
-
statics :
|
|
70
|
-
{
|
|
71
|
-
/**
|
|
72
|
-
* Unique identifier for each instance.
|
|
73
|
-
*
|
|
74
|
-
* @internal
|
|
75
|
-
*/
|
|
76
|
-
__uniqueId : 0,
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Registry for all script transport instances.
|
|
80
|
-
*
|
|
81
|
-
* @internal
|
|
82
|
-
*/
|
|
83
|
-
_instanceRegistry : {},
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Internal URL parameter prefix.
|
|
87
|
-
*
|
|
88
|
-
* @internal
|
|
89
|
-
*/
|
|
90
|
-
ScriptTransport_PREFIX : "_ScriptTransport_",
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Internal URL parameter ID.
|
|
94
|
-
*
|
|
95
|
-
* @internal
|
|
96
|
-
*/
|
|
97
|
-
ScriptTransport_ID_PARAM : "_ScriptTransport_id",
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Internal URL parameter data prefix.
|
|
101
|
-
*
|
|
102
|
-
* @internal
|
|
103
|
-
*/
|
|
104
|
-
ScriptTransport_DATA_PARAM : "_ScriptTransport_data",
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Capabilities of this transport type.
|
|
108
|
-
*
|
|
109
|
-
* @internal
|
|
110
|
-
*/
|
|
111
|
-
handles :
|
|
112
|
-
{
|
|
113
|
-
synchronous : false,
|
|
114
|
-
asynchronous : true,
|
|
115
|
-
crossDomain : true,
|
|
116
|
-
fileUpload : false,
|
|
117
|
-
programmaticFormFields : false,
|
|
118
|
-
responseTypes : [ "text/plain", "text/javascript", "application/json" ]
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Returns always true, because script transport is supported by all browsers.
|
|
124
|
-
* @return {Boolean} <code>true</code>
|
|
125
|
-
*/
|
|
126
|
-
isSupported : function() {
|
|
127
|
-
return true;
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
/*
|
|
134
|
-
---------------------------------------------------------------------------
|
|
135
|
-
EVENT LISTENER
|
|
136
|
-
---------------------------------------------------------------------------
|
|
137
|
-
*/
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* For reference:
|
|
141
|
-
* http://msdn.microsoft.com/en-us/library/ie/ms534359%28v=vs.85%29.aspx
|
|
142
|
-
*
|
|
143
|
-
* @internal
|
|
144
|
-
*/
|
|
145
|
-
_numericMap :
|
|
146
|
-
{
|
|
147
|
-
"uninitialized" : 1,
|
|
148
|
-
"loading" : 2,
|
|
149
|
-
"loaded" : 2,
|
|
150
|
-
"interactive" : 3,
|
|
151
|
-
"complete" : 4
|
|
152
|
-
},
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* This method can be called by the script loaded by the ScriptTransport
|
|
157
|
-
* class.
|
|
158
|
-
*
|
|
159
|
-
* @signature function(id, content)
|
|
160
|
-
* @param id {String} Id of the corresponding transport object,
|
|
161
|
-
* which is passed as an URL parameter to the server an
|
|
162
|
-
* @param content {String} This string is passed to the content property
|
|
163
|
-
* of the {@link qx.io.remote.Response} object.
|
|
164
|
-
*/
|
|
165
|
-
_requestFinished : qx.event.GlobalError.observeMethod(function(id, content)
|
|
166
|
-
{
|
|
167
|
-
var vInstance = qx.io.remote.transport.Script._instanceRegistry[id];
|
|
168
|
-
|
|
169
|
-
if (vInstance == null)
|
|
170
|
-
{
|
|
171
|
-
if (qx.core.Environment.get("qx.debug"))
|
|
172
|
-
{
|
|
173
|
-
if (qx.core.Environment.get("qx.debug.io.remote")) {
|
|
174
|
-
this.warn("Request finished for an unknown instance (probably aborted or timed out before)");
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
else
|
|
179
|
-
{
|
|
180
|
-
vInstance._responseContent = content;
|
|
181
|
-
vInstance._switchReadyState(qx.io.remote.transport.Script._numericMap.complete);
|
|
182
|
-
}
|
|
183
|
-
})
|
|
184
|
-
},
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
/*
|
|
190
|
-
*****************************************************************************
|
|
191
|
-
MEMBERS
|
|
192
|
-
*****************************************************************************
|
|
193
|
-
*/
|
|
194
|
-
|
|
195
|
-
members :
|
|
196
|
-
{
|
|
197
|
-
|
|
198
|
-
__lastReadyState : 0,
|
|
199
|
-
__element : null,
|
|
200
|
-
__uniqueId : null,
|
|
201
|
-
|
|
202
|
-
/*
|
|
203
|
-
---------------------------------------------------------------------------
|
|
204
|
-
USER METHODS
|
|
205
|
-
---------------------------------------------------------------------------
|
|
206
|
-
*/
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Sends the request using "script" elements
|
|
210
|
-
*
|
|
211
|
-
*/
|
|
212
|
-
send : function()
|
|
213
|
-
{
|
|
214
|
-
var vUrl = this.getUrl();
|
|
215
|
-
|
|
216
|
-
// --------------------------------------
|
|
217
|
-
// Adding parameters
|
|
218
|
-
// --------------------------------------
|
|
219
|
-
vUrl += (vUrl.indexOf("?") >= 0 ? "&" : "?") + qx.io.remote.transport.Script.ScriptTransport_ID_PARAM + "=" + this.__uniqueId;
|
|
220
|
-
|
|
221
|
-
var vParameters = this.getParameters();
|
|
222
|
-
var vParametersList = [];
|
|
223
|
-
|
|
224
|
-
for (var vId in vParameters)
|
|
225
|
-
{
|
|
226
|
-
if (vId.indexOf(qx.io.remote.transport.Script.ScriptTransport_PREFIX) == 0) {
|
|
227
|
-
this.error("Illegal parameter name. The following prefix is used internally by qooxdoo): " + qx.io.remote.transport.Script.ScriptTransport_PREFIX);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
var value = vParameters[vId];
|
|
231
|
-
|
|
232
|
-
if (value instanceof Array)
|
|
233
|
-
{
|
|
234
|
-
for (var i=0; i<value.length; i++) {
|
|
235
|
-
vParametersList.push(encodeURIComponent(vId) + "=" + encodeURIComponent(value[i]));
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
else
|
|
239
|
-
{
|
|
240
|
-
vParametersList.push(encodeURIComponent(vId) + "=" + encodeURIComponent(value));
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
if (vParametersList.length > 0) {
|
|
245
|
-
vUrl += "&" + vParametersList.join("&");
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
// --------------------------------------
|
|
249
|
-
// Sending data
|
|
250
|
-
// --------------------------------------
|
|
251
|
-
var vData = this.getData();
|
|
252
|
-
|
|
253
|
-
if (vData != null) {
|
|
254
|
-
vUrl += "&" + qx.io.remote.transport.Script.ScriptTransport_DATA_PARAM + "=" + encodeURIComponent(vData);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
qx.io.remote.transport.Script._instanceRegistry[this.__uniqueId] = this;
|
|
258
|
-
this.__element = document.createElement("script");
|
|
259
|
-
|
|
260
|
-
// IE needs this (it ignores the
|
|
261
|
-
// encoding from the header sent by the
|
|
262
|
-
// server for dynamic script tags)
|
|
263
|
-
this.__element.charset = "utf-8";
|
|
264
|
-
this.__element.src = vUrl;
|
|
265
|
-
|
|
266
|
-
if (qx.core.Environment.get("qx.debug"))
|
|
267
|
-
{
|
|
268
|
-
if (qx.core.Environment.get("qx.debug.io.remote.data"))
|
|
269
|
-
{
|
|
270
|
-
this.debug("Request: " + vUrl);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
document.body.appendChild(this.__element);
|
|
275
|
-
},
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* Switches the readystate by setting the internal state.
|
|
280
|
-
*
|
|
281
|
-
* @param vReadyState {String} readystate value
|
|
282
|
-
*/
|
|
283
|
-
_switchReadyState : function(vReadyState)
|
|
284
|
-
{
|
|
285
|
-
// Ignoring already stopped requests
|
|
286
|
-
switch(this.getState())
|
|
287
|
-
{
|
|
288
|
-
case "completed":
|
|
289
|
-
case "aborted":
|
|
290
|
-
case "failed":
|
|
291
|
-
case "timeout":
|
|
292
|
-
this.warn("Ignore Ready State Change");
|
|
293
|
-
return;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
// Updating internal state
|
|
297
|
-
while (this.__lastReadyState < vReadyState) {
|
|
298
|
-
this.setState(qx.io.remote.Exchange._nativeMap[++this.__lastReadyState]);
|
|
299
|
-
}
|
|
300
|
-
},
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
/*
|
|
306
|
-
---------------------------------------------------------------------------
|
|
307
|
-
REQUEST HEADER SUPPORT
|
|
308
|
-
---------------------------------------------------------------------------
|
|
309
|
-
*/
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
* Sets a request header with the given value.
|
|
313
|
-
*
|
|
314
|
-
* This method is not implemented at the moment.
|
|
315
|
-
*
|
|
316
|
-
* @param vLabel {String} Request header name
|
|
317
|
-
* @param vValue {var} Request header value
|
|
318
|
-
*/
|
|
319
|
-
setRequestHeader : function(vLabel, vValue) {},
|
|
320
|
-
|
|
321
|
-
/*
|
|
322
|
-
---------------------------------------------------------------------------
|
|
323
|
-
RESPONSE HEADER SUPPORT
|
|
324
|
-
---------------------------------------------------------------------------
|
|
325
|
-
*/
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Returns the value of the given response header.
|
|
329
|
-
*
|
|
330
|
-
* This method is not implemented at the moment and returns always "null".
|
|
331
|
-
*
|
|
332
|
-
* @param vLabel {String} Response header name
|
|
333
|
-
* @return {null} Returns null
|
|
334
|
-
*/
|
|
335
|
-
getResponseHeader : function(vLabel) {
|
|
336
|
-
return null;
|
|
337
|
-
},
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* Provides an hash of all response headers.
|
|
341
|
-
*
|
|
342
|
-
* This method is not implemented at the moment and returns an empty map.
|
|
343
|
-
*
|
|
344
|
-
* @return {Map} empty map
|
|
345
|
-
*/
|
|
346
|
-
getResponseHeaders : function() {
|
|
347
|
-
return {};
|
|
348
|
-
},
|
|
349
|
-
|
|
350
|
-
/*
|
|
351
|
-
---------------------------------------------------------------------------
|
|
352
|
-
STATUS SUPPORT
|
|
353
|
-
---------------------------------------------------------------------------
|
|
354
|
-
*/
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
* Returns the current status code of the request if available or -1 if not.
|
|
358
|
-
* This method needs implementation (returns always 200).
|
|
359
|
-
*
|
|
360
|
-
* @return {Integer} status code
|
|
361
|
-
*/
|
|
362
|
-
getStatusCode : function() {
|
|
363
|
-
return 200;
|
|
364
|
-
},
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* Provides the status text for the current request if available and null otherwise.
|
|
368
|
-
* This method needs implementation (returns always an empty string)
|
|
369
|
-
*
|
|
370
|
-
* @return {String} always an empty string.
|
|
371
|
-
*/
|
|
372
|
-
getStatusText : function() {
|
|
373
|
-
return "";
|
|
374
|
-
},
|
|
375
|
-
|
|
376
|
-
/*
|
|
377
|
-
---------------------------------------------------------------------------
|
|
378
|
-
RESPONSE DATA SUPPORT
|
|
379
|
-
---------------------------------------------------------------------------
|
|
380
|
-
*/
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Returns the length of the content as fetched thus far.
|
|
384
|
-
* This method needs implementation (returns always 0).
|
|
385
|
-
*
|
|
386
|
-
* @return {Integer} Returns 0
|
|
387
|
-
*/
|
|
388
|
-
getFetchedLength : function() {
|
|
389
|
-
return 0;
|
|
390
|
-
},
|
|
391
|
-
|
|
392
|
-
/**
|
|
393
|
-
* Returns the content of the response.
|
|
394
|
-
*
|
|
395
|
-
* @return {null | String} If successful content of response as string.
|
|
396
|
-
*/
|
|
397
|
-
getResponseContent : function()
|
|
398
|
-
{
|
|
399
|
-
if (this.getState() !== "completed")
|
|
400
|
-
{
|
|
401
|
-
if (qx.core.Environment.get("qx.debug"))
|
|
402
|
-
{
|
|
403
|
-
if (qx.core.Environment.get("qx.debug.io.remote")) {
|
|
404
|
-
this.warn("Transfer not complete, ignoring content!");
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
return null;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
if (qx.core.Environment.get("qx.debug"))
|
|
412
|
-
{
|
|
413
|
-
if (qx.core.Environment.get("qx.debug.io.remote")) {
|
|
414
|
-
this.debug("Returning content for responseType: " + this.getResponseType());
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
switch(this.getResponseType())
|
|
419
|
-
{
|
|
420
|
-
case "text/plain":
|
|
421
|
-
// server is responsible for using a string as the response
|
|
422
|
-
case "application/json":
|
|
423
|
-
case "text/javascript":
|
|
424
|
-
if (qx.core.Environment.get("qx.debug"))
|
|
425
|
-
{
|
|
426
|
-
if (qx.core.Environment.get("qx.debug.io.remote.data"))
|
|
427
|
-
{
|
|
428
|
-
this.debug("Response: " + this._responseContent);
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
var ret = this._responseContent;
|
|
432
|
-
return (ret === 0 ? 0 : (ret || null));
|
|
433
|
-
|
|
434
|
-
default:
|
|
435
|
-
this.warn("No valid responseType specified (" + this.getResponseType() + ")!");
|
|
436
|
-
return null;
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
},
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
/*
|
|
444
|
-
*****************************************************************************
|
|
445
|
-
DEFER
|
|
446
|
-
*****************************************************************************
|
|
447
|
-
*/
|
|
448
|
-
|
|
449
|
-
defer : function()
|
|
450
|
-
{
|
|
451
|
-
// basic registration to qx.io.remote.Exchange
|
|
452
|
-
// the real availability check (activeX stuff and so on) follows at the first real request
|
|
453
|
-
qx.io.remote.Exchange.registerType(qx.io.remote.transport.Script, "qx.io.remote.transport.Script");
|
|
454
|
-
},
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
/*
|
|
460
|
-
*****************************************************************************
|
|
461
|
-
DESTRUCTOR
|
|
462
|
-
*****************************************************************************
|
|
463
|
-
*/
|
|
464
|
-
|
|
465
|
-
destruct : function()
|
|
466
|
-
{
|
|
467
|
-
if (this.__element)
|
|
468
|
-
{
|
|
469
|
-
delete qx.io.remote.transport.Script._instanceRegistry[this.__uniqueId];
|
|
470
|
-
document.body.removeChild(this.__element);
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
this.__element = this._responseContent = null;
|
|
474
|
-
}
|
|
475
|
-
});
|