added relevance filtering, fixed some buggy tags in fixedstars.js and synaxarium.js, removed howto from About modal
This commit is contained in:
parent
7b9bb09263
commit
7b9941d2ba
5 changed files with 56 additions and 66 deletions
|
|
@ -282,19 +282,9 @@ SL.Calendar = (function() {
|
|||
SL.Calendar.download( $("#grid").html(), "grid.html", "skip", "html", "text/html; charset=utf-8");
|
||||
SL.Calendar.download(Hours.moments, "ephemeris");
|
||||
}
|
||||
// show relevant tags and actions
|
||||
|
||||
// var classes = Array();
|
||||
// $(".planetaryhour").each(function(idx, el) {
|
||||
// classes = classes.concat(Array.from(el.classList));
|
||||
// });
|
||||
// classes = Array.from(new Set(classes)).filter(x => !['col-md-2', 'centered', 'planetaryhour'].includes(x));
|
||||
// classes.forEach( function(el) {
|
||||
// console.log('input#' + el);
|
||||
// $('li.' + el).show();
|
||||
// $('input#' + el).parent().show();
|
||||
// });
|
||||
|
||||
if ( $("#relevance").is(':checked') ) {
|
||||
Filter.displayRelevantOperations();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -405,6 +395,7 @@ SL.Calendar = (function() {
|
|||
* @public {function} load() - loads all plugin modules defined and adds their filters
|
||||
* @public {function} modal() - creates DOM objects to be displayed as navbar menu items and modal hosting all the filter options of a plugin module
|
||||
* @public {function} comboFilter() - is a filter function for Isotope to include all selected tags and operations within a filter but exclude between each other
|
||||
* @public {function} displayRelevantOperations() - filter out all actions and tags from the filter pages that are outside of the displayed time range
|
||||
*/
|
||||
var Filter = (function() {
|
||||
|
||||
|
|
@ -477,9 +468,7 @@ SL.Calendar = (function() {
|
|||
Object.keys(menuItems).forEach(function(key) {
|
||||
actions += '<li class="operation '+menuItems[key].tags+'"><input type="checkbox" value=".'+id+'-'+key+'" id="'+id+'-'+key+'" /> '+menuItems[key].action+'</li>\n ';
|
||||
});
|
||||
// Hide all tags and actions by default
|
||||
// $('li.operation').hide();
|
||||
// $('.actiontag').parent().hide();
|
||||
|
||||
// load template defined in index.html and append all filter data
|
||||
$('<div/>').loadTemplate($("#tpl-modal"), {
|
||||
title : 'Filter by '+pluginDefinitions.name,
|
||||
|
|
@ -531,10 +520,35 @@ SL.Calendar = (function() {
|
|||
return comboFilter;
|
||||
}
|
||||
|
||||
function displayRelevantOperations() {
|
||||
$('li.operation').addClass('irrelevantdestruct').hide();
|
||||
$('.actiontag').parent().addClass('irrelevantdestruct').hide();
|
||||
var classes = Array();
|
||||
$(".planetaryhour").each(function(idx, el) {
|
||||
classes = classes.concat(Array.from(el.classList));
|
||||
});
|
||||
classes = Array.from(new Set(classes)).filter(x => !['col-md-2', 'centered', 'planetaryhour'].includes(x));
|
||||
classes.forEach( function(el) {
|
||||
var operation = $('input#' + el).parent();
|
||||
var category = el.split('-')[0].replace('.', '');
|
||||
operation.removeClass('irrelevantdestruct').show();
|
||||
|
||||
var oc = operation.attr('class');
|
||||
if ( oc ) {
|
||||
var opclasses = oc.split(/\s+/);
|
||||
$.each(opclasses, function(index, opclass) {
|
||||
$('input#' + category + '-' + opclass ).parent().removeClass('irrelevantdestruct').show();
|
||||
});
|
||||
}
|
||||
});
|
||||
$('li.irrelevantdestruct').remove();
|
||||
}
|
||||
|
||||
return {
|
||||
load: load,
|
||||
modal: modal,
|
||||
comboFilter: comboFilter
|
||||
comboFilter: comboFilter,
|
||||
displayRelevantOperations: displayRelevantOperations
|
||||
}
|
||||
|
||||
}());
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ var module_behenii = {
|
|||
var rangle = Math.min( Math.abs( property.moon.deg - property.asc.deg ), 360-Math.abs(property.moon.deg - property.asc.deg ) );
|
||||
var mangle = Math.min( Math.abs( property.moon.deg - property.mc.deg ), 360-Math.abs(property.moon.deg - property.mc.deg ) );
|
||||
if ( rangle <= orb || mangle <= orb ) {
|
||||
console.log("MC: "+mangle+", ASC: "+rangle);
|
||||
//console.log("MC: "+mangle+", ASC: "+rangle);
|
||||
ret.push(definitions.actions[no][0]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ var module_lunarmansion = {
|
|||
{
|
||||
"id": "13",
|
||||
"action": "13 Al-Awwah / Alahue",
|
||||
"tags": "alawwah / alahue"
|
||||
"tags": "alawwah alahue"
|
||||
},
|
||||
{
|
||||
"id": "243",
|
||||
|
|
|
|||
|
|
@ -16381,12 +16381,12 @@ var module_synaxarium_catholic = {
|
|||
{
|
||||
"id": 214,
|
||||
"action": "<a href=\"https://www.catholic.org/saints/saint.php?saint_id=471\" target=\"blank_\">Cosmas and Damian</a>",
|
||||
"tags": "damian surgeons hairdressers profession hernia chemists pharmacists barbers apothecaries druggists cosmas blind manufacturers people doctors pharmacists/druggists medical physicians chemical industry"
|
||||
"tags": "damian surgeons hairdressers profession hernia chemists pharmacists barbers apothecaries druggists cosmas blind manufacturers people doctors pharmacists druggists medical physicians chemical industry"
|
||||
},
|
||||
{
|
||||
"id": 215,
|
||||
"action": "Apothecaries; Barbers; Blind people; Chemists (pharmacists); Doctors; Druggists (pharmacists); Hairdressers; Medical profession; Pharmacists/Druggists; Physicians; Surgeons; chemical industry, chemical manufacturers; doctors, physicians; hernia",
|
||||
"tags": "damian surgeons hairdressers profession hernia chemists pharmacists barbers apothecaries druggists cosmas blind manufacturers people doctors pharmacists/druggists medical physicians chemical industry"
|
||||
"tags": "damian surgeons hairdressers profession hernia chemists pharmacists barbers apothecaries druggists cosmas blind manufacturers people doctors pharmacists druggists medical physicians chemical industry"
|
||||
}
|
||||
],
|
||||
[
|
||||
|
|
@ -16482,7 +16482,7 @@ var module_synaxarium_catholic = {
|
|||
{
|
||||
"id": 115,
|
||||
"action": "Blind people; Diseases of the eye; Eye disorders; Health inspectors; Nightmares, protection against; Pharmacists/Druggists; Travelers; Youth; doctors, physicians; guardian angels; happy meetings; obsession",
|
||||
"tags": "inspectors eye meetings youth raphael health blind obsession people diseases guardian doctors pharmacists/druggists angels physicians disorders happy archangel travelers nightmares"
|
||||
"tags": "inspectors eye meetings youth raphael health blind obsession people diseases guardian doctors pharmacists druggists angels physicians disorders happy archangel travelers nightmares"
|
||||
},
|
||||
{
|
||||
"id": 116,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue