Skip to content

Instantly share code, notes, and snippets.

View kiecoorp's full-sized avatar

Frédéric Escarieu kiecoorp

View GitHub Profile
@kiecoorp
kiecoorp / hide label with css on highcharts
Created February 15, 2014 09:03
Hide labels with css on highcharts with media query
@media screen and (min-width: 0px) and (max-width: 720px) {
.highcharts-axis-labels text:nth-child(even) {
display:none;
}
}
<a id="download_csv" class="button">Téléchargement de la liste</a>
<script type="text/javascript">
var csvRows = [];
var exceptCol = [0, 1, 3, 4, 6];
jQuery('table.tablesorter tbody tr').each(function(index, row) {
var text = [];
jQuery('td.active_filter', row).each(function(index, cell) {
angular.module('app').filter('floatdigit', function(){
return function(value, showsymbol) {
var number = parseFloat(value);
var symbol = (typeof showsymbol != "undefined" && showsymbol) ? ' €' : '';
if (parseFloat(number.toFixed(2)) === parseFloat(number.toFixed(3))) return number.toFixed(2)+symbol;
return number.toFixed(3)+symbol;
};
});
@kiecoorp
kiecoorp / controller.php
Created April 25, 2012 09:20
Autocomplete with ajax Gist
<?php
//
public function actionAjaxView($id)
{
$model = $this->loadModel($id);
$this->renderPartial('//intervenant/_view', array('model' => $model), false, true);
}
@kiecoorp
kiecoorp / gist:2328526
Created April 7, 2012 12:42
Multiple Nested Forms with Yii and Bootstrap Extension
<?php
// Controller
//
// Company fields => address_id, idenity_id
//
public function actionCreate()
{
$model = new Company;
@kiecoorp
kiecoorp / create_merge_file.sh
Created December 3, 2011 20:39
Script Merge File With GhostScript
# linux
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=Merged2.pdf -dBATCH 19.pdf 20.pdf 24.pdf 33.pdf
REM windows
"c:\Program Files\gs\gs9.04\bin\gswin64c.exe" -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=Merged2.pdf -dBATCH 19.pdf 20.pdf 24.pdf 33.pdf
@kiecoorp
kiecoorp / DateTime_Sort_Datatables_Jquery_Plugin.js
Created November 26, 2011 09:31
Add DateTime Sort to Datatables Jquery Plugin
//
// Add DateTime Sort to Datatables Jquery Plugin
// Format 23-10-2011 12:34
//
jQuery.fn.dataTableExt.aTypes.push(
function ( sData ) {
if ( sData.charAt(2) == '-' && sData.charAt(5) == '-' && sData.length == 16) { // Choose format 23-10-2011 18:30 ou 23/10/2011 13:20
return 'date';
}