Commit ede8ac65 authored by Rafael Ostertag's avatar Rafael Ostertag

Renamed Button.js to Context.js.

parent ecbef4a3
......@@ -6,7 +6,7 @@ QfqNS.QfqFormStates.Buttons = QfqNS.QfqFormStates.Buttons || {};
'use strict';
/**
* State Context.
* Buttons State Context.
*
* @param initialState optional initial state. If omitted, New is the initial state.
*
......@@ -14,27 +14,27 @@ QfqNS.QfqFormStates.Buttons = QfqNS.QfqFormStates.Buttons || {};
*
* @constructor
*/
n.Buttons = function (initialState, qfqForm) {
n.Context = function (initialState, qfqForm) {
this.state = initialState || new n.New(qfqForm);
};
n.Buttons.prototype.saveButtonPressed = function () {
n.Context.prototype.saveButtonPressed = function () {
this.state = this.state.saveButtonPressed();
};
n.Buttons.prototype.deleteButtonPressed = function () {
n.Context.prototype.deleteButtonPressed = function () {
this.state = this.state.deleteButtonPressed();
};
n.Buttons.prototype.newButtonPressed = function () {
n.Context.prototype.newButtonPressed = function () {
this.state = this.state.newButtonPressed();
};
n.Buttons.prototype.closeButtonPressed = function () {
n.Context.prototype.closeButtonPressed = function () {
this.state = this.state.closeButtonPressed();
};
n.Buttons.prototype.formModified = function () {
n.Context.prototype.formModified = function () {
this.state = this.state.formModified();
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment