4122: changed themes to use ATutor.course.toggleFolder and removed toggleFolder from...
authorlaurel <laurel.williams@utoronto.ca>
Tue, 4 May 2010 20:02:47 +0000 (20:02 -0000)
committerlaurel <laurel.williams@utoronto.ca>
Tue, 4 May 2010 20:02:47 +0000 (20:02 -0000)
docs/include/classes/ContentManager.class.php
docs/themes/blumin/include/header.tmpl.php
docs/themes/default/include/header.tmpl.php
docs/themes/default_classic/include/header.tmpl.php
docs/themes/fluid/include/header.tmpl.php
docs/themes/greenmin/include/header.tmpl.php
docs/themes/mobile/include/header.tmpl.php

index 3117247..06de42b 100644 (file)
@@ -1035,7 +1035,7 @@ initContentMenu();
                                                        $link .= '<a href="'.$_base_path.url_rewrite("mods/_core/editor/edit_content_folder.php?cid=".$content['content_id']).'" title="'.$full_title. _AT('click_edit').'">'."\n";
                                                }
                                                else {
-                                                       $link .= '<span style="cursor:pointer" onclick="javascript: toggleFolder(\''.$content['content_id'].$from.'\'); ">'."\n";
+                                                       $link .= '<span style="cursor:pointer" onclick="javascript: ATutor.course.toggleFolder(\''.$content['content_id'].$from.'\'); ">'."\n";
                                                }
                                                
                                                if ($truncate && ($strlen($content['title']) > ($base_title_length-$depth*4)) ) {
@@ -1104,20 +1104,20 @@ initContentMenu();
 
                                        if (isset($_SESSION['menu'][$content['content_id']]) && $_SESSION['menu'][$content['content_id']] == 1) {
                                                if ($on) {
-                                                       echo '<a href="javascript:void(0)" onclick="javascript: toggleFolder(\''.$content['content_id'].$from.'\'); "><img src="'.$_base_path.'images/tree/tree_collapse.gif" id="tree_icon'.$content['content_id'].$from.'" alt="'._AT('collapse').'" border="0" width="16" height="16" title="'._AT('collapse').'" class="img-size-tree" /></a>'."\n";
+                                                       echo '<a href="javascript:void(0)" onclick="javascript: ATutor.course.toggleFolder(\''.$content['content_id'].$from.'\'); "><img src="'.$_base_path.'images/tree/tree_collapse.gif" id="tree_icon'.$content['content_id'].$from.'" alt="'._AT('collapse').'" border="0" width="16" height="16" title="'._AT('collapse').'" class="img-size-tree" /></a>'."\n";
                                                        
                                                } else {
                                                        echo '<a href="'.$_my_uri.'collapse='.$content['content_id'].'">'."\n";
-                                                       echo '<img src="'.$_base_path.'images/'.$rtl.'tree/tree_collapse.gif" id="tree_icon'.$content['content_id'].$from.'" alt="'._AT('collapse').'" border="0" width="16" height="16" title="'._AT('collapse').' '.$content['title'].'" class="img-size-tree" onclick="javascript: toggleFolder(\''.$content['content_id'].$from.'\'); " />'."\n";
+                                                       echo '<img src="'.$_base_path.'images/'.$rtl.'tree/tree_collapse.gif" id="tree_icon'.$content['content_id'].$from.'" alt="'._AT('collapse').'" border="0" width="16" height="16" title="'._AT('collapse').' '.$content['title'].'" class="img-size-tree" onclick="javascript: ATutor.course.toggleFolder(\''.$content['content_id'].$from.'\'); " />'."\n";
                                                        echo '</a>'."\n";
                                                }
                                        } else {
                                                if ($on) {
-                                                       echo '<a href="javascript:void(0)" onclick="javascript: toggleFolder(\''.$content['content_id'].$from.'\'); "><img src="'.$_base_path.'images/tree/tree_collapse.gif" id="tree_icon'.$content['content_id'].$from.'" alt="'._AT('collapse').'" border="0" width="16" height="16" title="'._AT('collapse').'" class="img-size-tree" /></a>'."\n";
+                                                       echo '<a href="javascript:void(0)" onclick="javascript: ATutor.course.toggleFolder(\''.$content['content_id'].$from.'\'); "><img src="'.$_base_path.'images/tree/tree_collapse.gif" id="tree_icon'.$content['content_id'].$from.'" alt="'._AT('collapse').'" border="0" width="16" height="16" title="'._AT('collapse').'" class="img-size-tree" /></a>'."\n";
                                                        
                                                } else {
                                                        echo '<a href="'.$_my_uri.'expand='.$content['content_id'].'">'."\n";
-                                                       echo '<img src="'.$_base_path.'images/'.$rtl.'tree/tree_expand.gif" id="tree_icon'.$content['content_id'].$from.'" alt="'._AT('expand').'" border="0" width="16" height="16"    title="'._AT('expand').' '.$content['title'].'" class="img-size-tree" onclick="javascript: toggleFolder(\''.$content['content_id'].$from.'\'); " />';
+                                                       echo '<img src="'.$_base_path.'images/'.$rtl.'tree/tree_expand.gif" id="tree_icon'.$content['content_id'].$from.'" alt="'._AT('expand').'" border="0" width="16" height="16"    title="'._AT('expand').' '.$content['title'].'" class="img-size-tree" onclick="javascript: ATutor.course.toggleFolder(\''.$content['content_id'].$from.'\'); " />';
                                                        echo '</a>'."\n";
                                                }
                                        }
index 7e7ac38..63a3fee 100644 (file)
@@ -83,26 +83,6 @@ global $system_courses, $_custom_css, $_base_path;
     <style id="pref_style" type="text/css"></style> 
 </head>
 <body onload="<?php echo $this->onload; ?>">
-<script language="javascript" type="text/javascript">
-//<!--
-//toggle content folder in side menu "content navigation"
-function toggleFolder(cid)
-{
-       if (jQuery("#tree_icon"+cid).attr("src") == tree_collapse_icon) {
-               jQuery("#tree_icon"+cid).attr("src", tree_expand_icon);
-               jQuery("#tree_icon"+cid).attr("alt", "<?php echo _AT('expand'); ?>");
-               ATutor.setcookie("c<?php echo $this->course_id;?>_"+cid, null, 1);
-       }
-       else {
-               jQuery("#tree_icon"+cid).attr("src", tree_collapse_icon);
-               jQuery("#tree_icon"+cid).attr("alt", "<?php echo _AT('collapse'); ?>");
-               ATutor.setcookie("c<?php echo $this->course_id;?>_"+cid, "1", 1);
-       }
-       
-       jQuery("#folder"+cid).slideToggle();
-};
-//-->
-</script>
 <!-- section title -->
 <div><a href="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES); ?>#content" accesskey="c"><img src="<?php echo $this->base_path; ?>images/clr.gif" height="1" width="1" border="0" alt="<?php echo _AT('goto_content'); ?> ALT+c" /></a>               <a href="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES); ?>#menu"  accesskey="m"><img src="<?php echo $this->base_path; ?>images/clr.gif" height="1" width="1" border="0" alt="<?php echo _AT('goto_menu'); ?> ALT+m" /></a><h1 id="section-title"><?php echo $this->section_title; ?><?php if (($this->course_id > 0) && ($_SESSION['enroll'] == AT_ENROLL_NO)) : ?>
                - <small><a href="<?php echo $this->base_path; ?>enroll.php?course=<?php echo $this->course_id; ?>"><?php echo _AT('enroll_me'); ?></a></small>
index 8ef7bea..dc2598b 100644 (file)
@@ -85,28 +85,6 @@ global $system_courses, $_custom_css, $db;
     <style id="pref_style" type="text/css"></style> 
 </head>
 <body onload="<?php echo $this->onload; ?>">
-<script language="javascript" type="text/javascript">
-//<!--
-// toggle open/close content folder in side menu "content navigation"
-function toggleFolder(cid)
-{
-       if (jQuery("#tree_icon"+cid).attr("src") == tree_collapse_icon) {
-               jQuery("#tree_icon"+cid).attr("src", tree_expand_icon);
-               jQuery("#tree_icon"+cid).attr("alt", "<?php echo _AT('expand'); ?>");
-               jQuery("#tree_icon"+cid).attr("title", "<?php echo _AT('expand'); ?>");
-               ATutor.setcookie("c<?php echo $this->course_id;?>_"+cid, null, 1);
-       }
-       else {
-               jQuery("#tree_icon"+cid).attr("src", tree_collapse_icon);
-               jQuery("#tree_icon"+cid).attr("alt", "<?php echo _AT('collapse'); ?>");
-               jQuery("#tree_icon"+cid).attr("title", "<?php echo _AT('collapse'); ?>");
-               ATutor.setcookie("c<?php echo $this->course_id;?>_"+cid, "1", 1);
-       }
-       
-       jQuery("#folder"+cid).slideToggle();
-}
-//-->
-</script>
 <div class="page_wrapper">
 <div id="header">
        <a href="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES); ?>#content" accesskey="c">
index 3f390e7..36c4328 100644 (file)
@@ -37,27 +37,6 @@ global $system_courses, $_custom_css, $_base_path;
     <style id="pref_style" type="text/css"></style> 
 </head>
 <body onload="<?php echo $this->onload; ?>">
-<script language="javascript" type="text/javascript">
-//<!--
-//toggle content folder in side menu "content navigation"
-function toggleFolder(cid)
-{
-       if (jQuery("#tree_icon"+cid).attr("src") == tree_collapse_icon) {
-               jQuery("#tree_icon"+cid).attr("src", tree_expand_icon);
-               jQuery("#tree_icon"+cid).attr("alt", "<?php echo _AT('expand'); ?>");
-               ATutor.setcookie("c<?php echo $this->course_id;?>_"+cid, null, 1);
-       }
-       else {
-               jQuery("#tree_icon"+cid).attr("src", tree_collapse_icon);
-               jQuery("#tree_icon"+cid).attr("alt", "<?php echo _AT('collapse'); ?>");
-               ATutor.setcookie("c<?php echo $this->course_id;?>_"+cid, "1", 1);
-       }
-       
-       jQuery("#folder"+cid).slideToggle();
-}
-
-</script>
-
 <div id="member-links" style="float: right;">
        <!-- hidden direct link to content -->
        <a href="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES); ?>#content" style="border: 0px;" accesskey="c"><img src="<?php echo $this->base_path; ?>images/clr.gif" height="1" width="1" border="0" alt="<?php echo _AT('goto_content'); ?> ALT+c" /></a>
index 6333d8f..e22b8d4 100644 (file)
@@ -110,22 +110,6 @@ jQuery(document).ready(function () {
        });
 });
 
-//toggle content folder in side menu "content navigation"
-function toggleFolder(cid)
-{
-       if (jQuery("#tree_icon"+cid).attr("src") == tree_collapse_icon) {
-               jQuery("#tree_icon"+cid).attr("src", tree_expand_icon);
-               jQuery("#tree_icon"+cid).attr("alt", "<?php echo _AT('expand'); ?>");
-               ATutor.setcookie("c<?php echo $this->course_id;?>_"+cid, null, 1);
-       }
-       else {
-               jQuery("#tree_icon"+cid).attr("src", tree_collapse_icon);
-               jQuery("#tree_icon"+cid).attr("alt", "<?php echo _AT('collapse'); ?>");
-               ATutor.setcookie("c<?php echo $this->course_id;?>_"+cid, "1", 1);
-       }
-       
-       jQuery("#folder"+cid).slideToggle();
-}
 //-->
 </script>
 
index 3bffc4c..2119c65 100644 (file)
@@ -83,26 +83,6 @@ global $system_courses, $_custom_css, $_base_path;
     <style id="pref_style" type="text/css"></style> 
 </head>
 <body onload="<?php echo $this->onload; ?>">
-<script language="javascript" type="text/javascript">
-//<!--
-//toggle content folder in side menu "content navigation"
-function toggleFolder(cid)
-{
-       if (jQuery("#tree_icon"+cid).attr("src") == tree_collapse_icon) {
-               jQuery("#tree_icon"+cid).attr("src", tree_expand_icon);
-               jQuery("#tree_icon"+cid).attr("alt", "<?php echo _AT('expand'); ?>");
-               ATutor.setcookie("c<?php echo $this->course_id;?>_"+cid, null, 1);
-       }
-       else {
-               jQuery("#tree_icon"+cid).attr("src", tree_collapse_icon);
-               jQuery("#tree_icon"+cid).attr("alt", "<?php echo _AT('collapse'); ?>");
-               ATutor.setcookie("c<?php echo $this->course_id;?>_"+cid, "1", 1);
-       }
-       
-       jQuery("#folder"+cid).slideToggle();
-}
-//-->
-</script>
 <!-- section title -->
 <div><a href="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES); ?>#content" accesskey="c"><img src="<?php echo $this->base_path; ?>images/clr.gif" height="1" width="1" border="0" alt="<?php echo _AT('goto_content'); ?> ALT+c" /></a>               <a href="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES); ?>#menu"  accesskey="m"><img src="<?php echo $this->base_path; ?>images/clr.gif" height="1" width="1" border="0" alt="<?php echo _AT('goto_menu'); ?> ALT+m" /></a><h1 id="section-title"><?php echo $this->section_title; ?><?php if (($this->course_id > 0) && ($_SESSION['enroll'] == AT_ENROLL_NO)) : ?>
                - <small><a href="<?php echo $this->base_path; ?>enroll.php?course=<?php echo $this->course_id; ?>"><?php echo _AT('enroll_me'); ?></a></small>
index cb67b63..f37ac44 100644 (file)
@@ -95,26 +95,6 @@ jQuery('#content_link').click(function(e) {
     <style id="pref_style" type="text/css"></style> 
 </head>
 <body onload="<?php echo $this->onload; ?>">
-<script language="javascript" type="text/javascript">
-//<!--
-// toggle content folder in side menu "content navigation"
-function toggleFolder(cid)
-{
-       if (jQuery("#tree_icon"+cid).attr("src") == tree_collapse_icon) {
-               jQuery("#tree_icon"+cid).attr("src", tree_expand_icon);
-               jQuery("#tree_icon"+cid).attr("alt", "<?php echo _AT('expand'); ?>");
-               ATutor.setcookie("c<?php echo $this->course_id;?>_"+cid, null, 1);
-       }
-       else {
-               jQuery("#tree_icon"+cid).attr("src", tree_collapse_icon);
-               jQuery("#tree_icon"+cid).attr("alt", "<?php echo _AT('collapse'); ?>");
-               ATutor.setcookie("c<?php echo $this->course_id;?>_"+cid, "1", 1);
-       }
-       
-       jQuery("#folder"+cid).slideToggle();
-}
-//-->
-</script>
 <div class="page_wrapper">
 <div id="header">
        <a href="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES); ?>#content" accesskey="c">