/[drupal]/contributions/modules/import_html/filetype_selectors.js
ViewVC logotype

Contents of /contributions/modules/import_html/filetype_selectors.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download) (as text)
Wed Dec 10 05:52:43 2008 UTC (11 months, 2 weeks ago) by dman
Branch: MAIN
CVS Tags: DRUPAL-6--1-0, HEAD
Branch point for: DRUPAL-6--1, DRUPAL-5--2
Changes since 1.2: +1 -1 lines
File MIME type: text/javascript
Updated docs
Revised taxonomy imports
tuned the generic template to cover more test cases
1 //
2 // Add multi-select toggling for file type checkboxes
3 //
4 /*
5 DIV.tree-branch
6 DIV.tree-content
7 LABEL.file-item
8 checkbox.tree-leaf
9 LABEL.image-item
10 checkbox.tree-item
11
12 */
13
14 /**
15 * Add some checkboxes which, if clicked will toggle on or off all matching file type selectors
16 */
17
18 if (Drupal.jsEnabled) {
19 $(document).ready(function() {
20 // Add new UI boxes
21 var types = {'html-item':'Page', 'image-item':'Image', 'resource-item':'Resource', 'document-item':'Document'};
22 for(type in types){
23 $('#import-html-selectors').append("<label class='"+ type +"'><input type='checkbox' value='"+ type +"' />"+ types[type] +"</label>");
24 }
25 $('#import-html-selectors input').change(
26 function(e){
27 var checked = $(this).attr("checked");
28 $('#import-html-process-form label.'+ $(this).val() + " input" ).attr("checked", checked ? 1 : 0);
29
30 })
31 }) // ready func
32 } // JS OK

  ViewVC Help
Powered by ViewVC 1.1.2