Projet

Général

Profil

Révision 5d12d676

Ajouté par Assos Assos il y a environ 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/views/js/views-admin.js
187 187
  else {
188 188
    var length = this.checkedItems.length;
189 189
    var position = jQuery.inArray(label, this.checkedItems);
190
    // Delete the item from the list and take sure that the list doesn't have undefined items left.
190
    // Delete the item from the list and take sure that the list doesn't have
191
    // undefined items left.
191 192
    for (var i = 0; i < this.checkedItems.length; i++) {
192 193
      if (i == position) {
193 194
        this.checkedItems.splice(i, 1);
......
245 246
  });
246 247
  $addDisplayDropdown.appendTo($menu);
247 248

  
248
  // Add the click handler for the add display button
249
  // Add the click handler for the add display button.
249 250
  $('li.add > a', $menu).bind('click', function (event) {
250 251
    event.preventDefault();
251 252
    var $trigger = $(this);
......
668 669

  
669 670
    // Make sure the "group" dropdown is properly updated when rows are dragged
670 671
    // into an empty filter group. This is borrowed heavily from the block.js
671
    // implementation of tableDrag.onDrop().
672
    // Implements tableDrag.onDrop().
672 673
    var groupRow = $(this.rowObject.element).prevAll('tr.group-message').get(0);
673 674
    var groupName = groupRow.className.replace(/([^ ]+[ ]+)*group-([^ ]+)-message([ ]+[^ ]+)*/, '$2');
674 675
    var groupField = $('select.views-group-select', this.rowObject.element);
......
769 770
  $('#views-ui-config-item-form div.form-item-options-value-all', context).once(function() {
770 771
    $(this).show();
771 772
  })
772
  .find('input[type=checkbox]')
773
  .click(function() {
774
    var checked = $(this).is(':checked');
775
    // Update all checkbox beside the select all checkbox.
776
    $(this).parents('.form-checkboxes').find('input[type=checkbox]').each(function() {
777
      $(this).attr('checked', checked);
773
    .find('input[type=checkbox]')
774
    .click(function() {
775
      var checked = $(this).is(':checked');
776
      // Update all checkbox beside the select all checkbox.
777
      $(this).parents('.form-checkboxes').find('input[type=checkbox]').each(function() {
778
        $(this).attr('checked', checked);
779
      });
778 780
    });
779
  });
780 781
  // Uncheck the select all checkbox if any of the others are unchecked.
781 782
  $('#views-ui-config-item-form div.form-type-checkbox').not($('.form-item-options-value-all')).find('input[type=checkbox]').each(function() {
782 783
    $(this).click(function() {
......
926 927
        $submit.val(Drupal.t('Apply (this display)'));
927 928
      }
928 929
    })
929
    .trigger('change');
930
      .trigger('change');
930 931
  });
931 932

  
932 933
};
......
935 936
  var $ = jQuery;
936 937
  var $modal = $('.views-ui-dialog');
937 938
  var $scroll = $('.scroll', $modal);
938
  if ($modal.size() == 0 || $modal.css('display') == 'none') {
939
  if ($modal.length == 0 || $modal.css('display') == 'none') {
939 940
    return;
940 941
  }
941 942

  
942
  var maxWidth = parseInt($(window).width() * .85); // 70% of window
943
  var minWidth = parseInt($(window).width() * .6); // 70% of window
944

  
943
  var maxWidth = parseInt($(window).width() * .85);
944
  // 70% of window.
945
  var minWidth = parseInt($(window).width() * .6);
946
  // 70% of window.
945 947
  // Set the modal to the minwidth so that our width calculation of
946 948
  // children works.
947 949
  $modal.css('width', minWidth);
......
976 978

  
977 979
  // Now, calculate what the difference between the scroll and the modal
978 980
  // will be.
979

  
980 981
  var difference = 0;
981 982
  difference += parseInt($scroll.css('padding-top'));
982 983
  difference += parseInt($scroll.css('padding-bottom'));
......
1001 1002
    width = maxWidth;
1002 1003
  }
1003 1004

  
1004
  // Get where we should move content to
1005
  // Get where we should move content to.
1005 1006
  var top = ($(window).height() / 2) - (height / 2);
1006 1007
  var left = ($(window).width() / 2) - (width / 2);
1007 1008

  

Formats disponibles : Unified diff