import $ from 'jquery'; import { Types } from '../types'; import * as Models from '../ivprog_elements'; import { LocalizedStrings } from '../../services/localizedStringsService'; import * as CommandsManagement from '../commands'; export function createFloatingCommand () { return $('
'+LocalizedStrings.getUI('text_break')+'
'); } export function renderCommand (command, function_obj) { var el = $('
'+LocalizedStrings.getUI('text_break')+'
'); el.data('command', command); addHandlers(command, function_obj, el); return el; } function addHandlers (command, function_obj, break_dom) { break_dom.find('.button_remove_command').on('click', function() { if (CommandsManagement.removeCommand(command, function_obj, break_dom)) { break_dom.fadeOut(400, function() { break_dom.remove(); }); } }); }