Skip to content

Instantly share code, notes, and snippets.

View ChristopherDosin's full-sized avatar
:octocat:
Out sick

Christopher Dosin ChristopherDosin

:octocat:
Out sick
View GitHub Profile
jQuery( document ).ready( function( $ ) {
console.log("start");
$( '#form-add-setting' ).on( 'submit', function() {
//.....
//show some spinner etc to indicate operation in progress
//.....
console.log("Submitting");
$.post(
$( this ).prop( 'action' ),
// @foreach(array_chunk($posts->all(), 3) as $postSet)
@foreach(array_chunk($posts, 3) as $postSet)
<div class="row"> <!-- this div will surround every three posts -->
@foreach($postSet as $post)
<h3>{{ $post['title'] }}</h3>
@endforeach
</div>
@endforeach
// <b id="show-time">5</b>
<script type="text/javascript">
var settimmer = 0;
$(function(){
window.setInterval(function() {
var timeCounter = $("b[id=show-time]").html();
var updateTime = eval(timeCounter)- eval(1);
$("b[id=show-time]").html(updateTime);
if(updateTime == 0){
@ChristopherDosin
ChristopherDosin / gist:b9552171636b326e2628
Created May 1, 2015 13:00
pages - animated button btn-animated with text both on the one and second side
.btn-animated:before {
content: attr(data-pages-button-text);
}
<?php
/**
* An helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.0.16 on 2015-03-16.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
<div class="buttons--off-canvas">
<a class="close--off-canvas" href="#">
<i class="icon--arrow-left"></i>
Zurück
</a>
</div>
<div class="content--description">
<div class="product--description">
{$sArticle.attr4}
</div>
<p class="modal--size-table" data-content="" data-modalbox="true" data-targetSelector="a" data-width="400" data-height="400" data-mode="ajax">
<a class="block btn is--secondary is--center is--large" href="{url controller=custom sCustom=1}">Button Text</a>
</p>
@ChristopherDosin
ChristopherDosin / data.tpl
Last active August 29, 2015 14:20
Ändert die Größe des Modals bei Klick auf Versandkosten in der Detail Ansicht von Shopware 5
{extends file='frontend/detail/data.tpl'}
{block name='frontend_detail_data_tax'}
<p class="product--tax" data-content="" data-modalbox="true" data-width="800" data-height="800" data-targetSelector="a" data-mode="ajax">
{s name="DetailDataPriceInfo"}{/s}
</p>
{/block}
{extends file="parent:frontend/detail/tabs.tpl"}
{* New tab *}
{block name="frontend_detail_tabs_description" append}
{if $sArticle.attr4}
<a class="tab--link" title="{s name='NewTabsDescription'}{/s}" href="#">{s name='NewTabsDescription'}{/s}</a>
{/if}
{if $sArticle.attr5}
<a class="tab--link" title="{s name='Tab2TabsDescription'}{/s}" href="#">{s name='Tab2TabsDescription'}{/s}</a>
{/if}
$().ready(function () {
$(".lineData:contains('Garantie')").attr('id', 'garantie');
$("#garantie").remove();
});