Skip to content

Commit

Permalink
Exclude keywords and datos_generales from content #6
Browse files Browse the repository at this point in the history
  • Loading branch information
asumaran committed Feb 8, 2016
1 parent 4788e24 commit b93ce25
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/gimporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
Expand Down Expand Up @@ -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 = '';
Expand All @@ -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 = [];
Expand Down Expand Up @@ -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 = '';
Expand All @@ -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 = [];
Expand Down

0 comments on commit b93ce25

Please sign in to comment.