From 0cbd72e0927cbe9b605e34d7bbd86d2046ea0c49 Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Mon, 1 Jun 2009 15:52:52 -0400 Subject: Re-added some javascript to toggle upload field. --- js/util.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'js') diff --git a/js/util.js b/js/util.js index 20f17f6e7..acf44a17c 100644 --- a/js/util.js +++ b/js/util.js @@ -17,6 +17,17 @@ */ $(document).ready(function(){ + $('input#notice_data-attach').toggle(); + $('label[for=notice_data-attach]').text('Upload a file as an attachment?'); + $('label[for=notice_data-attach]').click(function () { + if ('Upload a file as an attachment?' == $(this).text()) { + $(this).text('Upload: '); + $('input#notice_data-attach').slideDown('fast'); + } else { + $('input#notice_data-attach').slideUp('fast', function() {$('label[for=notice_data-attach]').text('Upload a file as an attachment?');}); + } + }); + $('a.attachment').click(function() {$().jOverlay({url: $('address .url')[0].href+'/attachment/' + ($(this).attr('id').substring('attachment'.length + 1)) + '/ajax'}); return false; }); $("a.thumbnail").hover( function() { -- cgit v1.2.3-54-g00ecf