summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/designadminpanel.php2
-rw-r--r--actions/emailsettings.php2
-rw-r--r--js/farbtastic/farbtastic.css (renamed from theme/base/css/farbtastic.css)6
-rw-r--r--js/identica-badge.js2
-rw-r--r--js/util.js54
-rw-r--r--lib/action.php4
-rw-r--r--lib/designsettings.php2
-rw-r--r--plugins/MobileProfile/MobileProfilePlugin.php16
-rw-r--r--plugins/MobileProfile/mp-screen.css46
-rw-r--r--theme/README51
-rw-r--r--theme/base/css/display.css29
-rw-r--r--theme/base/css/mobile.css150
12 files changed, 144 insertions, 220 deletions
diff --git a/actions/designadminpanel.php b/actions/designadminpanel.php
index f862aff0e..72ad6ade2 100644
--- a/actions/designadminpanel.php
+++ b/actions/designadminpanel.php
@@ -289,7 +289,7 @@ class DesignadminpanelAction extends AdminPanelAction
function showStylesheets()
{
parent::showStylesheets();
- $this->cssLink('css/farbtastic.css','base','screen, projection, tv');
+ $this->cssLink('js/farbtastic/farbtastic.css',null,'screen, projection, tv');
}
/**
diff --git a/actions/emailsettings.php b/actions/emailsettings.php
index bfef2970d..08608348c 100644
--- a/actions/emailsettings.php
+++ b/actions/emailsettings.php
@@ -130,7 +130,7 @@ class EmailsettingsAction extends AccountSettingsAction
if (common_config('emailpost', 'enabled') && $user->email) {
$this->elementStart('fieldset', array('id' => 'settings_email_incoming'));
- $this->element('legend',_('Incoming email'));
+ $this->element('legend', null, _('Incoming email'));
if ($user->incomingemail) {
$this->elementStart('p');
$this->element('span', 'address', $user->incomingemail);
diff --git a/theme/base/css/farbtastic.css b/js/farbtastic/farbtastic.css
index 7efcc73c3..a88e7b868 100644
--- a/theme/base/css/farbtastic.css
+++ b/js/farbtastic/farbtastic.css
@@ -16,17 +16,17 @@
height: 101px;
}
.farbtastic .wheel {
- background: url(../../../js/farbtastic/wheel.png) no-repeat;
+ background: url(wheel.png) no-repeat;
width: 195px;
height: 195px;
}
.farbtastic .overlay {
- background: url(../../../js/farbtastic/mask.png) no-repeat;
+ background: url(mask.png) no-repeat;
}
.farbtastic .marker {
width: 17px;
height: 17px;
margin: -8px 0 0 -8px;
overflow: hidden;
- background: url(../../../js/farbtastic/marker.png) no-repeat;
+ background: url(marker.png) no-repeat;
}
diff --git a/js/identica-badge.js b/js/identica-badge.js
index 8276f22a1..e43d1c43c 100644
--- a/js/identica-badge.js
+++ b/js/identica-badge.js
@@ -223,7 +223,7 @@ function markupPost(raw, server) {
},
changeUserTo : function(el) {
$.a.user = el.rel;
- $.s.h.a.innerHTML = el.rev + $.a.headerText;
+ $.s.h.a.appendChild(document.createTextNode(el.rev + $.a.headerText));
$.s.h.a.href = 'http://' + $.a.server + '/' + el.id;
$.f.runSearch();
},
diff --git a/js/util.js b/js/util.js
index 88016bd6d..8d52d859b 100644
--- a/js/util.js
+++ b/js/util.js
@@ -205,8 +205,10 @@ var SN = { // StatusNet
cookieValue = JSON.parse(cookieValue);
NLat = $('#'+SN.C.S.NoticeLat).val(cookieValue.NLat).val();
NLon = $('#'+SN.C.S.NoticeLon).val(cookieValue.NLon).val();
- NLNS = $('#'+SN.C.S.NoticeLocationNs).val(cookieValue.NLNS).val();
- NLID = $('#'+SN.C.S.NoticeLocationId).val(cookieValue.NLID).val();
+ if ($('#'+SN.C.S.NoticeLocationNs).val(cookieValue.NLNS)) {
+ NLNS = $('#'+SN.C.S.NoticeLocationNs).val(cookieValue.NLNS).val();
+ NLID = $('#'+SN.C.S.NoticeLocationId).val(cookieValue.NLID).val();
+ }
}
if (cookieValue == 'disabled') {
NDG = $('#'+SN.C.S.NoticeDataGeo).attr('checked', false).attr('checked');
@@ -301,8 +303,10 @@ var SN = { // StatusNet
$('#'+SN.C.S.NoticeLat).val(NLat);
$('#'+SN.C.S.NoticeLon).val(NLon);
- $('#'+SN.C.S.NoticeLocationNs).val(NLNS);
- $('#'+SN.C.S.NoticeLocationId).val(NLID);
+ if ($('#'+SN.C.S.NoticeLocationNs)) {
+ $('#'+SN.C.S.NoticeLocationNs).val(NLNS);
+ $('#'+SN.C.S.NoticeLocationId).val(NLID);
+ }
$('#'+SN.C.S.NoticeDataGeo).attr('checked', NDG);
}
});
@@ -491,7 +495,7 @@ var SN = { // StatusNet
$('#'+SN.C.S.NoticeLocationId).val('');
$('#'+SN.C.S.NoticeDataGeo).attr('checked', false);
- $.cookie(SN.C.S.NoticeDataGeoCookie, 'disabled');
+ $.cookie(SN.C.S.NoticeDataGeoCookie, 'disabled', { path: '/', expires: SN.U.GetDateFromNow(30) });
}
function getJSONgeocodeURL(geocodeURL, data) {
@@ -509,7 +513,7 @@ var SN = { // StatusNet
}
if (typeof(location.name) == 'undefined') {
- NLN_text = position.coords.latitude + ';' + position.coords.longitude;
+ NLN_text = data.lat + ';' + data.lon;
}
else {
NLN_text = location.name;
@@ -525,15 +529,16 @@ var SN = { // StatusNet
$('#'+SN.C.S.NoticeDataGeo).attr('checked', true);
var cookieValue = {
- 'NLat': data.lat,
- 'NLon': data.lon,
- 'NLNS': lns,
- 'NLID': lid,
- 'NLN': NLN_text,
- 'NLNU': location.url,
- 'NDG': true
+ NLat: data.lat,
+ NLon: data.lon,
+ NLNS: lns,
+ NLID: lid,
+ NLN: NLN_text,
+ NLNU: location.url,
+ NDG: true
};
- $.cookie(SN.C.S.NoticeDataGeoCookie, JSON.stringify(cookieValue));
+
+ $.cookie(SN.C.S.NoticeDataGeoCookie, JSON.stringify(cookieValue), { path: '/', expires: SN.U.GetDateFromNow(30) });
});
}
@@ -566,9 +571,9 @@ var SN = { // StatusNet
$('#'+SN.C.S.NoticeLon).val(position.coords.longitude);
var data = {
- 'lat': position.coords.latitude,
- 'lon': position.coords.longitude,
- 'token': $('#token').val()
+ lat: position.coords.latitude,
+ lon: position.coords.longitude,
+ token: $('#token').val()
};
getJSONgeocodeURL(geocodeURL, data);
@@ -593,9 +598,9 @@ var SN = { // StatusNet
else {
if (NLat.length > 0 && NLon.length > 0) {
var data = {
- 'lat': NLat,
- 'lon': NLon,
- 'token': $('#token').val()
+ lat: NLat,
+ lon: NLon,
+ token: $('#token').val()
};
getJSONgeocodeURL(geocodeURL, data);
@@ -624,8 +629,6 @@ var SN = { // StatusNet
else {
removeNoticeDataGeo();
}
-
- $('#'+SN.C.S.NoticeDataText).focus();
}).change();
}
},
@@ -656,6 +659,13 @@ var SN = { // StatusNet
}
return false;
});
+ },
+
+ GetDateFromNow: function(days) {
+ var date = new Date();
+ date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
+
+ return date;
}
},
diff --git a/lib/action.php b/lib/action.php
index 171bea17c..e9207a66a 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -199,10 +199,6 @@ 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');
- if (common_config('site', 'mobile')) {
- // TODO: "handheld" CSS for other mobile devices
- $this->cssLink('css/mobile.css','base','only screen and (max-device-width: 480px)'); // Mobile WebKit
- }
$this->cssLink('css/print.css','base','print');
Event::handle('EndShowStatusNetStyles', array($this));
Event::handle('EndShowLaconicaStyles', array($this));
diff --git a/lib/designsettings.php b/lib/designsettings.php
index b70ba0dfc..8e44c03a9 100644
--- a/lib/designsettings.php
+++ b/lib/designsettings.php
@@ -314,7 +314,7 @@ class DesignSettingsAction extends AccountSettingsAction
function showStylesheets()
{
parent::showStylesheets();
- $this->cssLink('css/farbtastic.css','base','screen, projection, tv');
+ $this->cssLink('js/farbtastic/farbtastic.css',null,'screen, projection, tv');
}
/**
diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php
index 14d2500e8..5c913836d 100644
--- a/plugins/MobileProfile/MobileProfilePlugin.php
+++ b/plugins/MobileProfile/MobileProfilePlugin.php
@@ -356,8 +356,6 @@ class MobileProfilePlugin extends WAP20Plugin
$contentLimit = Notice::maxContent();
- $form->out->inlineScript('maxLength = ' . $contentLimit . ';');
-
if ($contentLimit > 0) {
$form->out->element('div', array('id' => 'notice_text-count'),
$contentLimit);
@@ -416,7 +414,15 @@ class MobileProfilePlugin extends WAP20Plugin
return $proto.'://'.$serverpart.'/'.$pathpart.$relative;
}
-}
-
-?>
+ function onPluginVersion(&$versions)
+ {
+ $versions[] = array('name' => 'MobileProfile',
+ 'version' => STATUSNET_VERSION,
+ 'author' => 'Sarven Capadisli',
+ 'homepage' => 'http://status.net/wiki/Plugin:MobileProfile',
+ 'rawdescription' =>
+ _m('XHTML MobileProfile output for supporting user agents.'));
+ return true;
+ }
+}
diff --git a/plugins/MobileProfile/mp-screen.css b/plugins/MobileProfile/mp-screen.css
index 3eefc0c8e..04fa5fb00 100644
--- a/plugins/MobileProfile/mp-screen.css
+++ b/plugins/MobileProfile/mp-screen.css
@@ -176,13 +176,25 @@ margin-bottom:0;
.profile {
padding-top:4px;
padding-bottom:4px;
+min-height:65px;
}
-.notice div.entry-content {
+#content .notice .entry-title {
+float:left;
+width:100%;
margin-left:0;
-width:62.5%;
+}
+#content .notice .author .photo {
+position:static;
+float:left;
+}
+#content .notice div.entry-content {
+margin-left:0;
+width:75%;
+max-width:100%;
+min-width:0;
}
.notice-options {
-width:34%;
+width:43px;
margin-right:1%;
}
@@ -190,12 +202,36 @@ margin-right:1%;
width:16px;
height:16px;
}
-.notice-options a,
-.notice-options input {
+.notice-options form.processing {
+background-image:none;
+}
+#wrap .notice-options form.processing input.submit {
+background-position:0 47%;
+}
+
+.notice .notice-options a,
+.notice .notice-options input {
box-shadow:none;
-moz-box-shadow:none;
-webkit-box-shadow:none;
}
+.notice .notice-options a,
+.notice .notice-options form {
+margin:-4px 0 0 0;
+}
+.notice .notice-options .form_repeat,
+.notice .notice-options .notice_delete {
+margin-top:11px;
+}
+.notice .notice-options .form_favor,
+.notice .notice-options .form_disfavor,
+.notice .notice-options .form_repeat {
+margin-right:11px;
+}
+
+.notice .notice-options .notice_delete {
+float:left;
+}
.entity_profile {
width:auto;
diff --git a/theme/README b/theme/README
index 266a89fdf..e154a723c 100644
--- a/theme/README
+++ b/theme/README
@@ -2,37 +2,46 @@
*
* @package StatusNet
* @author Sarven Capadisli <csarven@status.net>
- * @copyright 2009 StatusNet, Inc.
+ * @copyright 2010 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-Location of key paths and files under theme/:
+== Location of key paths and files ==
+<pre><nowiki>
+base/css/
+base/css/display.css #layout, typography rules
+base/images/ #common icons, illustrations
+base/images/icons/icons-01.png #main icons file (combined into a single file)
-./base/css/
-./base/css/display.css
-./base/images/
+default/css/
+default/css/display.css #imports the base stylesheet for layout and adds background images and colour rules
+default/logo.png #default site logo for this theme
+default/mobilelogo.png #default logo for the mobile output
+default/default-avatar-mini.png #24x24 default avatar for minilists
+default/default-avatar-stream.png #48x48 default avatar for notice timelines
+default/default-avatar-profile.png #96x96 default avatar for the profile page
+</nowiki></pre>
-./default/css/
-./default/css/display.css
-./default/images/
-./base/display.css contains layout, typography rules:
-Only alter this file if you want to change the layout of the site. Please note that, any updates to this in future statusnet releases may not be compatible with your version.
+== How to create your own theme ==
-./default/css/display.css contains only the background images and colour rules:
-This file is a good basis for creating your own theme.
-Let's create a theme:
+You probably want to do one of the following:
-1. To start off, copy over the default theme:
-cp -r default mytheme
-2. Edit your mytheme stylesheet:
-nano mytheme/css/display.css
+* If you just want to change the text, link, background, content, sidebar colours, background image:
+** Do this from the Admin->Design settings (recommended!). You could also create a directory and a file structure like the default theme, search and replace with your own values. This is more work, but, you can do this if you plan to make additional *minimal* changes.
-a) Search and replace your colours and background images, or
-b) Create your own layout either importing a separate stylesheet (e.g., change to @import url(base.css);) or simply place it before the rest of the rules.
-4. Set /config.php to load 'mytheme':
-$config['site']['theme'] = 'mytheme';
+* If you want to change the background images and colours:
+# Create a directory and a file structure like the default theme.
+# Have your stylesheet import base/css/display.css and add your own styles below. It is okay to add *minimal* changes here.
+
+
+* If you want to create a different layout, typography, background images and colours:
+** Create your own theme directory (base or default) with stylesheets and images like.
+
+
+Finally, enable your theme by selecting it from the Admin->Design interface. You can set site's logo from here as well.
+
diff --git a/theme/base/css/display.css b/theme/base/css/display.css
index 2e4c88dfa..7eff4709c 100644
--- a/theme/base/css/display.css
+++ b/theme/base/css/display.css
@@ -73,7 +73,7 @@ input.checkbox,
input.radio {
position:relative;
top:2px;
-left:0;
+left:auto;
border:0;
}
@@ -567,7 +567,8 @@ float:right;
font-size:0.8em;
}
-.form_notice #notice_data-geo_wrap label {
+.form_notice #notice_data-geo_wrap label,
+.form_notice #notice_data-geo_wrap input {
position:absolute;
top:25px;
right:4px;
@@ -578,7 +579,7 @@ height:16px;
display:block;
}
.form_notice #notice_data-geo_wrap input {
-display:none;
+visibility:hidden;
}
.form_notice #notice_data-geo_wrap label {
font-weight:normal;
@@ -956,6 +957,16 @@ float:left;
#shownotice .vcard .photo {
margin-bottom:4px;
}
+#content .notice .author .photo {
+position:absolute;
+top:11px;
+left:0;
+float:none;
+}
+#content .notice .entry-title {
+margin-left:59px;
+}
+
.vcard .url {
text-decoration:none;
}
@@ -964,13 +975,19 @@ text-decoration:underline;
}
.notice .entry-title {
-float:left;
-width:100%;
overflow:hidden;
}
.notice .entry-title.ov {
overflow:visible;
}
+#showstream .notice .entry-title,
+#showstream .notice div.entry-content {
+margin-left:0;
+}
+#shownotice .notice .entry-title,
+#shownotice .notice div.entry-content {
+margin-left:110px;
+}
#shownotice .notice .entry-title {
font-size:2.2em;
}
@@ -1000,7 +1017,6 @@ max-width:70%;
}
#showstream .notice div.entry-content,
#shownotice .notice div.entry-content {
-margin-left:0;
max-width:79%;
}
@@ -1064,6 +1080,7 @@ position:relative;
font-size:0.95em;
width:113px;
float:right;
+margin-top:3px;
margin-right:4px;
}
diff --git a/theme/base/css/mobile.css b/theme/base/css/mobile.css
deleted file mode 100644
index f6c53ea8d..000000000
--- a/theme/base/css/mobile.css
+++ /dev/null
@@ -1,150 +0,0 @@
-/** theme: base
- *
- * @package StatusNet
- * @author Meitar Moscovitz <meitar@maymay.net>
- * @author Sarven Capadisli <csarven@status.net>
- * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link http://status.net/
- */
-
-body {
-font-size:2.5em;
-}
-
-#wrap {
-width:95%;
-}
-
-#header,
-#header address,
-#anon_notice,
-#site_nav_local_views .nav,
-#form_notice,
-#form_notice .form_data li,
-#core,
-#content_inner,
-#notices_primary,
-.notice,
-.notice .entry-title,
-.notice div.entry-content,
-.notice-options,
-.notice .notice-options a,
-.pagination,
-.pagination .nav,
-.aside .section {
-float:none;
-}
-
-.notice-options .notice_reply,
-.notice-options .notice_delete,
-.notice-options .form_favor,
-.notice-options .form_disfavor {
-position:static;
-}
-
-#form_notice,
-#anon_notice,
-#footer,
-#form_notice .form_actions input.submit {
-width:auto;
-}
-
-.form_settings label {
-width:25%;
-}
-.form_settings .form_data p.form_guide {
-margin-left:26%;
-}
-
-#site_nav_global_primary {
-width:75%;
-}
-
-.entity_profile {
-width:65%;
-}
-.entity_actions {
-margin-left:0;
-}
-
-#form_notice,
-#anon_notice {
-clear:both;
-}
-
-#content,
-#aside_primary {
-width:96%;
-padding-left:2%;
-padding-right:2%;
-}
-
-#site_notice {
-position:static;
-float:right;
-clear:right;
-width:75%;
-margin-right:0;
-margin-bottom:11px;
-}
-
-.notices {
-font-size:1.5em;
-}
-
-#form_notice textarea {
-width:80%;
-height:5em;
-}
-#form_notice .form_note {
-right:20%;
-top:6em;
-}
-
-
-.vcard .photo,
-.section .vcard .photo {
-margin-right:18px;
-}
-.notice,
-.profile {
-margin-bottom:18px;
-}
-
-.notices .entry-title,
-.notices div.entry-content {
-width:90%;
-}
-.notice div.entry-content {
-margin-left:0;
-}
-
-.notice .author .photo {
-height:4.5em;
-width:4.5em;
-}
-.notice-options {
-position:absolute;
-top:0;
-right:0;
-padding-left:7%;
-width:3%;
-}
-
-.notice-options .notice_delete a {
-float:left;
-}
-.pagination .nav {
-overflow:auto;
-}
-
-#export_data {
-display:none;
-}
-
-#site_nav_local_views li {
-margin-right:4px;
-}
-#site_nav_local_views a {
-padding:18px 11px;
-}