From 77a321926f8b828002b04cedeee35502255bf7c0 Mon Sep 17 00:00:00 2001 From: Nick Sergeant Date: Mon, 18 Feb 2013 17:46:51 -0500 Subject: [PATCH] Add site.min.js to pre commit. --- git-pre-commit | 1 + media/js/src/modules/site.min.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/git-pre-commit b/git-pre-commit index 971fa44..0ca1fe6 100755 --- a/git-pre-commit +++ b/git-pre-commit @@ -59,3 +59,4 @@ git add /Users/Nick/Code/snipt/media/css/pro.css git add /Users/Nick/Code/snipt/media/css/snipt.css git add /Users/Nick/Code/snipt/media/js/snipt-all.min.js git add /Users/Nick/Code/snipt/media/js/pro-all.min.js +git add /Users/Nick/Code/snipt/media/js/src/modules/site.min.js diff --git a/media/js/src/modules/site.min.js b/media/js/src/modules/site.min.js index 07407f4..4063190 100644 --- a/media/js/src/modules/site.min.js +++ b/media/js/src/modules/site.min.js @@ -10,5 +10,6 @@ if(!errors){$('.payment-errors').hide();$('.payment-loading').show();Stripe.crea return false;});} if(this.$body.hasClass('login')){$('input#id_username').focus();} if(window.gittip_username){this.$aside_main.html(this.$aside_main.html().replace(/\[\[.*gittip.*\]\]/,''));$('iframe',this.$aside_main).parent('p').prev('p').css('margin-bottom','10px');} -$('div.markdown pre code').each(function(i,e){hljs.highlightBlock(e);});if(this.$body.hasClass('homepage')){setTimeout(function(){$('div.faces img').show();},700);} +$('div.markdown pre code').each(function(i,e){hljs.highlightBlock(e);});if(this.$body.hasClass('homepage')){setTimeout(function(){var $facesInner=$('div.faces div.inner');var $faces=$('a',$facesInner);for(var i=0;i<$faces.length;i++){var $face=$faces.eq(i);var imageWidth=$('img',$face).width();if(imageWidth!=50){$face.remove();}} +$facesInner.hide();$facesInner.css('text-indent','0');$facesInner.fadeIn(400);},700);} window.ui_halted=false;},events:{'showKeyboardShortcuts':'showKeyboardShortcuts','click a.mini-profile':'toggleMiniProfile'},keyboardShortcuts:function(){var $body=this.$body;var that=this;$search_queries=this.$search_queries;$search_page_query=this.$search_page_query;$search_query=this.$search_query;$document=$(document);$document.bind('keydown','/',function(e){if(!window.ui_halted){e.preventDefault();if($body.hasClass('search')){$search_page_query.focus();}else{$search_query.focus();}}});$document.bind('keydown','h',function(e){if(!window.ui_halted){window.ui_halted=true;$body.trigger('showKeyboardShortcuts');}else{if(that.$keyboard_shortcuts.is(':visible')){that.$keyboard_shortcuts.modal('hide');}}});$document.bind('keydown','t',function(e){if(!window.ui_halted){window.open('','_blank');}});$document.bind('keydown','r',function(e){if(!window.ui_halted){location.reload(true);}});$document.bind('keydown','Ctrl+h',function(e){if(!window.ui_halted){history.go(-1);}});$document.bind('keydown','Ctrl+l',function(e){if(!window.ui_halted){history.go(1);}});this.$search_queries.bind('keydown','esc',function(e){if(!window.ui_halted){e.preventDefault();this.blur();}});},showKeyboardShortcuts:function(){this.$keyboard_shortcuts.modal('toggle');},toggleMiniProfile:function(e){this.$aside_nav.toggleClass('open');return false;},inFieldLabels:function(){$('div.infield label',this.$body).inFieldLabels({fadeDuration:200});},stripeResponseHandler:function(status,response){var $form=$('form#pro-signup');if(response.error){$('button[type="submit"]',$form).removeAttr('disabled');$('.payment-loading').hide();$('.payment-errors').text(response.error.message).show();}else{var token=response.id;$('input#name').val('');$('input#number').val('');$('select#exp-month').val('');$('select#exp-year').val('');$('input#cvc').val('');$form.append("");$form.get(0).submit();}}});})(snipt.module('site')); \ No newline at end of file