/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/codeviewer.js

  • Committer: galaxyAbstractor
  • Date: 2013-04-11 13:59:06 UTC
  • mto: (23.2.1 lenasys)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: galaxyabstractor@gmail.com-20130411135906-tohvazsxmw77otid
Removed codeigniter user guide, shouldn't be in the repo
Added and implemented CKEditor Wysiwyg editor for editing of pages
Made already uploaded code files visible as you edit a page
Implemented Adams dropdown menu in codeviewer

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
                        }
43
43
                });
44
44
        }
45
 
}
 
 
b'\\ No newline at end of file'
 
45
}
 
46
 
 
47
open = false;
 
48
function dropdown(){
 
49
    if(!open){
 
50
        $('#dropdown').show();
 
51
        open = true;
 
52
    } else {
 
53
        $('#dropdown').hide();
 
54
        open = false;
 
55
    }
 
56
}
 
57
 
 
58
$(function () {
 
59
        $('section.group div.heading').bind('click', function (e) {
 
60
                var heading1 = $(this);
 
61
                if (heading1.hasClass('open')) {
 
62
                        heading1.removeClass('open').next().animate({
 
63
                                height: 0
 
64
                        }, 200, function () {
 
65
                                heading1.css({
 
66
                                        height: "auto",
 
67
                                        overflow: "hidden"
 
68
                                });
 
69
                        });
 
70
                        if (heading1.parent().parent().hasClass('content')) {
 
71
                                heading1.parent().parent().css({
 
72
                                        height: "auto",
 
73
                                        overflow: "show"
 
74
                                });
 
75
                        }
 
76
                } else {
 
77
                        var innerHeight = 0;
 
78
                        heading1.next().children().each(function () {
 
79
                                innerHeight += this.offsetHeight;
 
80
                        });
 
81
                        heading1.addClass('open').next().animate({
 
82
                                height: innerHeight
 
83
                        }, 200);
 
84
                        if (heading1.parent().parent().hasClass('content')) {
 
85
                                heading1.parent().parent().css({
 
86
                                        height: "auto",
 
87
                                        overflow: "show"
 
88
                                });
 
89
                        }
 
90
//heading1.parent().siblings().each(function(){
 
91
// $(this).find('div.heading1.open').removeClass('open').next().animate({height:0},200)
 
92
//});
 
93
}
 
94
});
 
95
});
 
 
b'\\ No newline at end of file'