summaryrefslogtreecommitdiff
path: root/js/util.js
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2010-02-10 11:09:03 +0000
committerSarven Capadisli <csarven@status.net>2010-02-10 11:09:03 +0000
commit3d0bc1a3dd16826bf89286f37aa3778e93a34b6b (patch)
tree917cbd6dde0d9b47497def39e9dcf12e5433e544 /js/util.js
parentf3c2dfacf4b3b1ce44edcb82d8e76e75e2b7c9fa (diff)
parente8428d1d525677fa116236735a43e7b49e8a3fd3 (diff)
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'js/util.js')
-rw-r--r--js/util.js48
1 files changed, 25 insertions, 23 deletions
diff --git a/js/util.js b/js/util.js
index c6a9682de..639049668 100644
--- a/js/util.js
+++ b/js/util.js
@@ -356,42 +356,44 @@ var SN = { // StatusNet
},
NoticeRepeat: function() {
- $('.form_repeat').live('click', function() {
- SN.U.FormXHR($(this));
+ $('.form_repeat').live('click', function(e) {
+ e.preventDefault();
+
SN.U.NoticeRepeatConfirmation($(this));
return false;
});
},
NoticeRepeatConfirmation: function(form) {
- function NRC() {
- form.closest('.notice-options').addClass('opaque');
- form.addClass('dialogbox');
+ var submit_i = form.find('.submit');
- form.append('<button class="close">&#215;</button>');
- form.find('button.close').click(function(){
- $(this).remove();
+ var submit = submit_i.clone();
+ submit
+ .addClass('submit_dialogbox')
+ .removeClass('submit');
+ form.append(submit);
+ submit.bind('click', function() { SN.U.FormXHR(form); return false; });
- form.closest('.notice-options').removeClass('opaque');
- form.removeClass('dialogbox');
- form.find('.submit_dialogbox').remove();
- form.find('.submit').show();
+ submit_i.hide();
- return false;
- });
- };
+ form
+ .addClass('dialogbox')
+ .append('<button class="close">&#215;</button>')
+ .closest('.notice-options')
+ .addClass('opaque');
- form.find('.submit').bind('click', function(e) {
- e.preventDefault();
+ form.find('button.close').click(function(){
+ $(this).remove();
- var submit = form.find('.submit').clone();
- submit.addClass('submit_dialogbox');
- submit.removeClass('submit');
- form.append(submit);
+ form
+ .removeClass('dialogbox')
+ .closest('.notice-options')
+ .removeClass('opaque');
- $(this).hide();
+ form.find('.submit_dialogbox').remove();
+ form.find('.submit').show();
- NRC();
+ return false;
});
},