Broadcast calendar eventlist to other modules.

This commit is contained in:
Michael Teeuw
2016-10-14 15:23:03 +02:00
parent 8b004a549a
commit 5858e862d9
6 changed files with 109 additions and 80 deletions

View File

@@ -11,24 +11,6 @@
// The base Class implementation (does nothing)
this.Class = function() {};
//Define the clone method for later use.
function cloneObject(obj) {
if (obj === null || typeof obj !== "object") {
return obj;
}
var temp = obj.constructor(); // give temp the original obj's constructor
for (var key in obj) {
temp[key] = cloneObject(obj[key]);
if (key === "lockStrings") {
Log.log(key);
}
}
return temp;
}
// Create a new Class that inherits from this class
Class.extend = function(prop) {
var _super = this.prototype;
@@ -87,5 +69,24 @@
};
})();
//Define the clone method for later use.
//Helper Method
function cloneObject(obj) {
if (obj === null || typeof obj !== "object") {
return obj;
}
var temp = obj.constructor(); // give temp the original obj's constructor
for (var key in obj) {
temp[key] = cloneObject(obj[key]);
if (key === "lockStrings") {
Log.log(key);
}
}
return temp;
}
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {module.exports = Class;}

View File

@@ -371,20 +371,6 @@ Module.create = function (name) {
return;
}
//Define the clone method for later use.
function cloneObject(obj) {
if (obj === null || typeof obj !== "object") {
return obj;
}
var temp = obj.constructor(); // give temp the original obj's constructor
for (var key in obj) {
temp[key] = cloneObject(obj[key]);
}
return temp;
}
var moduleDefinition = Module.definitions[name];
var clonedDefinition = cloneObject(moduleDefinition);