/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk

« back to all changes in this revision

Viewing changes to codeigniter/js/bannermenu.js

  • Committer: elof.bigestans at gmail
  • Date: 2013-05-24 14:10:14 UTC
  • mfrom: (102 lenasys_b)
  • mto: This revision was merged to the branch mainline in revision 107.
  • Revision ID: elof.bigestans@gmail.com-20130524141014-8pni44bog1rf5ijp
Merged from trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* TODO: cHANGE THIS FILE ENTIRELY!!! CHANGE CALLED ID'S AND CLASSES */
2
2
 
3
 
/* TODO: Do I need these? */
4
 
/* Global variables */
5
 
var popoutMenu=0;
6
 
var expandedCourses=0;
7
 
 
8
3
/* Functions that run when the page loads */
9
4
$(document).ready(function() {
 
5
 
10
6
        /* Secures that the dropdownmenus are not shown on pageload */
 
7
        $('#bannerContentExample').hide();
11
8
        $('#dropdownCodeviewerMenu').hide();
12
 
        $('#dropdownUserMenu').show();
13
 
 
 
9
        $('#dropdownUserMenu').hide();
 
10
        $('#popup').hide();
 
11
 
 
12
        /* TODO: ??? */
 
13
        $('#bannerUserMenuButton').click(function(e){
 
14
                $('#popup').load('ajax/popup/loginForm #loginForm');
 
15
                $('#popup').show();
 
16
                
 
17
 
 
18
                /*var target = $('#loginPopup');
 
19
                if(target.is(":hidden")){
 
20
                        target.fadeIn(300);
 
21
                        $('#username').focus();
 
22
                        e.stopPropagation();
 
23
                }
 
24
                else{
 
25
                        // make not visible
 
26
                        // remove from DOM
 
27
                        target.fadeOut(300);
 
28
                }*/
 
29
                
 
30
        });
 
31
        
14
32
        /* Check courses in expanded menu */
15
33
        $('li.dropdownMenuCourseBlockNonActiveCourse').click(function(){
16
34
                $('li.dropdownMenuCourseBlockActiveCourse').addClass('dropdownMenuCourseBlockNonActiveCourse');
20
38
                $(this).addClass("dropdownMenuCourseBlockActiveCourse");
21
39
                /*TA BORT DEN ENA KLASSEN OCH ANVÄND TOGGLE*/
22
40
        });
23
 
 
 
41
        
 
42
        
 
43
        /* ROLLES KOD NEDAN!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
 
44
        
24
45
        /* TODO: SHOULD OPEN A POPUP VIA AJAX */
25
46
        /* Blurs body and opens password changer */
26
47
        $('li[name="changePwd"]').click(function(e){
63
84
                }
64
85
        });
65
86
        
66
 
        /* TODO: ??? */
67
 
        $('#loginLink').click(function(e){
68
 
                var target = $('#formContainer');
69
 
                if(target.is(":hidden")){
70
 
                        target.fadeIn(300);
71
 
                        $('#username').focus();
72
 
                        e.stopPropagation();
73
 
                }
74
 
                else{
75
 
                        target.fadeOut(300);
76
 
                }
77
 
                
78
 
        });
 
87
        
79
88
});
80
89
 
 
90
/* TODO: Do I need these? */
 
91
/* Global variables */
 
92
var popoutMenu=0;
 
93
var expandedCourses=0;
 
94
 
81
95
window.onkeyup = function(event){
82
96
        if(event.keyCode==27){
83
97
                $('#formContainer').fadeOut(300);