[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/modules/vertical_tabs/core/ -> node.js (source)

   1  // $Id: node.js,v 1.1.2.1 2009/12/09 01:08:39 davereid Exp $
   2  
   3  Drupal.verticalTabs = Drupal.verticalTabs || {};
   4  
   5  Drupal.verticalTabs.revision_information = function() {
   6    if ($('#edit-revision').length) {
   7      if ($('#edit-revision').attr('checked')) {
   8        return Drupal.t('New revision');
   9      }
  10      else {
  11        return Drupal.t('No revision');
  12      }
  13    }
  14    else {
  15      return '';
  16    }
  17  }
  18  
  19  Drupal.verticalTabs.author = function() {
  20    var author = $('#edit-name').val() || Drupal.t('Anonymous');
  21    var date = $('#edit-date').val();
  22    if (date) {
  23      return Drupal.t('By @name on @date', { '@name': author, '@date': date });
  24    }
  25    else {
  26      return Drupal.t('By @name', { '@name': author });
  27    }
  28  }
  29  
  30  Drupal.verticalTabs.options = function() {
  31    var vals = [];
  32    if ($('#edit-status').attr('checked')) {
  33      vals.push(Drupal.t('Published'));
  34    }
  35    else {
  36      vals.push(Drupal.t('Not published'));
  37    }
  38    if ($('#edit-promote').attr('checked')) {
  39      vals.push(Drupal.t('Promoted to front page'));
  40    }
  41    if ($('#edit-sticky').attr('checked')) {
  42      vals.push(Drupal.t('Sticky on top of lists'));
  43    }
  44    if (vals.join(', ') == '') {
  45      return Drupal.t('None');
  46    }
  47    return vals.join(', ');
  48  }


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