Browse Source

boot.js: installMethod called directly inside ManipulationBrik

Herbert Vojčík 11 years ago
parent
commit
ca83c78f4b
1 changed files with 8 additions and 9 deletions
  1. 8 9
      js/boot.js

+ 8 - 9
js/boot.js

@@ -265,32 +265,31 @@ function ClassInitBrik(brikz, st) {
 
 function ManipulationBrik(brikz, st) {
 
-	var manip = this;
-
-	manip.installMethodIfAbsent = function (handler, klass) {
+	this.installMethodIfAbsent = function (handler, klass) {
 		var jsFunction = klass.fn.prototype[handler.jsSelector];
 		if(!jsFunction) {
-			manip.installMethod(handler, klass);
+			installMethod(handler, klass);
 		}
 	};
 
-	manip.installMethod = function (method, klass) {
+	function installMethod (method, klass) {
 		Object.defineProperty(klass.fn.prototype, method.jsSelector, {
 			value: method.fn,
 			enumerable: false, configurable: true, writable: true
 		});
-	};
+	}
+	this.installMethod = installMethod;
 
-	manip.wireKlass = function (klass) {
+	this.wireKlass = function (klass) {
 		Object.defineProperty(klass.fn.prototype, "klass", {
 			value: klass,
 			enumerable: false, configurable: true, writable: true
 		});
 	};
 
-	manip.reinstallMethods = function (klass) {
+	this.reinstallMethods = function (klass) {
 		for(var keys = Object.keys(klass.methods), i=0; i<keys.length; i++) {
-			manip.installMethod(klass.methods[keys[i]], klass);
+			installMethod(klass.methods[keys[i]], klass);
 		}
 	};
 }