summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-12-23 14:31:56 -0800
committerEvan Prodromou <evan@status.net>2009-12-23 14:31:56 -0800
commitda5db060e8c2322294e7bc0866078611cc290790 (patch)
treef3cbed89ddd45b170bb2171dc4a73852d0fa2356
parent3262930ed46936140244c5385e4b172632d2dd44 (diff)
parent9c1103703fdab14c7d977263792cf5edcbd8a4da (diff)
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
-rw-r--r--js/util.js37
-rw-r--r--lib/repeatform.php4
-rw-r--r--theme/base/css/display.css34
-rw-r--r--theme/default/css/display.css6
-rw-r--r--theme/identica/css/display.css6
5 files changed, 84 insertions, 3 deletions
diff --git a/js/util.js b/js/util.js
index f60b5d313..0987c6cc0 100644
--- a/js/util.js
+++ b/js/util.js
@@ -316,7 +316,42 @@ 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');
+ submit.removeClass('submit');
+ form.append(submit);
+
+ $(this).hide();
+
+ NRC();
+ });
},
NoticeAttachments: function() {
diff --git a/lib/repeatform.php b/lib/repeatform.php
index 50e5d6dbe..4f1c8aa32 100644
--- a/lib/repeatform.php
+++ b/lib/repeatform.php
@@ -104,7 +104,7 @@ class RepeatForm extends Form
*/
function formLegend()
{
- $this->out->element('legend', null, _('Repeat this notice'));
+ $this->out->element('legend', null, _('Repeat this notice?'));
}
/**
@@ -129,7 +129,7 @@ class RepeatForm extends Form
function formActions()
{
$this->out->submit('repeat-submit-' . $this->notice->id,
- _('Repeat'), 'submit', null, _('Repeat this notice'));
+ _('Yes'), 'submit', null, _('Repeat this notice'));
}
/**
diff --git a/theme/base/css/display.css b/theme/base/css/display.css
index 2f6563bf4..810b3aa80 100644
--- a/theme/base/css/display.css
+++ b/theme/base/css/display.css
@@ -1004,6 +1004,40 @@ 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;
+}
+
+.dialogbox button.close {
+position:absolute;
+right:3px;
+top:3px;
+}
+
+.dialogbox .submit_dialogbox {
+text-indent:0;
+font-weight:bold;
+}
+
.notice-options {
position:relative;
font-size:0.95em;
diff --git a/theme/default/css/display.css b/theme/default/css/display.css
index f1d9a9d0b..50209bfd3 100644
--- a/theme/default/css/display.css
+++ b/theme/default/css/display.css
@@ -88,6 +88,7 @@ color:#FFFFFF;
border-color:transparent;
text-shadow:none;
}
+.dialogbox .submit_dialogbox,
input.submit,
.form_notice input.submit {
background:#AAAAAA url(../../base/images/illustrations/illu_pattern-01.png) 0 0 repeat-x;
@@ -97,9 +98,11 @@ border-color:#AAAAAA;
border-top-color:#CCCCCC;
border-left-color:#CCCCCC;
}
+.dialogbox .submit_dialogbox:hover,
input.submit:hover {
background-position:0 -5px;
}
+.dialogbox .submit_dialogbox:focus,
input.submit:focus {
background-position:0 -15px;
box-shadow:3px 3px 3px rgba(194, 194, 194, 0.1);
@@ -351,6 +354,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;
diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css
index aa02070ac..e86ee2437 100644
--- a/theme/identica/css/display.css
+++ b/theme/identica/css/display.css
@@ -88,6 +88,7 @@ color:#FFFFFF;
border-color:transparent;
text-shadow:none;
}
+.dialogbox .submit_dialogbox,
input.submit,
.form_notice input.submit {
background:#AAAAAA url(../../base/images/illustrations/illu_pattern-01.png) 0 0 repeat-x;
@@ -97,9 +98,11 @@ border-color:#AAAAAA;
border-top-color:#CCCCCC;
border-left-color:#CCCCCC;
}
+.dialogbox .submit_dialogbox:hover,
input.submit:hover {
background-position:0 -5px;
}
+.dialogbox .submit_dialogbox:focus,
input.submit:focus {
background-position:0 -15px;
box-shadow:3px 3px 3px rgba(194, 194, 194, 0.1);
@@ -350,6 +353,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;