You are here

function services_admin_js in Services 6

Same name and namespace in other branches
  1. 5 services.module \services_admin_js()

UI enhancement for services page

1 call to services_admin_js()
services_admin_settings in ./services_admin_browse.inc

File

./services_admin_browse.inc, line 295
@author Services Dev Team

Code

function services_admin_js($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');
}