/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: a11andoh
  • Date: 2013-05-24 08:43:41 UTC
  • mfrom: (93 lenasys_b)
  • mto: This revision was merged to the branch mainline in revision 97.
  • Revision ID: a11andoh@student.his.se-20130524084341-dewc6yb1cskf4nxr
blurp

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 */
11
7
        $('#dropdownCodeviewerMenu').hide();
12
 
        $('#dropdownUserMenu').show();
 
8
        $('#dropdownUserMenu').hide();
13
9
 
14
10
        /* Check courses in expanded menu */
15
11
        $('li.dropdownMenuCourseBlockNonActiveCourse').click(function(){
20
16
                $(this).addClass("dropdownMenuCourseBlockActiveCourse");
21
17
                /*TA BORT DEN ENA KLASSEN OCH ANVĂ„ND TOGGLE*/
22
18
        });
23
 
 
 
19
        
 
20
        /* TODO: ??? */
 
21
        /*
 
22
        $('#bannerUserMenuButton').click(function(e){
 
23
                // fetch form through ajax
 
24
                // add to DOM
 
25
                // make visible
 
26
                var target = $('#loginPopup');
 
27
                if(target.is(":hidden")){
 
28
                        target.fadeIn(300);
 
29
                        $('#username').focus();
 
30
                        e.stopPropagation();
 
31
                }
 
32
                else{
 
33
                        // make not visible
 
34
                        // remove from DOM
 
35
                        target.fadeOut(300);
 
36
                }
 
37
                
 
38
        });
 
39
        */
 
40
        
 
41
        
 
42
        /* ROLLES KOD NEDAN!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
 
43
        
24
44
        /* TODO: SHOULD OPEN A POPUP VIA AJAX */
25
45
        /* Blurs body and opens password changer */
26
46
        $('li[name="changePwd"]').click(function(e){
63
83
                }
64
84
        });
65
85
        
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
 
        });
 
86
        
79
87
});
80
88
 
 
89
/* TODO: Do I need these? */
 
90
/* Global variables */
 
91
var popoutMenu=0;
 
92
var expandedCourses=0;
 
93
 
81
94
window.onkeyup = function(event){
82
95
        if(event.keyCode==27){
83
96
                $('#formContainer').fadeOut(300);