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

« back to all changes in this revision

Viewing changes to lib/yui/build/moodle-core-blocks/moodle-core-blocks.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:
63
63
 
64
64
        // See if we are missing either of block regions,
65
65
        // if yes we need to add an empty one to use as target
66
 
        if (blockregionlist.size() != this.get('regions').length) {
 
66
        if (blockregionlist.size() !== this.get('regions').length) {
67
67
            var blockregion = Y.Node.create('<div></div>')
68
68
                .addClass(CSS.BLOCKREGION);
69
69
            var regioncontent = Y.Node.create('<div></div>')
90
90
            // Setting blockregion as droptarget (the case when it is empty)
91
91
            // The region-post (the right one)
92
92
            // is very narrow, so add extra padding on the left to drop block on it.
93
 
            var tar = new Y.DD.Drop({
 
93
            new Y.DD.Drop({
94
94
                node: blockregionnode.one('div.'+CSS.REGIONCONTENT),
95
95
                groups: this.groups,
96
96
                padding: '40 240 40 240'
199
199
        // Moving from empty region-content towards the opposite one,
200
200
        // hide empty one (only for region-pre, region-post areas at the moment).
201
201
        regionname = this.get_region_id(drop.ancestor('div.'+CSS.BLOCKREGION));
202
 
        if (this.dragsourceregion.all('.'+CSS.BLOCK).size() == 0 && this.dragsourceregion.get('id').match(/(region-pre|region-post)/i)) {
 
202
        if (this.dragsourceregion.all('.'+CSS.BLOCK).size() === 0 && this.dragsourceregion.get('id').match(/(region-pre|region-post)/i)) {
203
203
            if (!documentbody.hasClass('side-'+regionname+'-only')) {
204
204
                documentbody.addClass('side-'+regionname+'-only');
205
205
            }
379
379
M.core_blocks = M.core_blocks || {};
380
380
M.core_blocks.init_dragdrop = function(params) {
381
381
    M.core.blockdraganddrop.init(params);
382
 
};/**
 
382
};
 
383
/**
383
384
 * This file contains the drag and drop manager class.
384
385
 *
385
386
 * Provides drag and drop functionality for blocks.
796
797
    initializer : function() {
797
798
        var node = this.get('node');
798
799
        if (!node) {
799
 
            this.create_and_add_node();
 
800
            node = this.create_and_add_node();
800
801
        }
801
802
        var body = Y.one('body'),
802
803
            hasblocks = node.all('.'+CSS.BLOCK).size() > 0,
812
813
     * Creates a generic block region node and adds it to the DOM at the best guess location.
813
814
     * Any calling of this method is an unfortunate circumstance.
814
815
     * @method create_and_add_node
 
816
     * @return Node The newly created Node
815
817
     */
816
818
    create_and_add_node : function() {
817
819
        var c = Y.Node.create,
854
856
            Y.one('body').append(node);
855
857
        }
856
858
        this.set('node', node);
 
859
 
 
860
        return node;
857
861
    },
858
862
 
859
863
    /**
984
988
    }
985
989
});
986
990
 
 
991
 
987
992
}, '@VERSION@', {
988
993
    "requires": [
989
994
        "base",