Skip to content
Browse files

Updating pathauto, token, and ctools.

  • Loading branch information...
1 parent f80de37 commit 9636bbd3e1cfe522fe2f5b2d1537fdb7c2a85643 Alan Palazzolo committed Mar 19, 2012
Showing with 4,598 additions and 1,880 deletions.
  1. +16 −2 sites/all/modules/contrib/ctools/API.txt
  2. +333 −268 sites/all/modules/contrib/ctools/LICENSE.txt
  3. +9 −15 sites/all/modules/contrib/ctools/bulk_export/bulk_export.css
  4. +3 −3 sites/all/modules/contrib/ctools/bulk_export/bulk_export.info
  5. +29 −0 sites/all/modules/contrib/ctools/bulk_export/bulk_export.js
  6. +90 −25 sites/all/modules/contrib/ctools/bulk_export/bulk_export.module
  7. +8 −0 sites/all/modules/contrib/ctools/css/collapsible-div.css
  8. +57 −1 sites/all/modules/contrib/ctools/ctools.api.php
  9. +3 −3 sites/all/modules/contrib/ctools/ctools.info
  10. +3 −3 sites/all/modules/contrib/ctools/ctools.install
  11. +25 −1 sites/all/modules/contrib/ctools/ctools.module
  12. +3 −3 sites/all/modules/contrib/ctools/ctools_access_ruleset/ctools_access_ruleset.info
  13. +3 −3 sites/all/modules/contrib/ctools/ctools_ajax_sample/ctools_ajax_sample.info
  14. +1 −1 sites/all/modules/contrib/ctools/ctools_ajax_sample/js/ctools-ajax-sample.js
  15. +3 −3 sites/all/modules/contrib/ctools/ctools_custom_content/ctools_custom_content.info
  16. +5 −0 ...modules/contrib/ctools/ctools_custom_content/plugins/export_ui/ctools_custom_content_ui.class.php
  17. +3 −3 sites/all/modules/contrib/ctools/ctools_plugin_example/ctools_plugin_example.info
  18. +1 −1 ...ll/modules/contrib/ctools/ctools_plugin_example/plugins/content_types/no_context_content_type.inc
  19. +2 −2 ...ll/modules/contrib/ctools/ctools_plugin_example/plugins/content_types/relcontext_content_type.inc
  20. +3 −3 ...modules/contrib/ctools/ctools_plugin_example/plugins/content_types/simplecontext_content_type.inc
  21. +206 −0 sites/all/modules/contrib/ctools/drush/ctools.drush.inc
  22. +4 −5 sites/all/modules/contrib/ctools/help/about.html
  23. +1 −0 sites/all/modules/contrib/ctools/help/collapsible-div.html
  24. +4 −6 sites/all/modules/contrib/ctools/help/context-access.html
  25. +3 −8 sites/all/modules/contrib/ctools/help/context-arguments.html
  26. +43 −136 sites/all/modules/contrib/ctools/help/context-content.html
  27. +3 −2 sites/all/modules/contrib/ctools/help/context-context.html
  28. +3 −0 sites/all/modules/contrib/ctools/help/context-relationships.html
  29. +1 −0 sites/all/modules/contrib/ctools/help/css.html
  30. +1 −0 sites/all/modules/contrib/ctools/help/dependent.html
  31. +1 −0 sites/all/modules/contrib/ctools/help/dropbutton.html
  32. +1 −0 sites/all/modules/contrib/ctools/help/dropdown.html
  33. +7 −6 sites/all/modules/contrib/ctools/help/export-ui.html
  34. +42 −26 sites/all/modules/contrib/ctools/help/export.html
  35. +1 −0 sites/all/modules/contrib/ctools/help/form.html
  36. +47 −52 sites/all/modules/contrib/ctools/help/modal.html
  37. +7 −7 sites/all/modules/contrib/ctools/help/object-cache.html
  38. +9 −8 sites/all/modules/contrib/ctools/help/plugins-api.html
  39. +57 −54 sites/all/modules/contrib/ctools/help/plugins-creating.html
  40. +13 −12 sites/all/modules/contrib/ctools/help/plugins-implementing.html
  41. +3 −3 sites/all/modules/contrib/ctools/help/plugins.html
  42. +51 −31 sites/all/modules/contrib/ctools/help/wizard.html
  43. +1 −1 sites/all/modules/contrib/ctools/includes/ajax.inc
  44. +3 −3 sites/all/modules/contrib/ctools/includes/cleanstring.inc
  45. +31 −0 sites/all/modules/contrib/ctools/includes/content.inc
  46. +2 −2 sites/all/modules/contrib/ctools/includes/context-access-admin.inc
  47. +19 −5 sites/all/modules/contrib/ctools/includes/context-admin.inc
  48. +63 −39 sites/all/modules/contrib/ctools/includes/context-task-handler.inc
  49. +32 −4 sites/all/modules/contrib/ctools/includes/context.inc
  50. +1 −1 sites/all/modules/contrib/ctools/includes/css.inc
  51. +1 −0 sites/all/modules/contrib/ctools/includes/export-ui.inc
  52. +48 −8 sites/all/modules/contrib/ctools/includes/export.inc
  53. +208 −0 sites/all/modules/contrib/ctools/includes/fields.inc
  54. +7 −0 sites/all/modules/contrib/ctools/includes/jump-menu.inc
  55. +44 −0 sites/all/modules/contrib/ctools/includes/language.inc
  56. +6 −6 sites/all/modules/contrib/ctools/includes/modal.inc
  57. +14 −7 sites/all/modules/contrib/ctools/includes/plugins.inc
  58. +1 −2 sites/all/modules/contrib/ctools/includes/stylizer.inc
  59. +6 −5 sites/all/modules/contrib/ctools/includes/wizard.inc
  60. +54 −41 sites/all/modules/contrib/ctools/js/auto-submit.js
  61. +2 −0 sites/all/modules/contrib/ctools/js/collapsible-div.js
  62. +20 −0 sites/all/modules/contrib/ctools/js/modal.js
  63. +2 −3 sites/all/modules/contrib/ctools/page_manager/css/page-manager.css
  64. +4 −2 sites/all/modules/contrib/ctools/page_manager/page_manager.admin.inc
  65. +3 −3 sites/all/modules/contrib/ctools/page_manager/page_manager.info
  66. +76 −2 sites/all/modules/contrib/ctools/page_manager/page_manager.module
  67. +4 −4 sites/all/modules/contrib/ctools/page_manager/plugins/task_handlers/http_response.inc
  68. +17 −0 sites/all/modules/contrib/ctools/page_manager/plugins/tasks/blog.inc
  69. +18 −0 sites/all/modules/contrib/ctools/page_manager/plugins/tasks/blog_user.inc
  70. +17 −0 sites/all/modules/contrib/ctools/page_manager/plugins/tasks/contact_site.inc
  71. +18 −0 sites/all/modules/contrib/ctools/page_manager/plugins/tasks/contact_user.inc
  72. +18 −0 sites/all/modules/contrib/ctools/page_manager/plugins/tasks/node_edit.inc
  73. +26 −0 sites/all/modules/contrib/ctools/page_manager/plugins/tasks/node_view.inc
  74. +18 −0 sites/all/modules/contrib/ctools/page_manager/plugins/tasks/page.inc
  75. +17 −0 sites/all/modules/contrib/ctools/page_manager/plugins/tasks/poll.inc
  76. +21 −0 sites/all/modules/contrib/ctools/page_manager/plugins/tasks/search.inc
  77. +20 −0 sites/all/modules/contrib/ctools/page_manager/plugins/tasks/term_view.inc
  78. +174 −0 sites/all/modules/contrib/ctools/page_manager/plugins/tasks/user_edit.inc
  79. +18 −0 sites/all/modules/contrib/ctools/page_manager/plugins/tasks/user_view.inc
  80. +1 −1 sites/all/modules/contrib/ctools/plugins/access/context_exists.inc
  81. +15 −4 sites/all/modules/contrib/ctools/plugins/access/entity_bundle.inc
  82. +225 −0 sites/all/modules/contrib/ctools/plugins/access/entity_field_value.inc
  83. +46 −0 sites/all/modules/contrib/ctools/plugins/access/front.inc
  84. +33 −0 sites/all/modules/contrib/ctools/plugins/access/node_status.inc
  85. +20 −9 sites/all/modules/contrib/ctools/plugins/access/term_has_parent.inc
  86. +12 −2 sites/all/modules/contrib/ctools/plugins/arguments/term.inc
  87. +48 −0 sites/all/modules/contrib/ctools/plugins/arguments/user_edit.inc
  88. +1 −1 sites/all/modules/contrib/ctools/plugins/arguments/vid.inc
  89. +6 −0 sites/all/modules/contrib/ctools/plugins/cache/simple.inc
  90. +95 −20 sites/all/modules/contrib/ctools/plugins/content_types/block/block.inc
  91. +24 −12 sites/all/modules/contrib/ctools/plugins/content_types/custom/custom.inc
  92. +46 −3 sites/all/modules/contrib/ctools/plugins/content_types/entity_context/entity_field.inc
  93. +121 −0 sites/all/modules/contrib/ctools/plugins/content_types/entity_context/entity_field_extra.inc
  94. +0 −1 sites/all/modules/contrib/ctools/plugins/content_types/form/entity_form_field.inc
  95. +9 −0 sites/all/modules/contrib/ctools/plugins/content_types/form/form.inc
  96. +4 −4 sites/all/modules/contrib/ctools/plugins/content_types/node/node.inc
  97. +2 −2 sites/all/modules/contrib/ctools/plugins/content_types/node_context/node_comment_form.inc
  98. +1 −32 sites/all/modules/contrib/ctools/plugins/content_types/node_context/node_comments.inc
  99. +5 −5 sites/all/modules/contrib/ctools/plugins/content_types/node_context/node_created.inc
  100. +11 −1 sites/all/modules/contrib/ctools/plugins/content_types/node_context/node_terms.inc
  101. +6 −5 sites/all/modules/contrib/ctools/plugins/content_types/node_context/node_updated.inc
  102. +1 −1 sites/all/modules/contrib/ctools/plugins/content_types/node_form/node_form_buttons.inc
  103. +1 −1 sites/all/modules/contrib/ctools/plugins/content_types/node_form/node_form_path.inc
  104. +32 −0 sites/all/modules/contrib/ctools/plugins/content_types/page/page_actions.inc
  105. +8 −0 sites/all/modules/contrib/ctools/plugins/content_types/page/page_primary_links.inc
  106. +8 −0 sites/all/modules/contrib/ctools/plugins/content_types/page/page_secondary_links.inc
  107. +5 −0 sites/all/modules/contrib/ctools/plugins/content_types/page/page_tabs.inc
  108. +7 −0 sites/all/modules/contrib/ctools/plugins/content_types/search/search_result.inc
  109. +7 −1 sites/all/modules/contrib/ctools/plugins/content_types/user_context/user_picture.inc
  110. +25 −3 sites/all/modules/contrib/ctools/plugins/content_types/user_context/user_profile.inc
  111. +6 −2 sites/all/modules/contrib/ctools/plugins/content_types/user_context/user_signature.inc
  112. +13 −6 sites/all/modules/contrib/ctools/plugins/content_types/vocabulary_context/vocabulary_terms.inc
  113. +30 −25 sites/all/modules/contrib/ctools/plugins/contexts/entity.inc
  114. +1 −0 sites/all/modules/contrib/ctools/plugins/contexts/node.inc
  115. +3 −3 sites/all/modules/contrib/ctools/plugins/contexts/node_add_form.inc
  116. +1 −1 sites/all/modules/contrib/ctools/plugins/contexts/node_edit_form.inc
  117. +1 −1 sites/all/modules/contrib/ctools/plugins/contexts/terms.inc
  118. +188 −0 sites/all/modules/contrib/ctools/plugins/contexts/user_edit_form.inc
  119. +1 −0 sites/all/modules/contrib/ctools/plugins/contexts/vocabulary.inc
  120. +53 −16 sites/all/modules/contrib/ctools/plugins/export_ui/ctools_export_ui.class.php
  121. +84 −89 sites/all/modules/contrib/ctools/plugins/relationships/entity_from_field.inc
  122. +1 −1 sites/all/modules/contrib/ctools/plugins/relationships/term_parent.inc
  123. +7 −7 sites/all/modules/contrib/ctools/plugins/relationships/terms_from_node.inc
  124. +3 −3 sites/all/modules/contrib/ctools/stylizer/stylizer.info
  125. +3 −3 sites/all/modules/contrib/ctools/tests/ctools_plugin_test.info
  126. +10 −4 sites/all/modules/contrib/ctools/views_content/plugins/content_types/views_panes.inc
  127. +64 −36 sites/all/modules/contrib/ctools/views_content/plugins/content_types/views_row.inc
  128. +4 −0 sites/all/modules/contrib/ctools/views_content/plugins/views/views_content.views.inc
  129. +5 −2 ...odules/contrib/ctools/views_content/plugins/views/views_content_plugin_display_ctools_context.inc
  130. +6 −6 ...ll/modules/contrib/ctools/views_content/plugins/views/views_content_plugin_display_panel_pane.inc
  131. +7 −0 .../modules/contrib/ctools/views_content/plugins/views/views_content_plugin_style_ctools_context.inc
  132. +3 −3 sites/all/modules/contrib/ctools/views_content/views_content.info
  133. +333 −268 sites/all/modules/contrib/pathauto/LICENSE.txt
  134. +24 −1 sites/all/modules/contrib/pathauto/pathauto.api.php
  135. +50 −19 sites/all/modules/contrib/pathauto/pathauto.inc
  136. +3 −3 sites/all/modules/contrib/pathauto/pathauto.info
  137. +14 −8 sites/all/modules/contrib/pathauto/pathauto.module
  138. +3 −1 sites/all/modules/contrib/pathauto/pathauto.pathauto.inc
  139. +1 −0 sites/all/modules/contrib/pathauto/pathauto.test
  140. +4 −29 sites/all/modules/contrib/pathauto/pathauto.tokens.inc
  141. +333 −268 sites/all/modules/contrib/token/LICENSE.txt
  142. +3 −3 sites/all/modules/contrib/token/tests/token_test.info
  143. +3 −3 sites/all/modules/contrib/token/token.info
  144. +5 −0 sites/all/modules/contrib/token/token.install
  145. +87 −3 sites/all/modules/contrib/token/token.module
  146. +2 −2 sites/all/modules/contrib/token/token.pages.inc
  147. +155 −57 sites/all/modules/contrib/token/token.test
  148. +117 −65 sites/all/modules/contrib/token/token.tokens.inc
View
18 sites/all/modules/contrib/ctools/API.txt
@@ -1,8 +1,22 @@
-Current API Version: 2.0.1
+Current API Version: 2.0.5
Please note that the API version is an internal number and does not match release numbers. It is entirely possible that releases will not increase the API version number, and increasing this number too often would burden contrib module maintainers who need to keep up with API changes.
This file contains a log of changes to the API.
+API Version 2.0.5
+ Introduce ctools_fields_get_fields_by_type().
+ Add language.inc
+ Introduce hook_ctools_content_subtype_alter($subtype, $plugin);
+
+API Version 2.0.4
+ Introduce ctools_form_include_file()
+
+API Version 2.0.3
+ Introduce ctools_field_invoke_field() and ctools_field_invoke_field_default().
+
+API Version 2.0.2
+ Introduce ctools_export_crud_load_multiple() and 'load multiple callback' to
+ export schema.
API Version 2.0.1
Introduce ctools_export_crud_enable(), ctools_export_crud_disable() and
@@ -11,7 +25,7 @@ API Version 2.0.1
how the exportable objects are instantiated.
Introduce 'hook_ctools_math_expression_functions_alter'.
-API Version 2.0
+API Version 2.0
Remove the deprecated callback-based behavior of the 'defaults' property on
plugin types; array addition is now the only option. If you need more
complex logic, do it with the 'process' callback.
View
601 sites/all/modules/contrib/ctools/LICENSE.txt
@@ -1,274 +1,339 @@
-GNU GENERAL PUBLIC LICENSE
-
- Version 2, June 1991
-
-Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave,
-Cambridge, MA 02139, USA. Everyone is permitted to copy and distribute
-verbatim copies of this license document, but changing it is not allowed.
-
- Preamble
-
-The licenses for most software are designed to take away your freedom to
-share and change it. By contrast, the GNU General Public License is
-intended to guarantee your freedom to share and change free software--to
-make sure the software is free for all its users. This General Public License
-applies to most of the Free Software Foundation's software and to any other
-program whose authors commit to using it. (Some other Free Software
-Foundation software is covered by the GNU Library General Public License
-instead.) You can apply it to your programs, too.
-
-When we speak of free software, we are referring to freedom, not price. Our
-General Public Licenses are designed to make sure that you have the
-freedom to distribute copies of free software (and charge for this service if
-you wish), that you receive source code or can get it if you want it, that you
-can change the software or use pieces of it in new free programs; and that
-you know you can do these things.
-
-To protect your rights, we need to make restrictions that forbid anyone to
-deny you these rights or to ask you to surrender the rights. These restrictions
-translate to certain responsibilities for you if you distribute copies of the
-software, or if you modify it.
-
-For example, if you distribute copies of such a program, whether gratis or for
-a fee, you must give the recipients all the rights that you have. You must make
-sure that they, too, receive or can get the source code. And you must show
-them these terms so they know their rights.
-
-We protect your rights with two steps: (1) copyright the software, and (2)
-offer you this license which gives you legal permission to copy, distribute
-and/or modify the software.
-
-Also, for each author's protection and ours, we want to make certain that
-everyone understands that there is no warranty for this free software. If the
-software is modified by someone else and passed on, we want its recipients
-to know that what they have is not the original, so that any problems
-introduced by others will not reflect on the original authors' reputations.
-
-Finally, any free program is threatened constantly by software patents. We
-wish to avoid the danger that redistributors of a free program will individually
-obtain patent licenses, in effect making the program proprietary. To prevent
-this, we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
-The precise terms and conditions for copying, distribution and modification
-follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND
- MODIFICATION
-
-0. This License applies to any program or other work which contains a notice
-placed by the copyright holder saying it may be distributed under the terms
-of this General Public License. The "Program", below, refers to any such
-program or work, and a "work based on the Program" means either the
-Program or any derivative work under copyright law: that is to say, a work
-containing the Program or a portion of it, either verbatim or with
-modifications and/or translated into another language. (Hereinafter, translation
-is included without limitation in the term "modification".) Each licensee is
-addressed as "you".
-
-Activities other than copying, distribution and modification are not covered
-by this License; they are outside its scope. The act of running the Program is
-not restricted, and the output from the Program is covered only if its contents
-constitute a work based on the Program (independent of having been made
-by running the Program). Whether that is true depends on what the Program
-does.
-
-1. You may copy and distribute verbatim copies of the Program's source
-code as you receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice and
-disclaimer of warranty; keep intact all the notices that refer to this License
-and to the absence of any warranty; and give any other recipients of the
-Program a copy of this License along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and you
-may at your option offer warranty protection in exchange for a fee.
-
-2. You may modify your copy or copies of the Program or any portion of it,
-thus forming a work based on the Program, and copy and distribute such
-modifications or work under the terms of Section 1 above, provided that you
-also meet all of these conditions:
-
-a) You must cause the modified files to carry prominent notices stating that
-you changed the files and the date of any change.
-
-b) You must cause any work that you distribute or publish, that in whole or in
-part contains or is derived from the Program or any part thereof, to be
-licensed as a whole at no charge to all third parties under the terms of this
-License.
-
-c) If the modified program normally reads commands interactively when run,
-you must cause it, when started running for such interactive use in the most
-ordinary way, to print or display an announcement including an appropriate
-copyright notice and a notice that there is no warranty (or else, saying that
-you provide a warranty) and that users may redistribute the program under
-these conditions, and telling the user how to view a copy of this License.
-(Exception: if the Program itself is interactive but does not normally print such
-an announcement, your work based on the Program is not required to print
-an announcement.)
-
-These requirements apply to the modified work as a whole. If identifiable
-sections of that work are not derived from the Program, and can be
-reasonably considered independent and separate works in themselves, then
-this License, and its terms, do not apply to those sections when you distribute
-them as separate works. But when you distribute the same sections as part
-of a whole which is a work based on the Program, the distribution of the
-whole must be on the terms of this License, whose permissions for other
-licensees extend to the entire whole, and thus to each and every part
-regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest your rights to
-work written entirely by you; rather, the intent is to exercise the right to
-control the distribution of derivative or collective works based on the
-Program.
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of a
-storage or distribution medium does not bring the other work under the scope
-of this License.
-
-3. You may copy and distribute the Program (or a work based on it, under
-Section 2) in object code or executable form under the terms of Sections 1
-and 2 above provided that you also do one of the following:
-
-a) Accompany it with the complete corresponding machine-readable source
-code, which must be distributed under the terms of Sections 1 and 2 above
-on a medium customarily used for software interchange; or,
-
-b) Accompany it with a written offer, valid for at least three years, to give
-any third party, for a charge no more than your cost of physically performing
-source distribution, a complete machine-readable copy of the corresponding
-source code, to be distributed under the terms of Sections 1 and 2 above on
-a medium customarily used for software interchange; or,
-
-c) Accompany it with the information you received as to the offer to distribute
-corresponding source code. (This alternative is allowed only for
-noncommercial distribution and only if you received the program in object
-code or executable form with such an offer, in accord with Subsection b
-above.)
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source code
-means all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation and
-installation of the executable. However, as a special exception, the source
-code distributed need not include anything that is normally distributed (in
-either source or binary form) with the major components (compiler, kernel,
-and so on) of the operating system on which the executable runs, unless that
-component itself accompanies the executable.
-
-If distribution of executable or object code is made by offering access to
-copy from a designated place, then offering equivalent access to copy the
-source code from the same place counts as distribution of the source code,
-even though third parties are not compelled to copy the source along with the
-object code.
-
-4. You may not copy, modify, sublicense, or distribute the Program except as
-expressly provided under this License. Any attempt otherwise to copy,
-modify, sublicense or distribute the Program is void, and will automatically
-terminate your rights under this License. However, parties who have received
-copies, or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-5. You are not required to accept this License, since you have not signed it.
-However, nothing else grants you permission to modify or distribute the
-Program or its derivative works. These actions are prohibited by law if you
-do not accept this License. Therefore, by modifying or distributing the
-Program (or any work based on the Program), you indicate your acceptance
-of this License to do so, and all its terms and conditions for copying,
-distributing or modifying the Program or works based on it.
-
-6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the original
-licensor to copy, distribute or modify the Program subject to these terms and
-conditions. You may not impose any further restrictions on the recipients'
-exercise of the rights granted herein. You are not responsible for enforcing
-compliance by third parties to this License.
-
-7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues), conditions
-are imposed on you (whether by court order, agreement or otherwise) that
-contradict the conditions of this License, they do not excuse you from the
-conditions of this License. If you cannot distribute so as to satisfy
-simultaneously your obligations under this License and any other pertinent
-obligations, then as a consequence you may not distribute the Program at all.
-For example, if a patent license would not permit royalty-free redistribution
-of the Program by all those who receive copies directly or indirectly through
-you, then the only way you could satisfy both it and this License would be to
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply and
-the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents or
-other property right claims or to contest validity of any such claims; this
-section has the sole purpose of protecting the integrity of the free software
-distribution system, which is implemented by public license practices. Many
-people have made generous contributions to the wide range of software
-distributed through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing to
-distribute software through any other system and a licensee cannot impose
-that choice.
-
-This section is intended to make thoroughly clear what is believed to be a
-consequence of the rest of this License.
-
-8. If the distribution and/or use of the Program is restricted in certain
-countries either by patents or by copyrighted interfaces, the original copyright
-holder who places the Program under this License may add an explicit
-geographical distribution limitation excluding those countries, so that
-distribution is permitted only in or among countries not thus excluded. In such
-case, this License incorporates the limitation as if written in the body of this
-License.
-
-9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will be
-similar in spirit to the present version, but may differ in detail to address new
-problems or concerns.
-
-Each version is given a distinguishing version number. If the Program specifies
-a version number of this License which applies to it and "any later version",
-you have the option of following the terms and conditions either of that
-version or of any later version published by the Free Software Foundation. If
-the Program does not specify a version number of this License, you may
-choose any version ever published by the Free Software Foundation.
-
-10. If you wish to incorporate parts of the Program into other free programs
-whose distribution conditions are different, write to the author to ask for
-permission. For software which is copyrighted by the Free Software
-Foundation, write to the Free Software Foundation; we sometimes make
-exceptions for this. Our decision will be guided by the two goals of
-preserving the free status of all derivatives of our free software and of
-promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
-11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE,
-THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT
-PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
-STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
-WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
-NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR
-AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR
-ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
-LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
-SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
-ARISING OUT OF THE USE OR INABILITY TO USE THE
-PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA
-OR DATA BEING RENDERED INACCURATE OR LOSSES
-SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
-PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN
-IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
View
24 sites/all/modules/contrib/ctools/bulk_export/bulk_export.css
@@ -1,24 +1,18 @@
-
-div.export-container {
+.export-container {
width: 48%;
float: left;
- padding: .5em;
+ padding: 5px 1% 0;
}
-
-div.export-container table {
+.export-container table {
width: 100%;
}
-
-div.export-container table input,
-div.export-container table th,
-div.export-container table td {
- padding: 0 0 2px .5em;
+.export-container table input,
+.export-container table th,
+.export-container table td {
+ padding: 0 0 .2em .5em;
margin: 0;
- border-right: none;
- border-left: none;
- vertical-align: center;
+ vertical-align: middle;
}
-
-div.export-container .select-all {
+.export-container .select-all {
width: 1.5em;
}
View
6 sites/all/modules/contrib/ctools/bulk_export/bulk_export.info
@@ -4,9 +4,9 @@ core = 7.x
dependencies[] = ctools
package = Chaos tool suite
-; Information added by drupal.org packaging script on 2011-07-28
-version = "7.x-1.0-rc1"
+; Information added by drupal.org packaging script on 2012-03-17
+version = "7.x-1.0-rc2"
core = "7.x"
project = "ctools"
-datestamp = "1311894415"
+datestamp = "1332017742"
View
29 sites/all/modules/contrib/ctools/bulk_export/bulk_export.js
@@ -0,0 +1,29 @@
+
+/**
+ * @file
+ * CTools Bulk Export javascript functions.
+ */
+
+(function ($) {
+
+Drupal.behaviors.CToolsBulkExport = {
+ attach: function (context) {
+
+ $('#bulk-export-export-form .vertical-tabs-pane', context).drupalSetSummary(function (context) {
+
+ // Check if any individual checkbox is checked.
+ if ($('.bulk-selection input:checked', context).length > 0) {
+ return Drupal.t('Exportables selected');
+ }
+
+ return '';
+ });
+
+ // Special bind click on the select-all checkbox.
+ $('.select-all').bind('click', function(context) {
+ $(this, '.vertical-tabs-pane').drupalSetSummary(context);
+ });
+ }
+};
+
+})(jQuery);
View
115 sites/all/modules/contrib/ctools/bulk_export/bulk_export.module
@@ -37,8 +37,13 @@ function bulk_export_menu() {
/**
* FAPI gateway to the bulk exporter.
+ *
+ * @param $cli
+ * Whether this function is called from command line.
+ * @param $options
+ * A collection of options, only passed in by drush_ctools_export().
*/
-function bulk_export_export() {
+function bulk_export_export($cli = FALSE, $options = array()) {
ctools_include('export');
$schemas = ctools_export_get_schemas(TRUE);
$exportables = $export_tables = array();
@@ -59,14 +64,38 @@ function bulk_export_export() {
'no_redirect' => TRUE,
'exportables' => $exportables,
'export_tables' => $export_tables,
+ 'name' => '',
+ 'code' => '',
);
- $output = drupal_build_form('bulk_export_export_form', $form_state);
- if (!empty($form_state['submitted'])) {
+
+ // If called from drush_ctools_export, get the module name and
+ // select all exportables and call the submit function directly.
+ if ($cli) {
+ $module_name = $options['name'];
+ $form_state['values']['name'] = $module_name;
+ $form_state['values']['tables'] = array();
+ foreach ($exportables as $table => $names) {
+ if (!empty($names)) {
+ $form_state['values']['tables'][] = $table;
+ $form_state['values'][$table] = array();
+ foreach ($names as $name => $title) {
+ $form_state['values'][$table][$name] = $name;
+ }
+ }
+ }
+ $output = bulk_export_export_form_submit($form, $form_state);
+ }
+ else {
+ $output = drupal_build_form('bulk_export_export_form', $form_state);
+ $module_name = $form_state['module'];
+ }
+
+ if (!empty($form_state['submitted']) || $cli) {
drupal_set_title(t('Bulk export results'));
$output = '';
$module_code = '';
$api_code = array();
- $dependencies = array();
+ $dependencies = $file_data = array();
foreach ($form_state['code'] as $module => $api_info) {
if ($module == 'general') {
$module_code .= $api_info;
@@ -82,15 +111,20 @@ function bulk_export_export() {
$api_code[$api_hook] .= " }\n";
$dependencies[$module] = TRUE;
- $file = $form_state['module'] . '.' . $api . '.inc';
+ $file = $module_name . '.' . $api . '.inc';
$code = "<?php\n\n";
$code .= "/**\n";
$code .= " * @file\n";
$code .= " * Bulk export of $api objects generated by Bulk export module.\n";
$code .= " */\n\n";
$code .= $info['code'];
- $export_form = drupal_get_form('ctools_export_form', $code, t('Place this in @file', array('@file' => $file)));
- $output .= drupal_render($export_form);
+ if ($cli) {
+ $file_data[$file] = $code;
+ }
+ else {
+ $export_form = drupal_get_form('ctools_export_form', $code, t('Place this in @file', array('@file' => $file)));
+ $output .= drupal_render($export_form);
+ }
}
}
}
@@ -99,9 +133,9 @@ function bulk_export_export() {
if ($api_code) {
foreach ($api_code as $api_hook => $text) {
$api = "\n/**\n";
- $api .= " * Implement hook_$api_hook().\n";
+ $api .= " * Implements hook_$api_hook().\n";
$api .= " */\n";
- $api .= "function $form_state[module]_$api_hook(\$module, \$api) {\n";
+ $api .= "function {$module_name}_$api_hook(\$module, \$api) {\n";
$api .= $text;
$api .= "}\n";
$module_code = $api . $module_code;
@@ -115,8 +149,13 @@ function bulk_export_export() {
$module .= " * Bulk export of objects generated by Bulk export module.\n";
$module .= " */\n";
$module .= $module_code;
- $export_form = drupal_get_form('ctools_export_form', $module, t('Place this in @file', array('@file' => $form_state['module'] . '.module')));
- $output = drupal_render($export_form) . $output;
+ if ($cli) {
+ $file_data[$module_name . '.module'] = $module;
+ }
+ else {
+ $export_form = drupal_get_form('ctools_export_form', $module, t('Place this in @file', array('@file' => $form_state['module'] . '.module')));
+ $output = drupal_render($export_form) . $output;
+ }
}
$info = strtr("name = @module export module\n", array('@module' => $form_state['module']));
@@ -126,12 +165,21 @@ function bulk_export_export() {
}
$info .= "package = Chaos tool suite\n";
$info .= "core = 7.x\n";
- $export_form = drupal_get_form('ctools_export_form', $info, t('Place this in @file', array('@file' => $form_state['module'] . '.info')));
- $output = drupal_render($export_form) . $output;
-
+ if ($cli) {
+ $file_data[$module_name . '.info'] = $info;
+ }
+ else {
+ $export_form = drupal_get_form('ctools_export_form', $info, t('Place this in @file', array('@file' => $form_state['module'] . '.info')));
+ $output = drupal_render($export_form) . $output;
+ }
}
- return $output;
+ if ($cli) {
+ return $file_data;
+ }
+ else {
+ return $output;
+ }
}
else {
return t('There are no objects to be exported at this time.');
@@ -143,28 +191,38 @@ function bulk_export_export() {
*
*/
function bulk_export_export_form($form, &$form_state) {
- $form['tables'] = array(
- '#prefix' => '<div class="clearfix">',
- '#suffix' => '</div>',
- '#tree' => TRUE,
- );
$files = system_rebuild_module_data();
- $options = array();
+ $form['additional_settings'] = array(
+ '#type' => 'vertical_tabs',
+ );
+
+ $options = $tables = array();
foreach ($form_state['exportables'] as $table => $list) {
if (empty($list)) {
continue;
}
foreach ($list as $id => $title) {
$options[$table][$id] = array($title);
+ $options[$table][$id]['#attributes'] = array('class' => array('bulk-selection'));
}
$module = $form_state['export_tables'][$table];
- $header = array("{$files[$module]->info['name']}: $table");
+ $header = array($table);
+ $module_name = $files[$module]->info['name'];
+ $tables[] = $table;
+
+ if (!isset($form[$module_name])) {
+ $form[$files[$module]->info['name']] = array(
+ '#type' => 'fieldset',
+ '#group' => 'additional_settings',
+ '#title' => $module_name,
+ );
+ }
- $form['tables'][$table] = array(
+ $form[$module_name]['tables'][$table] = array(
'#prefix' => '<div class="export-container">',
'#suffix' => '</div>',
'#type' => 'tableselect',
@@ -173,6 +231,11 @@ function bulk_export_export_form($form, &$form_state) {
);
}
+ $form['tables'] = array(
+ '#type' => 'value',
+ '#value' => $tables,
+ );
+
$form['name'] = array(
'#type' => 'textfield',
'#title' => t('Module name'),
@@ -186,6 +249,7 @@ function bulk_export_export_form($form, &$form_state) {
$form['#action'] = url('admin/structure/bulk-export/results');
$form['#attached']['css'][] = drupal_get_path('module', 'bulk_export') . '/bulk_export.css';
+ $form['#attached']['js'][] = drupal_get_path('module', 'bulk_export') . '/bulk_export.js';
return $form;
}
@@ -195,9 +259,10 @@ function bulk_export_export_form($form, &$form_state) {
function bulk_export_export_form_submit($form, &$form_state) {
$code = array();
$name = empty($form_state['values']['name']) ? 'foo' : $form_state['values']['name'];
+ $tables = $form_state['values']['tables'];
- foreach ($form_state['values']['tables'] as $table => $names) {
- $names = array_keys(array_filter($names));
+ foreach ($tables as $table) {
+ $names = array_keys(array_filter($form_state['values'][$table]));
if ($names) {
natcasesort($names);
ctools_export_to_hook_code($code, $table, $names, $name);
View
8 sites/all/modules/contrib/ctools/css/collapsible-div.css
@@ -10,6 +10,14 @@
}
.ctools-collapsible-container .ctools-collapsible-handle {
+ display: none;
+}
+
+html.js .ctools-collapsible-container .ctools-collapsible-handle {
+ display: block;
+}
+
+.ctools-collapsible-container .ctools-collapsible-handle {
cursor: pointer;
}
View
58 sites/all/modules/contrib/ctools/ctools.api.php
@@ -14,6 +14,22 @@
*/
/**
+ * Inform CTools about plugin types.
+ *
+ * @return array
+ * An array of plugin types, keyed by the type name.
+ * See the advanced help topic 'plugins-creating' for details of the array
+ * properties.
+ */
+function hook_ctools_plugin_type() {
+ $plugins['my_type'] = array(
+ 'load themes' => TRUE,
+ );
+
+ return $plugins;
+}
+
+/**
* This hook is used to inform the CTools plugin system about the location of a
* directory that should be searched for files containing plugins of a
* particular type. CTools invokes this same hook for all plugins, using the
@@ -121,7 +137,7 @@ function hook_ctools_plugin_post_alter(&$plugin, &$info) {
/**
* Alter the available functions to be used in ctools math expression api.
*
- * One usecase would be to create your own function in your module and
+ * One usecase would be to create your own function in your module and
* allow to use it in the math expression api.
*
* @param $functions
@@ -133,5 +149,45 @@ function hook_ctools_math_expression_functions_alter(&$functions) {
}
/**
+ * Alter everything.
+ *
+ * @param $info
+ * An associative array containing the following keys:
+ * - content: The rendered content.
+ * - title: The content's title.
+ * - no_blocks: A boolean to decide if blocks should be displayed.
+ * @param $page
+ * If TRUE then this renderer owns the page and can use theme('page')
+ * for no blocks; if false, output is returned regardless of any no
+ * blocks settings.
+ * @param $context
+ * An associative array containing the following keys:
+ * - args: The raw arguments behind the contexts.
+ * - contexts: The context objects in use.
+ * - task: The task object in use.
+ * - subtask: The subtask object in use.
+ * - handler: The handler object in use.
+ */
+function hook_ctools_render_alter(&$info, &$page, &$context) {
+ if ($context['handler']->name == 'my_handler') {
+ ctools_add_css('my_module.theme', 'my_module');
+ }
+}
+
+/**
+ * Alter a content plugin subtype.
+ *
+ * While content types can be altered via hook_ctools_plugin_pre_alter() or
+ * hook_ctools_plugin_post_alter(), the subtypes that content types rely on
+ * are special and require their own hook.
+ *
+ * This hook can be used to add things like 'render last' or change icons
+ * or categories or to rename content on specific sites.
+ */
+function hook_ctools_content_subtype_alter($subtype, $plugin) {
+ $subtype['render last'] = TRUE;
+}
+
+/**
* @} End of "addtogroup hooks".
*/
View
6 sites/all/modules/contrib/ctools/ctools.info
@@ -6,9 +6,9 @@ files[] = includes/context.inc
files[] = includes/math-expr.inc
files[] = includes/stylizer.inc
-; Information added by drupal.org packaging script on 2011-07-28
-version = "7.x-1.0-rc1"
+; Information added by drupal.org packaging script on 2012-03-17
+version = "7.x-1.0-rc2"
core = "7.x"
project = "ctools"
-datestamp = "1311894415"
+datestamp = "1332017742"
View
6 sites/all/modules/contrib/ctools/ctools.install
@@ -161,8 +161,8 @@ function ctools_update_6003() {
$result = db_query('SELECT status FROM {system} WHERE name = :name', array(':name' => 'panels_views'))->fetchField();
if ($result) {
db_delete('system')->condition('name', 'panels_views')->execute();
- drupal_install_modules(array('views_content'));
- }
+ module_enable(array('views_content'), TRUE);
+ }
}
/**
@@ -188,7 +188,7 @@ function ctools_update_6007() {
$ret = array();
if (db_table_exists('ctools_custom_content')) {
// Enable the module to make everything as seamless as possible.
- drupal_install_modules(array('ctools_custom_content'));
+ module_enable(array('ctools_custom_content'), TRUE);
}
return $ret;
View
26 sites/all/modules/contrib/ctools/ctools.module
@@ -9,7 +9,7 @@
* must be implemented in the module file.
*/
-define('CTOOLS_API_VERSION', '2.0.1');
+define('CTOOLS_API_VERSION', '2.0.5');
/**
* Test the CTools API version.
@@ -122,11 +122,31 @@ function ctools_include($file, $module = 'ctools', $dir = 'includes') {
* the form_state so that cached forms will properly include things.
*/
function ctools_form_include(&$form_state, $file, $module = 'ctools', $dir = 'includes') {
+ if (!isset($form_state['build_info']['args'])) {
+ $form_state['build_info']['args'] = array();
+ }
+
$dir = '/' . ($dir ? $dir . '/' : '');
form_load_include($form_state, 'inc', $module, $dir . $file);
}
/**
+ * Add an arbitrary path to the $form_state so it can work with form cache.
+ *
+ * module_load_include uses an unfortunately annoying syntax to work, making it
+ * difficult to translate the more simple $path + $file syntax.
+ */
+function ctools_form_include_file(&$form_state, $filename) {
+ if (!isset($form_state['build_info']['args'])) {
+ $form_state['build_info']['args'] = array();
+ }
+
+ // Now add this to the build info files so that AJAX requests will know to load it.
+ $form_state['build_info']['files']["$filename"] = $filename;
+ require_once DRUPAL_ROOT . '/' . $filename;
+}
+
+/**
* Provide the proper path to an image as necessary.
*
* This helper function is used by ctools but can also be used in other
@@ -326,6 +346,10 @@ function ctools_set_variable_token($token) {
* $token = ctools_set_variable_token('id', 'mymodule_myfunction');
*/
function ctools_set_callback_token($token, $callback) {
+ // If the callback uses arguments they are considered in the token.
+ if (is_array($callback)) {
+ $token .= '-' . md5(serialize($callback));
+ }
$string = '<!-- ctools-page-' . $token . ' -->';
ctools_set_page_token($string, 'callback', $callback);
return $string;
View
6 sites/all/modules/contrib/ctools/ctools_access_ruleset/ctools_access_ruleset.info
@@ -4,9 +4,9 @@ core = 7.x
package = Chaos tool suite
dependencies[] = ctools
-; Information added by drupal.org packaging script on 2011-07-28
-version = "7.x-1.0-rc1"
+; Information added by drupal.org packaging script on 2012-03-17
+version = "7.x-1.0-rc2"
core = "7.x"
project = "ctools"
-datestamp = "1311894415"
+datestamp = "1332017742"
View
6 sites/all/modules/contrib/ctools/ctools_ajax_sample/ctools_ajax_sample.info
@@ -4,9 +4,9 @@ package = Chaos tool suite
dependencies[] = ctools
core = 7.x
-; Information added by drupal.org packaging script on 2011-07-28
-version = "7.x-1.0-rc1"
+; Information added by drupal.org packaging script on 2012-03-17
+version = "7.x-1.0-rc2"
core = "7.x"
project = "ctools"
-datestamp = "1311894415"
+datestamp = "1332017742"
View
2 sites/all/modules/contrib/ctools/ctools_ajax_sample/js/ctools-ajax-sample.js
@@ -2,7 +2,7 @@
* Provide the HTML to create the modal dialog.
*/
Drupal.theme.prototype.CToolsSampleModal = function () {
- var html = ''
+ var html = '';
html += '<div id="ctools-modal" class="popups-box">';
html += ' <div class="ctools-modal-content ctools-sample-modal-content">';
View
6 sites/all/modules/contrib/ctools/ctools_custom_content/ctools_custom_content.info
@@ -4,9 +4,9 @@ core = 7.x
package = Chaos tool suite
dependencies[] = ctools
-; Information added by drupal.org packaging script on 2011-07-28
-version = "7.x-1.0-rc1"
+; Information added by drupal.org packaging script on 2012-03-17
+version = "7.x-1.0-rc2"
core = "7.x"
project = "ctools"
-datestamp = "1311894415"
+datestamp = "1332017742"
View
5 ...contrib/ctools/ctools_custom_content/plugins/export_ui/ctools_custom_content_ui.class.php
@@ -3,6 +3,11 @@
class ctools_custom_content_ui extends ctools_export_ui {
function edit_form(&$form, &$form_state) {
+ // Correct for an error that came in because filter format changed.
+ if (is_array($form_state['item']->settings['body'])) {
+ $form_state['item']->settings['format'] = $form_state['item']->settings['body']['format'];
+ $form_state['item']->settings['body'] = $form_state['item']->settings['body']['value'];
+ }
parent::edit_form($form, $form_state);
$form['category'] = array(
View
6 sites/all/modules/contrib/ctools/ctools_plugin_example/ctools_plugin_example.info
@@ -7,9 +7,9 @@ dependencies[] = page_manager
dependencies[] = advanced_help
core = 7.x
-; Information added by drupal.org packaging script on 2011-07-28
-version = "7.x-1.0-rc1"
+; Information added by drupal.org packaging script on 2012-03-17
+version = "7.x-1.0-rc2"
core = "7.x"
project = "ctools"
-datestamp = "1311894415"
+datestamp = "1332017742"
View
2 ...es/contrib/ctools/ctools_plugin_example/plugins/content_types/no_context_content_type.inc
@@ -109,7 +109,7 @@ function no_context_content_type_edit_form($form, &$form_state) {
return $form;
}
-function no_context_content_type_edit_form_submit(&$form, &$form_state) {
+function no_context_content_type_edit_form_submit($form, &$form_state) {
foreach (array('item1', 'item2') as $key) {
$form_state['conf'][$key] = $form_state['values'][$key];
}
View
4 ...es/contrib/ctools/ctools_plugin_example/plugins/content_types/relcontext_content_type.inc
@@ -79,7 +79,7 @@ function relcontext_content_type_render($subtype, $conf, $args, $context) {
* This example just returns a form.
*
*/
-function relcontext_edit_form(&$form, &$form_state) {
+function relcontext_edit_form($form, &$form_state) {
$conf = $form_state['conf'];
$form['config_item_1'] = array(
@@ -94,7 +94,7 @@ function relcontext_edit_form(&$form, &$form_state) {
return $form;
}
-function relcontext_edit_form_submit(&$form, &$form_state) {
+function relcontext_edit_form_submit($form, &$form_state) {
foreach (element_children($form) as $key) {
if (!empty($form_state['values'][$key])) {
$form_state['conf'][$key] = $form_state['values'][$key];
View
6 ...contrib/ctools/ctools_plugin_example/plugins/content_types/simplecontext_content_type.inc
@@ -105,7 +105,7 @@ function simplecontext_content_type_render($subtype, $conf, $args, $context) {
* This example just returns a form.
*
*/
-function simplecontext_content_type_edit_form(&$form, &$form_state) {
+function simplecontext_content_type_edit_form($form, &$form_state) {
$conf = $form_state['conf'];
$form['config_item_1'] = array(
'#type' => 'textfield',
@@ -120,10 +120,10 @@ function simplecontext_content_type_edit_form(&$form, &$form_state) {
return $form;
}
-function simplecontext_content_type_edit_form_submit(&$form, &$form_state) {
+function simplecontext_content_type_edit_form_submit($form, &$form_state) {
foreach (element_children($form) as $key) {
if (!empty($form_state['values'][$key])) {
$form_state['conf'][$key] = $form_state['values'][$key];
}
}
-}
+}
View
206 sites/all/modules/contrib/ctools/drush/ctools.drush.inc
@@ -0,0 +1,206 @@
+<?php
+
+/**
+ * @file
+ * CTools Drush commands.
+ */
+
+/**
+ * Implements hook_drush_command().
+ */
+function ctools_drush_command() {
+ $items = array();
+
+ $items['ctools-export'] = array(
+ 'aliases' => array('ctex'),
+ 'description' => 'Export multiple CTools-handled data objects directly to code.',
+ 'arguments' => array(
+ 'module' => 'Name of your module.',
+ ),
+ 'options' => array(
+ 'subdir' => 'The name of the sub directory to create the module in. Defaults to ctools_export which will be placed into sites/all/modules.',
+ ),
+ 'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
+ 'drupal dependencies' => array('bulk_export'),
+ 'examples' => array(
+ 'drush ctex export_module' => 'Export CTools exportables to a module called "export_module".',
+ ),
+ );
+
+ $items['ctools-export-info'] = array(
+ 'aliases' => array('ctei'),
+ 'description' => 'Show available CTools exportables.',
+ 'arguments' => array(),
+ 'options' => array(
+ 'format' => 'Display exportables info in a different format such as print_r, json, export. The default is to show in a tabular format.',
+ 'tables-only' => 'Only show list of exportable types/table names and not available objects.',
+ ),
+ 'examples' => array(
+ 'drush ctools-export-info' => 'View export info on all exportables.',
+ 'drush ctools-export-info views_view variable' => 'View export info for views_view and variable exportable types only.',
+ ),
+ );
+
+ return $items;
+}
+
+/**
+ * Drush callback: export
+ */
+function drush_ctools_export($module = 'foo') {
+ $error = FALSE;
+ if (preg_match('@[^a-z_]+@', $module)) {
+ $error = dt('The name of the module must contain only lowercase letters and underscores') . '.';
+ drush_log($error, 'error');
+ return;
+ }
+
+ // Subdirectory.
+ $dest_exists = FALSE;
+ $subdir = drush_get_option('subdir', 'ctools_export');
+ $dest = 'sites/all/modules/' . $subdir . '/' . $module;
+
+ // Check if module or folder exists.
+ if (module_exists($module) || file_exists($dest)) {
+ $dest_exists = TRUE;
+ if (drush_confirm(dt('Are you sure to overwrite files in folder !module ? An extra confirmation will be asked for the module file.', array('!module' => $module)))) {
+ drush_log(dt('Files will be overwritten'), 'success');
+ }
+ else {
+ drush_log(dt('Export aborted.'), 'success');
+ return;
+ }
+ }
+
+ // Create new dir if needed.
+ if (!$dest_exists) {
+ if (!file_exists('sites/all/modules/' . $subdir)) {
+ drush_mkdir('sites/all/modules/' . $subdir);
+ }
+ }
+
+ // Create destination directory.
+ drush_mkdir($dest);
+
+ // Create options and call Bulk export function.
+ // We create an array, because maybe in the future we can pass in more
+ // options to the export function (pre-selected modules and/or exportables).
+ $options = array(
+ 'name' => $module,
+ );
+ $files = bulk_export_export(TRUE, $options);
+
+ // Start writing.
+ if (is_array($files)) {
+ foreach ($files as $base_file => $data) {
+ $filename = $dest . '/' . $base_file;
+ // Extra check for .module file.
+ if ($base_file == $module . '.module' && file_exists($filename)) {
+ if (!drush_confirm(dt('Do you want to overwrite !module_file', array('!module_file' => $base_file)))) {
+ drush_log(dt('Writing of !filename skipped. This is the code that was supposed to be written.', array('!filename' => $filename)), 'success');
+ drush_print('---------');
+ drush_print($data);
+ drush_print('---------');
+ continue;
+ }
+ }
+ if (file_put_contents($filename, $data)) {
+ drush_log(dt('Succesfully written !filename', array('!filename' => $filename)), 'success');
+ }
+ else {
+ drush_log(dt('Error writing !filename', array('!filename' => $filename)), 'error');
+ }
+ }
+ }
+ else {
+ drush_log(dt('No files were found to be written.'), 'error');
+ }
+}
+
+/**
+ * Drush callback: Export info.
+ *
+ * @params $table_names
+ * Each argument will be taken as a CTools exportable table name.
+ */
+function drush_ctools_export_info() {
+ // Collect array of table names from args.
+ $table_names = func_get_args();
+ // Get info on these tables, or all if none specified.
+ $exportables = _drush_ctools_export_info($table_names);
+ // Get format option to allow for alternative output.
+ $format = drush_get_option('format');
+ $tables_only = drush_get_option('tables-only');
+
+ if (empty($exportables)) {
+ drush_log(dt('There are no exportables available.'), 'warning');
+ return;
+ }
+
+ // Only use array keys if --types-only option is set.
+ if ($tables_only) {
+ $exportables = array_keys($exportables);
+ }
+
+ // Use format from --format
+ if ($format) {
+ drush_print(drush_format($exportables, $format, NULL));
+ }
+ // Build a tabular output as default.
+ else {
+ $header = $tables_only? array(dt("Base table")) : array(dt("Base table"), dt("Exportables"));
+ $rows = array();
+ foreach ($exportables as $table => $info) {
+ if (!is_array($info)) {
+ $row = array(
+ $info
+ );
+ }
+ else {
+ $row = array(
+ $table,
+ implode("\n", $info) . "\n",
+ );
+ }
+ $rows[] = $row;
+ }
+ array_unshift($rows, $header);
+ drush_print_table($rows, TRUE);
+ }
+
+}
+
+/**
+ * Return array of CTools exportable info
+ * based on available tables returned from
+ * ctools_export_get_schemas().
+ *
+ * @param $table_names
+ * Array of table names to return.
+ *
+ * @return
+ * Nested arrays of available exportables, keyed by table name.
+ */
+function _drush_ctools_export_info($table_names = NULL) {
+ ctools_include('export');
+ // Get available schemas that declare exports.
+ $schemas = ctools_export_get_schemas();
+ $exportables = array();
+
+ if (!empty($schemas)) {
+ // Remove types we don't want, if any.
+ if (!empty($table_names)) {
+ foreach (array_keys($schemas) as $table_name) {
+ if (!in_array($table_name, $table_names)) {
+ unset($schemas[$table_name]);
+ }
+ }
+ }
+ // Load array of available exportables for each schema.
+ foreach ($schemas as $table_name => $schema) {
+ $exportables[$table_name] = ctools_export_default_list($table_name, $schema);
+ }
+ }
+
+ return $exportables;
+}
View
9 sites/all/modules/contrib/ctools/help/about.html
@@ -1,6 +1,7 @@
-The Chaos Tool Suite is a series of tools for developers to make code that I've found to be very useful to Views and Panels more readily available. Certain methods of doing things, particularly with AJAX, exportable objects, and a plugin system are proving to be ideas that are useful outside of just Views and Panels. This module does not offer much directly ot the end user, but instead creates a library for other modules to use. If you are an end user and some module asked you to install the CTools suite, then this is far as you really need to go. If you're a developer and are interested in these tools, read on!
+<p>The Chaos Tool Suite is a series of tools for developers to make code that I've found to be very useful to Views and Panels more readily available. Certain methods of doing things, particularly with AJAX, exportable objects, and a plugin system are proving to be ideas that are useful outside of just Views and Panels. This module does not offer much directly ot the end user, but instead creates a library for other modules to use. If you are an end user and some module asked you to install the CTools suite, then this is far as you really need to go. If you're a developer and are interested in these tools, read on!</p>
+
+<h2>Tools provided by CTools</h2>
-<h3>Tools provided by CTools</h3>
<dl>
<dt><a href="&topic:ctools/plugins&">Plugins</a></dt>
<dd>The plugins tool allows a module to allow <b>other</b> modules (and themes!) to provide plugins which provide some kind of functionality or some kind of task. For example, in Panels there are several types of plugins: Content types (which are like blocks), layouts (which are page layouts) and styles (which can be used to style a panel). Each plugin is represented by a .inc file, and the functionaly they offer can differ wildly.
@@ -25,6 +26,4 @@
<dt><a href="&topic:ctools/object-cache&">Temporary object cache</a></dt>
<dd>For normal forms, all of the data needed for an object is stored in the form so that the browser handles a lot of the work. For multi-step and ajax forms, however, this is impractical, and letting the browser store data can be insecure. The object cache provides a non-volatile location to store temporary data while the form is being worked on. This is much safer than the standard Drupal caching mechanism, which is volatile, meaning it can be cleared at any time and any system using it must be capable of recreating the data that was there. This system also allows for object locking, since any object which has an item in the cache from another person can be assumed to be 'locked for editing'.</dd>
-
-
-</dl>
+</dl>
View
1 sites/all/modules/contrib/ctools/help/collapsible-div.html
@@ -0,0 +1 @@
+<p>To be written.</p>
View
10 sites/all/modules/contrib/ctools/help/context-access.html
@@ -1,14 +1,12 @@
-
-access plugins allow context based access control to pages.
-
-
- 'title' => Title of the plugin
+<p>Access plugins allow context based access control to pages.</p>
+<pre> 'title' => Title of the plugin
'description' => Description of the plugin
'callback' => callback to see if there is access is available. params: $conf, $contexts, $account
'required context' => zero or more required contexts for this access plugin
'default' => an array of defaults or a callback giving defaults
'settings form' => settings form. params: &$form, &$form_state, $conf
settings form validate
settings form submit
+</pre>
-warning: Your settings array will be stored IN THE MENU SYSTEM to reduce loads, so be TRIM.
+<p><strong>Warning:</strong> your settings array will be stored <strong>in the meny system</strong> to reduce loads, so be <strong>trim</strong>.</p>
View
11 sites/all/modules/contrib/ctools/help/context-arguments.html
@@ -1,19 +1,14 @@
+<p>Arguments create a context from external input, which is assumed to be a string as though it came from a URL element.</p>
-Arguments create a context from external input, which is assumed to be a
-string as though it came from a URL element.
-
- 'title' => title
+<pre>'title' => title
'description' => Description
'keyword' => Default keyword for the context
'context' => Callback to create the context. Params: $arg = NULL, $conf = NULL, $empty = FALSE
-
'default' => either an array of default settings or a string which is a callback or null to not use.
-
'settings form' => params: $form, $form_state, $conf -- gets the whole form. Should put anything it wants to keep automatically in $form['settings']
'settings form validate' => params: $form, $form_state
'settings form submit' => params: $form, $form_state
-
'criteria form' => params: $form, &$form_state, $conf, $argument, $id -- gets the whole argument. It should only put form widgets in $form[$id]. $conf may not be properly initialized so always guard against this due to arguments being changed and handlers not being updated to match.
+ submit + validate
-
'criteria select' => returns true if the selected criteria matches the context. params: $context, $conf
+</pre>
View
179 sites/all/modules/contrib/ctools/help/context-content.html
@@ -1,246 +1,153 @@
-<p>The CTools pluggable content system provides various pieces of
-content as discrete bits of data that can be added to other
-applications, such as Panels or Dashboard via the UI. Whatever the
-content is added to stores the configuration for that individual piece
-of content, and provides this to the content.</p>
-
-<p>Each content type plugin will be contained in a .inc file, with
-subsidiary files, if necessary, in or near the same directory. Each
-content type consists of some information and one or more subtypes,
-which all use the same renderer. Subtypes are considered to be
-instances of the type. For example, the 'views' content type would have
-each view in the system as a subtype. Many content types will have
-exactly one subtype.</p>
-
-<p>Because the content and forms can be provided via ajax, the plugin
-also provides a list of CSS and JavaScript information that should be available
-on whatever page the content or forms may be AJAXed onto.</p>
-
-<p>For the purposes of selecting content from the UI, each content
-subtype will have the following information:</p>
+<p>The CTools pluggable content system provides various pieces of content as discrete bits of data that can be added to other applications, such as Panels or Dashboard via the UI. Whatever the content is added to stores the configuration for that individual piece of content, and provides this to the content.</p>
-<ul>
- <li>A title</li>
+<p>Each content type plugin will be contained in a .inc file, with subsidiary files, if necessary, in or near the same directory. Each content type consists of some information and one or more subtypes, which all use the same renderer. Subtypes are considered to be instances of the type. For example, the 'views' content type would have each view in the system as a subtype. Many content types will have exactly one subtype.</p>
- <li>A short description</li>
+<p>Because the content and forms can be provided via ajax, the plugin also provides a list of CSS and JavaScript information that should be available on whatever page the content or forms may be AJAXed onto.</p>
- <li>A category [Do we want to add hierarchy categories? Do we want
- category to be more than just a string?]</li>
+<p>For the purposes of selecting content from the UI, each content subtype will have the following information:</p>
- <li>An icon [do we want multiple icons? This becomes a hefty
- requirement]</li>
+<ul>
+ <li>A title</li>
+ <li>A short description</li>
+ <li>A category [Do we want to add hierarchy categories? Do we want category to be more than just a string?]</li>
+ <li>An icon [do we want multiple icons? This becomes a hefty requirement]</li>
</ul>
-<p>Each piece of content provides one or more configuration forms, if
-necessary, and the system that includes the content will handle the
-data storage. These forms can be provided in sequence as wizards or as
-extra forms that can be accessed through advanced administration.</p>
+<p>Each piece of content provides one or more configuration forms, if necessary, and the system that includes the content will handle the data storage. These forms can be provided in sequence as wizards or as extra forms that can be accessed through advanced administration.</p>
<p>The plugin for a content type should contain:</p>
<dl>
<dt>title</dt>
-
<dd>For use on the content permissions screen.</dd>
-
<dt>content types</dt>
-
- <dd>Either an array of content type definitions, or a callback that
- will return content type definitions. This callback will get the
- plugin definition as an argument.</dd>
+ <dd>Either an array of content type definitions, or a callback that will return content type definitions. This callback will get the plugin definition as an argument.</dd>
<dt>content type</dt>
-
- <dd>[Optional] Provide a single content type definition. This is only
- necessary if content types might be intensive.</dd>
+ <dd>[Optional] Provide a single content type definition. This is only necessary if content types might be intensive.</dd>
<dt>render callback</dt>
-
- <dd>
- The callback to render the content. Parameters:
-
+ <dd>The callback to render the content. Parameters:
<dl>
<dt>$subtype</dt>
-
- <dd>The name of the subtype being rendered. NOT the loaded
- subtype data.</dd>
+ <dd>The name of the subtype being rendered. NOT the loaded subtype data.</dd>
<dt>$conf</dt>
-
<dd>The stored configuration for the content.</dd>
<dt>$args</dt>
-
<dd>Any arguments passed.</dd>
<dt>$context</dt>
-
- <dd>An array of contexts requested by the required contexts and
- assigned by the configuration step.</dd>
+ <dd>An array of contexts requested by the required contexts and assigned by the configuration step.</dd>
<dt>$incoming_content</dt>
-
<dd>Any 'incoming content' if this is a wrapper.</dd>
</dl>
</dd>
<dt>admin title</dt>
-
- <dd>A callback to provide the administrative title. If it is not a
- function, then it will be counted as a string to use as the admin
- title.</dd>
+ <dd>A callback to provide the administrative title. If it is not a function, then it will be counted as a string to use as the admin title.</dd>
<dt>admin info</dt>
-
- <dd>A callback to provide administrative information about the
- content, to be displayed when manipulating the content. It should
- contain a summary of configuration.</dd>
+ <dd>A callback to provide administrative information about the content, to be displayed when manipulating the content. It should contain a summary of configuration.</dd>
<dt>edit form</dt>
-
- <dd>
- Either a single form ID or an array of forms *keyed* by form ID
- with the value to be used as the title of the form. %title me be
- used as a placeholder for the administrative title if necessary.
+ <dd>Either a single form ID or an array of forms *keyed* by form ID with the value to be used as the title of the form. %title me be used as a placeholder for the administrative title if necessary.
Example:
- <pre>
- array(
- 'ctools_example_content_form_second' =&gt; t('Configure first form'),
- 'ctools_example_content_form_first' =&gt; t('Configure second form'),
- ),
-</pre>The first form will always have required configuration added to
-it. These forms are normal FAPI forms, but you do not need to provide
-buttons, these will be added by the form wizard.
+<pre>array(
+ 'ctools_example_content_form_second' =&gt; t('Configure first form'),
+ 'ctools_example_content_form_first' =&gt; t('Configure second form'),
+),
+</pre>
+The first form will always have required configuration added to it. These forms are normal FAPI forms, but you do not need to provide buttons, these will be added by the form wizard.
</dd>
<dt>add form</dt>
-
- <dd>[Optional] If different from the edit forms, provide them here in
- the same manner. Also may be set to FALSE to not have an add
- form.</dd>
+ <dd>[Optional] If different from the edit forms, provide them here in the same manner. Also may be set to FALSE to not have an add form.</dd>
<dt>css</dt>
-
- <dd>A file or array of CSS files that are necessary for the
- content.</dd>
+ <dd>A file or array of CSS files that are necessary for the content.</dd>
<dt>js</dt>
-
- <dd>A file or array of javascript files that are necessary for the
- content to be displayed.</dd>
+ <dd>A file or array of javascript files that are necessary for the content to be displayed.</dd>
<dt>admin css</dt>
-
- <dd>A file or array of CSS files that are necessary for the
- forms.</dd>
+ <dd>A file or array of CSS files that are necessary for the forms.</dd>
<dt>admin js</dt>
-
- <dd>A file or array of JavaScript files that are necessary for the
- forms.</dd>
+ <dd>A file or array of JavaScript files that are necessary for the forms.</dd>
<dt>extra forms</dt>
-
- <dd>An array of form information to handle extra administrative
- forms.</dd>
+ <dd>An array of form information to handle extra administrative forms.</dd>
<dt>no title override</dt>
-
<dd>Set to TRUE if the title cannot be overridden.</dd>
<dt>single</dt>
-
<dd>Set to TRUE if this content provides exactly one subtype.</dd>
<dt>render last</dt>
-
- <dd>Set to true if for some reason this content needs to render after
- other content. This is primarily used for forms to ensure that render
- order is correct.</dd>
+ <dd>Set to true if for some reason this content needs to render after other content. This is primarily used for forms to ensure that render order is correct.</dd>
</dl>
-<p>TODO: many of the above callbacks can be assumed based upon
-patterns: modulename + '_' + name + '_' + function. i.e, render,
-admin_title, admin_info, etc.</p>
+<p>TODO: many of the above callbacks can be assumed based upon patterns: modulename + '_' + name + '_' + function. i.e, render, admin_title, admin_info, etc.</p>
-<p>TODO: Some kind of simple access control to easily filter out
-content.</p>
+<p>TODO: Some kind of simple access control to easily filter out content.</p>
<p>The subtype definition should contain:</p>
<dl>
<dt>title</dt>
-
<dd>The title of the subtype.</dd>
<dt>icon</dt>
-
<dd>The icon to display for the subtype.</dd>
<dt>path</dt>
-
- <dd>The path for the icon if it is not in the same directory as the
- plugin.</dd>
+ <dd>The path for the icon if it is not in the same directory as the plugin.</dd>
<dt>description</dt>
-
- <dd>The short description of the subtype, to be used when selecting
- it in the UI.</dd>
+ <dd>The short description of the subtype, to be used when selecting it in the UI.</dd>
<dt>category</dt>
-
- <dd>Either a text string for the category, or an array of the text
- string followed by the category weight.</dd>
+ <dd>Either a text string for the category, or an array of the text string followed by the category weight.</dd>
<dt>required context [Optional]</dt>
- <dd>Either a ctools_context_required or ctools_context_optional or
- array of contexts for this content. If omitted, no contexts are
- used.</dd>
+ <dd>Either a ctools_context_required or ctools_context_optional or array of contexts for this content. If omitted, no contexts are used.</dd>
</dl>
-<h3>Rendered content</h3>
+<h2>Rendered content</h2>
<p>Rendered content is a little more than just HTML.</p>
<dl>
<dt>title</dt>
-
<dd>The safe to render title of the content.</dd>
<dt>content</dt>
-
<dd>The safe to render HTML content.</dd>
<dt>links</dt>
-
- <dd>An array of links associated with the content suitable for
- theme('links').</dd>
+ <dd>An array of links associated with the content suitable for theme('links').</dd>
<dt>more</dt>
-
<dd>An optional 'more' link (destination only)</dd>
<dt>admin_links</dt>
-
- <dd>Administrative links associated with the content, suitable for
- theme('links').</dd>
+ <dd>Administrative links associated with the content, suitable for theme('links').</dd>
<dt>feeds</dt>
-
- <dd>An array of feed icons or links associated with the content. Each
- member of the array is rendered HTML.</dd>
+ <dd>An array of feed icons or links associated with the content. Each member of the array is rendered HTML.</dd>
<dt>type</dt>
-
<dd>The content type.</dd>
<dt>subtype</dt>
-
- <dd>The content subtype. These two may be used together as
- module-delta for block style rendering.</dd>
+ <dd>The content subtype. These two may be used together as module-delta for block style rendering.</dd>
</dl>
-<h3>Todo: example</h3>
+<h2>Todo: example</h2>
<p>Todo after implementations are updated to new version.</p>
View
5 sites/all/modules/contrib/ctools/help/context-context.html
@@ -1,6 +1,6 @@
+<p>Context plugin data:</p>
-Context plugin data:
-
+<pre>
'title' => Visible title
'description' => Description of context
'context' => Callback to create a context. Params: $empty, $data = NULL, $conf = FALSE
@@ -10,3 +10,4 @@
'keyword' => The default keyword to use.
'context name' => The unique identifier for this context for use by required context checks.
'no ui' => if TRUE this context cannot be selected.
+</pre>
View
3 sites/all/modules/contrib/ctools/help/context-relationships.html
@@ -1,4 +1,6 @@
+<p>Relationship plugin data:</p>
+<pre>
'title' => The title to display.
'description' => Description to display.
'keyword' => Default keyword for the context created by this relationship.
@@ -8,3 +10,4 @@
'context' => The callback to create the context. Params: ($context = NULL, $conf)
'settings form' => Settings form. Params: $conf
'settings form validate' => Validate.
+</pre>
View
1 sites/all/modules/contrib/ctools/help/css.html
@@ -0,0 +1 @@
+<p>To be written.</p>
View
1 sites/all/modules/contrib/ctools/help/dependent.html
@@ -0,0 +1 @@
+<p>To be written.</p>
View
1 sites/all/modules/contrib/ctools/help/dropbutton.html
@@ -0,0 +1 @@
+<p>To be written.</p>
View
1 sites/all/modules/contrib/ctools/help/dropdown.html
@@ -0,0 +1 @@
+<p>To be written.</p>
View
13 sites/all/modules/contrib/ctools/help/export-ui.html
@@ -1,4 +1,4 @@
-Most user interfaces for exportables are very similar, so CTools includes a tool to provide the framework for the most common UI. This tool is a plugin of the 'export_ui' type. In order to create a UI for your exportable object with this tool, you first need to ensure that your module supports the plugin:
+<p>Most user interfaces for exportables are very similar, so CTools includes a tool to provide the framework for the most common UI. This tool is a plugin of the 'export_ui' type. In order to create a UI for your exportable object with this tool, you first need to ensure that your module supports the plugin:</p>
<pre>
function HOOK_ctools_plugin_directory($module, $plugin) {
@@ -8,7 +8,7 @@
}
</pre>
-Then, you need to create a plugin .inc file describing your UI. Most of the UI runs with sane but simple defaults, so for the very simplest UI you don't need to do very much. This is a very simple example plugin for the 'example' export type:
+<p>Then, you need to create a plugin .inc file describing your UI. Most of the UI runs with sane but simple defaults, so for the very simplest UI you don't need to do very much. This is a very simple example plugin for the 'example' export type:</p>
<pre>
$plugin = array(
@@ -61,10 +61,11 @@
);
</pre>
-For a more complete list of what you can set in your plugin, please see ctools_export_ui_defaults() in includes/export-ui.inc to see what the defaults are.
+<p>For a more complete list of what you can set in your plugin, please see ctools_export_ui_defaults() in includes/export-ui.inc to see what the defaults are.</p>
-<h3>More advanced UIs</h3>
-The bulk of this UI is built on an class called ctools_export_ui, which is itself stored in ctools/plugins/export_ui as the default plugin. Many UIs will have more complex needs than the defaults provide. Using OO and overriding methods can allow an implementation to use the basics and still provide more where it is needed. To utilize this, first add a 'handler' directive to your plugin .inc file:
+<h2>More advanced UIs</h2>
+
+<p>The bulk of this UI is built on an class called ctools_export_ui, which is itself stored in ctools/plugins/export_ui as the default plugin. Many UIs will have more complex needs than the defaults provide. Using OO and overriding methods can allow an implementation to use the basics and still provide more where it is needed. To utilize this, first add a 'handler' directive to your plugin .inc file:</p>
<pre>
'handler' => array(