Projet

Général

Profil

Révision 2e0f6994

Ajouté par Assos Assos il y a environ 4 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/ckeditor/includes/jqueryUI/sort.js
76 76
        jQuery("li.sortableItem").mouseout(function(){
77 77
            jQuery(".sortableList").sortable("enable");
78 78
        });
79
    }
79
    };
80 80

  
81 81
    Drupal.ckeditorToolbarReload = function() {
82 82
        jQuery(".sortableList").sortable('destroy');
83 83
        jQuery(".sortableRow").sortable('destroy');
84 84
        jQuery("li.sortableItem").unbind();
85 85
        Drupal.ckeditorToolbaInit();
86
    }
86
    };
87 87

  
88 88
    Drupal.ckeditorToolbarUsedRender = function() {
89 89
        var toolbar = jQuery('#edit-toolbar').val();
90
        toolbar = eval(toolbar);
90
        toolbar = Drupal.ckeditorToolbarToArray(toolbar);
91 91
        var html = '<div class="sortableListDiv"><span class="sortableListSpan"><ul class="sortableRow">';
92 92
        var group = false;
93 93

  
......
115 115
        }
116 116
        html += '</ul></span></div>';
117 117
        jQuery('#groupLayout').empty().append(html);
118
    }
118
    };
119 119

  
120 120
    Drupal.ckeditorToolbarAllRender = function() {
121 121
        var toolbarUsed = jQuery('#edit-toolbar').val();
122 122
        var toolbarAll = Drupal.settings.cke_toolbar_buttons_all;
123 123

  
124
        var htmlArray = new Array();
124
        var htmlArray = [];
125 125
        var html = '';
126 126

  
127 127
        for (var i in toolbarAll) {
......
144 144
            html += '<div class="sortableListDiv"><span class="sortableListSpan"><ul class="sortableRow">' + htmlArray[j] + '</ul></span></div>';
145 145
        }
146 146
        jQuery('#allButtons').empty().append(html);
147
    };
148

  
149
    if (typeof(Drupal.ckeditorToolbarToArray) == 'undefined') {
150
        Drupal.ckeditorToolbarToArray = function (toolbar) {
151
            toolbar = toolbar.replace(/\r?\n|\r/gmi, '')
152
                .replace(/\s/gmi, '')
153
                .replace(/([a-zA-Z0-9]+?):/g, '"$1":')
154
                .replace(/'/g, '"');
155

  
156
            return JSON.parse(toolbar);
157
        };
147 158
    }
148 159

  
149 160
    Drupal.ckeditorToolbaInit();

Formats disponibles : Unified diff