From aa20090efcffe5498ef54b1dbcf76ff591497f1a Mon Sep 17 00:00:00 2001
From: Franco Pariani <franco19ps@gmail.com>
Date: Tue, 26 Feb 2019 23:31:40 -0300
Subject: [PATCH] Fix

---
 .../codemirror/addons/functions_definition_EN.js   |  4 ----
 .../codemirror/addons/functions_definition_ES.js   |  4 ----
 .../src/app/layout/matefun/matefun.component.html  |  1 -
 .../src/app/layout/matefun/matefun.component.ts    | 14 +++++++++-----
 4 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/Frontend Angular 4/src/app/layout/matefun/codemirror/addons/functions_definition_EN.js b/Frontend Angular 4/src/app/layout/matefun/codemirror/addons/functions_definition_EN.js
index aa3c040..f27a7f3 100644
--- a/Frontend Angular 4/src/app/layout/matefun/codemirror/addons/functions_definition_EN.js	
+++ b/Frontend Angular 4/src/app/layout/matefun/codemirror/addons/functions_definition_EN.js	
@@ -190,10 +190,6 @@ var mac = /Mac/.test(navigator.platform);
       elt.className = className;
       if (cur.render) cur.render(elt, data, cur);
       else { 
-        var title = ownerDocument.createElement("p");
-        title.className = "function-definition-title";
-        title.appendChild(ownerDocument.createTextNode("Function's typing \n"));
-        elt.appendChild(title);
         var rexp_name = new RegExp(/(.*\:\:)(.*)/.source, "g");
         var m = rexp_name.exec(cur.displayText || getText(cur));
         var b_elem = ownerDocument.createElement("b"); 
diff --git a/Frontend Angular 4/src/app/layout/matefun/codemirror/addons/functions_definition_ES.js b/Frontend Angular 4/src/app/layout/matefun/codemirror/addons/functions_definition_ES.js
index d85d7b3..8e8c044 100644
--- a/Frontend Angular 4/src/app/layout/matefun/codemirror/addons/functions_definition_ES.js	
+++ b/Frontend Angular 4/src/app/layout/matefun/codemirror/addons/functions_definition_ES.js	
@@ -190,10 +190,6 @@ var mac = /Mac/.test(navigator.platform);
       elt.className = className;
       if (cur.render) cur.render(elt, data, cur);
       else { 
-        var title = ownerDocument.createElement("p");
-        title.className = "function-definition-title";
-        title.appendChild(ownerDocument.createTextNode("Tipado de la función \n"));
-        elt.appendChild(title);
         var rexp_name = new RegExp(/(.*\:\:)(.*)/.source, "g");
         var m = rexp_name.exec(cur.displayText || getText(cur));
         var b_elem = ownerDocument.createElement("b"); 
diff --git a/Frontend Angular 4/src/app/layout/matefun/matefun.component.html b/Frontend Angular 4/src/app/layout/matefun/matefun.component.html
index f605a74..a4b29eb 100755
--- a/Frontend Angular 4/src/app/layout/matefun/matefun.component.html	
+++ b/Frontend Angular 4/src/app/layout/matefun/matefun.component.html	
@@ -219,7 +219,6 @@
                     </form>
                 </div>
                 <codemirror
-                    #codemirror_def
                     class="codemirrorPrograma"
                     [(ngModel)]="archivoDefinicion.contenido"
                     [config]="configCodeMirrorDefinicion"
diff --git a/Frontend Angular 4/src/app/layout/matefun/matefun.component.ts b/Frontend Angular 4/src/app/layout/matefun/matefun.component.ts
index d7c190b..92cbfd0 100755
--- a/Frontend Angular 4/src/app/layout/matefun/matefun.component.ts	
+++ b/Frontend Angular 4/src/app/layout/matefun/matefun.component.ts	
@@ -111,7 +111,7 @@ export class MateFunComponent {
         },
         files: null
     };
-    configCodeMirrorDefinicion: any;
+    configCodeMirrorDefinicion = {};
     themes = ['3024-day', '3024-night', 'abcdef', 'ambiance-mobile', 'ambiance', 'base16-dark', 'base16-light', 'bespin', 'blackboard', 'cobalt', 'colorforth', 'dracula', 'duotone-dark', 'duotone-light', 'eclipse', 'elegant', 'erlang-dark', 'hopscotch', 'icecoder', 'isotope', 'lesser-dark', 'liquibyte', 'material', 'mbo', 'mdn-like', 'midnight', 'monokai', 'neat', 'neo', 'night', 'panda-syntax', 'paraiso-dark', 'paraiso-light', 'pastel-on-dark', 'railscasts', 'rubyblue', 'seti', 'solarized', 'the-matrix', 'tomorrow-night-bright', 'tomorrow-night-eighties', 'ttcn', 'twilight', 'vibrant-ink', 'xq-dark', 'xq-light', 'yeti', 'zenburn']
     version: string = npm.version;
 
@@ -154,8 +154,10 @@ export class MateFunComponent {
         this.code = "my code";
         let svg : string = '';
 
-        this.configCodeMirrorDefinicion = this.configCodeMirror;
-        this.configCodeMirrorDefinicion.readOnly = true;
+        for (var key in this.configCodeMirror){
+            this.configCodeMirrorDefinicion[key] = this.configCodeMirror[key];
+        }
+        this.configCodeMirrorDefinicion['readOnly'] = true;
     }
 
 
@@ -484,8 +486,10 @@ export class MateFunComponent {
 
     goToFilesPreview(file_found, word){
         this.mostrandoDefinicion = true;
-        this.configCodeMirrorDefinicion = this.configCodeMirror;
-        this.configCodeMirrorDefinicion.readOnly = true;
+        for (var key in this.configCodeMirror){
+            this.configCodeMirrorDefinicion[key] = this.configCodeMirror[key];
+        }
+        this.configCodeMirrorDefinicion['readOnly'] = true;
         this.archivoDefinicion = this.archivosTree.archivos.filter(a => a.id == parseInt(file_found.id))[0];
         this.jump = true;  
         this.jump_word = word;
-- 
GitLab