Skip to content

Instantly share code, notes, and snippets.

// Toggle locaties in verblijfoptielijsten
$('.panelcontent').hide().removeClass('open');
$('.panelholder').removeClass('open');
// de eerste open doen bij pagina laden
$('.panelholder.first').find('.panelcontent').slideDown('fast').addClass('open');
$('.panelholder.first').find('.panelcontent').show();
$('.panelholder.first').addClass('open');
$('.panelholder.first').removeClass('first');
fieldname:
type: text
options:
data: "draft"
<div class="large-10 columns">
<div class="panel">
<h3>Vrije plaats</h3>
<div class="availability not-avail"></div>
</div>
</div>
<script>
$('div.large-10 div div.not-avail').parent().parent().hide();
</script>
@jadwigo
jadwigo / Console.php
Last active August 29, 2015 14:25
extension with nut command
<?php
namespace Bolt\Extension\Europeana\ZohoImport;
use Bolt\Nut\BaseCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
@jadwigo
jadwigo / upload.yml
Last active August 29, 2015 14:26
idea
fields:
somefield:
type: file
options:
secure: [txt, csv, zip, gz]
insecure: [php, jpg, doc, pdf, ppt]
@jadwigo
jadwigo / konami-jquery.js
Created August 18, 2015 12:27
How to add a konamicode to your jqueries
// Konami code block
jQuery(function( $ ){
if ( window.addEventListener ) {
var kkeys = [], konami = "38,38,40,40,37,39,37,39,66,65";
window.addEventListener("keydown", function(e){
kkeys.push( e.keyCode );
if ( kkeys.toString().indexOf( konami ) >= 0 ) {
console.log('> Someone entered Konami Code. Quickly, do something cool!')
console.log('< Do something cool?');
console.log('> Yes!, Quickly!');
@jadwigo
jadwigo / boltformvalues.yml
Last active December 8, 2015 16:16
boltforms example fields
contact:
notification:
enabled: true
debug: false
subject: Your message was submitted
from_name: My Site
from_email: noreply@example.com
to_name: My Site # Must be valid text
to_email: noreply@example.com # Must be valid email address
attach_files: false
{% setcontent bgimgrecord = 'headerbeeld/random/1' %}
{% set bgimg = bgimgrecord.image|first %}
<div class="bgimg" style="background-image: url(/files/{{ bgimg.file }});"></div>
@jadwigo
jadwigo / toggle.js
Last active February 1, 2016 13:45
// FAQ
$('.faq .bodytext').hide(); // alle teksten sluiten
$('.faq h4.title').removeClass('open'); // alle "open" classes verwijderen
$('.faq h4.title').click(function() {
if($(this).hasClass('open')!=true) { // kijk of deze title al open is
$('.faq h4.title').removeClass('open'); // sluit alle open title
$('.faq .bodytext').slideUp('fast'); // sluit alle open teksten
$(this).parents('.faq').find('.bodytext').slideDown('fast'); // open deze tekst
$(this).addClass('open'); // voeg open class toe bij deze title
@jadwigo
jadwigo / mini.js
Last active July 11, 2016 16:06
datum voor FormatGoogleCalendar
// zet huidige maand aan
var todaydate = new Date();
var current_day = todaydate.getDate();
var current_year = todaydate.getFullYear();
var current_month = todaydate.getMonth();
if(current_month < 10) {
current_month = '0' + current_month;
}
// zet volgende maand aan