How to use the temp.deleteType function in temp

To help you get started, we’ve selected a few temp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github felixhayashi / TW5-TiddlyMap / src / plugins / felixhayashi / tiddlymap / js / startup.listener.js View on Github external
GlobalListener.prototype.handleSaveTypeForm = function(event) {
  
  var tObj = utils.getTiddler(event.paramObject.output);  
  if(!tObj) return;
  
  var mode = event.paramObject.mode;
  var type = (mode === "manage-edge-types"
              ? new EdgeType(tObj.fields.id)
              : new NodeType(tObj.fields.id));
  
  if(utils.isTrue(tObj.fields["temp.deleteType"], false)) {
    this.deleteType(mode, type, tObj);
  } else {
    this.saveType(mode, type, tObj);
  }
  
};
github felixhayashi / TW5-TiddlyMap / src / plugins / felixhayashi / tiddlymap / js / services / Listener.js View on Github external
const handleSaveTypeForm = ({paramObject}) => {

  const tObj = utils.getTiddler(paramObject.output);
  if (!tObj) return;

  const id = tObj.fields.id;
  const mode = paramObject.mode;

  if (utils.isTrue(tObj.fields['temp.deleteType'], false)) {
    deleteType(mode, id, tObj);
  } else {
    saveType(mode, id, tObj);
  }

};