/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 Code Viewer Alt/index.js

  • Committer: galaxyAbstractor
  • Date: 2013-04-04 16:19:07 UTC
  • mto: (12.2.4 lenasys) (19.1.4 lenasys)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: galaxyabstractor@gmail.com-20130404161907-eo1wnb7ac2rnizg8
Started implementation of a new codeviewer using Ace

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
var menuLeftOffset = 25;
3
3
 
4
4
$(document).ready(function() {
5
 
//      window.onresize = fixMenuLeft;
 
5
        window.onresize = fixMenuLeft;
6
6
        //$('#menu').offset({ top: menuTopOffset, left: $('#menu').offset().left });
7
7
        //window.onscroll = moveMenu;
8
 
        $('#menuHeader').click(toggleMenu);/*
9
 
        
10
 
        */
 
8
        $('#menuHeader').click(toggleMenu);
11
9
        $("a.menuLink").click(function(event) {
12
10
                event.preventDefault();
13
11
                event.stopPropagation();
14
12
                var destination = event.target.href.substring(event.target.href.lastIndexOf('/') + 1);
15
13
                scrollTo(destination);
16
14
        });
17
 
        var sidebar = $('#sidebar');
18
 
        $(window).bind('scroll', function() {
19
 
                sidebar.css("top", $(window).scrollTop());
20
 
        });
21
 
        $('.ieCSS3Fix, .group h2').each(function() {
22
 
                if(PIE.attach) {
23
 
                        PIE.attach(this);
24
 
                }
25
 
        });
26
15
});
27
16
 
28
17
function fixMenuLeft(ev) {
34
23
 
35
24
function toggleMenu(ev) {
36
25
        if($('#menu').offset().left == 0) {
37
 
                $('#menu').stop().animate({ left: -($('#menu').width()-menuLeftOffset) },{duration:900});
 
26
                $('#menu').animate({ left: -($('#menu').width()-menuLeftOffset) },{duration:900});
38
27
                $("#menuArrow").addClass("rotateArrowCW");
39
28
        } else {
40
 
                $('#menu').stop().animate({ left: 0 },{duration:900});
 
29
                $('#menu').animate({ left: 0 },{duration:900});
41
30
                $("#menuArrow").removeClass("rotateArrowCW");
42
31
        }
43
32
}