Browse Source

Corrigindo o tamanho da tela da criação de atividades

Igor 5 years ago
parent
commit
56861dc1c2

File diff suppressed because it is too large
+ 33 - 12
build/ivprog.bundle.js


File diff suppressed because it is too large
+ 1 - 1
build/ivprog.bundle.js.map


+ 2 - 2
css/ivprog-visual-1.0.css

@@ -774,7 +774,7 @@ div.function_name_div_updated:active,
 }
 
 .command_drag {
-	cursor: move;
+	/*cursor: move;*/
 }
 .command_container.over_command_drag {
 	border: 3px dotted blue !important;
@@ -855,4 +855,4 @@ div.ui.checkbox.transition.visible {
 
 .div_parent_handler:hover i.handler {
 	opacity: 1;
-}
+}

+ 1 - 1
i18n/en/ui.json

@@ -131,5 +131,5 @@
   "$castInt": "to_integer",
   "$castBool": "to_logic",
   "$castString": "to_string",
-  "text_ivprog_version":"Version 2018_12_19 Build 13_18"
+  "text_ivprog_version":"Version"
 }

+ 1 - 1
i18n/es/ui.json

@@ -136,5 +136,5 @@
   "$castInt": "to_integer",
   "$castBool": "to_logic",
   "$castString": "to_string",
-  "text_ivprog_version":"Version 2018_12_19 Build 13_18"
+  "text_ivprog_version":"Version"
 }

+ 1 - 1
i18n/pt/ui.json

@@ -138,5 +138,5 @@
   "$castInt": "como_inteiro",
   "$castBool": "como_logico",
   "$castString": "como_cadeia",
-  "text_ivprog_version":"Versão 2018_12_19 Build 13_18"
+  "text_ivprog_version":"Versão"
 }

+ 4 - 1
js/iassign-integration-functions.js

@@ -296,6 +296,10 @@ function prepareActivityCreation () {
     prepareTableSettings(config_div.find('.content'));
 
     prepareTableTestCases(cases_test_div.find('.content'));
+
+    if (inIframe()) {
+        $('.ui.styled.accordion').css('width', '96%');
+    }
 }
 
 function prepareTableTestCases (div_el) {
@@ -458,7 +462,6 @@ function orderWidth() {
 function orderIcons() {
     $('.ui.one.column.doubling.stackable.grid.container').css('display', 'none');
     $('.only_in_frame').css('display', 'block');
-    
 }
 
 

+ 1 - 0
js/visualUI/commands/return.js

@@ -21,6 +21,7 @@ export function renderCommand (command, function_obj) {
 		VariableValueMenu.renderMenu(command, command.variable_value_menu, el.find('.var_value_menu_div'), function_obj);
 	} else {
 		el.find('.var_value_menu_div').remove();
+		command.variable_value_menu = null;
 	}
 
 

+ 15 - 4
js/visualUI/functions.js

@@ -20,6 +20,7 @@ import '../Sortable.js';
 
 var counter_new_functions = 0;
 var counter_new_parameters = 0;
+var ivprog_version = '2019_01_13 Build 18_55'
 
 let studentTemp = null;
 let domConsole = null;
@@ -116,7 +117,7 @@ WatchJS.watch(window.program_obj.functions, function(){
   } else {
     AlgorithmManagement.renderAlgorithm();
   }
-}, 0);
+}, 1);
 
 function addFunctionHandler () {
 
@@ -368,7 +369,7 @@ export function renderFunction (function_obj) {
     }
   });
 
-  Sortable.create(appender.find(".commands_list_div")[0], {
+  /*Sortable.create(appender.find(".commands_list_div")[0], {
     handle: '.command_drag',
     animation: 100,
     ghostClass: 'ghost',
@@ -376,7 +377,7 @@ export function renderFunction (function_obj) {
     onEnd: function (evt) {
        //updateSequenceLocals(evt.oldIndex, evt.newIndex, function_obj);
     }
-  });
+  });*/
 
   if (!function_obj.is_main) {
     Sortable.create(appender.find(".container_parameters_list")[0], {
@@ -493,7 +494,7 @@ $( document ).ready(function() {
     }
   });
   $('.help_button').popup({
-    content : LocalizedStrings.getUI("tooltip_help") + ' - ' + LocalizedStrings.getUI("text_ivprog_version"),
+    content : LocalizedStrings.getUI("tooltip_help") + ' - ' + LocalizedStrings.getUI("text_ivprog_version") + ' ' + ivprog_version,
     delay: {
       show: time_show,
       hide: 0
@@ -770,6 +771,11 @@ function renderParameter (function_obj, parameter_obj, function_container) {
 }
 
 function updateParameterName (parameter_var, new_name, parameter_obj_dom, function_obj) {
+  
+  if (parameter_var.name == new_name) {
+    return;
+  }
+
   if (isValidIdentifier(new_name)) {
     if (variableNameAlreadyExists(new_name, function_obj)) {
       Utils.renderErrorMessage(parameter_obj_dom.find('.parameter_div_edit'), LocalizedStrings.getUI('inform_valid_variable_duplicated'));
@@ -803,6 +809,11 @@ function variableNameAlreadyExists (name_var, function_obj) {
 }
 
 function updateFunctionName (function_var, new_name, function_obj_dom) {
+  
+  if (function_var.name == new_name) {
+    return;
+  }
+  
   if (isValidIdentifier(new_name)) {
     if (functionNameAlreadyExists(new_name)) {
       Utils.renderErrorMessage(function_obj_dom.find('.function_name_div'), LocalizedStrings.getUI('inform_valid_name_duplicated'));

+ 5 - 0
js/visualUI/globals.js

@@ -33,6 +33,11 @@ function toggleConstant (global_var) {
 }
 
 function updateName (global_var, new_name, global_obj_dom) {
+
+	if (global_var.name == new_name) {
+		return;
+	}
+
 	if (isValidIdentifier(new_name)) {
 		if (globalNameAlreadyExists(new_name)) {
 			Utils.renderErrorMessage(global_obj_dom.find('.editing_name_var'), LocalizedStrings.getUI('inform_valid_global_duplicated'));

+ 4 - 0
js/visualUI/variables.js

@@ -30,6 +30,10 @@ export function addVariable (function_obj, function_container, is_in_click = fal
 
 function updateName (variable_obj, new_name, variable_obj_dom, function_obj) {
 
+	if (variable_obj.name == new_name) {
+		return;
+	}
+
 	if (isValidIdentifier(new_name)) {
 		if (variableNameAlreadyExists(new_name, function_obj)) {
 			Utils.renderErrorMessage(variable_obj_dom.find('.editing_name_var'), LocalizedStrings.getUI('inform_valid_variable_duplicated'));