Pull request #487

This commit is contained in:
Thomas Willingham 2012-09-18 16:15:36 +01:00
parent 61eb884a20
commit 96d6d6b988
4 changed files with 109 additions and 72 deletions

View File

@ -4,58 +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();
}
$(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>
</script>

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

@ -1,13 +1,4 @@
<header>
<!--
<div id="site-location">$sitelocation</div>
<div id="banner">$banner</div>
-->
</header>
<nav>
<!-- $langselector -->
<span id="banner">$banner</span>
<div id="notifications">
@ -74,3 +65,16 @@
</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>

View File

@ -93,9 +93,8 @@ li.widget-list {
.fakelink {
color: #1873a2;
cursor: pointer;
padding-left: 20px;
margin-left: 20px;
margin-bottom: 10px;
margin-left: 10px;
/*background: url("down.png") no-repeat scroll left center transparent;*/
}
@ -1177,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 {
@ -1192,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;
}
@ -1213,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;
}
@ -1266,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 {
@ -1483,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 {
@ -1926,6 +1926,7 @@ keygen, select {
}
input, textarea, keygen {
margin-top: 3px;
font-size: 0.9em;
letter-spacing: normal;
word-spacing: normal;
@ -3379,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;}
@ -3412,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 {