diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/userdesign.go.js | 5 | ||||
-rw-r--r-- | js/util.js | 19 |
2 files changed, 19 insertions, 5 deletions
diff --git a/js/userdesign.go.js b/js/userdesign.go.js index b54b492cc..833b19adc 100644 --- a/js/userdesign.go.js +++ b/js/userdesign.go.js @@ -89,11 +89,10 @@ $(document).ready(function() { $('body').css({'background-image':'none'}); }); $('#design_background-image_on').focus(function() { - var bis = $('#design_background-image_onoff img')[0].src; - $('body').css({'background-image':'url('+bis+')'}); + $('body').css({'background-image':'url('+$('#design_background-image_onoff img')[0].src+')'}); }); $('#design_background-image_repeat').click(function() { ($(this)[0].checked) ? $('body').css({'background-repeat':'repeat'}) : $('body').css({'background-repeat':'no-repeat'}); }); -});
\ No newline at end of file +}); diff --git a/js/util.js b/js/util.js index 65a77960a..e7c54b74a 100644 --- a/js/util.js +++ b/js/util.js @@ -222,6 +222,7 @@ $(document).ready(function(){ } $("#notice_data-text").val(""); $("#notice_data-attach").val(""); + $('#notice_data-attach_selected').remove(); counter(); } $("#form_notice").removeClass("processing"); @@ -233,6 +234,7 @@ $(document).ready(function(){ $("#form_notice").each(addAjaxHidden); NoticeReply(); NoticeAttachments(); + NoticeDataAttach(); }); function NoticeReply() { @@ -280,13 +282,13 @@ function NoticeAttachments() { timeout : 0 }; - $('a.attachment').click(function() { + $('#content .notice a.attachment').click(function() { $().jOverlay({url: $('address .url')[0].href+'/attachment/' + ($(this).attr('id').substring('attachment'.length + 1)) + '/ajax'}); return false; }); var t; - $("body:not(#shownotice) a.thumbnail").hover( + $("body:not(#shownotice) #content .notice a.thumbnail").hover( function() { var anchor = $(this); $("a.thumbnail").children('img').hide(); @@ -310,3 +312,16 @@ function NoticeAttachments() { } ); } + +function NoticeDataAttach() { + NDA = $('#notice_data-attach'); + NDA.change(function() { + S = '<div id="notice_data-attach_selected" class="success"><code>'+$(this).val()+'</code> <button>×</button></div>'; + NDAS = $('#notice_data-attach_selected'); + (NDAS.length > 0) ? NDAS.replaceWith(S) : $('#form_notice').append(S); + $('#notice_data-attach_selected button').click(function(){ + $('#notice_data-attach_selected').remove(); + NDA.val(''); + }); + }); +} |