2011-01-24 19:38:52 +00:00
|
|
|
var FunctionController = function() {
|
|
|
|
this.type = "function";
|
2011-01-24 20:28:13 +00:00
|
|
|
var _this = this;
|
2011-01-24 19:38:52 +00:00
|
|
|
Controller.apply(this, arguments);
|
|
|
|
var input = document.createElement('input');
|
|
|
|
input.setAttribute('type', 'submit');
|
2011-01-24 20:28:13 +00:00
|
|
|
this.domElement.addEventListener('click', function() {
|
|
|
|
_this.object[_this.propertyName].call(_this.object);
|
|
|
|
}, false);
|
|
|
|
this.domElement.style.cursor = "pointer";
|
2011-01-24 19:38:52 +00:00
|
|
|
this.domElement.appendChild(input);
|
|
|
|
};
|
|
|
|
FunctionController.prototype = new Controller();
|
|
|
|
FunctionController.prototype.constructor = FunctionController;
|