Commit ab858b09 authored by Alberto Pascual's avatar Alberto Pascual
Browse files

minor changes

parent 1fcee3db
Pipeline #447 passed with stages
in 22 seconds
......@@ -51,6 +51,7 @@
stylebg="bg-aqua"
object="pp"
aggKey="schema:search"
filters="{{filters}}"
subtitle="Total elements"
title="Partido Popular"
data="{{data}}">
......@@ -62,6 +63,7 @@
object="psoe"
aggKey="schema:search"
title="PSOE"
filters="{{filters}}"
icon="/images/partidos/psoe_icon.png"
subtitle="Total elements"
stylebg="bg-red">
......@@ -72,7 +74,8 @@
data="{{data}}"
object="podemos"
aggKey="schema:search"
title="Podemos"
title="Podemos"
filters="{{filters}}"
icon="/images/partidos/podemos_icon.png"
subtitle="Total elements"
stylebg="bg-purple">
......@@ -83,7 +86,8 @@
data="{{data}}"
object="ciudadanos"
aggKey="schema:search"
title="Ciudadanos"
title="Ciudadanos"
filters="{{filters}}"
icon="/images/partidos/ciudadanos_icon.png"
subtitle="Total elements"
stylebg="bg-orange">
......
......@@ -296,6 +296,7 @@ Data can be provided in one of three ways:
//console.log(term1)
var object = {terms: term1}
if (field == 'schema:datePublished'){
return
/*var date = param.toLowerCase().toString().split("-");
var term = date[1]+'-'+date[0]+'-01'
object = {range: {'schema:datePublished': {lte: term, boost: 5}}}*/
......@@ -318,6 +319,7 @@ Data can be provided in one of three ways:
}
}
}
console.log(this.filters)
},
ready: function() {
......
......@@ -23,13 +23,13 @@
<div class$="tweet {{checkSentiment(news.sentiments)}} same-height" ident$="subitem[[index]]" on-click="toggle" aria-expanded$="[[opened]]" aria-controls="collapse" style=" text-align: center;" data-toggle="tooltip" data-placement="top" title="Click for details">
<div class="row"><div class="col-md-12 headline">
<div class="col-md-2">
<img src={{checkSource(news.schema:author)}} style="width: 100%; display:block; position: relative;" align="left">
<img src={{checkSource(news.schema:author)}} style="width: 80px; display:block; position: relative;" align="left">
</div>
<div class="col-md-7">
<span style="font-size:15px; display:inline-block; vertical-align: middle;">{{news.schema:headline}}</span>
</div>
<div class="col-md-3">
<span style="text-align:center;padding-left: 16%;">{{getDate(news.schema:datePublished)}}</span><iron-icon style="left:96%; top: 8px;" icon="icons:search">
<span style="text-align:center;padding-left: 16%;">{{getDate(news.schema:datePublished)}}</span><iron-icon style="left:87%; top: 8px; position:absolute;" icon="icons:search">
</div>
</div>
......@@ -37,6 +37,8 @@
<iron-collapse ident$="subitem[[index]]">
<div class="content" style="text-align:justify; width: 94%; margin: 0 auto;">
<br>
<a href="{{returnURL(news)}}" target="_blank">View original source</a>
<br>
<template is="dom-repeat" items="{{news.sentiments}}" as="sentiment">
<span class$="{{checkSpanSentiment(sentiment.marl:hasPolarity)}}">{{sentiment.nif:anchorOf}}</span>
......@@ -153,6 +155,9 @@
//console.log(fecha)
return fecha[2].split("T")[0]+"-"+fecha[1]+"-"+fecha[0]
},
returnURL: function(url){
return url['@id']
},
checkSentiment: function(sentiment) {
//console.log(sentiment[0]['marl:hasPolarity'])
try{
......
......@@ -7,9 +7,9 @@
<dom-module id="number-chart">
<link rel="import" type="css" href="number-chart.css">
<template>
<div class="info-box">
<div class="info-box" on-tap="addfilter">
<div class$="{{stylebg}}">
<span class="info-box-icon"><img src={{icon}} style="position: absolute; top: 15%; left: 10%; right: 25%; bottom: 25%; display: inline-block; vertical-align: middle; width:60px;"></span>
<span class="info-box-icon"><img src={{icon}} style="position: relative; top: 15%; display: inline-block; vertical-align: middle; width:60px;"></span>
<div class="info-box-content">
<span class="info-box-text">{{title}}</span>
<span class="info-box-number">
......@@ -75,7 +75,15 @@
kFormatter: function(num){
return num > 999 ? (num/1000).toFixed(1) + 'k' : num
},
addfilter: function(){
//console.log("filter add "+this.object)
var object = this.object;
var aggkey = this.aggkey;
//console.log(aggkey)
this.push('filters', {terms: { 'schema:search' : [object]}})
//console.log(this.filters)
},
_dataChanged: function() {
//console.log("data has changed")
//console.log(this.data)
......
......@@ -23,7 +23,7 @@
<div class$="tweet {{checkSentiment(tweet.sentiments)}} same-height" ident$="subitem[[index]]" on-click="toggle" aria-expanded$="[[opened]]" aria-controls="collapse" style=" text-align: center;" data-toggle="tooltip" data-placement="top" title="Click for details">
<div class="row"><div class="col-md-12 headline">
<div class="col-md-2">
<img src={{checkSource(tweet.schema:author)}} style="width: 100%; display:block; position: relative;" align="left">
<img src={{checkSource(tweet.schema:author)}} style="width: 80px; display:block; position: relative;" align="left">
</div>
<div class="col-md-7">
<span style="font-size:15px; display:inline-block; vertical-align: middle;">{{tweet.schema:articleBody}}</span>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment