static/kelmu.editor.js
function() {
      // Remove the element
      return $('<button></button>').text('Remove').addClass('btn').click(function(e) {
        e.preventDefault();
        var data = window.kelmu.data[id];
        data.definitions['step' + data.stepNumber][data.subStepNumber].splice(window.kelmu.data[id].selectedElementNumber, 1);
        window.kelmu.data[id].selectedElementNumber = -1;
        window.kelmu.data[id].actions.update();
        updateView(true, true);
        notifyModifications();
      });
    }
function() {
      // Remove the element
      return $('<button></button>').text('Remove').addClass('btn').click(function(e) {
        e.preventDefault();
        var data = window.kelmu.data[id];
        data.definitions['step' + data.stepNumber][data.subStepNumber].splice(window.kelmu.data[id].selectedElementNumber, 1);
        window.kelmu.data[id].selectedElementNumber = -1;
        window.kelmu.data[id].actions.update();
        updateView(true, true);
        notifyModifications();
      });
    }
function ( ) { // Remove the element return $ ( '<button></button>' ) . text ( 'Remove' ) . addClass ( 'btn' ) . click ( function ( e ) { e . preventDefault ( ) ; var data = window . kelmu . data [ id ] ; data . definitions [ 'step' + data . stepNumber ] [ data . subStepNumber ] . splice ( window . kelmu . data [ id ] . selectedElementNumber , 1 ) ; window . kelmu . data [ id ] . selectedElementNumber = - 1 ; window . kelmu . data [ id ] . actions . update ( ) ; updateView ( true , true ) ; notifyModifications ( ) ; } ) ; }
A helper function for creating remove buttons
A helper function for creating remove buttons