This commit is contained in:
friendica 2012-09-18 17:44:38 -07:00
commit fa14723ef5
18 changed files with 10089 additions and 5678 deletions

3
.gitignore vendored
View file

@ -21,5 +21,6 @@ report/
.buildpath
.externalToolBuilders
.settings
#ignore OSX .DS_Store files
.DS_Store
view/theme/smoothly

View file

@ -664,6 +664,7 @@ function admin_page_users(&$a){
);
function _setup_users($e){
$a = get_app();
$accounts = Array(
t('Normal Account'),
t('Soapbox Account'),
@ -674,6 +675,7 @@ function admin_page_users(&$a){
$e['register_date'] = relative_date($e['register_date']);
$e['login_date'] = relative_date($e['login_date']);
$e['lastitem_date'] = relative_date($e['lastitem_date']);
$e['is_admin'] = ($e['email'] === $a->config['admin_email']);
return $e;
}
$users = array_map("_setup_users", $users);
@ -694,6 +696,7 @@ function admin_page_users(&$a){
'$delete' => t('Delete'),
'$block' => t('Block'),
'$unblock' => t('Unblock'),
'$siteadmin' => t('Site admin'),
'$h_users' => t('Users'),
'$th_users' => array( t('Name'), t('Email'), t('Register date'), t('Last login'), t('Last item'), t('Account') ),

View file

@ -46,7 +46,7 @@ function fbrowser_content($a){
}
$r = q("SELECT `resource-id`, `id`, `filename`, type, min(`scale`) AS `hiq`,max(`scale`) AS `loq`, `desc`
FROM `photo` WHERE `uid` = %d $sql_extra
FROM `photo` WHERE `uid` = %d AND (height <= 320 AND width <= 320) $sql_extra
GROUP BY `resource-id` $sql_extra2",
intval(local_user())
);

View file

@ -70,11 +70,20 @@
<td class='register_date'>$u.register_date</td>
<td class='login_date'>$u.login_date</td>
<td class='lastitem_date'>$u.lastitem_date</td>
<td class='login_date'>$u.page-flags</td>
<td class="checkbox"><input type="checkbox" class="users_ckbx" id="id_user_$u.uid" name="user[]" value="$u.uid"/></td>
<td class='login_date'>$u.page-flags {{ if $u.is_admin }}($siteadmin){{ endif }}</td>
<td class="checkbox">
{{ if $u.is_admin }}
&nbsp;
{{ else }}
<input type="checkbox" class="users_ckbx" id="id_user_$u.uid" name="user[]" value="$u.uid"/></td>
{{ endif }}
<td class="tools">
<a href="$baseurl/admin/users/block/$u.uid?t=$form_security_token" title='{{ if $u.blocked }}$unblock{{ else }}$block{{ endif }}'><span class='icon block {{ if $u.blocked==0 }}dim{{ endif }}'></span></a>
<a href="$baseurl/admin/users/delete/$u.uid?t=$form_security_token" title='$delete' onclick="return confirm_delete('$u.name')"><span class='icon drop'></span></a>
{{ if $u.is_admin }}
&nbsp;
{{ else }}
<a href="$baseurl/admin/users/block/$u.uid?t=$form_security_token" title='{{ if $u.blocked }}$unblock{{ else }}$block{{ endif }}'><span class='icon block {{ if $u.blocked==0 }}dim{{ endif }}'></span></a>
<a href="$baseurl/admin/users/delete/$u.uid?t=$form_security_token" title='$delete' onclick="return confirm_delete('$u.name')"><span class='icon drop'></span></a>
{{ endif }}
</td>
</tr>
{{ endfor }}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -71,3 +71,15 @@
<ul id="nav-notifications-template" style="display:none;" rel="template">
<li class="{4}"><a href="{0}"><img src="{1}" height="24" width="24" alt="" />{2} <span class="notif-when">{3}</span></a></li>
</ul>
<script>
var pagetitle = null;
$("nav").bind('nav-update', function(e,data){
if (pagetitle==null) pagetitle = document.title;
var count = $(data).find('notif').attr('count');
if (count>0) {
document.title = "("+count+") "+pagetitle;
} else {
document.title = pagetitle;
}
});
</script>

View file

@ -130,7 +130,7 @@ $(document).ready(function() {
$(".comment-edit-bb-" + id).hide();
}
$(document).ready(function(){
/*$(document).ready(function(){
var doctitle = document.title;
function checkNotify() {
if(document.getElementById("notify-update").innerHTML != "")
@ -139,7 +139,17 @@ $(document).ready(function() {
document.title = doctitle;
};
setInterval(function () {checkNotify();}, 10 * 1000);
})
})*/
</script>
<script>
var pagetitle = null;
$("nav").bind('nav-update', function(e,data){
if (pagetitle==null) pagetitle = document.title;
var count = $(data).find('notif').attr('count');
if (count>0) {
document.title = "("+count+") "+pagetitle;
} else {
document.title = pagetitle;
}
});
</script>

View file

@ -56,4 +56,16 @@ function checkNotify() {
};
setInterval(function () {checkNotify();}, 10 * 1000);
}
$(document).ready(function(){
var doctitle = document.title;
function checkNotify() {
if(document.getElementById("notify-update").innerHTML != "")
document.title = "("+document.getElementById("notify-update").innerHTML+") " + doctitle;
else
document.title = doctitle;
};
setInterval(function () {checkNotify();}, 10 * 1000);
})
</script>

View file

@ -4,56 +4,49 @@ $(document).ready(function() {
});
function tautogrow(id) {
$("textarea#comment-edit-text-" + id).autogrow();
$("textarea#comment-edit-text-" + id).autogrow();
};
function insertFormatting(comment, BBcode, id) {
var tmpStr = $("#comment-edit-text-" + id).val();
if(tmpStr == comment) {
tmpStr = "";
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
openMenu("comment-edit-submit-wrapper-" + id);
}
textarea = document.getElementById("comment-edit-text-" + id);
if (document.selection) {
textarea.focus();
selected = document.selection.createRange();
if (BBcode == "url") {
selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
} else {
selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
}
} else if (textarea.selectionStart || textarea.selectionStart == "0") {
var start = textarea.selectionStart;
var end = textarea.selectionEnd;
if (BBcode == "url") {
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]"
+ "http://" + textarea.value.substring(start, end)
+ "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
} else {
textarea.value = textarea.value.substring(0, start)
+ "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]"
+ textarea.value.substring(end, textarea.value.length);
}
}
return true;
var tmpStr = $("#comment-edit-text-" + id).val();
if(tmpStr == comment) {
tmpStr = "";
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
openMenu("comment-edit-submit-wrapper-" + id);
}
textarea = document.getElementById("comment-edit-text-" + id);
if (document.selection) {
textarea.focus();
selected = document.selection.createRange();
if (BBcode == "url") {
selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
} else {
selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
}
} else if (textarea.selectionStart || textarea.selectionStart == "0") {
var start = textarea.selectionStart;
var end = textarea.selectionEnd;
if (BBcode == "url") {
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]"
+ "http://" + textarea.value.substring(start, end)
+ "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
} else {
textarea.value = textarea.value.substring(0, start)
+ "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]"
+ textarea.value.substring(end, textarea.value.length);
}
}
return true;
}
function cmtBbOpen(id) {
$(".comment-edit-bb-" + id).show();
$(".comment-edit-bb-" + id).show();
}
function cmtBbClose(id) {
$(".comment-edit-bb-" + id).hide();
}
var doctitle = document.title;
function checkNotify() {
if(document.getElementById("notify-update").innerHTML != "") {
document.title = "("+document.getElementById("notify-update").innerHTML+") " + doctitle;
} else {
document.title = doctitle;
};
setInterval(function () {checkNotify();}, 10 * 1000);
}
</script>

View file

@ -0,0 +1,30 @@
<!DOCTYPE html >
<html>
<head>
<title><?php if(x($page,'title')) echo $page['title'] ?></title>
<script>var baseurl="<?php echo $a->get_baseurl() ?>";</script>
<?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
</head>
<body>
<header>
<?php if(x($page, 'header')) echo $page['header']; ?>
</header>
<?php if(x($page,'nav')) echo $page['nav']; ?>
<aside><?php if(x($page,'aside')) echo $page['aside']; ?></aside>
<section><?php if(x($page,'content')) echo $page['content']; ?>
<div id="page-footer"></div>
</section>
<right_aside><?php if(x($page,'right_aside')) echo $page['right_aside']; ?></right_aside>
<footer id="footer">
<?php if(x($page, 'footer')) echo $page['footer']; ?>
</footer>
<?php if (x($page, 'bottom')) echo $page['bottom']; ?>
</body>
</html>

View file

@ -0,0 +1,41 @@
<link rel='stylesheet' type='text/css' href='$baseurl/library/fullcalendar/fullcalendar.css' />
<script language="javascript" type="text/javascript"
src="$baseurl/library/fullcalendar/fullcalendar.min.js"></script>
<script>
// start calendar from yesterday
var yesterday= new Date()
yesterday.setDate(yesterday.getDate()-1)
function showEvent(eventid) {
$.get(
'$baseurl/events/?id='+eventid,
function(data){
$.fancybox(data);
}
);
}
$(document).ready(function() {
$('#events-reminder').fullCalendar({
firstDay: yesterday.getDay(),
year: yesterday.getFullYear(),
month: yesterday.getMonth(),
date: yesterday.getDate(),
events: '$baseurl/events/json/',
header: {
left: '',
center: '',
right: ''
},
timeFormat: 'H(:mm)',
defaultView: 'basicWeek',
height: 50,
eventClick: function(calEvent, jsEvent, view) {
showEvent(calEvent.id);
}
});
});
</script>
<br />
<div id="events-reminder"></div>
<br />

View file

@ -0,0 +1,3 @@
<div id="footerbox" style="display:none">
<a style="float:right; color:#333;margin-right:10px;display: table;margin-top: 5px;" href="friendica" title="Site Info / Impressum" >Info / Impressum</a>
</div>

View file

View file

@ -1,6 +1,4 @@
<nav>
$langselector
<span id="banner">$banner</span>
<div id="notifications">
@ -59,9 +57,24 @@
</nav>
<div id="scrollup" >
<a href="#top"><img src="view/theme/smoothly/totop.png" alt="back to top" title="Back to top" /></a>
<a href="javascript:scrollTo(0,0)"><img src="view/theme/smoothly/totop.png" alt="back to top" title="Back to top" /></a>
</div>
<ul id="nav-notifications-template" style="display:none;" rel="template">
<li class="{4}"><a href="{0}"><img src="{1}" height="24" width="24" alt="" />{2} <span class="notif-when">{3}</span></a></li>
</ul>
<div style="position: fixed; top: 3px; left: 5px; z-index:9999">$langselector</div>
<script>
var pagetitle = null;
$("nav").bind('nav-update', function(e,data){
if (pagetitle==null) pagetitle = document.title;
var count = $(data).find('notif').attr('count');
if (count>0) {
document.title = "("+count+") "+pagetitle;
} else {
document.title = pagetitle;
}
});
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

View file

@ -3,7 +3,7 @@
Smoothly
Created by Anne Walk and Devlon Duthie on 2011-09-24
Modified by alex@friendica.pixelbits.de on 2012-09-14
Modified by alex@friendica.pixelbits.de on 2012-09-17
** Colors **
@ -93,10 +93,9 @@ li.widget-list {
.fakelink {
color: #1873a2;
cursor: pointer;
padding-left: 20px;
margin-left: 20px;
margin-bottom: 10px;
background: url("down.png") no-repeat scroll left center transparent;
margin-left: 10px;
/*background: url("down.png") no-repeat scroll left center transparent;*/
}
.fakelink :hover {
@ -164,18 +163,18 @@ input[type=submit]:active {
}
::selection {
background: #fdf795;
background: #fec01d;
color: #000; /* Safari and Opera */
}
::-moz-selection {
background: #fdf795;
background: #fec01d;
color: #000; /* Firefox */
}
section {
float: left;
padding-top: 45px; /*60*/
margin-top: 45px;
width: 730px;
font-size: 0.9em;
line-height: 1.2em;
@ -546,7 +545,7 @@ ul#user-menu-popup li a.nav-sep {
aside {
float: right;
width: 205px;
margin-top: 40px;
margin-top: 45px;
font-size: 0.9em;
font-style: bold;
}
@ -569,7 +568,6 @@ aside a{
font-size: 1.4em;
font-weight: bold;
border-bottom: none;
padding-top: 15px;
}
.vcard #profile-photo-wrapper {
@ -922,12 +920,9 @@ ul .sidebar-group-li .icon {
}
#jot-preview-link {
float: right;
float: left;
width: 60px;
/*height: 10px;*/
margin-right: 180px;
/*margin-top: 0px;
margin-left: 10px;*/
font-size: 12px;
background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) );
background: -moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% );
@ -943,12 +938,12 @@ ul .sidebar-group-li .icon {
}
#profile-jot-perms {
width: 25px;
width: 27px;
height: 27px;
float: right;
overflow: hidden;
margin-left: 10px;
margin-right: 80px;
margin-top: -28px;
margin-top: -20px;
border: 1px solid #7C7D7B;
border-radius: 5px 5px 5px 5px;
}
@ -961,8 +956,9 @@ ul .sidebar-group-li .icon {
width: 80px;
float: right;
margin-right: 90px;
margin-top: -28px;
margin-top: -20px;
margin-left: 10px;
padding: 5px 5px;
border: 1px solid #7C7D7B;
border-radius: 5px 5px 5px 5px;
}
@ -1180,9 +1176,11 @@ profile-jot-banner-wrapper {
transition: all 0.25s ease-in-out;
-webkit-transition: all 0.25s ease-in-out;
-moz-transition: all 0.25s ease-in-out;
margin-top: 10px;
margin-top: 20px;
margin-left: 100px;
padding-bottom: 5px;
float: right;
width: 100%;
}
.wall-item-tools:hover {
@ -1195,18 +1193,17 @@ profile-jot-banner-wrapper {
}
.wall-item-outside-wrapper.comment .wall-item-tools {
margin: 5px 5px 0px 70px;
/*margin: 5px 5px 0px 70px;*/
float: right;
}
.wall-item-like-buttons {
float: left;
padding-left: 10px;
}
.wall-item-like-buttons a.icon {
float: left;
margin-right: 5px;
margin-right: 10px;
display: inline;
}
@ -1216,13 +1213,12 @@ profile-jot-banner-wrapper {
}
.wall-item-delete-wrapper {
float: left;
margin-right: 5px;
float: right;
}
.wall-item-links-wrapper a.icon {
float: left;
margin-right: 5px;
margin-right: 10px;
display: inline;
}
@ -1269,8 +1265,8 @@ profile-jot-banner-wrapper {
.wall-item-like {
clear: left;
font-size: 0.9em;
margin: 0px 0px 10px 450px;
padding-left: 0px;
margin: 0px 0px 10px 0px;
padding-left: 10px;
}
.wall-item-author {
@ -1486,13 +1482,14 @@ profile-jot-banner-wrapper {
.comment-wwedit-wrapper,
.comment-edit-wrapper {
margin: 30px 0px 0px 80px;
margin: 0px 0px 0px 80px;
}
.comment-wwedit-wrapper img,
.comment-edit-wrapper img {
width: 20px;
height: 20px;
height: 20px;
margin-top: 5px;
}
.comment-edit-photo-link {
@ -1929,6 +1926,7 @@ keygen, select {
}
input, textarea, keygen {
margin-top: 3px;
font-size: 0.9em;
letter-spacing: normal;
word-spacing: normal;
@ -2643,7 +2641,7 @@ margin-left: 0px;
background: url(login-bg.gif) no-repeat;
background-position: 0 50%;
padding-left: 18px;
width: 384px!important;
width: 220px!important;
}
#profile-tabs-wrapper {
@ -3273,8 +3271,8 @@ tr {
/* =============== */
.field {
margin-bottom: 10px;
margin-top: 10px;
/*margin-bottom: 10px;
margin-top: 10px;*/
padding-bottom: 0px;
width: 90%;
}
@ -3382,19 +3380,19 @@ tr {
.drop { background-position: -110px 0px;}
.drophide { background-position: -130px 0px;}
.edit { background-position: -150px 0px;}
.camera { background-position: -170px 0px;}
.camera { background-position: -170px 0px;}
.dislike { background-position: -190px 0px;}
.like { background-position: -210px 0px;}
.link { background-position: -230px 0px;}
.globe { background-position: -50px -20px;}
.noglobe { background-position: -70px -20px;}
.no { background-position: -90px -20px;}
.no { background-position: -90px -20px;}
.pause { background-position: -110px -20px;}
.play { background-position: -130px -20px;}
.pencil { background-position: -150px -20px;}
.pencil { background-position: -150px -20px; margin-right: 10px;}
.small-pencil { background-position: -170px -20px;}
.recycle { background-position: -190px -20px;}
.remote-link { background-position: -210px -20px;}
.remote-link { background-position: -210px -20px; margin-right: 10px;}
.share { background-position: -230px -20px;}
.tools { background-position: -50px -40px;}
.lock { background-position: -70px -40px;}
@ -3415,13 +3413,13 @@ tr {
.video { background-position: -110px -40px;}
.youtube { background-position: -130px -40px;}
.attach { background-position: -190px -40px;}
.attach { background-position: -190px -40px;}
.language { background-position: -210px -40px;}
.on { background-position: -50px -60px;}
.on { background-position: -50px -60px;}
.off { background-position: -70px -60px;}
.prev { background-position: -90px -60px;}
.next { background-position: -110px -60px;}
.tagged { background-position: -130px -60px;}
.tagged { background-position: -130px -60px; margin-right: 10px;}
.icon.dim { opacity: 0.3;filter:alpha(opacity=30);}
.attachtype {
@ -3803,10 +3801,10 @@ hr.line-dots {
----------------------------------------------------------- */
.shiny {
background: #fbfde9;
border-radius: 5px;
}
/*div.wall-item-content-wrapper.shiny {
background-image: url("star.png");
background-repeat: no-repeat;
}*/
div.wall-item-content-wrapper.shiny {
background-image: url("shiny.png");
background-repeat: repeat-x;
}

View file

@ -3,7 +3,7 @@
/*
* Name: Smoothly
* Description: Like coffee with milk. Theme works fine with iPad[2].
* Version: 0.7
* Version: 0.8.2
* Author: Alex <https://friendica.pixelbits.de/profile/alex>
* Maintainer: Alex <https://friendica.pixelbits.de/profile/alex>
* Screenshot: <a href="screenshot.png">Screenshot</a>
@ -94,4 +94,25 @@ $('.savedsearchterm').hover(
</script>
EOT;
}
// custom css
if (!is_null($cssFile)) {
$a->page['htmlhead'] .= sprintf('<link rel="stylesheet" type="text/css" href="%s" />', $cssFile);
}
_js_in_foot();
}
if(! function_exists('_js_in_foot')) {
function _js_in_foot() {
/** @purpose insert stuff in bottom of page
*/
$a = get_app();
$baseurl = $a->get_baseurl($ssl_state);
$bottom['$baseurl'] = $baseurl;
$tpl = file_get_contents(dirname(__file__) . '/bottom.tpl');
return $a->page['bottom'] = replace_macros($tpl, $bottom);
}
}