From b93ce259832775a2e2fb19bdf3ea5c0fda752a12 Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Mon, 8 Feb 2016 14:10:52 -0500 Subject: [PATCH] Exclude keywords and datos_generales from content #6 --- lib/gimporter.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/gimporter.js b/lib/gimporter.js index d8bdbdb..2299b0b 100644 --- a/lib/gimporter.js +++ b/lib/gimporter.js @@ -5,6 +5,7 @@ var Q = require('q'); var LEGISLACION_CODE = '1'; var JURISPRUDENCIA_CODE = '3'; +var CMSCONFIGEXCLUDES = ['titulo', 'keywords', 'datos_generales']; var gimporter = {}; var connection = {}; @@ -127,7 +128,6 @@ gimporter.getDataFromFile = function ($file, file) { }; gimporter.getLegislacionData = function ($file, file) { - var cmsConfigExcludes = ['titulo', 'keywords', 'datos_generales']; var titleEl = $file('view > [cms_config="titulo"]'); var contentHtml = ''; var contentText = ''; @@ -137,7 +137,7 @@ gimporter.getLegislacionData = function ($file, file) { var $view = $file('view'); $file('version').not(function (i, el) { - return cmsConfigExcludes.indexOf(el.attribs.cms_config) > -1; + return CMSCONFIGEXCLUDES.indexOf(el.attribs.cms_config) > -1; }).each(function (k, v) { var $el = $file(v); var childrens = []; @@ -177,7 +177,6 @@ gimporter.getLegislacionData = function ($file, file) { }; gimporter.getJurisprudenciaData = function ($file, file) { - var cmsConfigExcludes = ['datos_generales']; var titleEl = $file('view > [cms_config="Sumilla"]'); var contentHtml = ''; var contentText = ''; @@ -187,7 +186,7 @@ gimporter.getJurisprudenciaData = function ($file, file) { var $view = $file('view'); $file('version').not(function (i, el) { - return cmsConfigExcludes.indexOf(el.attribs.cms_config) > -1; + return CMSCONFIGEXCLUDES.indexOf(el.attribs.cms_config) > -1; }).each(function (k, v) { var $el = $file(v); var childrens = [];