// Generated by LiveScript 1.2.0 (function(){ var jq, addJS, showJS, catsJS, out$ = typeof exports != 'undefined' && exports || this; jQuery.fn.extend({ copy: function(){ return this.clone().removeAttr('id class'); } }); jq = function(f){ return function(){ $(f); }; }; out$.addJS = addJS = jq(function(){ return $('input[name=date]').datepicker({ dateFormat: 'dd.mm.yy', firstDay: 1 }); }); out$.showJS = showJS = jq(function(){ $(".detail .heading").click(function(){ return $(this).closest('.detail').children('.mark:first').click(); }); $(".detail > .mark").click(function(){ if (this.src.indexOf('closed') !== -1) { this.src = this.src.replace('closed', 'open'); } else { this.src = this.src.replace('open', 'closed'); } return $(this).nextAll('.details:first').toggle(); }); $('.details').hide(); return $('.pie').each(function(){ var x$, k, v; x$ = $(this); x$.highcharts({ title: { text: null }, tooltip: { hideDelay: 200, formatter: function(){ return this.key + ": " + this.y.toFixed(2) + " € / " + this.percentage.toFixed(2) + "%"; } }, chart: { backgroundColor: null, plotBorderWidth: null, plotShadow: false, spacingTop: 0 }, credits: { enabled: false }, series: [{ type: 'pie', size: '70%', allowPointSelect: true, dataLabels: { color: x$.css('color'), distance: 20 }, data: (function(){ var ref$, results$ = []; for (k in ref$ = x$.data('pie')) { v = ref$[k]; results$.push({ name: v > 0 ? k : '', y: v, visible: v > 0 }); } return results$; }()) }] }); return x$; }); }); out$.catsJS = catsJS = jq(function(){ var counter, add_img, new_input, new_image; counter = 0; add_img = $('img#add'); new_input = $('input#new'); new_image = function(new_name){ var x$; x$ = add_img.copy(); x$.attr('src', function(){ return this.src.replace('add', new_name); }); return x$; }; $("li > span").click(function(){ var span, input, x$, img; span = $(this); input = span.next(); x$ = img = new_image('undo'); x$.click(function(){ $(this).remove(); input.val(span.text()); return input.fadeOut('slow', function(){ return span.toggle(); }); }); span.toggle(); return input.fadeIn('slow', function(){ return img.insertAfter(input); }); }); return add_img.click(function(){ var input, x$, img; input = new_input.copy(); x$ = img = new_image('minus'); x$.click(function(){ return $(this).parent().fadeOut('slow', function(){ return $(this).remove(); }); }); input.attr('name', function(){ return this.name + counter; }).removeAttr('style').wrap("
").parent().append(img).hide().insertBefore(add_img.parent()).fadeIn('slow', function(){ return input.focus(); }); return counter++; }); }); }).call(this);