Lines Matching refs:command

174 function changeTaskCommandId(command, oldId, newId) {  argument
175 updTask(command.value, oldId, newId);
176 updTask(command.oldValue, oldId, newId);
189 function changeLinkCommandId(command, oldId, newId) { argument
190 updLink(command.value, oldId, newId);
191 updLink(command.oldValue, oldId, newId);
198 if (entry.commands[j].entity === undo.command.entity.task) {
201 else if (entry.commands[j].entity === undo.command.entity.link) {
212 var command = entry.commands[j];
213 if (command.entity === undo.command.entity.link) {
214 if (command.value && command.value.id === oldId) {
215 command.value.id = newId;
217 if (command.oldValue && command.oldValue.id === oldId) {
218 command.oldValue.id = newId;
324 this._storeTaskCommand(task, this._undo.command.type.add);
329 this._storeTaskCommand(task, this._undo.command.type.update);
334 …ityCommand(task, this.getInitialTask(task.id), this._undo.command.type.move, this._undo.command.en…
339 this._storeTaskCommand(task, this._undo.command.type.remove);
343 this._storeTaskCommand(children[i], this._undo.command.type.remove);
349 this._storeLinkCommand(childrenLinks[i], this._undo.command.type.remove);
356 this._storeLinkCommand(link, this._undo.command.type.add);
361 this._storeLinkCommand(link, this._undo.command.type.update);
366 this._storeLinkCommand(link, this._undo.command.type.remove);
526 Monitor.prototype._storeCommand = function (command) { argument
533 this._batchAction.commands.push(command);
536 var action = undo.action.create([command]);
542 var command = undo.command.create(obj, old, actionType, entityType);
543 this._storeCommand(command);
546 … this._storeEntityCommand(obj, this.getInitialTask(obj.id), type, this._undo.command.entity.task);
549 … this._storeEntityCommand(obj, this.getInitialLink(obj.id), type, this._undo.command.entity.link);
599 var commands = _this.command;
601 var command = revert.commands[i] = commands.invert(revert.commands[i]);
602 … if (command.type === commands.type.update || command.type === commands.type.move) {
603 … _a = [command.oldValue, command.value], command.value = _a[0], command.oldValue = _a[1];
609 this.command = { class in AnonymousFunction4dce81d40100.AnonymousFunction4dce81d42100.Undo.Undo
622 invert: function (command) { argument
623 var revert = gantt.copy(command);
624 revert.type = this.inverseCommands(command.type);
627 inverseCommands: function (command) { argument
628 switch (command) {
638 gantt.assert(false, "Invalid command " + command);
660 this.command.entity = gantt.config.undo_types;
661 this.command.type = gantt.config.undo_actions;
755 var command = null;
756 var entities = this.command.entity;
757 var actions = this.command.type;
776 command = action.commands[i];
777 var method = methods[command.entity][command.type];
778 var getMethod = methods[command.entity].get;
779 var check = methods[command.entity].isExists;
780 if (command.type === actions.add) {
781 … gantt[method](command.oldValue, command.oldValue.parent, command.oldValue.$index);
783 else if (command.type === actions.remove) {
784 if (gantt[check](command.value.id)) {
785 gantt[method](command.value.id);
788 else if (command.type === actions.update) {
789 var item = gantt[getMethod](command.value.id);
790 for (var prop in command.value) {
792 item[prop] = command.value[prop];
795 gantt[method](command.value.id);
797 else if (command.type === actions.move) {
798 gantt[method](command.value.id, command.value.$index, command.value.parent);