]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/diabook-aerith/theme.php
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
[friendica.git] / view / theme / diabook-aerith / theme.php
index 1b26e47f834bf07ab861c6f19e02aa96017cc313..53c564a945761cf1c32ed8cfe7c2cbc85487b561 100755 (executable)
@@ -3,13 +3,13 @@
 /*
  * Name: Diabook-aerith
  * Description: Diabook-aerith : report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu
- * Version: (Version: 1.016)
+ * Version: (Version: 1.018)
  * Author: 
  */
 
 
 //print diabook-version for debugging
-$diabook_version = "Diabook-aerith (Version: 1.016)";
+$diabook_version = "Diabook-aerith (Version: 1.018)";
 $a->page['htmlhead'] .= sprintf('<script "%s" ></script>', $diabook_version);
 
 
@@ -22,7 +22,6 @@ $cssFile = null;
  */
 function diabook_aerith_community_info(){
        $a = get_app();
-       //right_aside at networkpages
 
        // last 12 users
        $aside['$lastusers_title'] = t('Last users');
@@ -280,55 +279,6 @@ if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname']){
        }
 }
 
-//tabs at right_aside on settings page
-if ($a->argv[0] === "settings"){
-       
-       $tabs = array(
-               array(
-                       'label' => t('Account settings'),
-                       'url'   => $a->get_baseurl(true).'/settings',
-                       'sel'   => (($a->argc == 1)?'active':''),
-               ),      
-               array(
-                       'label' => t('Display settings'),
-                       'url'   => $a->get_baseurl(true).'/settings/display',
-                       'sel'   => (($a->argc > 1) && ($a->argv[1] === 'display')?'active':''),
-               ),                      
-               array(
-                       'label' => t('Edit/Manage Profiles'),
-                       'url'   => $a->get_baseurl(true).'/profiles',
-               ),      
-               array(
-                       'label' => t('Connector settings'),
-                       'url'   => $a->get_baseurl(true).'/settings/connectors',
-                       'sel'   => (($a->argc > 1) && ($a->argv[1] === 'connectors')?'active':''),
-               ),
-               array(
-                       'label' => t('Plugin settings'),
-                       'url'   => $a->get_baseurl(true).'/settings/addon',
-                       'sel'   => (($a->argc > 1) && ($a->argv[1] === 'addon')?'active':''),
-               ),
-               array(
-                       'label' => t('Connections'),
-                       'url' => $a->get_baseurl(true) . '/settings/oauth',
-                       'sel' => (($a->argc > 1) && ($a->argv[1] === 'oauth')?'active':''),
-               ),
-               array(
-                       'label' => t('Export personal data'),
-                       'url' => $a->get_baseurl(true) . '/uexport',
-                       'sel' => ''
-               )
-       );
-       $tabtpl = file_get_contents(dirname(__file__).'/rs_common_tabs.tpl') ;
-       $a->page['aside'] = replace_macros($tabtpl, array(
-               '$tabs' => $tabs,
-       ));
-       
-       
-       // CUSTOM CSS
-       $cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-aerith/style-settings.css";
-       
-}
 
 
 // custom css
@@ -512,10 +462,10 @@ function restore_boxes(){
 $a->page['htmlhead'] .= ' 
 
 <script type="text/javascript">
-function insertFormatting(BBcode,id) {
+function insertFormatting(comment,BBcode,id) {
        
                var tmpStr = $("#comment-edit-text-" + id).val();
-               if(tmpStr == "Kommentar") {
+               if(tmpStr == comment) {
                        tmpStr = "";
                        $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
                        $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
@@ -526,10 +476,16 @@ function insertFormatting(BBcode,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;