From c74a079e47e1ad71bdb92f8659626730b1b0cae3 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 16 Jun 2009 19:40:23 +0000 Subject: UI updates: Added box-shadow to local views, input focus, content Removed borders from local views, content, aside_primary Some cleaning --- theme/base/css/display.css | 11 +---------- theme/default/css/display.css | 44 ++++++++++++++++++++++++++++-------------- theme/identica/css/display.css | 44 ++++++++++++++++++++++++++++-------------- 3 files changed, 59 insertions(+), 40 deletions(-) diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 0cbd0d774..3595d6aa3 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -303,10 +303,6 @@ padding:4px 11px; -moz-border-radius-topright:4px; -webkit-border-top-left-radius:4px; -webkit-border-top-right-radius:4px; -border-width:1px; -border-style:solid; -border-bottom:0; -text-shadow: 2px 2px 2px #ddd; font-weight:bold; } #site_nav_local_views .nav { @@ -396,8 +392,6 @@ border-radius:7px; -moz-border-radius-topleft:0; -webkit-border-radius:7px; -webkit-border-top-left-radius:0; -border-style:solid; -border-width:1px; } #shownotice #content { min-height:0; @@ -413,13 +407,11 @@ float:left; width:27.917%; min-height:259px; float:left; -margin-left:0.385%; +margin-left:0.7%; padding:1.795%; border-radius:7px; -moz-border-radius:7px; -webkit-border-radius:7px; -border-width:1px; -border-style:solid; } #form_notice { @@ -469,7 +461,6 @@ height:16px; #form_notice #notice_data-attach { left:183px; padding:0; - height:16px; } #form_notice .form_note { diff --git a/theme/default/css/display.css b/theme/default/css/display.css index 166e62157..148ce6e60 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -19,7 +19,7 @@ font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif; font-size:1em; } address { -margin-right:7.18%; +margin-right:7.1%; } input, textarea, select, option { @@ -27,7 +27,7 @@ font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif; } input, textarea, select, .entity_remote_subscribe { -border-color:#aaa; +border-color:#AAAAAA; } #filter_tags ul li { border-color:#C3D6DF; @@ -47,10 +47,13 @@ background-color:#A9BF4F; input:focus, textarea:focus, select:focus, #form_notice.warning #notice_data-text { border-color:#A9BF4F; +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); } input.submit, .entity_remote_subscribe { -color:#fff; +color:#FFFFFF; } a, @@ -79,10 +82,10 @@ background-color:#CEE1E9; } #notice_text-count { -color:#333; +color:#333333; } #form_notice.warning #notice_text-count { -color:#000; +color:#000000; } #form_notice label[for=notice_data-attach] { background:transparent url(../../base/images/icons/twotone/green/clip-01.gif) no-repeat 0 45%; @@ -92,27 +95,38 @@ opacity:0; } #form_notice.processing #notice_action-submit { -background:#fff url(../../base/images/icons/icon_processing.gif) no-repeat 47% 47%; +background:#FFFFFF url(../../base/images/icons/icon_processing.gif) no-repeat 47% 47%; cursor:wait; text-indent:-9999px; } +#content { +box-shadow:5px 7px 7px rgba(194, 194, 194, 0.3); +-moz-box-shadow:5px 7px 7px rgba(194, 194, 194, 0.3); +-webkit-box-shadow:5px 7px 7px rgba(194, 194, 194, 0.3); +} #content, #site_nav_local_views a, #aside_primary { -border-color:#fff; +border-color:#FFFFFF; } #content, #site_nav_local_views .current a { -background-color:#fff; +background-color:#FFFFFF; } #site_nav_local_views a { -background-color:rgba(255, 255, 255, 0.2); +background-color:rgba(194, 194, 194, 0.4); +box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5); +-moz-box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5); +-webkit-box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5); } #site_nav_local_views a:hover { background-color:rgba(255, 255, 255, 0.7); } +#site_nav_local_views .current a { +text-shadow: rgba(194,194,194,0.5) 1px 1px 1px; +} .error { background-color:#F7E8E8; @@ -123,8 +137,8 @@ background-color:#EFF3DC; #anon_notice { background-color:#C3D6DF; -color:#fff; -border-color:#fff; +color:#FFFFFF; +border-color:#FFFFFF; } #showstream #anon_notice { @@ -162,7 +176,7 @@ background-color:transparent; .form_user_subscribe input.submit, .form_user_unsubscribe input.submit { background-color:#A9BF4F; -color:#fff; +color:#FFFFFF; } .form_user_unsubscribe input.submit, .form_group_leave input.submit, @@ -214,7 +228,7 @@ background:transparent url(../../base/images/icons/twotone/green/trash.gif) no-r .notices div.entry-content, .notices div.notice-options, .notices li.hover .notices div.entry-content, -.notices li.hover .notices div.notice-options { +.notices li.hover .notices div.notice-options { opacity:0.4; } .notices li.hover div.entry-content, @@ -222,14 +236,14 @@ opacity:0.4; opacity:1; } div.entry-content { -color:#333; +color:#333333; } div.notice-options a, div.notice-options input { font-family:sans-serif; } .notices li.hover { -background-color:#fcfcfc; +background-color:#FCFCFC; } .notices .notices { diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index cab42f16f..ff538f1f1 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -19,7 +19,7 @@ font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif; font-size:1em; } address { -margin-right:7.18%; +margin-right:7.1%; } input, textarea, select, option { @@ -27,10 +27,10 @@ font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif; } input, textarea, select, .entity_remote_subscribe { -border-color:#aaa; +border-color:#AAAAAA; } #filter_tags ul li { -border-color:#ddd; +border-color:#DDDDDD; } .form_settings input.form_action-primary { @@ -47,10 +47,13 @@ background-color:#9BB43E; input:focus, textarea:focus, select:focus, #form_notice.warning #notice_data-text { border-color:#9BB43E; +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); } input.submit, .entity_remote_subscribe { -color:#fff; +color:#FFFFFF; } a, @@ -79,10 +82,10 @@ background-color:#CEE1E9; } #notice_text-count { -color:#333; +color:#333333; } #form_notice.warning #notice_text-count { -color:#000; +color:#000000; } #form_notice label[for=notice_data-attach] { background:transparent url(../../base/images/icons/twotone/green/clip-01.gif) no-repeat 0 45%; @@ -92,27 +95,38 @@ opacity:0; } #form_notice.processing #notice_action-submit { -background:#fff url(../../base/images/icons/icon_processing.gif) no-repeat 47% 47%; +background:#FFFFFF url(../../base/images/icons/icon_processing.gif) no-repeat 47% 47%; cursor:wait; text-indent:-9999px; } +#content { +box-shadow:5px 7px 7px rgba(194, 194, 194, 0.3); +-moz-box-shadow:5px 7px 7px rgba(194, 194, 194, 0.3); +-webkit-box-shadow:5px 7px 7px rgba(194, 194, 194, 0.3); +} #content, #site_nav_local_views a, #aside_primary { -border-color:#fff; +border-color:#FFFFFF; } #content, #site_nav_local_views .current a { -background-color:#fff; +background-color:#FFFFFF; } #site_nav_local_views a { -background-color:rgba(135, 180, 200, 0.3); +background-color:rgba(194, 194, 194, 0.4); +box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5); +-moz-box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5); +-webkit-box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5); } #site_nav_local_views a:hover { background-color:rgba(255, 255, 255, 0.7); } +#site_nav_local_views .current a { +text-shadow: rgba(194,194,194,0.5) 1px 1px 1px; +} .error { background-color:#F7E8E8; @@ -123,8 +137,8 @@ background-color:#EFF3DC; #anon_notice { background-color:#87B4C8; -color:#fff; -border-color:#fff; +color:#FFFFFF; +border-color:#FFFFFF; } #showstream #anon_notice { @@ -162,7 +176,7 @@ background-color:transparent; .form_user_subscribe input.submit, .form_user_unsubscribe input.submit { background-color:#9BB43E; -color:#fff; +color:#FFFFFF; } .form_user_unsubscribe input.submit, .form_group_leave input.submit, @@ -222,14 +236,14 @@ opacity:0.4; opacity:1; } div.entry-content { -color:#333; +color:#333333; } div.notice-options a, div.notice-options input { font-family:sans-serif; } .notices li.hover { -background-color:#fcfcfc; +background-color:#FCFCFC; } .notices .notices { -- cgit v1.2.3-54-g00ecf From c8e3e0d7166abc5acce78d8d6c984764e4c2f7bc Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 16 Jun 2009 20:56:12 +0000 Subject: More contrast for tabs --- theme/default/css/display.css | 2 +- theme/identica/css/display.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/theme/default/css/display.css b/theme/default/css/display.css index 148ce6e60..12efedf01 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -116,7 +116,7 @@ background-color:#FFFFFF; } #site_nav_local_views a { -background-color:rgba(194, 194, 194, 0.4); +background-color:rgba(194, 194, 194, 0.5); box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5); -moz-box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5); -webkit-box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5); diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index ff538f1f1..fb64013be 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -116,7 +116,7 @@ background-color:#FFFFFF; } #site_nav_local_views a { -background-color:rgba(194, 194, 194, 0.4); +background-color:rgba(194, 194, 194, 0.5); box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5); -moz-box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5); -webkit-box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5); -- cgit v1.2.3-54-g00ecf From fcc86840369c45b0146cc1f3fcd3686e880dea6e Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 16 Jun 2009 21:10:14 +0000 Subject: Minor margin value change --- theme/default/css/display.css | 2 +- theme/identica/css/display.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/theme/default/css/display.css b/theme/default/css/display.css index 12efedf01..1ad823a5c 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -19,7 +19,7 @@ font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif; font-size:1em; } address { -margin-right:7.1%; +margin-right:7.2%; } input, textarea, select, option { diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index fb64013be..bc7ac80fb 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -19,7 +19,7 @@ font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif; font-size:1em; } address { -margin-right:7.1%; +margin-right:7.2%; } input, textarea, select, option { -- cgit v1.2.3-54-g00ecf From 3974ab633c1f75fee71a3a74f7088ca2927468c9 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 16 Jun 2009 21:47:58 +0000 Subject: Brought back borders for content, navigation, aside_primary but applied transparent colour instead, hence not visible. This way, other laconica instances make use of the border if they change only the colour. --- theme/base/css/display.css | 9 ++++++++- theme/default/css/display.css | 2 +- theme/identica/css/display.css | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 3595d6aa3..49907058e 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -303,6 +303,9 @@ padding:4px 11px; -moz-border-radius-topright:4px; -webkit-border-top-left-radius:4px; -webkit-border-top-right-radius:4px; +border-width:1px; +border-style:solid; +border-bottom:0; font-weight:bold; } #site_nav_local_views .nav { @@ -392,6 +395,8 @@ border-radius:7px; -moz-border-radius-topleft:0; -webkit-border-radius:7px; -webkit-border-top-left-radius:0; +border-width:1px; +border-style:solid; } #shownotice #content { min-height:0; @@ -407,11 +412,13 @@ float:left; width:27.917%; min-height:259px; float:left; -margin-left:0.7%; +margin-left:0.5%; padding:1.795%; border-radius:7px; -moz-border-radius:7px; -webkit-border-radius:7px; +border-width:1px; +border-style:solid; } #form_notice { diff --git a/theme/default/css/display.css b/theme/default/css/display.css index 1ad823a5c..f0d6dace8 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -108,7 +108,7 @@ box-shadow:5px 7px 7px rgba(194, 194, 194, 0.3); #content, #site_nav_local_views a, #aside_primary { -border-color:#FFFFFF; +border-color:transparent; } #content, #site_nav_local_views .current a { diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index bc7ac80fb..25a01abe0 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -108,7 +108,7 @@ box-shadow:5px 7px 7px rgba(194, 194, 194, 0.3); #content, #site_nav_local_views a, #aside_primary { -border-color:#FFFFFF; +border-color:transparent; } #content, #site_nav_local_views .current a { -- cgit v1.2.3-54-g00ecf From 54697e52989c8d7dc9e1295679e6c0ef676642e0 Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Tue, 16 Jun 2009 19:38:27 -0400 Subject: Removed more dead code. --- actions/attachment.php | 42 ------------------------------------------ actions/attachment_ajax.php | 41 ----------------------------------------- 2 files changed, 83 deletions(-) diff --git a/actions/attachment.php b/actions/attachment.php index 16ee723d9..e4dc0e054 100644 --- a/actions/attachment.php +++ b/actions/attachment.php @@ -98,48 +98,6 @@ class AttachmentAction extends Action return $a->title(); } - /** - * Last-modified date for page - * - * When was the content of this page last modified? Based on notice, - * profile, avatar. - * - * @return int last-modified date as unix timestamp - */ -/* - function lastModified() - { - return max(strtotime($this->notice->created), - strtotime($this->profile->modified), - ($this->avatar) ? strtotime($this->avatar->modified) : 0); - } -*/ - - /** - * An entity tag for this page - * - * Shows the ETag for the page, based on the notice ID and timestamps - * for the notice, profile, and avatar. It's weak, since we change - * the date text "one hour ago", etc. - * - * @return string etag - */ -/* - function etag() - { - $avtime = ($this->avatar) ? - strtotime($this->avatar->modified) : 0; - - return 'W/"' . implode(':', array($this->arg('action'), - common_language(), - $this->notice->id, - strtotime($this->notice->created), - strtotime($this->profile->modified), - $avtime)) . '"'; - } -*/ - - /** * Handle input * diff --git a/actions/attachment_ajax.php b/actions/attachment_ajax.php index 3d83393c5..5d6773010 100644 --- a/actions/attachment_ajax.php +++ b/actions/attachment_ajax.php @@ -74,46 +74,5 @@ class Attachment_ajaxAction extends AttachmentAction } $this->elementEnd('div'); } - - /** - * Last-modified date for page - * - * When was the content of this page last modified? Based on notice, - * profile, avatar. - * - * @return int last-modified date as unix timestamp - */ -/* - function lastModified() - { - return max(strtotime($this->notice->created), - strtotime($this->profile->modified), - ($this->avatar) ? strtotime($this->avatar->modified) : 0); - } -*/ - - /** - * An entity tag for this page - * - * Shows the ETag for the page, based on the notice ID and timestamps - * for the notice, profile, and avatar. It's weak, since we change - * the date text "one hour ago", etc. - * - * @return string etag - */ -/* - function etag() - { - $avtime = ($this->avatar) ? - strtotime($this->avatar->modified) : 0; - - return 'W/"' . implode(':', array($this->arg('action'), - common_language(), - $this->notice->id, - strtotime($this->notice->created), - strtotime($this->profile->modified), - $avtime)) . '"'; - } -*/ } -- cgit v1.2.3-54-g00ecf From befbfc9c73a75bac9d7dac4a4b7a21bd515ce1b4 Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Tue, 16 Jun 2009 23:10:17 -0400 Subject: Moved url handling to its proper place, from newnotice to Notice.php --- actions/newnotice.php | 19 ------------------- classes/Notice.php | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/actions/newnotice.php b/actions/newnotice.php index 02976a2ae..72ccd8c32 100644 --- a/actions/newnotice.php +++ b/actions/newnotice.php @@ -231,7 +231,6 @@ class NewnoticeAction extends Action if (isset($mimetype)) { $this->storeFile($notice, $mimetype); } - $this->saveUrls($notice); common_broadcast_notice($notice); if ($this->boolean('ajax')) { @@ -284,24 +283,6 @@ class NewnoticeAction extends Action } } - /** save all urls in the notice to the db - * - * follow redirects and save all available file information - * (mimetype, date, size, oembed, etc.) - * - * @param class $notice Notice to pull URLs from - * - * @return void - */ - function saveUrls($notice, $uploaded = null) { - common_replace_urls_callback($notice->content, array($this, 'saveUrl'), $notice->id); - } - - function saveUrl($data) { - list($url, $notice_id) = $data; - $zzz = File::processNew($url, $notice_id); - } - /** * Show an Ajax-y error message * diff --git a/classes/Notice.php b/classes/Notice.php index 68602b1f7..770b5d78b 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -217,6 +217,7 @@ class Notice extends Memcached_DataObject $notice->addToInboxes(); $notice->saveGroups(); + $notice->saveUrls(); $notice->query('COMMIT'); @@ -231,6 +232,24 @@ class Notice extends Memcached_DataObject return $notice; } + /** save all urls in the notice to the db + * + * follow redirects and save all available file information + * (mimetype, date, size, oembed, etc.) + * + * @param class $notice Notice to pull URLs from + * + * @return void + */ + function saveUrls() { + common_replace_urls_callback($this->content, array($this, 'saveUrl'), $this->id); + } + + function saveUrl($data) { + list($url, $notice_id) = $data; + File::processNew($url, $notice_id); + } + static function checkDupes($profile_id, $content) { $profile = Profile::staticGet($profile_id); if (!$profile) { -- cgit v1.2.3-54-g00ecf