From 453b5b46a370e3f01f2c948ac3eddf0bcd82c741 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= <tobias@hoessl.eu>
Date: Sun, 18 Mar 2012 15:44:33 +0000
Subject: CSRF-Protection in the group-related form (creating, renaming and
 dropping a group, adding/removing members from it)

---
 js/main.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'js/main.js')

diff --git a/js/main.js b/js/main.js
index c20455ad1..babd2a1c3 100755
--- a/js/main.js
+++ b/js/main.js
@@ -486,9 +486,9 @@
         return a.join('');  
     }  
 
-	function groupChangeMember(gid,cid) {
+	function groupChangeMember(gid, cid, sec_token) {
 		$('body .fakelink').css('cursor', 'wait');
-		$.get('group/' + gid + '/' + cid, function(data) {
+		$.get('group/' + gid + '/' + cid + "?t=" + sec_token, function(data) {
 				$('#group-update-wrapper').html(data);
 				$('body .fakelink').css('cursor', 'auto');				
 		});
-- 
cgit v1.2.3


From 1780fff1611809a6069603eceb643e210b4b3f36 Mon Sep 17 00:00:00 2001
From: Fabio Comuni <fabrix.xm@gmail.com>
Date: Fri, 23 Mar 2012 14:09:06 +0100
Subject: diabook: theme.php remove code duplication last photos check for user
 "hidewall" remove unneeded regex move js code to close popup in main.js
 (missing stop event propagation in popup links)

---
 js/main.js | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

(limited to 'js/main.js')

diff --git a/js/main.js b/js/main.js
index babd2a1c3..2b4b13791 100755
--- a/js/main.js
+++ b/js/main.js
@@ -28,13 +28,15 @@
 	var in_progress = false;
 	var langSelect = false;
 	var commentBusy = false;
+	var last_popup_menu = null;
+	var last_popup_button = null;
 
 	$(function() {
 		$.ajaxSetup({cache: false});
 
 		msie = $.browser.msie ;
 		
-		/* setup tooltips */
+		/* setup tooltips *//*
 		$("a,.tt").each(function(){
 			var e = $(this);
 			var pos="bottom";
@@ -43,7 +45,7 @@
 			if (e.hasClass("ttleft")) pos="left";
 			if (e.hasClass("ttright")) pos="right";
 			e.tipTip({defaultPosition: pos, edgeOffset: 8});
-		});
+		});*/
 		
 		
 		
@@ -76,8 +78,21 @@
 			if (menu.attr('popup')=="false") return false;
 			$(this).parent().toggleClass("selected");
 			menu.toggle();
+			if (menu.css("display") == "none") {
+				last_popup_menu = null;
+				last_popup_button = null;
+			} else {
+				last_popup_menu = menu;
+				last_popup_button = $(this).parent();
+			}
 			return false;
 		});
+		$('html').click(function() {
+			last_popup_menu.hide();
+			last_popup_button.removeClass("selected");
+			last_popup_menu = null;
+			last_popup_button = null;
+		});
 		
 		// fancyboxes
 		$("a.popupbox").fancybox({
-- 
cgit v1.2.3


From c88674aaf23ede573f19a2b363dfccf9627a5dcb Mon Sep 17 00:00:00 2001
From: friendica <info@friendica.com>
Date: Sun, 25 Mar 2012 19:05:14 -0700
Subject: theme preview for end users

---
 js/main.js | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'js/main.js')

diff --git a/js/main.js b/js/main.js
index 2b4b13791..0b5fb5cdc 100755
--- a/js/main.js
+++ b/js/main.js
@@ -588,3 +588,10 @@ Array.prototype.remove = function(item) {
   return this.push.apply(this, rest);
 };
 
+function previewTheme(elm) {
+	theme = $(elm).val();
+	$.getJSON('pretheme?f=&theme=' + theme,function(data) {
+			$('#theme-preview').html('<a href="' + data.img + '"><img src="' + data.img + '" width="320" height="240" alt="' + theme + '" /></a>');
+	});
+
+}
\ No newline at end of file
-- 
cgit v1.2.3


From 4c585f759f5c2662b2d761adccdf2c6dafd31249 Mon Sep 17 00:00:00 2001
From: friendica <info@friendica.com>
Date: Mon, 26 Mar 2012 18:15:10 -0700
Subject: theme description with preview (non-translatable unfortunately)

---
 js/main.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'js/main.js')

diff --git a/js/main.js b/js/main.js
index 0b5fb5cdc..defd1f951 100755
--- a/js/main.js
+++ b/js/main.js
@@ -591,7 +591,7 @@ Array.prototype.remove = function(item) {
 function previewTheme(elm) {
 	theme = $(elm).val();
 	$.getJSON('pretheme?f=&theme=' + theme,function(data) {
-			$('#theme-preview').html('<a href="' + data.img + '"><img src="' + data.img + '" width="320" height="240" alt="' + theme + '" /></a>');
+			$('#theme-preview').html('<div id="theme-desc">' + data.desc + '</div><a href="' + data.img + '"><img src="' + data.img + '" width="320" height="240" alt="' + theme + '" /></a>');
 	});
 
 }
\ No newline at end of file
-- 
cgit v1.2.3