Compare commits
No commits in common. "adafaf38b9da1fa07f9f5da2a55dc493ac2367d0" and "efa9584e9ce204f4010f1b0ca0a7c352aa8be1ab" have entirely different histories.
adafaf38b9
...
efa9584e9c
File diff suppressed because one or more lines are too long
|
@ -1,18 +1,8 @@
|
||||||
|
(function($) {
|
||||||
$(function(){
|
$(document).ready(function() {
|
||||||
$("#site-list").on( "click", ".accordion-title", function() {
|
$('._expand_site_item').click(function() {
|
||||||
var title = this
|
$(this).next('tr').toggle();
|
||||||
var content = $(this).closest('.accordion-item')
|
|
||||||
.find('.accordion-content')
|
|
||||||
if ($(content).is(':visible')) {
|
|
||||||
$(content).slideUp('fast')
|
|
||||||
$(this).closest('.accordion-item').removeClass('is-active')
|
|
||||||
$(title).attr('aria-expanded', false)
|
|
||||||
} else {
|
|
||||||
$(content).slideDown('fast')
|
|
||||||
$(this).closest('.accordion-item').addClass('is-active')
|
|
||||||
$(title).attr('aria-expanded', true)
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
|
})(jQuery)
|
||||||
|
|
|
@ -2,38 +2,30 @@
|
||||||
$archiveSiteHelper = $this->getHelperPluginManager()->get('archiveSiteMeta');
|
$archiveSiteHelper = $this->getHelperPluginManager()->get('archiveSiteMeta');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$collections = $archiveSiteHelper->getCollections();
|
$collections = [];
|
||||||
$projects = [];
|
|
||||||
foreach($sites as $site){
|
foreach($sites as $site){
|
||||||
$site_data = $archiveSiteHelper->getSiteMetaValues($site);
|
$site_data = $archiveSiteHelper->getSiteMetaValues($site);
|
||||||
$site_data['id'] = $site->id();
|
$site_data['id'] = $site->id();
|
||||||
$site_data['url'] = $site->siteUrl();
|
$site_data['url'] = $site->siteUrl();
|
||||||
$site_data['title'] = $site->title();
|
$site_data['title'] = $site->title();
|
||||||
if (isset($site_data['collection'])) {
|
|
||||||
$site_data['collection'] = $collections[$site_data['collection']];
|
|
||||||
} else {
|
|
||||||
$site_data['collection'] = "";
|
|
||||||
}
|
|
||||||
$site_data['summary'] = nl2br($this->escapeHtml($site->summary()));
|
$site_data['summary'] = nl2br($this->escapeHtml($site->summary()));
|
||||||
if (!isset($site_data['currator'])) {
|
array_push($collections, $site_data);
|
||||||
$site_data['currator'] = "";
|
|
||||||
}
|
|
||||||
array_push($projects, $site_data);
|
|
||||||
}
|
}
|
||||||
//$collections = json_encode($collections, JSON_UNESCAPED_SLASHES);
|
//$collections = json_encode($collections, JSON_UNESCAPED_SLASHES);
|
||||||
//$collections = json_encode($collections, JSON_HEX_APOS);
|
//$collections = json_encode($collections, JSON_HEX_APOS);
|
||||||
//$collections = htmlspecialchars(json_encode($collections), ENT_QUOTES, 'UTF-8');
|
//$collections = htmlspecialchars(json_encode($collections), ENT_QUOTES, 'UTF-8');
|
||||||
$projects = htmlentities(json_encode($projects, JSON_HEX_QUOT), ENT_QUOTES, 'UTF-8');
|
//$collections = str_replace("'", "\'", $collections);
|
||||||
|
$collections = htmlentities(json_encode($collections, JSON_HEX_QUOT), ENT_QUOTES, 'UTF-8');
|
||||||
|
//$collections = json_encode($collections);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="site-list">
|
<div data-vue-component="archive-list"
|
||||||
<div
|
data-collections='<?= $collections ?>'
|
||||||
data-vue-component="archive-list"
|
|
||||||
data-collections='<?= $projects ?>'
|
|
||||||
data-page_size=3>
|
data-page_size=3>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script src="/themes/archive/asset/js/archive-list.js"></script>
|
<script src="/themes/archive/asset/js/archive-list.js"></script>
|
||||||
|
|
Loading…
Reference in New Issue