~ubuntu-branches/ubuntu/trusty/moodle/trusty

« back to all changes in this revision

Viewing changes to blocks/navigation/yui/build/moodle-block_navigation-navigation/moodle-block_navigation-navigation.js

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-01-21 13:40:52 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20140121134052-ym2qvsp2cd9vq0p6
Tags: 2.5.4-1
* New upstream release, fixing security issues:
  - MSA-14-0001 Config passwords visibility issue [CVE-2014-0008]
  - MSA-14-0002 Group constraints lacking in "login as" [CVE-2014-0009]
  - MSA-14-0003 CSRF vulnerability in profile fields [CVE-2014-0010]
* Move /var/lib/moodle directory into package.
* Revert back to bundled yui3. Unfortunately, version in Debian and
  of upstream are not compatible (closes: #735312).

Show diffs side-by-side

added added

removed removed

Lines of Context:
345
345
        // Prepare the icon, should be an object representing a pix_icon
346
346
        var branchicon = false;
347
347
        var icon = this.get('icon');
348
 
        if (icon && (!isbranch || this.get('type') == NODETYPE.ACTIVITY)) {
 
348
        if (icon && (!isbranch || this.get('type') === NODETYPE.ACTIVITY)) {
349
349
            branchicon = Y.Node.create('<img alt="" />');
350
350
            branchicon.setAttribute('src', M.util.image_url(icon.pix, icon.component));
351
351
            branchli.addClass('item_with_icon');
478
478
            if (object.children && object.children.length > 0) {
479
479
                var coursecount = 0;
480
480
                for (var i in object.children) {
481
 
                    if (typeof(object.children[i])==='object') {
482
 
                        if (object.children[i].type == NODETYPE.COURSE) {
 
481
                    if (typeof(object.children[i]) ==='object') {
 
482
                        if (object.children[i].type === NODETYPE.COURSE) {
483
483
                            coursecount++;
484
484
                        }
485
485
                        this.addChild(object.children[i]);
486
486
                    }
487
487
                }
488
 
                if ((this.get('type') == NODETYPE.CATEGORY || this.get('type') == NODETYPE.ROOTNODE || this.get('type') == NODETYPE.MYCATEGORY)
 
488
                if ((this.get('type') === NODETYPE.CATEGORY || this.get('type') === NODETYPE.ROOTNODE || this.get('type') === NODETYPE.MYCATEGORY)
489
489
                    && coursecount >= M.block_navigation.courselimit) {
490
490
                    this.addViewAllCoursesChild(this);
491
491
                }
511
511
            var count = 0, i, children = branch.get('children');
512
512
            for (i in children) {
513
513
                // Add each branch to the tree
514
 
                if (children[i].type == NODETYPE.COURSE) {
 
514
                if (children[i].type === NODETYPE.COURSE) {
515
515
                    count++;
516
516
                }
517
517
                if (typeof(children[i]) === 'object') {
518
518
                    branch.addChild(children[i]);
519
519
                }
520
520
            }
521
 
            if ((branch.get('type') == NODETYPE.CATEGORY || branch.get('type') == NODETYPE.MYCATEGORY)
 
521
            if ((branch.get('type') === NODETYPE.CATEGORY || branch.get('type') === NODETYPE.MYCATEGORY)
522
522
                && count >= M.block_navigation.courselimit) {
523
523
                this.addViewAllCoursesChild(branch);
524
524
            }
531
531
     */
532
532
    addViewAllCoursesChild: function(branch) {
533
533
        var url = null;
534
 
        if (branch.get('type') == NODETYPE.ROOTNODE) {
 
534
        if (branch.get('type') === NODETYPE.ROOTNODE) {
535
535
            if (branch.get('key') === 'mycourses') {
536
536
                url = M.cfg.wwwroot + '/my';
537
537
            } else {