Przeglądaj źródła

Created button in attribution

Igor 3 lat temu
rodzic
commit
d85bc6f606
1 zmienionych plików z 5 dodań i 1 usunięć
  1. 5 1
      js/visualUI/commands/attribution.js

+ 5 - 1
js/visualUI/commands/attribution.js

@@ -12,7 +12,7 @@ export function createFloatingCommand () {
 
 export function renderCommand (command, function_obj) {
 	var el = $('<div class="ui attribution command_container"><i class="ui icon small arrow left command_drag"></i> <i class="ui icon times red button_remove_command"></i> <div class="var_attributed"></div> <span class="text_attr_receives span_command_spec">'+LocalizedStrings.getUI('text_receives')+'</span> '
-		 + '<div class="expression_elements"></div>  <span class="textual_expression"></span> <i class="ui icon unlock button_alternate_expression"></i> </div>');
+		 + '<div class="expression_elements"></div>  <span class="textual_expression"></span> <i class="ui icon i cursor button_write_expression"></i> <i class="ui icon unlock button_alternate_expression"></i> </div>');
 	el.data('command', command);
 
 	VariableValueMenu.renderMenu(command, command.variable, el.find('.var_attributed'), function_obj);
@@ -428,6 +428,10 @@ function addMenuItens (command, function_obj, expression_div) {
 
 function addHandlers (command, function_obj, attribution_dom) {
 
+	attribution_dom.find('.button_write_expression').on('click', function() {
+		console.log(ivprogCore.parseExpression("5+3"));
+	});
+
 	$(attribution_dom.find('.textual_expression')[0]).toggle();
 	
 	attribution_dom.find('.button_alternate_expression').on('click', function() {