Members
-
errors :Array.<String>
-
-
error :WizardModuleError
-
Description
current module error if any
-
template :function|String
-
Description
The template for this view, in general a function that accepts this view context object and returns an HTML string.
If it is a string an AMD module with that name is tried to be loaded.
If it is undefined the view will be rendered without errors as an empty stringDetails
-
events :Object|Object
-
Details
-
bindings :Object
-
Details
Methods
-
disableInterface()
-
Description
General method to disable the module interface called at the moment of submitting the step
-
enableInterface()
-
Description
General method to re-enable the module interface called after getting an ERROR on submitting
-
refresh()
-
Description
Auxiliary method to refresh a module. For example, iIt is implemented by the OrderWizard to refresh titles
-
submit() → {Deferred}
-
Description
by default, a module returns it's validation promise.
Returns
-
cancel() → {Deferred}
-
Returns
-
isValid() → {Deferred}
-
Description
validate resolves a promise because maybe it needs to do some ajax for validation
Returns
-
isActive() → {Boolean}
-
Description
Determines is a module is active (can be submitted, rendered or just use) or not.
Returns
-
getTitle() → {String}
-
Description
returns the title of the module, can be overridden in the configuration file.
Returns
-
manageError( error ) → {undefined}
-
Parameters
Name Type Description errorWizardModuleError Returns
-
showError() → {undefined}
-
Description
Shows the current error if any, see error
Returns
-
clearError() → {undefined}
-
Description
clear all error messages being shown
Returns
-
clearGeneralMessages() → {undefined}
-
Description
clear all general messages being shown
Returns
-
showGeneralMessage( message, type ) → {undefined}
-
Description
Notify a message (not just an error) at step level. Type can be a boolean (true: for errors, false: for success) or string to add a class alert-
Parameters
Name Type Description messagestring typestring Returns
-
initialize( ...options ) → {void}
-
Description
this is executed when a new view is instantiated - equivalent to the instance contructor.
Parameters
Name Type Attributes Description optionsany <repeatable> Returns
Details
-
render() → {void}
-
Description
Generates the HTML of the page.
Returns
Details
-
getContext() → {Object}
-
Description
Returns the object which will be consumed by this view's template
Returns
Details
-
destroy() → {void}
-
Description
Removes the view from the DOM, as well as all events associated with it. If you override this method, make sure you call the parent class immediately in the child class.
You should call this method in your child class when you want to do additional work at the time the view is destroyed. For example, if you add JQuery events in a view, you will need to stop listening for those same events when the view is destroyed.
function CardsView() { //... function destroy() { View.call(this); // Do other stuff here. For example, stop listening to events... } }Returns
Details
-
extend( view_definition )
-
Parameters
Name Type Description view_definitionView an object with some of this class members.
Details