Sha256: 763a9f0843f6131821b5bfb0d8ebda639c948df7eb3f864fa11e9b147036feb4
Contents?: true
Size: 1.43 KB
Versions: 2
Compression:
Stored size: 1.43 KB
Contents
$(document).ready(function() { //Radiobutton $('a.radiobutton').click(function(ev){ ev.stopPropagation(); ev.preventDefault(); if (!$(this).hasClass('selected')) { $(this).closest('ul').find('a.radiobutton').each(function(i,ele){ $(ele).removeClass('selected'); }); $(this).closest('ul').find('input[type="radio"]').each(function(i,ele){ $(ele).removeAttr('checked'); }); $(this).addClass('selected'); var new_value = $(this).text().toLowerCase(); $(this).closest('ul').find('input[value="'+new_value+'"]').attr('checked','checked'); } }); // Create date list // TODO // Style file input $('input#file_input').prettyfile({ html: "<strong><span>Choose File</span></strong><span class=\"pf_ph\">Select a image file (JPG, PNG, GIF) from your computer</span>" }); $('div.date').removeClass('show'); $('input.date').show().click(function(ev){ ev.preventDefault(); ev.stopPropagation(); var me = this; $(this).toggleClass('active'); $(this).next().toggleClass('show active'); $('body').click(function(event){ if (!$(event.target).closest('div.date').length) { $(me).toggleClass('active'); $(me).next().toggleClass('show active'); $('body').unbind('click'); }; }); }); });
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cartoset-0.0.2 | app/assets/javascripts/admin/features/new.js |
cartoset-0.0.1 | app/assets/javascripts/admin/features/new.js |