-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdateChartData.php
More file actions
executable file
·596 lines (556 loc) · 27.9 KB
/
Copy pathupdateChartData.php
File metadata and controls
executable file
·596 lines (556 loc) · 27.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
<?php
/**
* @file
* The PHP page that serves all page requests on a Drupal installation.
*
* All Drupal code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt files in the "core" directory.
*/
use Drupal\Core\DrupalKernel;
use Symfony\Component\HttpFoundation\Request;
$autoloader = require_once 'autoload.php';
$kernel = new DrupalKernel('prod', $autoloader);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
// $response->send();
// $kernel->terminate($request, $response);
use Drupal\Core\Template\Attribute;
use Drupal\views\Views;
use Drupal\node\Entity\Node;
use Drupal\taxonomy\TermStorage;
//Prepare for Bubble chart
$storage = \Drupal::entityManager()->getStorage('node');
$qIds = $storage->getQuery()
->condition('type', 'question')
->condition('status', 1)
->execute();
// $variables['questions'] = $storage->loadMultiple($qIds);
$questions = $storage->loadMultiple($qIds);
$questionId = $_GET['qid'];
//get all answers depend on question
$asIds = $storage->getQuery()
->condition('type', 'answer')
->condition('status', 1)
->condition('field_question', $questionId)
->execute();
$answers = $storage->loadMultiple($asIds);
$isFilterLoc = false;
if(isset($_GET['loc'])){
if($_GET['loc']!='')
$isFilterLoc = true;
}
$isFilterName = false;
if(isset($_GET['name'])){
if($_GET['name']!='')
$isFilterName = true;
}
$isFilterYear = false;
if(isset($_GET['year'])){
if($_GET['year']!='')
$isFilterYear = true;
}
$isFilterAuthor = false;
if(isset($_GET['author'])){
if($_GET['author']!='')
$isFilterAuthor = true;
}
$isFilterLang = false;
if(isset($_GET['language'])){
if($_GET['language']!='')
$isFilterLang = true;
}
$isFilterLength = false;
if(isset($_GET['page_length'])){
if($_GET['page_length']!='')
$isFilterLength = true;
}
$isFilterismapping = false;
if(isset($_GET['is_mapping'])){
if($_GET['is_mapping']!='')
$isFilterismapping = true;
}
$type = $_GET['type'];
switch ($type):
case 'text':
// get all articles depend on answers
$arIds = array();
$mediaTypes = $authors = $positions = $titles = $years = $locations = $pageLengths = array();
foreach ($answers as $answer) {
$tmp = $answer->get('field_articles');
foreach ($tmp as $item) {
$arIds[] = (int)$item->target_id;
}
}
$articles = $storage->loadMultiple($arIds); ?>
{
dataSeries:[
<?php $i=1; foreach ($articles as $article): ?>
<?php
$tmp = $article->get('field_author_bubble');
$atIds = array();
foreach ($tmp as $item) {
$atIds[] = (int)$item->target_id;
}
$auts = $storage->loadMultiple($atIds);
if(isset($_GET['reloadFilter'])){
if($article->field_location->value!='' && !in_array($article->field_location->value, $locations))
$locations[] = $author->field_location->value;
if($article->title->value!='' && !in_array($article->title->value, $titles))
$titles[] = $article->title->value;
$year = substr($article->field_published_date->value,0,4);
if($year!='' && !in_array($year, $years))
$years[] = $year;
foreach ($auts as $aut) {
$authors[$aut->nid->value] = $aut->title->value;
}
}
?>
<?php if($isFilterLoc && strpos($article->field_location->value, $_GET['loc']) === false) continue;?>
<?php if($isFilterAuthor && ($article->field_author_bubble->target_id != $_GET['author'])) continue;?>
<?php if($isFilterYear && strpos($article->field_published_date->value, $_GET['year']) === false) continue;?>
<?php
if(is_null($article->field_language->value)) $article->field_language->value = 'English';
if($isFilterLang && ($article->field_language->value != $_GET['language'])) continue;
if($isFilterLength && ($article->field_total_page->value != $_GET['length'])) continue;
if(is_null($article->field_is_mapping->value)) $article->field_is_mapping->value = 0;
if($isFilterismapping && ($article->field_is_mapping->value != $_GET['is_mapping'])) continue;
?>
<?php if($isFilterName && strpos($article->title->value, $_GET['name']) === false) continue;?>
<?php $tmp = $i;?>
<?php $j=1; foreach ($answers as $answer):?>
<?php $tmp1 = $j; ?>
<?php foreach ($answer->field_articles as $ar):?>
<?php if ($article->nid->value == $ar->target_id): ?>
<?php $tmp = $tmp1 ?>
<?php endif; ?>
<?php endforeach; ?>
<?php $j++; endforeach;?>
{
x: <?php echo $tmp ;?>,
y: <?php echo substr($article->field_published_date->value,0,4) ;?>,
z: 63,
name: '<?php echo $article->title->value ;?>',
color: '#FFFFFF',
events: {
click: function (event) {
jQuery.ajax({
url: 'http://emor.zdhdemo.com/node/<?php echo $article->nid->value;?>?_format=json',
method: 'GET',
headers: {
'Content-Type': 'application/json'
},
success: function(data, status, xhr) {
if(data.field_author_bubble!=''){
jQuery.get( data.field_author_bubble[0].url+'/?_format=json', function( dt ) {
jQuery('.article.infos .author span').text(dt.title[0].value);
if(dt.field_link!=''){
var $el = jQuery(".works .listWorks");
$el.empty();
jQuery.each(dt.field_link, function(key,value) {
$el.append(jQuery('<li></li>').append(jQuery('<a></a>').attr('href',value.uri).attr('target','_blank').text(value.title)));
});
}else{
jQuery(".works .listWorks").empty();
}
});
}
jQuery('.article.infos .title span').text(data.title[0].value);
if(data.field_location!='')
jQuery('.article.infos .location span').text(data.field_location[0].value);
if(data.field_published_date!='')
jQuery('.article.infos .publish span').text(data.field_published_date[0].value);
if(data.field_total_page!='')
jQuery('.article.infos .totalPage span').text(data.field_total_page[0].value);
if(data.field_is_mapping!=''){
if(data.field_is_mapping[0].value == 0){
jQuery('.article.infos .inMapping span').text('No');
}else{
jQuery('.article.infos .inMapping span').text('Yes');
}
}else{
jQuery('.article.infos .inMapping span').text('No');
}
if(data.field_language!='')
jQuery('.article.infos .language span').text(data.field_language[0].value);
else
jQuery('.article.infos .language span').text('English');
jQuery('#showArticlePopup').click();
jQuery('#bubbleDetail').show();
jQuery('#bubbleDetail .infos.author').slideUp('slow');
jQuery('#bubbleDetail .infos.article').slideDown('slow');
}
})
}
}
},<?php $i++; endforeach ?>],cats: ['',<?php foreach ($answers as $answer) {echo "'".$answer->title->value."',";}?>]
<?php if(isset($_GET['reloadFilter'])):?>
,titles: [<?php foreach ($titles as $title) {echo "'".$title."',";}?>]
,years: [<?php foreach ($years as $year) {echo "'".$year."',";}?>]
,positions: [<?php foreach ($positions as $position) {echo "'".$position."',";}?>]
,locations: [<?php foreach ($locations as $location) {echo "'".$location."',";}?>]
,mediaTypes: [<?php foreach ($mediaTypes as $mediaType) {echo "'".$mediaType."',";}?>]
,pageLengths : [<?php foreach ($pageLengths as $pageLength) {echo "'".$pageLength."',";}?>]
,authors : {<?php foreach ($authors as $key => $author) {echo $key.":'".$author."',";}?>}
<?php endif;?>
}
<?php
break;
case 'video':
// get all articles video depend on answers
$arIds = array();
$mediaTypes = $authors = $positions = $titles = $years = $locations = $pageLength = array();
foreach ($answers as $answer) {
$tmp = $answer->get('field_articles_video');
foreach ($tmp as $item) {
$arIds[] = (int)$item->target_id;
}
}
$articles = $storage->loadMultiple($arIds); ?>
{
dataSeries:[
<?php $i=1; foreach ($articles as $article): ?>
<?php
$tmp = $article->get('field_author_bubble');
$atIds = array();
foreach ($tmp as $item) {
$atIds[] = (int)$item->target_id;
}
$auts = $storage->loadMultiple($atIds);
if(isset($_GET['reloadFilter'])){
if($article->field_location->value!='' && !in_array($article->field_location->value, $locations))
$locations[] = $author->field_location->value;
if($article->title->value!='' && !in_array($article->title->value, $titles))
$titles[] = $article->title->value;
$year = substr($article->field_published_date->value,0,4);
if($year!='' && !in_array($year, $years))
$years[] = $year;
foreach ($auts as $aut) {
$authors[$aut->nid->value] = $aut->title->value;
}
}
?>
<?php if($isFilterLoc && strpos($article->field_location->value, $_GET['loc']) === false) continue;?>
<?php if($isFilterAuthor && ($article->field_author_bubble->target_id != $_GET['author'])) continue;?>
<?php if($isFilterYear && strpos($article->field_published_date->value, $_GET['year']) === false) continue;?>
<?php
if(is_null($article->field_language->value)) $article->field_language->value = 'English';
if($isFilterLang && ($article->field_language->value != $_GET['language'])) continue;
if($isFilterLength && ($article->field_total_page->value != $_GET['length'])) continue;
if(is_null($article->field_is_mapping->value)) $article->field_is_mapping->value = 0;
if($isFilterismapping && ($article->field_is_mapping->value != $_GET['is_mapping'])) continue;
?>
<?php if($isFilterName && strpos($article->title->value, $_GET['name']) === false) continue;?>
<?php $tmp = $i;?>
<?php $j=1; foreach ($answers as $answer):?>
<?php $tmp1 = $j; ?>
<?php foreach ($answer->field_articles_video as $ar):?>
<?php if ($article->nid->value == $ar->target_id): ?>
<?php $tmp = $tmp1 ?>
<?php endif; ?>
<?php endforeach; ?>
<?php $j++; endforeach;?>
{
x: <?php echo $tmp ;?>,
y: <?php echo substr($article->field_published_date->value,0,4) ;?>,
z: 63,
name: '<?php echo $article->title->value ;?>',
color: '#FFFFFF',
events: {
click: function (event) {
jQuery.ajax({
url: 'http://emor.zdhdemo.com/node/<?php echo $article->nid->value;?>?_format=json',
method: 'GET',
headers: {
'Content-Type': 'application/json'
},
success: function(data, status, xhr) {
if(data.field_author_bubble!=''){
jQuery.get( data.field_author_bubble[0].url+'/?_format=json', function( dt ) {
jQuery('.article.infos .author span').text(dt.title[0].value);
if(dt.field_link!=''){
var $el = jQuery(".works .listWorks");
$el.empty();
jQuery.each(dt.field_link, function(key,value) {
$el.append(jQuery('<li></li>').append(jQuery('<a></a>').attr('href',value.uri).attr('target','_blank').text(value.title)));
});
}else{
jQuery(".works .listWorks").empty();
}
});
}
jQuery('.article.infos .title span').text(data.title[0].value);
if(data.field_location!='')
jQuery('.article.infos .location span').text(data.field_location[0].value);
if(data.field_published_date!='')
jQuery('.article.infos .publish span').text(data.field_published_date[0].value);
if(data.field_total_page!='')
jQuery('.article.infos .totalPage span').text(data.field_total_page[0].value);
if(data.field_is_mapping!=''){
if(data.field_is_mapping[0].value == 0){
jQuery('.article.infos .inMapping span').text('No');
}else{
jQuery('.article.infos .inMapping span').text('Yes');
}
}else{
jQuery('.article.infos .inMapping span').text('No');
}
if(data.field_language!='')
jQuery('.article.infos .language span').text(data.field_language[0].value);
else
jQuery('.article.infos .language span').text('English');
jQuery('#showArticlePopup').click();
jQuery('#bubbleDetail').show();
jQuery('#bubbleDetail .infos.author').slideUp('slow');
jQuery('#bubbleDetail .infos.article').slideDown('slow');
}
})
}
}
},<?php $i++; endforeach ?>],cats: ['',<?php foreach ($answers as $answer) {echo "'".$answer->title->value."',";}?>]
<?php if(isset($_GET['reloadFilter'])):?>
,titles: [<?php foreach ($titles as $title) {echo "'".$title."',";}?>]
,years: [<?php foreach ($years as $year) {echo "'".$year."',";}?>]
,positions: [<?php foreach ($positions as $position) {echo "'".$position."',";}?>]
,locations: [<?php foreach ($locations as $location) {echo "'".$location."',";}?>]
,mediaTypes: [<?php foreach ($mediaTypes as $mediaType) {echo "'".$mediaType."',";}?>]
,pageLengths : [<?php foreach ($pageLengths as $pageLength) {echo "'".$pageLength."',";}?>]
,authors : [<?php foreach ($authors as $author) {echo "'".$author."',";}?>]
<?php endif;?>
}
<?php
break;
case 'audio':
// get all articles audio depend on answers
$auIds = array();
$mediaTypes = $authors = $positions = $titles = $years = $locations = $pageLength = array();
foreach ($answers as $answer) {
$tmp = $answer->get('field_articles_audio');
foreach ($tmp as $item) {
$arIds[] = (int)$item->target_id;
}
}
$articles = $storage->loadMultiple($arIds); ?>
{
dataSeries:[
<?php $i=1; foreach ($articles as $article):?>
<?php
$tmp = $article->get('field_author_bubble');
$atIds = array();
foreach ($tmp as $item) {
$atIds[] = (int)$item->target_id;
}
$auts = $storage->loadMultiple($atIds);
if(isset($_GET['reloadFilter'])){
if($article->field_location->value!='' && !in_array($article->field_location->value, $locations))
$locations[] = $author->field_location->value;
if($article->title->value!='' && !in_array($article->title->value, $titles))
$titles[] = $article->title->value;
$year = substr($article->field_published_date->value,0,4);
if($year!='' && !in_array($year, $years))
$years[] = $year;
foreach ($auts as $aut) {
$authors[$aut->nid->value] = $aut->title->value;
}
}
?>
<?php if($isFilterLoc && strpos($article->field_location->value, $_GET['loc']) === false) continue;?>
<?php if($isFilterAuthor && ($article->field_author_bubble->target_id != $_GET['author'])) continue;?>
<?php if($isFilterYear && strpos($article->field_published_date->value, $_GET['year']) === false) continue;?>
<?php
if(is_null($article->field_language->value)) $article->field_language->value = 'English';
if($isFilterLang && ($article->field_language->value != $_GET['language'])) continue;
if($isFilterLength && ($article->field_total_page->value != $_GET['length'])) continue;
if(is_null($article->field_is_mapping->value)) $article->field_is_mapping->value = 0;
if($isFilterismapping && ($article->field_is_mapping->value != $_GET['is_mapping'])) continue;
?>
<?php if($isFilterName && strpos($article->title->value, $_GET['name']) === false) continue;?>
<?php $tmp = $i;?>
<?php $j=1; foreach ($answers as $answer):?>
<?php $tmp1 = $j; ?>
<?php foreach ($answer->field_articles_audio as $ar):?>
<?php if ($article->nid->value == $ar->target_id): ?>
<?php $tmp = $tmp1 ?>
<?php endif; ?>
<?php endforeach; ?>
<?php $j++; endforeach;?>
{
x: <?php echo $tmp ;?>,
y: <?php echo substr($article->field_published_date->value,0,4) ;?>,
z: 63,
name: '<?php echo $article->title->value ;?>',
color: '#FFFFFF',
events: {
click: function (event) {
jQuery.ajax({
url: 'http://emor.zdhdemo.com/node/<?php echo $article->nid->value;?>?_format=json',
method: 'GET',
headers: {
'Content-Type': 'application/json'
},
success: function(data, status, xhr) {
if(data.field_author_bubble!=''){
jQuery.get( data.field_author_bubble[0].url+'/?_format=json', function( dt ) {
jQuery('.article.infos .author span').text(dt.title[0].value);
if(dt.field_link!=''){
var $el = jQuery(".works .listWorks");
$el.empty();
jQuery.each(dt.field_link, function(key,value) {
$el.append(jQuery('<li></li>').append(jQuery('<a></a>').attr('href',value.uri).attr('target','_blank').text(value.title)));
});
}else{
jQuery(".works .listWorks").empty();
}
});
}
jQuery('.article.infos .title span').text(data.title[0].value);
if(data.field_location!='')
jQuery('.article.infos .location span').text(data.field_location[0].value);
if(data.field_published_date!='')
jQuery('.article.infos .publish span').text(data.field_published_date[0].value);
if(data.field_total_page!='')
jQuery('.article.infos .totalPage span').text(data.field_total_page[0].value);
if(data.field_is_mapping!=''){
if(data.field_is_mapping[0].value == 0){
jQuery('.article.infos .inMapping span').text('No');
}else{
jQuery('.article.infos .inMapping span').text('Yes');
}
}else{
jQuery('.article.infos .inMapping span').text('No');
}
if(data.field_language!='')
jQuery('.article.infos .language span').text(data.field_language[0].value);
else
jQuery('.article.infos .language span').text('English');
jQuery('#showArticlePopup').click();
jQuery('#bubbleDetail').show();
jQuery('#bubbleDetail .infos.article').slideDown('slow');
jQuery('#bubbleDetail .infos.author').slideUp('slow');
}
})
}
}
},<?php $i++; endforeach ?>],cats: ['',<?php foreach ($answers as $answer) {echo "'".$answer->title->value."',";}?>]
<?php if(isset($_GET['reloadFilter'])):?>
,titles: [<?php foreach ($titles as $title) {echo "'".$title."',";}?>]
,years: [<?php foreach ($years as $year) {echo "'".$year."',";}?>]
,positions: [<?php foreach ($positions as $position) {echo "'".$position."',";}?>]
,locations: [<?php foreach ($locations as $location) {echo "'".$location."',";}?>]
,mediaTypes: [<?php foreach ($mediaTypes as $mediaType) {echo "'".$mediaType."',";}?>]
,pageLengths : [<?php foreach ($pageLengths as $pageLength) {echo "'".$pageLength."',";}?>]
,authors : [<?php foreach ($authors as $author) {echo "'".$author."',";}?>]
<?php endif;?>
}
<?php
break;
default:
// get all authors depend on answers
$auIds = array();
$cities = array();
$names = array();
$years = array();
$positions = array();
foreach ($answers as $answer) {
$tmp = $answer->get('field_author_bubble');
foreach ($tmp as $item) {
$auIds[] = (int)$item->target_id;
}
}
$authors = $storage->loadMultiple($auIds); ?>
{
dataSeries:[
<?php $i=1; foreach ($authors as $author):?>
<?php
if(isset($_GET['reloadFilter'])){
if($author->field_city->value!='' && !in_array($author->field_city->value, $cities))
$cities[] = $author->field_city->value;
if($author->title->value!='' && !in_array($author->title->value, $names))
$names[] = $author->title->value;
if($author->field_author_position->value!='' && !in_array($author->field_author_position->value, $positions))
$positions[] = $author->field_author_position->value;
$dob = substr($author->field_dob->value,0,4);
if($dob!='' && !in_array($dob, $years))
$years[] = $dob;
}
?>
<?php if($isFilterLoc && strpos($author->field_city->value, $_GET['loc']) === false) continue;?>
<?php if($isFilterName && strpos($author->title->value, $_GET['name']) === false) continue;?>
<?php if($isFilterYear && strpos($author->field_dob->value, $_GET['year']) === false) continue;?>
<?php $tmp = $i;?>
<?php $j=1; foreach ($answers as $answer):?>
<?php $tmp1 = $j; ?>
<?php foreach ($answer->field_author_bubble as $au):?>
<?php if ($author->nid->value == $au->target_id): ?>
<?php $tmp = $tmp1 ?>
<?php endif; ?>
<?php endforeach; ?>
<?php $j++; endforeach;?>
{
x: <?php echo $tmp ;?>,
y: <?php echo substr($author->field_dob->value,0,4) ;?>,
z: <?php if (empty($author->field_size_bubble)):?> 63 <?php else: ?> <?php echo $author->field_size_bubble->value;?> <?php endif; ?>,
name: '<?php echo $author->title->value ;?>',
color: '<?php if(empty($author->field_color_bubble)):?> #FFFFFF <?php else: ?> <?php echo $author->field_color_bubble->value ;?> <?php endif; ?>',
events: {
click: function (event) {
jQuery.ajax({
url: 'http://emor.zdhdemo.com/node/<?php echo $author->nid->value;?>?_format=json',
method: 'GET',
headers: {
'Content-Type': 'application/json'
},
success: function(data, status, xhr) {
jQuery('.author.infos .name span').text(data.title[0].value);
jQuery('.author.infos .location span').text(data.field_city[0].value + ' ' + data.field_country[0].value);
jQuery('.author.infos .dob span').text(data.field_dob[0].value);
if(data.field_dod!='')
jQuery('.author.infos .dod span').text(data.field_dod[0].value);
else
jQuery('.author.infos .dod span').text('');
if(data.field_author_position!='')
jQuery('.author.infos .position span').text(data.field_author_position[0].value);
else
jQuery('.author.infos .position span').text('');
if(data.field_language!='')
jQuery('.author.infos .language span').text(data.field_language[0].value);
else
jQuery('.author.infos .language span').text('English');
if(data.field_profile_photo!=''){
jQuery('.author.infos .authorAvatar').attr({
src: data.field_profile_photo[0].url,
alt: data.field_profile_photo[0].alt,
});
}else{
jQuery('.author.infos .authorAvatar').attr({
src: '',
alt: '',
});
}
if(data.field_link!=''){
var $el = jQuery(".works .listWorks");
$el.empty();
jQuery.each(data.field_link, function(key,value) {
$el.append(jQuery('<li></li>').append(jQuery('<a></a>').attr('href',value.uri).attr('target','_blank').text(value.title)));
});
}else{
jQuery(".works .listWorks").empty();
}
jQuery('#showAuthorPopup').click();
jQuery('#bubbleDetail').show();
jQuery('#bubbleDetail .infos.article').slideUp('slow');
jQuery('#bubbleDetail .infos.author').slideDown('slow');
}
})
}
}
},<?php $i++; endforeach ?>],cats: ['',<?php foreach ($answers as $answer) {echo "'".$answer->title->value."',";}?>]
<?php if(isset($_GET['reloadFilter'])):?>
,cities: [<?php foreach ($cities as $city) {echo "'".$city."',";}?>]
,names: [<?php foreach ($names as $name) {echo "'".$name."',";}?>]
,years: [<?php foreach ($years as $year) {echo "'".$year."',";}?>]
,positions: [<?php foreach ($positions as $position) {echo "'".$position."',";}?>]
<?php endif;?>
}
<?php
break;
endswitch;