You are here

function services_admin_js in Services 5

Same name and namespace in other branches
  1. 6 services_admin_browse.inc \services_admin_js()

UI enhancement for services page

1 string reference to 'services_admin_js'
services_admin_settings in ./services.module

File

./services.module, line 237
The module which provides the core code for drupal services

Code

function services_admin_js($form_id, $form) {
  $out = <<<EOJS
  \$(document).ready(function() {
    \$("#services-key-expiry")[\$("#edit-services-use-key").attr('checked') ? 'show' : 'hide']();
    \$("#edit-services-use-key").click(function() {
      \$("#services-key-expiry")[\$(this).attr('checked') ? 'show' : 'hide']();
   });
  });
EOJS;
  drupal_add_js($out, 'inline', 'footer');
}