]> git.mxchange.org Git - friendica.git/blobdiff - js/main.js
Merge commit 'upstream/master'
[friendica.git] / js / main.js
index 0b5fb5cdc0edc786fc5bd4898ce9bb7a7d20722a..744691b6da5dd971de36bc189f172b4141d85eb8 100755 (executable)
@@ -16,6 +16,7 @@
       document.getElementById(theID).style.display = "none" 
   }
 
+
        var src = null;
        var prev = null;
        var livetime = null;
                        return false;
                });
                $('html').click(function() {
-                       last_popup_menu.hide();
-                       last_popup_button.removeClass("selected");
-                       last_popup_menu = null;
-                       last_popup_button = null;
+                       if(last_popup_menu) {
+                               last_popup_menu.hide();
+                               last_popup_button.removeClass("selected");
+                               last_popup_menu = null;
+                               last_popup_button = null;
+                       }
                });
                
                // fancyboxes
                NavUpdate(); 
                // Allow folks to stop the ajax page updates with the pause/break key
                $(document).keydown(function(event) {
+                       if(event.keyCode == '8') {
+                               var target = event.target || event.srcElement;
+                               if (!/input|textarea/i.test(target.nodeName)) {
+                                       return false;
+                               }
+                       }
                        if(event.keyCode == '19' || (event.ctrlKey && event.which == '32')) {
                                event.preventDefault();
                                if(stopped == false) {
@@ -591,7 +600,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