Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove obsolete methods

  • Loading branch information...
commit 41e5c6ed1797d69581e890325d15c9734aca8ce8 1 parent d5557b1
@gjtorikian gjtorikian authored
View
2  core/baseclasses/liveedit.js
@@ -651,7 +651,7 @@ apf.LiveEdit = function() {
}
//Reference to class
else if (apf.namespaces[apf.ns.aml].elements[editor]) {
- var cacheId = apf.serialize(rule); //Using full element definition as cache id. @todo when should I clear this cache? - at least at destroy - same for propedit/datagrid
+ var cacheId = JSON.stringify(rule); //Using full element definition as cache id. @todo when should I clear this cache? - at least at destroy - same for propedit/datagrid
if (!this.$editorCache)
this.$editorCache = {};
View
2  core/lib/offline/queue.js
@@ -51,7 +51,7 @@ apf.offline.queue = {
//Check here for xml nodes in storeInfo??
//Store http info
- storage.put(len, apf.serialize(commInfo), namespace);
+ storage.put(len, JSON.stringify(commInfo), namespace);
storage.put("length", ++len, namespace);
/*
View
2  core/lib/offline/state.js
@@ -221,7 +221,7 @@ apf.offline.state = {
apf.saveData(this.setInstruction, {
ignoreOffline : true,
- data : apf.serialize(data),
+ data : JSON.stringify(data),
callback : function(data, state, extra){
if (extra.tpModule.retryTimeout(extra, state, apf.offline) === true)
return true;
View
2  core/lib/offline/transactions.js
@@ -83,7 +83,7 @@ apf.offline.transactions = {
var storage = apf.offline.storage;
var len = parseInt(storage.get("length", namespace)) || 0;
- storage.put(len, apf.serialize(type == "queue"
+ storage.put(len, JSON.stringify(type == "queue"
? {
undo : qItem.undo,
undoObj : qItem.undoObj.$export()
View
6 core/lib/queue.js
@@ -68,9 +68,15 @@ apf.queue = {
add : function(id, f){
this.q[id] = f;
if (!this.timer)
+ //#ifdef __WITH_ZERO_TIMEOUT
this.timer = apf.setZeroTimeout(function(){
apf.queue.empty();
});
+ /* #else
+ this.timer = apf.setTimeout(function(){
+ apf.queue.empty();
+ });
+ #endif */
},
remove : function(id){
View
4 core/lib/storage/cookie.js
@@ -60,7 +60,7 @@ apf.storage.modules.cookie = {
//#endif
// serialize the value;
- value = apf.serialize(value);
+ value = JSON.stringify(value);
// store the value
apf.setcookie(namespace + "~" + key, value,
@@ -205,7 +205,7 @@ apf.storage.modules.cookie = {
// try to store the value
for (var i = 0; i < keys.length; i++) {
- this.store[namespace][keys[i]] = apf.serialize(values[i]);
+ this.store[namespace][keys[i]] = JSON.stringify(values[i]);
}
return true;
View
2  core/lib/storage/flash.js
@@ -241,7 +241,7 @@ apf.storage.modules.flash = {
"Setting name/value pair", "Invalid namespace given: " + namespace));
//#endif
- this.callMethod('put', key, apf.serialize(value), namespace);
+ this.callMethod('put', key, JSON.stringify(value), namespace);
},
putMultiple: function(keys, values, namespace){
View
4 core/lib/storage/gears.js
@@ -118,7 +118,7 @@ apf.storage.modules["gears.sql"] = {
"Invalid namespace given: " + namespace));
//#endif
- value = apf.serialize(value);
+ value = JSON.stringify(value);
// try to store the value
try {
@@ -269,7 +269,7 @@ apf.storage.modules["gears.sql"] = {
for(var i=0;i<keys.length;i++) {
// serialize the value;
// handle strings differently so they have better performance
- var value = apf.serialize(values[i]);
+ var value = JSON.stringify(values[i]);
this.$sql.db.execute(stmt, [namespace, keys[i], value]);
}
View
2  core/lib/storage/html5.js
@@ -59,7 +59,7 @@ apf.storage.modules.html5 = {
key = this.getFullKey(key, namespace);
// serialize the value;
- value = apf.serialize(value);
+ value = JSON.stringify(value);
// try to store the value
try {
View
4 core/lib/storage/memory.js
@@ -61,7 +61,7 @@ apf.storage.modules.memory = {
//#endif
// serialize the value;
- value = apf.serialize(value);
+ value = JSON.stringify(value);
// store the value
if (!this.store[namespace])
@@ -207,7 +207,7 @@ apf.storage.modules.memory = {
// try to store the value
for (var i = 0; i < keys.length; i++) {
- this.store[namespace][keys[i]] = apf.serialize(values[i]);
+ this.store[namespace][keys[i]] = JSON.stringify(values[i]);
}
return true;
View
9 core/lib/teleport/http.js
@@ -141,17 +141,10 @@ apf.http = function(){
*/
this.saveCache = function(){
// #ifdef __DEBUG
- if (!apf.serialize)
- throw new Error(apf.formatErrorString(1079, this,
- "HTTP save cache",
- "Could not find JSON library."));
- // #endif
-
- // #ifdef __DEBUG
apf.console.info("[HTTP] Loading HTTP Cache", "teleport");
// #endif
- var strResult = apf.serialize(comm.cache);
+ var strResult = JSON.stringify(comm.cache);
apf.storage.put("cache_" + this.name, strResult,
apf.config.name + ".apf.http");
};
View
2  core/markup/aml/document.js
@@ -38,7 +38,9 @@
apf.AmlDocument = function(){
this.$prefixes = {};
this.$namespaceURIs = {};
+ // #ifdef __WITH_AMLCONFIGURATION
this.domConfig = new apf.AmlConfiguration();
+ // #endif
this.$init();
};
View
2  core/parsers/livemarkup.js
@@ -2277,7 +2277,7 @@ apf.lm_exec = new (function(){
? (m + ".queryNode('" + x.replace(/'/g, "\\'") + "')").replace(/([\[\{\}\]])/g, "\\$1")
: "")) + '"'
+ (options
- ? ' options="' + apf.serialize(options).escapeHTML()
+ ? ' options="' + JSON.stringify(options).escapeHTML()
.replace(/"/g, "&quot;")
.replace(/([\[\{\}\]])/g, "\\$1") + '"'
+ (options.editor ? ' editor="' + options.editor + '"' : "")
View
26 debugwin/apf_debugwin.js
@@ -13769,7 +13769,7 @@ apf.offline.transactions = {
var storage = apf.offline.storage;
var len = parseInt(storage.get("length", namespace)) || 0;
- storage.put(len, apf.serialize(type == "queue"
+ storage.put(len, JSON.stringify(type == "queue"
? {
undo : qItem.undo,
undoObj : qItem.undoObj.$export()
@@ -14338,7 +14338,7 @@ apf.offline.queue = {
//Check here for xml nodes in storeInfo??
//Store http info
- storage.put(len, apf.serialize(commInfo), namespace);
+ storage.put(len, JSON.stringify(commInfo), namespace);
storage.put("length", ++len, namespace);
/*
@@ -14710,7 +14710,7 @@ apf.offline.state = {
apf.saveData(this.setInstruction, {
ignoreOffline : true,
- data : apf.serialize(data),
+ data : JSON.stringify(data),
callback : function(data, state, extra){
if (extra.tpModule.retryTimeout(extra, state, apf.offline) === true)
return true;
@@ -26239,7 +26239,7 @@ apf.storage.modules["gears.sql"] = {
"Invalid namespace given: " + namespace));
- value = apf.serialize(value);
+ value = JSON.stringify(value);
// try to store the value
try {
@@ -26390,7 +26390,7 @@ apf.storage.modules["gears.sql"] = {
for(var i=0;i<keys.length;i++) {
// serialize the value;
// handle strings differently so they have better performance
- var value = apf.serialize(values[i]);
+ var value = JSON.stringify(values[i]);
this.$sql.db.execute(stmt, [namespace, keys[i], value]);
}
@@ -26848,7 +26848,7 @@ apf.storage.modules.memory = {
// serialize the value;
- value = apf.serialize(value);
+ value = JSON.stringify(value);
// store the value
if (!this.store[namespace])
@@ -26994,7 +26994,7 @@ apf.storage.modules.memory = {
// try to store the value
for (var i = 0; i < keys.length; i++) {
- this.store[namespace][keys[i]] = apf.serialize(values[i]);
+ this.store[namespace][keys[i]] = JSON.stringify(values[i]);
}
return true;
@@ -27332,7 +27332,7 @@ apf.storage.modules.flash = {
"Setting name/value pair", "Invalid namespace given: " + namespace));
- this.callMethod('put', key, apf.serialize(value), namespace);
+ this.callMethod('put', key, JSON.stringify(value), namespace);
},
putMultiple: function(keys, values, namespace){
@@ -27607,7 +27607,7 @@ apf.storage.modules.cookie = {
// serialize the value;
- value = apf.serialize(value);
+ value = JSON.stringify(value);
// store the value
apf.setcookie(namespace + "~" + key, value,
@@ -27752,7 +27752,7 @@ apf.storage.modules.cookie = {
// try to store the value
for (var i = 0; i < keys.length; i++) {
- this.store[namespace][keys[i]] = apf.serialize(values[i]);
+ this.store[namespace][keys[i]] = JSON.stringify(values[i]);
}
return true;
@@ -27914,7 +27914,7 @@ apf.storage.modules.html5 = {
key = this.getFullKey(key, namespace);
// serialize the value;
- value = apf.serialize(value);
+ value = JSON.stringify(value);
// try to store the value
try {
@@ -28916,7 +28916,7 @@ apf.http = function(){
apf.console.info("[HTTP] Loading HTTP Cache", "teleport");
- var strResult = apf.serialize(comm.cache);
+ var strResult = JSON.stringify(comm.cache);
apf.storage.put("cache_" + this.name, strResult,
apf.config.name + ".apf.http");
};
@@ -118919,7 +118919,7 @@ apf.jsonrpc = function(){
//Construct the XML-RPC message
var message = "{'method':'" + functionName + "','params':"
- + apf.serialize(args) + ",'id':" + this.id + "}";
+ + JSON.stringify(args) + ",'id':" + this.id + "}";
return message;
};
View
4 elements/remote.js
@@ -421,7 +421,7 @@ apf.remote.SESSION_TERMINATED = 0x0004; //Session is terminated
//#endif
if (this.transport)
- this.transport.sendUpdate(uri, apf.serialize(list));
+ this.transport.sendUpdate(uri, JSON.stringify(list));
this.dispatchEvent("rdbsend", {
uri : uri,
@@ -545,7 +545,7 @@ apf.remote.SESSION_TERMINATED = 0x0004; //Session is terminated
else {
oError = new Error(apf.formatErrorString(0, this,
"Remote Databinding Received", "Could not get XML node from \
- model with Xpath '" + xpath + "' for URI '" + oMessage.uri + "' " + apf.serialize(oMessage)));
+ model with Xpath '" + xpath + "' for URI '" + oMessage.uri + "' " + JSON.stringify(oMessage)));
}
//#endif
View
2  elements/rpc/jsonrpc.js
@@ -90,7 +90,7 @@ apf.jsonrpc = function(){
//Construct the XML-RPC message
var message = "{'method':'" + functionName + "','params':"
- + apf.serialize(args) + ",'id':" + this.id + "}";
+ + JSON.stringify(args) + ",'id':" + this.id + "}";
return message;
};
View
2  elements/xmpp.js
@@ -2505,7 +2505,7 @@ apf.xmpp = function(struct, tagName){
var v = this.$serverVars;
if (v["MAXPAUSE"] && this.connected && this.auth.toLowerCase() != "anonymous") {
delete v[ROSTER];
- apf.setcookie(COOKIE, apf.serialize(v) + "|" + (new Date()).valueOf()
+ apf.setcookie(COOKIE, JSON.stringify(v) + "|" + (new Date()).valueOf()
+ "|" + this.resource + "|" + this.$RID);
this.pause();
}
View
4 test/hotkey.html
@@ -23,10 +23,6 @@
<a:hbox padding="3">
<a:button onclick="alert('who fired me?')" hotkey="{apf.isMac ? 'Command-Z' : 'Ctrl-Z'}">Click Me!</a:button>
</a:hbox>
-
- <a:statusbar id="sbMain">
- <a:section />
- </a:statusbar>
</a:vbox>
<a:menu id="mnuFile">
Please sign in to comment.
Something went wrong with that request. Please try again.