Commit 63ab5185 authored by Tristan Cavelier's avatar Tristan Cavelier

serialized overriding simplified on command.js

parent 8e35d3a6
...@@ -36,6 +36,20 @@ var command = function(spec, my) { ...@@ -36,6 +36,20 @@ var command = function(spec, my) {
priv.on_going = false; priv.on_going = false;
// Methods // // Methods //
/**
* Returns a serialized version of this command.
* @method super_serialized
* @return {object} The serialized command.
*/
that.super_serialized = function () {
var o = that.serialized() || {};
o["label"] = that.getLabel();
o["tried"] = priv.tried,
o["doc"] = that.cloneDoc(),
o["option"] = that.cloneOption()
return o;
};
/** /**
* Returns a serialized version of this command. * Returns a serialized version of this command.
* Override this function. * Override this function.
...@@ -43,10 +57,7 @@ var command = function(spec, my) { ...@@ -43,10 +57,7 @@ var command = function(spec, my) {
* @return {object} The serialized command. * @return {object} The serialized command.
*/ */
that.serialized = function() { that.serialized = function() {
return {label:that.getLabel(), return {};
tried:priv.tried,
doc:that.cloneDoc(),
option:that.cloneOption()};
}; };
/** /**
......
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