From 00fa7d4b0b2078f3e85693e98c6b284664cc9767 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 11 Mar 2010 16:41:40 -0500 Subject: Updated theme dates --- theme/default/css/display.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'theme/default/css/display.css') diff --git a/theme/default/css/display.css b/theme/default/css/display.css index be341813a..d92a53965 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -2,7 +2,7 @@ * * @package StatusNet * @author Sarven Capadisli - * @copyright 2009 StatusNet, Inc. + * @copyright 2009-2010 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ -- cgit v1.2.3-54-g00ecf From d8a533274fa6354072a2acb66bd1574ecaec2c02 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 18 Mar 2010 00:19:32 +0100 Subject: Updated 'more' anchor for attachments to do an XHR GET --- js/util.js | 110 +++++++++++++++------------- lib/attachmentlist.php | 2 - plugins/OStatus/classes/Ostatus_profile.php | 2 +- theme/base/css/display.css | 9 ++- theme/default/css/display.css | 3 +- theme/identica/css/display.css | 3 +- 6 files changed, 74 insertions(+), 55 deletions(-) (limited to 'theme/default/css/display.css') diff --git a/js/util.js b/js/util.js index f82ca992c..79fd40deb 100644 --- a/js/util.js +++ b/js/util.js @@ -399,58 +399,70 @@ var SN = { // StatusNet return; } - $.fn.jOverlay.options = { - method : 'GET', - data : '', - url : '', - color : '#000', - opacity : '0.6', - zIndex : 9999, - center : false, - imgLoading : $('address .url')[0].href+'theme/base/images/illustrations/illu_progress_loading-01.gif', - bgClickToClose : true, - success : function() { - $('#jOverlayContent').append(''); - $('#jOverlayContent button').click($.closeOverlay); - }, - timeout : 0, - autoHide : true, - css : {'max-width':'542px', 'top':'5%', 'left':'32.5%'} - }; - - notice.find('a.attachment').click(function() { - var attachId = ($(this).attr('id').substring('attachment'.length + 1)); - if (attachId) { - $().jOverlay({url: $('address .url')[0].href+'attachment/' + attachId + '/ajax'}); - return false; - } - }); + var attachment_more = notice.find('.attachment.more'); + if (attachment_more.length > 0) { + attachment_more.click(function() { + $.get($(this).attr('href')+'/ajax', null, function(data) { + notice.find('.entry-title .entry-content').html($(data).find('#attachment_view .entry-content').html()); + }); - if ($('#shownotice').length == 0) { - var t; - notice.find('a.thumbnail').hover( - function() { - var anchor = $(this); - $('a.thumbnail').children('img').hide(); - anchor.closest(".entry-title").addClass('ov'); - - if (anchor.children('img').length === 0) { - t = setTimeout(function() { - $.get($('address .url')[0].href+'attachment/' + (anchor.attr('id').substring('attachment'.length + 1)) + '/thumbnail', null, function(data) { - anchor.append(data); - }); - }, 500); - } - else { - anchor.children('img').show(); - } + return false; + }); + } + else { + $.fn.jOverlay.options = { + method : 'GET', + data : '', + url : '', + color : '#000', + opacity : '0.6', + zIndex : 9999, + center : false, + imgLoading : $('address .url')[0].href+'theme/base/images/illustrations/illu_progress_loading-01.gif', + bgClickToClose : true, + success : function() { + $('#jOverlayContent').append(''); + $('#jOverlayContent button').click($.closeOverlay); }, - function() { - clearTimeout(t); - $('a.thumbnail').children('img').hide(); - $(this).closest('.entry-title').removeClass('ov'); + timeout : 0, + autoHide : true, + css : {'max-width':'542px', 'top':'5%', 'left':'32.5%'} + }; + + notice.find('a.attachment').click(function() { + var attachId = ($(this).attr('id').substring('attachment'.length + 1)); + if (attachId) { + $().jOverlay({url: $('address .url')[0].href+'attachment/' + attachId + '/ajax'}); + return false; } - ); + }); + + if ($('#shownotice').length == 0) { + var t; + notice.find('a.thumbnail').hover( + function() { + var anchor = $(this); + $('a.thumbnail').children('img').hide(); + anchor.closest(".entry-title").addClass('ov'); + + if (anchor.children('img').length === 0) { + t = setTimeout(function() { + $.get($('address .url')[0].href+'attachment/' + (anchor.attr('id').substring('attachment'.length + 1)) + '/thumbnail', null, function(data) { + anchor.append(data); + }); + }, 500); + } + else { + anchor.children('img').show(); + } + }, + function() { + clearTimeout(t); + $('a.thumbnail').children('img').hide(); + $(this).closest('.entry-title').removeClass('ov'); + } + ); + } } }, diff --git a/lib/attachmentlist.php b/lib/attachmentlist.php index 22ae8ba07..13dafd13e 100644 --- a/lib/attachmentlist.php +++ b/lib/attachmentlist.php @@ -368,9 +368,7 @@ class Attachment extends AttachmentListItem { $body = $this->scrubHtmlFile($attachment); if ($body) { - $this->out->elementStart('div', array('class' => 'inline-attachment')); $this->out->raw($body); - $this->out->elementEnd('div'); } } diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php index a59184b89..7ea8ff633 100644 --- a/plugins/OStatus/classes/Ostatus_profile.php +++ b/plugins/OStatus/classes/Ostatus_profile.php @@ -559,7 +559,7 @@ class Ostatus_profile extends Memcached_DataObject htmlspecialchars($attachUrl) . '" class="attachment more">' . // TRANS: expansion link for too-long remote messages - htmlspecialchars(_m('(more)')) . + htmlspecialchars(_m('more')) . ''; } } diff --git a/theme/base/css/display.css b/theme/base/css/display.css index a2e4cdf2a..9044021f5 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -1284,9 +1284,16 @@ height:16px; position:relative; padding-left:16px; } -#attachments .attachment { +#attachments .attachment, +.notice .attachment.more { padding-left:0; } +.notice .attachment.more:before { +content:'( '; +} +.notice .attachment.more:after { +content:' )'; +} .notice .attachment img { position:absolute; top:18px; diff --git a/theme/default/css/display.css b/theme/default/css/display.css index d92a53965..c08a03061 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -410,7 +410,8 @@ background-position: 0 -1714px; .notice .attachment { background-position:0 -394px; } -#attachments .attachment { +#attachments .attachment, +.notice .attachment.more { background:none; } .notice-options .notice_reply { diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index 59cb3c38a..62a9e25d8 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -409,7 +409,8 @@ background-position: 0 -1714px; .notice .attachment { background-position:0 -394px; } -#attachments .attachment { +#attachments .attachment, +.notice .attachment.more { background:none; } .notice-options .notice_reply { -- cgit v1.2.3-54-g00ecf From e2768b863578ef1b763ebcc9e5adfaea5dfba9d2 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 18 Mar 2010 14:29:35 +0100 Subject: Using an icon to represent the action for more text --- theme/base/css/display.css | 9 +++++++++ theme/base/images/icons/icons-01.gif | Bin 4080 -> 4120 bytes theme/default/css/display.css | 4 +++- theme/identica/css/display.css | 4 +++- 4 files changed, 15 insertions(+), 2 deletions(-) (limited to 'theme/default/css/display.css') diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 757ce7ff1..fdbf59781 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -1284,6 +1284,15 @@ height:16px; position:relative; padding-left:16px; } +.notice .attachment.more { +text-indent:-9999px; +width:16px; +height:16px; +display:inline-block; +overflow:hidden; +vertical-align:middle; +} + #attachments .attachment, .notice .attachment.more { padding-left:0; diff --git a/theme/base/images/icons/icons-01.gif b/theme/base/images/icons/icons-01.gif index bf0f1230e..e0850aa88 100644 Binary files a/theme/base/images/icons/icons-01.gif and b/theme/base/images/icons/icons-01.gif differ diff --git a/theme/default/css/display.css b/theme/default/css/display.css index c08a03061..a283930e5 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -410,8 +410,10 @@ background-position: 0 -1714px; .notice .attachment { background-position:0 -394px; } -#attachments .attachment, .notice .attachment.more { +background-position:0 -2770px; +} +#attachments .attachment { background:none; } .notice-options .notice_reply { diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index 62a9e25d8..69d265a6b 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -409,8 +409,10 @@ background-position: 0 -1714px; .notice .attachment { background-position:0 -394px; } -#attachments .attachment, .notice .attachment.more { +background-position:0 -2770px; +} +#attachments .attachment { background:none; } .notice-options .notice_reply { -- cgit v1.2.3-54-g00ecf From 7dd701fbb38dea575db889d3723f9938dd0251d2 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 18 Mar 2010 23:00:38 +0100 Subject: Added processing indicator for more anchor --- js/util.js | 1 + theme/default/css/display.css | 2 +- theme/identica/css/display.css | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'theme/default/css/display.css') diff --git a/js/util.js b/js/util.js index 79fd40deb..60eeb418f 100644 --- a/js/util.js +++ b/js/util.js @@ -402,6 +402,7 @@ var SN = { // StatusNet var attachment_more = notice.find('.attachment.more'); if (attachment_more.length > 0) { attachment_more.click(function() { + $(this).addClass(SN.C.S.Processing); $.get($(this).attr('href')+'/ajax', null, function(data) { notice.find('.entry-title .entry-content').html($(data).find('#attachment_view .entry-content').html()); }); diff --git a/theme/default/css/display.css b/theme/default/css/display.css index a283930e5..d89607ebe 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -213,7 +213,7 @@ background-color:transparent; } #wrap form.processing input.submit, -.entity_actions a.processing, +#content a.processing, .dialogbox.processing .submit_dialogbox { background:#FFFFFF url(../../base/images/icons/icon_processing.gif) no-repeat 47% 47%; } diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index 69d265a6b..1af853c49 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -214,7 +214,7 @@ background-color:transparent; } #wrap form.processing input.submit, -.entity_actions a.processing, +#content a.processing, .dialogbox.processing .submit_dialogbox { background:#FFFFFF url(../../base/images/icons/icon_processing.gif) no-repeat 47% 47%; } -- cgit v1.2.3-54-g00ecf From f23fc93a43ea08ad754f97fef509f841b63f2cf1 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 19 Mar 2010 19:06:54 +0100 Subject: Using opacity on the notice more link icon --- theme/default/css/display.css | 3 +++ theme/identica/css/display.css | 3 +++ 2 files changed, 6 insertions(+) (limited to 'theme/default/css/display.css') diff --git a/theme/default/css/display.css b/theme/default/css/display.css index d89607ebe..dd18b86ce 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -435,10 +435,12 @@ background-position:0 -1582px; background-position:0 -1648px; } +.notices .attachment.more, .notices div.entry-content, .notices div.notice-options { opacity:0.4; } +.notices li:hover .attachment.more, .notices li:hover div.entry-content, .notices li:hover div.notice-options { opacity:1; @@ -446,6 +448,7 @@ opacity:1; .opaque { opacity:1 !important; } +.attachment.more, .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 1af853c49..bef598383 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -434,10 +434,12 @@ background-position:0 -1582px; background-position:0 -1648px; } +.notices .attachment.more, .notices div.entry-content, .notices div.notice-options { opacity:0.4; } +.notices li:hover .attachment.more, .notices li:hover div.entry-content, .notices li:hover div.notice-options { opacity:1; @@ -445,6 +447,7 @@ opacity:1; .opaque { opacity:1 !important; } +.attachment.more, .notice-options a, .notice-options input { font-family:sans-serif; -- cgit v1.2.3-54-g00ecf From 029eea21ec0c0d053de9ed35c09f97a6ca26660a Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 19 Mar 2010 22:26:50 +0100 Subject: Removed box-shadow and outline on notice more link focus --- theme/default/css/display.css | 6 ++++++ theme/identica/css/display.css | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'theme/default/css/display.css') diff --git a/theme/default/css/display.css b/theme/default/css/display.css index dd18b86ce..d7f15cc46 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -456,6 +456,12 @@ box-shadow:3px 3px 3px rgba(194, 194, 194, 0.3); -moz-box-shadow:3px 3px 3px rgba(194, 194, 194, 0.3); -webkit-box-shadow:3px 3px 3px rgba(194, 194, 194, 0.3); } +.attachment.more:focus { +box-shadow:none; +-moz-box-shadow:none; +-webkit-box-shadow:none; +outline:none; +} #content .notices li:hover, #content .applications li:hover, #content tbody tr:hover { diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index bef598383..d9f39e780 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -455,6 +455,12 @@ box-shadow:3px 3px 3px rgba(194, 194, 194, 0.3); -moz-box-shadow:3px 3px 3px rgba(194, 194, 194, 0.3); -webkit-box-shadow:3px 3px 3px rgba(194, 194, 194, 0.3); } +.attachment.more:focus { +box-shadow:none; +-moz-box-shadow:none; +-webkit-box-shadow:none; +outline:none; +} #content .notices li:hover, #content .applications li:hover, #content tbody tr:hover { -- cgit v1.2.3-54-g00ecf