From 2f380f6a9a16970e3fb1b469fb2f1384aaf455a2 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 14 Mar 2010 15:01:24 -0400 Subject: Using rel=external instead of class=external for jOverlay title link --- theme/base/css/display.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'theme') diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 782d3dc71..a2e4cdf2a 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -1326,7 +1326,7 @@ margin-bottom:0; padding:11px; min-height:auto; } -#jOverlayContent .external span { +#jOverlayContent .entry-title { display:block; margin-bottom:11px; } -- cgit v1.2.3-54-g00ecf From 0be70e390b2f1ac12b9d8d7f2cbe66a5b93818ad Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 16 Mar 2010 19:34:20 +0100 Subject: Removed dangling stylesheet --- theme/base/css/thickbox.css | 163 -------------------------------------------- 1 file changed, 163 deletions(-) delete mode 100644 theme/base/css/thickbox.css (limited to 'theme') diff --git a/theme/base/css/thickbox.css b/theme/base/css/thickbox.css deleted file mode 100644 index d24b9bedf..000000000 --- a/theme/base/css/thickbox.css +++ /dev/null @@ -1,163 +0,0 @@ -/* ----------------------------------------------------------------------------------------------------------------*/ -/* ---------->>> global settings needed for thickbox <<<-----------------------------------------------------------*/ -/* ----------------------------------------------------------------------------------------------------------------*/ -*{padding: 0; margin: 0;} - -/* ----------------------------------------------------------------------------------------------------------------*/ -/* ---------->>> thickbox specific link and font settings <<<------------------------------------------------------*/ -/* ----------------------------------------------------------------------------------------------------------------*/ -#TB_window { - font: 12px Arial, Helvetica, sans-serif; - color: #333333; -} - -#TB_secondLine { - font: 10px Arial, Helvetica, sans-serif; - color:#666666; -} - -#TB_window a:link {color: #666666;} -#TB_window a:visited {color: #666666;} -#TB_window a:hover {color: #000;} -#TB_window a:active {color: #666666;} -#TB_window a:focus{color: #666666;} - -/* ----------------------------------------------------------------------------------------------------------------*/ -/* ---------->>> thickbox settings <<<-----------------------------------------------------------------------------*/ -/* ----------------------------------------------------------------------------------------------------------------*/ -#TB_overlay { - position: fixed; - z-index:100; - top: 0px; - left: 0px; - height:100%; - width:100%; -} - -.TB_overlayMacFFBGHack {background: url(macFFBgHack.png) repeat;} -.TB_overlayBG { - background-color:#000; - filter:alpha(opacity=75); - -moz-opacity: 0.75; - opacity: 0.75; -} - -* html #TB_overlay { /* ie6 hack */ - position: absolute; - height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); -} - -#TB_window { - position: fixed; - background: #ffffff; - z-index: 102; - color:#000000; - display:none; - border: 4px solid #525252; - text-align:left; - top:50%; - left:50%; -} - -* html #TB_window { /* ie6 hack */ -position: absolute; -margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); -} - -#TB_window img#TB_Image { - display:block; - margin: 15px 0 0 15px; - border-right: 1px solid #ccc; - border-bottom: 1px solid #ccc; - border-top: 1px solid #666; - border-left: 1px solid #666; -} - -#TB_caption{ - height:25px; - padding:7px 30px 10px 25px; - float:left; -} - -#TB_closeWindow{ - height:25px; - padding:11px 25px 10px 0; - float:right; -} - -#TB_closeAjaxWindow{ - padding:7px 10px 5px 0; - margin-bottom:1px; - text-align:right; - float:right; -} - -#TB_ajaxWindowTitle{ - float:left; - padding:7px 0 5px 10px; - margin-bottom:1px; -} - -#TB_title{ - background-color:#e8e8e8; - height:27px; -} - -#TB_ajaxContent{ - clear:both; - padding:2px 15px 15px 15px; - overflow:auto; - text-align:left; - line-height:1.4em; -} - -#TB_ajaxContent.TB_modal{ - padding:15px; -} - -#TB_ajaxContent p{ - padding:5px 0px 5px 0px; -} - -#TB_load{ - position: fixed; - display:none; - height:13px; - width:208px; - z-index:103; - top: 50%; - left: 50%; - margin: -6px 0 0 -104px; /* -height/2 0 0 -width/2 */ -} - -* html #TB_load { /* ie6 hack */ -position: absolute; -margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); -} - -#TB_HideSelect{ - z-index:99; - position:fixed; - top: 0; - left: 0; - background-color:#fff; - border:none; - filter:alpha(opacity=0); - -moz-opacity: 0; - opacity: 0; - height:100%; - width:100%; -} - -* html #TB_HideSelect { /* ie6 hack */ - position: absolute; - height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); -} - -#TB_iframeContent{ - clear:both; - border:none; - margin-bottom:-1px; - margin-top:1px; - _margin-bottom:1px; -} -- 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') 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 052466ceab9666b30b6ee38bbb5774b1070618ad Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 18 Mar 2010 14:26:30 +0100 Subject: Using … (hellip) instead of "more" for link text --- plugins/OStatus/classes/Ostatus_profile.php | 11 ++++------- theme/base/css/display.css | 6 ------ 2 files changed, 4 insertions(+), 13 deletions(-) (limited to 'theme') diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php index 7ea8ff633..e47b6973d 100644 --- a/plugins/OStatus/classes/Ostatus_profile.php +++ b/plugins/OStatus/classes/Ostatus_profile.php @@ -546,7 +546,6 @@ class Ostatus_profile extends Memcached_DataObject $shortSummary = substr($shortSummary, 0, Notice::maxContent() - (mb_strlen($url) + 2)); - $shortSummary .= '…'; $content = $shortSummary . ' ' . $url; // We mark up the attachment link specially for the HTML output @@ -554,12 +553,10 @@ class Ostatus_profile extends Memcached_DataObject $attachUrl = common_local_url('attachment', array('attachment' => $attachment->id)); $rendered = common_render_text($shortSummary) . - ' ' . - '' . - // TRANS: expansion link for too-long remote messages - htmlspecialchars(_m('more')) . + '' . + '…' . ''; } } diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 9044021f5..757ce7ff1 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -1288,12 +1288,6 @@ padding-left:16px; .notice .attachment.more { padding-left:0; } -.notice .attachment.more:before { -content:'( '; -} -.notice .attachment.more:after { -content:' )'; -} .notice .attachment img { position:absolute; top:18px; -- 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') 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') 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 c320b29c10466dbfb45103c2b40f84e03c1302c7 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 19 Mar 2010 10:06:06 +0100 Subject: Updated biz theme logo --- theme/biz/css/display.css | 2 +- theme/biz/logo.png | Bin 6389 -> 10107 bytes 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'theme') diff --git a/theme/biz/css/display.css b/theme/biz/css/display.css index f133ac30b..3e97444f1 100644 --- a/theme/biz/css/display.css +++ b/theme/biz/css/display.css @@ -22,7 +22,7 @@ background:#144A6E url(../images/illustrations/illu_pattern-01.png) repeat-x; } address { -margin-right:7.18%; +margin-right:5.7%; } input, textarea, select { diff --git a/theme/biz/logo.png b/theme/biz/logo.png index 550d373fe..cf1839194 100644 Binary files a/theme/biz/logo.png and b/theme/biz/logo.png differ -- cgit v1.2.3-54-g00ecf From 41633fcd47a18317c61a78ed949138841cdf92ff Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Fri, 19 Mar 2010 18:35:40 +0100 Subject: Minor margin to more link --- theme/base/css/display.css | 1 + 1 file changed, 1 insertion(+) (limited to 'theme') diff --git a/theme/base/css/display.css b/theme/base/css/display.css index fdbf59781..d58684efb 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -1291,6 +1291,7 @@ height:16px; display:inline-block; overflow:hidden; vertical-align:middle; +margin-left:4px; } #attachments .attachment, -- 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') 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') 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 From aaec5345f62aaa63a5f3459f9d93ab4c51030dd2 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 22 Mar 2010 14:07:59 +0100 Subject: Updated logos --- theme/cloudy/logo.png | Bin 6389 -> 10107 bytes theme/h4ck3r/logo.png | Bin 6389 -> 10107 bytes 2 files changed, 0 insertions(+), 0 deletions(-) (limited to 'theme') diff --git a/theme/cloudy/logo.png b/theme/cloudy/logo.png index 550d373fe..cf1839194 100644 Binary files a/theme/cloudy/logo.png and b/theme/cloudy/logo.png differ diff --git a/theme/h4ck3r/logo.png b/theme/h4ck3r/logo.png index 550d373fe..cf1839194 100644 Binary files a/theme/h4ck3r/logo.png and b/theme/h4ck3r/logo.png differ -- cgit v1.2.3-54-g00ecf From 0a6b30552d16201e5a1999da6e7d3ab0f63852cd Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 22 Mar 2010 14:14:07 +0100 Subject: Minor core alignment for cloudy --- theme/cloudy/css/display.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'theme') diff --git a/theme/cloudy/css/display.css b/theme/cloudy/css/display.css index 285c2ad83..5bc32e6d9 100644 --- a/theme/cloudy/css/display.css +++ b/theme/cloudy/css/display.css @@ -1554,7 +1554,8 @@ display:none; } #public #core, -#showstream #core { +#showstream #core, +#showgroup #core { margin-top:10em; } #public.user_in #core, -- cgit v1.2.3-54-g00ecf From 647b3a1f6bff2f0c8f02ea65939ebde088742b16 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 24 Mar 2010 14:50:12 +0100 Subject: Moved print inside base stylesheet using media rules. One less HTTP GET. --- lib/action.php | 3 +-- theme/base/css/display.css | 32 ++++++++++++++++++++++++++++++++ theme/biz/css/base.css | 32 ++++++++++++++++++++++++++++++++ theme/biz/css/display.css | 3 ++- theme/cloudy/css/display.css | 30 ++++++++++++++++++++++++++++++ theme/default/css/display.css | 4 +++- theme/h4ck3r/css/base.css | 32 ++++++++++++++++++++++++++++++++ theme/h4ck3r/css/display.css | 5 ++++- theme/identica/css/display.css | 4 +++- theme/pigeonthoughts/css/base.css | 32 ++++++++++++++++++++++++++++++++ theme/pigeonthoughts/css/display.css | 4 +++- 11 files changed, 174 insertions(+), 7 deletions(-) (limited to 'theme') diff --git a/lib/action.php b/lib/action.php index 491d7d481..09113a598 100644 --- a/lib/action.php +++ b/lib/action.php @@ -198,8 +198,7 @@ class Action extends HTMLOutputter // lawsuit if (Event::handle('StartShowStatusNetStyles', array($this)) && Event::handle('StartShowLaconicaStyles', array($this))) { - $this->cssLink('css/display.css',null,'screen, projection, tv'); - $this->cssLink('css/print.css','base','print'); + $this->cssLink('css/display.css',null, 'screen, projection, tv, print'); Event::handle('EndShowStatusNetStyles', array($this)); Event::handle('EndShowLaconicaStyles', array($this)); } diff --git a/theme/base/css/display.css b/theme/base/css/display.css index d58684efb..36f0533b1 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -7,6 +7,7 @@ * @link http://status.net/ */ +@media screen, projection, tv { * { margin:0; padding:0; } img { display:block; border:0; } a abbr { cursor: pointer; border-bottom:0; } @@ -1688,3 +1689,34 @@ width:auto; #bookmarklet #wrap { min-width:0; } + +}/*end of @media screen, projection, tv*/ + + +@media print { +a:after { background-color:#FFFFFF; } +a:not([href^="#"]):after { content:" <"attr(href)"> "; } +img { border:none; } +p { orphans: 2; widows: 1; } + +#site_nav_global_primary, +#site_nav_local_views, +#form_notice, +.pagination, +#site_nav_global_secondary, +.entity_actions, +.notice-options, +#aside_primary, +.form_subscription_edit .submit { +display:none; +} +.timestamp dt, .timestamp dd, +.device dt, .device dd { +display:inline; +} +.profiles li, +.notices li { +margin-bottom:18px; +} + +}/*end of @media print*/ diff --git a/theme/biz/css/base.css b/theme/biz/css/base.css index 2c2ab33a0..43b8e4656 100644 --- a/theme/biz/css/base.css +++ b/theme/biz/css/base.css @@ -7,6 +7,7 @@ * @link http://status.net/ */ +@media screen, projection, tv { * { margin:0; padding:0; } img { display:block; border:0; } a abbr { cursor: pointer; border-bottom:0; } @@ -1358,3 +1359,34 @@ display:none; .guide { clear:both; } + +}/*end of @media screen, projection, tv*/ + + +@media print { +a:after { background-color:#FFFFFF; } +a:not([href^="#"]):after { content:" <"attr(href)"> "; } +img { border:none; } +p { orphans: 2; widows: 1; } + +#site_nav_global_primary, +#site_nav_local_views, +#form_notice, +.pagination, +#site_nav_global_secondary, +.entity_actions, +.notice-options, +#aside_primary, +.form_subscription_edit .submit { +display:none; +} +.timestamp dt, .timestamp dd, +.device dt, .device dd { +display:inline; +} +.profiles li, +.notices li { +margin-bottom:18px; +} + +}/*end of @media print*/ diff --git a/theme/biz/css/display.css b/theme/biz/css/display.css index 3e97444f1..cafb152dc 100644 --- a/theme/biz/css/display.css +++ b/theme/biz/css/display.css @@ -7,8 +7,9 @@ * @link http://status.net/ */ -@import url(base.css); +@import url(base.css) screen, projection, tv, print; +@media screen, projection, tv { html { background-color:#144A6E; } diff --git a/theme/cloudy/css/display.css b/theme/cloudy/css/display.css index 5bc32e6d9..d9e9f3ce2 100644 --- a/theme/cloudy/css/display.css +++ b/theme/cloudy/css/display.css @@ -7,6 +7,7 @@ * @link http://status.net/ */ +@media screen, projection, tv { * { margin:0; padding:0; } img { display:block; border:0; } a abbr { cursor: pointer; border-bottom:0; } @@ -2099,4 +2100,33 @@ border-left-color:#FFFFFF; #footer { background-color:#FFFFFF; } +}/*end of @media screen, projection, tv*/ + +@media print { +a:after { background-color:#FFFFFF; } +a:not([href^="#"]):after { content:" <"attr(href)"> "; } +img { border:none; } +p { orphans: 2; widows: 1; } + +#site_nav_global_primary, +#site_nav_local_views, +#form_notice, +.pagination, +#site_nav_global_secondary, +.entity_actions, +.notice-options, +#aside_primary, +.form_subscription_edit .submit { +display:none; +} +.timestamp dt, .timestamp dd, +.device dt, .device dd { +display:inline; +} +.profiles li, +.notices li { +margin-bottom:18px; +} + +}/*end of @media print*/ diff --git a/theme/default/css/display.css b/theme/default/css/display.css index d7f15cc46..7ccd234cd 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -7,8 +7,9 @@ * @link http://status.net/ */ -@import url(../../base/css/display.css); +@import url(../../base/css/display.css) screen, projection, tv, print; +@media screen, projection, tv { body, a:active { background-color:#CEE1E9; @@ -516,3 +517,4 @@ background-position:90% 47%; background-position:10% 47%; } +}/*end of @media screen, projection, tv*/ diff --git a/theme/h4ck3r/css/base.css b/theme/h4ck3r/css/base.css index 18ea742a5..0302653fd 100644 --- a/theme/h4ck3r/css/base.css +++ b/theme/h4ck3r/css/base.css @@ -7,6 +7,7 @@ * @link http://status.net/ */ +@media screen, projection, tv { * { margin:0; padding:0; } img { display:block; border:0; } a abbr { cursor: pointer; border-bottom:0; } @@ -1137,3 +1138,34 @@ display:none; .guide { clear:both; } + +}/*end of @media screen, projection, tv*/ + + +@media print { +a:after { background-color:#FFFFFF; } +a:not([href^="#"]):after { content:" <"attr(href)"> "; } +img { border:none; } +p { orphans: 2; widows: 1; } + +#site_nav_global_primary, +#site_nav_local_views, +#form_notice, +.pagination, +#site_nav_global_secondary, +.entity_actions, +.notice-options, +#aside_primary, +.form_subscription_edit .submit { +display:none; +} +.timestamp dt, .timestamp dd, +.device dt, .device dd { +display:inline; +} +.profiles li, +.notices li { +margin-bottom:18px; +} + +}/*end of @media print*/ diff --git a/theme/h4ck3r/css/display.css b/theme/h4ck3r/css/display.css index 58b3f242a..7112765ab 100644 --- a/theme/h4ck3r/css/display.css +++ b/theme/h4ck3r/css/display.css @@ -7,8 +7,9 @@ * @link http://status.net/ */ -@import url(base.css); +@import url(base.css) screen, projection, tv, print; +@media screen, projection, tv { html, body, a:active { @@ -234,3 +235,5 @@ background-position:10% 45%; background-image:url(../../base/images/icons/twotone/green/arrow-right.gif); background-position:90% 45%; } + +}/*end of @media screen, projection, tv*/ diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index d9f39e780..3972657a7 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -7,8 +7,9 @@ * @link http://status.net/ */ -@import url(../../base/css/display.css); +@import url(../../base/css/display.css) screen, projection, tv, print; +@media screen, projection, tv { body, a:active { background-color:#F0F2F5; @@ -515,3 +516,4 @@ background-position:90% 47%; background-position:10% 47%; } +}/*end of @media screen, projection, tv*/ diff --git a/theme/pigeonthoughts/css/base.css b/theme/pigeonthoughts/css/base.css index 2814260bd..bd12e6eaa 100644 --- a/theme/pigeonthoughts/css/base.css +++ b/theme/pigeonthoughts/css/base.css @@ -7,6 +7,7 @@ * @link http://status.net/ */ +@media screen, projection, tv { * { margin:0; padding:0; } img { display:block; border:0; } a abbr { cursor: pointer; border-bottom:0; } @@ -1383,3 +1384,34 @@ display:none; .guide { clear:both; } + +}/*end of @media screen, projection, tv*/ + + +@media print { +a:after { background-color:#FFFFFF; } +a:not([href^="#"]):after { content:" <"attr(href)"> "; } +img { border:none; } +p { orphans: 2; widows: 1; } + +#site_nav_global_primary, +#site_nav_local_views, +#form_notice, +.pagination, +#site_nav_global_secondary, +.entity_actions, +.notice-options, +#aside_primary, +.form_subscription_edit .submit { +display:none; +} +.timestamp dt, .timestamp dd, +.device dt, .device dd { +display:inline; +} +.profiles li, +.notices li { +margin-bottom:18px; +} + +}/*end of @media print*/ diff --git a/theme/pigeonthoughts/css/display.css b/theme/pigeonthoughts/css/display.css index dfeb01b48..de5164ea8 100644 --- a/theme/pigeonthoughts/css/display.css +++ b/theme/pigeonthoughts/css/display.css @@ -7,8 +7,9 @@ * @link http://status.net/ */ -@import url(base.css); +@import url(base.css) screen, projection, tv, print; +@media screen, projection, tv { html { background:url(../images/illustrations/illu_pigeons-01.png) no-repeat 0 100%; } @@ -496,3 +497,4 @@ background-position:90% 47%; background-position:10% 47%; } +}/*end of @media screen, projection, tv*/ -- cgit v1.2.3-54-g00ecf From 5808f86584a64d6dbd12e070b268f40c043917e4 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 24 Mar 2010 15:13:38 +0100 Subject: Removed print stylesheet --- theme/base/css/print.css | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 theme/base/css/print.css (limited to 'theme') diff --git a/theme/base/css/print.css b/theme/base/css/print.css deleted file mode 100644 index 094d07fed..000000000 --- a/theme/base/css/print.css +++ /dev/null @@ -1,36 +0,0 @@ -/** theme: base - * - * @package StatusNet - * @author Sarven Capadisli - * @copyright 2009 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/ - */ - -a:after { background-color:#fff; } -a:not([href^="#"]):after { content:" ( "attr(href)" ) "; } - -img { border:none; } -p { orphans: 2; widows: 1; } - -#site_nav_global_primary, -#site_nav_local_views, -#form_notice, -.pagination, -#site_nav_global_secondary, -.entity_actions, -.notice-options, -#aside_primary, -.form_subscription_edit .submit { -display:none; -} - -.timestamp dt, .timestamp dd, -.device dt, .device dd { -display:inline; -} - -.profiles li, -.notices li { -margin-bottom:18px; -} -- cgit v1.2.3-54-g00ecf From 09ff213d1c6b8dc42f28b9c637431bafa54146ec Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 24 Mar 2010 20:58:13 +0100 Subject: Using hCard label instead of location. Matches userprofile. --- lib/profilelist.php | 2 +- theme/base/css/display.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'theme') diff --git a/lib/profilelist.php b/lib/profilelist.php index d970e605a..3e5513895 100644 --- a/lib/profilelist.php +++ b/lib/profilelist.php @@ -213,7 +213,7 @@ class ProfileListItem extends Widget { if (!empty($this->profile->location)) { $this->out->text(' '); - $this->out->elementStart('span', 'location'); + $this->out->elementStart('span', 'label'); $this->out->raw($this->highlight($this->profile->location)); $this->out->elementEnd('span'); } diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 36f0533b1..b0ab02bce 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -926,7 +926,7 @@ display:inline; } .profile .entity_profile .fn, -.profile .entity_profile .location { +.profile .entity_profile .label { margin-left:11px; margin-bottom:4px; width:auto; -- cgit v1.2.3-54-g00ecf From 2c50d4aa4487e5317e5b71909691acc3345d4a9e Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 24 Mar 2010 22:40:59 +0100 Subject: location -> label class for cloudy --- theme/cloudy/css/display.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'theme') diff --git a/theme/cloudy/css/display.css b/theme/cloudy/css/display.css index d9e9f3ce2..d1b9d198d 100644 --- a/theme/cloudy/css/display.css +++ b/theme/cloudy/css/display.css @@ -873,7 +873,7 @@ display:inline; } .profile .entity_profile .fn, -.profile .entity_profile .location { +.profile .entity_profile .label { margin-left:11px; margin-bottom:4px; width:auto; -- cgit v1.2.3-54-g00ecf From 97e83112d249cd2fbb281da59c80d43e0fe33818 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 24 Mar 2010 23:31:30 +0100 Subject: A lot of updates to keep the themes current (at least in functionality) --- theme/biz/css/base.css | 134 +++++++++++++++++-- theme/biz/css/display.css | 12 +- theme/cloudy/css/display.css | 35 +++-- theme/h4ck3r/css/base.css | 249 ++++++++++++++++++++++++++++++----- theme/h4ck3r/css/display.css | 9 +- theme/pigeonthoughts/css/base.css | 83 ++++++++---- theme/pigeonthoughts/css/display.css | 22 +++- 7 files changed, 461 insertions(+), 83 deletions(-) (limited to 'theme') diff --git a/theme/biz/css/base.css b/theme/biz/css/base.css index 43b8e4656..3650988f3 100644 --- a/theme/biz/css/base.css +++ b/theme/biz/css/base.css @@ -849,7 +849,8 @@ margin-right:11px; /* NOTICE */ .notice, -.profile { +.profile, +.application { position:relative; padding-top:11px; padding-bottom:11px; @@ -862,10 +863,15 @@ border-top-style:dotted; .notices li { list-style-type:none; } -.notices li.hover { -border-radius:4px; --moz-border-radius:4px; --webkit-border-radius:4px; +.notices .notices { +margin-top:7px; +margin-left:2%; +width:98%; +float:left; +} +.mark-top { +border-top-width:1px; +border-top-style:solid; } /* NOTICES */ @@ -996,25 +1002,22 @@ text-transform:lowercase; .dialogbox { position:absolute; -top:-4px; -right:29px; +top:-1px; +right:-1px; 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; +margin-bottom:18px; } .dialogbox button.close { @@ -1023,11 +1026,22 @@ right:3px; top:3px; } +.dialogbox .form_guide { +font-weight:normal; +padding:0; +} + .dialogbox .submit_dialogbox { font-weight:bold; text-indent:0; min-width:46px; } +.dialogbox input { +padding-left:4px; +} +.dialogbox fieldset { +margin-bottom:0; +} #wrap form.processing input.submit, .entity_actions a.processing, @@ -1103,6 +1117,104 @@ width:16px; height:16px; } +.notice .attachment { +position:relative; +padding-left:16px; +} +.notice .attachment.more { +text-indent:-9999px; +width:16px; +height:16px; +display:inline-block; +overflow:hidden; +vertical-align:middle; +margin-left:4px; +} + +#attachments .attachment, +.notice .attachment.more { +padding-left:0; +} +.notice .attachment img { +position:absolute; +top:18px; +left:0; +z-index:99; +} +#shownotice .notice .attachment img { +position:static; +} + +#attachments { +clear:both; +float:left; +width:100%; +margin-top:18px; +} +#attachments dt { +font-weight:bold; +font-size:1.3em; +margin-bottom:4px; +} + +#attachments ol li { +margin-bottom:18px; +list-style-type:decimal; +float:left; +clear:both; +} + +#jOverlayContent, +#jOverlayContent #content, +#jOverlayContent #content_inner { +width: auto !important; +margin-bottom:0; +} +#jOverlayContent #content { +padding:11px; +min-height:auto; +} +#jOverlayContent .entry-title { +display:block; +margin-bottom:11px; +} +#jOverlayContent button { +position:absolute; +top:0; +right:0; +} +#jOverlayContent h1 { +max-width:425px; +} +#jOverlayContent #content { +border-radius:7px; +-moz-border-radius:7px; +-webkit-border-radius:7px; +} +#jOverlayLoading { +top:5%; +left:40%; +} +#attachment_view img { +max-width:480px; +max-height:480px; +} +#attachment_view #oembed_info { +margin-top:11px; +} +#attachment_view #oembed_info dt, +#attachment_view #oembed_info dd { +float:left; +} +#attachment_view #oembed_info dt { +clear:left; +margin-right:11px; +font-weight:bold; +} +#attachment_view #oembed_info dt:after { +content: ":"; +} + #usergroups #new_group { float: left; margin-right: 2em; diff --git a/theme/biz/css/display.css b/theme/biz/css/display.css index cafb152dc..b2143cce3 100644 --- a/theme/biz/css/display.css +++ b/theme/biz/css/display.css @@ -242,7 +242,9 @@ border-color:#FFFFFF; #content, #site_nav_local_views .current a, .entity_send-a-message .form_notice, -.entity_moderation:hover ul { +.entity_moderation:hover ul, +.entity_role:hover ul, +.dialogbox { background-color:#FFFFFF; } @@ -359,6 +361,9 @@ background-position: 5px -1973px; .notice .attachment { background-position:0 -394px; } +.notice .attachment.more { +background-position:0 -2770px; +} #attachments .attachment { background:none; } @@ -381,14 +386,19 @@ 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; } +.opaque { +opacity:1 !important; +} div.notice-options a, div.notice-options input { font-family:sans-serif; diff --git a/theme/cloudy/css/display.css b/theme/cloudy/css/display.css index d1b9d198d..5c3d8b5f7 100644 --- a/theme/cloudy/css/display.css +++ b/theme/cloudy/css/display.css @@ -901,7 +901,8 @@ margin-right:11px; /* NOTICE */ .notice, -.profile { +.profile, +.application { position:relative; padding-top:11px; padding-bottom:11px; @@ -1032,25 +1033,22 @@ left:0; .dialogbox { position:absolute; -top:-4px; -right:29px; +top:-1px; +right:-1px; 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; +margin-bottom:18px; } .dialogbox button.close { @@ -1059,9 +1057,21 @@ right:3px; top:3px; } +.dialogbox .form_guide { +font-weight:normal; +padding:0; +} + .dialogbox .submit_dialogbox { -text-indent:0; font-weight:bold; +text-indent:0; +min-width:46px; +} +.dialogbox input { +padding-left:4px; +} +.dialogbox fieldset { +margin-bottom:0; } .notice-options { @@ -1808,7 +1818,9 @@ border-color:#FFFFFF; #content, #site_nav_local_views .current a, .entity_send-a-message .form_notice, -.entity_moderation:hover ul { +.entity_moderation:hover ul, +.entity_role:hover ul, +.dialogbox { background-color:#FFFFFF; } @@ -1940,6 +1952,9 @@ background-position: 0 -1714px; .notice .attachment { background-position:0 -394px; } +.notice .attachment.more { +background-position:0 -2770px; +} #attachments .attachment { background:none; } @@ -1962,10 +1977,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; diff --git a/theme/h4ck3r/css/base.css b/theme/h4ck3r/css/base.css index 0302653fd..4c0e74218 100644 --- a/theme/h4ck3r/css/base.css +++ b/theme/h4ck3r/css/base.css @@ -701,7 +701,8 @@ margin-right:11px; /* NOTICE */ .notice, -.profile { +.profile, +.application { position:relative; padding-top:11px; padding-bottom:11px; @@ -709,11 +710,21 @@ clear:both; float:left; width:100%; border-top-width:1px; -border-top-style:dashed; +border-top-style:dotted; } .notices li { list-style-type:none; } +.notices .notices { +margin-top:7px; +margin-left:2%; +width:98%; +float:left; +} +.mark-top { +border-top-width:1px; +border-top-style:solid; +} /* NOTICES */ @@ -813,74 +824,248 @@ text-transform:lowercase; } -.notice-options { -padding-left:2%; +.notice .notice-options a, +.notice .notice-options input { float:left; -width:50%; +font-size:1.025em; +} + +.notice div.entry-content .timestamp { +display:inline-block; +} + +.entry-content .repeat { +display:block; +} +.entry-content .repeat .photo { +float:none; +margin-right:1px; +position:relative; +top:4px; +left:0; +} + +.dialogbox { +position:absolute; +top:-1px; +right:-1px; +z-index:9; +float:none; +padding:11px; +border-radius:7px; +-moz-border-radius:7px; +-webkit-border-radius:7px; +border-style:solid; +border-width:1px; +} + +.dialogbox legend { +display:block !important; +margin-right:18px; +margin-bottom:18px; +} + +.dialogbox button.close { +position:absolute; +right:3px; +top:3px; +} + +.dialogbox .form_guide { +font-weight:normal; +padding:0; +} + +.dialogbox .submit_dialogbox { +font-weight:bold; +text-indent:0; +min-width:46px; +} +.dialogbox input { +padding-left:4px; +} +.dialogbox fieldset { +margin-bottom:0; +} + +#wrap form.processing input.submit, +.entity_actions a.processing, +.dialogbox.processing .submit_dialogbox { +cursor:wait; +outline:none; +text-indent:-9999px; +} + +.form_repeat.dialogbox { +top:-4px; +right:29px; +min-width:199px; +} + +.notice-options { position:relative; font-size:0.95em; -width:12.5%; +width:113px; float:right; +margin-top:3px; +margin-right:4px; } .notice-options a { float:left; } -.notice-options .notice_delete, .notice-options .notice_reply, +.notice-options .form_repeat, .notice-options .form_favor, -.notice-options .form_disfavor { -position:absolute; -top:0; +.notice-options .form_disfavor, +.notice-options .repeated { +float:left; +margin-left:14.2%; } .notice-options .form_favor, .notice-options .form_disfavor { -left:0; -} -.notice-options .notice_reply { -left:29px; -} -.notice-options .notice_delete { -right:0; -} -.notice-options .notice_reply dt { -display:none; +margin-left:0; } - .notice-options input, -.notice-options a { +.notice-options a, +.notice-options .repeated { text-indent:-9999px; outline:none; } - -.notice-options .notice_reply a, .notice-options input.submit { display:block; border:0; } -.notice-options .notice_reply a, -.notice-options .notice_delete a { +.notice-options .notice_reply, +.notice-options .notice_delete { text-decoration:none; -padding-left:16px; } - +.notice .notice-options .notice_delete { +float:right; +} .notice-options form input.submit { width:16px; -padding:2px 0; +height:16px; +padding:0; +border-radius:0; +-moz-border-radius:0; +-webkit-border-radius:0; } - -.notice-options .notice_delete dt, +.notice-options .form_repeat legend, .notice-options .form_favor legend, .notice-options .form_disfavor legend { display:none; } -.notice-options .notice_delete fieldset, +.notice-options .form_repeat fieldset, .notice-options .form_favor fieldset, .notice-options .form_disfavor fieldset { border:0; padding:0; } +.notice-options a, +.notice-options .repeated { +width:16px; +height:16px; +} + + +.notice .attachment { +position:relative; +padding-left:16px; +} +.notice .attachment.more { +text-indent:-9999px; +width:16px; +height:16px; +display:inline-block; +overflow:hidden; +vertical-align:middle; +margin-left:4px; +} + +#attachments .attachment, +.notice .attachment.more { +padding-left:0; +} +.notice .attachment img { +position:absolute; +top:18px; +left:0; +z-index:99; +} +#shownotice .notice .attachment img { +position:static; +} + +#attachments { +clear:both; +float:left; +width:100%; +margin-top:18px; +} +#attachments dt { +font-weight:bold; +font-size:1.3em; +margin-bottom:4px; +} + +#attachments ol li { +margin-bottom:18px; +list-style-type:decimal; +float:left; +clear:both; +} +#jOverlayContent, +#jOverlayContent #content, +#jOverlayContent #content_inner { +width: auto !important; +margin-bottom:0; +} +#jOverlayContent #content { +padding:11px; +min-height:auto; +} +#jOverlayContent .entry-title { +display:block; +margin-bottom:11px; +} +#jOverlayContent button { +position:absolute; +top:0; +right:0; +} +#jOverlayContent h1 { +max-width:425px; +} +#jOverlayContent #content { +border-radius:7px; +-moz-border-radius:7px; +-webkit-border-radius:7px; +} +#jOverlayLoading { +top:5%; +left:40%; +} +#attachment_view img { +max-width:480px; +max-height:480px; +} +#attachment_view #oembed_info { +margin-top:11px; +} +#attachment_view #oembed_info dt, +#attachment_view #oembed_info dd { +float:left; +} +#attachment_view #oembed_info dt { +clear:left; +margin-right:11px; +font-weight:bold; +} +#attachment_view #oembed_info dt:after { +content: ":"; +} #usergroups #new_group { float: left; diff --git a/theme/h4ck3r/css/display.css b/theme/h4ck3r/css/display.css index 7112765ab..276659dce 100644 --- a/theme/h4ck3r/css/display.css +++ b/theme/h4ck3r/css/display.css @@ -200,14 +200,19 @@ background:transparent url(../../base/images/icons/twotone/green/disfavourite.gi background:transparent url(../../base/images/icons/twotone/green/trash.gif) no-repeat 0 45%; } +.notices .attachment.more, .notices div.entry-content, .notices div.notice-options { opacity:0.4; } -.notices li.hover div.entry-content, -.notices li.hover div.notice-options { +.notices li:hover .attachment.more, +.notices li:hover div.entry-content, +.notices li:hover div.notice-options { opacity:1; } +.opaque { +opacity:1 !important; +} div.entry-content { color:#ccc; } diff --git a/theme/pigeonthoughts/css/base.css b/theme/pigeonthoughts/css/base.css index bd12e6eaa..bc2e24dc5 100644 --- a/theme/pigeonthoughts/css/base.css +++ b/theme/pigeonthoughts/css/base.css @@ -792,25 +792,30 @@ margin-right:11px; /* NOTICE */ .notice, -.profile { +.profile, +.application { position:relative; -padding:11px 2%; +padding-top:11px; +padding-bottom:11px; clear:both; float:left; -width:95.7%; -border-width:1px; -border-style:solid; -margin-bottom:11px; +width:100%; +border-top-width:1px; +border-top-style:dotted; } .notices li { list-style-type:none; } .notices .notices { margin-top:7px; -margin-left:5%; -width:95%; +margin-left:2%; +width:98%; float:left; } +.mark-top { +border-top-width:1px; +border-top-style:solid; +} #aside_primary .notice, #aside_primary .profile { @@ -970,36 +975,38 @@ outline:none; text-indent:-9999px; } +.form_repeat.dialogbox { +top:-4px; +right:29px; +min-width:199px; +} + .notice-options { position:relative; font-size:0.95em; -width:90px; +width:113px; float:right; -margin-right:11px; +margin-top:3px; +margin-right:4px; } - .notice-options a { float:left; } -.notice-options .notice_delete, .notice-options .notice_reply, +.notice-options .form_repeat, .notice-options .form_favor, -.notice-options .form_disfavor { -position:absolute; -top:0; +.notice-options .form_disfavor, +.notice-options .repeated { +float:left; +margin-left:14.2%; } .notice-options .form_favor, .notice-options .form_disfavor { -left:0; -} -.notice-options .notice_reply { -left:29px; -} -.notice-options .notice_delete { -right:0; +margin-left:0; } .notice-options input, -.notice-options a { +.notice-options a, +.notice-options .repeated { text-indent:-9999px; outline:none; } @@ -1010,27 +1017,51 @@ border:0; .notice-options .notice_reply, .notice-options .notice_delete { text-decoration:none; -padding-left:16px; +} +.notice .notice-options .notice_delete { +float:right; } .notice-options form input.submit { width:16px; -padding:2px 0; +height:16px; +padding:0; +border-radius:0; +-moz-border-radius:0; +-webkit-border-radius:0; } +.notice-options .form_repeat legend, .notice-options .form_favor legend, .notice-options .form_disfavor legend { display:none; } +.notice-options .form_repeat fieldset, .notice-options .form_favor fieldset, .notice-options .form_disfavor fieldset { border:0; padding:0; } +.notice-options a, +.notice-options .repeated { +width:16px; +height:16px; +} .notice .attachment { position:relative; padding-left:16px; } -#attachments .attachment { +.notice .attachment.more { +text-indent:-9999px; +width:16px; +height:16px; +display:inline-block; +overflow:hidden; +vertical-align:middle; +margin-left:4px; +} + +#attachments .attachment, +.notice .attachment.more { padding-left:0; } .notice .attachment img { diff --git a/theme/pigeonthoughts/css/display.css b/theme/pigeonthoughts/css/display.css index de5164ea8..62fa8817a 100644 --- a/theme/pigeonthoughts/css/display.css +++ b/theme/pigeonthoughts/css/display.css @@ -141,7 +141,6 @@ background-color:transparent; color:#000000; } - .aside .section { border-color:#FFFFFF; background-color:#FFFFFF; @@ -173,6 +172,11 @@ color:#7F1114; color:#FFFFFF; } +.aside .section .dialogbox { +color:#000000; +} + + .section .profile { border-top-color:#87B4C8; @@ -254,6 +258,13 @@ background:#FFFFFF url(../../base/images/icons/icon_processing.gif) no-repeat 47 background-image:none; } +.entity_send-a-message .form_notice, +.entity_moderation:hover ul, +.entity_role:hover ul, +.dialogbox { +background-color:#FFFFFF; +} + #content, #site_nav_local_views a { border-color:#FFFFFF; @@ -414,6 +425,9 @@ background-position: 0 -1714px; .notice .attachment { background-position:0 -394px; } +.notice .attachment.more { +background-position:0 -2770px; +} #attachments .attachment { background:none; } @@ -436,15 +450,19 @@ 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; } +.opaque { +opacity:1 !important; +} div.entry-content { color:#333333; } -- cgit v1.2.3-54-g00ecf From 1089c0e23c9b7be7128ee220959ce598db9a3cfe Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 25 Mar 2010 15:08:00 +0100 Subject: Updated biz theme to use realtime icons from core --- theme/biz/css/base.css | 2 +- theme/biz/css/display.css | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 2 deletions(-) (limited to 'theme') diff --git a/theme/biz/css/base.css b/theme/biz/css/base.css index 3650988f3..f5efdb49c 100644 --- a/theme/biz/css/base.css +++ b/theme/biz/css/base.css @@ -1,7 +1,7 @@ /** theme: biz base * * @package StatusNet - * @author Sarven Capadisli + * @author Sarven Capadisli * @copyright 2009 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/ diff --git a/theme/biz/css/display.css b/theme/biz/css/display.css index b2143cce3..ea09ef4c0 100644 --- a/theme/biz/css/display.css +++ b/theme/biz/css/display.css @@ -206,15 +206,26 @@ button.close, .form_user_unsubscribe input.submit, .form_group_join input.submit, .form_user_subscribe input.submit, +.form_remote_authorize input.submit, .entity_subscribe a, .entity_moderation p, .entity_sandbox input.submit, .entity_silence input.submit, .entity_delete input.submit, +.entity_role p, +.entity_role_administrator input.submit, +.entity_role_moderator input.submit, .notice-options .repeated, .form_notice label[for=notice_data-geo], button.minimize, -.form_reset_key input.submit { +.form_reset_key input.submit, +.entity_clear input.submit, +.entity_flag input.submit, +.entity_flag p, +.entity_subscribe input.submit, +#realtime_play, +#realtime_pause, +#realtime_popup { background-image:url(../../base/images/icons/icons-01.gif); background-repeat:no-repeat; background-color:transparent; @@ -355,6 +366,28 @@ background-position: 5px -1511px; .form_reset_key input.submit { background-position: 5px -1973px; } +.entity_clear input.submit { +background-position: 5px -2039px; +} +.entity_flag input.submit, +.entity_flag p { +background-position: 5px -2105px; +} +.entity_subscribe input.accept { +background-position: 5px -2171px; +} +.entity_subscribe input.reject { +background-position: 5px -2237px; +} +#realtime_play { +background-position: 0 -2308px; +} +#realtime_pause { +background-position: 0 -2374px; +} +#realtime_popup { +background-position: 0 -1714px; +} /* NOTICES */ -- cgit v1.2.3-54-g00ecf From 518551bf70429d10d5c7ce905a0e482bceffad18 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 25 Mar 2010 17:33:59 +0100 Subject: Fix for processing indicator for aside --- theme/cloudy/css/display.css | 3 ++- theme/default/css/display.css | 2 +- theme/identica/css/display.css | 2 +- theme/pigeonthoughts/css/display.css | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) (limited to 'theme') diff --git a/theme/cloudy/css/display.css b/theme/cloudy/css/display.css index 5c3d8b5f7..caea5cf44 100644 --- a/theme/cloudy/css/display.css +++ b/theme/cloudy/css/display.css @@ -1663,7 +1663,8 @@ background-color:transparent; } #wrap form.processing input.submit, -.entity_actions a.processing { +#core a.processing, +.dialogbox.processing .submit_dialogbox { background:#FFFFFF url(../../base/images/icons/icon_processing.gif) no-repeat 47% 47%; cursor:wait; text-indent:-9999px; diff --git a/theme/default/css/display.css b/theme/default/css/display.css index 7ccd234cd..5e3748cb7 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -214,7 +214,7 @@ background-color:transparent; } #wrap form.processing input.submit, -#content a.processing, +#core 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 3972657a7..440dd8be2 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -215,7 +215,7 @@ background-color:transparent; } #wrap form.processing input.submit, -#content a.processing, +#core a.processing, .dialogbox.processing .submit_dialogbox { background:#FFFFFF url(../../base/images/icons/icon_processing.gif) no-repeat 47% 47%; } diff --git a/theme/pigeonthoughts/css/display.css b/theme/pigeonthoughts/css/display.css index 62fa8817a..e584683fc 100644 --- a/theme/pigeonthoughts/css/display.css +++ b/theme/pigeonthoughts/css/display.css @@ -250,7 +250,7 @@ background-color:transparent; #wrap form.processing input.submit, -.entity_actions a.processing, +#core 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 7f1b852c97ff1e14eef7b42dfef42f372e22ea72 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 25 Mar 2010 17:47:04 +0100 Subject: If indenting is disabled on the output, this fixes the entity_tags crop --- theme/base/css/display.css | 3 +++ 1 file changed, 3 insertions(+) (limited to 'theme') diff --git a/theme/base/css/display.css b/theme/base/css/display.css index b0ab02bce..f48bdf55e 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -858,6 +858,9 @@ display:inline; display:inline; margin-right:7px; } +.entity_tags li:before { +content:'\0009'; +} .aside .section { margin-bottom:29px; -- cgit v1.2.3-54-g00ecf From 260f00d60bc83ac641d6fbe465e70aec33ccd9be Mon Sep 17 00:00:00 2001 From: Nick Holliday Date: Tue, 23 Mar 2010 16:50:24 +0000 Subject: Multiple file upload handling. --- actions/newnotice.php | 35 ++++++++++++++-------------- js/util.js | 53 +++++++++++++++++++++++++++---------------- lib/noticeform.php | 14 ++++++++---- theme/base/css/display.css | 12 +++++----- theme/default/css/display.css | 7 +++--- 5 files changed, 72 insertions(+), 49 deletions(-) (limited to 'theme') diff --git a/actions/newnotice.php b/actions/newnotice.php index ed0fa1b2b..2aa354870 100644 --- a/actions/newnotice.php +++ b/actions/newnotice.php @@ -164,22 +164,25 @@ class NewnoticeAction extends Action $replyto = 'false'; } - $upload = null; - $upload = MediaFile::fromUpload('attach'); - - if (isset($upload)) { - - $content_shortened .= ' ' . $upload->shortUrl(); - - if (Notice::contentTooLong($content_shortened)) { + $uploads = array(); + foreach($_FILES as $name => $value) { + if(substr($name, 0, 6) == "attach") { + $upload = MediaFile::fromUpload($name); + if (isset($upload)) { + $content_shortened .= ' ' . $upload->shortUrl(); + } + } + } + if (Notice::contentTooLong($content_shortened)) { + foreach($uploads as $upload) { $upload->delete(); - $this->clientError( - sprintf( - _('Max notice size is %d chars, including attachment URL.'), - Notice::maxContent() - ) - ); } + $this->clientError( + sprintf( + _('Max notice size is %d chars, including attachment URL.'), + Notice::maxContent() + ) + ); } $options = array('reply_to' => ($replyto == 'false') ? null : $replyto); @@ -197,12 +200,10 @@ class NewnoticeAction extends Action $notice = Notice::saveNew($user->id, $content_shortened, 'web', $options); - if (isset($upload)) { + foreach($uploads as $upload) { $upload->attachToNotice($notice); } - - if ($this->boolean('ajax')) { header('Content-Type: text/xml;charset=utf-8'); $this->xw->startDocument('1.0', 'UTF-8'); diff --git a/js/util.js b/js/util.js index 1320d11b4..d62adf33a 100644 --- a/js/util.js +++ b/js/util.js @@ -30,7 +30,8 @@ var SN = { // StatusNet CounterBlackout: false, MaxLength: 140, PatternUsername: /^[0-9a-zA-Z\-_.]*$/, - HTTP20x30x: [200, 201, 202, 203, 204, 205, 206, 300, 301, 302, 303, 304, 305, 306, 307] + HTTP20x30x: [200, 201, 202, 203, 204, 205, 206, 300, 301, 302, 303, 304, 305, 306, 307], + UploadCounter: 0 }, S: { // Selector @@ -172,6 +173,7 @@ var SN = { // StatusNet FormNoticeXHR: function(form) { SN.C.I.NoticeDataGeo = {}; form.append(''); + form.ajaxForm({ dataType: 'xml', timeout: '60000', @@ -228,9 +230,10 @@ var SN = { // StatusNet } else { if (parseInt(xhr.status) === 0 || jQuery.inArray(parseInt(xhr.status), SN.C.I.HTTP20x30x) >= 0) { - form - .resetForm() - .find('#'+SN.C.S.NoticeDataAttachSelected).remove(); + form.resetForm(); + SN.U.NoticeClearAttachments(form); + SN.C.I.UploadCounter = 0; + SN.U.NoticeNewAttachment($('fieldset', form)); SN.U.FormNoticeEnhancements(form); } else { @@ -287,8 +290,9 @@ var SN = { // StatusNet } } form.resetForm(); - form.find('#'+SN.C.S.NoticeInReplyTo).val(''); - form.find('#'+SN.C.S.NoticeDataAttachSelected).remove(); + SN.U.NoticeClearAttachments(form); + SN.C.I.UploadCounter = 0; + SN.U.NoticeNewAttachment($('fieldset', form)); SN.U.FormNoticeEnhancements(form); } }, @@ -309,6 +313,11 @@ var SN = { // StatusNet } }); }, + + NoticeClearAttachments: function(form) { + $('input:file', form).remove(); + $('div[class=' + SN.C.S.Success + ']', form).remove(); + }, NoticeReply: function() { if ($('#'+SN.C.S.NoticeDataText).length > 0 && $('#content .notice_reply').length > 0) { @@ -468,25 +477,31 @@ var SN = { // StatusNet } }, - NoticeDataAttach: function() { - NDA = $('#'+SN.C.S.NoticeDataAttach); + NoticeDataAttach: function(NDANum) { + NDA = $('#'+SN.C.S.NoticeDataAttach+NDANum); NDA.change(function() { - S = '
'+$(this).val()+'
'; - NDAS = $('#'+SN.C.S.NoticeDataAttachSelected); - if (NDAS.length > 0) { - NDAS.replaceWith(S); - } - else { - $('#'+SN.C.S.FormNotice).append(S); - } - $('#'+SN.C.S.NoticeDataAttachSelected+' button').click(function(){ - $('#'+SN.C.S.NoticeDataAttachSelected).remove(); + S = '
'+$(this).val()+'
'; + $('#'+SN.C.S.FormNotice).append(S); + + $('#'+SN.C.S.NoticeDataAttachSelected+SN.C.I.UploadCounter+' button').click(function(){ + $('#'+this.parentNode.getAttribute("id")).remove(); + $('#'+this.parentNode.getAttribute("id").replace("_selected", "")).remove(); NDA.val(''); return false; }); + SN.C.I.UploadCounter++; + NDA.attr('style', 'display: none;'); + SN.U.NoticeNewAttachment(NDA.parent()); + $('#notice_data-attach-label').attr('for', SN.C.S.NoticeDataAttach+SN.C.I.UploadCounter); }); }, + + NoticeNewAttachment: function(parent) { + NEWFILE = ''; + parent.append(NEWFILE); + SN.U.NoticeDataAttach(SN.C.I.UploadCounter); + }, NoticeLocationAttach: function() { var NLat = $('#'+SN.C.S.NoticeLat).val(); @@ -720,7 +735,7 @@ var SN = { // StatusNet SN.U.FormNoticeEnhancements($(this)); }); - SN.U.NoticeDataAttach(); + SN.U.NoticeDataAttach(""); } }, diff --git a/lib/noticeform.php b/lib/noticeform.php index 7278c41a9..a55839de0 100644 --- a/lib/noticeform.php +++ b/lib/noticeform.php @@ -189,10 +189,14 @@ class NoticeForm extends Form } if (common_config('attachments', 'uploads')) { - $this->out->element('label', array('for' => 'notice_data-attach'),_('Attach')); + $this->out->element('label', array('id' => 'notice_data-attach-label', + 'class' => 'attach-label', + 'for' => 'notice_data-attach'), + _('Attach')); $this->out->element('input', array('id' => 'notice_data-attach', + 'class' => 'attach', 'type' => 'file', - 'name' => 'attach', + 'name' => 'attach0', 'title' => _('Attach a file'))); $this->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota')); } @@ -212,8 +216,10 @@ class NoticeForm extends Form $this->out->checkbox('notice_data-geo', _('Share my location'), true); $this->out->elementEnd('div'); $this->out->inlineScript(' var NoticeDataGeo_text = {'. - 'ShareDisable: "'._('Do not share my location').'",'. - 'ErrorTimeout: "'._('Sorry, retrieving your geo location is taking longer than expected, please try again later').'"'. + 'ShareDisable: ' .json_encode(_('Do not share my location')).','. + 'ErrorTimeout: ' .json_encode(_('Sorry, retrieving your geo location is taking longer than expected, please try again later')). + '} ; var NoticeAttachment_text = {'. + 'AttachFile: ' . json_encode(_('Attach a file')) . '}'); } diff --git a/theme/base/css/display.css b/theme/base/css/display.css index f48bdf55e..768d78ac2 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -550,19 +550,19 @@ float:left; font-size:1.3em; margin-bottom:7px; } -.form_notice label[for=notice_data-attach], -.form_notice #notice_data-attach { +.form_notice .attach-label, +.form_notice .attach { position:absolute; top:25px; right:10.5%; cursor:pointer; } -.form_notice label[for=notice_data-attach] { +.form_notice .attach-label { text-indent:-9999px; width:16px; height:16px; } -.form_notice #notice_data-attach { +.form_notice .attach { padding:0; height:16px; } @@ -606,7 +606,7 @@ width:81.5%; margin-bottom:0; line-height:1.618; } -.form_notice #notice_data-attach_selected code { +.form_notice code { float:left; width:80%; display:block; @@ -614,7 +614,7 @@ overflow:auto; margin-right:2.5%; font-size:1.1em; } -.form_notice #notice_data-attach_selected button.close { +.form_notice button.close { float:right; font-size:0.8em; } diff --git a/theme/default/css/display.css b/theme/default/css/display.css index 5e3748cb7..44dc9a7c3 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -154,14 +154,15 @@ color:#333333; .entity_actions .dialogbox input { color:#000000; } -.form_notice label[for=notice_data-attach] { +.form_notice .attach-label { background-position:0 -328px; } -.form_notice #notice_data-attach { +.form_notice .attach { +position: absolute; opacity:0; } -.form_notice label[for=notice_data-attach], +.form_notice .attach-label, #export_data li a.rss, #export_data li a.atom, #export_data li a.foaf, -- cgit v1.2.3-54-g00ecf From 534c12e540f57846af82758678a0e8064ac49f5b Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 31 Mar 2010 10:57:20 +0200 Subject: Revert "Multiple file upload handling." This reverts commit 260f00d60bc83ac641d6fbe465e70aec33ccd9be. As mentioned in http://gitorious.org/statusnet/mainline/commit/260f00d60bc83ac641d6fbe465e70aec33ccd9be#comment_8367 Reverting this merge until the bugs are fixed and there is a general agreement on the need for this enhancement. --- actions/newnotice.php | 35 ++++++++++++++-------------- js/util.js | 53 ++++++++++++++++--------------------------- lib/noticeform.php | 14 ++++-------- theme/base/css/display.css | 12 +++++----- theme/default/css/display.css | 7 +++--- 5 files changed, 49 insertions(+), 72 deletions(-) (limited to 'theme') diff --git a/actions/newnotice.php b/actions/newnotice.php index 2aa354870..ed0fa1b2b 100644 --- a/actions/newnotice.php +++ b/actions/newnotice.php @@ -164,25 +164,22 @@ class NewnoticeAction extends Action $replyto = 'false'; } - $uploads = array(); - foreach($_FILES as $name => $value) { - if(substr($name, 0, 6) == "attach") { - $upload = MediaFile::fromUpload($name); - if (isset($upload)) { - $content_shortened .= ' ' . $upload->shortUrl(); - } - } - } - if (Notice::contentTooLong($content_shortened)) { - foreach($uploads as $upload) { + $upload = null; + $upload = MediaFile::fromUpload('attach'); + + if (isset($upload)) { + + $content_shortened .= ' ' . $upload->shortUrl(); + + if (Notice::contentTooLong($content_shortened)) { $upload->delete(); + $this->clientError( + sprintf( + _('Max notice size is %d chars, including attachment URL.'), + Notice::maxContent() + ) + ); } - $this->clientError( - sprintf( - _('Max notice size is %d chars, including attachment URL.'), - Notice::maxContent() - ) - ); } $options = array('reply_to' => ($replyto == 'false') ? null : $replyto); @@ -200,10 +197,12 @@ class NewnoticeAction extends Action $notice = Notice::saveNew($user->id, $content_shortened, 'web', $options); - foreach($uploads as $upload) { + if (isset($upload)) { $upload->attachToNotice($notice); } + + if ($this->boolean('ajax')) { header('Content-Type: text/xml;charset=utf-8'); $this->xw->startDocument('1.0', 'UTF-8'); diff --git a/js/util.js b/js/util.js index d62adf33a..1320d11b4 100644 --- a/js/util.js +++ b/js/util.js @@ -30,8 +30,7 @@ var SN = { // StatusNet CounterBlackout: false, MaxLength: 140, PatternUsername: /^[0-9a-zA-Z\-_.]*$/, - HTTP20x30x: [200, 201, 202, 203, 204, 205, 206, 300, 301, 302, 303, 304, 305, 306, 307], - UploadCounter: 0 + HTTP20x30x: [200, 201, 202, 203, 204, 205, 206, 300, 301, 302, 303, 304, 305, 306, 307] }, S: { // Selector @@ -173,7 +172,6 @@ var SN = { // StatusNet FormNoticeXHR: function(form) { SN.C.I.NoticeDataGeo = {}; form.append(''); - form.ajaxForm({ dataType: 'xml', timeout: '60000', @@ -230,10 +228,9 @@ var SN = { // StatusNet } else { if (parseInt(xhr.status) === 0 || jQuery.inArray(parseInt(xhr.status), SN.C.I.HTTP20x30x) >= 0) { - form.resetForm(); - SN.U.NoticeClearAttachments(form); - SN.C.I.UploadCounter = 0; - SN.U.NoticeNewAttachment($('fieldset', form)); + form + .resetForm() + .find('#'+SN.C.S.NoticeDataAttachSelected).remove(); SN.U.FormNoticeEnhancements(form); } else { @@ -290,9 +287,8 @@ var SN = { // StatusNet } } form.resetForm(); - SN.U.NoticeClearAttachments(form); - SN.C.I.UploadCounter = 0; - SN.U.NoticeNewAttachment($('fieldset', form)); + form.find('#'+SN.C.S.NoticeInReplyTo).val(''); + form.find('#'+SN.C.S.NoticeDataAttachSelected).remove(); SN.U.FormNoticeEnhancements(form); } }, @@ -313,11 +309,6 @@ var SN = { // StatusNet } }); }, - - NoticeClearAttachments: function(form) { - $('input:file', form).remove(); - $('div[class=' + SN.C.S.Success + ']', form).remove(); - }, NoticeReply: function() { if ($('#'+SN.C.S.NoticeDataText).length > 0 && $('#content .notice_reply').length > 0) { @@ -477,31 +468,25 @@ var SN = { // StatusNet } }, - NoticeDataAttach: function(NDANum) { - NDA = $('#'+SN.C.S.NoticeDataAttach+NDANum); + NoticeDataAttach: function() { + NDA = $('#'+SN.C.S.NoticeDataAttach); NDA.change(function() { - S = '
'+$(this).val()+'
'; - $('#'+SN.C.S.FormNotice).append(S); - - $('#'+SN.C.S.NoticeDataAttachSelected+SN.C.I.UploadCounter+' button').click(function(){ - $('#'+this.parentNode.getAttribute("id")).remove(); - $('#'+this.parentNode.getAttribute("id").replace("_selected", "")).remove(); + S = '
'+$(this).val()+'
'; + NDAS = $('#'+SN.C.S.NoticeDataAttachSelected); + if (NDAS.length > 0) { + NDAS.replaceWith(S); + } + else { + $('#'+SN.C.S.FormNotice).append(S); + } + $('#'+SN.C.S.NoticeDataAttachSelected+' button').click(function(){ + $('#'+SN.C.S.NoticeDataAttachSelected).remove(); NDA.val(''); return false; }); - SN.C.I.UploadCounter++; - NDA.attr('style', 'display: none;'); - SN.U.NoticeNewAttachment(NDA.parent()); - $('#notice_data-attach-label').attr('for', SN.C.S.NoticeDataAttach+SN.C.I.UploadCounter); }); }, - - NoticeNewAttachment: function(parent) { - NEWFILE = ''; - parent.append(NEWFILE); - SN.U.NoticeDataAttach(SN.C.I.UploadCounter); - }, NoticeLocationAttach: function() { var NLat = $('#'+SN.C.S.NoticeLat).val(); @@ -735,7 +720,7 @@ var SN = { // StatusNet SN.U.FormNoticeEnhancements($(this)); }); - SN.U.NoticeDataAttach(""); + SN.U.NoticeDataAttach(); } }, diff --git a/lib/noticeform.php b/lib/noticeform.php index a55839de0..7278c41a9 100644 --- a/lib/noticeform.php +++ b/lib/noticeform.php @@ -189,14 +189,10 @@ class NoticeForm extends Form } if (common_config('attachments', 'uploads')) { - $this->out->element('label', array('id' => 'notice_data-attach-label', - 'class' => 'attach-label', - 'for' => 'notice_data-attach'), - _('Attach')); + $this->out->element('label', array('for' => 'notice_data-attach'),_('Attach')); $this->out->element('input', array('id' => 'notice_data-attach', - 'class' => 'attach', 'type' => 'file', - 'name' => 'attach0', + 'name' => 'attach', 'title' => _('Attach a file'))); $this->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota')); } @@ -216,10 +212,8 @@ class NoticeForm extends Form $this->out->checkbox('notice_data-geo', _('Share my location'), true); $this->out->elementEnd('div'); $this->out->inlineScript(' var NoticeDataGeo_text = {'. - 'ShareDisable: ' .json_encode(_('Do not share my location')).','. - 'ErrorTimeout: ' .json_encode(_('Sorry, retrieving your geo location is taking longer than expected, please try again later')). - '} ; var NoticeAttachment_text = {'. - 'AttachFile: ' . json_encode(_('Attach a file')) . + 'ShareDisable: "'._('Do not share my location').'",'. + 'ErrorTimeout: "'._('Sorry, retrieving your geo location is taking longer than expected, please try again later').'"'. '}'); } diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 768d78ac2..f48bdf55e 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -550,19 +550,19 @@ float:left; font-size:1.3em; margin-bottom:7px; } -.form_notice .attach-label, -.form_notice .attach { +.form_notice label[for=notice_data-attach], +.form_notice #notice_data-attach { position:absolute; top:25px; right:10.5%; cursor:pointer; } -.form_notice .attach-label { +.form_notice label[for=notice_data-attach] { text-indent:-9999px; width:16px; height:16px; } -.form_notice .attach { +.form_notice #notice_data-attach { padding:0; height:16px; } @@ -606,7 +606,7 @@ width:81.5%; margin-bottom:0; line-height:1.618; } -.form_notice code { +.form_notice #notice_data-attach_selected code { float:left; width:80%; display:block; @@ -614,7 +614,7 @@ overflow:auto; margin-right:2.5%; font-size:1.1em; } -.form_notice button.close { +.form_notice #notice_data-attach_selected button.close { float:right; font-size:0.8em; } diff --git a/theme/default/css/display.css b/theme/default/css/display.css index 44dc9a7c3..5e3748cb7 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -154,15 +154,14 @@ color:#333333; .entity_actions .dialogbox input { color:#000000; } -.form_notice .attach-label { +.form_notice label[for=notice_data-attach] { background-position:0 -328px; } -.form_notice .attach { -position: absolute; +.form_notice #notice_data-attach { opacity:0; } -.form_notice .attach-label, +.form_notice label[for=notice_data-attach], #export_data li a.rss, #export_data li a.atom, #export_data li a.foaf, -- cgit v1.2.3-54-g00ecf From 3040a5ff858c88651f9ef01a9822d2c567f86467 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 22 Jul 2010 05:22:09 +0000 Subject: Quick fix for IE7 via sammy: remove redundant media specifiers from base style @import in main themes. The s already specify screen/etc media, so all it was doing was breaking. There are still some issues, but most things seem to work-ish as long as Realtime plugins are off. --- theme/biz/css/display.css | 2 +- theme/default/css/display.css | 2 +- theme/identica/css/display.css | 2 +- theme/pigeonthoughts/css/display.css | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'theme') diff --git a/theme/biz/css/display.css b/theme/biz/css/display.css index ea09ef4c0..e735d8683 100644 --- a/theme/biz/css/display.css +++ b/theme/biz/css/display.css @@ -7,7 +7,7 @@ * @link http://status.net/ */ -@import url(base.css) screen, projection, tv, print; +@import url(base.css); @media screen, projection, tv { html { diff --git a/theme/default/css/display.css b/theme/default/css/display.css index 5e3748cb7..9a1dabb51 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -7,7 +7,7 @@ * @link http://status.net/ */ -@import url(../../base/css/display.css) screen, projection, tv, print; +@import url(../../base/css/display.css); @media screen, projection, tv { body, diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index 440dd8be2..d7f150bcb 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -7,7 +7,7 @@ * @link http://status.net/ */ -@import url(../../base/css/display.css) screen, projection, tv, print; +@import url(../../base/css/display.css); @media screen, projection, tv { body, diff --git a/theme/pigeonthoughts/css/display.css b/theme/pigeonthoughts/css/display.css index e584683fc..3d6db00e1 100644 --- a/theme/pigeonthoughts/css/display.css +++ b/theme/pigeonthoughts/css/display.css @@ -7,7 +7,7 @@ * @link http://status.net/ */ -@import url(base.css) screen, projection, tv, print; +@import url(base.css); @media screen, projection, tv { html { -- cgit v1.2.3-54-g00ecf