summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2009-12-23 15:42:37 -0500
committerSarven Capadisli <csarven@status.net>2009-12-23 15:42:37 -0500
commitbc4f1824eab81580fd862ad7f3c0d412868d7c68 (patch)
tree5f066a09b7bed4d8336c9a25b666de9641e14005
parenteab6d1c95450cf9b209a0961ac325f2f9ce87d80 (diff)
Init UI for Repeat notice option confirmation dialog.
-rw-r--r--js/util.js36
-rw-r--r--theme/base/css/display.css32
-rw-r--r--theme/identica/css/display.css3
3 files changed, 70 insertions, 1 deletions
diff --git a/js/util.js b/js/util.js
index f60b5d313..9171c1e67 100644
--- a/js/util.js
+++ b/js/util.js
@@ -316,7 +316,41 @@ var SN = { // StatusNet
},
NoticeRepeat: function() {
- $('.form_repeat').each(function() { SN.U.FormXHR($(this)); });
+ $('.form_repeat').each(function() {
+ SN.U.FormXHR($(this));
+ SN.U.NoticeRepeatConfirmation($(this));
+ });
+ },
+
+ NoticeRepeatConfirmation: function(form) {
+ function NRC() {
+ form.closest('.notice-options').addClass('opaque');
+ form.addClass('dialogbox');
+
+ form.append('<button class="close">&#215;</button>');
+ form.find('button.close').click(function(){
+ $(this).remove();
+
+ form.closest('.notice-options').removeClass('opaque');
+ form.removeClass('dialogbox');
+ form.find('.submit_dialogbox').remove();
+ form.find('.submit').show();
+
+ return false;
+ });
+ };
+
+ form.find('.submit').bind('click', function(e) {
+ e.preventDefault();
+
+ var submit = form.find('.submit').clone();
+ submit.addClass('submit_dialogbox');
+ form.append(submit);
+
+ $(this).hide();
+
+ NRC();
+ });
},
NoticeAttachments: function() {
diff --git a/theme/base/css/display.css b/theme/base/css/display.css
index 2f6563bf4..9cbee32c8 100644
--- a/theme/base/css/display.css
+++ b/theme/base/css/display.css
@@ -1004,6 +1004,38 @@ top:4px;
left:0;
}
+.dialogbox {
+position:absolute;
+top:-4px;
+right:29px;
+z-index:9;
+min-width:199px;
+float:none;
+background-color:#FFF;
+padding:11px;
+border-radius:7px;
+-moz-border-radius:7px;
+-webkit-border-radius:7px;
+border-style:solid;
+border-width:1px;
+border-color:#DDDDDD;
+-moz-box-shadow:3px 7px 5px rgba(194, 194, 194, 0.7);
+}
+
+.dialogbox legend {
+display:block !important;
+margin-right:18px;
+}
+
+.form_repeat.dialogbox legend:after {
+content:'?';
+}
+.dialogbox button {
+position:absolute;
+right:3px;
+top:3px;
+}
+
.notice-options {
position:relative;
font-size:0.95em;
diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css
index aa02070ac..009a726f1 100644
--- a/theme/identica/css/display.css
+++ b/theme/identica/css/display.css
@@ -350,6 +350,9 @@ opacity:0.4;
.notices li:hover div.notice-options {
opacity:1;
}
+.opaque {
+opacity:1 !important;
+}
.notice-options a,
.notice-options input {
font-family:sans-serif;