[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/modules/pathauto/ -> pathauto.js (source)

   1  if (Drupal.jsEnabled) {
   2    $(document).ready(function() {
   3      if ($("#edit-pathauto-perform-alias").size() && $("#edit-pathauto-perform-alias").attr("checked")) {
   4        // Disable input and hide its description.
   5        $("#edit-path").attr("disabled","disabled");
   6        $("#edit-path-wrapper > div.description").hide(0);
   7      }
   8      $("#edit-pathauto-perform-alias").bind("click", function() {
   9        if ($("#edit-pathauto-perform-alias").attr("checked")) {
  10          // Auto-alias checked; disable input.
  11          $("#edit-path").attr("disabled","disabled");
  12          $("#edit-path-wrapper > div[class=description]").slideUp('fast');
  13        }
  14        else {
  15          // Auto-alias unchecked; enable input.
  16          $("#edit-path").removeAttr("disabled");
  17          $("#edit-path")[0].focus();
  18          $("#edit-path-wrapper > div[class=description]").slideDown('fast');
  19        }
  20      });
  21    });
  22  
  23    Drupal.verticalTabs = Drupal.verticalTabs || {};
  24  
  25    Drupal.verticalTabs.path = function() {
  26      var path = $('#edit-path').val();
  27      var automatic = $('#edit-pathauto-perform-alias').attr('checked');
  28  
  29      if (automatic) {
  30        return Drupal.t('Automatic alias');
  31      }
  32      if (path) {
  33        return Drupal.t('Alias: @alias', { '@alias': path });
  34      }
  35      else {
  36        return Drupal.t('No alias');
  37      }
  38    }
  39  }


Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7