Projet

Général

Profil

Révision 6eb8d15f

Ajouté par Assos Assos il y a presque 10 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/imce/js/imce_extras.js
180 180
//get&set area dimensions of the last session from the cookie
181 181
imce.recallDimensions = function() {
182 182
  var $body = $(document.body);
183
  if (!$body.is('.imce')) return;
183
  if (!$body.hasClass('imce')) return;
184 184
  //row heights
185 185
  imce.recallHeights(imce.cookie('imcebwh') * 1);
186 186
  $(window).resize(function(){imce.recallHeights()});
......
214 214
//cookie get & set
215 215
imce.cookie = function (name, value) {
216 216
  if (typeof(value) == 'undefined') {//get
217
    return unescape((document.cookie.match(new RegExp('(^|;) *'+ name +'=([^;]*)(;|$)')) || ['', '', ''])[2]);
217
    return document.cookie ? imce.decode((document.cookie.match(new RegExp('(?:^|;) *' + name + '=([^;]*)(?:;|$)')) || ['', ''])[1].replace(/\+/g, '%20')) : '';
218 218
  }
219
  document.cookie = name +'='+ escape(value) +'; expires='+ (new Date(new Date() * 1 + 15 * 86400000)).toGMTString() +'; path=' + Drupal.settings.basePath + 'imce';//set
219
  document.cookie = name +'='+ encodeURIComponent(value) +'; expires='+ (new Date(new Date() * 1 + 15 * 86400000)).toUTCString() +'; path=' + Drupal.settings.basePath + 'imce';//set
220 220
};
221 221

  
222 222
//view thumbnails(smaller than tMaxW x tMaxH) inside the rows.

Formats disponibles : Unified diff