Project

General

Profile

Revision 2c8c2b87

Added by Assos Assos about 9 years ago

Weekly update of contrib modules

View differences:

drupal7/sites/all/modules/addthis/includes/addthis.admin.inc
120 120
    '#required' => FALSE,
121 121
  );
122 122

  
123
  // Excluded Services.
124
  $form['fieldset_excluded_services'] = array(
125
    '#type' => 'fieldset',
126
    '#title' => t('Excluded services'),
127
    '#description' => t('The sharing services you select here will be excluded from all AddThis menus. This applies globally.'),
128
    '#collapsible' => TRUE,
129
    '#collapsed' => TRUE,
130
  );
131
  $form['fieldset_excluded_services'][AddThis::EXCLUDED_SERVICES_KEY] = array(
132
    '#type' => 'checkboxes',
133
    '#title' => t('Excluded services'),
134
    '#options' => AddThis::getInstance()->getServices(),
135
    '#default_value' => AddThis::getInstance()->getExcludedServices(),
136
    '#required' => FALSE,
137
    '#columns' => 3,
138
  );
139

  
123 140
  // Analytics settings.
124 141
  $profile_id = AddThis::getInstance()->getProfileId();
125 142
  $can_track_clicks = empty($profile_id) ? FALSE : TRUE;
......
313 330
    '#required' => FALSE,
314 331
    '#description' => t('AddThis custom configuration code. See format at <a href="http://addthis.com/" target="_blank">AddThis.com</a>'),
315 332
  );
316
  $form['advanced_settings_fieldset'][AddThis::WIDGET_JS_LOAD_TYPE] = array(
317
    '#type' => 'select',
318
    '#title' => t('When to load the widget js.'),
319
    '#options' => array(
320
      'async' => t('When the page loads, but load assets asynchronously. (default)'),
321
      'include' => t('When the page loads.'),
322
      'domready' => t('When the DOM is ready at the script dynamicly.'),
323
    ),
324
    '#default_value' => AddThis::getInstance()->getWidgetJsLoadType(),
325
    '#required' => FALSE,
333
  $form['advanced_settings_fieldset'][AddThis::WIDGET_JS_LOAD_DOMREADY] = array(
334
    '#type' => 'checkbox',
335
    '#title' => t('Load the AddThis resources after the DOM is ready.'),
336
    '#default_value' => AddThis::getInstance()->getWidgetJsDomReady(),
337
  );
338
  $form['advanced_settings_fieldset'][AddThis::WIDGET_JS_LOAD_ASYNC] = array(
339
    '#type' => 'checkbox',
340
    '#title' => t('Initialize asynchronously through addthis.init().'),
341
    '#description' => t('Use this when you have your own Ajax functionality or create things after the DOM is ready trough Javascript. Initialize the addthis functionality through addthis.init().'),
342
    '#default_value' => AddThis::getInstance()->getWidgetJsAsync(),
343
  );
344
  $form['advanced_settings_fieldset'][AddThis::WIDGET_JS_INCLUDE] = array(
345
      '#type' => 'select',
346
      '#title' => t('Load widget js.'),
347
      '#options' => array(
348
        '0' => t('Don\'t include at all.'),
349
        '1' => t('Include on all (non admin) pages'),
350
        '2' => t('(Default) Include on widget rendering by Drupal.'),
351
      ),
352
      '#default_value' => AddThis::getInstance()->getWidgetJsInclude(),
326 353
  );
327 354
  return system_settings_form($form);
328 355
}

Also available in: Unified diff