aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/diabook/bottom.tpl
diff options
context:
space:
mode:
authortommy tomson <thomas.bierey@gmx.de>2012-05-03 06:05:55 +0200
committertommy tomson <thomas.bierey@gmx.de>2012-05-03 06:05:55 +0200
commit3521e22333d9050d3feb35b4f9b147d444505904 (patch)
tree7aa6b457bc45005ff99cdf82265aefb0763b478b /view/theme/diabook/bottom.tpl
parente7580b71e1825dc6e049d7c1f945ab701bf8f6cd (diff)
downloadvolse-hubzilla-3521e22333d9050d3feb35b4f9b147d444505904.tar.gz
volse-hubzilla-3521e22333d9050d3feb35b4f9b147d444505904.tar.bz2
volse-hubzilla-3521e22333d9050d3feb35b4f9b147d444505904.zip
diabook-theme: made boxes at right_aside sortable
Diffstat (limited to 'view/theme/diabook/bottom.tpl')
-rw-r--r--view/theme/diabook/bottom.tpl26
1 files changed, 20 insertions, 6 deletions
diff --git a/view/theme/diabook/bottom.tpl b/view/theme/diabook/bottom.tpl
index 8eb71b7dd..2bb651796 100644
--- a/view/theme/diabook/bottom.tpl
+++ b/view/theme/diabook/bottom.tpl
@@ -1,11 +1,6 @@
<script type="text/javascript" src="$baseurl/view/theme/diabook/js/jquery.autogrow.textarea.js"></script>
<script type="text/javascript">
-$(document).ready(function() {
-});
-function tautogrow(id){
- $("textarea#comment-edit-text-" +id).autogrow();
- };
$(document).ready(function() {
$("iframe").each(function(){
var ifr_source = $(this).attr("src");
@@ -21,9 +16,28 @@ $(document).ready(function() {
});
});
+
+ $(document).ready(function(){
+ $("#sortable_boxes").sortable({
+ update: function(event, ui) {
+ var BoxOrder = $(this).sortable("toArray").toString();
+ $.cookie("Boxorder", BoxOrder , { expires: 365, path: "/" });
+ }
+ });
+ var cookie = $.cookie("Boxorder");
+ if (!cookie) return;
+ var SavedID = cookie.split(",");
+ for (var Sitem=0, m = SavedID.length; Sitem < m; Sitem++) {
+ $("#sortable_boxes").append($("#sortable_boxes").children("#" + SavedID[Sitem]));
+ }
+ });
+
+ function tautogrow(id){
+ $("textarea#comment-edit-text-" +id).autogrow();
+ };
+
function yt_iframe() {
-
$("iframe").load(function() {
var ifr_src = $(this).contents().find("body iframe").attr("src");
$("iframe").contents().find("body iframe").attr("src", ifr_src+"&wmode=transparent");