From a330bdac62ddbc15232bc65d65e869b224880e3f Mon Sep 17 00:00:00 2001 From: sarven Date: Thu, 22 Jan 2009 06:33:38 +0000 Subject: [PATCH] Moved nudge response from util.php to nudge.php Adjusted some CSS --- actions/nudge.php | 3 ++- js/util.js | 20 ++++++++++---------- lib/util.php | 5 ----- theme/base/css/display.css | 22 ++++++++++------------ theme/identica/css/display.css | 8 ++++++-- 5 files changed, 28 insertions(+), 30 deletions(-) diff --git a/actions/nudge.php b/actions/nudge.php index 4561064594..ca6fd37612 100644 --- a/actions/nudge.php +++ b/actions/nudge.php @@ -42,6 +42,7 @@ require_once INSTALLDIR.'/lib/mail.php'; * @package Laconica * @author Evan Prodromou * @author Robin Millette + * @author Sarven Capadisli * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://laconi.ca/ */ @@ -93,7 +94,7 @@ class NudgeAction extends Action $this->element('title', null, _('Nudge sent')); $this->elementEnd('head'); $this->elementStart('body'); - common_nudge_response(); + $this->element('p', array('id' => 'nudge_response'), _('Nudge sent!')); $this->elementEnd('body'); $this->elementEnd('html'); } else { diff --git a/js/util.js b/js/util.js index bb68c25879..579b4952ae 100644 --- a/js/util.js +++ b/js/util.js @@ -108,16 +108,16 @@ $(document).ready(function(){ $("form.form_group_join").each(addAjaxHidden); $("form.form_group_leave").each(addAjaxHidden); - $("#nudge").ajaxForm ({ dataType: 'xml', - beforeSubmit: function(xml) { $("form#nudge input[type=submit]").attr("disabled", "disabled"); - $("form#nudge input[type=submit]").addClass("disabled"); - }, - success: function(xml) { $("#nudge").replaceWith(document._importNode($("#nudge_response", xml).get(0),true)); - $("#nudge input[type=submit]").removeAttr("disabled"); - $("#nudge input[type=submit]").removeClass("disabled"); - } - }); - $("#nudge").each(addAjaxHidden); + $("#form_user_nudge").ajaxForm ({ dataType: 'xml', + beforeSubmit: function(xml) { $("#form_user_nudge input[type=submit]").attr("disabled", "disabled"); + $("#form_user_nudge input[type=submit]").addClass("disabled"); + }, + success: function(xml) { $("#form_user_nudge").replaceWith(document._importNode($("#nudge_response", xml).get(0),true)); + $("#form_user_nudge input[type=submit]").removeAttr("disabled"); + $("#form_user_nudge input[type=submit]").removeClass("disabled"); + } + }); + $("#form_user_nudge").each(addAjaxHidden); var Subscribe = { dataType: 'xml', beforeSubmit: function(formData, jqForm, options) { $(".form_user_subscribe input[type=submit]").attr("disabled", "disabled"); diff --git a/lib/util.php b/lib/util.php index 4d4a3b20f2..61f5d6c16b 100644 --- a/lib/util.php +++ b/lib/util.php @@ -1660,11 +1660,6 @@ function common_session_token() return $_SESSION['token']; } -function common_nudge_response() -{ - common_element('p', array('id' => 'nudge_response'), _('Nudge sent!')); -} - function common_cache_key($extra) { return 'laconica:' . common_keyize(common_config('site', 'name')) . ':' . $extra; diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 073d2d40a2..91789f4f18 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -17,8 +17,8 @@ width:1004px; width:71.714em; } h1,h2,h3,h4,h5,h6 { - text-transform:uppercase; - margin-bottom:7px; +text-transform:uppercase; +margin-bottom:7px; } h1 { font-size:1.4em; @@ -34,8 +34,6 @@ h6 { font-size:0.9em; } caption { font-weight:bold; } -.opened { display: block !important;} -.closed { display: none !important;} legend { font-weight:bold; @@ -56,6 +54,7 @@ border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px; } + input.submit { font-weight:bold; } @@ -79,9 +78,6 @@ form label { font-weight:bold; /*margin:0 0 11px 0;*/ } -form ul li input { -} - input.checkbox { position:relative; top:2px; @@ -465,7 +461,7 @@ padding:1px 2px; } #form_notice #notice_data-attach_view { -/*position:absolute;*/ +position:absolute; top:25px; right:30px; margin-left:4px; @@ -614,10 +610,10 @@ text-align:left; cursor:pointer; width:100%; } -.entity_actions a { +.entity_actions a, +#entity_nudge p { text-decoration:none; font-weight:bold; -width:100%; display:block; } @@ -626,12 +622,14 @@ display:block; .form_user_block input.submit, .form_user_unblock input.submit, #entity_send-a-message a, -.form_user_nudge input.submit { +.form_user_nudge input.submit, +#entity_nudge p { border:0; padding-left:20px; } -#entity_send-a-message a { +#entity_send-a-message a, +#entity_nudge p { padding:4px 4px 4px 23px; } diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index c702c77e63..fa395b03b2 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -22,6 +22,7 @@ input, textarea, select { border-color:#aaa; } + input.submit, #form_notice.warning #notice_text-count, #nav_register a, @@ -43,7 +44,8 @@ div.notice-options input, .form_user_block input.submit, .form_user_unblock input.submit, #entity_send-a-message a, -.form_user_nudge input.submit { +.form_user_nudge input.submit, +#entity_nudge p { color:#002E6E; } @@ -135,7 +137,8 @@ background-image:url(../../base/images/icons/icon_vcard.gif); #entity_send-a-message a, .form_user_nudge input.submit, .form_user_block input.submit, -.form_user_unblock input.submit { +.form_user_unblock input.submit, +#entity_nudge p { background-position: 0 40%; background-repeat: no-repeat; background-color:transparent; @@ -152,6 +155,7 @@ background-color:#97BFD1; #entity_send-a-message a { background-image:url(../images/icons/twotone/green/quote.gif); } +#entity_nudge p, .form_user_nudge input.submit { background-image:url(../images/icons/twotone/green/mail.gif); } -- 2.39.5