Переглянути джерело

Enviando correção do botão X

Igor Félix 6 роки тому
батько
коміт
2555de4a4f
2 змінених файлів з 5 додано та 5 видалено
  1. 3 3
      js/ivprog-visual-1.0.js
  2. 2 2
      js/ivprog-visual-functions-1.0.js

+ 3 - 3
js/ivprog-visual-1.0.js

@@ -21,12 +21,12 @@ var Programa = function () {
 	this.funcoes = new Array();
 };
 
-Programa.prototype.adicionarFuncao = function(funcao){
-	this.funcoes.push(funcao);
+function adicionarFuncao(funcao) {
+	programa.funcoes.push(funcao);
 };
 
 // Adicionando a função principal automaticamente
 var programa = new Programa();
 var funcaoPrincipal = new Funcao("principal", tiposDados.void, 0, null, true);
 
-programa.adicionarFuncao(funcaoPrincipal);
+adicionarFuncao(funcaoPrincipal);

+ 2 - 2
js/ivprog-visual-functions-1.0.js

@@ -2,7 +2,7 @@ var counter_new_functions = 0;
 
 function addFunctionHandler() {
 	new_function = new Funcao("new_function_" + counter_new_functions);
-	programa.adicionarFuncao(new_function);
+	adicionarFuncao(new_function);
 
 	counter_new_functions ++;
 	renderAlgorithm();
@@ -103,7 +103,7 @@ function appendFunction(function_obj, sequence) {
 	$('.all_functions').append('<div class="ui secondary segment function_div list-group-item">'
 		+ '<span class="glyphicon glyphicon-move" aria-hidden="true"><i class="icon sort alternate vertical"></i></span>'
 		
-		+ (!function_obj.eh_principal ? '<button class="ui icon button large remove_function_button" onclick="removeFunctionHandler(this.parentNode, '+sequence+')"><i class="red icon times outline"></i></button>' : '')
+		+ (!function_obj.eh_principal ? '<button class="ui icon button large remove_function_button" onclick="removeFunctionHandler(this.parentNode, '+sequence+')"><i class="red icon times"></i></button>' : '')
 		+ '<button class="ui icon button tiny minimize_function_button" onclick="minimizeFunctionHandler(this.parentNode, '+sequence+')"><i class="icon window minimize"></i></button>'
 
 		+ '<div class="function_signature_div">function '