]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frost/js/theme.js
Merge pull request #593 from fermionic/20130127-tinymce-update-and-fixes
[friendica.git] / view / theme / frost / js / theme.js
index 197f85f1f0cbf52b5c2741b940456e1d0423fedd..b0d6f493131c4545dc913feb4b84ec259805c93d 100644 (file)
@@ -29,10 +29,10 @@ $j(document).ready(function() {
        $j("#profile-jot-text").click(enableOnUser);
 
 
-       $j('.nav-menu-link').hover(function() {
-               showNavMenu($j(this).attr('rel'));
+       $j('.nav-menu-list, .nav-menu-icon').hover(function() {
+               showNavMenu($j(this).attr('point'));
        }, function() {
-               hideNavMenu($j(this).attr('rel'));
+               hideNavMenu($j(this).attr('point'));
        });
 
 /*     $j('html').click(function() { $j("#nav-notifications-menu" ).hide(); });*/
@@ -305,6 +305,13 @@ $j(function(){
 });
 
 
+function homeRedirect() {
+       $j('html').fadeOut('slow', function(){
+               window.location = baseurl + "/login";
+       });
+}
+
+
 if(typeof window.photoEdit != 'undefined') {
 
        $j(document).keydown(function(event) {
@@ -508,14 +515,14 @@ function insertFormatting(comment,BBcode,id) {
                textarea.focus();
                selected = document.selection.createRange();
                if (BBcode == "url"){
-                       selected.text = "["+BBcode+"]" + "http://" +  selected.text + "[/"+BBcode+"]";
+                       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);
+                       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);
        }
@@ -616,8 +623,8 @@ function initEditor(cb){
                        $j("#profile-jot-text").contact_autocomplete(baseurl+"/acl");
                        editor = true;
                        $j("a#jot-perms-icon").fancybox({
-                               'transitionIn' : 'elastic',
-                               'transitionOut' : 'elastic'
+                               'transitionIn' : 'none', //'elastic',
+                               'transitionOut' : 'none' //'elastic'
                        });
                        $j(".jothidden").show();
                        if (typeof cb!="undefined") cb();
@@ -640,9 +647,9 @@ function initEditor(cb){
                        entity_encoding : "raw",
                        add_unload_trigger : false,
                        remove_linebreaks : false,
-                       force_p_newlines : false,
-                       force_br_newlines : true,
-                       forced_root_block : '',
+                       //force_p_newlines : false,
+                       //force_br_newlines : true,
+                       forced_root_block : 'div',
                        convert_urls: false,
                        content_css: window.baseURL + "/view/custom_tinymce.css",
                        theme_advanced_path : false,
@@ -735,9 +742,9 @@ function msgInitEditor() {
                        entity_encoding : "raw",
                        add_unload_trigger : false,
                        remove_linebreaks : false,
-                       force_p_newlines : false,
-                       force_br_newlines : true,
-                       forced_root_block : '',
+                       //force_p_newlines : false,
+                       //force_br_newlines : true,
+                       forced_root_block : 'div',
                        convert_urls: false,
                        content_css: baseurl + "/view/custom_tinymce.css",
                             //Character count
@@ -776,9 +783,9 @@ function profInitEditor() {
                entity_encoding : "raw",
                add_unload_trigger : false,
                remove_linebreaks : false,
-               force_p_newlines : false,
-               force_br_newlines : true,
-               forced_root_block : '',
+               //force_p_newlines : false,
+               //force_br_newlines : true,
+               forced_root_block : 'div',
                content_css: baseurl + "/view/custom_tinymce.css",
                theme_advanced_path : false,
                setup : function(ed) {
@@ -806,9 +813,9 @@ function eventInitEditor() {
                entity_encoding : "raw",
                add_unload_trigger : false,
                remove_linebreaks : false,
-               force_p_newlines : false,
-               force_br_newlines : true,
-               forced_root_block : '',
+               //force_p_newlines : false,
+               //force_br_newlines : true,
+               forced_root_block : 'div',
                content_css: baseurl + "/view/custom_tinymce.css",
                theme_advanced_path : false,
                setup : function(ed) {
@@ -836,9 +843,9 @@ function contactInitEditor () {
                entity_encoding : "raw",
                add_unload_trigger : false,
                remove_linebreaks : false,
-               force_p_newlines : false,
-               force_br_newlines : true,
-               forced_root_block : '',
+               //force_p_newlines : false,
+               //force_br_newlines : true,
+               forced_root_block : 'div',
                content_css: baseurl + "/view/custom_tinymce.css"
 
 
@@ -865,9 +872,9 @@ function wallInitEditor() {
                        entity_encoding : "raw",
                        add_unload_trigger : false,
                        remove_linebreaks : false,
-                       force_p_newlines : false,
-                       force_br_newlines : true,
-                       forced_root_block : '',
+                       //force_p_newlines : false,
+                       //force_br_newlines : true,
+                       forced_root_block : 'div',
                        convert_urls: false,
                        content_css: baseurl + "/view/custom_tinymce.css",
                                 //Character count