From 3321241b61766045a68a3d607b67e11a95014e87 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Thu, 20 Feb 2014 12:44:49 +0200 Subject: Require logins, removed jquery UI --- apps/it/static/js/it.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 apps/it/static/js/it.js (limited to 'apps/it/static/js/it.js') diff --git a/apps/it/static/js/it.js b/apps/it/static/js/it.js new file mode 100644 index 0000000..9a05b0a --- /dev/null +++ b/apps/it/static/js/it.js @@ -0,0 +1,32 @@ +$('.media').hover( + function(){ + $(this).find('.btn-group').show(); + }, + function(){ + $('.btn-group').hide(); + }); + Dropzone.options.myAwesomeDropzone = { + paramName: "attachment", // The name that will be used to transfer the file + maxFilesize: 2, // MB + }; + $('.confirm').click(function(e){ + if(confirm('Are you sure?')) { + return true; + } + e.preventDefault(); + }); + $('.searchfield').on('keyup', function(e){ + if(e.keyCode == 13) { + document.location = '/search/?q=' + $(this).val(); + } + }); + $('.autocomplete').each(function(i, e){ + $(e).autocomplete({source: $(e).data('source')}); + }); + $('.draggable').draggable({opacity: 0.75, zIndex: 100, cursor: 'pointer'}); + $('.dragarea').droppable({ + out: function(e, ui) { + $.ajax($(ui.draggable).data('destroy')); + $(ui.draggable).remove(); + } + }); -- cgit v1.2.3