You are here

function _uc_file_download_table_behavior in Ubercart 7.3

Same name and namespace in other branches
  1. 6.2 uc_file/uc_file.module \_uc_file_download_table_behavior()

Attaches jQuery behaviors to the file download modification table.

1 call to _uc_file_download_table_behavior()
uc_file_user_form in uc_file/uc_file.module
Form builder for per-user file download administration.

File

uc_file/uc_file.module, line 382
Allows products to be associated with downloadable files.

Code

function _uc_file_download_table_behavior($id, $fid) {
  drupal_add_js("\nDrupal.behaviors.ucUserAccountFileDownload" . $id . " = {\n  attach: function(context) {\n    jQuery('#edit-file-download-" . $fid . "-time-granularity:not(.ucUserAccountFileDownload-processed)', context).addClass('ucUserAccountFileDownload-processed').change(\n      function() {\n        _uc_file_expiration_disable_check('#edit-file-download-" . $fid . "-time-granularity', '#edit-file-download-" . $fid . "-time-quantity');\n        _uc_file_expiration_disable_check('#edit-file-download-" . $fid . "-time-granularity', '#edit-file-download-" . $fid . "-time-polarity');\n      }\n    );\n  }\n}", 'inline');
}