Ver código fonte

deleted inigui, created features

Bachir Soussi Chiadmi 10 anos atrás
pai
commit
118ebf517d
100 arquivos alterados com 19359 adições e 2664 exclusões
  1. 339 0
      sites/all/modules/contrib/fields/field_collection/LICENSE.txt
  2. 36 0
      sites/all/modules/contrib/fields/field_collection/README.txt
  3. 106 0
      sites/all/modules/contrib/fields/field_collection/ctools/relationships/field_collection_from_field.inc
  4. 37 0
      sites/all/modules/contrib/fields/field_collection/field-collection-item.tpl.php
  5. 47 0
      sites/all/modules/contrib/fields/field_collection/field_collection.admin.inc
  6. 169 0
      sites/all/modules/contrib/fields/field_collection/field_collection.api.php
  7. 17 0
      sites/all/modules/contrib/fields/field_collection/field_collection.info
  8. 30 0
      sites/all/modules/contrib/fields/field_collection/field_collection.info.inc
  9. 330 0
      sites/all/modules/contrib/fields/field_collection/field_collection.install
  10. 181 0
      sites/all/modules/contrib/fields/field_collection/field_collection.migrate.inc
  11. 1998 0
      sites/all/modules/contrib/fields/field_collection/field_collection.module
  12. 139 0
      sites/all/modules/contrib/fields/field_collection/field_collection.pages.inc
  13. 580 0
      sites/all/modules/contrib/fields/field_collection/field_collection.test
  14. 66 0
      sites/all/modules/contrib/fields/field_collection/field_collection.theme.css
  15. 60 0
      sites/all/modules/contrib/fields/field_collection/views/field_collection.views.inc
  16. 58 0
      sites/all/modules/contrib/fields/field_collection/views/field_collection_handler_relationship.inc
  17. 339 0
      sites/all/modules/contrib/fields/video_embed_field/LICENSE.txt
  18. 26 0
      sites/all/modules/contrib/fields/video_embed_field/plugins/export_ui/video_embed_field_export_ui.inc
  19. 22 0
      sites/all/modules/contrib/fields/video_embed_field/video-embed-field-embed-code.tpl.php
  20. 13 0
      sites/all/modules/contrib/fields/video_embed_field/video_embed_facebook/video_embed_facebook.info
  21. 149 0
      sites/all/modules/contrib/fields/video_embed_field/video_embed_facebook/video_embed_facebook.module
  22. 31 0
      sites/all/modules/contrib/fields/video_embed_field/video_embed_field.admin.inc
  23. 100 0
      sites/all/modules/contrib/fields/video_embed_field/video_embed_field.api.php
  24. 43 0
      sites/all/modules/contrib/fields/video_embed_field/video_embed_field.feeds.inc
  25. 443 0
      sites/all/modules/contrib/fields/video_embed_field/video_embed_field.field.inc
  26. 4 0
      sites/all/modules/contrib/fields/video_embed_field/video_embed_field.form.css
  27. 519 0
      sites/all/modules/contrib/fields/video_embed_field/video_embed_field.handlers.inc
  28. 14 0
      sites/all/modules/contrib/fields/video_embed_field/video_embed_field.info
  29. 243 0
      sites/all/modules/contrib/fields/video_embed_field/video_embed_field.install
  30. 570 0
      sites/all/modules/contrib/fields/video_embed_field/video_embed_field.module
  31. 69 0
      sites/all/modules/features/admin/admin.features.filter.inc
  32. 86 0
      sites/all/modules/features/admin/admin.features.inc
  33. 783 0
      sites/all/modules/features/admin/admin.features.user_permission.inc
  34. 38 0
      sites/all/modules/features/admin/admin.features.user_role.inc
  35. 68 0
      sites/all/modules/features/admin/admin.features.workflow_access.inc
  36. 90 0
      sites/all/modules/features/admin/admin.features.wysiwyg.inc
  37. 186 0
      sites/all/modules/features/admin/admin.info
  38. 7 0
      sites/all/modules/features/admin/admin.module
  39. 296 0
      sites/all/modules/features/admin/admin.strongarm.inc
  40. 471 0
      sites/all/modules/features/admin/admin.views_default.inc
  41. 46 0
      sites/all/modules/features/page/page.features.field_base.inc
  42. 62 0
      sites/all/modules/features/page/page.features.field_instance.inc
  43. 32 0
      sites/all/modules/features/page/page.features.inc
  44. 61 0
      sites/all/modules/features/page/page.features.user_permission.inc
  45. 26 0
      sites/all/modules/features/page/page.info
  46. 7 0
      sites/all/modules/features/page/page.module
  47. 58 0
      sites/all/modules/features/page/page.strongarm.inc
  48. BIN
      sites/all/themes/gui/inigui/apple-touch-icon-precomposed.png
  49. BIN
      sites/all/themes/gui/inigui/apple-touch-icon.png
  50. 0 23
      sites/all/themes/gui/inigui/css/maintenance.css
  51. 0 64
      sites/all/themes/gui/inigui/css/nonsemantic.css
  52. 0 406
      sites/all/themes/gui/inigui/css/normalize.css
  53. 0 0
      sites/all/themes/gui/inigui/css/styles.css
  54. BIN
      sites/all/themes/gui/inigui/icon.png
  55. 0 215
      sites/all/themes/gui/inigui/inc/template.theme-overrides.inc
  56. 0 93
      sites/all/themes/gui/inigui/inigui.info
  57. 0 1104
      sites/all/themes/gui/inigui/js/libs/iscroll.js
  58. 0 120
      sites/all/themes/gui/inigui/js/libs/jquery.jscrollpane.css
  59. 0 7
      sites/all/themes/gui/inigui/js/libs/jquery.jscrollpane.min.js
  60. 0 84
      sites/all/themes/gui/inigui/js/libs/jquery.mousewheel.js
  61. 0 1
      sites/all/themes/gui/inigui/js/libs/modernizr-2.6.1.min.js
  62. 0 76
      sites/all/themes/gui/inigui/js/libs/mwheelIntent.js
  63. 0 254
      sites/all/themes/gui/inigui/less/styles.less
  64. BIN
      sites/all/themes/gui/inigui/logo-lite-alpha.png
  65. BIN
      sites/all/themes/gui/inigui/logo-lite.png
  66. BIN
      sites/all/themes/gui/inigui/logo.png
  67. 0 7
      sites/all/themes/gui/inigui/preprocess/node.pre.php
  68. BIN
      sites/all/themes/gui/inigui/screenshot.png
  69. 0 175
      sites/all/themes/gui/inigui/templates/page.tpl.php
  70. 0 35
      sites/all/themes/gui/inigui/theme-settings.php
  71. BIN
      sites/all/themes/gui/jee/.sass-cache/06dcbe1fa5b03937e94c01bbbc1f20c6e165e878/communs.scssc
  72. BIN
      sites/all/themes/gui/jee/.sass-cache/06dcbe1fa5b03937e94c01bbbc1f20c6e165e878/fonts.scssc
  73. BIN
      sites/all/themes/gui/jee/.sass-cache/06dcbe1fa5b03937e94c01bbbc1f20c6e165e878/jee.scssc
  74. BIN
      sites/all/themes/gui/jee/.sass-cache/06dcbe1fa5b03937e94c01bbbc1f20c6e165e878/wysiwyg.scssc
  75. BIN
      sites/all/themes/gui/jee/.sass-cache/508c2942ecf20a20483dbe0feab6c07e47d871b4/_functions.scssc
  76. BIN
      sites/all/themes/gui/jee/.sass-cache/96a50d22516e601e4678845ba0cfa5f3ded6dc03/normalize.scssc
  77. BIN
      sites/all/themes/gui/jee/.sass-cache/da30a33d7b6e9d651fc40a4fed3055ba0eb36689/_block-grid.scssc
  78. BIN
      sites/all/themes/gui/jee/.sass-cache/da30a33d7b6e9d651fc40a4fed3055ba0eb36689/_clearing.scssc
  79. BIN
      sites/all/themes/gui/jee/.sass-cache/da30a33d7b6e9d651fc40a4fed3055ba0eb36689/_global.scssc
  80. BIN
      sites/all/themes/gui/jee/.sass-cache/da30a33d7b6e9d651fc40a4fed3055ba0eb36689/_grid.scssc
  81. BIN
      sites/all/themes/gui/jee/.sass-cache/da30a33d7b6e9d651fc40a4fed3055ba0eb36689/_type.scssc
  82. 43 0
      sites/all/themes/gui/jee/Gruntfile.js
  83. BIN
      sites/all/themes/gui/jee/apple-touch-icon-114x114-precomposed.png
  84. BIN
      sites/all/themes/gui/jee/apple-touch-icon-144x144-precomposed.png
  85. BIN
      sites/all/themes/gui/jee/apple-touch-icon-72x72-precomposed.png
  86. BIN
      sites/all/themes/gui/jee/apple-touch-icon-precomposed.png
  87. 66 0
      sites/all/themes/gui/jee/assets/img/logo-blured.svg
  88. 2974 0
      sites/all/themes/gui/jee/assets/img/logo.svg
  89. 2989 0
      sites/all/themes/gui/jee/assets/img/slogan.svg
  90. 19 0
      sites/all/themes/gui/jee/bower.json
  91. 23 0
      sites/all/themes/gui/jee/bower_components/fastclick/.bower.json
  92. 22 0
      sites/all/themes/gui/jee/bower_components/fastclick/LICENSE
  93. 133 0
      sites/all/themes/gui/jee/bower_components/fastclick/README.md
  94. 13 0
      sites/all/themes/gui/jee/bower_components/fastclick/bower.json
  95. 821 0
      sites/all/themes/gui/jee/bower_components/fastclick/lib/fastclick.js
  96. 33 0
      sites/all/themes/gui/jee/bower_components/foundation/.bower.json
  97. 23 0
      sites/all/themes/gui/jee/bower_components/foundation/bower.json
  98. 2744 0
      sites/all/themes/gui/jee/bower_components/foundation/css/foundation.css
  99. 2 0
      sites/all/themes/gui/jee/bower_components/foundation/css/foundation.css.map
  100. 359 0
      sites/all/themes/gui/jee/bower_components/foundation/css/normalize.css

+ 339 - 0
sites/all/modules/contrib/fields/field_collection/LICENSE.txt

@@ -0,0 +1,339 @@
+                    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.)
+
+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
+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
+
+            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.

+ 36 - 0
sites/all/modules/contrib/fields/field_collection/README.txt

@@ -0,0 +1,36 @@
+
+Field collection
+-----------------
+Provides a field collection field, to which any number of fields can be attached.
+
+Each field collection item is internally represented as an entity, which is
+referenced via the field collection field in the host entity. While
+conceptually field collections are treated as part of the host entity, each
+field collection item may also be viewed and edited separately.
+
+
+ Usage
+ ------
+
+  * Add a field collection field to any entity, e.g. to a node. For that use the
+   the usual "Manage fields" interface provided by the "field ui" module of
+   Drupal, e.g. "Admin -> Structure-> Content types -> Article -> Manage fields".
+
+  * Then go to "Admin -> Structure-> Field collection" to define some fields for
+   the created field collection.
+
+  * By the default, the field collection is not shown during editing of the host
+    entity. However, some links for adding, editing or deleting field collection
+    items is shown when the host entity is viewed.
+
+  * Widgets for embedding the form for creating field collections in the
+    host-entity can be provided by any module. In future the field collection
+    module might provide such widgets itself too.
+
+
+Restrictions
+-------------
+
+  * As of now, the field collection field does not properly respect field
+    translation. Thus, for now it is suggested to only use the field for
+    entities that are not translatable.

+ 106 - 0
sites/all/modules/contrib/fields/field_collection/ctools/relationships/field_collection_from_field.inc

@@ -0,0 +1,106 @@
+<?php
+
+/**
+ * @file
+ * Plugin to provide a relationship handler for a field collection field.
+ */
+
+// Plugin definition.
+$plugin = array(
+  'title' => t('Field collection item'),
+  'description' => t('Creates an entity context from a field collection field on a field.'),
+  'context' => 'field_collection_field_collection_from_field_context',
+  'edit form' => 'field_collection_field_collection_from_field_edit_form',
+  'get child' => 'field_collection_field_collection_from_field_get_child',
+  'get children' => 'field_collection_field_collection_from_field_get_children',
+  'defaults' => array('delta' => 0),
+);
+
+/**
+ * Get child callback.
+ */
+function field_collection_field_collection_from_field_get_child($plugin, $parent, $child) {
+  $plugins = field_collection_field_collection_from_field_get_children($plugin, $parent);
+  return $plugins[$parent . ':' . $child];
+}
+
+/**
+ * Get children callback.
+ */
+function field_collection_field_collection_from_field_get_children($plugin, $parent) {
+
+  $plugins = array();
+  $instances_info = field_info_instances();
+  if (isset($instances_info['field_collection_item'])) {
+    $field_collection_items = $instances_info['field_collection_item'];
+
+    foreach (field_read_instances() as $instance) {
+      if (isset($field_collection_items[$instance['field_name']])) {
+        $child_plugin_id = $parent . ':' . $instance['entity_type'] . ':' . $instance['bundle'] . ':' . $instance['field_name'];
+
+        $child_plugin = $plugin;
+        $child_plugin['context name'] = $instance['entity_type'] . ':' . $instance['bundle'] . ':' . $instance['field_name'];
+        $child_plugin['title'] = t(
+          '!label field collection (!field_name) from !entity_type (!bundle)',
+          array(
+          '!label' => $instance['label'],
+          '!field_name' => $instance['field_name'],
+          '!entity_type' => $instance['entity_type'],
+          '!bundle' => $instance['bundle']
+          )
+        );
+        $restrictions = array('type' => array($instance['bundle']));
+        $child_plugin['required context'] = new ctools_context_required(ucfirst($instance['entity_type']), $instance['entity_type'], $restrictions);
+        $child_plugin['parent'] = $parent;
+        $child_plugin['keyword'] = 'Field collection';
+        $child_plugin['entity_type'] = $instance['entity_type'];
+        $child_plugin['field_name'] = $instance['field_name'];
+
+        $child_plugin['name'] = $child_plugin_id;
+        $plugins[$child_plugin_id] = $child_plugin;
+
+      }
+    }
+  }
+
+  return $plugins;
+}
+
+/**
+ * Return a new field collection context based on an existing context.
+ */
+function field_collection_field_collection_from_field_context($context, $conf) {
+
+  $plugin_info = ctools_get_relationship($conf['name']);
+  $delta = (int) $conf['delta'];
+
+  $entity = $context->data;
+  if (isset($entity->{$plugin_info['field_name']})) {
+
+    $items = field_get_items($plugin_info['entity_type'], $entity, $plugin_info['field_name']);
+    if (isset($items[$delta]['value'])) {
+      $field_collection_item = field_collection_item_load($items[$delta]['value']);
+    }
+
+    return ctools_context_create('entity:field_collection_item', $items[$delta]['value']);
+  }
+
+  return ctools_context_create_empty('entity:field_collection_item', NULL);
+}
+
+/**
+ * Settings form.
+ */
+function field_collection_field_collection_from_field_edit_form($form, &$form_state) {
+  $conf = $form_state['conf'];
+
+  $form['delta'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Delta'),
+    '#size' => 3,
+    '#description' => t('The relationship can only create one context, but multiple items can be related. Please type in the number you want. The first one will be 0.'),
+    '#default_value' => empty($conf['delta']) ? 0 : $conf['delta'],
+  );
+
+  return $form;
+}

+ 37 - 0
sites/all/modules/contrib/fields/field_collection/field-collection-item.tpl.php

@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation for field collection items.
+ *
+ * Available variables:
+ * - $content: An array of comment items. Use render($content) to print them all, or
+ *   print a subset such as render($content['field_example']). Use
+ *   hide($content['field_example']) to temporarily suppress the printing of a
+ *   given element.
+ * - $title: The (sanitized) field collection item label.
+ * - $url: Direct url of the current entity if specified.
+ * - $page: Flag for the full page state.
+ * - $classes: String of classes that can be used to style contextually through
+ *   CSS. It can be manipulated through the variable $classes_array from
+ *   preprocess functions. By default the following classes are available, where
+ *   the parts enclosed by {} are replaced by the appropriate values:
+ *   - entity-field-collection-item
+ *   - field-collection-item-{field_name}
+ *
+ * Other variables:
+ * - $classes_array: Array of html class attribute values. It is flattened
+ *   into a string within the variable $classes.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_entity()
+ * @see template_process()
+ */
+?>
+<div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
+  <div class="content"<?php print $content_attributes; ?>>
+    <?php
+      print render($content);
+    ?>
+  </div>
+</div>

+ 47 - 0
sites/all/modules/contrib/fields/field_collection/field_collection.admin.inc

@@ -0,0 +1,47 @@
+<?php
+
+/**
+ * @file
+ * Provides the field_collection module admin pages.
+ */
+
+/**
+ * Menu callback; list all field collections on this site.
+ */
+function field_collections_overview() {
+  $instances = field_info_instances();
+  $field_types = field_info_field_types();
+  $bundles = field_info_bundles();
+  $header = array(t('Field name'), t('Used in'), array('data' => t('Operations'), 'colspan' => '2'));
+  $rows = array();
+  foreach ($instances as $entity_type => $type_bundles) {
+    foreach ($type_bundles as $bundle => $bundle_instances) {
+      foreach ($bundle_instances as $field_name => $instance) {
+        $field = field_info_field($field_name);
+        if ($field['type'] == 'field_collection') {
+          $admin_path = _field_ui_bundle_admin_path($entity_type, $bundle);
+          $rows[$field_name]['class'] = $field['locked'] ? array('menu-disabled') : array('');
+
+          $rows[$field_name]['data'][0] = $field['locked'] ? t('@field_name (Locked)', array('@field_name' => $field_name)) : $field_name;
+          $rows[$field_name]['data'][1][] = l($bundles[$entity_type][$bundle]['label'], $admin_path . '/fields');
+        }
+      }
+    }
+  }
+  foreach ($rows as $field_name => $cell) {
+    $rows[$field_name]['data'][1] = implode(', ', $cell['data'][1]);
+
+    $field_name_url_str = strtr($field_name, array('_' => '-'));
+    $rows[$field_name]['data'][2] = l(t('manage fields'), 'admin/structure/field-collections/' . $field_name_url_str . '/fields');
+    $rows[$field_name]['data'][3] = l(t('manage display'), 'admin/structure/field-collections/' . $field_name_url_str . '/display');
+  }
+  if (empty($rows)) {
+    $output = t('No field collections have been defined yet. To do so attach a field collection field to any entity.');
+  }
+  else {
+    // Sort rows by field name.
+    ksort($rows);
+    $output = theme('table', array('header' => $header, 'rows' => $rows));
+  }
+  return $output;
+}

+ 169 - 0
sites/all/modules/contrib/fields/field_collection/field_collection.api.php

@@ -0,0 +1,169 @@
+<?php
+
+/**
+ * @file
+ * Contains API documentation and examples for the Field collection module.
+ */
+
+/**
+ * @addtogroup hooks
+ * @{
+ */
+
+/**
+ * Alter whether a field collection item is considered empty.
+ *
+ * This hook allows modules to determine whether a field collection is empty
+ * before it is saved.
+ *
+ * @param boolean $empty
+ *   Whether or not the field should be considered empty.
+ * @param FieldCollectionItemEntity $item
+ *   The field collection we are currently operating on.
+ */
+function hook_field_collection_is_empty_alter(&$is_empty, FieldCollectionItemEntity $item) {
+  if (isset($item->my_field) && empty($item->my_field)) {
+    $is_empty = TRUE;
+  }
+}
+
+/**
+ * Acts on field collections being loaded from the database.
+ *
+ * This hook is invoked during field collection item loading, which is handled
+ * by entity_load(), via the EntityCRUDController.
+ *
+ * @param array $entities
+ *   An array of field collection item entities being loaded, keyed by id.
+ *
+ * @see hook_entity_load()
+ */
+function hook_field_collection_item_load(array $entities) {
+  $result = db_query('SELECT pid, foo FROM {mytable} WHERE pid IN(:ids)', array(':ids' => array_keys($entities)));
+  foreach ($result as $record) {
+    $entities[$record->pid]->foo = $record->foo;
+  }
+}
+
+/**
+ * Responds when a field collection item is inserted.
+ *
+ * This hook is invoked after the field collection item is inserted into the
+ * database.
+ *
+ * @param FieldCollectionItemEntity $field_collection_item
+ *   The field collection item that is being inserted.
+ *
+ * @see hook_entity_insert()
+ */
+function hook_field_collection_item_insert(FieldCollectionItemEntity $field_collection_item) {
+  db_insert('mytable')->fields(array(
+    'id' => entity_id('field_collection_item', $field_collection_item),
+    'extra' => print_r($field_collection_item, TRUE),
+  ))->execute();
+}
+
+/**
+ * Acts on a field collection item being inserted or updated.
+ *
+ * This hook is invoked before the field collection item is saved to the database.
+ *
+ * @param FieldCollectionItemEntity $field_collection_item
+ *   The field collection item that is being inserted or updated.
+ *
+ * @see hook_entity_presave()
+ */
+function hook_field_collection_item_presave(FieldCollectionItemEntity $field_collection_item) {
+  $field_collection_item->name = 'foo';
+}
+
+/**
+ * Responds to a field collection item being updated.
+ *
+ * This hook is invoked after the field collection item has been updated in the
+ * database.
+ *
+ * @param FieldCollectionItemEntity $field_collection_item
+ *   The field collection item that is being updated.
+ *
+ * @see hook_entity_update()
+ */
+function hook_field_collection_item_update(FieldCollectionItemEntity $field_collection_item) {
+  db_update('mytable')
+    ->fields(array('extra' => print_r($field_collection_item, TRUE)))
+    ->condition('id', entity_id('field_collection_item', $field_collection_item))
+    ->execute();
+}
+
+/**
+ * Responds to field collection item deletion.
+ *
+ * This hook is invoked after the field collection item has been removed from
+ * the database.
+ *
+ * @param FieldCollectionItemEntity $field_collection_item
+ *   The field collection item that is being deleted.
+ *
+ * @see hook_entity_delete()
+ */
+function hook_field_collection_item_delete(FieldCollectionItemEntity $field_collection_item) {
+  db_delete('mytable')
+    ->condition('pid', entity_id('field_collection_item', $field_collection_item))
+    ->execute();
+}
+
+/**
+ * Act on a field collection item that is being assembled before rendering.
+ *
+ * @param $field_collection_item
+ *   The field collection item entity.
+ * @param $view_mode
+ *   The view mode the field collection item is rendered in.
+ * @param $langcode
+ *   The language code used for rendering.
+ *
+ * The module may add elements to $field_collection_item->content prior to
+ * rendering. The structure of $field_collection_item->content is a renderable
+ * array as expected by drupal_render().
+ *
+ * @see hook_entity_prepare_view()
+ * @see hook_entity_view()
+ */
+function hook_field_collection_item_view($field_collection_item, $view_mode, $langcode) {
+  $field_collection_item->content['my_additional_field'] = array(
+    '#markup' => $additional_field,
+    '#weight' => 10,
+    '#theme' => 'mymodule_my_additional_field',
+  );
+}
+
+/**
+ * Alter the results of entity_view() for field collection items.
+ *
+  * This hook is called after the content has been assembled in a structured
+ * array and may be used for doing processing which requires that the complete
+ * field collection item content structure has been built.
+ *
+ * If the module wishes to act on the rendered HTML of the field collection item
+ * rather than the structured content array, it may use this hook to add a
+ * #post_render callback. See drupal_render() and theme() documentation
+ * respectively for details.
+ *
+ * @param $build
+ *   A renderable array representing the field collection item content.
+ *
+ * @see hook_entity_view_alter()
+ */
+function hook_field_collection_item_view_alter($build) {
+  if ($build['#view_mode'] == 'full' && isset($build['an_additional_field'])) {
+    // Change its weight.
+    $build['an_additional_field']['#weight'] = -10;
+
+    // Add a #post_render callback to act on the rendered HTML of the entity.
+    $build['#post_render'][] = 'my_module_post_render';
+  }
+}
+
+/**
+ * @}
+ */

+ 17 - 0
sites/all/modules/contrib/fields/field_collection/field_collection.info

@@ -0,0 +1,17 @@
+name = Field collection
+description = Provides a field collection field, to which any number of fields can be attached.
+core = 7.x
+dependencies[] = entity
+files[] = field_collection.test
+files[] = field_collection.info.inc
+files[] = views/field_collection_handler_relationship.inc
+files[] = field_collection.migrate.inc
+configure = admin/structure/field-collections
+package = Fields
+
+; Information added by Drupal.org packaging script on 2014-11-04
+version = "7.x-1.0-beta8"
+core = "7.x"
+project = "field_collection"
+datestamp = "1415122384"
+

+ 30 - 0
sites/all/modules/contrib/fields/field_collection/field_collection.info.inc

@@ -0,0 +1,30 @@
+<?php
+
+/**
+ * @file
+ * Provides entity property info for field collection items.
+ */
+
+class FieldCollectionItemMetadataController extends EntityDefaultMetadataController {
+
+  public function entityPropertyInfo() {
+    $info = parent::entityPropertyInfo();
+    $properties = &$info['field_collection_item']['properties'];
+
+    $properties['field_name']['label'] = t('Field name');
+    $properties['field_name']['description'] = t('The machine-readable name of the field collection field containing this item.');
+    $properties['field_name']['required'] = TRUE;
+
+    $properties['host_entity'] = array(
+      'label' => t('Host entity'),
+      'type' => 'entity',
+      'description' => t('The entity containing the field collection field.'),
+      'getter callback' => 'field_collection_item_get_host_entity',
+      'setter callback' => 'field_collection_item_set_host_entity',
+      'required' => TRUE,
+    );
+
+    return $info;
+  }
+
+}

+ 330 - 0
sites/all/modules/contrib/fields/field_collection/field_collection.install

@@ -0,0 +1,330 @@
+<?php
+
+/**
+ * @file
+ * Install, update and uninstall functions for the field_collection module.
+ */
+
+/**
+ * Implements hook_schema().
+ */
+function field_collection_schema() {
+
+  $schema['field_collection_item'] = array(
+    'description' => 'Stores information about field collection items.',
+    'fields' => array(
+      'item_id' => array(
+        'type' => 'serial',
+        'not null' => TRUE,
+        'description' => 'Primary Key: Unique field collection item ID.',
+      ),
+      'revision_id' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'description' => 'Default revision ID.',
+      ),
+      'field_name' => array(
+        'description' => 'The name of the field on the host entity embedding this entity.',
+        'type' => 'varchar',
+        'length' => 32,
+        'not null' => TRUE,
+      ),
+      'archived' => array(
+        'description' => 'Boolean indicating whether the field collection item is archived.',
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+      ),
+    ),
+    'primary key' => array('item_id'),
+  );
+  $schema['field_collection_item_revision'] = array(
+    'description' => 'Stores revision information about field collection items.',
+    'fields' => array(
+      'revision_id' => array(
+        'type' => 'serial',
+        'not null' => TRUE,
+        'description' => 'Primary Key: Unique revision ID.',
+      ),
+      'item_id' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'description' => 'Field collection item ID.',
+      ),
+    ),
+    'primary key' => array('revision_id'),
+    'indexes' => array(
+      'item_id' => array('item_id'),
+    ),
+    'foreign keys' => array(
+      'versioned_field_collection_item' => array(
+        'table' => 'field_collection_item',
+        'columns' => array('item_id' => 'item_id'),
+      ),
+    ),
+  );
+  return $schema;
+}
+
+/**
+ * Implements hook_field_schema().
+ */
+function field_collection_field_schema($field) {
+  $columns = array(
+    'value' => array(
+      'type' => 'int',
+      'not null' => FALSE,
+      'description' => 'The field collection item id.',
+    ),
+    'revision_id' => array(
+      'type' => 'int',
+      'not null' => FALSE,
+      'description' => 'The field collection item revision id.',
+    ),
+  );
+  return array(
+    'columns' => $columns,
+    'indexes' => array(
+      'revision_id' => array('revision_id'),
+    ),
+  );
+}
+
+/**
+ * Update the administer field collection permission machine name.
+ */
+function field_collection_update_7000() {
+  db_update('role_permission')
+    ->fields(array('permission' => 'administer field collections'))
+    ->condition('permission', 'administer field-collections')
+    ->execute();
+}
+
+/**
+ * Add revision support.
+ */
+function field_collection_update_7001() {
+
+  // Add revision_id column to field_collection_item table.
+  $revision_id_spec = array(
+    'type' => 'int',
+    'not null' => TRUE,
+    'description' => 'Default revision ID.',
+    // Set default to 0 temporarily.
+    'initial' => 0,
+  );
+  // Field may already exist due to bug in 7.x-1.0-beta5.
+  if (!db_field_exists('field_collection_item', 'revision_id')) {
+    db_add_field('field_collection_item', 'revision_id', $revision_id_spec);
+  }
+
+  // Initialize the revision_id to be the same as the item_id.
+  db_update('field_collection_item')
+    ->expression('revision_id', 'item_id')
+    ->execute();
+
+  // Add the archived column
+  $archived_spec = array(
+    'description' => 'Boolean indicating whether the field collection item is archived.',
+    'type' => 'int',
+    'not null' => TRUE,
+    'default' => 0,
+  );
+  // Field may already exist due to bug in 7.x-1.0-beta5.
+  if (!db_field_exists('field_collection_item', 'archived')) {
+    db_add_field('field_collection_item', 'archived', $archived_spec);
+  }
+
+  // Create the new table. It is important to explicitly define the schema here
+  // rather than use the hook_schema definition: http://drupal.org/node/150220.
+  $schema['field_collection_item_revision'] = array(
+    'description' => 'Stores revision information about field collection items.',
+    'fields' => array(
+      'revision_id' => array(
+        'type' => 'serial',
+        'not null' => TRUE,
+        'description' => 'Primary Key: Unique revision ID.',
+      ),
+      'item_id' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'description' => 'Field collection item ID.',
+      ),
+    ),
+    'primary key' => array('revision_id'),
+    'indexes' => array(
+      'item_id' => array('item_id'),
+    ),
+    'foreign keys' => array(
+      'versioned_field_collection_item' => array(
+        'table' => 'field_collection_item',
+        'columns' => array('item_id' => 'item_id'),
+      ),
+    ),
+  );
+  // Table may already exist due to bug in 7.x-1.0-beta5.
+  if (db_table_exists('field_collection_item_revision')) {
+    db_drop_table('field_collection_item_revision');
+  }
+  db_create_table('field_collection_item_revision', $schema['field_collection_item_revision']);
+
+  // Fill the new table with the correct data.
+  $items = db_select('field_collection_item', 'fci')
+    ->fields('fci')
+    ->execute();
+  foreach ($items as $item) {
+    // Update field_collection_item_revision table.
+    db_insert('field_collection_item_revision')
+      ->fields(array(
+        'revision_id' => $item->item_id,
+        'item_id' => $item->item_id,
+      ))
+      ->execute();
+  }
+
+  // Update the field_collection_field_schema columns for all tables.
+  // Add a revision_id column.
+  $revision_id_spec['description'] = 'The field collection item revision id.';
+  // Because $value_column below can be null, so must $revision_id_column.
+  $revision_id_spec['not null'] = FALSE;
+  foreach (field_read_fields(array('type' => 'field_collection')) as $field_name => $field) {
+    $table_prefixes = array('field_data', 'field_revision');
+    foreach ($table_prefixes as $table_prefix) {
+
+      $table = sprintf('%s_%s', $table_prefix, $field_name);
+      $value_column = sprintf('%s_value', $field_name);
+      $revision_id_column = sprintf('%s_revision_id', $field_name);
+
+      // Field may already exist due to bug in 7.x-1.0-beta5.
+      if (!db_field_exists($table, $revision_id_column)) {
+        db_add_field($table, $revision_id_column, $revision_id_spec);
+      }
+      else {
+        db_change_field($table, $revision_id_column, $revision_id_column, $revision_id_spec);
+      }
+
+      // Initialize the revision_id to be the same as the item_id.
+      db_update($table)
+        ->expression($revision_id_column, $value_column)
+        ->execute();
+    }
+  }
+
+  // Need to get the system up-to-date so drupal_schema_fields_sql() will work.
+  $schema = drupal_get_schema('field_collection_item_revision', TRUE);
+}
+
+/**
+ * Remove orphaned field collection item entities.
+ */
+function field_collection_update_7002() {
+  // Loop over all fields and delete any orphaned field collection items.
+  foreach (field_read_fields(array('type' => 'field_collection')) as $field_name => $field) {
+
+    $select = db_select('field_collection_item', 'fci')
+      ->fields('fci', array('item_id'))
+      ->condition('field_name', $field_name)
+      ->condition('archived', 0);
+    $select->leftJoin('field_data_' . $field_name, 'field', "field.{$field_name}_value = fci.item_id ");
+    $select->isNull('field.entity_id');
+    $ids = $select->execute()->fetchCol(0);
+
+    entity_delete_multiple('field_collection_item', $ids);
+    drupal_set_message(t('Deleted @count orphaned field collection items.', array('@count' => count($ids))));
+  }
+}
+
+/**
+ * Update field_collection_field_schema columns for all tables.
+ */
+function field_collection_update_7003() {
+  // Revision_id column.
+  $revision_id_spec = array(
+    'type' => 'int',
+    'not null' => FALSE,
+    'description' => 'The field collection item revision id.',
+    'initial' => 0,
+  );
+
+  // Update the field_collection_field_schema columns for all tables,
+  // in case the buggy beta5 version of field_collection_update_7001()
+  // completed without complaint.
+  foreach (field_read_fields(array('type' => 'field_collection')) as $field_name => $field) {
+    $table_prefixes = array('field_data', 'field_revision');
+    foreach ($table_prefixes as $table_prefix) {
+      $table = sprintf('%s_%s', $table_prefix, $field_name);
+      $value_column = sprintf('%s_value', $field_name);
+      $revision_id_column = sprintf('%s_revision_id', $field_name);
+      db_change_field($table, $revision_id_column, $revision_id_column, $revision_id_spec);
+    }
+  }
+
+  // Need to get the system up-to-date so drupal_schema_fields_sql() will work.
+  $schema = drupal_get_schema('field_collection_item_revision', TRUE);
+}
+
+/**
+ * Add index on {$field_collection_field}_revision_id column for all tables.
+ */
+function field_collection_update_7004() {
+  // Update the field_collection_field_schema columns for all tables.
+  foreach (field_read_fields(array('type' => 'field_collection')) as $field_name => $field) {
+    $table_prefixes = array('field_data', 'field_revision');
+    foreach ($table_prefixes as $table_prefix) {
+
+      $table = sprintf('%s_%s', $table_prefix, $field_name);
+      $revision_id_column = sprintf('%s_revision_id', $field_name);
+
+      // Add index on revision_id column.
+      if (!db_index_exists($table, $revision_id_column)) {
+        db_add_index($table, $revision_id_column, array($revision_id_column));
+      }
+    }
+  }
+}
+
+/**
+ * Force the creation of the table cache_entity_field_collection_item.
+ *
+ * entity_update_7003 will attempt to install entitycache tables for existing
+ * modules, but it uses module_list() to get the list of available modules,
+ * which, when called from a database update, may not return field_collection
+ * since drupal is bootstrapped at a lower level.
+ */
+function field_collection_update_7005() {
+  if (module_exists('entitycache')) {
+    $entity_type = 'field_collection_item';
+    $table = 'cache_entity_' . $entity_type;
+    if (!db_table_exists($table)) {
+      $schema = drupal_get_schema_unprocessed('system', 'cache');
+      $schema['description'] = 'Cache table used to store' . $entity_type . ' entity records.';
+      db_create_table($table, $schema);
+    }
+  }
+}
+
+/**
+ * Ensures revision_id indexes are present at field_config table.
+ */
+function field_collection_update_7006() {
+  $result = db_query("SELECT id, field_name, data FROM {field_config} WHERE type = 'field_collection'");
+  foreach ($result as $field_config) {
+    $data = unserialize($field_config->data);
+    // Skip this record if the revision_id index is already present.
+    if (isset($data['indexes']['revision_id'])) {
+      continue;
+    }
+    // Otherwise, add the revision_id index and update the record.
+    $data['indexes']['revision_id'] = array('revision_id');
+    $data = serialize($data);
+    $num_updated = db_update('field_config')
+      ->fields(array('data' => $data))
+      ->condition('id', $field_config->id)
+      ->execute();
+    // If for some reason the update failed, throw an exception.
+    if ($num_updated != 1) {
+      $t_args['@field'] = $field_config->field_name;
+      throw new DrupalUpdateException(t('An error was detected when attempting to update field configuration for field @field.', $t_args));
+    }
+  }
+}

+ 181 - 0
sites/all/modules/contrib/fields/field_collection/field_collection.migrate.inc

@@ -0,0 +1,181 @@
+<?php
+
+/**
+ * @file
+ * Support for the Migrate API.
+ *
+ * Your field collection migration should be run after the host entity
+ * migration. For example, if the collection is attached to nodes via a field
+ * named 'field_attached_data', and if the nodes are being imported by
+ * ArticleMigration, your collection migration class constructor should look
+ * like:
+ *
+ * @code
+ *   $this->dependencies = array('Article');
+ *
+ *   $this->destination = new MigrateDestinationFieldCollection(
+ *     'field_attached_data',
+ *     array('host_entity_type' => 'node')
+ *   );
+ *
+ *   $this->addFieldMapping('host_entity_id', 'source_article_id')
+ *     ->sourceMigration('Article');
+ * @endcode
+ *
+ * @see http://drupal.org/node/1900640
+ */
+
+/**
+ * Destination class implementing migration into field_collection.
+ */
+class MigrateDestinationFieldCollection extends MigrateDestinationEntity {
+  /**
+   * The type of entity hosting this collection field (e.g., node).
+   *
+   * @var string
+   */
+  protected $hostEntityType;
+
+  static public function getKeySchema() {
+    return array(
+      'item_id' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'description' => 'ID of field collection item',
+      ),
+    );
+  }
+
+  /**
+   * Basic initialization.
+   *
+   * @param string $bundle
+   *   Bundle name.
+   * @param array $options
+   *   (optional) Options applied to collections.
+   */
+  public function __construct($bundle, array $options = array()) {
+    parent::__construct('field_collection_item', $bundle, $options);
+    $this->hostEntityType = $options['host_entity_type'];
+  }
+
+  /**
+   * Returns a list of fields available to be mapped for this collection
+   * (bundle).
+   *
+   * @return array
+   *   Keys: machine names of the fields (to be passed to addFieldMapping).
+   *   Values: Human-friendly descriptions of the fields.
+   */
+  public function fields() {
+    $fields = migrate_handler_invoke_all('Entity', 'fields', $this->entityType, $this->bundle);
+    $fields['item_id'] = t('Field collection entity ID');
+    $fields['host_entity_id'] = t('Field collection host ID');
+    return $fields;
+  }
+
+  /**
+   * Import a single field collection item.
+   *
+   * @param $collection
+   *   Collection object to build. Pre-filled with any fields mapped in the
+   *   migration.
+   * @param $row
+   *   Raw source data object - passed through to prepare/complete handlers.
+   *
+   * @return array|false
+   *   Array of key fields (item_id only in this case) of the collection that
+   *   was saved or FALSE on failure.
+   */
+  public function import(stdClass $collection, stdClass $row) {
+    if (isset($row->migrate_map_destid1)) {
+      // We're updated an existing entity - start from the previous data.
+      // entity_load() returns an array, so we get the field collection entity
+      // with array_shift().
+      $entity = array_shift(entity_load('field_collection_item', array($row->migrate_map_destid1), array(), TRUE));
+      $entity_old = clone $entity;
+      $updating = TRUE;
+    }
+    else {
+      // Skip the collection if it has no host.
+      if (empty($collection->host_entity_id)) {
+        throw new MigrateException('Could not find host entity of the field collection to import.');
+      }
+      $entity = entity_create('field_collection_item', array('field_name' => $this->bundle));
+      $updating = FALSE;
+      $host_entity = entity_load_single($this->hostEntityType, $collection->host_entity_id);
+      entity_get_controller($this->hostEntityType)->resetCache();
+      $entity->setHostEntity($this->hostEntityType, $host_entity);
+    }
+
+    unset($collection->host_entity_id);
+
+    foreach ((array) $collection as $field => $value) {
+      $entity->{$field} = $value;
+    }
+
+    $this->prepare($entity, $row);
+
+    // Restore fields from original field_collection_item if updating
+    if ($updating) {
+      foreach ($entity as $field => $value) {
+        if ('field_' != substr($field, 0, 6)) {
+          continue;
+        }
+        elseif (property_exists($entity_old, $field) && !property_exists($collection, $field)) {
+          $entity->$field = $entity_old->$field;
+        }
+      }
+    }
+
+    migrate_instrument_start('field_collection_save');
+    $status = entity_save('field_collection_item', $entity);
+    migrate_instrument_stop('field_collection_save');
+
+    if (in_array($this->hostEntityType, array('node', 'field_collection_item')) || ($status !== FALSE)) {
+      $this->complete($entity, $row);
+      if ($updating) {
+        $this->numUpdated++;
+      }
+      else {
+        $this->numCreated++;
+      }
+      return array($entity->item_id);
+    }
+    else {
+      return FALSE;
+    }
+  }
+
+  /**
+   * Delete a migrated collection.
+   *
+   * @param $key
+   *   Array of fields representing the key.
+   */
+  public function rollback(array $key) {
+    $item_id = reset($key);
+
+    $this->prepareRollback($item_id);
+    $field_collection_item = field_collection_item_load($item_id);
+    // If the collection wasn't imported then we can't roll it back, so check if
+    // the loaded object is an instance of the FieldCollectionItemEntity class.
+    if ($field_collection_item instanceof FieldCollectionItemEntity) {
+      $field_collection_item->delete();
+    }
+
+    $this->completeRollback($item_id);
+    return TRUE;
+  }
+}
+
+/**
+ * Implements migrate hook_migrate_api().
+ */
+function field_collection_migrate_api() {
+  $api = array(
+    'api' => 2,
+  );
+  return $api;
+}

+ 1998 - 0
sites/all/modules/contrib/fields/field_collection/field_collection.module

@@ -0,0 +1,1998 @@
+<?php
+
+/**
+ * @file
+ * Module implementing field collection field type.
+ */
+
+/**
+ * Implements hook_help().
+ */
+function field_collection_help($path, $arg) {
+  switch ($path) {
+    case 'admin/help#field_collection':
+      $output = '';
+      $output .= '<h3>' . t('About') . '</h3>';
+      $output .= '<p>' . t('The field collection module provides a field, to which any number of fields can be attached. See the <a href="@field-help">Field module help page</a> for more information about fields.', array('@field-help' => url('admin/help/field'))) . '</p>';
+      return $output;
+  }
+}
+
+/**
+ * Implements hook_ctools_plugin_directory().
+ */
+function field_collection_ctools_plugin_directory($module, $plugin) {
+  if ($module == 'ctools') {
+    return 'ctools/' . $plugin;
+  }
+}
+
+/**
+ * Implements hook_entity_info().
+ */
+function field_collection_entity_info() {
+  $return['field_collection_item'] = array(
+    'label' => t('Field collection item'),
+    'label callback' => 'entity_class_label',
+    'uri callback' => 'entity_class_uri',
+    'entity class' => 'FieldCollectionItemEntity',
+    'controller class' => 'EntityAPIController',
+    'base table' => 'field_collection_item',
+    'revision table' => 'field_collection_item_revision',
+    'fieldable' => TRUE,
+    // For integration with Redirect module.
+    // @see http://drupal.org/node/1263884
+    'redirect' => FALSE,
+    'entity keys' => array(
+      'id' => 'item_id',
+      'revision' => 'revision_id',
+      'bundle' => 'field_name',
+    ),
+    'module' => 'field_collection',
+    'view modes' => array(
+      'full' => array(
+        'label' => t('Full content'),
+        'custom settings' => FALSE,
+       ),
+    ),
+    'access callback' => 'field_collection_item_access',
+    'deletion callback' => 'field_collection_item_delete',
+    'metadata controller class' => 'FieldCollectionItemMetadataController'
+  );
+
+  // Add info about the bundles. We do not use field_info_fields() but directly
+  // use field_read_fields() as field_info_fields() requires built entity info
+  // to work.
+  foreach (field_read_fields(array('type' => 'field_collection')) as $field_name => $field) {
+    $return['field_collection_item']['bundles'][$field_name] = array(
+      'label' => t('Field collection @field', array('@field' => $field_name)),
+      'admin' => array(
+        'path' => 'admin/structure/field-collections/%field_collection_field_name',
+        'real path' => 'admin/structure/field-collections/' . strtr($field_name, array('_' => '-')),
+        'bundle argument' => 3,
+        'access arguments' => array('administer field collections'),
+      ),
+    );
+  }
+
+  if (module_exists('entitycache')) {
+    $return['field_collection_item']['field cache'] = FALSE;
+    $return['field_collection_item']['entity cache'] = TRUE;
+  }
+
+  return $return;
+}
+
+/**
+ * Menu callback for loading the bundle names.
+ */
+function field_collection_field_name_load($arg) {
+  $field_name = strtr($arg, array('-' => '_'));
+  if (($field = field_info_field($field_name)) && $field['type'] == 'field_collection') {
+    return $field_name;
+  }
+}
+
+/**
+ * Loads a field collection item.
+ *
+ * @return field_collection_item
+ *   The field collection item entity or FALSE.
+ */
+function field_collection_item_load($item_id, $reset = FALSE) {
+  $result = field_collection_item_load_multiple(array($item_id), array(), $reset);
+  return $result ? reset($result) : FALSE;
+}
+
+/**
+ * Loads a field collection revision.
+ *
+ * @param $revision_id
+ *   The field collection revision ID.
+ */
+function field_collection_item_revision_load($revision_id) {
+  return entity_revision_load('field_collection_item', $revision_id);
+}
+
+/**
+ * Loads field collection items.
+ *
+ * @return
+ *   An array of field collection item entities.
+ */
+function field_collection_item_load_multiple($ids = array(), $conditions = array(), $reset = FALSE) {
+  return entity_load('field_collection_item', $ids, $conditions, $reset);
+}
+
+/**
+ * Class for field_collection_item entities.
+ */
+class FieldCollectionItemEntity extends Entity {
+
+  /**
+   * Field collection field info.
+   *
+   * @var array
+   */
+  protected $fieldInfo;
+
+  /**
+   * The host entity object.
+   *
+   * @var object
+   */
+  protected $hostEntity;
+
+  /**
+   * The host entity ID.
+   *
+   * @var integer
+   */
+  protected $hostEntityId;
+
+  /**
+   * The host entity revision ID if this is not the default revision.
+   *
+   * @var integer
+   */
+  protected $hostEntityRevisionId;
+
+  /**
+   * The host entity type.
+   *
+   * @var string
+   */
+  protected $hostEntityType;
+
+  /**
+   * The language under which the field collection item is stored.
+   *
+   * @var string
+   */
+  protected $langcode = LANGUAGE_NONE;
+
+  /**
+   * Entity ID.
+   *
+   * @var integer
+   */
+  public $item_id;
+
+  /**
+   * Field collection revision ID.
+   *
+   * @var integer
+   */
+  public $revision_id;
+
+  /**
+   * The name of the field-collection field this item is associated with.
+   *
+   * @var string
+   */
+  public $field_name;
+
+  /**
+   * Whether this revision is the default revision.
+   *
+   * @var bool
+   */
+  public $default_revision = TRUE;
+
+  /**
+   * Whether the field collection item is archived, i.e. not in use.
+   *
+   * @see FieldCollectionItemEntity::isInUse()
+   * @var bool
+   */
+  public $archived = FALSE;
+
+  /**
+   * Constructs the entity object.
+   */
+  public function __construct(array $values = array(), $entityType = NULL) {
+    parent::__construct($values, 'field_collection_item');
+    // Workaround issues http://drupal.org/node/1084268 and
+    // http://drupal.org/node/1264440:
+    // Check if the required property is set before checking for the field's
+    // type. If the property is not set, we are hitting a PDO or a core's bug.
+    // FIXME: Remove when #1264440 is fixed and the required PHP version is
+    //  properly identified and documented in the module documentation.
+    if (isset($this->field_name)) {
+      // Ok, we have the field name property, we can proceed and check the field's type
+      $field_info = $this->fieldInfo();
+      if (!$field_info || $field_info['type'] != 'field_collection') {
+        throw new Exception("Invalid field name given: {$this->field_name} is not a Field Collection field.");
+      }
+    }
+  }
+
+  /**
+   * Provides info about the field on the host entity, which embeds this
+   * field collection item.
+   */
+  public function fieldInfo() {
+    return field_info_field($this->field_name);
+  }
+
+  /**
+   * Provides info of the field instance containing the reference to this
+   * field collection item.
+   */
+  public function instanceInfo() {
+    if ($this->fetchHostDetails()) {
+      return field_info_instance($this->hostEntityType(), $this->field_name, $this->hostEntityBundle());
+    }
+  }
+
+  /**
+   * Returns the field instance label translated to interface language.
+   */
+  public function translatedInstanceLabel($langcode = NULL) {
+    if ($info = $this->instanceInfo()) {
+      if (module_exists('i18n_field')) {
+        return i18n_string("field:{$this->field_name}:{$info['bundle']}:label", $info['label'], array('langcode' => $langcode));
+      }
+      return $info['label'];
+    }
+  }
+
+  /**
+   * Specifies the default label, which is picked up by label() by default.
+   */
+  public function defaultLabel() {
+    // @todo make configurable.
+    if ($this->fetchHostDetails()) {
+      $field = $this->fieldInfo();
+      $label = $this->translatedInstanceLabel();
+
+      if ($field['cardinality'] == 1) {
+        return $label;
+      }
+      elseif ($this->item_id) {
+        return t('!instance_label @count', array('!instance_label' => $label, '@count' => $this->delta() + 1));
+      }
+      else {
+        return t('New !instance_label', array('!instance_label' => $label));
+      }
+    }
+    return t('Unconnected field collection item');
+  }
+
+  /**
+   * Returns the path used to view the entity.
+   */
+  public function path() {
+    if ($this->item_id) {
+      return field_collection_field_get_path($this->fieldInfo()) . '/' . $this->item_id;
+    }
+  }
+
+  /**
+   * Returns the URI as returned by entity_uri().
+   */
+  public function defaultUri() {
+    return array(
+      'path' => $this->path(),
+    );
+  }
+
+  /**
+   * Sets the host entity. Only possible during creation of a item.
+   *
+   * @param $create_link
+   *   (optional) Whether a field-item linking the host entity to the field
+   *   collection item should be created.
+   */
+  public function setHostEntity($entity_type, $entity, $langcode = LANGUAGE_NONE, $create_link = TRUE) {
+    if (!empty($this->is_new)) {
+      $this->hostEntityType = $entity_type;
+      $this->hostEntity = $entity;
+      $this->langcode = $langcode;
+
+      list($this->hostEntityId, $this->hostEntityRevisionId) = entity_extract_ids($this->hostEntityType, $this->hostEntity);
+      // If the host entity is not saved yet, set the id to FALSE. So
+      // fetchHostDetails() does not try to load the host entity details.
+      if (!isset($this->hostEntityId)) {
+        $this->hostEntityId = FALSE;
+      }
+      // We are create a new field collection for a non-default entity, thus
+      // set archived to TRUE.
+      if (!entity_revision_is_default($entity_type, $entity)) {
+        $this->hostEntityId = FALSE;
+        $this->archived = TRUE;
+      }
+      if ($create_link) {
+        $entity->{$this->field_name}[$this->langcode][] = array('entity' => $this);
+      }
+    }
+    else {
+      throw new Exception('The host entity may be set only during creation of a field collection item.');
+    }
+  }
+
+  /**
+   * Updates the wrapped host entity object.
+   *
+   * @param $entity
+   */
+  public function updateHostEntity($entity) {
+    $this->fetchHostDetails();
+    list($recieved_id) = entity_extract_ids($this->hostEntityType, $entity);
+
+    if ($this->isInUse()) {
+      $current_id = $this->hostEntityId;
+    }
+    else {
+      $current_host = entity_revision_load($this->hostEntityType, $this->hostEntityRevisionId);
+      list($current_id) = entity_extract_ids($this->hostEntityType, $current_host);
+    }
+
+    if ($current_id == $recieved_id) {
+      $this->hostEntity = $entity;
+      $delta = $this->delta();
+      if (isset($entity->{$this->field_name}[$this->langcode][$delta]['entity'])) {
+        $entity->{$this->field_name}[$this->langcode][$delta]['entity'] = $entity;
+      }
+    }
+    else {
+      throw new Exception('The host entity cannot be changed.');
+    }
+  }
+
+  /**
+   * Returns the host entity, which embeds this field collection item.
+   */
+  public function hostEntity() {
+    if ($this->fetchHostDetails()) {
+      if (!isset($this->hostEntity) && $this->isInUse()) {
+        $this->hostEntity = entity_load_single($this->hostEntityType, $this->hostEntityId);
+      }
+      elseif (!isset($this->hostEntity) && $this->hostEntityRevisionId) {
+        $this->hostEntity = entity_revision_load($this->hostEntityType, $this->hostEntityRevisionId);
+      }
+      return $this->hostEntity;
+    }
+  }
+
+  /**
+   * Returns the entity type of the host entity, which embeds this
+   * field collection item.
+   */
+  public function hostEntityType() {
+    if ($this->fetchHostDetails()) {
+      return $this->hostEntityType;
+    }
+  }
+
+  /**
+   * Returns the id of the host entity, which embeds this field collection item.
+   */
+  public function hostEntityId() {
+    if ($this->fetchHostDetails()) {
+      if (!$this->hostEntityId && $this->hostEntityRevisionId) {
+        $this->hostEntityId = entity_id($this->hostEntityType, $this->hostEntity());
+      }
+      return $this->hostEntityId;
+    }
+  }
+
+  /**
+   * Returns the bundle of the host entity, which embeds this field collection
+   * item.
+   */
+  public function hostEntityBundle() {
+    if ($entity = $this->hostEntity()) {
+      list($id, $rev_id, $bundle) = entity_extract_ids($this->hostEntityType, $entity);
+      return $bundle;
+    }
+  }
+
+  protected function fetchHostDetails() {
+    if (!isset($this->hostEntityId)) {
+      if ($this->item_id) {
+        // For saved field collections, query the field data to determine the
+        // right host entity.
+        $query = new EntityFieldQuery();
+        $query->fieldCondition($this->fieldInfo(), 'revision_id', $this->revision_id);
+        if (!$this->isInUse()) {
+          $query->age(FIELD_LOAD_REVISION);
+        }
+        $result = $query->execute();
+        list($this->hostEntityType, $data) = each($result);
+
+        if ($this->isInUse()) {
+          $this->hostEntityId = $data ? key($data) : FALSE;
+          $this->hostEntityRevisionId = FALSE;
+        }
+        // If we are querying for revisions, we get the revision ID.
+        else {
+          $this->hostEntityId = FALSE;
+          $this->hostEntityRevisionId = $data ? key($data) : FALSE;
+        }
+      }
+      else {
+        // No host entity available yet.
+        $this->hostEntityId = FALSE;
+      }
+    }
+    return !empty($this->hostEntityId) || !empty($this->hostEntity) || !empty($this->hostEntityRevisionId);
+  }
+
+  /**
+   * Determines the $delta of the reference pointing to this field collection
+   * item.
+   */
+  public function delta() {
+    if (($entity = $this->hostEntity()) && isset($entity->{$this->field_name})) {
+      foreach ($entity->{$this->field_name} as $langcode => &$data) {
+        foreach ($data as $delta => $item) {
+          if (isset($item['value']) && $item['value'] == $this->item_id) {
+            $this->langcode = $langcode;
+            return $delta;
+          }
+          elseif (isset($item['entity']) && $item['entity'] === $this) {
+            $this->langcode = $langcode;
+            return $delta;
+          }
+        }
+      }
+    }
+  }
+
+  /**
+   * Determines the language code under which the item is stored.
+   */
+  public function langcode() {
+    if ($this->delta() !== NULL) {
+      return $this->langcode;
+    }
+  }
+
+  /**
+   * Determines whether this field collection item revision is in use.
+   *
+   * Field collection items may be contained in from non-default host entity
+   * revisions. If the field collection item does not appear in the default
+   * host entity revision, the item is actually not used by default and so
+   * marked as 'archived'.
+   * If the field collection item appears in the default revision of the host
+   * entity, the default revision of the field collection item is in use there
+   * and the collection is not marked as archived.
+   */
+  public function isInUse() {
+    return $this->default_revision && !$this->archived;
+  }
+
+  /**
+   * Save the field collection item.
+   *
+   * By default, always save the host entity, so modules are able to react
+   * upon changes to the content of the host and any 'last updated' dates of
+   * entities get updated.
+   *
+   * For creating an item a host entity has to be specified via setHostEntity()
+   * before this function is invoked. For the link between the entities to be
+   * fully established, the host entity object has to be updated to include a
+   * reference on this field collection item during saving. So do not skip
+   * saving the host for creating items.
+   *
+   * @param $skip_host_save
+   *   (internal) If TRUE is passed, the host entity is not saved automatically
+   *   and therefore no link is created between the host and the item or
+   *   revision updates might be skipped. Use with care.
+   */
+  public function save($skip_host_save = FALSE) {
+    // Make sure we have a host entity during creation.
+    if (!empty($this->is_new) && !(isset($this->hostEntityId) || isset($this->hostEntity) || isset($this->hostEntityRevisionId))) {
+      throw new Exception("Unable to create a field collection item without a given host entity.");
+    }
+
+    // Only save directly if we are told to skip saving the host entity. Else,
+    // we always save via the host as saving the host might trigger saving
+    // field collection items anyway (e.g. if a new revision is created).
+    if ($skip_host_save) {
+      return entity_get_controller($this->entityType)->save($this);
+    }
+    else {
+      $host_entity = $this->hostEntity();
+      if (!$host_entity) {
+        throw new Exception("Unable to save a field collection item without a valid reference to a host entity.");
+      }
+      // If this is creating a new revision, also do so for the host entity.
+      if (!empty($this->revision) || !empty($this->is_new_revision)) {
+        $host_entity->revision = TRUE;
+        if (!empty($this->default_revision)) {
+          entity_revision_set_default($this->hostEntityType, $host_entity);
+        }
+      }
+      // Set the host entity reference, so the item will be saved with the host.
+      // @see field_collection_field_presave()
+      $delta = $this->delta();
+      if (isset($delta)) {
+        $host_entity->{$this->field_name}[$this->langcode][$delta] = array('entity' => $this);
+      }
+      else {
+        $host_entity->{$this->field_name}[$this->langcode][] =  array('entity' => $this);
+      }
+      return entity_save($this->hostEntityType, $host_entity);
+    }
+  }
+
+  /**
+   * Deletes the field collection item and the reference in the host entity.
+   */
+  public function delete() {
+    parent::delete();
+    $this->deleteHostEntityReference();
+  }
+
+  /**
+   * Deletes the host entity's reference of the field collection item.
+   */
+  protected function deleteHostEntityReference() {
+    $delta = $this->delta();
+    if ($this->item_id && isset($delta)) {
+      unset($this->hostEntity->{$this->field_name}[$this->langcode][$delta]);
+      entity_save($this->hostEntityType, $this->hostEntity);
+    }
+  }
+
+  /**
+   * Intelligently delete a field collection item revision.
+   *
+   * If a host entity is revisioned with its field collection items, deleting
+   * a field collection item on the default revision of the host should not
+   * delete the collection item from archived revisions too. Instead, we delete
+   * the current default revision and archive the field collection.
+   *
+   */
+  public function deleteRevision($skip_host_update = FALSE) {
+    if (!$this->revision_id) {
+      return;
+    }
+
+    if (!$skip_host_update) {
+      // Just remove the item from the host, which cares about deleting the
+      // item (depending on whether the update creates a new revision).
+      $this->deleteHostEntityReference();
+    }
+
+    if (!$this->isDefaultRevision()) {
+      entity_revision_delete('field_collection_item', $this->revision_id);
+    }
+    // If deleting the default revision, take care!
+    else {
+      $row = db_select('field_collection_item_revision', 'r')
+        ->fields('r')
+        ->condition('item_id', $this->item_id)
+        ->condition('revision_id', $this->revision_id, '<>')
+        ->execute()
+        ->fetchAssoc();
+      // If no other revision is left, delete. Else archive the item.
+      if (!$row) {
+        $this->delete();
+      }
+      else {
+        // Make the other revision the default revision and archive the item.
+        db_update('field_collection_item')
+          ->fields(array('archived' => 1, 'revision_id' => $row['revision_id']))
+          ->condition('item_id', $this->item_id)
+          ->execute();
+        entity_get_controller('field_collection_item')->resetCache(array($this->item_id));
+        entity_revision_delete('field_collection_item', $this->revision_id);
+      }
+    }
+  }
+
+  /**
+   * Export the field collection item.
+   *
+   * Since field collection entities are not directly exportable (i.e., do not
+   * have 'exportable' set to TRUE in hook_entity_info()) and since Features
+   * calls this method when exporting the field collection as a field attached
+   * to another entity, we return the export in the format expected by
+   * Features, rather than in the normal Entity::export() format.
+   */
+  public function export($prefix = '') {
+    // Based on code in EntityDefaultFeaturesController::export_render().
+    $export = "entity_import('" . $this->entityType() . "', '";
+    $export .= addcslashes(parent::export(), '\\\'');
+    $export .= "')";
+    return $export;
+  }
+
+  /**
+   * Magic method to only serialize what's necessary.
+   */
+  public function __sleep() {
+    $vars = get_object_vars($this);
+    unset($vars['entityInfo'], $vars['idKey'], $vars['nameKey'], $vars['statusKey']);
+    unset($vars['fieldInfo']);
+    // Also do not serialize the host entity, but only if it has already an id.
+    if ($this->hostEntity && ($this->hostEntityId || $this->hostEntityRevisionId)) {
+      unset($vars['hostEntity']);
+    }
+
+    // Also key the returned array with the variable names so the method may
+    // be easily overridden and customized.
+    return drupal_map_assoc(array_keys($vars));
+  }
+
+  /**
+   * Magic method to invoke setUp() on unserialization.
+   *
+   * @todo: Remove this once it appears in a released entity API module version.
+   */
+  public function __wakeup() {
+    $this->setUp();
+  }
+}
+
+/**
+ * Implements hook_menu().
+ */
+function field_collection_menu() {
+  $items = array();
+  if (module_exists('field_ui')) {
+    $items['admin/structure/field-collections'] = array(
+      'title' => 'Field collections',
+      'description' => 'Manage fields on field collections.',
+      'page callback' => 'field_collections_overview',
+      'access arguments' => array('administer field collections'),
+      'type' => MENU_NORMAL_ITEM,
+      'file' => 'field_collection.admin.inc',
+    );
+  }
+
+  // Add menu paths for viewing/editing/deleting field collection items.
+  foreach (field_info_fields() as $field) {
+    if ($field['type'] == 'field_collection') {
+      $path = field_collection_field_get_path($field);
+      $count = count(explode('/', $path));
+
+      $items[$path . '/%field_collection_item'] = array(
+        'page callback' => 'field_collection_item_page_view',
+        'page arguments' => array($count),
+        'access callback' => 'field_collection_item_access',
+        'access arguments' => array('view', $count),
+        'file' => 'field_collection.pages.inc',
+      );
+      $items[$path . '/%field_collection_item/view'] = array(
+        'title' => 'View',
+        'type' => MENU_DEFAULT_LOCAL_TASK,
+        'weight' => -10,
+      );
+      $items[$path . '/%field_collection_item/edit'] = array(
+        'page callback' => 'drupal_get_form',
+        'page arguments' => array('field_collection_item_form', $count),
+        'access callback' => 'field_collection_item_access',
+        'access arguments' => array('update', $count),
+        'title' => 'Edit',
+        'type' => MENU_LOCAL_TASK,
+        'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
+        'file' => 'field_collection.pages.inc',
+      );
+      $items[$path . '/%field_collection_item/delete'] = array(
+        'page callback' => 'drupal_get_form',
+        'page arguments' => array('field_collection_item_delete_confirm', $count),
+        'access callback' => 'field_collection_item_access',
+        'access arguments' => array('delete', $count),
+        'title' => 'Delete',
+        'type' => MENU_LOCAL_TASK,
+        'context' => MENU_CONTEXT_INLINE,
+        'file' => 'field_collection.pages.inc',
+      );
+      // Add entity type and the entity id as additional arguments.
+      $items[$path . '/add/%/%'] = array(
+        'page callback' => 'field_collection_item_add',
+        'page arguments' => array($field['field_name'], $count + 1, $count + 2),
+        // The pace callback takes care of checking access itself.
+        'access callback' => TRUE,
+        'file' => 'field_collection.pages.inc',
+      );
+      // Add menu items for dealing with revisions.
+      $items[$path . '/%field_collection_item/revisions/%field_collection_item_revision'] = array(
+        'page callback' => 'field_collection_item_page_view',
+        'page arguments' => array($count + 2),
+        'access callback' => 'field_collection_item_access',
+        'access arguments' => array('view', $count + 2),
+        'file' => 'field_collection.pages.inc',
+      );
+    }
+  }
+
+  $items['field_collection/ajax'] = array(
+    'title' => 'Remove item callback',
+    'page callback' => 'field_collection_remove_js',
+    'delivery callback' => 'ajax_deliver',
+    'access callback' => TRUE,
+    'theme callback' => 'ajax_base_page_theme',
+    'type' => MENU_CALLBACK,
+    'file path' => 'includes',
+    'file' => 'form.inc',
+  );
+
+  return $items;
+}
+
+/**
+ * Implements hook_menu_alter() to fix the field collections admin UI tabs.
+ */
+function field_collection_menu_alter(&$items) {
+  if (module_exists('field_ui') && isset($items['admin/structure/field-collections/%field_collection_field_name/fields'])) {
+    // Make the fields task the default local task.
+    $items['admin/structure/field-collections/%field_collection_field_name'] = $items['admin/structure/field-collections/%field_collection_field_name/fields'];
+    $item = &$items['admin/structure/field-collections/%field_collection_field_name'];
+    $item['type'] = MENU_NORMAL_ITEM;
+    $item['title'] = 'Manage fields';
+    $item['title callback'] = 'field_collection_admin_page_title';
+    $item['title arguments'] = array(3);
+
+    $items['admin/structure/field-collections/%field_collection_field_name/fields'] = array(
+      'title' => 'Manage fields',
+      'type' => MENU_DEFAULT_LOCAL_TASK,
+      'weight' => 1,
+    );
+  }
+}
+
+/**
+ * Menu title callback.
+ */
+function field_collection_admin_page_title($field_name) {
+  return t('Field collection @field_name', array('@field_name' => $field_name));
+}
+
+/**
+ * Implements hook_admin_paths().
+ */
+function field_collection_admin_paths() {
+  if (variable_get('node_admin_theme')) {
+    return array(
+      'field-collection/*/*/edit' => TRUE,
+      'field-collection/*/*/delete' => TRUE,
+      'field-collection/*/add/*/*' => TRUE,
+    );
+  }
+}
+
+/**
+ * Implements hook_permission().
+ */
+function field_collection_permission() {
+  return array(
+    'administer field collections' =>  array(
+      'title' => t('Administer field collections'),
+      'description' => t('Create and delete fields on field collections.'),
+    ),
+  );
+}
+
+/**
+ * Determines whether the given user has access to a field collection.
+ *
+ * @param $op
+ *   The operation being performed. One of 'view', 'update', 'create', 'delete'.
+ * @param $item
+ *   Optionally a field collection item. If nothing is given, access for all
+ *   items is determined.
+ * @param $account
+ *   The user to check for. Leave it to NULL to check for the global user.
+ * @return boolean
+ *   Whether access is allowed or not.
+ */
+function field_collection_item_access($op, FieldCollectionItemEntity $item = NULL, $account = NULL) {
+  // We do not support editing field collection revisions that are not used at
+  // the hosts default revision as saving the host might result in a new default
+  // revision.
+  if (isset($item) && !$item->isInUse() && $op != 'view') {
+    return FALSE;
+  }
+  if (user_access('administer field collections', $account)) {
+    return TRUE;
+  }
+  if (!isset($item)) {
+    return FALSE;
+  }
+  $op = $op == 'view' ? 'view' : 'edit';
+  // Access is determined by the entity and field containing the reference.
+  $field = field_info_field($item->field_name);
+  $entity_access = entity_access($op == 'view' ? 'view' : 'update', $item->hostEntityType(), $item->hostEntity(), $account);
+  return $entity_access && field_access($op, $field, $item->hostEntityType(), $item->hostEntity(), $account);
+}
+
+/**
+ * Deletion callback
+ */
+function field_collection_item_delete($id) {
+  $fci = field_collection_item_load($id);
+  $fci->delete();
+}
+
+/**
+ * Implements hook_theme().
+ */
+function field_collection_theme() {
+  return array(
+    'field_collection_item' => array(
+      'render element' => 'elements',
+      'template' => 'field-collection-item',
+    ),
+    'field_collection_view' => array(
+      'render element' => 'element',
+    ),
+  );
+}
+
+/**
+ * Implements hook_field_info().
+ */
+function field_collection_field_info() {
+  return array(
+    'field_collection' => array(
+      'label' => t('Field collection'),
+      'description' => t('This field stores references to embedded entities, which itself may contain any number of fields.'),
+      'instance_settings' => array(),
+      'default_widget' => 'field_collection_hidden',
+      'default_formatter' => 'field_collection_view',
+      // As of now there is no UI for setting the path.
+      'settings' => array(
+        'path' => '',
+        'hide_blank_items' => TRUE,
+      ),
+      // Add entity property info.
+      'property_type' => 'field_collection_item',
+      'property_callbacks' => array('field_collection_entity_metadata_property_callback'),
+    ),
+  );
+}
+
+/**
+ * Implements hook_field_instance_settings_form().
+ */
+function field_collection_field_instance_settings_form($field, $instance) {
+
+  $element['fieldset'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Default value'),
+    '#collapsible' => FALSE,
+    // As field_ui_default_value_widget() does, we change the #parents so that
+    // the value below is writing to $instance in the right location.
+    '#parents' => array('instance'),
+  );
+  // Be sure to set the default value to NULL, e.g. to repair old fields
+  // that still have one.
+  $element['fieldset']['default_value'] = array(
+    '#type' => 'value',
+    '#value' => NULL,
+  );
+  $element['fieldset']['content'] = array(
+    '#pre' => '<p>',
+    '#markup' => t('To specify a default value, configure it via the regular default value setting of each field that is part of the field collection. To do so, go to the <a href="!url">Manage fields</a> screen of the field collection.', array('!url' => url('admin/structure/field-collections/' . strtr($field['field_name'], array('_' => '-')) . '/fields'))),
+    '#suffix' => '</p>',
+  );
+  return $element;
+}
+
+/**
+ * Returns the base path to use for field collection items.
+ */
+function field_collection_field_get_path($field) {
+  if (empty($field['settings']['path'])) {
+    return 'field-collection/' . strtr($field['field_name'], array('_' => '-'));
+  }
+  return $field['settings']['path'];
+}
+
+/**
+ * Implements hook_field_settings_form().
+ */
+function field_collection_field_settings_form($field, $instance) {
+
+  $form['hide_blank_items'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Hide blank items'),
+    '#default_value' => $field['settings']['hide_blank_items'],
+    '#description' => t("A blank item is always added to any unlimited valued field's form. If checked, any additional blank items are hidden except of the first item which is always shown."),
+    '#weight' => 10,
+    '#states' => array(
+      // Show the setting if the cardinality is -1.
+      'visible' => array(
+        ':input[name="field[cardinality]"]' => array('value' => '-1'),
+      ),
+    ),
+  );
+  return $form;
+}
+
+/**
+ * Implements hook_field_insert().
+ */
+function field_collection_field_insert($host_entity_type, $host_entity, $field, $instance, $langcode, &$items) {
+  foreach ($items as &$item) {
+    if ($entity = field_collection_field_get_entity($item)) {
+      if (!empty($host_entity->is_new) && empty($entity->is_new)) {
+        // If the host entity is new but we have a field_collection that is not
+        // new, it means that its host is being cloned. Thus we need to clone
+        // the field collection entity as well.
+        $new_entity = clone $entity;
+        $new_entity->item_id = NULL;
+        $new_entity->revision_id = NULL;
+        $new_entity->is_new = TRUE;
+        $entity = $new_entity;
+      }
+      if (!empty($entity->is_new)) {
+        $entity->setHostEntity($host_entity_type, $host_entity, LANGUAGE_NONE, FALSE);
+      }
+      $entity->save(TRUE);
+      $item = array(
+        'value' => $entity->item_id,
+        'revision_id' => $entity->revision_id,
+      );
+    }
+  }
+}
+
+/**
+ * Implements hook_field_update().
+ *
+ * Care about removed field collection items.
+ * Support saving field collection items in @code $item['entity'] @endcode. This
+ * may be used to seamlessly create field collection items during host-entity
+ * creation or to save changes to the host entity and its collections at once.
+ */
+function field_collection_field_update($host_entity_type, $host_entity, $field, $instance, $langcode, &$items) {
+  // Prevent workbench moderation from deleting field collections on node_save()
+  // during workbench_moderation_store(), when $host_entity->revision == 0.
+  if (!empty($host_entity->workbench_moderation['updating_live_revision'])) {
+    return;
+  }
+
+  $items_original = !empty($host_entity->original->{$field['field_name']}[$langcode]) ? $host_entity->original->{$field['field_name']}[$langcode] : array();
+  $original_by_id = array_flip(field_collection_field_item_to_ids($items_original));
+
+  foreach ($items as &$item) {
+    // In case the entity has been changed / created, save it and set the id.
+    // If the host entity creates a new revision, save new item-revisions as
+    // well.
+    if (isset($item['entity']) || !empty($host_entity->revision)) {
+
+      if ($entity = field_collection_field_get_entity($item)) {
+
+        if (!empty($entity->is_new)) {
+          $entity->setHostEntity($host_entity_type, $host_entity, LANGUAGE_NONE, FALSE);
+        }
+
+        // If the host entity is saved as new revision, do the same for the item.
+        if (!empty($host_entity->revision)) {
+          $entity->revision = TRUE;
+          // Without this cache clear entity_revision_is_default will
+          // incorrectly return false here when creating a new published revision
+          if (!isset($cleared_host_entity_cache)) {
+            list($entity_id) = entity_extract_ids($host_entity_type, $host_entity);
+            entity_get_controller($host_entity_type)->resetCache(array($entity_id));
+            $cleared_host_entity_cache = true;
+          }
+          $is_default = entity_revision_is_default($host_entity_type, $host_entity);
+          // If an entity type does not support saving non-default entities,
+          // assume it will be saved as default.
+          if (!isset($is_default) || $is_default) {
+            $entity->default_revision = TRUE;
+            $entity->archived = FALSE;
+          }
+        }
+        $entity->save(TRUE);
+
+        $item = array(
+          'value' => $entity->item_id,
+          'revision_id' => $entity->revision_id,
+        );
+      }
+    }
+    unset($original_by_id[$item['value']]);
+  }
+
+  // If there are removed items, care about deleting the item entities.
+  if ($original_by_id) {
+    $ids = array_flip($original_by_id);
+
+    // If we are creating a new revision, the old-items should be kept but get
+    // marked as archived now.
+    if (!empty($host_entity->revision)) {
+      db_update('field_collection_item')
+        ->fields(array('archived' => 1))
+        ->condition('item_id', $ids, 'IN')
+        ->execute();
+    }
+    else {
+      // Delete unused field collection items now.
+      foreach (field_collection_item_load_multiple($ids) as $un_item) {
+        $un_item->updateHostEntity($host_entity);
+        $un_item->deleteRevision(TRUE);
+      }
+    }
+  }
+}
+
+/**
+ * Implements hook_field_delete().
+ */
+function field_collection_field_delete($entity_type, $entity, $field, $instance, $langcode, &$items) {
+  $ids = field_collection_field_item_to_ids($items);
+  // Also delete all embedded entities.
+  if ($ids && field_info_field($field['field_name'])) {
+    // We filter out entities that are still being referenced by other
+    // host-entities. This should never be the case, but it might happened e.g.
+    // when modules cloned a node without knowing about field-collection.
+    $entity_info = entity_get_info($entity_type);
+    $entity_id_name = $entity_info['entity keys']['id'];
+    $field_column = key($field['columns']);
+
+    foreach ($ids as $id_key => $id) {
+      $query = new EntityFieldQuery();
+      $entities = $query
+        ->fieldCondition($field['field_name'], $field_column, $id)
+        ->execute();
+      unset($entities[$entity_type][$entity->$entity_id_name]);
+
+      if (!empty($entities[$entity_type])) {
+        // Filter this $id out.
+        unset($ids[$id_key]);
+      }
+    }
+
+    entity_delete_multiple('field_collection_item', $ids);
+  }
+}
+
+/**
+ * Implements hook_field_delete_revision().
+ */
+function field_collection_field_delete_revision($entity_type, $entity, $field, $instance, $langcode, &$items) {
+  foreach ($items as $item) {
+    if (!empty($item['revision_id'])) {
+      if ($entity = field_collection_item_revision_load($item['revision_id'])) {
+        $entity->deleteRevision(TRUE);
+      }
+    }
+  }
+}
+
+/**
+ * Get an array of field collection item IDs stored in the given field items.
+ */
+function field_collection_field_item_to_ids($items) {
+  $ids = array();
+  foreach ($items as $item) {
+    if (!empty($item['value'])) {
+      $ids[] = $item['value'];
+    }
+  }
+  return $ids;
+}
+
+/**
+ * Implements hook_field_is_empty().
+ */
+function field_collection_field_is_empty($item, $field) {
+  if (!empty($item['value'])) {
+    return FALSE;
+  }
+  elseif (isset($item['entity'])) {
+    return field_collection_item_is_empty($item['entity']);
+  }
+  return TRUE;
+}
+
+/**
+ * Determines whether a field collection item entity is empty based on the collection-fields.
+ */
+function field_collection_item_is_empty(FieldCollectionItemEntity $item) {
+  $instances = field_info_instances('field_collection_item', $item->field_name);
+  $is_empty = TRUE;
+
+  foreach ($instances as $instance) {
+    $field_name = $instance['field_name'];
+    $field = field_info_field($field_name);
+
+    // Determine the list of languages to iterate on.
+    $languages = field_available_languages('field_collection_item', $field);
+
+    foreach ($languages as $langcode) {
+      if (!empty($item->{$field_name}[$langcode])) {
+        // If at least one collection-field is not empty; the
+        // field collection item is not empty.
+        foreach ($item->{$field_name}[$langcode] as $field_item) {
+          if (!module_invoke($field['module'], 'field_is_empty', $field_item, $field)) {
+            $is_empty = FALSE;
+          }
+        }
+      }
+    }
+  }
+
+  // Allow other modules a chance to alter the value before returning.
+  drupal_alter('field_collection_is_empty', $is_empty, $item);
+  return $is_empty;
+}
+
+/**
+ * Implements hook_field_formatter_info().
+ */
+function field_collection_field_formatter_info() {
+  return array(
+    'field_collection_list' => array(
+      'label' => t('Links to field collection items'),
+      'field types' => array('field_collection'),
+      'settings' =>  array(
+        'edit' => t('Edit'),
+        'delete' => t('Delete'),
+        'add' => t('Add'),
+        'description' => TRUE,
+      ),
+    ),
+    'field_collection_view' => array(
+      'label' => t('Field collection items'),
+      'field types' => array('field_collection'),
+      'settings' =>  array(
+        'edit' => t('Edit'),
+        'delete' => t('Delete'),
+        'add' => t('Add'),
+        'description' => TRUE,
+        'view_mode' => 'full',
+      ),
+    ),
+    'field_collection_fields' => array(
+      'label' => t('Fields only'),
+      'field types' => array('field_collection'),
+      'settings' =>  array(
+        'view_mode' => 'full',
+      ),
+    ),
+  );
+}
+
+/**
+ * Implements hook_field_formatter_settings_form().
+ */
+function field_collection_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) {
+  $display = $instance['display'][$view_mode];
+  $settings = $display['settings'];
+  $elements = array();
+
+  if ($display['type'] != 'field_collection_fields') {
+    $elements['edit'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Edit link title'),
+      '#default_value' => $settings['edit'],
+      '#description' => t('Leave the title empty, to hide the link.'),
+    );
+    $elements['delete'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Delete link title'),
+      '#default_value' => $settings['delete'],
+      '#description' => t('Leave the title empty, to hide the link.'),
+    );
+    $elements['add'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Add link title'),
+      '#default_value' => $settings['add'],
+      '#description' => t('Leave the title empty, to hide the link.'),
+    );
+    $elements['description'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Show the field description beside the add link.'),
+      '#default_value' => $settings['description'],
+      '#description' => t('If enabled and the add link is shown, the field description is shown in front of the add link.'),
+    );
+  }
+
+  // Add a select form element for view_mode if viewing the rendered field_collection.
+  if ($display['type'] !== 'field_collection_list') {
+
+    $entity_type = entity_get_info('field_collection_item');
+    $options = array();
+    foreach ($entity_type['view modes'] as $mode => $info) {
+      $options[$mode] = $info['label'];
+    }
+
+    $elements['view_mode'] = array(
+      '#type' => 'select',
+      '#title' => t('View mode'),
+      '#options' => $options,
+      '#default_value' => $settings['view_mode'],
+      '#description' => t('Select the view mode'),
+    );
+  }
+
+  return $elements;
+}
+
+/**
+ * Implements hook_field_formatter_settings_summary().
+ */
+function field_collection_field_formatter_settings_summary($field, $instance, $view_mode) {
+  $display = $instance['display'][$view_mode];
+  $settings = $display['settings'];
+  $output = array();
+
+  if ($display['type'] !== 'field_collection_fields') {
+    $links = array_filter(array_intersect_key($settings, array_flip(array('add', 'edit', 'delete'))));
+    if ($links) {
+      $output[] = t('Links: @links', array('@links' => check_plain(implode(', ', $links))));
+    }
+    else {
+      $output[] = t('Links: none');
+    }
+  }
+
+  if ($display['type'] !== 'field_collection_list') {
+    $entity_type = entity_get_info('field_collection_item');
+    if (!empty($entity_type['view modes'][$settings['view_mode']]['label'])) {
+      $output[] =  t('View mode: @mode', array('@mode' => $entity_type['view modes'][$settings['view_mode']]['label']));
+    }
+  }
+
+  return implode('<br>', $output);
+}
+
+/**
+ * Implements hook_field_formatter_view().
+ */
+function field_collection_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
+  $element = array();
+  $settings = $display['settings'];
+
+  switch ($display['type']) {
+    case 'field_collection_list':
+
+      foreach ($items as $delta => $item) {
+        if ($field_collection = field_collection_field_get_entity($item)) {
+          $output = l($field_collection->label(), $field_collection->path());
+          $links = array();
+          foreach (array('edit', 'delete') as $op) {
+            if ($settings[$op] && field_collection_item_access($op == 'edit' ? 'update' : $op, $field_collection)) {
+              $title = entity_i18n_string("field:{$field['field_name']}:{$instance['bundle']}:setting_$op", $settings[$op]);
+              $links[] = l($title, $field_collection->path() . '/' . $op, array('query' => drupal_get_destination()));
+            }
+          }
+          if ($links) {
+            $output .= ' (' . implode('|', $links) . ')';
+          }
+          $element[$delta] = array('#markup' => $output);
+        }
+      }
+      field_collection_field_formatter_links($element, $entity_type, $entity, $field, $instance, $langcode, $items, $display);
+      break;
+
+    case 'field_collection_view':
+
+      $view_mode = !empty($display['settings']['view_mode']) ? $display['settings']['view_mode'] : 'full';
+      foreach ($items as $delta => $item) {
+        if ($field_collection = field_collection_field_get_entity($item)) {
+          $element[$delta]['entity'] = $field_collection->view($view_mode);
+          $element[$delta]['#theme_wrappers'] = array('field_collection_view');
+          $element[$delta]['#attributes']['class'][] = 'field-collection-view';
+          $element[$delta]['#attributes']['class'][] = 'clearfix';
+          $element[$delta]['#attributes']['class'][] = drupal_clean_css_identifier('view-mode-' . $view_mode);
+
+          $links = array(
+            '#theme' => 'links__field_collection_view',
+          );
+          $links['#attributes']['class'][] = 'field-collection-view-links';
+          foreach (array('edit', 'delete') as $op) {
+            if ($settings[$op] && field_collection_item_access($op == 'edit' ? 'update' : $op, $field_collection)) {
+              $links['#links'][$op] = array(
+                'title' => entity_i18n_string("field:{$field['field_name']}:{$instance['bundle']}:setting_$op", $settings[$op]),
+                'href' => $field_collection->path() . '/' . $op,
+                'query' => drupal_get_destination(),
+              );
+            }
+          }
+          $element[$delta]['links'] = $links;
+        }
+      }
+      field_collection_field_formatter_links($element, $entity_type, $entity, $field, $instance, $langcode, $items, $display);
+      if (!empty($items) || !empty($element['#suffix'])) {
+        $element['#attached']['css'][] = drupal_get_path('module', 'field_collection') . '/field_collection.theme.css';
+      }
+      break;
+
+    case 'field_collection_fields':
+
+      $view_mode = !empty($display['settings']['view_mode']) ? $display['settings']['view_mode'] : 'full';
+      foreach ($items as $delta => $item) {
+        if ($field_collection = field_collection_field_get_entity($item)) {
+          $element[$delta]['entity'] = $field_collection->view($view_mode);
+        }
+      }
+      break;
+  }
+
+  return $element;
+}
+
+/**
+ * Helper function to add links to a field collection field.
+ */
+function field_collection_field_formatter_links(&$element, $entity_type, $entity, $field, $instance, $langcode, $items, $display) {
+  $settings = $display['settings'];
+  $allow_create_item = FALSE;
+
+  if ($settings['add'] && ($field['cardinality'] == FIELD_CARDINALITY_UNLIMITED || count($items) < $field['cardinality'])) {
+    // Check whether the current is allowed to create a new item.
+    $field_collection_item = entity_create('field_collection_item', array('field_name' => $field['field_name']));
+    $field_collection_item->setHostEntity($entity_type, $entity, LANGUAGE_NONE, FALSE);
+
+    if (field_collection_item_access('create', $field_collection_item)) {
+      $allow_create_item = TRUE;
+      $path = field_collection_field_get_path($field);
+      list($id) = entity_extract_ids($entity_type, $entity);
+      $element['#suffix'] = '';
+      if (!empty($settings['description'])) {
+        $element['#suffix'] .= '<div class="description field-collection-description">' . field_filter_xss($instance['description']) . '</div>';
+      }
+      $title = entity_i18n_string("field:{$field['field_name']}:{$instance['bundle']}:setting_add", $settings['add']);
+      $add_path = $path . '/add/' . $entity_type . '/' . $id;
+      $element['#suffix'] .= '<ul class="action-links action-links-field-collection-add"><li>';
+      $element['#suffix'] .= l($title, $add_path, array('query' => drupal_get_destination()));
+      $element['#suffix'] .= '</li></ul>';
+    }
+  }
+  // If there is no add link, add a special class to the last item.
+  if (!empty($items) || $allow_create_item) {
+    if (empty($element['#suffix'])) {
+      $index = count(element_children($element)) - 1;
+      $element[$index]['#attributes']['class'][] = 'field-collection-view-final';
+    }
+
+    $element += array('#prefix' => '', '#suffix' => '');
+    $element['#prefix'] .= '<div class="field-collection-container clearfix">';
+    $element['#suffix'] .= '</div>';
+  }
+
+  return $element;
+}
+
+/**
+ * Themes field collection items printed using the field_collection_view formatter.
+ */
+function theme_field_collection_view($variables) {
+  $element = $variables['element'];
+  return '<div' . drupal_attributes($element['#attributes']) . '>' . $element['#children'] . '</div>';
+}
+
+/**
+ * Implements hook_field_widget_info().
+ */
+function field_collection_field_widget_info() {
+  return array(
+    'field_collection_hidden' => array(
+      'label' => t('Hidden'),
+      'field types' => array('field_collection'),
+      'behaviors' => array(
+        'multiple values' => FIELD_BEHAVIOR_CUSTOM,
+        'default value' => FIELD_BEHAVIOR_NONE,
+      ),
+    ),
+    'field_collection_embed' => array(
+      'label' => t('Embedded'),
+      'field types' => array('field_collection'),
+      'behaviors' => array(
+        'multiple values' => FIELD_BEHAVIOR_DEFAULT,
+        'default value' => FIELD_BEHAVIOR_NONE,
+      ),
+    ),
+  );
+}
+
+/**
+ * Implements hook_field_widget_form().
+ */
+function field_collection_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
+  static $recursion = 0;
+
+  switch ($instance['widget']['type']) {
+    case 'field_collection_hidden':
+      return $element;
+
+    case 'field_collection_embed':
+      // If the field collection item form contains another field collection,
+      // we might ran into a recursive loop. Prevent that.
+      if ($recursion++ > 3) {
+        drupal_set_message(t('The field collection item form has not been embedded to avoid recursive loops.'), 'error');
+        return $element;
+      }
+      $field_parents = $element['#field_parents'];
+      $field_name = $element['#field_name'];
+      $language = $element['#language'];
+
+      // Nest the field collection item entity form in a dedicated parent space,
+      // by appending [field_name, langcode, delta] to the current parent space.
+      // That way the form values of the field collection item are separated.
+      $parents = array_merge($field_parents, array($field_name, $language, $delta));
+
+      $element += array(
+        '#element_validate' => array('field_collection_field_widget_embed_validate'),
+        '#parents' => $parents,
+      );
+
+      if ($field['cardinality'] == 1) {
+        $element['#type'] = 'fieldset';
+      }
+
+      $field_state = field_form_get_state($field_parents, $field_name, $language, $form_state);
+
+      if (field_collection_hide_blank_items($field) && $delta == $field_state['items_count'] && $delta > 0) {
+        // Do not add a blank item. Also see
+        // field_collection_field_attach_form() for correcting #max_delta.
+        $recursion--;
+        return FALSE;
+      }
+      elseif (field_collection_hide_blank_items($field) && $field_state['items_count'] == 0) {
+        // We show one item, so also specify that as item count. So when the
+        // add button is pressed the item count will be 2 and we show to items.
+        $field_state['items_count'] = 1;
+      }
+
+      if (isset($field_state['entity'][$delta])) {
+        $field_collection_item = $field_state['entity'][$delta];
+      }
+      else {
+        if (isset($items[$delta])) {
+          $field_collection_item = field_collection_field_get_entity($items[$delta], $field_name);
+        }
+        // Show an empty collection if we have no existing one or it does not
+        // load.
+        if (empty($field_collection_item)) {
+          $field_collection_item = entity_create('field_collection_item', array('field_name' => $field_name));
+          $field_collection_item->setHostEntity($element['#entity_type'], $element['#entity']);
+        }
+
+        // Put our entity in the form state, so FAPI callbacks can access it.
+        $field_state['entity'][$delta] = $field_collection_item;
+      }
+
+      field_form_set_state($field_parents, $field_name, $language, $form_state, $field_state);
+      field_attach_form('field_collection_item', $field_collection_item, $element, $form_state, $language);
+
+      if (empty($element['#required'])) {
+        $element['#after_build'][] = 'field_collection_field_widget_embed_delay_required_validation';
+      }
+
+      if ($field['cardinality'] == FIELD_CARDINALITY_UNLIMITED) {
+        $element['remove_button'] = array(
+          '#delta' => $delta,
+          '#name' => implode('_', $parents) . '_remove_button',
+          '#type' => 'submit',
+          '#value' => t('Remove'),
+          '#validate' => array(),
+          '#submit' => array('field_collection_remove_submit'),
+          '#limit_validation_errors' => array(),
+          '#ajax' => array(
+            'path' => 'field_collection/ajax',
+            'effect' => 'fade',
+          ),
+          '#weight' => 1000,
+        );
+      }
+
+      $recursion--;
+      return $element;
+  }
+}
+
+/**
+ * Implements hook_field_attach_form().
+ *
+ * Corrects #max_delta when we hide the blank field collection item.
+ *
+ * @see field_add_more_js()
+ * @see field_collection_field_widget_form()
+ */
+function field_collection_field_attach_form($entity_type, $entity, &$form, &$form_state, $langcode) {
+
+  foreach (field_info_instances($entity_type, $form['#bundle']) as $field_name => $instance) {
+    $field = field_info_field($field_name);
+
+    if ($field['type'] == 'field_collection' && field_collection_hide_blank_items($field)
+        && field_access('edit', $field, $entity_type) && $instance['widget']['type'] == 'field_collection_embed') {
+
+      $element_langcode = $form[$field_name]['#language'];
+      if ($form[$field_name][$element_langcode]['#max_delta'] > 0) {
+        $form[$field_name][$element_langcode]['#max_delta']--;
+      }
+    }
+  }
+}
+
+/**
+ * Page callback to handle AJAX for removing a field collection item.
+ *
+ * This is a direct page callback. The actual job of deleting the item is
+ * done in the submit handler for the button, so all we really need to
+ * do is process the form and then generate output. We generate this
+ * output by doing a replace command on the id of the entire form element.
+ */
+function field_collection_remove_js() {
+  // drupal_html_id() very helpfully ensures that all html IDS are unique
+  // on a page. Unfortunately what it doesn't realize is that the IDs
+  // we are generating are going to replace IDs that already exist, so
+  // this actually works against us.
+  if (isset($_POST['ajax_html_ids'])) {
+    unset($_POST['ajax_html_ids']);
+  }
+
+  list($form, $form_state, $form_id, $form_build_id, $commands) = ajax_get_form();
+  drupal_process_form($form['#form_id'], $form, $form_state);
+
+  // Get the information on what we're removing.
+  $button = $form_state['triggering_element'];
+  // Go two levels up in the form, to the whole widget.
+  $element = drupal_array_get_nested_value($form, array_slice($button['#array_parents'], 0, -3));
+  // Now send back the proper AJAX command to replace it.
+  $commands[] = ajax_command_replace('#' . $element['#id'], drupal_render($element));
+  $return = array(
+    '#type' => 'ajax',
+    '#commands' => $commands,
+  );
+
+  // Because we're doing this ourselves, messages aren't automatic. We have
+  // to add them.
+  $messages = theme('status_messages');
+  if ($messages) {
+    $return['#commands'][] = ajax_command_prepend('#' . $element['#id'], $messages);
+  }
+
+  return $return;
+}
+
+/**
+ * Submit callback to remove an item from the field UI multiple wrapper.
+ *
+ * When a remove button is submitted, we need to find the item that it
+ * referenced and delete it. Since field UI has the deltas as a straight
+ * unbroken array key, we have to renumber everything down. Since we do this
+ * we *also* need to move all the deltas around in the $form_state['values'],
+ * $form_state['input'], and $form_state['field'] so that user changed values
+ * follow. This is a bit of a complicated process.
+ */
+function field_collection_remove_submit($form, &$form_state) {
+  $button = $form_state['triggering_element'];
+  $delta = $button['#delta'];
+
+  // Where in the form we'll find the parent element.
+  $address = array_slice($button['#array_parents'], 0, -2);
+
+  // Go one level up in the form, to the widgets container.
+  $parent_element = drupal_array_get_nested_value($form, $address);
+  $field_name = $parent_element['#field_name'];
+  $langcode = $parent_element['#language'];
+  $parents = $parent_element['#field_parents'];
+
+  $field_state = field_form_get_state($parents, $field_name, $langcode, $form_state);
+
+  // Go ahead and renumber everything from our delta to the last
+  // item down one. This will overwrite the item being removed.
+  for ($i = $delta; $i <= $field_state['items_count']; $i++) {
+    $old_element_address = array_merge($address, array($i + 1));
+    $new_element_address = array_merge($address, array($i));
+
+    $moving_element = drupal_array_get_nested_value($form, $old_element_address);
+    $moving_element_value = drupal_array_get_nested_value($form_state['values'], $old_element_address);
+    $moving_element_input = drupal_array_get_nested_value($form_state['input'], $old_element_address);
+    $moving_element_field = drupal_array_get_nested_value($form_state['field']['#parents'], $old_element_address);
+
+    // Tell the element where it's being moved to.
+    $moving_element['#parents'] = $new_element_address;
+
+    // Move the element around.
+    form_set_value($moving_element, $moving_element_value, $form_state);
+    drupal_array_set_nested_value($form_state['input'], $moving_element['#parents'], $moving_element_input);
+    drupal_array_set_nested_value($form_state['field']['#parents'], $moving_element['#parents'], $moving_element_field);
+
+    // Move the entity in our saved state.
+    if (isset($field_state['entity'][$i + 1])) {
+      $field_state['entity'][$i] = $field_state['entity'][$i + 1];
+    }
+    else {
+      unset($field_state['entity'][$i]);
+    }
+  }
+
+  // Replace the deleted entity with an empty one. This helps to ensure that
+  // trying to add a new entity won't ressurect a deleted entity from the
+  // trash bin.
+  $count = count($field_state['entity']);
+  $field_state['entity'][$count] = entity_create('field_collection_item', array('field_name' => $field_name));
+
+  // Then remove the last item. But we must not go negative.
+  if ($field_state['items_count'] > 0) {
+    $field_state['items_count']--;
+  }
+
+  // Fix the weights. Field UI lets the weights be in a range of
+  // (-1 * item_count) to (item_count). This means that when we remove one,
+  // the range shrinks; weights outside of that range then get set to
+  // the first item in the select by the browser, floating them to the top.
+  // We use a brute force method because we lost weights on both ends
+  // and if the user has moved things around, we have to cascade because
+  // if I have items weight weights 3 and 4, and I change 4 to 3 but leave
+  // the 3, the order of the two 3s now is undefined and may not match what
+  // the user had selected.
+  $input = drupal_array_get_nested_value($form_state['input'], $address);
+  // Sort by weight
+  uasort($input, '_field_sort_items_helper');
+
+  // Reweight everything in the correct order.
+  $weight = -1 * $field_state['items_count'];
+  foreach ($input as $key => $item) {
+    if ($item) {
+      $input[$key]['_weight'] = $weight++;
+    }
+  }
+
+  drupal_array_set_nested_value($form_state['input'], $address, $input);
+  field_form_set_state($parents, $field_name, $langcode, $form_state, $field_state);
+
+  $form_state['rebuild'] = TRUE;
+}
+
+/**
+ * Gets a field collection item entity for a given field item.
+ *
+ * @param $field_name
+ *   (optional) If given and there is no entity yet, a new entity object is
+ *   created for the given item.
+ *
+ * @return
+ *   The entity object or FALSE.
+ */
+function field_collection_field_get_entity(&$item, $field_name = NULL) {
+  if (isset($item['entity'])) {
+    return $item['entity'];
+  }
+  elseif (isset($item['value'])) {
+    // By default always load the default revision, so caches get used.
+    $entity = field_collection_item_load($item['value']);
+    if ($entity->revision_id != $item['revision_id']) {
+      // A non-default revision is a referenced, so load this one.
+      $entity = field_collection_item_revision_load($item['revision_id']);
+    }
+    return $entity;
+  }
+  elseif (!isset($item['entity']) && isset($field_name)) {
+    $item['entity'] = entity_create('field_collection_item', array('field_name' => $field_name));
+    return $item['entity'];
+  }
+  return FALSE;
+}
+
+/**
+ * FAPI #after_build of an individual field collection element to delay the validation of #required.
+ */
+function field_collection_field_widget_embed_delay_required_validation(&$element, &$form_state) {
+  // If the process_input flag is set, the form and its input is going to be
+  // validated. Prevent #required (sub)fields from throwing errors while
+  // their non-#required field collection item is empty.
+  if ($form_state['process_input']) {
+    _field_collection_collect_required_elements($element, $element['#field_collection_required_elements']);
+  }
+  return $element;
+}
+
+function _field_collection_collect_required_elements(&$element, &$required_elements) {
+  // Recurse through all children.
+  foreach (element_children($element) as $key) {
+    if (isset($element[$key]) && $element[$key]) {
+      _field_collection_collect_required_elements($element[$key], $required_elements);
+    }
+  }
+  if (!empty($element['#required'])) {
+    $element['#required'] = FALSE;
+    $required_elements[] = &$element;
+    $element += array('#pre_render' => array());
+    array_unshift($element['#pre_render'], 'field_collection_field_widget_render_required');
+  }
+}
+
+/**
+ * #pre_render callback that ensures the element is rendered as being required.
+ */
+function field_collection_field_widget_render_required($element) {
+  $element['#required'] = TRUE;
+  return $element;
+}
+
+/**
+ * FAPI validation of an individual field collection element.
+ */
+function field_collection_field_widget_embed_validate($element, &$form_state, $complete_form) {
+  $instance = field_widget_instance($element, $form_state);
+  $field = field_widget_field($element, $form_state);
+  $field_parents = $element['#field_parents'];
+  $field_name = $element['#field_name'];
+  $language = $element['#language'];
+
+  $field_state = field_form_get_state($field_parents, $field_name, $language, $form_state);
+  $field_collection_item = $field_state['entity'][$element['#delta']];
+
+  // Attach field API validation of the embedded form.
+  field_attach_form_validate('field_collection_item', $field_collection_item, $element, $form_state);
+
+  // Now validate required elements if the entity is not empty.
+  if (!field_collection_item_is_empty($field_collection_item) && !empty($element['#field_collection_required_elements'])) {
+    foreach ($element['#field_collection_required_elements'] as &$elements) {
+
+      // Copied from _form_validate().
+      // #1676206: Modified to support options widget.
+      if (isset($elements['#needs_validation'])) {
+        $is_empty_multiple = (!count($elements['#value']));
+        $is_empty_string = (is_string($elements['#value']) && drupal_strlen(trim($elements['#value'])) == 0);
+        $is_empty_value = ($elements['#value'] === 0);
+        $is_empty_option = (isset($elements['#options']['_none']) && $elements['#value'] == '_none');
+        if ($is_empty_multiple || $is_empty_string || $is_empty_value || $is_empty_option) {
+          if (isset($elements['#title'])) {
+            form_error($elements, t('@name field is required.', array('@name' => $elements['#title'])));
+          }
+          else {
+            form_error($elements);
+          }
+        }
+      }
+    }
+  }
+
+  // Only if the form is being submitted, finish the collection entity and
+  // prepare it for saving.
+  if ($form_state['submitted'] && !form_get_errors()) {
+
+    field_attach_submit('field_collection_item', $field_collection_item, $element, $form_state);
+
+    // Load initial form values into $item, so any other form values below the
+    // same parents are kept.
+    $item = drupal_array_get_nested_value($form_state['values'], $element['#parents']);
+
+    // Set the _weight if it is a multiple field.
+    if (isset($element['_weight']) && ($field['cardinality'] > 1 || $field['cardinality'] == FIELD_CARDINALITY_UNLIMITED)) {
+      $item['_weight'] = $element['_weight']['#value'];
+    }
+
+    // Put the field collection item in $item['entity'], so it is saved with
+    // the host entity via hook_field_presave() / field API if it is not empty.
+    // @see field_collection_field_presave()
+    $item['entity'] = $field_collection_item;
+    form_set_value($element, $item, $form_state);
+  }
+}
+
+/**
+ * Implements hook_field_create_field().
+ */
+function field_collection_field_create_field($field) {
+  if ($field['type'] == 'field_collection') {
+    field_attach_create_bundle('field_collection_item', $field['field_name']);
+
+    // Clear caches.
+    entity_info_cache_clear();
+    // Do not directly issue menu rebuilds here to avoid potentially multiple
+    // rebuilds. Instead, let menu_get_item() issue the rebuild on the next
+    // request.
+    variable_set('menu_rebuild_needed', TRUE);
+  }
+}
+
+/**
+ * Implements hook_field_delete_field().
+ */
+function field_collection_field_delete_field($field) {
+  if ($field['type'] == 'field_collection') {
+    // Notify field.module that field collection was deleted.
+    field_attach_delete_bundle('field_collection_item', $field['field_name']);
+
+    // Clear caches.
+    entity_info_cache_clear();
+    // Do not directly issue menu rebuilds here to avoid potentially multiple
+    // rebuilds. Instead, let menu_get_item() issue the rebuild on the next
+    // request.
+    variable_set('menu_rebuild_needed', TRUE);
+  }
+}
+
+/**
+ * Implements hook_i18n_string_list_{textgroup}_alter().
+ */
+function field_collection_i18n_string_list_field_alter(&$properties, $type, $instance) {
+  if ($type == 'field_instance') {
+    $field = field_info_field($instance['field_name']);
+
+    if ($field['type'] == 'field_collection' && !empty($instance['display'])) {
+
+      foreach ($instance['display'] as $view_mode => $display) {
+        if ($display['type'] != 'field_collection_fields') {
+          $display['settings'] += array('edit' => 'edit', 'delete' => 'delete', 'add' => 'add');
+
+          $properties['field'][$instance['field_name']][$instance['bundle']]['setting_edit'] = array(
+            'title' => t('Edit link title'),
+            'string' => $display['settings']['edit'],
+          );
+          $properties['field'][$instance['field_name']][$instance['bundle']]['setting_delete'] = array(
+            'title' => t('Delete link title'),
+            'string' => $display['settings']['delete'],
+          );
+          $properties['field'][$instance['field_name']][$instance['bundle']]['setting_add'] = array(
+            'title' => t('Add link title'),
+            'string' => $display['settings']['add'],
+          );
+        }
+      }
+    }
+  }
+}
+
+/**
+ * Implements hook_views_api().
+ */
+function field_collection_views_api() {
+  return array(
+    'api' => '3.0-alpha1',
+    'path' => drupal_get_path('module', 'field_collection') . '/views',
+  );
+}
+
+/**
+ * Implements hook_features_pipe_COMPONENT_alter() for field objects.
+ *
+ * This is used with Features v1.0 and v2.0 prior to beta2, newer releases
+ * separated the field_base from the field_instance so this won't be used.
+ *
+ * @see field_collection_features_pipe_field_instance_alter().
+ */
+function field_collection_features_pipe_field_alter(&$pipe, $data, $export) {
+  // Skip this if Features has been updated to v2.0-beta2 or newer as it will
+  // use the separate field_instance integration instead.
+  if (!function_exists('field_instance_features_export_options')) {
+    // Add the fields of the field collection entity to the pipe.
+    foreach ($data as $identifier) {
+      if (($field = features_field_load($identifier)) && $field['field_config']['type'] == 'field_collection') {
+        $fields = field_info_instances('field_collection_item', $field['field_config']['field_name']);
+        foreach ($fields as $name => $field) {
+          $pipe['field'][] = "{$field['entity_type']}-{$field['bundle']}-{$field['field_name']}";
+        }
+      }
+    }
+  }
+}
+
+/**
+ * Implements hook_features_pipe_COMPONENT_alter() for field_instance objects.
+ *
+ * This is used with Features v2.0-beta2 and newer.
+ */
+function field_collection_features_pipe_field_instance_alter(&$pipe, $data, $export) {
+  // Add the fields of the field collection entity to the pipe.
+  foreach ($data as $identifier) {
+    if (($field = features_field_load($identifier)) && $field['field_config']['type'] == 'field_collection') {
+      $fields = field_info_instances('field_collection_item', $field['field_config']['field_name']);
+      foreach ($fields as $name => $field) {
+        $pipe['field_instance'][] = "{$field['entity_type']}-{$field['bundle']}-{$field['field_name']}";
+      }
+    }
+  }
+}
+
+/**
+ * Callback for generating entity metadata property info for our field instances.
+ *
+ * @see field_collection_field_info()
+ */
+function field_collection_entity_metadata_property_callback(&$info, $entity_type, $field, $instance, $field_type) {
+  $property = &$info[$entity_type]['bundles'][$instance['bundle']]['properties'][$field['field_name']];
+  // Set the bundle as we know it is the name of the field.
+  $property['bundle'] = $field['field_name'];
+  $property['getter callback'] = 'field_collection_field_property_get';
+}
+
+/**
+ * Entity property info setter callback for the host entity property.
+ *
+ * As the property is of type entity, the value will be passed as a wrapped
+ * entity.
+ */
+function field_collection_item_set_host_entity($item, $property_name, $wrapper) {
+  if (empty($item->is_new)) {
+    throw new EntityMetadataWrapperException('The host entity may be set only during creation of a field collection item.');
+  }
+  if (!isset($wrapper->{$item->field_name})) {
+    throw new EntityMetadataWrapperException('The specified entity has no such field collection field.');
+  }
+  $item->setHostEntity($wrapper->type(), $wrapper->value());
+}
+
+/**
+ * Entity property info getter callback for the host entity property.
+ */
+function field_collection_item_get_host_entity($item) {
+  // As the property is defined as 'entity', we have to return a wrapped entity.
+  return entity_metadata_wrapper($item->hostEntityType(), $item->hostEntity());
+}
+
+/**
+ * Entity property info getter callback for the field collection items.
+ *
+ * Like entity_metadata_field_property_get(), but additionally supports getting
+ * not-yet saved collection items from @code $item['entity'] @endcode.
+ */
+function field_collection_field_property_get($entity, array $options, $name, $entity_type, $info) {
+  $field = field_info_field($name);
+  $langcode = field_language($entity_type, $entity, $name, isset($options['language']) ? $options['language']->language : NULL);
+  $values = array();
+  if (isset($entity->{$name}[$langcode])) {
+    foreach ($entity->{$name}[$langcode] as $delta => $data) {
+      // Wrappers do not support multiple entity references being revisions or
+      // not yet saved entities. In the case of a single reference we can return
+      // the entity object though.
+      if ($field['cardinality'] == 1) {
+        $values[$delta] = field_collection_field_get_entity($data);
+      }
+      elseif (isset($data['value'])) {
+        $values[$delta] = $data['value'];
+      }
+    }
+  }
+  // For an empty single-valued field, we have to return NULL.
+  return $field['cardinality'] == 1 ? ($values ? reset($values) : NULL) : $values;
+}
+
+/**
+ * Implements hook_devel_generate().
+ */
+function field_collection_devel_generate($object, $field, $instance, $bundle) {
+  // Create a new field collection object and add fake data to its fields.
+  $field_collection = entity_create('field_collection_item', array('field_name' => $field['field_name']));
+  $field_collection->language = $object->language;
+  $field_collection->setHostEntity($instance['entity_type'], $object, $object->language, FALSE);
+
+  devel_generate_fields($field_collection, 'field_collection_item', $field['field_name']);
+
+  $field_collection->save(TRUE);
+
+  return array(
+    'value' => $field_collection->item_id,
+    'revision_id' => $field_collection->revision_id,
+  );
+}
+
+/**
+ * Determines if the additional blank items should be displayed or not.
+ *
+ * @param array $field
+ *   The field info array.
+ *
+ * @return bool
+ *   TRUE if the additional blank items should be hidden, and FALSE if not.
+ */
+function field_collection_hide_blank_items($field) {
+  return !empty($field['settings']['hide_blank_items']) && $field['cardinality'] == FIELD_CARDINALITY_UNLIMITED;
+}

+ 139 - 0
sites/all/modules/contrib/fields/field_collection/field_collection.pages.inc

@@ -0,0 +1,139 @@
+<?php
+
+/**
+ * @file
+ * Provides the field collection item view / edit / delete pages.
+ */
+
+// TODO: fix being embedded in a host with revisions.
+
+/**
+ * Field collection item view page.
+ */
+function field_collection_item_page_view($field_collection_item) {
+  // @todo: Set breadcrumb including the host.
+  drupal_set_title($field_collection_item->label());
+  return $field_collection_item->view('full', NULL, TRUE);
+}
+
+/**
+ * Form for editing a field collection item.
+ * @todo implement hook_forms().
+ */
+function field_collection_item_form($form, &$form_state, $field_collection_item) {
+  if (!isset($field_collection_item->is_new)) {
+    drupal_set_title($field_collection_item->label());
+  }
+  $form_state += array('field_collection_item' => $field_collection_item);
+
+  // Hack: entity_form_field_validate() needs the bundle to be set.
+  // @todo: Fix core and remove the hack.
+  $form['field_name'] = array('#type' => 'value', '#value' => $field_collection_item->field_name);
+
+  field_attach_form('field_collection_item', $field_collection_item, $form, $form_state);
+
+  $form['actions'] = array('#type' => 'actions', '#weight' => 50);
+  $form['actions']['submit'] = array(
+    '#type' => 'submit',
+    '#value' => t('Save'),
+    '#weight' => 5,
+  );
+  return $form;
+}
+
+/**
+ * Validation callback.
+ */
+function field_collection_item_form_validate($form, &$form_state) {
+  entity_form_field_validate('field_collection_item', $form, $form_state);
+}
+
+/**
+ * Submit builder. Extracts the form values and updates the entity.
+ */
+function field_collection_item_form_submit_build_field_collection($form, $form_state) {
+  entity_form_submit_build_entity('field_collection_item', $form_state['field_collection_item'], $form, $form_state);
+  return $form_state['field_collection_item'];
+}
+
+/**
+ * Submit callback that permanently saves the changes to the entity.
+ */
+function field_collection_item_form_submit($form, &$form_state) {
+  $field_collection_item = field_collection_item_form_submit_build_field_collection($form, $form_state);
+  $field_collection_item->save();
+  drupal_set_message(t('The changes have been saved.'));
+  $form_state['redirect'] = $field_collection_item->path();
+}
+
+/**
+ * Form for deleting a field collection item.
+ */
+function field_collection_item_delete_confirm($form, &$form_state, $field_collection_item) {
+  $form_state += array('field_collection_item' => $field_collection_item);
+  return confirm_form($form,
+    t('Are you sure you want to delete %label?', array('%label' => $field_collection_item->label())),
+    $field_collection_item->path(),
+    t('This action cannot be undone.'),
+    t('Delete'),
+    t('Cancel')
+  );
+}
+
+/**
+ * Submit callback for deleting a field collection item.
+ */
+function field_collection_item_delete_confirm_submit($form, &$form_state) {
+  $field_collection_item = $form_state['field_collection_item'];
+  $field_collection_item->deleteRevision();
+  drupal_set_message(t('%label has been deleted.', array('%label' => drupal_ucfirst($field_collection_item->label()))));
+  $form_state['redirect'] = '<front>';
+}
+
+/**
+ * Add a new field collection item.
+ *
+ * @todo: Support optionally passing in the revision_id and langcode parameters.
+ */
+function field_collection_item_add($field_name, $entity_type, $entity_id, $revision_id = NULL, $langcode = NULL) {
+  $info = entity_get_info();
+  if (!isset($info[$entity_type])) {
+    return MENU_NOT_FOUND;
+  }
+  $result = entity_load($entity_type, array($entity_id));
+  $entity = reset($result);
+  if (!$entity) {
+    return MENU_NOT_FOUND;
+  }
+  // Ensure the given entity is of a bundle that has an instance of the field.
+  list($id, $rev_id, $bundle) = entity_extract_ids($entity_type, $entity);
+  $instance = field_info_instance($entity_type, $field_name, $bundle);
+  if (!$instance) {
+    return MENU_NOT_FOUND;
+  }
+
+  // Check field cardinality.
+  $field = field_info_field($field_name);
+  $langcode = LANGUAGE_NONE;
+  if (!($field['cardinality'] == FIELD_CARDINALITY_UNLIMITED || !isset($entity->{$field_name}[$langcode]) || count($entity->{$field_name}[$langcode]) < $field['cardinality'])) {
+    drupal_set_message(t('Too many items.'), 'error');
+    return '';
+  }
+
+  $field_collection_item = entity_create('field_collection_item', array('field_name' => $field_name));
+  // Do not link the field collection item with the host entity at this point,
+  // as during the form-workflow we have multiple field collection item entity
+  // instances, which we don't want link all with the host.
+  // That way the link is going to be created when the item is saved.
+  $field_collection_item->setHostEntity($entity_type, $entity, LANGUAGE_NONE, FALSE);
+
+  $label = $field_collection_item->translatedInstanceLabel();
+  $title = ($field['cardinality'] == 1) ? $label : t('Add new !instance_label', array('!instance_label' => $label));
+  drupal_set_title($title);
+
+  // Make sure the current user has access to create a field collection item.
+  if (!field_collection_item_access('create', $field_collection_item)) {
+    return MENU_ACCESS_DENIED;
+  }
+  return drupal_get_form('field_collection_item_form', $field_collection_item);
+}

+ 580 - 0
sites/all/modules/contrib/fields/field_collection/field_collection.test

@@ -0,0 +1,580 @@
+<?php
+
+/**
+ * @file
+ * field_collections tests.
+ */
+
+/**
+ * Test basics.
+ */
+class FieldCollectionBasicTestCase extends DrupalWebTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Field collection',
+      'description' => 'Tests creating and using field collections.',
+      'group' => 'Field types',
+    );
+  }
+
+  function setUp() {
+    parent::setUp('field_collection');
+
+    // Create a field_collection field to use for the tests.
+    $this->field_name = 'field_test_collection';
+    $this->field = array('field_name' => $this->field_name, 'type' => 'field_collection', 'cardinality' => 4);
+    $this->field = field_create_field($this->field);
+    $this->field_id = $this->field['id'];
+
+    $this->instance = array(
+      'field_name' => $this->field_name,
+      'entity_type' => 'node',
+      'bundle' => 'article',
+      'label' => $this->randomName() . '_label',
+      'description' => $this->randomName() . '_description',
+      'weight' => mt_rand(0, 127),
+      'settings' => array(),
+      'widget' => array(
+        'type' => 'hidden',
+        'label' => 'Test',
+        'settings' => array(),
+      ),
+    );
+    $this->instance = field_create_instance($this->instance);
+  }
+
+  /**
+   * Helper for creating a new node with a field collection item.
+   */
+  protected function createNodeWithFieldCollection() {
+    $node = $this->drupalCreateNode(array('type' => 'article'));
+    // Manually create a field_collection.
+    $entity = entity_create('field_collection_item', array('field_name' => $this->field_name));
+    $entity->setHostEntity('node', $node);
+    $entity->save();
+
+    return array($node, $entity);
+  }
+
+  /**
+   * Tests CRUD.
+   */
+  function testCRUD() {
+    list ($node, $entity) = $this->createNodeWithFieldCollection();
+    $node = node_load($node->nid, NULL, TRUE);
+    $this->assertEqual($entity->item_id, $node->{$this->field_name}[LANGUAGE_NONE][0]['value'], 'A field_collection has been successfully created and referenced.');
+    $this->assertEqual($entity->revision_id, $node->{$this->field_name}[LANGUAGE_NONE][0]['revision_id'], 'A field_collection has been successfully created and referenced.');
+
+    // Test adding an additional field_collection during node edit.
+    $entity2 = entity_create('field_collection_item', array('field_name' => $this->field_name));
+    $node->{$this->field_name}[LANGUAGE_NONE][] = array('entity' => $entity2);
+    node_save($node);
+
+    $node = node_load($node->nid, NULL, TRUE);
+    $this->assertTrue(!empty($entity2->item_id) && !empty($entity2->revision_id), 'Field_collection has been saved.');
+    $this->assertEqual($entity->item_id, $node->{$this->field_name}[LANGUAGE_NONE][0]['value'], 'Existing reference has been kept during update.');
+    $this->assertEqual($entity->revision_id, $node->{$this->field_name}[LANGUAGE_NONE][0]['revision_id'], 'Existing reference has been kept during update (revision).');
+    $this->assertEqual($entity2->item_id, $node->{$this->field_name}[LANGUAGE_NONE][1]['value'], 'New field_collection has been properly referenced');
+    $this->assertEqual($entity2->revision_id, $node->{$this->field_name}[LANGUAGE_NONE][1]['revision_id'], 'New field_collection has been properly referenced (revision)');
+
+    // Make sure deleting the field_collection removes the reference.
+    $entity2->delete();
+    $node = node_load($node->nid, NULL, TRUE);
+    $this->assertTrue(!isset($node->{$this->field_name}[LANGUAGE_NONE][1]), 'Reference correctly deleted.');
+
+    // Make sure field_collections are removed during deletion of the host.
+    node_delete($node->nid);
+    $this->assertTrue(entity_load('field_collection_item', FALSE) === array(), 'Field collections are deleted when the host is deleted.');
+
+    // Try deleting nodes with collections without any values.
+    $node = $this->drupalCreateNode(array('type' => 'article'));
+    node_delete($node->nid);
+    $this->assertTrue(node_load($node->nid, NULL, TRUE) == FALSE, 'Node without collection values deleted.');
+
+    // Test creating a field collection entity with a not-yet saved host entity.
+    $node = entity_create('node', array('type' => 'article'));
+    $entity = entity_create('field_collection_item', array('field_name' => $this->field_name));
+    $entity->setHostEntity('node', $node);
+    $entity->save();
+    // Now the node should have been saved with the collection and the link
+    // should have been established.
+    $this->assertTrue(!empty($node->nid), 'Node has been saved with the collection.');
+    $this->assertTrue(count($node->{$this->field_name}[LANGUAGE_NONE]) == 1 && !empty($node->{$this->field_name}[LANGUAGE_NONE][0]['value']) && !empty($node->{$this->field_name}[LANGUAGE_NONE][0]['revision_id']), 'Link has been established.');
+
+    // Again, test creating a field collection with a not-yet saved host entity,
+    // but this time save both entities via the host.
+    $node = entity_create('node', array('type' => 'article'));
+    $entity = entity_create('field_collection_item', array('field_name' => $this->field_name));
+    $entity->setHostEntity('node', $node);
+    node_save($node);
+    $this->assertTrue(!empty($entity->item_id) && !empty($entity->revision_id), 'Collection has been saved with the host.');
+    $this->assertTrue(count($node->{$this->field_name}[LANGUAGE_NONE]) == 1 && !empty($node->{$this->field_name}[LANGUAGE_NONE][0]['value']) && !empty($node->{$this->field_name}[LANGUAGE_NONE][0]['revision_id']), 'Link has been established.');
+
+    // Test Revisions.
+    list ($node, $item) = $this->createNodeWithFieldCollection();
+    $entity2 = entity_create('field_collection_item', array('field_name' => $this->field_name));
+    $node->{$this->field_name}[LANGUAGE_NONE][] = array('entity' => $entity2);
+    node_save($node);
+    $this->assertEqual($entity2->archived, FALSE, 'New field collection item with new content revision is not archived.');
+
+    // Test saving a new revision of a node.
+    $node->revision = TRUE;
+    node_save($node);
+    $item_updated = field_collection_item_load($node->{$this->field_name}[LANGUAGE_NONE][0]['value']);
+    $this->assertNotEqual($item->revision_id, $item_updated->revision_id, 'Creating a new host entity revision creates a new field collection revision.');
+
+    // Test saving a new revision with a new field collection item.
+    $node->revision = TRUE;
+
+    // Test saving the node without creating a new revision.
+    $item = $item_updated;
+    $node->revision = FALSE;
+    node_save($node);
+    $item_updated = field_collection_item_load($node->{$this->field_name}[LANGUAGE_NONE][0]['value']);
+    $this->assertEqual($item->revision_id, $item_updated->revision_id, 'Updating a new host entity  without creating a new revision does not create a new field collection revision.');
+
+    // Create a new revision of the node, such we have a non default node and
+    // field collection revision. Then test using it.
+    $vid = $node->vid;
+    $item_revision_id = $item_updated->revision_id;
+    $node->revision = TRUE;
+    node_save($node);
+
+    $item_updated = field_collection_item_load($node->{$this->field_name}[LANGUAGE_NONE][0]['value']);
+    $this->assertNotEqual($item_revision_id, $item_updated->revision_id, 'Creating a new host entity revision creates a new field collection revision.');
+    $this->assertTrue($item_updated->isDefaultRevision(), 'Field collection of default host entity revision is default too.');
+    $this->assertEqual($item_updated->hostEntityId(), $node->nid, 'Can access host entity ID of default field collection revision.');
+    $this->assertEqual($item_updated->hostEntity()->vid, $node->vid, 'Loaded default host entity revision.');
+
+    $item = entity_revision_load('field_collection_item', $item_revision_id);
+    $this->assertFalse($item->isDefaultRevision(), 'Field collection of non-default host entity is non-default too.');
+    $this->assertEqual($item->hostEntityId(), $node->nid, 'Can access host entity ID of non-default field collection revision.');
+    $this->assertEqual($item->hostEntity()->vid, $vid, 'Loaded non-default host entity revision.');
+
+    // Delete the non-default revision and make sure the field collection item
+    // revision has been deleted too.
+    entity_revision_delete('node', $vid);
+    $this->assertFalse(entity_revision_load('node', $vid), 'Host entity revision deleted.');
+    $this->assertFalse(entity_revision_load('field_collection_item', $item_revision_id), 'Field collection item revision deleted.');
+
+    // Test having archived field collections, i.e. collections referenced only
+    // in non-default revisions.
+    list ($node, $item) = $this->createNodeWithFieldCollection();
+    // Create two revisions.
+    $node_vid = $node->vid;
+    $node->revision = TRUE;
+    node_save($node);
+
+    $node_vid2 = $node->vid;
+    $node->revision = TRUE;
+    node_save($node);
+
+    // Now delete the field collection item for the default revision.
+    $item = field_collection_item_load($node->{$this->field_name}[LANGUAGE_NONE][0]['value']);
+    $item_revision_id = $item->revision_id;
+    $item->deleteRevision();
+    $node = node_load($node->nid);
+    $this->assertTrue(!isset($node->{$this->field_name}[LANGUAGE_NONE][0]), 'Field collection item revision removed from host.');
+    $this->assertFalse(field_collection_item_revision_load($item->revision_id), 'Field collection item default revision deleted.');
+
+    $item = field_collection_item_load($item->item_id);
+    $this->assertNotEqual($item->revision_id, $item_revision_id, 'Field collection default revision has been updated.');
+    $this->assertTrue($item->archived, 'Field collection item has been archived.');
+    $this->assertFalse($item->isInUse(), 'Field collection item specified as not in use.');
+    $this->assertTrue($item->isDefaultRevision(), 'Field collection of non-default host entity is default (but archived).');
+    $this->assertEqual($item->hostEntityId(), $node->nid, 'Can access host entity ID of non-default field collection revision.');
+    $this->assertEqual($item->hostEntity()->nid, $node->nid, 'Loaded non-default host entity revision.');
+
+    // Test deleting a revision of an archived field collection.
+    $node_revision2 = node_load($node->nid, $node_vid2);
+    $item = field_collection_item_revision_load($node_revision2->{$this->field_name}[LANGUAGE_NONE][0]['revision_id']);
+    $item->deleteRevision();
+    // There should be one revision left, so the item should still exist.
+    $item = field_collection_item_load($item->item_id);
+    $this->assertTrue($item->archived, 'Field collection item is still archived.');
+    $this->assertFalse($item->isInUse(), 'Field collection item specified as not in use.');
+
+    // Test that deleting the first node revision deletes the whole field
+    // collection item as it contains its last revision.
+    node_revision_delete($node_vid);
+    $this->assertFalse(field_collection_item_load($item->item_id), 'Archived field collection deleted when last revision deleted.');
+
+    // Test that removing a field-collection item also deletes it.
+    list ($node, $item) = $this->createNodeWithFieldCollection();
+
+    $node->{$this->field_name}[LANGUAGE_NONE] = array();
+    $node->revision = FALSE;
+    node_save($node);
+    $this->assertFalse(field_collection_item_load($item->item_id), 'Removed field collection item has been deleted.');
+
+    // Test removing a field-collection item while creating a new host revision.
+    list ($node, $item) = $this->createNodeWithFieldCollection();
+    $node->{$this->field_name}[LANGUAGE_NONE] = array();
+    $node->revision = TRUE;
+    node_save($node);
+    // Item should not be deleted but archived now.
+    $item = field_collection_item_load($item->item_id);
+    $this->assertTrue($item, 'Removed field collection item still exists.');
+    $this->assertTrue($item->archived, 'Removed field collection item is archived.');
+
+    // Test removing an old node revision. Make sure that the field collection
+    // is not removed
+    list ($node, $item) = $this->createNodeWithFieldCollection();
+    $node_vid = $node->vid;
+    $node->revision = TRUE;
+    node_save($node);
+    $node_vid2 = $node->vid;
+    $item_vid2 = $node->{$this->field_name}[LANGUAGE_NONE][0]['revision_id'];
+    node_revision_delete($node_vid);
+    $item2 = field_collection_item_revision_load($item_vid2);
+    $item_id2 = isset($item2->item_id) ? $item2->item_id : -1;
+    $this->assertEqual($item_id2, $item->item_id, 'Removing an old node revision does not delete newer field collection revisions');
+
+  }
+
+  /**
+   * Make sure the basic UI and access checks are working.
+   */
+  function testBasicUI() {
+    // Add a field to the collection.
+    $field = array(
+      'field_name' => 'field_text',
+      'type' => 'text',
+      'cardinality' => 1,
+      'translatable' => FALSE,
+    );
+    field_create_field($field);
+    $instance = array(
+      'entity_type' => 'field_collection_item',
+      'field_name' => 'field_text',
+      'bundle' => $this->field_name,
+      'label' => 'Test text field',
+      'widget' => array(
+        'type' => 'text_textfield',
+      ),
+    );
+    field_create_instance($instance);
+
+    $user = $this->drupalCreateUser();
+    $node = $this->drupalCreateNode(array('type' => 'article'));
+
+    $this->drupalLogin($user);
+    // Make sure access is denied.
+    $path = 'field-collection/field-test-collection/add/node/' . $node->nid;
+    $this->drupalGet($path);
+    $this->assertText(t('Access denied'), 'Access has been denied.');
+
+    $user_privileged = $this->drupalCreateUser(array('access content', 'edit any article content'));
+    $this->drupalLogin($user_privileged);
+    $this->drupalGet("node/$node->nid");
+    $this->assertLinkByHref($path, 0, 'Add link is shown.');
+    $this->drupalGet($path);
+    $this->assertText(t('Test text field'), 'Add form is shown.');
+
+    $edit['field_text[und][0][value]'] = $this->randomName();
+    $this->drupalPost($path, $edit, t('Save'));
+    $this->assertText(t('The changes have been saved.'), 'Field collection saved.');
+
+    $this->assertText($edit['field_text[und][0][value]'], "Added field value is shown.");
+
+    $edit['field_text[und][0][value]'] = $this->randomName();
+    $this->drupalPost('field-collection/field-test-collection/1/edit', $edit, t('Save'));
+    $this->assertText(t('The changes have been saved.'), 'Field collection saved.');
+    $this->assertText($edit['field_text[und][0][value]'], "Field collection has been edited.");
+
+    $this->drupalGet('field-collection/field-test-collection/1');
+    $this->assertText($edit['field_text[und][0][value]'], "Field collection can be viewed.");
+
+    // Add further 3 items, so we have reached 4 == maxium cardinality.
+    $this->drupalPost($path, $edit, t('Save'));
+    $this->drupalPost($path, $edit, t('Save'));
+    $this->drupalPost($path, $edit, t('Save'));
+    // Make sure adding doesn't work any more as we have restricted cardinality
+    // to 1.
+    $this->drupalGet($path);
+    $this->assertText(t('Too many items.'), 'Maxium cardinality has been reached.');
+
+    $this->drupalPost('field-collection/field-test-collection/1/delete', array(), t('Delete'));
+    $this->drupalGet($path);
+    // Add form is shown again.
+    $this->assertText(t('Test text field'), 'Field collection item has been deleted.');
+
+    // Test the viewing a revision. There should be no links to change it.
+    $vid = $node->vid;
+    $node = node_load($node->nid, NULL, TRUE);
+    $node->revision = TRUE;
+    node_save($node);
+
+    $this->drupalGet("node/$node->nid/revisions/$vid/view");
+    $this->assertResponse(403, 'Access to view revision denied');
+    // Login in as admin and try again.
+    $user = $this->drupalCreateUser(array('administer nodes', 'bypass node access'));
+    $this->drupalLogin($user);
+    $this->drupalGet("node/$node->nid/revisions/$vid/view");
+    $this->assertNoResponse(403, 'Access to view revision granted');
+
+    $this->assertNoLinkByHref($path, 'No links on revision view.');
+    $this->assertNoLinkByHref('field-collection/field-test-collection/2/edit', 'No links on revision view.');
+    $this->assertNoLinkByHref('field-collection/field-test-collection/2/delete', 'No links on revision view.');
+
+    $this->drupalGet("node/$node->nid/revisions");
+  }
+
+  /**
+   * Make sure that field_collection-entities are copied when host-entities do.
+   */
+  public function testCopyingEntities() {
+    list($node, $entity) = $this->createNodeWithFieldCollection();
+
+    // Create a copy of that node.
+    $node->nid = NULL;
+    $node->vid = NULL;
+    $node->is_new = TRUE;
+
+    node_save($node);
+    $item = $node->{$this->field_name}[LANGUAGE_NONE][0];
+    $this->assertNotEqual($entity->item_id, $item['value']);
+
+    // Do a php clone to the $node object and save it.
+    $node2 = clone $node;
+    $node2->nid = NULL;
+    $node2->is_new = TRUE;
+    $node2->vid = NULL;
+    node_save($node2);
+
+    $item2 = $node2->{$this->field_name}[LANGUAGE_NONE][0];
+    $this->assertNotEqual($item2['value'], $item['value']);
+
+    // Create another copy this time (needlessly) forcing a new revision.
+    $node->nid = NULL;
+    $node->vid = NULL;
+    $node->is_new = TRUE;
+    $node->revision = TRUE;
+    node_save($node);
+    $item3 = $node->{$this->field_name}[LANGUAGE_NONE][0];
+    $this->assertNotEqual($item['value'], $item3['value']);
+  }
+
+}
+
+
+/**
+ * Test using field collection with Rules.
+ */
+class FieldCollectionRulesIntegrationTestCase extends DrupalWebTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Field collection Rules integration',
+      'description' => 'Tests using field collections with rules.',
+      'group' => 'Field types',
+      'dependencies' => array('rules'),
+    );
+  }
+
+  function setUp() {
+    parent::setUp(array('field_collection', 'rules'));
+    variable_set('rules_debug_log', 1);
+  }
+
+  protected function createFields($cardinality = 4) {
+    // Create a field_collection field to use for the tests.
+    $this->field_name = 'field_test_collection';
+    $this->field = array('field_name' => $this->field_name, 'type' => 'field_collection', 'cardinality' => $cardinality);
+    $this->field = field_create_field($this->field);
+    $this->field_id = $this->field['id'];
+
+    $this->instance = array(
+      'field_name' => $this->field_name,
+      'entity_type' => 'node',
+      'bundle' => 'article',
+      'label' => $this->randomName() . '_label',
+      'description' => $this->randomName() . '_description',
+      'weight' => mt_rand(0, 127),
+      'settings' => array(),
+      'widget' => array(
+        'type' => 'hidden',
+        'label' => 'Test',
+        'settings' => array(),
+      ),
+    );
+    $this->instance = field_create_instance($this->instance);
+    // Add a field to the collection.
+    $field = array(
+      'field_name' => 'field_text',
+      'type' => 'text',
+      'cardinality' => 1,
+      'translatable' => FALSE,
+    );
+    field_create_field($field);
+    $instance = array(
+      'entity_type' => 'field_collection_item',
+      'field_name' => 'field_text',
+      'bundle' => $this->field_name,
+      'label' => 'Test text field',
+      'widget' => array(
+        'type' => 'text_textfield',
+      ),
+    );
+    field_create_instance($instance);
+  }
+
+  /**
+   * Test creation field collection items.
+   */
+  function testCreation() {
+    $this->createFields();
+
+    $node = $this->drupalCreateNode(array('type' => 'article'));
+    // Create a field collection.
+    $action_set = rules_action_set(array('node' => array('type' => 'node', 'bundle' => 'article')));
+    $action_set->action('entity_create', array(
+      'type' => 'field_collection_item',
+      'param_field_name' => $this->field_name,
+      'param_host_entity:select' => 'node',
+    ));
+    $action_set->action('data_set', array('data:select' => 'entity-created:field-text', 'value' => 'foo'));
+    $action_set->execute($node);
+
+    $node = node_load($node->nid, NULL, TRUE);
+    $this->assertTrue(!empty($node->{$this->field_name}[LANGUAGE_NONE][0]['value']), 'A field_collection has been successfully created.');
+    $this->assertTrue(!empty($node->{$this->field_name}[LANGUAGE_NONE][0]['revision_id']), 'A field_collection has been successfully created (revision).');
+
+    // Now try making use of the field collection in rules.
+    $action_set = rules_action_set(array('node' => array('type' => 'node', 'bundle' => 'article')));
+    $action_set->action('drupal_message', array('message:select' => 'node:field-test-collection:0:field-text'));
+    $action_set->execute($node);
+
+    $msg = drupal_get_messages();
+    $this->assertEqual(array_pop($msg['status']), 'foo', 'Field collection can be used.');
+    RulesLog::logger()->checkLog();
+  }
+
+  /**
+   * Test using field collection items via the host while they are being created.
+   */
+  function testUsageDuringCreation() {
+    // Test using a single-cardinality field collection.
+    $this->createFields(1);
+
+    $node = $this->drupalCreateNode(array('type' => 'article'));
+    $entity = entity_create('field_collection_item', array('field_name' => $this->field_name));
+    $entity->setHostEntity('node', $node);
+    // Now the field collection is linked to the host, but not yet saved.
+
+    // Test using the wrapper on it.
+    $wrapper = entity_metadata_wrapper('node', $node);
+    $wrapper->get($this->field_name)->field_text->set('foo');
+    $this->assertEqual($entity->field_text[LANGUAGE_NONE][0]['value'], 'foo', 'Field collection item used during creation via the wrapper.');
+
+    // Now test it via Rules, which should save our changes.
+    $set = rules_action_set(array('node' => array('type' => 'node', 'bundle' => 'article')));
+    $set->action('data_set', array('data:select' => 'node:' . $this->field_name . ':field-text', 'value' => 'bar'));
+    $set->execute($node);
+    $this->assertEqual($entity->field_text[LANGUAGE_NONE][0]['value'], 'bar', 'Field collection item used during creation via Rules.');
+    $this->assertTrue(!empty($entity->item_id) && !empty($entity->revision_id), 'Field collection item has been saved by Rules and the host entity.');
+    RulesLog::logger()->checkLog();
+  }
+}
+
+/**
+ * Test using field collection with content that gets translated.
+ */
+class FieldCollectionContentTranslationTestCase extends DrupalWebTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Field collection content translation',
+      'description' => 'Tests using content under translation.',
+      'group' => 'Field types',
+      'dependencies' => array('translation'),
+    );
+  }
+
+  public function setUp() {
+    parent::setUp(array('field_collection', 'translation'));
+    // Create a field_collection field to use for the tests.
+    $this->field_name = 'field_test_collection';
+    $this->field = array('field_name' => $this->field_name, 'type' => 'field_collection', 'cardinality' => 4);
+    $this->field = field_create_field($this->field);
+    $this->field_id = $this->field['id'];
+
+    $this->instance = array(
+      'field_name' => $this->field_name,
+      'entity_type' => 'node',
+      'bundle' => 'article',
+      'label' => $this->randomName() . '_label',
+      'description' => $this->randomName() . '_description',
+      'weight' => mt_rand(0, 127),
+      'settings' => array(),
+      'widget' => array(
+        'type' => 'field_collection_embed',
+        'label' => 'Test',
+        'settings' => array(),
+      ),
+    );
+    $this->instance = field_create_instance($this->instance);
+
+    // Add a field to the collection.
+    $field = array(
+      'field_name' => 'field_text',
+      'type' => 'text',
+      'cardinality' => 1,
+      'translatable' => FALSE,
+    );
+    field_create_field($field);
+    $instance = array(
+      'entity_type' => 'field_collection_item',
+      'field_name' => 'field_text',
+      'bundle' => $this->field_name,
+      'label' => 'Test text field',
+      'widget' => array(
+        'type' => 'text_textfield',
+      ),
+    );
+    field_create_instance($instance);
+
+    $admin_user = $this->drupalCreateUser(array('administer languages', 'administer content types', 'access administration pages', 'create article content', 'edit any article content', 'translate content'));
+
+    $this->drupalLogin($admin_user);
+    // Add German language.
+    locale_add_language('de');
+
+    // Set "Article" content type to use multilingual support.
+    variable_set('language_content_type_article', TRANSLATION_ENABLED);
+  }
+
+  /**
+   * Ensure field collections are cloned to new entities on content translation.
+   */
+  public function testContentTranslation() {
+    // Create "Article" content.
+    $edit['title'] = $this->randomName();
+    $edit['body[' . LANGUAGE_NONE . '][0][value]'] = $this->randomName();
+    $edit['language'] = 'en';
+    $field_collection_name = 'field_test_collection[' . LANGUAGE_NONE . '][0][field_text][' . LANGUAGE_NONE . '][0][value]';
+    $edit[$field_collection_name] = $this->randomName();
+
+    $this->drupalPost('node/add/article', $edit, t('Save'));
+    $this->assertRaw(t('Article %title has been created.', array('%title' => $edit['title'])), 'Article created.');
+    $node1 = $this->drupalGetNodeByTitle($edit['title']);
+
+    $this->drupalGet('node/' . $node1->nid . '/edit');
+    $this->drupalGet('node/' . $node1->nid . '/translate');
+    $this->drupalGet('node/add/article', array('query' => array('translation' => $node1->nid, 'target' => 'de')));
+
+    // Suffix translations with the langcode.
+    unset($edit['language']);
+    $edit['title'] .= 'DE';
+    $edit[$field_collection_name] .= 'DE';
+    $this->drupalPost('node/add/article', $edit, t('Save'), array('query' => array('translation' => $node1->nid, 'target' => 'de')));
+    $node2 = $this->drupalGetNodeByTitle($edit['title']);
+
+    // Ensure that our new node is the translation of the first one.
+    $this->assertEqual($node1->nid, $node2->tnid, 'Succesfully created translation.');
+    // And check to see that their field collections are different.
+    $this->assertNotEqual($node1->field_test_collection, $node2->field_test_collection, 'Field collections between translation source and translation differ.');
+  }
+
+}

+ 66 - 0
sites/all/modules/contrib/fields/field_collection/field_collection.theme.css

@@ -0,0 +1,66 @@
+@CHARSET "UTF-8";
+
+.field-collection-container {
+  border-bottom: 1px solid #D3D7D9;
+  margin-bottom: 1em;
+}
+
+.field-collection-container .field-items .field-item {
+  margin-bottom: 10px;
+}
+
+.field-collection-container .field-items .field-items .field-item {
+  margin-bottom: 0;
+}
+
+.field-collection-view {
+  padding: 1em 0 0.3em 0;
+  margin: 0 1em 0 1em;
+  border-bottom: 1px dotted #D3D7D9;
+}
+
+/* If there is no add link, don't show the final border. */
+.field-collection-view-final {
+  border-bottom: none;
+}
+
+.field-collection-view .entity-field-collection-item {
+  float: left;
+}
+
+.field-collection-view ul.field-collection-view-links {
+  float: right;
+  font-size: 0.821em;
+  list-style-type: none;
+  width: auto;
+  margin: 0 1em;
+  padding: 0;
+}
+
+.field-collection-view .field-label {
+  width: 25%;
+}
+
+.field-collection-view .content {
+  margin-top: 0;
+  width: 100%;
+}
+
+.field-collection-view .entity-field-collection-item {
+  width: 100%;
+}
+
+ul.field-collection-view-links li {
+  float: left;
+}
+
+ul.field-collection-view-links li a {
+  margin-right: 1em;
+}
+
+.field-collection-container ul.action-links-field-collection-add {
+  float: right;
+  padding: 0 0.5em 0 0;
+  margin: 0 0 1em 2em;
+  font-size: 0.821em;
+}

+ 60 - 0
sites/all/modules/contrib/fields/field_collection/views/field_collection.views.inc

@@ -0,0 +1,60 @@
+<?php
+
+/**
+ * @file
+ * Views integration for field collection fields.
+ */
+
+/**
+ * Implements hook_field_views_data().
+ *
+ * Adds a relationship to the default field data.
+ *
+ * @see field_views_field_default_views_data()
+ */
+function field_collection_field_views_data($field) {
+  $data = field_views_field_default_views_data($field);
+  $field_name = $field['field_name'];
+
+  if (isset($data['field_data_' . $field_name])) {
+    $data['field_data_' . $field_name][$field_name . '_value']['relationship'] = array(
+      'handler' => 'field_collection_handler_relationship',
+      'base' => 'field_collection_item',
+      'base field' => 'item_id',
+      'label' => t('field collection item from !field_name', array('!field_name' => $field['field_name'])),
+      'field_name' => $field['field_name'],
+    );
+    $data['field_revision_' . $field_name][$field_name . '_revision_id']['relationship'] = array(
+      'handler' => 'field_collection_handler_relationship',
+      'base' => 'field_collection_item_revision',
+      'base field' => 'revision_id',
+      'label' => t('field collection item revision from !field_name', array('!field_name' => $field['field_name'])),
+      'field_name' => $field['field_name'],
+    );
+  }
+
+  foreach ($field['bundles'] as $entity_type => $bundles) {
+    $entity_info = entity_get_info($entity_type);
+    $pseudo_field_name = $field['field_name'] . '_' . $entity_type;
+
+    list($label, $all_labels) = field_views_field_label($field['field_name']);
+    $entity = $entity_info['label'];
+    if ($entity == t('Node')) {
+      $entity = t('Content');
+    }
+
+    $data['field_collection_item'][$pseudo_field_name]['relationship'] = array(
+      'title' => t('Entity with the @field (@field_name)', array('@entity' => $entity, '@field' => $label, '@field_name' => $field['field_name'])),
+      'help' => t('Relate each @entity using @field.', array('@entity' => $entity, '@field' => $label)),
+      'handler' => 'views_handler_relationship_entity_reverse',
+      'field_name' => $field['field_name'],
+      'field table' => _field_sql_storage_tablename($field),
+      'field field' => $field['field_name'] . '_value',
+      'base' => $entity_info['base table'],
+      'base field' => $entity_info['entity keys']['id'],
+      'label' => t('!field_name', array('!field_name' => $field['field_name'])),
+    );
+  }
+
+  return $data;
+}

+ 58 - 0
sites/all/modules/contrib/fields/field_collection/views/field_collection_handler_relationship.inc

@@ -0,0 +1,58 @@
+<?php
+
+/**
+ * @file
+ * Provide relationship handler for field collection fields.
+ */
+class field_collection_handler_relationship extends views_handler_relationship {
+
+  function option_definition() {
+    $options = parent::option_definition();
+    $options['delta'] = array('default' => -1);
+
+    return $options;
+  }
+
+  /**
+   * Add a delta selector for multiple fields.
+   */
+  function options_form(&$form, &$form_state) {
+    parent::options_form($form, $form_state);
+
+    $field = field_info_field($this->definition['field_name']);
+
+    // Only add the delta selector if the field is multiple.
+    if ($field['cardinality']) {
+      $max_delta = ($field['cardinality'] == FIELD_CARDINALITY_UNLIMITED) ? 10 : $field['cardinality'];
+
+      $options = array('-1' => t('All'));
+      for ($i = 0; $i < $max_delta; $i++) {
+        $options[$i] = $i + 1;
+      }
+      $form['delta'] = array(
+        '#type' => 'select',
+        '#options' => $options,
+        '#default_value' => $this->options['delta'],
+        '#title' => t('Delta'),
+        '#description' => t('The delta allows you to select which item in a multiple value field to key the relationship off of. Select "1" to use the first item, "2" for the second item, and so on. If you select "All", each item in the field will create a new row, which may appear to cause duplicates.'),
+      );
+    }
+  }
+
+  function ensure_my_table() {
+    $field = field_info_field($this->definition['field_name']);
+
+    if (!isset($this->table_alias)) {
+      $join = $this->get_join();
+      if ($this->options['delta'] != -1 && $field['cardinality']) {
+        $join->extra[] = array(
+          'field' => 'delta',
+          'value' => $this->options['delta'],
+          'numeric' => TRUE,
+        );
+      }
+      $this->table_alias = $this->query->add_table($this->table, $this->relationship, $join);
+    }
+    return $this->table_alias;
+  }
+}

+ 339 - 0
sites/all/modules/contrib/fields/video_embed_field/LICENSE.txt

@@ -0,0 +1,339 @@
+                    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.)
+
+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
+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
+
+            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.

+ 26 - 0
sites/all/modules/contrib/fields/video_embed_field/plugins/export_ui/video_embed_field_export_ui.inc

@@ -0,0 +1,26 @@
+<?php
+
+/**
+ * Define this Export UI plugin.
+ */
+$plugin = array(
+  'schema' => 'vef_video_styles', // As defined in hook_schema().
+  'access' => 'administer video styles', // Define a permission users must have to access these pages.
+  // Define the menu item.
+  'menu' => array(
+    'menu prefix' => 'admin/config/media',
+    'menu item' => 'vef_video_styles',
+    'menu title' => 'Configure Video Embed Styles',
+    'menu description' => 'Administer Video Embed Field\'s video styles.',
+  ),
+  // Define user interface texts.
+  'title singular' => t('video style'),
+  'title plural' => t('video styles'),
+  'title singular proper' => t('Video Styles'),
+  'title plural proper' => t('Video Styles'),
+  // Define the names of the functions that provide the add/edit forms.
+  'form' => array(
+    'settings' => 'video_embed_field_video_style_form',
+    // 'submit' and 'validate' are also valid callbacks.
+  ),
+);

+ 22 - 0
sites/all/modules/contrib/fields/video_embed_field/video-embed-field-embed-code.tpl.php

@@ -0,0 +1,22 @@
+<?php
+/**
+ * @file
+ * Default theme implementation to display a video embed field.
+ *
+ * Variables available:
+ * - $url: The URL of the video to display embed code for
+ * - $style: The style name of the embed code to use
+ * - $style_settings: The style settings for the embed code
+ * - $handler: The name of the video handler
+ * - $embed_code: The embed code
+ * - $data: Additional video data
+ *
+ * @see template_preprocess_video_embed()
+ */
+?>
+
+<div class="embedded-video">
+  <div class="player">
+    <?php print $embed_code; ?>
+  </div>
+</div>

+ 13 - 0
sites/all/modules/contrib/fields/video_embed_field/video_embed_facebook/video_embed_facebook.info

@@ -0,0 +1,13 @@
+name = "Video Embed Facebook"
+description = "Provides Facebook handler for Video Embed Fields.  This module also serves as an example of how to add handlers to video embed field."
+core = 7.x
+package = Media
+configure = admin/config/media/vef_video_styles
+
+dependencies[] = "video_embed_field"
+; Information added by drupal.org packaging script on 2012-10-17
+version = "7.x-2.0-beta5+11-dev"
+core = "7.x"
+project = "video_embed_field"
+datestamp = "1350438417"
+

+ 149 - 0
sites/all/modules/contrib/fields/video_embed_field/video_embed_facebook/video_embed_facebook.module

@@ -0,0 +1,149 @@
+<?php
+/**
+ * @file Add a handler for facebook videos to Video Embed Field.
+ * @see video_embed_field.api.php for more documentation
+ */
+
+/**
+ * Implements hook_video_embed_handler_info().
+ * 
+ * This function is used to tell video_embed_field which functions will be used to handle
+ * different operations, along with a bit of metadata.
+ * @return an associative array with the data
+ * @see video_embed_field.api.php for specific details on the data to return.
+ */
+function video_embed_facebook_video_embed_handler_info() {
+  $handlers = array();
+  //the key here should be unique to our handler, normally the name of the service will suffice
+  $handlers['facebook'] = array(
+    'title' => 'Facebook Video', //The title is the name to show to users
+    //function is a function to take the url and return the embed code
+    'function' => 'video_embed_facebook_handle_video',
+    //thumbnail_function is optional and takes the url and returns the thumbnail url
+    'thumbnail_function' => 'video_embed_facebook_handle_thumbnail',
+    //data_function is optional and returns an array of extra data for the given video url
+    //because facebook requires oath to get this data, we'll leave it out for now
+    //'data_function' => 'video_embed_facebook_handle_data',
+    //form is the configure form to embed into video_embed styles - this is where all settings should go
+    'form' => 'video_embed_facebook_form',
+    //domains is how video embed determines which handler to use, its an array of domains to match
+    //urls against.  Don't include the scheme (like http://) or www.
+    'domains' => array(
+      'facebook.com',
+    ),
+    //defaults are the defaults to provide to your form (as defined in your form callback)
+    'defaults' => array(
+      'width' => 640,
+      'height' => 360,
+      'allowfullscreen' => TRUE,
+    ),
+  );
+
+  return $handlers;
+}
+
+/**
+ * Our configuration form (the callback for the form key in info)
+ * Provide a form to configure out video settings
+ * @param $defaults - default/current values for your provider, the currently saved settings
+ *    with empty values filled with the defaults provided in info hook
+ * @return a form as defined by forms api
+ */
+function video_embed_facebook_form($defaults) {
+  $form = array();
+  //form element for the width of the player - note we're using the default from defaults
+  $form['height'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Player Width'),
+    '#description' => t('The width of the player.'),
+    '#default_value' => $defaults['height'],
+  );
+  //element for width
+  $form['width'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Player Width'),
+    '#description' => t('The width of the player.'),
+    '#default_value' => $defaults['width'],
+  );
+  //allow configuration of fullscreen
+  $form['allowfullscreen'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Allow Fullscreen'),
+    '#desecription' => t('This will allow the video to be fullscreened.'),
+    '#default_value' => $defaults['allowfullscreen'],
+  );
+
+  return $form;
+}
+
+
+/**
+ * This is the video handler (the 'function' key from handler_info)
+ * @param $url - the full video url
+ * @param $settings - an associative array of this handlers settings, from the settings form
+ * @return - the embed code for the video
+ */
+function video_embed_facebook_handle_video($url, $settings) {
+  $id = _video_embed_facebook_get_video_id($url);
+
+  if ($id) {
+    //our embed code
+    $embed = '<object>
+      <param name="allowfullscreen" value="!fullscreen" />
+      <param name="allowscriptaccess" value="always" />
+      <param name="movie" value="https://www.facebook.com/v/!id" />
+      <param name="wmode" value="opaque" />
+      <embed src="https://www.facebook.com/v/!id" type="application/x-shockwave-flash" wmode="opaque"
+        allowscriptaccess="always" allowfullscreen="!fullscreen" width="!width" height="!height">
+      </embed>
+    </object>';
+    //use format_string to replace our placeholders with the values from the settings
+    $embed = format_string($embed, array(
+      '!id' => $id,
+      '!fullscreen' => $settings['allowfullscreen'] ? 'true' : 'false',
+      '!width' => $settings['width'],
+      '!height' => $settings['height'],
+    ));
+    //we want to return a render array
+    $video = array(
+      '#markup' => $embed,
+    );
+    return $video;
+  }
+  // just return an empty string if there is no id, so we don't have broken embeds showing up
+  return '';
+}
+
+/**
+ * Retreive the thumbnail for the facebook video - note that based on a users permissions, this may be
+ * the facebook unknown thumbnail: https://s-static.ak.facebook.com/rsrc.php/v1/y0/r/XsEg9L6Ie5_.jpg
+ * @param $url - the url of the video as entered by the user
+ * @return an array with the keys:
+ *   'id' => an id for the video which is unique to your provider, used for naming the cached thumbnail file
+ *   'url' => the url to retrieve the thumbnail from
+ */
+function video_embed_facebook_handle_thumbnail($url) {
+  $id = _video_embed_facebook_get_video_id($url);
+  // We're using a part of the graphs api to return the thumbnail.  This only works for some videos
+  return array(
+    'id' => $id, //generally the id that the provider uses for the video
+    'url' => 'https://graph.facebook.com/' . $id . '/picture', //the url of the thumbnail
+  );
+}
+
+/**
+ * Helper function to take a facebook video url and return its id
+ * @param $url - the full facebook video url
+ * @return the id for the video
+ */
+function _video_embed_facebook_get_video_id($url) {
+  //parse_url is an easy way to break a url into its components
+  $matches = array();
+  preg_match('/(.*)?v=([^&#]*)/', $url, $matches);
+  //if the v get parameter is set, return it
+  if ($matches && !empty($matches[2])) {
+    return $matches[2];
+  }
+  //otherwise return false.
+  return FALSE;
+}

+ 31 - 0
sites/all/modules/contrib/fields/video_embed_field/video_embed_field.admin.inc

@@ -0,0 +1,31 @@
+<?php
+
+/**
+ * Form builder; Form for editing a video style.
+ * Used by CTools export ui
+ *
+ * @ingroup forms
+ * @see video_embed_field_video_style_form_submit()
+ */
+function video_embed_field_video_style_form(&$form, &$form_state) {
+  if (isset($form_state['item'])) {
+    $style = (array) $form_state['item'];
+  }
+  else {
+    $style = array();
+  }
+  $form_state['video_style'] = $style;
+
+  //Grab the settings off the parser form
+  $values = isset($style['data']) ? $style['data'] : array();
+  $parser_form = video_embed_field_get_form($values);
+
+  //General settings for playback - formerly in the configuration section
+  $form['data'] = array(
+    '#type' => 'vertical_tabs',
+    '#title' => t('Playback settings'),
+    '#tree' => TRUE,
+  ) + $parser_form; //add in our extra settings
+
+  return $form;
+}

+ 100 - 0
sites/all/modules/contrib/fields/video_embed_field/video_embed_field.api.php

@@ -0,0 +1,100 @@
+<?php
+
+/**
+ * API Info for video_embed_field module
+ */
+
+/**
+ * @function hook_video_embed_handler_info
+ * Can be used to add more handlers for video_embed_field
+ * @return an array of handlers, each handler is an array with the following keys
+ * 'title' : required, the untranslated title of the provider, to show to the admin user
+ * 'function' : required, the function used to generate the embed code
+ * 'thumbnail_function' : optional, the function used to provide the thumbnail for a video
+ * 'data_function' : optional, the function to return an array of video data.
+ * 'form' : required, the function that returns the settings form for your provider
+ * 'domains' : required, an array of domains to match against, this is used to know which provider to use
+ * 'defaults' : default values for each setting made configurable in your form function
+ *
+ * @see below for function definitions
+ */
+function hook_video_embed_handler_info() {
+  $handlers = array();
+
+  $handlers['ustream'] = array(
+    'title' => 'UStream',
+    'function' => 'your_module_handle_ustream',
+    'thumbnail_function' => 'your_module_handle_ustream_thumbnail',
+    'data_function' => 'your_module_handler_ustream_data',
+    'form' => 'your_module_handler_ustream_form',
+    'domains' => array(
+      'ustream.com',
+    ),
+    'defaults' => array(
+      'width' => 640,
+      'height' => 360,
+    ),
+  );
+
+  return $handlers;
+}
+
+// Example callbacks for a provider (in this case for ustream) - obviously, these functions are only for example
+// purposes
+
+/**
+ * Generate the embed code for a video
+ * @param $url - the video url as entered by the user
+ * @param $settings - the settings for this provider as defined in the form function,
+ *                      defaulting to your provider's defaults
+ * @return the embed code as a renderable array
+ */
+function your_module_handle_ustream($url, $settings) {
+  return array(
+    //this should be the full embed code for your provider, including each of the settings
+    '#markup' => '<iframe src="ustream"></iframe>',
+  );
+}
+
+/**
+ * Retrieve information about the thumbnail for a given url
+ * @param $url - the url of the video as entered by the user
+ * @return an array with the keys:
+ *   'id' => an id for the video which is unique to your provider, used for naming the cached thumbnail file
+ *   'url' => the url to retrieve the thumbnail from
+ */
+function your_module_handle_ustream_thumbnail($url) {
+  return array(
+    'id' => '12332243242', //generally the id that the provider uses for the video
+    'url' => 'http://something/thumbnail/somthing.jpg', //the url of the thumbnail
+  );
+}
+
+/**
+ * A forms api callback, returns the settings form for the provider
+ * @param $defaults - default/current values for your provider, the currently saved settings
+ *                       with empty values filled with the defaults provided in info hook
+ * @return a form as defined by forms api
+ *
+ * @see http://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7
+ */
+function your_module_handler_ustream_form($defaults) {
+  $form = array();
+
+  $form['width'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Player Width'),
+    '#description' => t('The width of the player in pixels'),
+    '#default_value' => $defaults['width'],
+  );
+
+  return $form;
+}
+
+/**
+ * Return an array of extra data to be stored with the video, this data will be available for theming
+ * @return an array
+ */
+function your_module_handler_ustream_data($url) {
+  return array();
+}

+ 43 - 0
sites/all/modules/contrib/fields/video_embed_field/video_embed_field.feeds.inc

@@ -0,0 +1,43 @@
+<?php
+/**
+ * @file
+ * On behalf implementation of Feeds mapping API for video_embed_field.module.
+ */
+
+/**
+ * Implements hook_feeds_processor_targets_alter().
+ *
+ * @see FeedsNodeProcessor::getMappingTargets().
+ */
+function video_embed_field_feeds_processor_targets_alter(&$targets, $entity_type, $bundle_name) {
+  foreach (field_info_instances($entity_type, $bundle_name) as $name => $instance) {
+    $info = field_info_field($name);
+    if ($info['type'] == 'video_embed_field') {
+      $targets[$name] = array(
+        'name' => $instance['label'],
+        'callback' => 'video_embed_field_set_target',
+        'description' => t('The @label field of the node.', array('@label' => $instance['label'])),
+      );
+    }
+  }
+}
+
+/**
+ * Callback for mapping. Here is where the actual mapping happens.
+ *
+ * When the callback is invoked, $target contains the name of the field the
+ * user has decided to map to and $value contains the value of the feed item
+ * element the user has picked as a source.
+ */
+function video_embed_field_set_target($source, $entity, $target, $value) {
+  if (empty($value)) {
+    return;
+  }
+
+  $field = isset($entity->$target) ? $entity->$target : array();
+  if (!is_array($value) && !is_object($value)) {
+    $field['und'][0]['video_url'] = $value;
+  }
+  $entity->{$target} = $field;
+
+}

+ 443 - 0
sites/all/modules/contrib/fields/video_embed_field/video_embed_field.field.inc

@@ -0,0 +1,443 @@
+<?php
+
+/**
+ * @file
+ * Implement a video field.
+ */
+
+/**
+ * Implements hook_field_info().
+ */
+function video_embed_field_field_info() {
+  return array(
+    'video_embed_field' => array(
+      'label' => 'Video Embed',
+      'description' => 'Embed videos from youtube or vimeo',
+      'settings' => array(),
+      'instance_settings' => array(
+        'description_field' => 0,
+        'description_length' => 128,
+      ),
+      'default_widget' => 'video_embed_field_video',
+      'default_formatter' => 'video_embed_field',
+    ),
+  );
+}
+
+/**
+ * Implements hook_field_instance_settings_form().
+ */
+function video_embed_field_field_instance_settings_form($field, $instance) {
+  $settings = $instance['settings'];
+
+  $form['description_field'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Enable <em>Description</em> field'),
+    '#default_value' => isset($settings['description_field']) ? $settings['description_field'] : '',
+    '#description' => t('The description field allows users to enter a description about the video.'),
+    '#parents' => array('instance', 'settings', 'description_field'),
+    '#weight' => 11,
+  );
+
+  $form['description_length'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Max description length'),
+    '#default_value' => isset($settings['description_length']) ? $settings['description_length'] : 128,
+    '#parents' => array('instance', 'settings', 'description_length'),
+    '#weight' => 12,
+    '#size' => 5,
+    '#maxlength' => 5,
+  );
+
+  return $form;
+}
+
+/**
+ * Implements hook_field_widget_info().
+ */
+function video_embed_field_field_widget_info() {
+  return array(
+    'video_embed_field_video' => array(
+      'label' => 'Video',
+      'description' => 'Provides a video embed field',
+      'field types' => array('video_embed_field'),
+      'settings' => array(),
+      'behaviors' => array(
+        'multiple values' => FIELD_BEHAVIOR_DEFAULT,
+        'default value' => FIELD_BEHAVIOR_DEFAULT,
+      ),
+    ),
+  );
+}
+
+/**
+ * Implements hook_field_widget_form().
+ */
+function video_embed_field_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
+  // Don't need to check the type right now because we're only defining one
+  $element += array(
+    '#type' => 'fieldset',
+  );
+
+  $element['video_url'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Video URL'),
+    '#attributes' => array('class' => array('video_embed_url')),
+    '#attached' => array(
+      'css' => array(
+        drupal_get_path('module', 'video_embed_field') . '/video_embed_field.form.css',
+      ),
+    ),
+    '#default_value' => isset($items[$delta]['video_url']) ? $items[$delta]['video_url'] : '',
+    '#required' => $element['#required'],
+  );
+
+  // Add the description field if enabled.
+  if (!empty($instance['settings']['description_field'])) {
+    $element['description'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Description'),
+      '#default_value' => isset($items[$delta]['description']) ? $items[$delta]['description'] : '',
+      '#description' => t('The description which may be used as a label.'),
+      '#maxlength' => $instance['settings']['description_length'],
+    );
+  }
+
+  return $element;
+}
+
+/**
+ * Validates video URL.
+ */
+function video_embed_field_field_validate($entity_type, $entity, $field, $instance, $langcode, $items, &$errors) {
+  foreach ($items as $delta => $item) {
+    if (!empty($item['video_url'])) {
+      $item['video_url'] = trim($item['video_url']);
+      if (stristr($item['video_url'], '.') && !stristr($item['video_url'], 'http://') && !stristr($item['video_url'], 'https://')) {
+        $item['video_url'] = 'http://' . $item['video_url'];
+      }
+
+      $parts = parse_url($item['video_url']);
+      if (!$parts || !isset($parts['host'])) {
+        $errors[$field['field_name']][$langcode][$delta][] = array(
+          'error' => t('Invalid Url'),
+          'message' => t('Video: Invalid Video URL.', array('%name' => $instance['label'])),
+        );
+      }
+      else {
+        $host = $parts['host'];
+        if (stripos($host, 'www.') > -1) {
+          $host = substr($host, 4);
+        }
+        $domains = _video_embed_field_get_provider_domains();
+        if (!array_key_exists($host, $domains)) {
+          $errors[$field['field_name']][$langcode][$delta][] = array(
+            'error' => t('Unsupported Video Provider'),
+            'message' => t('%name: This video provider is not currently supported.', array('%name' => $instance['label'])),
+          );
+        }
+      }
+    }
+  }
+}
+
+/**
+ * Implementation of hook_field_presave().
+ *
+ * Download and save the thumbnail if it hasn't already been stored.
+ * Get video data.
+ */
+function video_embed_field_field_presave($entity_type, $entity, $field, $instance, $langcode, &$items) {
+  foreach ($items as $delta => $item) {
+    //Trim whitespace from the video URL.
+    $items[$delta]['video_url'] = trim($item['video_url']);
+
+    // Try to load thumbnail URL
+    $info = video_embed_field_thumbnail_url($item['video_url']);  
+    if (isset($info['url']) && $info['url']) {
+      $thumb_url = $info['url'];
+      $local_path = 'public://video_embed_field_thumbnails/' . $info['handler'] . '/' . $info['id'] . '.jpg';
+
+      $dirname = drupal_dirname($local_path);
+      file_prepare_directory($dirname, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS);
+
+      $response = drupal_http_request($thumb_url);
+      if (!isset($response->error)) {
+        file_save_data($response->data, $local_path, TRUE);
+      }
+      else {
+        @copy($thumb_url, $local_path);
+      }
+
+
+      $items[$delta]['thumbnail_path'] = $local_path;
+    } //couldn't get the thumbnail for whatever reason
+    else {
+      $items[$delta]['thumbnail_path'] = '';
+    }
+
+    // Try to load video data
+    $data = video_embed_field_get_video_data($item['video_url']);
+    if (is_array($data) && !empty($data)) {
+      $items[$delta]['video_data'] = serialize($data);
+    }
+    else {
+      $items[$delta]['video_data'] = NULL;
+    }
+
+  }
+}
+
+/**
+ * Implements hook_field_is_empty().
+ */
+function video_embed_field_field_is_empty($item, $field) {
+  return empty($item) || empty($item['video_url']) || $item['video_url'] === '';
+}
+
+/**
+ * Implements hook_field_formatter_info().
+ */
+function video_embed_field_field_formatter_info() {
+  $info = array(
+    'video_embed_field' => array(
+      'label' => t('Video Player'),
+      'field types' => array('video_embed_field'),
+      'settings' => array(
+        'video_style' => 'normal',
+        'description' => 1,
+        'description_position' => 'bottom'
+      ),
+    ),
+    'video_embed_field_thumbnail' => array(
+      'label' => t('Thumbnail Preview'),
+      'field types' => array('video_embed_field'),
+      'settings' => array(
+        'image_style' => 'none',
+        'description' => 1,
+        'description_position' => 'bottom',
+        'image_link' => 'none',
+      ),
+    ),
+  );
+  if ( module_exists('colorbox')  ) {
+    $info['video_embed_field_thumbnail_colorbox'] = array(
+      'label' => t('Thumbnail Preview w/Colorbox'),
+      'field types' => array('video_embed_field'),
+      'settings' => array(
+        'video_style' => 'normal',
+        'image_style' => 'none',
+        'description' => 1,
+        'description_position' => 'bottom',
+      ),
+    );
+  }
+  return $info;
+}
+
+/**
+ * Implements hook_field_formatter_settings_form().
+ */
+function video_embed_field_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) {
+  $display = $instance['display'][$view_mode];
+  $settings = $display['settings'];
+  $element = array();
+
+  if ($display['type'] == 'video_embed_field' || $display['type'] == 'video_embed_field_thumbnail_colorbox') {
+    $video_styles = video_embed_field_video_style_options(FALSE);
+    $element['video_style'] = array(
+      '#title' => t('Video style'),
+      '#type' => 'select',
+      '#default_value' => $settings['video_style'],
+      '#options' => $video_styles,
+    );
+  }
+  if ($display['type'] == 'video_embed_field_thumbnail' || $display['type'] == 'video_embed_field_thumbnail_colorbox') {
+    $element['image_style'] = array(
+      '#title' => t('Image style'),
+      '#type' => 'select',
+      '#options' => image_style_options(FALSE),
+      '#default_value' => $settings['image_style'],
+      '#empty_option' => t('None (original image)'),
+    );
+  }
+
+  if ($display['type'] == 'video_embed_field_thumbnail') {
+    $link_types = array(
+      'node' => t('Node'),
+      'source' => t('Video Source'),
+    );
+    $element['image_link'] = array(
+      '#title' => t('Link thumbnail to'),
+      '#type' => 'select',
+      '#default_value' => $settings['image_link'],
+      '#empty_option' => t('Nothing'),
+      '#options' => $link_types,
+    );
+  }
+
+  if ($instance['settings']['description_field']) {
+    $element['description'] = array(
+      '#title' => t('Show description'),
+      '#type' => 'checkbox',
+      '#default_value' => $settings['description'],
+    );
+
+    $element['description_position'] = array(
+      '#title' => t('Description Position'),
+      '#type' => 'select',
+      '#options' => array(
+        'top' => t('Top'),
+        'bottom' => t('Bottom')
+      ),
+      '#default_value' => $settings['description_position'],
+    );
+  }
+  return $element;
+}
+/**
+ * Implements hook_field_formatter_settings_summary().
+ */
+function video_embed_field_field_formatter_settings_summary($field, $instance, $view_mode) {
+  $display = $instance['display'][$view_mode];
+  $settings = $display['settings'];
+
+  $summary = array();
+  if ($display['type'] == 'video_embed_field' || $display['type'] == 'video_embed_field_thumbnail_colorbox') {
+    $video_styles = video_embed_field_video_style_options(FALSE);
+    // Styles could be lost because of enabled/disabled modules that defines
+    // their styles in code.
+    if (isset($video_styles[$settings['video_style']])) {
+      $summary[] = t('Video style: @style', array('@style' => $video_styles[$settings['video_style']]));
+    }
+  }
+  if ($display['type'] == 'video_embed_field_thumbnail' || $display['type'] == 'video_embed_field_thumbnail_colorbox') {
+    $image_styles = image_style_options(FALSE);
+    if (isset($image_styles[$settings['image_style']])) {
+      $summary[] = t('Image style: @style', array('@style' => $image_styles[$settings['image_style']]));
+    } //No Image style (original image)
+    else {
+      $summary[] = t('Original Image.');
+    }
+    if (isset($settings['image_link'])) {
+      $summary[] = t('Image link: ' . $settings['image_link']);
+    }
+    else {
+      $summary[] = t('Image link: none');
+    }
+  }
+
+  if ($settings['description'] && $instance['settings']['description_field']) {
+    $summary[] = t('Show description');
+  }
+  elseif ($instance['settings']['description_field']) {
+    $summary[] = t('Hide description');
+  }
+
+  return implode('<br />', $summary);
+}
+
+/**
+ * Implements hook_field_formatter_view().
+ */
+function video_embed_field_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
+  $element = array();
+  $settings = $display['settings'];
+
+  foreach ($items as $delta => $item) {
+    //create the render array for the description
+    if (isset($item['description']) && $item['description'] && $settings['description'] && $instance['settings']['description_field']) {
+      $description = array(
+        '#prefix' => '<div class="video-embed-description">',
+        '#markup' => $item['description'],
+        '#suffix' => '</div>',
+      );
+    }
+    else {
+      $description = array();
+    }
+
+    //Render the field
+    if ($display['type'] == 'video_embed_field') {
+      $element[$delta] = array(
+        array(
+          '#theme' => 'video_embed_field_embed_code',
+          '#url' => $item['video_url'],
+          '#style' => $settings['video_style'],
+          '#video_data' => !empty($item['video_data']) ? unserialize($item['video_data']) : array(),
+        ),
+      );
+    }
+    elseif ($display['type'] == 'video_embed_field_thumbnail') {
+      if (isset($item['thumbnail_path'])) {
+        if (empty($settings['image_style']) || $settings['image_style'] == 'none') {
+          $element[$delta] = array(
+            array(
+              '#theme' => 'image',
+              '#path' => $item['thumbnail_path'],
+            ),
+          );
+        }
+        else {
+          $element[$delta] = array(
+            array(
+              '#theme' => 'image_style',
+              '#path' => $item['thumbnail_path'],
+              '#style_name' => $settings['image_style'],
+            ),
+          );
+        }
+        if ($settings['image_link'] == 'source') {
+          $link = explode('|||', l('|||', $item['video_url']));
+          $element[$delta]['#prefix'] = $link[0];
+          $element[$delta]['#suffix'] = $link[1];
+        }
+        elseif ($settings['image_link'] == 'node') {
+          $nid = $entity->nid;
+          $link = explode('|||', l('|||', 'node/' . $nid));
+          $element[$delta]['#prefix'] = $link[0];
+          $element[$delta]['#suffix'] = $link[1];
+        }
+      } //incase no thumbnail was downloaded / provider doesn't support thumbnails
+      else {
+        $element[$delta] = array(
+        );
+      }
+    }
+    elseif ($display['type'] == 'video_embed_field_thumbnail_colorbox') {
+      if (isset($item['thumbnail_path'])) {
+        $element[$delta] = array(
+          array(
+            '#theme' => 'video_embed_field_colorbox_code',
+            '#image_url' => $item['thumbnail_path'],
+            '#image_style' => $display['settings']['image_style'],
+            '#video_url' => $item['video_url'],
+            '#video_style' => $display['settings']['video_style'],
+            '#video_data' => unserialize($item['video_data']),
+          ),
+        );
+      }
+      //incase no thumbnail was downloaded / provider doesn't support thumbnails
+      else {
+        $element[$delta] = array(
+        );
+      }
+    }
+    //Get the HTML instead of the array, because we append it to the suffix.
+    //This way, the thumbnail link wrapper doesn't make the description a link as well.
+    $description_html = drupal_render($description);
+
+    $pos = isset($settings['description_position']) ? $settings['description_position'] : 'bottom';
+    if ($pos == 'top') {
+      $element[$delta]['#prefix'] = isset($element[$delta]['#prefix']) ? $element[$delta]['#prefix'] : '';
+      $element[$delta]['#prefix'] = $description_html . $element[$delta]['#prefix'];
+    }
+    else {
+      $element[$delta]['#suffix'] = isset($element[$delta]['#suffix']) ? $element[$delta]['#suffix'] : '';
+      $element[$delta]['#suffix'] .= $description_html;
+    }
+  }
+
+
+  return $element;
+}

+ 4 - 0
sites/all/modules/contrib/fields/video_embed_field/video_embed_field.form.css

@@ -0,0 +1,4 @@
+/* Style to make sure the fields are the right way */
+table input.fluid.video_embed_url {
+	width:100%;
+}

+ 519 - 0
sites/all/modules/contrib/fields/video_embed_field/video_embed_field.handlers.inc

@@ -0,0 +1,519 @@
+<?php
+/**
+ * Provide some handlers for video embed field
+ * Other modules can implement the hook_video_embed_handler_info to provide more handlers
+ */
+
+
+/**
+ * Implements hook_video_embed_handler_info().
+ */
+function video_embed_field_video_embed_handler_info() {
+  $handlers = array();
+
+  $handlers['youtube'] = array(
+    'title' => 'Youtube',
+    'function' => 'video_embed_field_handle_youtube',
+    'thumbnail_function' => 'video_embed_field_handle_youtube_thumbnail',
+    'data_function' => 'video_embed_field_handle_youtube_data',
+    'form' => 'video_embed_field_handler_youtube_form',
+    'domains' => array(
+      'youtube.com',
+      'youtu.be',
+    ),
+    'defaults' => array(
+      'width' => '640px',
+      'height' => '360px',
+      'autoplay' => 0,
+      'hd' => 1,
+      'rel' => 0,
+      'autohide' => 2,
+      'showinfo' => 1,
+      'modestbranding' => 0,
+      'theme' => 'dark',
+      'iv_load_policy' => 1,
+    ),
+  );
+
+  $handlers['vimeo'] = array(
+    'title' => 'Vimeo',
+    'function' => 'video_embed_field_handle_vimeo',
+    'thumbnail_function' => 'video_embed_field_handle_vimeo_thumbnail',
+    'data_function' => 'video_embed_field_handle_vimeo_data',
+    'form' => 'video_embed_field_handler_vimeo_form',
+    'domains' => array(
+      'vimeo.com',
+    ),
+    'defaults' => array(
+      'width' => '640px',
+      'height' => '360px',
+      'color' => '00adef',
+      'portrait' => 1,
+      'title' => 1,
+      'byline' => 1,
+      'autoplay' => 0,
+      'loop' => 0,
+    ),
+  );
+
+  return $handlers;
+}
+
+/**
+ * Helper function to get the youtube video's id
+ * Returns false if it doesn't parse for wahtever reason
+ */
+function _video_embed_field_get_youtube_id($url) {
+  // Find the ID of the video they want to play from the url
+  if (stristr($url, 'http://')) {
+    $url = substr($url, 7);
+  }
+  elseif (stristr($url, 'https://')) {
+    $url = substr($url, 8);
+  }
+
+  if (stristr($url, 'playlist')) {
+    //Playlists need the appended ampersand to take the options properly.
+    $url = $url . '&';
+    $pos = strripos($url, '?list=');
+    if ($pos !== FALSE) {
+      $pos2 = stripos($url, '&');
+      $pos2++;
+    }
+    else {
+      return FALSE;
+    }
+  }
+  //Alternate playlist link
+  elseif (stristr($url, 'view_play_list')) {
+    $url = $url . '&';
+    //All playlist ID's are prepended with PL. view_play_list links allow you to not have that, though.
+    if (!stristr($url, '?p=PL')) {
+      $url = substr_replace($url, 'PL', strpos($url, '?p=') + 3, 0);
+    }
+    //Replace the links format with the embed format
+    $url = str_ireplace('play_list?p=', 'videoseries?list=', $url);
+    $pos = strripos($url, 'videoseries?list=');
+    if ($pos !== FALSE) {
+      $pos2 = stripos($url, '&');
+      $pos2++;
+    }
+    else {
+      return FALSE;
+    }
+  }
+  else {
+    $pos = strripos($url, 'v=');
+    if ($pos !== FALSE) {
+      $pos += 2;
+      $pos2 = stripos($url, '&', $pos);
+      $pos_hash = stripos($url, '#', $pos);
+
+      $pos2 = _video_embed_get_min($pos2, $pos_hash);
+    }
+    else {
+      $pos = strripos($url, '/');
+      if ($pos !== FALSE) {
+        $pos++;
+        $pos2 = stripos($url, '?', $pos);
+        $pos_hash = stripos($url, '#', $pos);
+
+        $pos2 = _video_embed_get_min($pos2, $pos_hash);
+      }
+    }
+  }
+  if ($pos === FALSE) {
+    return FALSE;
+  }
+  else {
+    if ($pos2 > 0) {
+      $id = substr($url, $pos, $pos2 - $pos);
+    }
+    else {
+      $id = substr($url, $pos);
+    }
+  }
+  return $id;
+}
+
+/**
+ * Handler for Youtube videos.
+ */
+function video_embed_field_handle_youtube($url, $settings) {
+  $output = array();
+
+  //Grab the minutes and seconds, and just convert it down to seconds
+  preg_match('/#t=((?P<min>\d+)m)?((?P<sec>\d+)s)?/', $url, $matches);
+
+  //Give it some default data in case there is no #t=...
+  $matches += array(
+    "min" => 0,
+    "sec" => 0,
+  );
+  $time = ($matches["min"] * 60) + $matches["sec"];
+  $settings['start'] = $time;
+
+  $id = _video_embed_field_get_youtube_id($url);
+  if (!$id) {
+    // We can't decode the URL - just return the URL as a link
+    $output['#markup'] = l($url, $url);
+    return $output;
+  }
+  // Construct the embed code
+  $settings['wmode'] = 'opaque';
+  $settings_str = _video_embed_code_get_settings_str($settings);
+
+  $output['#markup'] = '<iframe width="' . $settings['width'] . '" height="' . $settings['height'] . '" src="//www.youtube.com/embed/' . $id . '?' . $settings_str . '" frameborder="0" allowfullscreen></iframe>';
+
+  return $output;
+}
+
+/**
+ * Get the thumbnail url for youtube videos
+ */
+function video_embed_field_handle_youtube_thumbnail($video_url) {
+  $info = array();
+
+  $id = _video_embed_field_get_youtube_id($video_url);
+
+  //Playlist
+  if (stristr($id, '?list=')) {
+    //Strip out all but the ID, including the PL behind the ID.
+    $start = strpos($id, '?list=PL') + 8;
+    $length = strpos($id, '&') - $start;
+    $id = substr($id, $start, $length);
+    $info['id'] = $id;
+    //Playlist info is stored in XML. The thumbnail is in there.
+    $xml = drupal_http_request('http://gdata.youtube.com/feeds/api/playlists/' . $id);
+    if (!isset($xml->error)) {
+      $xml = new SimpleXMLElement($xml->data);
+      $media = $xml->children('http://search.yahoo.com/mrss/');
+      if ($media->group->thumbnail && $media->group->thumbnail[0]->attributes()) {
+        $attrs = $media->group->thumbnail[0]->attributes();
+        $info['url'] = (string) $attrs['url'];
+      }
+    }
+  }
+  //Regular video
+  elseif ($id) {
+    $info['id'] = $id;
+    $info['url'] = 'http://img.youtube.com/vi/' . $id . '/0.jpg';
+  }
+  return $info;
+}
+
+/**
+ * Get video data for a YouTube video URL
+ *
+ * @param string $url
+ *   A YouTube video URL to get data for
+ *
+ * @return array|false $data
+ *   An array of video data, or FALSE if unable to fetch data
+ */
+function video_embed_field_handle_youtube_data($url) {
+  $data = array();
+
+  // Get YouTube video ID from URL
+  $id = _video_embed_field_get_youtube_id($url);
+
+  if ($id) {
+    $response = drupal_http_request('http://gdata.youtube.com/feeds/api/videos/' . $id . '?v=2&alt=json');
+    if (!isset($response->error)) {
+      $data = json_decode($response->data);
+      $data = isset($data->entry) ? (array) $data->entry : (array) $data->feed;
+      return _video_embed_field_clean_up_youtube_data($data);
+    }
+  }
+
+  return FALSE;
+}
+
+/**
+ * Flatten out some unnecessary nesting in the youtube data
+ */
+function _video_embed_field_clean_up_youtube_data($data) {
+  //make things a bit nicer for people trying to use the data
+  foreach ($data as $key => $value) {
+    if (is_object($value)) {
+      $temp = (array) $value;
+      if (isset($temp['$t'])) {
+        $data[$key] = $temp['$t'];
+      }
+      else {
+        $data[$key] = _video_embed_field_clean_up_youtube_data($temp);
+      }
+    }
+    elseif (is_array($value)) {
+      $data[$key] = _video_embed_field_clean_up_youtube_data($value);
+    }
+
+    if ($key === 'category') {
+      $terms = array();
+      foreach ($data[$key] as $value) {
+        if (isset($value['scheme']) && $value['scheme'] == 'http://schemas.google.com/g/2005#kind') {
+          continue;
+        }
+
+        if (isset($value['term'])) {
+          $terms[] = $value['term'];
+        }
+      }
+      $data['terms'] = $terms;
+    }
+  }
+  return $data;
+}
+
+/**
+ * Defines the form elements for the Youtube configuration form.
+ */
+function video_embed_field_handler_youtube_form($defaults) {
+  $form = array();
+
+  $form['width'] = array(
+    '#type' => 'textfield',
+    '#size' => '5',
+    '#title' => t('Player Width'),
+    '#description' => t('The width of the youtube player.'),
+    '#default_value' => $defaults['width'],
+  );
+  $form['height'] = array(
+    '#type' => 'textfield',
+    '#size' => '5',
+    '#title' => t('Player Height'),
+    '#description' => t('The height of the youtube player.'),
+    '#default_value' => $defaults['height'],
+  );
+  $form['theme'] = array(
+    '#type' => 'select',
+    '#options' => array(
+      'dark' => t('Dark'),
+      'light' => t('Light'),
+    ),
+    '#title' => t('Player theme'),
+    '#default_value' => $defaults['theme'],
+  );
+  $form['autoplay'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Autoplay'),
+    '#description' => t('Play the video immediately.'),
+    '#default_value' => $defaults['autoplay'],
+  );
+  $form['hd'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Use HD'),
+    '#description' => t('Attempt to play the video in HD if available.'),
+    '#default_value' => $defaults['hd'],
+  );
+  $form['rel'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Show related videos'),
+    '#description' => t('Show related videos after the video is finished playing.'),
+    '#default_value' => $defaults['rel'],
+  );
+  $form['showinfo'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Show info'),
+    '#description' => t('Display information like the video title and rating before the video starts playing.'),
+    '#default_value' => $defaults['showinfo'],
+  );
+  $form['modestbranding'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Hide Youtube logo'),
+    '#description' => t('Hide the Youtube logo button on the player'),
+    '#default_value' => $defaults['modestbranding'],
+  );
+  $form['iv_load_policy'] = array(
+    '#type' => 'radios',
+    '#options' => array(
+      1 => t('Show video annotations.'),
+      3 => t('Hide video annotations.'),
+    ),
+    '#title' => t('Display annotations'),
+    '#description' => t('Controls the display of annotations over the video content. Only works when using the flash player.'),
+    '#default_value' => $defaults['iv_load_policy'],
+  );
+  $form['autohide'] = array(
+    '#type' => 'radios',
+    '#options' => array(
+      0 => t('The video progress bar and player controls will be visible throughout the video.'),
+      1 => t('Automatically slide the video progress bar and the player controls out of view a couple of seconds after the video starts playing. They will only reappear if the user moves her mouse over the video player or presses a keyboard key.'),
+      2 => t('The video progress bar will fade out but the player controls (play button, volume control, etc.) remain visible.'),
+    ),
+    '#title' => t('Autohide progress bar and the player controls'),
+    '#description' => t('Controls the autohide behavior of the youtube player controls.'),
+    '#default_value' => $defaults['autohide'],
+  );
+
+  return $form;
+}
+
+/**
+ * Helper function to get the Vimeo video's ID
+ *
+ * @param string $url
+ *   A Vimeo video URL to get the ID of
+ *
+ * @return integer|false $id
+ *   The video ID, or FALSE if unable to get the video ID
+ */
+function _video_embed_field_get_vimeo_id($url) {
+  $pos = strripos($url, '/');
+  if ($pos != FALSE) {
+    $pos += 1;
+    return (int) substr($url, $pos);
+  }
+  return FALSE;
+}
+
+/**
+ * Handler for Vimeo videos.
+ */
+function video_embed_field_handle_vimeo($url, $settings) {
+  // Get ID of video from URL
+  $id = _video_embed_field_get_vimeo_id($url);
+  if (!$id) {
+    return array(
+      '#markup' => l($url, $url),
+    );
+  }
+
+  // Construct the embed code
+  $settings['portrait'] = 0;
+  $settings_str = _video_embed_code_get_settings_str($settings);
+
+  return array(
+    '#markup' => '<iframe width="' . $settings['width'] . '" height="' . $settings['height'] . '" src="//player.vimeo.com/video/' . $id .
+                 '?' . $settings_str . '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowfullscreen></iframe>',
+  );
+}
+
+/**
+ * Get the thumbnail url for youtube videos
+ */
+function video_embed_field_handle_vimeo_thumbnail($url) {
+  // Get ID of video from URL
+  $id = _video_embed_field_get_vimeo_id($url);
+  $info = array(
+    'id' => $id,
+  );
+  $response = drupal_http_request('http://vimeo.com/api/v2/video/' . $id . '.php');
+  if (!isset($response->error)) {
+    $response = unserialize($response->data);
+    $video = current($response);
+
+    $image_url = $video['thumbnail_large'];
+    $info['url'] = $image_url;
+  }
+  return $info;
+}
+
+/**
+ * Get video data for a Vimeo video URL
+ *
+ * @param string $url
+ *   A Vimeo video URL to get data for
+ *
+ * @return array|false $data
+ *   An array of video data, or FALSE if unable to fetch data
+ */
+function video_embed_field_handle_vimeo_data($url) {
+  // Get ID of video from URL
+  $id = _video_embed_field_get_vimeo_id($url);
+  if ($id) {
+    $response = drupal_http_request('http://vimeo.com/api/v2/video/' . $id . '.php');
+    if (!isset($response->error)) {
+      $response = unserialize($response->data);
+      return (array) current($response);
+    }
+  }
+  return FALSE;
+}
+
+/**
+ * Defines the form elements for the Vimeo configuration form.
+ */
+function video_embed_field_handler_vimeo_form($defaults) {
+  $form = array();
+
+  $form['width'] = array(
+    '#type' => 'textfield',
+    '#size' => '5',
+    '#title' => t('Player Width'),
+    '#description' => t('The width of the vimeo player.'),
+    '#default_value' => $defaults['width'],
+  );
+  $form['height'] = array(
+    '#type' => 'textfield',
+    '#size' => '5',
+    '#title' => t('Player Height'),
+    '#description' => t('The height of the vimeo player.'),
+    '#default_value' => $defaults['height'],
+  );
+  $form['color'] = array(
+    '#type' => 'select',
+    '#options' => array(
+      '00adef' => t('Blue'),
+      'ff9933' => t('Orange'),
+      'c9ff23' => t('Lime'),
+      'ff0179' => t('Fuschia'),
+      'ffffff' => t('White'),
+    ),
+    '#title' => t('Player Color'),
+    '#description' => t('The color to use on the vimeo player.'),
+    '#default_value' => $defaults['color'],
+  );
+  $form['portrait'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Overlay Author Thumbnail'),
+    '#description' => t('Overlay the author\'s thumbnail before the video is played.'),
+    '#default_value' => $defaults['portrait'],
+  );
+  $form['title'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Overlay Video\'s Title'),
+    '#description' => t('Overlay the video\'s title before the video is played.'),
+    '#default_value' => $defaults['title'],
+  );
+  $form['byline'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Overlay Video\'s Byline'),
+    '#description' => t('Overlay the video\'s description before the video is played.'),
+    '#default_value' => $defaults['byline'],
+  );
+  $form['overridable'] = array(
+    '#prefix' => '<p class="note"><strong>' . t('Note') . ': </strong><em>',
+    '#markup' => t('Color, portrait, title and byline can be restricted by Vimeo Plus videos.
+      Such videos will ignore these settings.'),
+    '#suffix' => '</em></p>',
+  );
+  $form['autoplay'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Autoplay'),
+    '#description' => t('Play the video immediately.'),
+    '#default_value' => $defaults['autoplay'],
+  );
+  $form['loop'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Loop'),
+    '#description' => t('Loop the video\'s playback'),
+    '#default_value' => $defaults['loop'],
+  );
+  return $form;
+}
+
+/**
+ * Calculate the min index for use in finding the id of a youtube video
+ */
+function _video_embed_get_min($pos1, $pos2) {
+  if (!$pos1) {
+    return $pos2;
+  }
+  elseif (!$pos2) {
+    return $pos1;
+  }
+  else {
+    return min($pos1, $pos2);
+  }
+}

+ 14 - 0
sites/all/modules/contrib/fields/video_embed_field/video_embed_field.info

@@ -0,0 +1,14 @@
+name = "Video Embed Field"
+description = "Expose a field type for embedding videos from youtube or vimeo."
+core = 7.x
+package = Media
+configure = admin/config/media/vef_video_styles
+
+dependencies[] = ctools
+dependencies[] = image
+; Information added by drupal.org packaging script on 2012-10-17
+version = "7.x-2.0-beta5+11-dev"
+core = "7.x"
+project = "video_embed_field"
+datestamp = "1350438417"
+

+ 243 - 0
sites/all/modules/contrib/fields/video_embed_field/video_embed_field.install

@@ -0,0 +1,243 @@
+<?php
+/**
+ * @file
+ * Install, update and uninstall functions for the video_embed_field module.
+ *
+ */
+
+/**
+ * Install file for video_embed_field module
+ * @author jcaldwell
+ */
+
+/**
+ * Implements hook_field_schema().
+ */
+function video_embed_field_field_schema($field) {
+  switch ($field['type']) {
+    case 'video_embed_field':
+      $columns = array(
+        'video_url' => array(
+          'type' => 'varchar',
+          'length' => 512,
+          'default' => '',
+        ),
+        'thumbnail_path' => array(
+          'type' => 'varchar',
+          'length' => 512,
+          'default' => '',
+        ),
+        'video_data' => array(
+          'type' => 'blob',
+          'not null' => FALSE,
+          'size' => 'big',
+          'serialize' => TRUE,
+        ),
+        'embed_code' => array(
+          'type' => 'varchar',
+          'length' => 1024,
+          'default' => '',
+        ),
+        'description' => array(
+          'type' => 'text',
+          'not null' => FALSE,
+        ),
+      );
+      $indexes = array();
+      break;
+  }
+
+  return array(
+    'columns' => $columns,
+    'indexes' => $indexes,
+  );
+}
+
+/**
+ * Implements hook_schema().
+ */
+function video_embed_field_schema() {
+  $schema['vef_video_styles'] = array(
+    'description' => 'Stores video embed styles.',
+    'export' => array(
+      'key' => 'name',
+      'primary key' => 'vsid',
+      'identifier' => 'video_embed_style', // Exports will be as $video_style
+      'default hook' => 'default_video_embed_styles', // Function hook name.
+      'api' => array(
+        'owner' => 'video_embed_field',
+        'api' => 'default_video_embed_styles', // Base name for api include files.
+        'minimum_version' => 1,
+        'current_version' => 1,
+      ),
+    ),
+    'fields' => array(
+      'vsid' => array(
+        'description' => 'The primary identifier for a video style.',
+        'type' => 'serial',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'no export' => TRUE,
+      ),
+      'name' => array(
+        'description' => 'The style name.',
+        'type' => 'varchar',
+        'length' => '255',
+        'not null' => TRUE,
+      ),
+      'data' => array(
+        'description' => 'The configuration data for the style.',
+        'type' => 'blob',
+        'size' => 'big',
+        'not null' => TRUE,
+        'serialize' => TRUE,
+      ),
+    ),
+    'primary key' => array('vsid'),
+    'unique keys' => array(
+      'name' => array('name'),
+    ),
+  );
+  return $schema;
+}
+
+/**
+ * Implements hook_uninstall().
+ */
+function video_embed_field_uninstall() {
+  //do nothing right now - should eventually remove all the variables
+}
+
+/**
+ * Update 7000
+ * Add an optional description form
+ */
+function video_embed_field_update_7000() {
+  // Get the list of fields of type 'video_embed_field'.
+  $video_embed_fields = array();
+  foreach (field_info_fields() as $field_name => $field_info) {
+    if ($field_info['type'] == 'video_embed_field') {
+      $video_embed_fields[$field_name] = field_read_field($field_name);
+    }
+  }
+
+  foreach ($video_embed_fields as $field) {
+    if ($field['deleted']) {
+      $table = "field_deleted_data_{$field['id']}";
+      $revision_table = "field_deleted_revision_{$field['id']}";
+    }
+    else {
+      $table = "field_data_{$field['field_name']}";
+      $revision_table = "field_revision_{$field['field_name']}";
+    }
+    $column = $field['field_name'] . '_' . 'description';
+    db_add_field($table, $column, array('type' => 'text', 'not null' => FALSE));
+    db_add_field($revision_table, $column, array('type' => 'text', 'not null' => FALSE));
+  }
+
+  return t('Additional columns added.');
+}
+
+/**
+ * Update 7001
+ * Add video style storage table
+ */
+function video_embed_field_update_7001() {
+  if (!db_table_exists('vef_video_styles')) {
+    $schema = video_embed_field_schema();
+    db_create_table('vef_video_styles', $schema['vef_video_styles']);
+  }
+
+  return t('Video styles storage table created.');
+}
+/**
+ * Update 7002
+ * Add field for storing the path to the video thumbnail
+ */
+function video_embed_field_update_7002() {
+  // Get the list of fields of type 'video_embed_field'.
+  $video_embed_fields = array();
+  foreach (field_info_fields() as $field_name => $field_info) {
+    if ($field_info['type'] == 'video_embed_field') {
+      $video_embed_fields[$field_name] = field_read_field($field_name);
+    }
+  }
+
+  foreach ($video_embed_fields as $field) {
+    if ($field['deleted']) {
+      $table = "field_deleted_data_{$field['id']}";
+      $revision_table = "field_deleted_revision_{$field['id']}";
+    }
+    else {
+      $table = "field_data_{$field['field_name']}";
+      $revision_table = "field_revision_{$field['field_name']}";
+    }
+    $column = $field['field_name'] . '_' . 'thumbnail_path';
+    db_add_field($table, $column, array(
+      'type' => 'varchar',
+      'length' => 512,
+      'default' => '',
+    ));
+    db_add_field($revision_table, $column, array(
+      'type' => 'varchar',
+      'length' => 512,
+      'default' => '',
+    ));
+  }
+
+  return t('Thumbnail column added.');
+}
+
+/**
+ * Enable inline colorbox support if colorbox is installed [NO LONGER NEEDED - This update hook does nothing]
+ */
+function video_embed_field_update_7003() {
+  //this is no longer needed
+  //variable_set('colorbox_inline', 1);
+}
+
+/**
+ * Enable colorbox load support if colorbox is installed, we no longer need inline support
+ */
+function video_embed_field_update_7004() {
+  variable_set('colorbox_load', 1);
+}
+
+/**
+ * Add data column to field database.
+ */
+function video_embed_field_update_7005() {
+  // Get the list of fields of type 'video_embed_field'.
+  $video_embed_fields = array();
+  foreach (field_info_fields() as $field_name => $field_info) {
+    if ($field_info['type'] == 'video_embed_field') {
+      $video_embed_fields[$field_name] = field_read_field($field_name);
+    }
+  }
+
+  foreach ($video_embed_fields as $field) {
+    if ($field['deleted']) {
+      $table = "field_deleted_data_{$field['id']}";
+      $revision_table = "field_deleted_revision_{$field['id']}";
+    }
+    else {
+      $table = "field_data_{$field['field_name']}";
+      $revision_table = "field_revision_{$field['field_name']}";
+    }
+    $column = $field['field_name'] . '_' . 'video_data';
+    db_add_field($table, $column, array(
+      'type' => 'blob',
+      'not null' => FALSE,
+      'size' => 'big',
+      'serialize' => TRUE,
+    ));
+    db_add_field($revision_table, $column, array(
+      'type' => 'blob',
+      'not null' => FALSE,
+      'size' => 'big',
+      'serialize' => TRUE,
+    ));
+  }
+
+  return t('Data column added. Please clear cache.');
+}

+ 570 - 0
sites/all/modules/contrib/fields/video_embed_field/video_embed_field.module

@@ -0,0 +1,570 @@
+<?php
+
+/**
+ * Provides a simple field for easily embedding videos from youtube or vimeo
+ *
+ * This module is not intended to replace media or video - it does not allow for any local storage of videos, custom players or anything else
+ * It simply allows users to embed videos from youtube and vimeo - and provides a hook to allow other modules to provide more providers.
+ *
+ * Uses CTools Export UI to manage settings. @see ./plugins/export_ui/video_embed_field_export_ui.inc
+ *
+ * @author jec006, jdelaune
+ */
+
+// Load all Field module hooks.
+module_load_include('inc', 'video_embed_field', 'video_embed_field.field');
+// Load the admin forms
+module_load_include('inc', 'video_embed_field', 'video_embed_field.admin');
+// Load our default handlers
+module_load_include('inc', 'video_embed_field', 'video_embed_field.handlers');
+// Load feeds mapping hooks
+module_load_include('inc', 'video_embed_field', 'video_embed_field.feeds');
+
+/**
+ * Implements hook_ctools_plugin_directory().
+ */
+function video_embed_field_ctools_plugin_directory($module, $type) {
+  // Load the export_ui plugin.
+  if ($type == 'export_ui') {
+    return 'plugins/export_ui';
+  }
+}
+
+/**
+ * Implements hook_ctools_plugin_api().
+ *
+ * Tell CTools that we support the default_mymodule_presets API.
+ */
+function video_embed_field_ctools_plugin_api($owner, $api) {
+  if ($owner == 'video_embed_field' && $api == 'default_video_embed_styles') {
+    return array('version' => 1);
+  }
+}
+
+/**
+ * Implements hook_default_video_styles().
+ */
+function video_embed_field_default_video_embed_styles() {
+  $styles = array();
+
+  $handlers = video_embed_get_handlers();
+  //create the normal handler
+  $normal = new stdClass;
+  $normal->disabled = FALSE; /* Edit this to true to make a default video_embed_style disabled initially */
+  $normal->api_version = 1;
+  $normal->name = 'normal';
+  $normal->data = array();
+
+  $teaser = new stdClass;
+  $teaser->disabled = FALSE; /* Edit this to true to make a default video_embed_style disabled initially */
+  $teaser->api_version = 1;
+  $teaser->name = 'teaser';
+  $teaser->data = array();
+
+  //add in our settings for each of the handlers
+  foreach ($handlers as $name => $handler) {
+    $normal->data[$name] = $handler['defaults'];
+    $teaser->data[$name] = $handler['defaults'];
+    $teaser->data[$name]['width'] = 480;
+    $teaser->data[$name]['height'] = 270;
+  }
+
+  return array($normal, $teaser);
+}
+
+/**
+ * Implements hook_menu().
+ */
+function video_embed_field_menu() {
+  $items = array();
+
+  $items['vef/load/%'] = array(
+    'title' => 'Video Embed Field - Load Video',
+    'page callback' => '_video_embed_field_show_video',
+    'page arguments' => array(2),
+    'access callback' => TRUE,
+    'type' => MENU_CALLBACK,
+  );
+
+  return $items;
+}
+
+/**
+ * Get an array of all styles and their settings.
+ *
+ * @return
+ *   An array of styles keyed by the video style ID (vsid).
+ * @see video_embed_field_video_style_load()
+ */
+function video_embed_field_video_styles() {
+  $styles = &drupal_static(__FUNCTION__);
+
+  // Grab from cache or build the array.
+  if (!isset($styles)) {
+    // load the style via ctools - which will handle all the caching for us -
+    // however, because it does a bit more logic, lets still statically cache this function
+    ctools_include('export');
+    $styles = ctools_export_load_object('vef_video_styles');
+  }
+
+  return $styles;
+}
+
+/**
+ * Load a style by style name or ID. May be used as a loader for menu items.
+ *
+ * Note that you may also use ctools_export_load_object with the key being vef_video_styles
+ *
+ * @param $name
+ *   The name of the style.
+ * @param $isid
+ *   Optional. The numeric id of a style if the name is not known.
+ * @return
+ *   An video style array containing the following keys:
+ *   - "vsid": The unique image style ID.
+ *   - "name": The unique image style name.
+ *   - "data": An array of video settings within this video style.
+ *   If the video style name or ID is not valid, an empty array is returned.
+ */
+function video_embed_field_video_style_load($name = NULL, $vsid = NULL) {
+  $styles = video_embed_field_video_styles();
+
+  // If retrieving by name.
+  if (isset($name) && isset($styles[$name])) {
+    $style = $styles[$name];
+  } // If retrieving by image style id.
+  elseif (!isset($name) && isset($vsid)) {
+    foreach ($styles as $name => $database_style) {
+      if (isset($database_style['vsid']) && $database_style['vsid'] == $vsid) {
+        $style = $database_style;
+        break;
+      }
+    }
+  }
+
+  //if we found a style return it
+  if (isset($style)) {
+    return $style;
+  }
+
+  // Otherwise the style was not found.
+  return FALSE;
+}
+
+/**
+ * Implements hook_permission().
+ */
+function video_embed_field_permission() {
+  return array(
+    'administer video styles' => array(
+      'title' => t('Administer video styles'),
+      'description' => t('Create and modify styles for embedded videos.'),
+    ),
+  );
+}
+
+/**
+ * Implements hook_theme().
+ */
+function video_embed_field_theme() {
+  return array(
+    // Theme functions in video_embed_field.admin.inc.
+    'video_embed_field_video_style_list' => array(
+      'variables' => array('styles' => NULL),
+    ),
+    'video_embed_field_embed_code' => array(
+      'template' => 'video-embed-field-embed-code',
+      'variables' => array('url' => NULL, 'style' => 'normal', 'video_data' => array()),
+    ),
+    'video_embed_field_colorbox_code' => array(
+      'variables' => array('image_url' => NULL, 'image_style' => 'normal', 'video_url' => NULL, 'video_style' => NULL, 'video_data' => array()),
+    ),
+  );
+}
+
+/**
+ * Creates a hook that other modules can implement to get handlers - hook_video_embed_handler_info
+ * Can be used to add more handlers if needed - from other modules and such
+ * @see video_embed_field.api.php for more information
+ */
+function video_embed_get_handlers() {
+  $handlers = cache_get('video_embed_field_handlers');
+
+  if ($handlers === FALSE) {
+    $handlers = module_invoke_all('video_embed_handler_info');
+    drupal_alter('video_embed_field_handlers', $handlers);
+    cache_set('video_embed_field_handlers', $handlers);
+  }
+  else {
+    $handlers = $handlers->data;
+  }
+
+  return $handlers;
+}
+
+function video_embed_get_handler($url) {
+  // Process video URL
+  if (!stristr($url, 'http://') && !stristr($url, 'https://')) {
+    $url = 'http://' . $url;
+  }
+  $parts = parse_url($url);
+  if (!isset($parts['host'])) {
+    return FALSE;
+  }
+
+  $host = $parts['host'];
+  if (stripos($host, 'www.') > -1) {
+    $host = substr($host, 4);
+  }
+
+  $domains = _video_embed_field_get_provider_domains();
+  $handlers = video_embed_get_handlers();
+  if (isset($domains[$host])) {
+    $handler_name = $domains[$host];
+    $handler = $handlers[$handler_name];
+    $handler['name'] = $handler_name;
+    return $handler;
+  }
+  else {
+    return FALSE;
+  }
+}
+
+/**
+ * Create a form from the player configuration options
+ * $defaults will be passed in with the default settings for the various fields
+ */
+function video_embed_field_get_form($defaults) {
+  $form = array();
+
+  $handlers = video_embed_get_handlers();
+
+  foreach ($handlers as $name => $handler) {
+    if (isset($handler['form']) && function_exists($handler['form'])) {
+      $handler_defaults = isset($defaults[$name]) ? $defaults[$name] : array();
+      $handler_defaults = array_merge($handler['defaults'], $handler_defaults);
+
+      $form[$name] = call_user_func($handler['form'], $handler_defaults);
+
+      $form[$name] += array(
+        '#type' => 'fieldset',
+        '#title' => t($handler['title']),
+        '#tree' => TRUE,
+      );
+    }
+  }
+
+  return $form;
+}
+
+/**
+ * Get an array of image styles suitable for using as select list options.
+ *
+ * @param $include_empty
+ *   If TRUE a <none> option will be inserted in the options array.
+ * @return
+ *   Array of image styles both key and value are set to style name.
+ */
+function video_embed_field_video_style_options($include_empty = TRUE) {
+  $styles = video_embed_field_video_styles();
+  $options = array();
+  if ($include_empty && !empty($styles)) {
+    $options[''] = t('<none>');
+  }
+  $options = array_merge($options, drupal_map_assoc(array_keys($styles)));
+  if (empty($options)) {
+    $options[''] = t('No defined styles');
+  }
+  return $options;
+}
+
+/**
+ * Implements hook_filter_info().
+ */
+function video_embed_field_filter_info() {
+  $filters['video_embed_field'] = array(
+    'title' => t('Video Embedding'),
+    'description' => t('Replaces [VIDEO::http://www.youtube.com/watch?v=someVideoID::aVideoStyle] tags with embedded videos.'),
+    'process callback' => 'video_embed_field_filter_process',
+  );
+
+  return $filters;
+}
+
+/**
+ * Video Embed Field filter process callback.
+ */
+function video_embed_field_filter_process($text, $filter, $format) {
+  preg_match_all('/ \[VIDEO:: ( [^\[\]]+ )* \] /x', $text, $matches);
+
+  $tag_match = (array) array_unique($matches[1]);
+  $handlers = video_embed_get_handlers();
+
+  foreach ($tag_match as $tag) {
+    $parts = explode('::', $tag);
+
+    // Get video style
+    if (isset($parts[1])) {
+      $style = $parts[1];
+    }
+    else {
+      $style = 'normal';
+    }
+
+    $embed_code = theme('video_embed_field_embed_code', array('url' => $parts[0], 'style' => $style));
+
+    $text = str_replace('[VIDEO::' . $tag . ']', $embed_code, $text);
+  }
+
+  return $text;
+}
+
+/**
+ * Process variables to format a video player.
+ *
+ * $variables contains the following information:
+ * - $url
+ * - $style
+ * - $video_data
+ *
+ * @see video-embed.tpl.php
+ */
+function template_preprocess_video_embed_field_embed_code(&$variables) {
+  // Get the handler
+  $handler = video_embed_get_handler($variables['url']);
+  $variables['handler'] = $handler['name'];
+
+  // Load the style
+  $style = video_embed_field_video_style_load($variables['style']);
+  // If there was an issue load in the default style
+  if ($style == FALSE) {
+    $style = video_embed_field_video_style_load('normal');
+  }
+  if (isset($style->data[$variables['handler']])) {
+    $variables['style_settings'] = $style->data[$variables['handler']];
+  } //safety valve for when we add new handlers and there are styles in the database.
+  else {
+    $variables['style_settings'] = $handler['defaults'];
+  }
+
+
+  // Prepare the URL
+  if (!stristr($variables['url'], 'http://') && !stristr($variables['url'], 'https://')) {
+    $variables['url'] = 'http://' . $variables['url'];
+  }
+
+  // Prepare embed code
+  if ($handler && isset($handler['function']) && function_exists($handler['function'])) {
+    $embed_code = call_user_func($handler['function'], $variables['url'], $variables['style_settings']);
+    $variables['embed_code'] = drupal_render($embed_code);
+  }
+  else {
+    $variables['embed_code'] = l($variables['url'], $variables['url']);
+  }
+
+  // Prepare video data
+  $variables['data'] = $variables['video_data'];
+  unset($variables['video_data']);
+}
+
+/**
+ * Returns image style image with a link to
+ * an embedded video in colorbox.
+ *
+ * @param $variables
+ *   An associative array containing:
+ *   - image_url: The image URL.
+ *   - image_style: The image style to use.
+ *   - video_url: The video URL.
+ *   - video_style: The video style to use.
+ *   - video_data: An array of data about the video.
+ *
+ * @ingroup themeable
+ */
+function theme_video_embed_field_colorbox_code($variables) {
+  $style = video_embed_field_video_style_load($variables['video_style']);
+
+  // If there was an issue load in the default style
+  if ($style == FALSE) {
+    $style = video_embed_field_video_style_load('normal');
+  }
+
+  $handler = video_embed_get_handler($variables['video_url']);
+
+  $data = $style->data[$handler['name']];
+
+  //Create a unique ID for colorbox inline
+  $id = uniqid('video_embed_field-' . rand());
+
+  if ($variables['image_style'] == 'none') {
+    $image = array(
+      array(
+        '#theme' => 'image',
+        '#path' => $variables['image_url'],
+      ),
+    );
+  }
+  else {
+    $image = array(
+      '#theme' => 'image_style',
+      '#path' => $variables['image_url'],
+      '#style_name' => $variables['image_style'],
+    );
+  }
+
+  $image = drupal_render($image);
+
+  // Write values for later AJAX load
+  $hash = _video_embed_field_store_video($variables['video_url'], $variables['video_style']);
+
+  $output = l($image, base_path() . '?q=vef/load/' . $hash . '&width=' . ($data['width']) . '&height=' . ($data['height'] + 3), array('html' => TRUE, 'external' => TRUE, 'attributes' => array('class' => array('colorbox-load'))));
+
+  return $output;
+}
+
+/**
+ * Get the thumbnail url for a given video url
+ * @param $url - the url of the video
+ * @return a string representing the url of the thumbnail, or FALSE on error
+ */
+function video_embed_field_thumbnail_url($url) {
+  $handler = video_embed_get_handler($url);
+  if ($handler && isset($handler['thumbnail_function']) && function_exists($handler['thumbnail_function'])) {
+    $info = call_user_func($handler['thumbnail_function'], $url);
+    $info['handler'] = $handler['name'];
+    return $info;
+  }
+  return FALSE;
+}
+
+/**
+ * Get a video data array for a given video url
+ *
+ * @param string $url
+ *   A video URL of the data array you want returned
+ *
+ * @return array|false $data
+ *   An array of video data, or FALSE on error
+ */
+function video_embed_field_get_video_data($url) {
+  $handler = video_embed_get_handler($url);
+  if ($handler && isset($handler['data_function']) && function_exists($handler['data_function'])) {
+    $data = call_user_func($handler['data_function'], $url);
+    $data['handler'] = $handler['name'];
+    return $data;
+  }
+  return FALSE;
+}
+
+/**
+ * Fetch all available provider domains.
+ */
+function _video_embed_field_get_provider_domains() {
+  $domains = array();
+
+  $handlers = video_embed_get_handlers();
+  foreach ($handlers as $name => $handler) {
+    if (isset($handler['function']) && function_exists($handler['function'])) {
+      foreach ($handler['domains'] as $domain) {
+        $domains[$domain] = $name;
+      }
+    }
+  }
+
+  return $domains;
+}
+
+/**
+ * Fetch settings string
+ */
+function _video_embed_code_get_settings_str($settings = array()) {
+  $values = array();
+
+  foreach ($settings as $name => $value) {
+    if (empty($value)) {
+      $values[] = $name;
+    }
+    else {
+      $values[] = $name . '=' . $value;
+    }
+  }
+
+  return implode('&amp;', $values);
+}
+
+//used to array filter in video_embed_field_requirements
+function _video_embed_field_array_filter($item) {
+  return (isset($item['type']) && $item['type'] == 'video_embed_field');
+}
+
+/**
+ * Store a video to be loaded later from an _video_embed_field_load_video
+ */
+function _video_embed_field_store_video($video_url, $video_style) {
+  //create a hash key
+  $hash = _video_embed_field_hash($video_url, $video_style);
+
+  //check that is record doesn't already exist before saving it
+  if (!_video_embed_field_load_video($hash)) {
+    $record = array(
+      'vhash' => $hash,
+      'video_url' => $video_url,
+      'video_style' => $video_style,
+    );
+
+    cache_set('vef-store-' . $hash, $record);
+
+    //add it to our static cache so we won't have to go to the database
+    $static_cache = &drupal_static('vef_video_store', array());
+    $static_cache[$hash] = $record;
+  }
+  return $hash;
+}
+
+/**
+ * Callback to render a video for an Ajax call
+ */
+function _video_embed_field_show_video($hash) {
+  $data = _video_embed_field_load_video($hash);
+  $video = array(
+    '#theme' => 'video_embed_field_embed_code',
+    '#style' => $data['video_style'],
+    '#url' => $data['video_url'],
+  );
+
+  print drupal_render($video);
+  return NULL;
+}
+
+/**
+ * Loads a video from the video store given its hash
+ * Returns either the data - an array with hash, video_url and video_style keys
+ */
+function _video_embed_field_load_video($hash) {
+  $static_cache = &drupal_static('vef_video_store', array());
+  //check if we've already loaded it
+  if (isset($static_cache[$hash])) {
+    return $static_cache[$hash];
+  }
+  else {
+
+    $result = cache_get('vef-store-' . $hash);
+    if ($result) {
+      //cache it before returning
+      $data = $result->data;
+      $static_cache[$hash] = $data;
+      return $data;
+    }
+    else {
+      return FALSE;
+    }
+  }
+}
+
+/**
+ * Creates a hash for storing or looking up a video in the store table
+ */
+function _video_embed_field_hash($video_url, $video_style) {
+  return md5('vef' . $video_url . $video_style);
+}
+

+ 69 - 0
sites/all/modules/features/admin/admin.features.filter.inc

@@ -0,0 +1,69 @@
+<?php
+/**
+ * @file
+ * admin.features.filter.inc
+ */
+
+/**
+ * Implements hook_filter_default_formats().
+ */
+function admin_filter_default_formats() {
+  $formats = array();
+
+  // Exported format: Filtred html.
+  $formats['filtred_html'] = array(
+    'format' => 'filtred_html',
+    'name' => 'Filtred html',
+    'cache' => 1,
+    'status' => 1,
+    'weight' => 0,
+    'filters' => array(
+      'filter_html' => array(
+        'weight' => -10,
+        'status' => 1,
+        'settings' => array(
+          'allowed_html' => '<a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <br> <img> <h6> <h5> <h4> <h3> <h2> <h1>',
+          'filter_html_help' => 1,
+          'filter_html_nofollow' => 0,
+        ),
+      ),
+      'filter_url' => array(
+        'weight' => 0,
+        'status' => 1,
+        'settings' => array(
+          'filter_url_length' => 72,
+        ),
+      ),
+    ),
+  );
+
+  // Exported format: Plain text.
+  $formats['plain_text'] = array(
+    'format' => 'plain_text',
+    'name' => 'Plain text',
+    'cache' => 1,
+    'status' => 1,
+    'weight' => 10,
+    'filters' => array(
+      'filter_html_escape' => array(
+        'weight' => 0,
+        'status' => 1,
+        'settings' => array(),
+      ),
+      'filter_url' => array(
+        'weight' => 1,
+        'status' => 1,
+        'settings' => array(
+          'filter_url_length' => 72,
+        ),
+      ),
+      'filter_autop' => array(
+        'weight' => 2,
+        'status' => 1,
+        'settings' => array(),
+      ),
+    ),
+  );
+
+  return $formats;
+}

+ 86 - 0
sites/all/modules/features/admin/admin.features.inc

@@ -0,0 +1,86 @@
+<?php
+/**
+ * @file
+ * admin.features.inc
+ */
+
+/**
+ * Implements hook_ctools_plugin_api().
+ */
+function admin_ctools_plugin_api($module = NULL, $api = NULL) {
+  if ($module == "strongarm" && $api == "strongarm") {
+    return array("version" => "1");
+  }
+}
+
+/**
+ * Implements hook_views_api().
+ */
+function admin_views_api($module = NULL, $api = NULL) {
+  return array("api" => "3.0");
+}
+
+/**
+ * Implements hook_workflow_default_workflows().
+ */
+function admin_workflow_default_workflows() {
+  $workflows = array();
+
+  // Exported workflow: Affichage
+  $workflows['Affichage'] = array(
+    'name' => 'Affichage',
+    'tab_roles' => 4,
+    'options' => 'a:4:{s:16:"comment_log_node";s:1:"0";s:15:"comment_log_tab";s:1:"0";s:13:"name_as_title";s:1:"0";s:12:"watchdog_log";s:1:"0";}',
+    'states' => array(
+      0 => array(
+        'state' => '(creation)',
+        'weight' => -50,
+        'sysid' => 1,
+        'status' => 1,
+        'name' => 'Affichage',
+      ),
+      1 => array(
+        'state' => 'Masqué',
+        'weight' => -20,
+        'sysid' => 0,
+        'status' => 1,
+        'name' => 'Affichage',
+      ),
+      2 => array(
+        'state' => 'Affiché',
+        'weight' => -20,
+        'sysid' => 0,
+        'status' => 1,
+        'name' => 'Affichage',
+      ),
+    ),
+    'transitions' => array(
+      0 => array(
+        'roles' => 'workflow_features_author_name,administrator,root',
+        'state' => '(creation)',
+        'target_state' => 'Masqué',
+      ),
+      1 => array(
+        'roles' => 'workflow_features_author_name,administrator,root',
+        'state' => '(creation)',
+        'target_state' => 'Affiché',
+      ),
+      2 => array(
+        'roles' => 'workflow_features_author_name,administrator,root',
+        'state' => 'Masqué',
+        'target_state' => 'Affiché',
+      ),
+      3 => array(
+        'roles' => 'workflow_features_author_name,administrator,root',
+        'state' => 'Affiché',
+        'target_state' => 'Masqué',
+      ),
+    ),
+    'node_types' => array(
+      0 => 'chapitre',
+      1 => 'page',
+    ),
+  );
+
+  return $workflows;
+}

+ 783 - 0
sites/all/modules/features/admin/admin.features.user_permission.inc

@@ -0,0 +1,783 @@
+<?php
+/**
+ * @file
+ * admin.features.user_permission.inc
+ */
+
+/**
+ * Implements hook_user_default_permissions().
+ */
+function admin_user_default_permissions() {
+  $permissions = array();
+
+  // Exported permission: 'access admin theme'.
+  $permissions['access admin theme'] = array(
+    'name' => 'access admin theme',
+    'roles' => array(
+      'administrator' => 'administrator',
+      'root' => 'root',
+    ),
+    'module' => 'admin_theme',
+  );
+
+  // Exported permission: 'access administration menu'.
+  $permissions['access administration menu'] = array(
+    'name' => 'access administration menu',
+    'roles' => array(
+      'administrator' => 'administrator',
+      'root' => 'root',
+    ),
+    'module' => 'admin_menu',
+  );
+
+  // Exported permission: 'access administration pages'.
+  $permissions['access administration pages'] = array(
+    'name' => 'access administration pages',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'system',
+  );
+
+  // Exported permission: 'access all views'.
+  $permissions['access all views'] = array(
+    'name' => 'access all views',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'views',
+  );
+
+  // Exported permission: 'access backup and migrate'.
+  $permissions['access backup and migrate'] = array(
+    'name' => 'access backup and migrate',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'backup_migrate',
+  );
+
+  // Exported permission: 'access backup files'.
+  $permissions['access backup files'] = array(
+    'name' => 'access backup files',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'backup_migrate',
+  );
+
+  // Exported permission: 'access content'.
+  $permissions['access content'] = array(
+    'name' => 'access content',
+    'roles' => array(
+      'anonymous user' => 'anonymous user',
+      'authenticated user' => 'authenticated user',
+      'root' => 'root',
+    ),
+    'module' => 'node',
+  );
+
+  // Exported permission: 'access content overview'.
+  $permissions['access content overview'] = array(
+    'name' => 'access content overview',
+    'roles' => array(
+      'administrator' => 'administrator',
+      'root' => 'root',
+    ),
+    'module' => 'node',
+  );
+
+  // Exported permission: 'access dashboard'.
+  $permissions['access dashboard'] = array(
+    'name' => 'access dashboard',
+    'roles' => array(
+      'administrator' => 'administrator',
+      'root' => 'root',
+    ),
+    'module' => 'dashboard',
+  );
+
+  // Exported permission: 'access rules debug'.
+  $permissions['access rules debug'] = array(
+    'name' => 'access rules debug',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'rules',
+  );
+
+  // Exported permission: 'access site in maintenance mode'.
+  $permissions['access site in maintenance mode'] = array(
+    'name' => 'access site in maintenance mode',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'system',
+  );
+
+  // Exported permission: 'access site reports'.
+  $permissions['access site reports'] = array(
+    'name' => 'access site reports',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'system',
+  );
+
+  // Exported permission: 'access user profiles'.
+  $permissions['access user profiles'] = array(
+    'name' => 'access user profiles',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'user',
+  );
+
+  // Exported permission: 'access workflow summary views'.
+  $permissions['access workflow summary views'] = array(
+    'name' => 'access workflow summary views',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'workflow_views',
+  );
+
+  // Exported permission: 'administer actions'.
+  $permissions['administer actions'] = array(
+    'name' => 'administer actions',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'system',
+  );
+
+  // Exported permission: 'administer backup and migrate'.
+  $permissions['administer backup and migrate'] = array(
+    'name' => 'administer backup and migrate',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'backup_migrate',
+  );
+
+  // Exported permission: 'administer blocks'.
+  $permissions['administer blocks'] = array(
+    'name' => 'administer blocks',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'block',
+  );
+
+  // Exported permission: 'administer content type defaults'.
+  $permissions['administer content type defaults'] = array(
+    'name' => 'administer content type defaults',
+    'roles' => array(),
+    'module' => 'content_type_extras',
+  );
+
+  // Exported permission: 'administer content types'.
+  $permissions['administer content types'] = array(
+    'name' => 'administer content types',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'node',
+  );
+
+  // Exported permission: 'administer contexts'.
+  $permissions['administer contexts'] = array(
+    'name' => 'administer contexts',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'context_ui',
+  );
+
+  // Exported permission: 'administer devel menu items'.
+  $permissions['administer devel menu items'] = array(
+    'name' => 'administer devel menu items',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'menu_admin_per_menu',
+  );
+
+  // Exported permission: 'administer features'.
+  $permissions['administer features'] = array(
+    'name' => 'administer features',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'features',
+  );
+
+  // Exported permission: 'administer features menu items'.
+  $permissions['administer features menu items'] = array(
+    'name' => 'administer features menu items',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'menu_admin_per_menu',
+  );
+
+  // Exported permission: 'administer imce'.
+  $permissions['administer imce'] = array(
+    'name' => 'administer imce',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'imce',
+  );
+
+  // Exported permission: 'administer linkit'.
+  $permissions['administer linkit'] = array(
+    'name' => 'administer linkit',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'linkit',
+  );
+
+  // Exported permission: 'administer main-menu menu items'.
+  $permissions['administer main-menu menu items'] = array(
+    'name' => 'administer main-menu menu items',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'menu_admin_per_menu',
+  );
+
+  // Exported permission: 'administer management menu items'.
+  $permissions['administer management menu items'] = array(
+    'name' => 'administer management menu items',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'menu_admin_per_menu',
+  );
+
+  // Exported permission: 'administer menu'.
+  $permissions['administer menu'] = array(
+    'name' => 'administer menu',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'menu',
+  );
+
+  // Exported permission: 'administer module filter'.
+  $permissions['administer module filter'] = array(
+    'name' => 'administer module filter',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'module_filter',
+  );
+
+  // Exported permission: 'administer modules'.
+  $permissions['administer modules'] = array(
+    'name' => 'administer modules',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'system',
+  );
+
+  // Exported permission: 'administer navigation menu items'.
+  $permissions['administer navigation menu items'] = array(
+    'name' => 'administer navigation menu items',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'menu_admin_per_menu',
+  );
+
+  // Exported permission: 'administer nodes'.
+  $permissions['administer nodes'] = array(
+    'name' => 'administer nodes',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'node',
+  );
+
+  // Exported permission: 'administer pathauto'.
+  $permissions['administer pathauto'] = array(
+    'name' => 'administer pathauto',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'pathauto',
+  );
+
+  // Exported permission: 'administer permissions'.
+  $permissions['administer permissions'] = array(
+    'name' => 'administer permissions',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'user',
+  );
+
+  // Exported permission: 'administer redirects'.
+  $permissions['administer redirects'] = array(
+    'name' => 'administer redirects',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'redirect',
+  );
+
+  // Exported permission: 'administer rules'.
+  $permissions['administer rules'] = array(
+    'name' => 'administer rules',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'rules',
+  );
+
+  // Exported permission: 'administer shortcuts'.
+  $permissions['administer shortcuts'] = array(
+    'name' => 'administer shortcuts',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'shortcut',
+  );
+
+  // Exported permission: 'administer site configuration'.
+  $permissions['administer site configuration'] = array(
+    'name' => 'administer site configuration',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'system',
+  );
+
+  // Exported permission: 'administer software updates'.
+  $permissions['administer software updates'] = array(
+    'name' => 'administer software updates',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'system',
+  );
+
+  // Exported permission: 'administer styles ui'.
+  $permissions['administer styles ui'] = array(
+    'name' => 'administer styles ui',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'styles_ui',
+  );
+
+  // Exported permission: 'administer themes'.
+  $permissions['administer themes'] = array(
+    'name' => 'administer themes',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'system',
+  );
+
+  // Exported permission: 'administer url aliases'.
+  $permissions['administer url aliases'] = array(
+    'name' => 'administer url aliases',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'path',
+  );
+
+  // Exported permission: 'administer user-menu menu items'.
+  $permissions['administer user-menu menu items'] = array(
+    'name' => 'administer user-menu menu items',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'menu_admin_per_menu',
+  );
+
+  // Exported permission: 'administer users'.
+  $permissions['administer users'] = array(
+    'name' => 'administer users',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'user',
+  );
+
+  // Exported permission: 'administer views'.
+  $permissions['administer views'] = array(
+    'name' => 'administer views',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'views',
+  );
+
+  // Exported permission: 'administer workflow'.
+  $permissions['administer workflow'] = array(
+    'name' => 'administer workflow',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'workflow_admin_ui',
+  );
+
+  // Exported permission: 'block IP addresses'.
+  $permissions['block IP addresses'] = array(
+    'name' => 'block IP addresses',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'system',
+  );
+
+  // Exported permission: 'bypass node access'.
+  $permissions['bypass node access'] = array(
+    'name' => 'bypass node access',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'node',
+  );
+
+  // Exported permission: 'bypass rules access'.
+  $permissions['bypass rules access'] = array(
+    'name' => 'bypass rules access',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'rules',
+  );
+
+  // Exported permission: 'cancel account'.
+  $permissions['cancel account'] = array(
+    'name' => 'cancel account',
+    'roles' => array(
+      'administrator' => 'administrator',
+      'root' => 'root',
+    ),
+    'module' => 'user',
+  );
+
+  // Exported permission: 'change own username'.
+  $permissions['change own username'] = array(
+    'name' => 'change own username',
+    'roles' => array(
+      'administrator' => 'administrator',
+      'root' => 'root',
+    ),
+    'module' => 'user',
+  );
+
+  // Exported permission: 'context ajax block access'.
+  $permissions['context ajax block access'] = array(
+    'name' => 'context ajax block access',
+    'roles' => array(),
+    'module' => 'context_ui',
+  );
+
+  // Exported permission: 'create url aliases'.
+  $permissions['create url aliases'] = array(
+    'name' => 'create url aliases',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'path',
+  );
+
+  // Exported permission: 'customize shortcut links'.
+  $permissions['customize shortcut links'] = array(
+    'name' => 'customize shortcut links',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'shortcut',
+  );
+
+  // Exported permission: 'delete backup files'.
+  $permissions['delete backup files'] = array(
+    'name' => 'delete backup files',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'backup_migrate',
+  );
+
+  // Exported permission: 'delete revisions'.
+  $permissions['delete revisions'] = array(
+    'name' => 'delete revisions',
+    'roles' => array(
+      'administrator' => 'administrator',
+      'root' => 'root',
+    ),
+    'module' => 'node',
+  );
+
+  // Exported permission: 'display drupal links'.
+  $permissions['display drupal links'] = array(
+    'name' => 'display drupal links',
+    'roles' => array(
+      'administrator' => 'administrator',
+      'root' => 'root',
+    ),
+    'module' => 'admin_menu',
+  );
+
+  // Exported permission: 'execute php code'.
+  $permissions['execute php code'] = array(
+    'name' => 'execute php code',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'devel',
+  );
+
+  // Exported permission: 'flush caches'.
+  $permissions['flush caches'] = array(
+    'name' => 'flush caches',
+    'roles' => array(
+      'administrator' => 'administrator',
+      'root' => 'root',
+    ),
+    'module' => 'admin_menu',
+  );
+
+  // Exported permission: 'generate features'.
+  $permissions['generate features'] = array(
+    'name' => 'generate features',
+    'roles' => array(),
+    'module' => 'features',
+  );
+
+  // Exported permission: 'manage features'.
+  $permissions['manage features'] = array(
+    'name' => 'manage features',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'features',
+  );
+
+  // Exported permission: 'menu edit devel'.
+  $permissions['menu edit devel'] = array(
+    'name' => 'menu edit devel',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'menu_editor',
+  );
+
+  // Exported permission: 'menu edit features'.
+  $permissions['menu edit features'] = array(
+    'name' => 'menu edit features',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'menu_editor',
+  );
+
+  // Exported permission: 'menu edit main-menu'.
+  $permissions['menu edit main-menu'] = array(
+    'name' => 'menu edit main-menu',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'menu_editor',
+  );
+
+  // Exported permission: 'menu edit management'.
+  $permissions['menu edit management'] = array(
+    'name' => 'menu edit management',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'menu_editor',
+  );
+
+  // Exported permission: 'menu edit navigation'.
+  $permissions['menu edit navigation'] = array(
+    'name' => 'menu edit navigation',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'menu_editor',
+  );
+
+  // Exported permission: 'menu edit user-menu'.
+  $permissions['menu edit user-menu'] = array(
+    'name' => 'menu edit user-menu',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'menu_editor',
+  );
+
+  // Exported permission: 'notify of path changes'.
+  $permissions['notify of path changes'] = array(
+    'name' => 'notify of path changes',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'pathauto',
+  );
+
+  // Exported permission: 'override content type title display'.
+  $permissions['override content type title display'] = array(
+    'name' => 'override content type title display',
+    'roles' => array(),
+    'module' => 'content_type_extras',
+  );
+
+  // Exported permission: 'participate in workflow'.
+  $permissions['participate in workflow'] = array(
+    'name' => 'participate in workflow',
+    'roles' => array(
+      'administrator' => 'administrator',
+      'anonymous user' => 'anonymous user',
+      'authenticated user' => 'authenticated user',
+      'root' => 'root',
+    ),
+    'module' => 'workflow_admin_ui',
+  );
+
+  // Exported permission: 'perform backup'.
+  $permissions['perform backup'] = array(
+    'name' => 'perform backup',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'backup_migrate',
+  );
+
+  // Exported permission: 'rename features'.
+  $permissions['rename features'] = array(
+    'name' => 'rename features',
+    'roles' => array(),
+    'module' => 'features',
+  );
+
+  // Exported permission: 'restore from backup'.
+  $permissions['restore from backup'] = array(
+    'name' => 'restore from backup',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'backup_migrate',
+  );
+
+  // Exported permission: 'revert revisions'.
+  $permissions['revert revisions'] = array(
+    'name' => 'revert revisions',
+    'roles' => array(
+      'administrator' => 'administrator',
+      'root' => 'root',
+    ),
+    'module' => 'node',
+  );
+
+  // Exported permission: 'schedule workflow transitions'.
+  $permissions['schedule workflow transitions'] = array(
+    'name' => 'schedule workflow transitions',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'workflow',
+  );
+
+  // Exported permission: 'select account cancellation method'.
+  $permissions['select account cancellation method'] = array(
+    'name' => 'select account cancellation method',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'user',
+  );
+
+  // Exported permission: 'show workflow state form'.
+  $permissions['show workflow state form'] = array(
+    'name' => 'show workflow state form',
+    'roles' => array(),
+    'module' => 'workflow',
+  );
+
+  // Exported permission: 'switch shortcut sets'.
+  $permissions['switch shortcut sets'] = array(
+    'name' => 'switch shortcut sets',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'shortcut',
+  );
+
+  // Exported permission: 'switch users'.
+  $permissions['switch users'] = array(
+    'name' => 'switch users',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'devel',
+  );
+
+  // Exported permission: 'translate content'.
+  $permissions['translate content'] = array(
+    'name' => 'translate content',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'translation',
+  );
+
+  // Exported permission: 'use ctools import'.
+  $permissions['use ctools import'] = array(
+    'name' => 'use ctools import',
+    'roles' => array(),
+    'module' => 'ctools',
+  );
+
+  // Exported permission: 'use text format filtred_html'.
+  $permissions['use text format filtred_html'] = array(
+    'name' => 'use text format filtred_html',
+    'roles' => array(
+      'administrator' => 'administrator',
+      'root' => 'root',
+    ),
+    'module' => 'filter',
+  );
+
+  // Exported permission: 'view own unpublished content'.
+  $permissions['view own unpublished content'] = array(
+    'name' => 'view own unpublished content',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'node',
+  );
+
+  // Exported permission: 'view revisions'.
+  $permissions['view revisions'] = array(
+    'name' => 'view revisions',
+    'roles' => array(
+      'administrator' => 'administrator',
+      'root' => 'root',
+    ),
+    'module' => 'node',
+  );
+
+  // Exported permission: 'view the administration theme'.
+  $permissions['view the administration theme'] = array(
+    'name' => 'view the administration theme',
+    'roles' => array(
+      'administrator' => 'administrator',
+      'root' => 'root',
+    ),
+    'module' => 'system',
+  );
+
+  return $permissions;
+}

+ 38 - 0
sites/all/modules/features/admin/admin.features.user_role.inc

@@ -0,0 +1,38 @@
+<?php
+/**
+ * @file
+ * admin.features.user_role.inc
+ */
+
+/**
+ * Implements hook_user_default_roles().
+ */
+function admin_user_default_roles() {
+  $roles = array();
+
+  // Exported role: administrator.
+  $roles['administrator'] = array(
+    'name' => 'administrator',
+    'weight' => 2,
+  );
+
+  // Exported role: anonymous user.
+  $roles['anonymous user'] = array(
+    'name' => 'anonymous user',
+    'weight' => 0,
+  );
+
+  // Exported role: authenticated user.
+  $roles['authenticated user'] = array(
+    'name' => 'authenticated user',
+    'weight' => 1,
+  );
+
+  // Exported role: root.
+  $roles['root'] = array(
+    'name' => 'root',
+    'weight' => 3,
+  );
+
+  return $roles;
+}

+ 68 - 0
sites/all/modules/features/admin/admin.features.workflow_access.inc

@@ -0,0 +1,68 @@
+<?php
+/**
+ * @file
+ * admin.features.workflow_access.inc
+ */
+
+/**
+ * Implements hook_workflow_access_features_default_settings().
+ */
+function admin_workflow_access_features_default_settings() {
+  $workflows = array();
+
+  $workflows['Affichage'] = array();
+  $workflows['Affichage']['Masqué'] = array();
+  $workflows['Affichage']['Masqué']['administrator'] = array(
+    'grant_view' => 1,
+    'grant_update' => 1,
+    'grant_delete' => 1,
+  );
+  $workflows['Affichage']['Masqué']['root'] = array(
+    'grant_view' => 1,
+    'grant_update' => 1,
+    'grant_delete' => 1,
+  );
+  $workflows['Affichage']['Masqué']['anonymous user'] = array(
+    'grant_view' => 0,
+    'grant_update' => 0,
+    'grant_delete' => 0,
+  );
+  $workflows['Affichage']['Masqué']['authenticated user'] = array(
+    'grant_view' => 0,
+    'grant_update' => 0,
+    'grant_delete' => 0,
+  );
+  $workflows['Affichage']['Masqué']['workflow_features_author_name'] = array(
+    'grant_view' => 0,
+    'grant_update' => 0,
+    'grant_delete' => 0,
+  );
+  $workflows['Affichage']['Affiché'] = array();
+  $workflows['Affichage']['Affiché']['anonymous user'] = array(
+    'grant_view' => 1,
+    'grant_update' => 0,
+    'grant_delete' => 0,
+  );
+  $workflows['Affichage']['Affiché']['authenticated user'] = array(
+    'grant_view' => 1,
+    'grant_update' => 0,
+    'grant_delete' => 0,
+  );
+  $workflows['Affichage']['Affiché']['administrator'] = array(
+    'grant_view' => 0,
+    'grant_update' => 1,
+    'grant_delete' => 1,
+  );
+  $workflows['Affichage']['Affiché']['root'] = array(
+    'grant_view' => 0,
+    'grant_update' => 1,
+    'grant_delete' => 1,
+  );
+  $workflows['Affichage']['Affiché']['workflow_features_author_name'] = array(
+    'grant_view' => 0,
+    'grant_update' => 0,
+    'grant_delete' => 0,
+  );
+
+  return $workflows;
+}

+ 90 - 0
sites/all/modules/features/admin/admin.features.wysiwyg.inc

@@ -0,0 +1,90 @@
+<?php
+/**
+ * @file
+ * admin.features.wysiwyg.inc
+ */
+
+/**
+ * Implements hook_wysiwyg_default_profiles().
+ */
+function admin_wysiwyg_default_profiles() {
+  $profiles = array();
+
+  // Exported profile: filtred_html
+  $profiles['filtred_html'] = array(
+    'format' => 'filtred_html',
+    'editor' => 'tinymce',
+    'settings' => array(
+      'default' => 1,
+      'user_choose' => 0,
+      'show_toggle' => 1,
+      'theme' => 'advanced',
+      'language' => 'en',
+      'buttons' => array(
+        'default' => array(
+          'bold' => 1,
+          'italic' => 1,
+          'underline' => 1,
+          'bullist' => 1,
+          'numlist' => 1,
+          'undo' => 1,
+          'redo' => 1,
+          'link' => 1,
+          'unlink' => 1,
+          'image' => 1,
+          'cut' => 1,
+          'copy' => 1,
+          'paste' => 1,
+        ),
+        'advimage' => array(
+          'advimage' => 1,
+        ),
+        'advlink' => array(
+          'advlink' => 1,
+        ),
+        'font' => array(
+          'formatselect' => 1,
+        ),
+        'fullscreen' => array(
+          'fullscreen' => 1,
+        ),
+        'paste' => array(
+          'pastetext' => 1,
+        ),
+        'searchreplace' => array(
+          'search' => 1,
+          'replace' => 1,
+        ),
+        'advlist' => array(
+          'advlist' => 1,
+        ),
+        'wordcount' => array(
+          'wordcount' => 1,
+        ),
+        'video_filter' => array(
+          'video_filter' => 1,
+        ),
+        'drupal' => array(
+          'break' => 1,
+        ),
+      ),
+      'toolbar_loc' => 'top',
+      'toolbar_align' => 'left',
+      'path_loc' => 'bottom',
+      'resizing' => 1,
+      'verify_html' => 1,
+      'preformatted' => 0,
+      'convert_fonts_to_spans' => 1,
+      'remove_linebreaks' => 1,
+      'apply_source_formatting' => 0,
+      'paste_auto_cleanup_on_paste' => 1,
+      'block_formats' => 'h2,h3,h4,h5,h6',
+      'css_setting' => 'theme',
+      'css_path' => '',
+      'css_classes' => '',
+      'buttonorder' => 'fullscreen,separator,bold,italic,underline,separator,formatselect,separator,bullist,numlist,advlist,separator,link,advlink,unlink,separator,image,advimage,video_filter,separator,cut,copy,paste,pastetext,search,replace,wordcount,separator,undo,redo,separator,break',
+    ),
+  );
+
+  return $profiles;
+}

+ 186 - 0
sites/all/modules/features/admin/admin.info

@@ -0,0 +1,186 @@
+name = Admin
+core = 7.x
+package = Gui
+dependencies[] = admin_menu
+dependencies[] = admin_menu_source
+dependencies[] = admin_theme
+dependencies[] = adminimal_admin_menu
+dependencies[] = auto_nodetitle
+dependencies[] = backup_migrate
+dependencies[] = content_type_extras
+dependencies[] = context_layouts
+dependencies[] = context_ui
+dependencies[] = ctools
+dependencies[] = dashboard
+dependencies[] = devel
+dependencies[] = extlink
+dependencies[] = fe_block
+dependencies[] = fe_profile
+dependencies[] = features
+dependencies[] = file
+dependencies[] = filter
+dependencies[] = filter_perms
+dependencies[] = footer_message
+dependencies[] = fpa
+dependencies[] = genpass
+dependencies[] = imce
+dependencies[] = linkit
+dependencies[] = login_destination
+dependencies[] = logintoboggan_rules
+dependencies[] = logintoboggan_variable
+dependencies[] = me_path_autocomplete
+dependencies[] = menu
+dependencies[] = menu_admin_per_menu
+dependencies[] = module_filter
+dependencies[] = node
+dependencies[] = nodeformcols
+dependencies[] = path
+dependencies[] = pathauto
+dependencies[] = redirect
+dependencies[] = rules_admin
+dependencies[] = shortcut
+dependencies[] = strongarm
+dependencies[] = styles_ui
+dependencies[] = syslog
+dependencies[] = system
+dependencies[] = translation
+dependencies[] = user
+dependencies[] = variable_admin
+dependencies[] = variable_realm
+dependencies[] = variable_store
+dependencies[] = views
+dependencies[] = views_ui
+dependencies[] = workflow
+dependencies[] = workflow_access
+dependencies[] = workflow_actions
+dependencies[] = workflow_admin_ui
+dependencies[] = workflow_rules
+dependencies[] = workflow_vbo
+dependencies[] = workflow_views
+dependencies[] = wysiwyg
+dependencies[] = wysiwyg_button_order
+dependencies[] = wysiwyg_filter
+features[ctools][] = strongarm:strongarm:1
+features[ctools][] = views:views_default:3.0
+features[features_api][] = api:2
+features[filter][] = filtred_html
+features[filter][] = plain_text
+features[user_permission][] = access admin theme
+features[user_permission][] = access administration menu
+features[user_permission][] = access administration pages
+features[user_permission][] = access all views
+features[user_permission][] = access backup and migrate
+features[user_permission][] = access backup files
+features[user_permission][] = access content
+features[user_permission][] = access content overview
+features[user_permission][] = access dashboard
+features[user_permission][] = access rules debug
+features[user_permission][] = access site in maintenance mode
+features[user_permission][] = access site reports
+features[user_permission][] = access user profiles
+features[user_permission][] = access workflow summary views
+features[user_permission][] = administer actions
+features[user_permission][] = administer backup and migrate
+features[user_permission][] = administer blocks
+features[user_permission][] = administer content type defaults
+features[user_permission][] = administer content types
+features[user_permission][] = administer contexts
+features[user_permission][] = administer devel menu items
+features[user_permission][] = administer features
+features[user_permission][] = administer features menu items
+features[user_permission][] = administer imce
+features[user_permission][] = administer linkit
+features[user_permission][] = administer main-menu menu items
+features[user_permission][] = administer management menu items
+features[user_permission][] = administer menu
+features[user_permission][] = administer module filter
+features[user_permission][] = administer modules
+features[user_permission][] = administer navigation menu items
+features[user_permission][] = administer nodes
+features[user_permission][] = administer pathauto
+features[user_permission][] = administer permissions
+features[user_permission][] = administer redirects
+features[user_permission][] = administer rules
+features[user_permission][] = administer shortcuts
+features[user_permission][] = administer site configuration
+features[user_permission][] = administer software updates
+features[user_permission][] = administer styles ui
+features[user_permission][] = administer themes
+features[user_permission][] = administer url aliases
+features[user_permission][] = administer user-menu menu items
+features[user_permission][] = administer users
+features[user_permission][] = administer views
+features[user_permission][] = administer workflow
+features[user_permission][] = block IP addresses
+features[user_permission][] = bypass node access
+features[user_permission][] = bypass rules access
+features[user_permission][] = cancel account
+features[user_permission][] = change own username
+features[user_permission][] = context ajax block access
+features[user_permission][] = create url aliases
+features[user_permission][] = customize shortcut links
+features[user_permission][] = delete backup files
+features[user_permission][] = delete revisions
+features[user_permission][] = display drupal links
+features[user_permission][] = execute php code
+features[user_permission][] = flush caches
+features[user_permission][] = generate features
+features[user_permission][] = manage features
+features[user_permission][] = menu edit devel
+features[user_permission][] = menu edit features
+features[user_permission][] = menu edit main-menu
+features[user_permission][] = menu edit management
+features[user_permission][] = menu edit navigation
+features[user_permission][] = menu edit user-menu
+features[user_permission][] = notify of path changes
+features[user_permission][] = override content type title display
+features[user_permission][] = participate in workflow
+features[user_permission][] = perform backup
+features[user_permission][] = rename features
+features[user_permission][] = restore from backup
+features[user_permission][] = revert revisions
+features[user_permission][] = schedule workflow transitions
+features[user_permission][] = select account cancellation method
+features[user_permission][] = show workflow state form
+features[user_permission][] = switch shortcut sets
+features[user_permission][] = switch users
+features[user_permission][] = translate content
+features[user_permission][] = use ctools import
+features[user_permission][] = use text format filtred_html
+features[user_permission][] = view own unpublished content
+features[user_permission][] = view revisions
+features[user_permission][] = view the administration theme
+features[user_role][] = administrator
+features[user_role][] = anonymous user
+features[user_role][] = authenticated user
+features[user_role][] = root
+features[variable][] = admin_menu_devel_modules_skip
+features[variable][] = admin_menu_display
+features[variable][] = admin_menu_margin_top
+features[variable][] = admin_menu_position_fixed
+features[variable][] = admin_menu_show_all
+features[variable][] = admin_menu_source_settings
+features[variable][] = admin_menu_tweak_modules
+features[variable][] = admin_menu_tweak_permissions
+features[variable][] = admin_menu_tweak_tabs
+features[variable][] = admin_theme
+features[variable][] = admin_theme_admin_theme_batch
+features[variable][] = admin_theme_admin_theme_devel
+features[variable][] = admin_theme_path
+features[variable][] = admin_theme_path_disallow
+features[variable][] = admin_toolbar
+features[variable][] = adminimal_admin_menu_toolbar-disabled
+features[variable][] = node_admin_theme
+features[variable][] = theme_adaptivetheme_admin_settings
+features[variable][] = theme_adaptivetheme_gui_admin_settings
+features[variable][] = user_admin_role
+features[variable][] = user_mail_register_admin_created_body
+features[variable][] = user_mail_register_admin_created_subject
+features[variable][] = workflow_access_priority
+features[variable][] = workflow_chapitre
+features[variable][] = workflow_page
+features[views_view][] = admin_contents
+features[workflow][] = Affichage
+features[workflow_access][] = Affichage
+features[wysiwyg][] = filtred_html
+project path = sites/all/modules/features

+ 7 - 0
sites/all/modules/features/admin/admin.module

@@ -0,0 +1,7 @@
+<?php
+/**
+ * @file
+ * Code for the Admin feature.
+ */
+
+include_once 'admin.features.inc';

+ 296 - 0
sites/all/modules/features/admin/admin.strongarm.inc

@@ -0,0 +1,296 @@
+<?php
+/**
+ * @file
+ * admin.strongarm.inc
+ */
+
+/**
+ * Implements hook_strongarm().
+ */
+function admin_strongarm() {
+  $export = array();
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'adminimal_admin_menu_toolbar-disabled';
+  $strongarm->value = TRUE;
+  $export['adminimal_admin_menu_toolbar-disabled'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'admin_menu_devel_modules_skip';
+  $strongarm->value = array(
+    'devel' => 0,
+    'devel_node_access' => 0,
+    'views_ui' => 0,
+  );
+  $export['admin_menu_devel_modules_skip'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'admin_menu_display';
+  $strongarm->value = 'plid';
+  $export['admin_menu_display'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'admin_menu_margin_top';
+  $strongarm->value = 1;
+  $export['admin_menu_margin_top'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'admin_menu_position_fixed';
+  $strongarm->value = 0;
+  $export['admin_menu_position_fixed'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'admin_menu_show_all';
+  $strongarm->value = 0;
+  $export['admin_menu_show_all'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'admin_menu_source_settings';
+  $strongarm->value = array(
+    1 => array(
+      'source' => '',
+    ),
+    2 => array(
+      'source' => '',
+    ),
+    3 => array(
+      'source' => 'navigation',
+    ),
+    4 => array(
+      'source' => '',
+    ),
+  );
+  $export['admin_menu_source_settings'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'admin_menu_tweak_modules';
+  $strongarm->value = 0;
+  $export['admin_menu_tweak_modules'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'admin_menu_tweak_permissions';
+  $strongarm->value = 0;
+  $export['admin_menu_tweak_permissions'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'admin_menu_tweak_tabs';
+  $strongarm->value = 0;
+  $export['admin_menu_tweak_tabs'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'admin_theme';
+  $strongarm->value = 'adminimal';
+  $export['admin_theme'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'admin_theme_admin_theme_batch';
+  $strongarm->value = 1;
+  $export['admin_theme_admin_theme_batch'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'admin_theme_admin_theme_devel';
+  $strongarm->value = 1;
+  $export['admin_theme_admin_theme_devel'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'admin_theme_path';
+  $strongarm->value = '';
+  $export['admin_theme_path'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'admin_theme_path_disallow';
+  $strongarm->value = '';
+  $export['admin_theme_path_disallow'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'admin_toolbar';
+  $strongarm->value = array(
+    'layout' => 'vertical',
+    'position' => 'nw',
+    'behavior' => 'df',
+    'blocks' => array(
+      'admin-devel' => -1,
+      'locale-language' => -1,
+      'user-online' => -1,
+    ),
+  );
+  $export['admin_toolbar'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'node_admin_theme';
+  $strongarm->value = 1;
+  $export['node_admin_theme'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'theme_adaptivetheme_admin_settings';
+  $strongarm->value = array(
+    'toggle_name' => 1,
+    'toggle_favicon' => 1,
+    'toggle_main_menu' => 1,
+    'toggle_secondary_menu' => 1,
+    'default_favicon' => 1,
+    'favicon_path' => '',
+    'favicon_upload' => '',
+    'layout_width' => '1260px',
+    'layout_sidebar_first_width' => '240',
+    'layout_sidebar_last_width' => '240',
+    'layout_method' => '2',
+    'layout_enable_settings' => 'on',
+    'breadcrumb_display' => 'yes',
+    'breadcrumb_separator' => ' &#187; ',
+    'breadcrumb_home' => 1,
+    'search_snippet' => 1,
+    'search_info_type' => 1,
+    'search_info_user' => 1,
+    'search_info_date' => 1,
+    'search_info_comment' => 1,
+    'search_info_upload' => 1,
+    'search_info_separator' => ' - ',
+    'horizontal_login_block' => 1,
+    'extra_page_classes' => 0,
+    'extra_article_classes' => 0,
+    'extra_comment_classes' => 0,
+    'extra_block_classes' => 0,
+    'extra_menu_classes' => 0,
+    'extra_item_list_classes' => 0,
+    'menu_item_span_elements' => 0,
+    'at__active_tab' => 'edit-page-layout',
+  );
+  $export['theme_adaptivetheme_admin_settings'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'theme_adaptivetheme_gui_admin_settings';
+  $strongarm->value = array(
+    'toggle_name' => 1,
+    'toggle_favicon' => 1,
+    'toggle_main_menu' => 1,
+    'toggle_secondary_menu' => 1,
+    'default_favicon' => 1,
+    'favicon_path' => '',
+    'favicon_upload' => '',
+    'layout_width' => '1260px',
+    'layout_sidebar_first_width' => '240',
+    'layout_sidebar_last_width' => '240',
+    'layout_method' => '1',
+    'layout_enable_settings' => 'on',
+    'breadcrumb_display' => 'yes',
+    'breadcrumb_separator' => ' &#187; ',
+    'breadcrumb_home' => 1,
+    'search_snippet' => 1,
+    'search_info_type' => 1,
+    'search_info_user' => 1,
+    'search_info_date' => 1,
+    'search_info_comment' => 1,
+    'search_info_upload' => 1,
+    'search_info_separator' => ' - ',
+    'horizontal_login_block' => 0,
+    'extra_page_classes' => 0,
+    'extra_article_classes' => 0,
+    'extra_comment_classes' => 0,
+    'extra_block_classes' => 0,
+    'extra_menu_classes' => 0,
+    'extra_item_list_classes' => 0,
+    'menu_item_span_elements' => 0,
+    'at__active_tab' => 'edit-page-layout',
+  );
+  $export['theme_adaptivetheme_gui_admin_settings'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'user_admin_role';
+  $strongarm->value = '4';
+  $export['user_admin_role'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'user_mail_register_admin_created_body';
+  $strongarm->value = '[user:name],
+
+A site administrator at [site:name] has created an account for you. You may now log in by clicking this link or copying and pasting it to your browser:
+
+[user:one-time-login-url]
+
+This link can only be used once to log in and will lead you to a page where you can set your password.
+
+After setting your password, you will be able to log in at [site:login-url] in the future using:
+
+username: [user:name]
+password: Your password
+
+--  [site:name] team';
+  $export['user_mail_register_admin_created_body'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'user_mail_register_admin_created_subject';
+  $strongarm->value = 'An administrator created an account for you at [site:name]';
+  $export['user_mail_register_admin_created_subject'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'workflow_access_priority';
+  $strongarm->value = '0';
+  $export['workflow_access_priority'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'workflow_chapitre';
+  $strongarm->value = array(
+    0 => 'node',
+  );
+  $export['workflow_chapitre'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'workflow_page';
+  $strongarm->value = array(
+    0 => 'node',
+  );
+  $export['workflow_page'] = $strongarm;
+
+  return $export;
+}

+ 471 - 0
sites/all/modules/features/admin/admin.views_default.inc

@@ -0,0 +1,471 @@
+<?php
+/**
+ * @file
+ * admin.views_default.inc
+ */
+
+/**
+ * Implements hook_views_default_views().
+ */
+function admin_views_default_views() {
+  $export = array();
+
+  $view = new view();
+  $view->name = 'admin_contents';
+  $view->description = 'Administrative view for content';
+  $view->tag = 'default';
+  $view->base_table = 'node';
+  $view->human_name = 'Admin Content';
+  $view->core = 7;
+  $view->api_version = '3.0';
+  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
+
+  /* Display: Master */
+  $handler = $view->new_display('default', 'Master', 'default');
+  $handler->display->display_options['title'] = 'Contenu';
+  $handler->display->display_options['use_more_always'] = FALSE;
+  $handler->display->display_options['use_more_text'] = 'plus';
+  $handler->display->display_options['access']['type'] = 'role';
+  $handler->display->display_options['access']['role'] = array(
+    3 => '3',
+    4 => '4',
+  );
+  $handler->display->display_options['cache']['type'] = 'none';
+  $handler->display->display_options['query']['type'] = 'views_query';
+  $handler->display->display_options['query']['options']['distinct'] = TRUE;
+  $handler->display->display_options['query']['options']['query_comment'] = FALSE;
+  $handler->display->display_options['exposed_form']['type'] = 'basic';
+  $handler->display->display_options['exposed_form']['options']['submit_button'] = 'Filtrer';
+  $handler->display->display_options['exposed_form']['options']['reset_button'] = TRUE;
+  $handler->display->display_options['exposed_form']['options']['reset_button_label'] = 'réinitialiser';
+  $handler->display->display_options['exposed_form']['options']['exposed_sorts_label'] = 'Trier par';
+  $handler->display->display_options['exposed_form']['options']['autosubmit'] = TRUE;
+  $handler->display->display_options['pager']['type'] = 'mini';
+  $handler->display->display_options['pager']['options']['items_per_page'] = '20';
+  $handler->display->display_options['pager']['options']['offset'] = '0';
+  $handler->display->display_options['pager']['options']['id'] = '0';
+  $handler->display->display_options['pager']['options']['expose']['items_per_page_label'] = 'Éléments par page';
+  $handler->display->display_options['pager']['options']['expose']['items_per_page_options_all_label'] = '- Tout -';
+  $handler->display->display_options['pager']['options']['expose']['offset_label'] = 'Décalage';
+  $handler->display->display_options['pager']['options']['tags']['first'] = '« premier';
+  $handler->display->display_options['pager']['options']['tags']['previous'] = '‹ précédent';
+  $handler->display->display_options['pager']['options']['tags']['next'] = 'suivant ›';
+  $handler->display->display_options['pager']['options']['tags']['last'] = 'dernier »';
+  $handler->display->display_options['style_plugin'] = 'table';
+  $handler->display->display_options['style_options']['columns'] = array(
+    'views_bulk_operations' => 'views_bulk_operations',
+    'type' => 'title',
+    'title' => 'title',
+    'edit_node' => 'title',
+    'status' => 'status',
+    'language' => 'language',
+    'translate_node' => 'language',
+    'changed' => 'changed',
+    'delete_node' => 'delete_node',
+  );
+  $handler->display->display_options['style_options']['default'] = 'changed';
+  $handler->display->display_options['style_options']['info'] = array(
+    'views_bulk_operations' => array(
+      'align' => '',
+      'separator' => '',
+      'empty_column' => 0,
+    ),
+    'type' => array(
+      'sortable' => 0,
+      'default_sort_order' => 'asc',
+      'align' => '',
+      'separator' => '<br />',
+      'empty_column' => 0,
+    ),
+    'title' => array(
+      'sortable' => 0,
+      'default_sort_order' => 'asc',
+      'align' => '',
+      'separator' => '<br />',
+      'empty_column' => 0,
+    ),
+    'edit_node' => array(
+      'align' => '',
+      'separator' => '',
+      'empty_column' => 0,
+    ),
+    'status' => array(
+      'sortable' => 0,
+      'default_sort_order' => 'asc',
+      'align' => '',
+      'separator' => '<br />',
+      'empty_column' => 0,
+    ),
+    'language' => array(
+      'sortable' => 0,
+      'default_sort_order' => 'asc',
+      'align' => '',
+      'separator' => '<br />',
+      'empty_column' => 0,
+    ),
+    'translate_node' => array(
+      'align' => '',
+      'separator' => '',
+      'empty_column' => 0,
+    ),
+    'changed' => array(
+      'sortable' => 0,
+      'default_sort_order' => 'desc',
+      'align' => '',
+      'separator' => '',
+      'empty_column' => 0,
+    ),
+    'delete_node' => array(
+      'align' => '',
+      'separator' => '',
+      'empty_column' => 0,
+    ),
+  );
+  $handler->display->display_options['style_options']['override'] = FALSE;
+  /* En-tête: Global : Result summary */
+  $handler->display->display_options['header']['result']['id'] = 'result';
+  $handler->display->display_options['header']['result']['table'] = 'views';
+  $handler->display->display_options['header']['result']['field'] = 'result';
+  /* Champ: Opérations en masse : Contenu */
+  $handler->display->display_options['fields']['views_bulk_operations']['id'] = 'views_bulk_operations';
+  $handler->display->display_options['fields']['views_bulk_operations']['table'] = 'node';
+  $handler->display->display_options['fields']['views_bulk_operations']['field'] = 'views_bulk_operations';
+  $handler->display->display_options['fields']['views_bulk_operations']['label'] = '';
+  $handler->display->display_options['fields']['views_bulk_operations']['element_label_colon'] = FALSE;
+  $handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['display_type'] = '0';
+  $handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['enable_select_all_pages'] = 1;
+  $handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['force_single'] = 0;
+  $handler->display->display_options['fields']['views_bulk_operations']['vbo_settings']['entity_load_capacity'] = '10';
+  $handler->display->display_options['fields']['views_bulk_operations']['vbo_operations'] = array(
+    'action::node_assign_owner_action' => array(
+      'selected' => 0,
+      'skip_confirmation' => 0,
+      'override_label' => 0,
+      'label' => '',
+      'postpone_processing' => 0,
+    ),
+    'action::node_unpublish_action' => array(
+      'selected' => 1,
+      'skip_confirmation' => 0,
+      'override_label' => 0,
+      'label' => '',
+      'postpone_processing' => 0,
+    ),
+    'action::node_unpublish_by_keyword_action' => array(
+      'selected' => 0,
+      'skip_confirmation' => 0,
+      'override_label' => 0,
+      'label' => '',
+      'postpone_processing' => 0,
+    ),
+    'action::node_save_action' => array(
+      'selected' => 0,
+      'skip_confirmation' => 0,
+      'override_label' => 0,
+      'label' => '',
+      'postpone_processing' => 0,
+    ),
+    'action::system_send_email_action' => array(
+      'selected' => 0,
+      'skip_confirmation' => 0,
+      'override_label' => 0,
+      'label' => '',
+      'postpone_processing' => 0,
+    ),
+    'action::views_bulk_operations_script_action' => array(
+      'selected' => 0,
+      'skip_confirmation' => 0,
+      'override_label' => 0,
+      'label' => '',
+      'postpone_processing' => 0,
+    ),
+    'action::views_bulk_operations_argument_selector_action' => array(
+      'selected' => 0,
+      'skip_confirmation' => 0,
+      'override_label' => 0,
+      'label' => '',
+      'settings' => array(
+        'url' => '',
+      ),
+    ),
+    'action::node_promote_action' => array(
+      'selected' => 0,
+      'skip_confirmation' => 0,
+      'override_label' => 0,
+      'label' => '',
+      'postpone_processing' => 0,
+    ),
+    'action::node_publish_action' => array(
+      'selected' => 1,
+      'skip_confirmation' => 0,
+      'override_label' => 0,
+      'label' => '',
+      'postpone_processing' => 0,
+    ),
+    'action::node_unpromote_action' => array(
+      'selected' => 0,
+      'skip_confirmation' => 0,
+      'override_label' => 0,
+      'label' => '',
+      'postpone_processing' => 0,
+    ),
+    'action::node_make_unsticky_action' => array(
+      'selected' => 0,
+      'skip_confirmation' => 0,
+      'override_label' => 0,
+      'label' => '',
+      'postpone_processing' => 0,
+    ),
+    'action::views_bulk_operations_delete_item' => array(
+      'selected' => 0,
+      'skip_confirmation' => 0,
+      'override_label' => 0,
+      'label' => '',
+      'postpone_processing' => 0,
+    ),
+    'action::node_make_sticky_action' => array(
+      'selected' => 0,
+      'skip_confirmation' => 0,
+      'override_label' => 0,
+      'label' => '',
+      'postpone_processing' => 0,
+    ),
+  );
+  /* Champ: Contenu : Type */
+  $handler->display->display_options['fields']['type']['id'] = 'type';
+  $handler->display->display_options['fields']['type']['table'] = 'node';
+  $handler->display->display_options['fields']['type']['field'] = 'type';
+  $handler->display->display_options['fields']['type']['hide_alter_empty'] = FALSE;
+  /* Champ: Contenu : Titre */
+  $handler->display->display_options['fields']['title']['id'] = 'title';
+  $handler->display->display_options['fields']['title']['table'] = 'node';
+  $handler->display->display_options['fields']['title']['field'] = 'title';
+  $handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
+  $handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
+  $handler->display->display_options['fields']['title']['hide_alter_empty'] = FALSE;
+  /* Champ: Contenu : Lien de modification */
+  $handler->display->display_options['fields']['edit_node']['id'] = 'edit_node';
+  $handler->display->display_options['fields']['edit_node']['table'] = 'views_entity_node';
+  $handler->display->display_options['fields']['edit_node']['field'] = 'edit_node';
+  $handler->display->display_options['fields']['edit_node']['label'] = '';
+  $handler->display->display_options['fields']['edit_node']['alter']['alter_text'] = TRUE;
+  $handler->display->display_options['fields']['edit_node']['alter']['text'] = '<span class="node-edit">[edit_node]</span>';
+  $handler->display->display_options['fields']['edit_node']['element_label_colon'] = FALSE;
+  $handler->display->display_options['fields']['edit_node']['hide_alter_empty'] = FALSE;
+  /* Champ: Contenu : Publié */
+  $handler->display->display_options['fields']['status']['id'] = 'status';
+  $handler->display->display_options['fields']['status']['table'] = 'node';
+  $handler->display->display_options['fields']['status']['field'] = 'status';
+  $handler->display->display_options['fields']['status']['element_label_colon'] = FALSE;
+  $handler->display->display_options['fields']['status']['hide_alter_empty'] = FALSE;
+  $handler->display->display_options['fields']['status']['not'] = 0;
+  /* Champ: Contenu : Langue */
+  $handler->display->display_options['fields']['language']['id'] = 'language';
+  $handler->display->display_options['fields']['language']['table'] = 'node';
+  $handler->display->display_options['fields']['language']['field'] = 'language';
+  $handler->display->display_options['fields']['language']['element_label_colon'] = FALSE;
+  $handler->display->display_options['fields']['language']['hide_empty'] = TRUE;
+  /* Champ: Traduction du contenu : Lien de traduction */
+  $handler->display->display_options['fields']['translate_node']['id'] = 'translate_node';
+  $handler->display->display_options['fields']['translate_node']['table'] = 'node';
+  $handler->display->display_options['fields']['translate_node']['field'] = 'translate_node';
+  $handler->display->display_options['fields']['translate_node']['alter']['alter_text'] = TRUE;
+  $handler->display->display_options['fields']['translate_node']['alter']['text'] = '<span class="button">[translate_node]</span>';
+  $handler->display->display_options['fields']['translate_node']['hide_empty'] = TRUE;
+  $handler->display->display_options['fields']['translate_node']['text'] = 'traduire';
+  /* Champ: Contenu : Date de mise à jour */
+  $handler->display->display_options['fields']['changed']['id'] = 'changed';
+  $handler->display->display_options['fields']['changed']['table'] = 'node';
+  $handler->display->display_options['fields']['changed']['field'] = 'changed';
+  $handler->display->display_options['fields']['changed']['date_format'] = 'short';
+  /* Champ: Contenu : Lien de suppression */
+  $handler->display->display_options['fields']['delete_node']['id'] = 'delete_node';
+  $handler->display->display_options['fields']['delete_node']['table'] = 'views_entity_node';
+  $handler->display->display_options['fields']['delete_node']['field'] = 'delete_node';
+  $handler->display->display_options['fields']['delete_node']['alter']['alter_text'] = TRUE;
+  $handler->display->display_options['fields']['delete_node']['alter']['text'] = '<span class="node-delete">[delete_node]</span>';
+  $handler->display->display_options['fields']['delete_node']['element_label_colon'] = FALSE;
+  $handler->display->display_options['fields']['delete_node']['hide_empty'] = TRUE;
+  $handler->display->display_options['fields']['delete_node']['text'] = 'supprimer';
+  $handler->display->display_options['filter_groups']['groups'] = array(
+    1 => 'AND',
+    2 => 'AND',
+  );
+  /* Critère de filtrage: Contenu : Type */
+  $handler->display->display_options['filters']['type']['id'] = 'type';
+  $handler->display->display_options['filters']['type']['table'] = 'node';
+  $handler->display->display_options['filters']['type']['field'] = 'type';
+  $handler->display->display_options['filters']['type']['value'] = array(
+    'all' => 'all',
+    'article' => 'article',
+    'collection' => 'collection',
+    'event' => 'event',
+    'location' => 'location',
+    'page' => 'page',
+    'people' => 'people',
+    'program' => 'program',
+    'work' => 'work',
+  );
+  $handler->display->display_options['filters']['type']['group'] = 1;
+  $handler->display->display_options['filters']['type']['exposed'] = TRUE;
+  $handler->display->display_options['filters']['type']['expose']['operator_id'] = 'type_op';
+  $handler->display->display_options['filters']['type']['expose']['label'] = 'Type';
+  $handler->display->display_options['filters']['type']['expose']['operator'] = 'type_op';
+  $handler->display->display_options['filters']['type']['expose']['identifier'] = 'type';
+  $handler->display->display_options['filters']['type']['expose']['remember'] = TRUE;
+  $handler->display->display_options['filters']['type']['expose']['reduce'] = TRUE;
+  /* Critère de filtrage: Contenu : Publié */
+  $handler->display->display_options['filters']['status']['id'] = 'status';
+  $handler->display->display_options['filters']['status']['table'] = 'node';
+  $handler->display->display_options['filters']['status']['field'] = 'status';
+  $handler->display->display_options['filters']['status']['value'] = 'All';
+  $handler->display->display_options['filters']['status']['group'] = 1;
+  $handler->display->display_options['filters']['status']['exposed'] = TRUE;
+  $handler->display->display_options['filters']['status']['expose']['operator_id'] = '';
+  $handler->display->display_options['filters']['status']['expose']['label'] = 'Publié';
+  $handler->display->display_options['filters']['status']['expose']['operator'] = 'status_op';
+  $handler->display->display_options['filters']['status']['expose']['identifier'] = 'status';
+  $handler->display->display_options['filters']['status']['expose']['remember'] = TRUE;
+  /* Critère de filtrage: Contenu : Langue */
+  $handler->display->display_options['filters']['language']['id'] = 'language';
+  $handler->display->display_options['filters']['language']['table'] = 'node';
+  $handler->display->display_options['filters']['language']['field'] = 'language';
+  $handler->display->display_options['filters']['language']['value'] = array(
+    'und' => 'und',
+    'en' => 'en',
+    'fr' => 'fr',
+  );
+  $handler->display->display_options['filters']['language']['group'] = 1;
+  $handler->display->display_options['filters']['language']['exposed'] = TRUE;
+  $handler->display->display_options['filters']['language']['expose']['operator_id'] = 'language_op';
+  $handler->display->display_options['filters']['language']['expose']['label'] = 'Langue';
+  $handler->display->display_options['filters']['language']['expose']['operator'] = 'language_op';
+  $handler->display->display_options['filters']['language']['expose']['identifier'] = 'language';
+  $handler->display->display_options['filters']['language']['expose']['remember'] = TRUE;
+  $handler->display->display_options['filters']['language']['expose']['reduce'] = TRUE;
+  /* Critère de filtrage: current user can update */
+  $handler->display->display_options['filters']['php']['id'] = 'php';
+  $handler->display->display_options['filters']['php']['table'] = 'views';
+  $handler->display->display_options['filters']['php']['field'] = 'php';
+  $handler->display->display_options['filters']['php']['ui_name'] = 'current user can update';
+  $handler->display->display_options['filters']['php']['group'] = 1;
+  $handler->display->display_options['filters']['php']['use_php_setup'] = 0;
+  $handler->display->display_options['filters']['php']['php_filter'] = 'global $user;
+//dsm($data);
+return !(node_access(\'update\', node_load($data->nid), $user));
+';
+
+  /* Display: Page : all */
+  $handler = $view->new_display('page', 'Page : all', 'page');
+  $handler->display->display_options['defaults']['pager'] = FALSE;
+  $handler->display->display_options['pager']['type'] = 'mini';
+  $handler->display->display_options['pager']['options']['items_per_page'] = '30';
+  $handler->display->display_options['pager']['options']['offset'] = '0';
+  $handler->display->display_options['pager']['options']['id'] = '0';
+  $handler->display->display_options['pager']['options']['expose']['items_per_page'] = TRUE;
+  $handler->display->display_options['pager']['options']['expose']['items_per_page_label'] = 'Éléments par page';
+  $handler->display->display_options['pager']['options']['expose']['items_per_page_options_all'] = TRUE;
+  $handler->display->display_options['pager']['options']['expose']['items_per_page_options_all_label'] = '- Tout -';
+  $handler->display->display_options['pager']['options']['expose']['offset_label'] = 'Décalage';
+  $handler->display->display_options['pager']['options']['tags']['first'] = '« premier';
+  $handler->display->display_options['pager']['options']['tags']['previous'] = '‹ précédent';
+  $handler->display->display_options['pager']['options']['tags']['next'] = 'suivant ›';
+  $handler->display->display_options['pager']['options']['tags']['last'] = 'dernier »';
+  $handler->display->display_options['path'] = 'admin/content/nodes';
+  $handler->display->display_options['menu']['type'] = 'tab';
+  $handler->display->display_options['menu']['title'] = 'Content';
+  $handler->display->display_options['menu']['weight'] = '-100';
+  $handler->display->display_options['menu']['context'] = 0;
+  $handler->display->display_options['tab_options']['type'] = 'normal';
+  $handler->display->display_options['tab_options']['title'] = 'dashboard';
+  $handler->display->display_options['tab_options']['weight'] = '0';
+
+  /* Display: Block */
+  $handler = $view->new_display('block', 'Block', 'block_1');
+  $handler->display->display_options['defaults']['title'] = FALSE;
+  $handler->display->display_options['title'] = 'Recent Content';
+  $handler->display->display_options['defaults']['pager'] = FALSE;
+  $handler->display->display_options['pager']['type'] = 'some';
+  $handler->display->display_options['pager']['options']['items_per_page'] = '10';
+  $handler->display->display_options['pager']['options']['offset'] = '0';
+  $handler->display->display_options['defaults']['fields'] = FALSE;
+  /* Champ: Contenu : Type */
+  $handler->display->display_options['fields']['type']['id'] = 'type';
+  $handler->display->display_options['fields']['type']['table'] = 'node';
+  $handler->display->display_options['fields']['type']['field'] = 'type';
+  $handler->display->display_options['fields']['type']['hide_alter_empty'] = FALSE;
+  /* Champ: Contenu : Titre */
+  $handler->display->display_options['fields']['title']['id'] = 'title';
+  $handler->display->display_options['fields']['title']['table'] = 'node';
+  $handler->display->display_options['fields']['title']['field'] = 'title';
+  $handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
+  $handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
+  $handler->display->display_options['fields']['title']['hide_alter_empty'] = FALSE;
+  /* Champ: Contenu : Lien de modification */
+  $handler->display->display_options['fields']['edit_node']['id'] = 'edit_node';
+  $handler->display->display_options['fields']['edit_node']['table'] = 'views_entity_node';
+  $handler->display->display_options['fields']['edit_node']['field'] = 'edit_node';
+  $handler->display->display_options['fields']['edit_node']['label'] = 'Modifier';
+  $handler->display->display_options['fields']['edit_node']['alter']['alter_text'] = TRUE;
+  $handler->display->display_options['fields']['edit_node']['alter']['text'] = '<span class="node-edit">[edit_node]</span>';
+  $handler->display->display_options['fields']['edit_node']['hide_alter_empty'] = FALSE;
+  /* Champ: Contenu : Publié */
+  $handler->display->display_options['fields']['status']['id'] = 'status';
+  $handler->display->display_options['fields']['status']['table'] = 'node';
+  $handler->display->display_options['fields']['status']['field'] = 'status';
+  $handler->display->display_options['fields']['status']['element_label_colon'] = FALSE;
+  $handler->display->display_options['fields']['status']['hide_alter_empty'] = FALSE;
+  $handler->display->display_options['fields']['status']['not'] = 0;
+  /* Champ: Contenu : Langue */
+  $handler->display->display_options['fields']['language']['id'] = 'language';
+  $handler->display->display_options['fields']['language']['table'] = 'node';
+  $handler->display->display_options['fields']['language']['field'] = 'language';
+  $handler->display->display_options['fields']['language']['element_label_colon'] = FALSE;
+  $handler->display->display_options['fields']['language']['hide_alter_empty'] = FALSE;
+  /* Champ: Traduction du contenu : Lien de traduction */
+  $handler->display->display_options['fields']['translate_node']['id'] = 'translate_node';
+  $handler->display->display_options['fields']['translate_node']['table'] = 'node';
+  $handler->display->display_options['fields']['translate_node']['field'] = 'translate_node';
+  $handler->display->display_options['fields']['translate_node']['element_label_colon'] = FALSE;
+  $handler->display->display_options['fields']['translate_node']['hide_alter_empty'] = FALSE;
+  $handler->display->display_options['fields']['translate_node']['text'] = 'Traduire';
+  $translatables['admin_contents'] = array(
+    t('Master'),
+    t('Contenu'),
+    t('plus'),
+    t('Filtrer'),
+    t('réinitialiser'),
+    t('Trier par'),
+    t('Asc'),
+    t('Desc'),
+    t('Éléments par page'),
+    t('- Tout -'),
+    t('Décalage'),
+    t('« premier'),
+    t('‹ précédent'),
+    t('suivant ›'),
+    t('dernier »'),
+    t('Displaying @start - @end of @total'),
+    t('- Choisir une opération -'),
+    t('Type'),
+    t('Titre'),
+    t('<span class="node-edit">[edit_node]</span>'),
+    t('Publié'),
+    t('Langue'),
+    t('Lien de traduction'),
+    t('<span class="button">[translate_node]</span>'),
+    t('traduire'),
+    t('Date de mise à jour'),
+    t('Lien de suppression'),
+    t('<span class="node-delete">[delete_node]</span>'),
+    t('supprimer'),
+    t('Page : all'),
+    t('Block'),
+    t('Recent Content'),
+    t('Modifier'),
+    t('Traduire'),
+  );
+  $export['admin_contents'] = $view;
+
+  return $export;
+}

+ 46 - 0
sites/all/modules/features/page/page.features.field_base.inc

@@ -0,0 +1,46 @@
+<?php
+/**
+ * @file
+ * page.features.field_base.inc
+ */
+
+/**
+ * Implements hook_field_default_field_bases().
+ */
+function page_field_default_field_bases() {
+  $field_bases = array();
+
+  // Exported field_base: 'body'
+  $field_bases['body'] = array(
+    'active' => 1,
+    'cardinality' => 1,
+    'deleted' => 0,
+    'entity_types' => array(
+      0 => 'node',
+    ),
+    'field_name' => 'body',
+    'field_permissions' => array(
+      'type' => 0,
+    ),
+    'foreign keys' => array(
+      'format' => array(
+        'columns' => array(
+          'format' => 'format',
+        ),
+        'table' => 'filter_format',
+      ),
+    ),
+    'indexes' => array(
+      'format' => array(
+        0 => 'format',
+      ),
+    ),
+    'locked' => 0,
+    'module' => 'text',
+    'settings' => array(),
+    'translatable' => 0,
+    'type' => 'text_with_summary',
+  );
+
+  return $field_bases;
+}

+ 62 - 0
sites/all/modules/features/page/page.features.field_instance.inc

@@ -0,0 +1,62 @@
+<?php
+/**
+ * @file
+ * page.features.field_instance.inc
+ */
+
+/**
+ * Implements hook_field_default_field_instances().
+ */
+function page_field_default_field_instances() {
+  $field_instances = array();
+
+  // Exported field_instance: 'node-page-body'
+  $field_instances['node-page-body'] = array(
+    'bundle' => 'page',
+    'default_value' => NULL,
+    'deleted' => 0,
+    'description' => '',
+    'display' => array(
+      'default' => array(
+        'label' => 'hidden',
+        'module' => 'text',
+        'settings' => array(),
+        'type' => 'text_default',
+        'weight' => 0,
+      ),
+      'teaser' => array(
+        'label' => 'hidden',
+        'module' => 'text',
+        'settings' => array(
+          'trim_length' => 600,
+        ),
+        'type' => 'text_summary_or_trimmed',
+        'weight' => 0,
+      ),
+    ),
+    'entity_type' => 'node',
+    'field_name' => 'body',
+    'label' => 'Body',
+    'required' => FALSE,
+    'settings' => array(
+      'display_summary' => TRUE,
+      'text_processing' => 1,
+      'user_register_form' => FALSE,
+    ),
+    'widget' => array(
+      'module' => 'text',
+      'settings' => array(
+        'rows' => 20,
+        'summary_rows' => 5,
+      ),
+      'type' => 'text_textarea_with_summary',
+      'weight' => -4,
+    ),
+  );
+
+  // Translatables
+  // Included for use with string extractors like potx.
+  t('Body');
+
+  return $field_instances;
+}

+ 32 - 0
sites/all/modules/features/page/page.features.inc

@@ -0,0 +1,32 @@
+<?php
+/**
+ * @file
+ * page.features.inc
+ */
+
+/**
+ * Implements hook_ctools_plugin_api().
+ */
+function page_ctools_plugin_api($module = NULL, $api = NULL) {
+  if ($module == "strongarm" && $api == "strongarm") {
+    return array("version" => "1");
+  }
+}
+
+/**
+ * Implements hook_node_info().
+ */
+function page_node_info() {
+  $items = array(
+    'page' => array(
+      'name' => t('Page'),
+      'base' => 'node_content',
+      'description' => t('Use this content type to add static pages like "about" "contact" etc'),
+      'has_title' => '1',
+      'title_label' => t('Title'),
+      'help' => '',
+    ),
+  );
+  drupal_alter('node_info', $items);
+  return $items;
+}

+ 61 - 0
sites/all/modules/features/page/page.features.user_permission.inc

@@ -0,0 +1,61 @@
+<?php
+/**
+ * @file
+ * page.features.user_permission.inc
+ */
+
+/**
+ * Implements hook_user_default_permissions().
+ */
+function page_user_default_permissions() {
+  $permissions = array();
+
+  // Exported permission: 'create page content'.
+  $permissions['create page content'] = array(
+    'name' => 'create page content',
+    'roles' => array(
+      'administrator' => 'administrator',
+      'root' => 'root',
+    ),
+    'module' => 'node',
+  );
+
+  // Exported permission: 'delete any page content'.
+  $permissions['delete any page content'] = array(
+    'name' => 'delete any page content',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'node',
+  );
+
+  // Exported permission: 'delete own page content'.
+  $permissions['delete own page content'] = array(
+    'name' => 'delete own page content',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'node',
+  );
+
+  // Exported permission: 'edit any page content'.
+  $permissions['edit any page content'] = array(
+    'name' => 'edit any page content',
+    'roles' => array(
+      'administrator' => 'administrator',
+      'root' => 'root',
+    ),
+    'module' => 'node',
+  );
+
+  // Exported permission: 'edit own page content'.
+  $permissions['edit own page content'] = array(
+    'name' => 'edit own page content',
+    'roles' => array(
+      'root' => 'root',
+    ),
+    'module' => 'node',
+  );
+
+  return $permissions;
+}

+ 26 - 0
sites/all/modules/features/page/page.info

@@ -0,0 +1,26 @@
+name = Page
+description = page content type
+core = 7.x
+package = Gui
+dependencies[] = ctools
+dependencies[] = features
+dependencies[] = node
+dependencies[] = strongarm
+dependencies[] = text
+features[ctools][] = strongarm:strongarm:1
+features[features_api][] = api:2
+features[field_base][] = body
+features[field_instance][] = node-page-body
+features[node][] = page
+features[user_permission][] = create page content
+features[user_permission][] = delete any page content
+features[user_permission][] = delete own page content
+features[user_permission][] = edit any page content
+features[user_permission][] = edit own page content
+features[variable][] = menu_options_page
+features[variable][] = menu_parent_page
+features[variable][] = node_options_page
+features[variable][] = node_preview_page
+features[variable][] = node_submitted_page
+features[variable][] = pathauto_node_page_pattern
+project path = sites/all/modules/features

+ 7 - 0
sites/all/modules/features/page/page.module

@@ -0,0 +1,7 @@
+<?php
+/**
+ * @file
+ * Code for the Page feature.
+ */
+
+include_once 'page.features.inc';

+ 58 - 0
sites/all/modules/features/page/page.strongarm.inc

@@ -0,0 +1,58 @@
+<?php
+/**
+ * @file
+ * page.strongarm.inc
+ */
+
+/**
+ * Implements hook_strongarm().
+ */
+function page_strongarm() {
+  $export = array();
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'menu_options_page';
+  $strongarm->value = array();
+  $export['menu_options_page'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'menu_parent_page';
+  $strongarm->value = 'main-menu:0';
+  $export['menu_parent_page'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'node_options_page';
+  $strongarm->value = array(
+    0 => 'status',
+  );
+  $export['node_options_page'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'node_preview_page';
+  $strongarm->value = '1';
+  $export['node_preview_page'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'node_submitted_page';
+  $strongarm->value = 0;
+  $export['node_submitted_page'] = $strongarm;
+
+  $strongarm = new stdClass();
+  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+  $strongarm->api_version = 1;
+  $strongarm->name = 'pathauto_node_page_pattern';
+  $strongarm->value = '';
+  $export['pathauto_node_page_pattern'] = $strongarm;
+
+  return $export;
+}

BIN
sites/all/themes/gui/inigui/apple-touch-icon-precomposed.png


BIN
sites/all/themes/gui/inigui/apple-touch-icon.png


+ 0 - 23
sites/all/themes/gui/inigui/css/maintenance.css

@@ -1,23 +0,0 @@
-/* $Id: maintenance.css,v 1.1 2007/11/30 12:19:10 goba Exp $ */
-
-/* Update styles */
-#update-results {
-  margin-top: 3em;
-  padding: 0.25em;
-  border: 1px solid #ccc;
-  background: #eee;
-  font-size: smaller;
-}
-#update-results h2 {
-  margin-top: 0.25em;
-}
-#update-results h4 {
-  margin-bottom: 0.25em;
-}
-#update-results li.none {
-  color: #888;
-  font-style: italic;
-}
-#update-results li.failure strong {
-  color: #b63300;
-}

+ 0 - 64
sites/all/themes/gui/inigui/css/nonsemantic.css

@@ -1,64 +0,0 @@
-/* ==|== non-semantic helper classes ========================================
-   Please define your styles before this section.
-   ========================================================================== */
-
-/* For image replacement */
-.ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; }
-.ir br { display: none; }
-
-/* Hide from both screenreaders and browsers: h5bp.com/u */
-.hidden { display: none !important; visibility: hidden; }
-
-/* Hide only visually, but have it available for screenreaders: h5bp.com/v */
-.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
-
-/* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p */
-.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
-
-/* Hide visually and from screenreaders, but maintain layout */
-.invisible { visibility: hidden; }
-
-/* Contain floats: h5bp.com/q */ 
-.clearfix:before, .clearfix:after { content: ""; display: table; }
-.clearfix:after { clear: both; }
-.clearfix { zoom: 1; }
-
-
-
-/* ==|== media queries ======================================================
-   PLACEHOLDER Media Queries for Responsive Design.
-   These override the primary ('mobile first') styles
-   Modify as content requires.
-   ========================================================================== */
-
-@media only screen and (min-width: 480px) {
-  /* Style adjustments for viewports 480px and over go here */
-
-}
-
-@media only screen and (min-width: 768px) {
-  /* Style adjustments for viewports 768px and over go here */
-
-}
-
-
-
-/* ==|== print styles =======================================================
-   Print styles.
-   Inlined to avoid required HTTP connection: h5bp.com/r
-   ========================================================================== */
- 
-@media print {
-  * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s */
-  a, a:visited { text-decoration: underline; }
-  a[href]:after { content: " (" attr(href) ")"; }
-  abbr[title]:after { content: " (" attr(title) ")"; }
-  .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }  /* Don't show links for images, or javascript/internal links */
-  pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
-  thead { display: table-header-group; } /* h5bp.com/t */
-  tr, img { page-break-inside: avoid; }
-  img { max-width: 100% !important; }
-  @page { margin: 0.5cm; }
-  p, h2, h3 { orphans: 3; widows: 3; }
-  h2, h3 { page-break-after: avoid; }
-}

+ 0 - 406
sites/all/themes/gui/inigui/css/normalize.css

@@ -1,406 +0,0 @@
-/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
-
-/* ==========================================================================
-   HTML5 display definitions
-   ========================================================================== */
-
-/**
- * Correct `block` display not defined in IE 8/9.
- */
-
-article,
-aside,
-details,
-figcaption,
-figure,
-footer,
-header,
-hgroup,
-main,
-nav,
-section,
-summary {
-    display: block;
-}
-
-/**
- * Correct `inline-block` display not defined in IE 8/9.
- */
-
-audio,
-canvas,
-video {
-    display: inline-block;
-}
-
-/**
- * Prevent modern browsers from displaying `audio` without controls.
- * Remove excess height in iOS 5 devices.
- */
-
-audio:not([controls]) {
-    display: none;
-    height: 0;
-}
-
-/**
- * Address `[hidden]` styling not present in IE 8/9.
- * Hide the `template` element in IE, Safari, and Firefox < 22.
- */
-
-[hidden],
-template {
-    display: none;
-}
-
-/* ==========================================================================
-   Base
-   ========================================================================== */
-
-/**
- * 1. Set default font family to sans-serif.
- * 2. Prevent iOS text size adjust after orientation change, without disabling
- *    user zoom.
- */
-
-html {
-    font-family: sans-serif; /* 1 */
-    -ms-text-size-adjust: 100%; /* 2 */
-    -webkit-text-size-adjust: 100%; /* 2 */
-}
-
-/**
- * Remove default margin.
- */
-
-body {
-    margin: 0;
-}
-
-/* ==========================================================================
-   Links
-   ========================================================================== */
-
-/**
- * Remove the gray background color from active links in IE 10.
- */
-
-a {
-    background: transparent;
-}
-
-/**
- * Address `outline` inconsistency between Chrome and other browsers.
- */
-
-a:focus {
-    outline: thin dotted;
-}
-
-/**
- * Improve readability when focused and also mouse hovered in all browsers.
- */
-
-a:active,
-a:hover {
-    outline: 0;
-}
-
-/* ==========================================================================
-   Typography
-   ========================================================================== */
-
-/**
- * Address variable `h1` font-size and margin within `section` and `article`
- * contexts in Firefox 4+, Safari 5, and Chrome.
- */
-
-h1 {
-    font-size: 2em;
-    margin: 0.67em 0;
-}
-
-/**
- * Address styling not present in IE 8/9, Safari 5, and Chrome.
- */
-
-abbr[title] {
-    border-bottom: 1px dotted;
-}
-
-/**
- * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
- */
-
-b,
-strong {
-    font-weight: bold;
-}
-
-/**
- * Address styling not present in Safari 5 and Chrome.
- */
-
-dfn {
-    font-style: italic;
-}
-
-/**
- * Address differences between Firefox and other browsers.
- */
-
-hr {
-    -moz-box-sizing: content-box;
-    box-sizing: content-box;
-    height: 0;
-}
-
-/**
- * Address styling not present in IE 8/9.
- */
-
-mark {
-    background: #ff0;
-    color: #000;
-}
-
-/**
- * Correct font family set oddly in Safari 5 and Chrome.
- */
-
-code,
-kbd,
-pre,
-samp {
-    font-family: monospace, serif;
-    font-size: 1em;
-}
-
-/**
- * Improve readability of pre-formatted text in all browsers.
- */
-
-pre {
-    white-space: pre-wrap;
-}
-
-/**
- * Set consistent quote types.
- */
-
-q {
-    quotes: "\201C" "\201D" "\2018" "\2019";
-}
-
-/**
- * Address inconsistent and variable font size in all browsers.
- */
-
-small {
-    font-size: 80%;
-}
-
-/**
- * Prevent `sub` and `sup` affecting `line-height` in all browsers.
- */
-
-sub,
-sup {
-    font-size: 75%;
-    line-height: 0;
-    position: relative;
-    vertical-align: baseline;
-}
-
-sup {
-    top: -0.5em;
-}
-
-sub {
-    bottom: -0.25em;
-}
-
-/* ==========================================================================
-   Embedded content
-   ========================================================================== */
-
-/**
- * Remove border when inside `a` element in IE 8/9.
- */
-
-img {
-    border: 0;
-}
-
-/**
- * Correct overflow displayed oddly in IE 9.
- */
-
-svg:not(:root) {
-    overflow: hidden;
-}
-
-/* ==========================================================================
-   Figures
-   ========================================================================== */
-
-/**
- * Address margin not present in IE 8/9 and Safari 5.
- */
-
-figure {
-    margin: 0;
-}
-
-/* ==========================================================================
-   Forms
-   ========================================================================== */
-
-/**
- * Define consistent border, margin, and padding.
- */
-
-fieldset {
-    border: 1px solid #c0c0c0;
-    margin: 0 2px;
-    padding: 0.35em 0.625em 0.75em;
-}
-
-/**
- * 1. Correct `color` not being inherited in IE 8/9.
- * 2. Remove padding so people aren't caught out if they zero out fieldsets.
- */
-
-legend {
-    border: 0; /* 1 */
-    padding: 0; /* 2 */
-}
-
-/**
- * 1. Correct font family not being inherited in all browsers.
- * 2. Correct font size not being inherited in all browsers.
- * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
- */
-
-button,
-input,
-select,
-textarea {
-    font-family: inherit; /* 1 */
-    font-size: 100%; /* 2 */
-    margin: 0; /* 3 */
-}
-
-/**
- * Address Firefox 4+ setting `line-height` on `input` using `!important` in
- * the UA stylesheet.
- */
-
-button,
-input {
-    line-height: normal;
-}
-
-/**
- * Address inconsistent `text-transform` inheritance for `button` and `select`.
- * All other form control elements do not inherit `text-transform` values.
- * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
- * Correct `select` style inheritance in Firefox 4+ and Opera.
- */
-
-button,
-select {
-    text-transform: none;
-}
-
-/**
- * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
- *    and `video` controls.
- * 2. Correct inability to style clickable `input` types in iOS.
- * 3. Improve usability and consistency of cursor style between image-type
- *    `input` and others.
- */
-
-button,
-html input[type="button"], /* 1 */
-input[type="reset"],
-input[type="submit"] {
-    -webkit-appearance: button; /* 2 */
-    cursor: pointer; /* 3 */
-}
-
-/**
- * Re-set default cursor for disabled elements.
- */
-
-button[disabled],
-html input[disabled] {
-    cursor: default;
-}
-
-/**
- * 1. Address box sizing set to `content-box` in IE 8/9/10.
- * 2. Remove excess padding in IE 8/9/10.
- */
-
-input[type="checkbox"],
-input[type="radio"] {
-    box-sizing: border-box; /* 1 */
-    padding: 0; /* 2 */
-}
-
-/**
- * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
- * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
- *    (include `-moz` to future-proof).
- */
-
-input[type="search"] {
-    -webkit-appearance: textfield; /* 1 */
-    -moz-box-sizing: content-box;
-    -webkit-box-sizing: content-box; /* 2 */
-    box-sizing: content-box;
-}
-
-/**
- * Remove inner padding and search cancel button in Safari 5 and Chrome
- * on OS X.
- */
-
-input[type="search"]::-webkit-search-cancel-button,
-input[type="search"]::-webkit-search-decoration {
-    -webkit-appearance: none;
-}
-
-/**
- * Remove inner padding and border in Firefox 4+.
- */
-
-button::-moz-focus-inner,
-input::-moz-focus-inner {
-    border: 0;
-    padding: 0;
-}
-
-/**
- * 1. Remove default vertical scrollbar in IE 8/9.
- * 2. Improve readability and alignment in all browsers.
- */
-
-textarea {
-    overflow: auto; /* 1 */
-    vertical-align: top; /* 2 */
-}
-
-/* ==========================================================================
-   Tables
-   ========================================================================== */
-
-/**
- * Remove most spacing between table cells.
- */
-
-table {
-    border-collapse: collapse;
-    border-spacing: 0;
-}

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
sites/all/themes/gui/inigui/css/styles.css


BIN
sites/all/themes/gui/inigui/icon.png


+ 0 - 215
sites/all/themes/gui/inigui/inc/template.theme-overrides.inc

@@ -1,215 +0,0 @@
-<?php 
-
-
-/**
- * Allow themable wrapping of all comments (from garland).
- */
-function inigui_comment_wrapper($content, $node) {
-  if (!$content || $node->type == 'forum') {
-    return '<div id="comments">'. $content .'</div>';
-  }
-  else {
-    return '<div id="comments"><h2 class="comments">'. t('Comments :') .'</h2>'. $content .'</div>';
-  }
-}
-
-/**
- * Theme output of user signature.
- *
- * @ingroup themeable
- */
-function inigui_user_signature($signature) {
-  return '<div class="user-signature">'.$signature.'</div>';
-}
-
-/**
- * Returns a formatted list of recent comments to be displayed in the comment block.
- *
- * @return
- *   The comment list HTML.
- * @ingroup themeable
- */
-function inigui_comment_block() {
-  $items = array();
-  foreach (comment_get_recent() as $comment) {
-    $items[] = l($comment->subject, 'node/'. $comment->nid, array('fragment' => 'comment-'. $comment->cid)) .'<br />'. t('@time ago', array('@time' => format_interval(time() - $comment->timestamp)));
-  }
-  if ($items) {
-    return theme('item_list', $items);
-  }
-}
-
-/**
- * Themes a single comment and related items.
- *
- * @param $comment
- *   The comment object.
- * @param $node
- *   The comment node.
- * @param $links
- *   An associative array containing control links suitable for passing into
- *   theme_links(). These are generated by modules implementing hook_link() with
- *   $type='comment'. Typical examples are links for editing and deleting
- *   comments.
- * @param $visible
- *   Switches between folded/unfolded view. If TRUE the comments are visible, if
- *   FALSE the comments are folded.
- * @ingroup themeable
- */
-function inigui_comment_view($comment, $node, $links = array(), $visible = TRUE) {
-  static $first_new = TRUE;
-
-  $output = '';
-  $comment->new = node_mark($comment->nid, $comment->timestamp);
-  if ($first_new && $comment->new != MARK_READ) {
-    // Assign the anchor only for the first new comment. This avoids duplicate
-    // id attributes on a page.
-    $first_new = FALSE;
-    $output .= "<a id=\"new\"></a>\n";
-  }
-
-  $output .= "<a id=\"comment-$comment->cid\"></a>\n";
-
-  // Switch to folded/unfolded view of the comment
-  if ($visible) {
-    $comment->comment = check_markup($comment->comment, $comment->format, FALSE);
-
-    // Comment API hook
-    comment_invoke_comment($comment, 'view');
-
-    $output .= theme('comment', $comment, $node, $links);
-  }
-  else {
-    $output .= theme('comment_folded', $comment);
-  }
-
-  return $output;
-}
-
-
-/**
- * Theme comment controls box where the user can change the default display mode and display order of comments.
- *
- * @param $form
- *   The form structure.
- * @ingroup themeable
- */
-function inigui_comment_controls($form) {
-  $output = '<div class="container-inline">';
-  $output .=  drupal_render($form);
-  $output .= '</div>';
-  $output .= '<div class="description">'. t('Select your preferred way to display the comments and click "Save settings" to activate your changes.') .'</div>';
-  return theme('box', t('Comment viewing options'), $output);
-}
-
-/**
- * Theme comment flat collapsed view.
- *
- * @param $comment
- *   The comment to be themed.
- * @param $node
- *   The comment node.
- * @ingroup themeable
- */
-function inigui_comment_flat_collapsed($comment, $node) {
-  return theme('comment_view', $comment, $node, '', 0);
-}
-
-/**
- * Theme comment flat expanded view.
- *
- * @param $comment
- *   The comment to be themed.
- * @param $node
- *   The comment node.
- * @ingroup themeable
- */
-function inigui_comment_flat_expanded($comment, $node) {
-  $links = module_invoke_all('link', 'comment', $comment, 0);
-  drupal_alter('link', $links, $node, $comment);
-  return theme('comment_view', $comment, $node, $links);
-}
-
-/**
- * Theme comment thread collapsed view.
- *
- * @param $comment
- *   The comment to be themed.
- * @param $node
- *   The comment node.
- * @ingroup themeable
- */
-function inigui_comment_thread_collapsed($comment, $node) {
-  return theme('comment_view', $comment, $node, '', 0);
-}
-
-/**
- * Theme comment thread expanded view.
- *
- * @param $comment
- *   The comment to be themed.
- * @param $node
- *   The comment node.
- * @ingroup themeable
- */
-function inigui_comment_thread_expanded($comment, $node) {
-  $links = module_invoke_all('link', 'comment', $comment, 0);
-  drupal_alter('link', $links, $node, $comment);
-  return theme('comment_view', $comment, $node, $links);
-}
-
-/**
- * Theme a "you can't post comments" notice.
- *
- * @param $node
- *   The comment node.
- * @ingroup themeable
- */
-function inigui_comment_post_forbidden($node) {
-  global $user;
-  static $authenticated_post_comments;
-
-  if (!$user->uid) {
-    if (!isset($authenticated_post_comments)) {
-      // We only output any link if we are certain, that users get permission
-      // to post comments by logging in. We also locally cache this information.
-      $authenticated_post_comments = array_key_exists(DRUPAL_AUTHENTICATED_RID, user_roles(TRUE, 'post comments') + user_roles(TRUE, 'post comments without approval'));
-    }
-
-    if ($authenticated_post_comments) {
-      // We cannot use drupal_get_destination() because these links
-      // sometimes appear on /node and taxonomy listing pages.
-      if (variable_get('comment_form_location_'. $node->type, COMMENT_FORM_SEPARATE_PAGE) == COMMENT_FORM_SEPARATE_PAGE) {
-        $destination = 'destination='. rawurlencode("comment/reply/$node->nid#comment-form");
-      }
-      else {
-        $destination = 'destination='. rawurlencode("node/$node->nid#comment-form");
-      }
-
-      if (variable_get('user_register', 1)) {
-        // Users can register themselves.
-        return t('<a href="@login">Login</a> or <a href="@register">register</a> to post comments', array('@login' => url('user/login', array('query' => $destination)), '@register' => url('user/register', array('query' => $destination))));
-      }
-      else {
-        // Only admins can add new users, no public registration.
-        return t('<a href="@login">Login</a> to post comments', array('@login' => url('user/login', array('query' => $destination))));
-      }
-    }
-  }
-}
-
-
-/**
- * Theme a "Submitted by ..." notice.
- *
- * @param $comment
- *   The comment.
- * @ingroup themeable
- */
-function inigui_comment_submitted($comment) {
-  return t('Submitted by !username on @datetime.',
-    array(
-      '!username' => theme('username', $comment),
-      '@datetime' => format_date($comment->timestamp)
-    ));
-}

+ 0 - 93
sites/all/themes/gui/inigui/inigui.info

@@ -1,93 +0,0 @@
-;----------// Theme informations
-
-name = "Inigui"
-description = "html5 strater theme by <a href="http://www.g-u-i.net">g-u-i.net</a> inspired by <a href="http://html5boilerplate.com/">html5boilerplate.com</a>"
-version = "7.x-0.1"
-core = "7.x"
-engine = "phptemplate"
-
-
-
-;----------// Styles
-stylesheets[all][] = "css/normalize.css"
-stylesheets[all][] = "css/styles.css"
-; non-semantic helper classes
-; Please define your styles before this section.
-stylesheets[all][] = "css/nonsemantic.css"
-
-
-
-
-;----------// Scripts
-
-scripts[] = "js/script.js"
-
-;----------// Twitter BootStrap (for style view @import in styles.less file)
-
-/!\ i will try for now the CodeKit framework systeme by @importing less and js files directly on compilation
-
-;scripts[] = "frameworks/twitter-bootstrap/js/bootstrap-affix.js"
-;scripts[] = "frameworks/twitter-bootstrap/js/bootstrap-alert.js"
-;scripts[] = "frameworks/twitter-bootstrap/js/bootstrap-button.js"
-;scripts[] = "frameworks/twitter-bootstrap/js/bootstrap-carousel.js"
-;scripts[] = "frameworks/twitter-bootstrap/js/bootstrap-collapse.js"
-;scripts[] = "frameworks/twitter-bootstrap/js/bootstrap-dropdown.js"
-;scripts[] = "frameworks/twitter-bootstrap/js/bootstrap-modal.js"
-;scripts[] = "frameworks/twitter-bootstrap/js/bootstrap-popover.js"
-;scripts[] = "frameworks/twitter-bootstrap/js/bootstrap-scrollspy.js"
-;scripts[] = "frameworks/twitter-bootstrap/js/bootstrap-tab.js"
-;scripts[] = "frameworks/twitter-bootstrap/js/bootstrap-tooltip.js"
-;scripts[] = "frameworks/twitter-bootstrap/js/bootstrap-transition.js"
-;scripts[] = "frameworks/twitter-bootstrap/js/bootstrap-typeahead.js"
-
-
-
-
-;----------// Regions
-
-regions[header] = Header
-regions[headerblock_left] = Headerblock left
-regions[headerblock_middle] = Headerblock middle
-regions[headerblock_right] = Headerblock right
-
-regions[help] = Help
-regions[highlighted] = Highlighted
-
-regions[sidebar_first] = First sidebar
-regions[content_top] = Top content
-regions[content] = Content
-regions[content_bottom] = Bottom content
-regions[sidebar_second] = Second sidebar
-
-regions[footer_top] = Footer top
-regions[footer_left] = Footer left
-regions[footer_middle_left] = Footer middle left
-regions[footer_middle_right] = Footer middle right
-regions[footer_right] = Footer right
-regions[footer_bottom] = Footer bottom
-
-
-
-;----------// Features
-
-features[] = logo
-features[] = favicon
-features[] = name
-features[] = slogan
-features[] = search
-features[] = comment_user_picture
-features[] = main_menu
-features[] = secondary_menu
-
-
-;----------// Panels
-; Panels layouts. You can place multiple layouts under the "layouts" folder.
-
-plugins[panels][layouts] = layouts
-
-
-;----------// Theme Setting Defaults
-
-settings[layout_method]                     = '0'
-settings[layout_enable_settings]            = 'on'
-settings[layout_enable_method]              = 'on'

+ 0 - 1104
sites/all/themes/gui/inigui/js/libs/iscroll.js

@@ -1,1104 +0,0 @@
-/*!
- * iScroll v4.2.5 ~ Copyright (c) 2012 Matteo Spinelli, http://cubiq.org
- * Released under MIT license, http://cubiq.org/license
- */
-(function(window, doc){
-var m = Math,
-	dummyStyle = doc.createElement('div').style,
-	vendor = (function () {
-		var vendors = 't,webkitT,MozT,msT,OT'.split(','),
-			t,
-			i = 0,
-			l = vendors.length;
-
-		for ( ; i < l; i++ ) {
-			t = vendors[i] + 'ransform';
-			if ( t in dummyStyle ) {
-				return vendors[i].substr(0, vendors[i].length - 1);
-			}
-		}
-
-		return false;
-	})(),
-	cssVendor = vendor ? '-' + vendor.toLowerCase() + '-' : '',
-
-	// Style properties
-	transform = prefixStyle('transform'),
-	transitionProperty = prefixStyle('transitionProperty'),
-	transitionDuration = prefixStyle('transitionDuration'),
-	transformOrigin = prefixStyle('transformOrigin'),
-	transitionTimingFunction = prefixStyle('transitionTimingFunction'),
-	transitionDelay = prefixStyle('transitionDelay'),
-
-    // Browser capabilities
-	isAndroid = (/android/gi).test(navigator.appVersion),
-	isIDevice = (/iphone|ipad/gi).test(navigator.appVersion),
-	isTouchPad = (/hp-tablet/gi).test(navigator.appVersion),
-
-    has3d = prefixStyle('perspective') in dummyStyle,
-    hasTouch = 'ontouchstart' in window && !isTouchPad,
-    hasTransform = vendor !== false,
-    hasTransitionEnd = prefixStyle('transition') in dummyStyle,
-
-	RESIZE_EV = 'onorientationchange' in window ? 'orientationchange' : 'resize',
-	START_EV = hasTouch ? 'touchstart' : 'mousedown',
-	MOVE_EV = hasTouch ? 'touchmove' : 'mousemove',
-	END_EV = hasTouch ? 'touchend' : 'mouseup',
-	CANCEL_EV = hasTouch ? 'touchcancel' : 'mouseup',
-	TRNEND_EV = (function () {
-		if ( vendor === false ) return false;
-
-		var transitionEnd = {
-				''			: 'transitionend',
-				'webkit'	: 'webkitTransitionEnd',
-				'Moz'		: 'transitionend',
-				'O'			: 'otransitionend',
-				'ms'		: 'MSTransitionEnd'
-			};
-
-		return transitionEnd[vendor];
-	})(),
-
-	nextFrame = (function() {
-		return window.requestAnimationFrame ||
-			window.webkitRequestAnimationFrame ||
-			window.mozRequestAnimationFrame ||
-			window.oRequestAnimationFrame ||
-			window.msRequestAnimationFrame ||
-			function(callback) { return setTimeout(callback, 1); };
-	})(),
-	cancelFrame = (function () {
-		return window.cancelRequestAnimationFrame ||
-			window.webkitCancelAnimationFrame ||
-			window.webkitCancelRequestAnimationFrame ||
-			window.mozCancelRequestAnimationFrame ||
-			window.oCancelRequestAnimationFrame ||
-			window.msCancelRequestAnimationFrame ||
-			clearTimeout;
-	})(),
-
-	// Helpers
-	translateZ = has3d ? ' translateZ(0)' : '',
-
-	// Constructor
-	iScroll = function (el, options) {
-		var that = this,
-			i;
-
-		that.wrapper = typeof el == 'object' ? el : doc.getElementById(el);
-		that.wrapper.style.overflow = 'hidden';
-		that.scroller = that.wrapper.children[0];
-
-		// Default options
-		that.options = {
-			hScroll: true,
-			vScroll: true,
-			x: 0,
-			y: 0,
-			bounce: true,
-			bounceLock: false,
-			momentum: true,
-			lockDirection: true,
-			useTransform: true,
-			useTransition: false,
-			topOffset: 0,
-			checkDOMChanges: false,		// Experimental
-			handleClick: true,
-
-			// Scrollbar
-			hScrollbar: true,
-			vScrollbar: true,
-			fixedScrollbar: isAndroid,
-			hideScrollbar: isIDevice,
-			fadeScrollbar: isIDevice && has3d,
-			scrollbarClass: '',
-
-			// Zoom
-			zoom: false,
-			zoomMin: 1,
-			zoomMax: 4,
-			doubleTapZoom: 2,
-			wheelAction: 'scroll',
-
-			// Snap
-			snap: false,
-			snapThreshold: 1,
-
-			// Events
-			onRefresh: null,
-			onBeforeScrollStart: function (e) { e.preventDefault(); },
-			onScrollStart: null,
-			onBeforeScrollMove: null,
-			onScrollMove: null,
-			onBeforeScrollEnd: null,
-			onScrollEnd: null,
-			onTouchEnd: null,
-			onDestroy: null,
-			onZoomStart: null,
-			onZoom: null,
-			onZoomEnd: null
-		};
-
-		// User defined options
-		for (i in options) that.options[i] = options[i];
-		
-		// Set starting position
-		that.x = that.options.x;
-		that.y = that.options.y;
-
-		// Normalize options
-		that.options.useTransform = hasTransform && that.options.useTransform;
-		that.options.hScrollbar = that.options.hScroll && that.options.hScrollbar;
-		that.options.vScrollbar = that.options.vScroll && that.options.vScrollbar;
-		that.options.zoom = that.options.useTransform && that.options.zoom;
-		that.options.useTransition = hasTransitionEnd && that.options.useTransition;
-
-		// Helpers FIX ANDROID BUG!
-		// translate3d and scale doesn't work together!
-		// Ignoring 3d ONLY WHEN YOU SET that.options.zoom
-		if ( that.options.zoom && isAndroid ){
-			translateZ = '';
-		}
-		
-		// Set some default styles
-		that.scroller.style[transitionProperty] = that.options.useTransform ? cssVendor + 'transform' : 'top left';
-		that.scroller.style[transitionDuration] = '0';
-		that.scroller.style[transformOrigin] = '0 0';
-		if (that.options.useTransition) that.scroller.style[transitionTimingFunction] = 'cubic-bezier(0.33,0.66,0.66,1)';
-		
-		if (that.options.useTransform) that.scroller.style[transform] = 'translate(' + that.x + 'px,' + that.y + 'px)' + translateZ;
-		else that.scroller.style.cssText += ';position:absolute;top:' + that.y + 'px;left:' + that.x + 'px';
-
-		if (that.options.useTransition) that.options.fixedScrollbar = true;
-
-		that.refresh();
-
-		that._bind(RESIZE_EV, window);
-		that._bind(START_EV);
-		if (!hasTouch) {
-			if (that.options.wheelAction != 'none') {
-				that._bind('DOMMouseScroll');
-				that._bind('mousewheel');
-			}
-		}
-
-		if (that.options.checkDOMChanges) that.checkDOMTime = setInterval(function () {
-			that._checkDOMChanges();
-		}, 500);
-	};
-
-// Prototype
-iScroll.prototype = {
-	enabled: true,
-	x: 0,
-	y: 0,
-	steps: [],
-	scale: 1,
-	currPageX: 0, currPageY: 0,
-	pagesX: [], pagesY: [],
-	aniTime: null,
-	wheelZoomCount: 0,
-	
-	handleEvent: function (e) {
-		var that = this;
-		switch(e.type) {
-			case START_EV:
-				if (!hasTouch && e.button !== 0) return;
-				that._start(e);
-				break;
-			case MOVE_EV: that._move(e); break;
-			case END_EV:
-			case CANCEL_EV: that._end(e); break;
-			case RESIZE_EV: that._resize(); break;
-			case 'DOMMouseScroll': case 'mousewheel': that._wheel(e); break;
-			case TRNEND_EV: that._transitionEnd(e); break;
-		}
-	},
-	
-	_checkDOMChanges: function () {
-		if (this.moved || this.zoomed || this.animating ||
-			(this.scrollerW == this.scroller.offsetWidth * this.scale && this.scrollerH == this.scroller.offsetHeight * this.scale)) return;
-
-		this.refresh();
-	},
-	
-	_scrollbar: function (dir) {
-		var that = this,
-			bar;
-
-		if (!that[dir + 'Scrollbar']) {
-			if (that[dir + 'ScrollbarWrapper']) {
-				if (hasTransform) that[dir + 'ScrollbarIndicator'].style[transform] = '';
-				that[dir + 'ScrollbarWrapper'].parentNode.removeChild(that[dir + 'ScrollbarWrapper']);
-				that[dir + 'ScrollbarWrapper'] = null;
-				that[dir + 'ScrollbarIndicator'] = null;
-			}
-
-			return;
-		}
-
-		if (!that[dir + 'ScrollbarWrapper']) {
-			// Create the scrollbar wrapper
-			bar = doc.createElement('div');
-
-			if (that.options.scrollbarClass) bar.className = that.options.scrollbarClass + dir.toUpperCase();
-			else bar.style.cssText = 'position:absolute;z-index:100;' + (dir == 'h' ? 'height:7px;bottom:1px;left:2px;right:' + (that.vScrollbar ? '7' : '2') + 'px' : 'width:7px;bottom:' + (that.hScrollbar ? '7' : '2') + 'px;top:2px;right:1px');
-
-			bar.style.cssText += ';pointer-events:none;' + cssVendor + 'transition-property:opacity;' + cssVendor + 'transition-duration:' + (that.options.fadeScrollbar ? '350ms' : '0') + ';overflow:hidden;opacity:' + (that.options.hideScrollbar ? '0' : '1');
-
-			that.wrapper.appendChild(bar);
-			that[dir + 'ScrollbarWrapper'] = bar;
-
-			// Create the scrollbar indicator
-			bar = doc.createElement('div');
-			if (!that.options.scrollbarClass) {
-				bar.style.cssText = 'position:absolute;z-index:100;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);' + cssVendor + 'background-clip:padding-box;' + cssVendor + 'box-sizing:border-box;' + (dir == 'h' ? 'height:100%' : 'width:100%') + ';' + cssVendor + 'border-radius:3px;border-radius:3px';
-			}
-			bar.style.cssText += ';pointer-events:none;' + cssVendor + 'transition-property:' + cssVendor + 'transform;' + cssVendor + 'transition-timing-function:cubic-bezier(0.33,0.66,0.66,1);' + cssVendor + 'transition-duration:0;' + cssVendor + 'transform: translate(0,0)' + translateZ;
-			if (that.options.useTransition) bar.style.cssText += ';' + cssVendor + 'transition-timing-function:cubic-bezier(0.33,0.66,0.66,1)';
-
-			that[dir + 'ScrollbarWrapper'].appendChild(bar);
-			that[dir + 'ScrollbarIndicator'] = bar;
-		}
-
-		if (dir == 'h') {
-			that.hScrollbarSize = that.hScrollbarWrapper.clientWidth;
-			that.hScrollbarIndicatorSize = m.max(m.round(that.hScrollbarSize * that.hScrollbarSize / that.scrollerW), 8);
-			that.hScrollbarIndicator.style.width = that.hScrollbarIndicatorSize + 'px';
-			that.hScrollbarMaxScroll = that.hScrollbarSize - that.hScrollbarIndicatorSize;
-			that.hScrollbarProp = that.hScrollbarMaxScroll / that.maxScrollX;
-		} else {
-			that.vScrollbarSize = that.vScrollbarWrapper.clientHeight;
-			that.vScrollbarIndicatorSize = m.max(m.round(that.vScrollbarSize * that.vScrollbarSize / that.scrollerH), 8);
-			that.vScrollbarIndicator.style.height = that.vScrollbarIndicatorSize + 'px';
-			that.vScrollbarMaxScroll = that.vScrollbarSize - that.vScrollbarIndicatorSize;
-			that.vScrollbarProp = that.vScrollbarMaxScroll / that.maxScrollY;
-		}
-
-		// Reset position
-		that._scrollbarPos(dir, true);
-	},
-	
-	_resize: function () {
-		var that = this;
-		setTimeout(function () { that.refresh(); }, isAndroid ? 200 : 0);
-	},
-	
-	_pos: function (x, y) {
-		if (this.zoomed) return;
-
-		x = this.hScroll ? x : 0;
-		y = this.vScroll ? y : 0;
-
-		if (this.options.useTransform) {
-			this.scroller.style[transform] = 'translate(' + x + 'px,' + y + 'px) scale(' + this.scale + ')' + translateZ;
-		} else {
-			x = m.round(x);
-			y = m.round(y);
-			this.scroller.style.left = x + 'px';
-			this.scroller.style.top = y + 'px';
-		}
-
-		this.x = x;
-		this.y = y;
-
-		this._scrollbarPos('h');
-		this._scrollbarPos('v');
-	},
-
-	_scrollbarPos: function (dir, hidden) {
-		var that = this,
-			pos = dir == 'h' ? that.x : that.y,
-			size;
-
-		if (!that[dir + 'Scrollbar']) return;
-
-		pos = that[dir + 'ScrollbarProp'] * pos;
-
-		if (pos < 0) {
-			if (!that.options.fixedScrollbar) {
-				size = that[dir + 'ScrollbarIndicatorSize'] + m.round(pos * 3);
-				if (size < 8) size = 8;
-				that[dir + 'ScrollbarIndicator'].style[dir == 'h' ? 'width' : 'height'] = size + 'px';
-			}
-			pos = 0;
-		} else if (pos > that[dir + 'ScrollbarMaxScroll']) {
-			if (!that.options.fixedScrollbar) {
-				size = that[dir + 'ScrollbarIndicatorSize'] - m.round((pos - that[dir + 'ScrollbarMaxScroll']) * 3);
-				if (size < 8) size = 8;
-				that[dir + 'ScrollbarIndicator'].style[dir == 'h' ? 'width' : 'height'] = size + 'px';
-				pos = that[dir + 'ScrollbarMaxScroll'] + (that[dir + 'ScrollbarIndicatorSize'] - size);
-			} else {
-				pos = that[dir + 'ScrollbarMaxScroll'];
-			}
-		}
-
-		that[dir + 'ScrollbarWrapper'].style[transitionDelay] = '0';
-		that[dir + 'ScrollbarWrapper'].style.opacity = hidden && that.options.hideScrollbar ? '0' : '1';
-		that[dir + 'ScrollbarIndicator'].style[transform] = 'translate(' + (dir == 'h' ? pos + 'px,0)' : '0,' + pos + 'px)') + translateZ;
-	},
-	
-	_start: function (e) {
-		var that = this,
-			point = hasTouch ? e.touches[0] : e,
-			matrix, x, y,
-			c1, c2;
-
-		if (!that.enabled) return;
-
-		if (that.options.onBeforeScrollStart) that.options.onBeforeScrollStart.call(that, e);
-
-		if (that.options.useTransition || that.options.zoom) that._transitionTime(0);
-
-		that.moved = false;
-		that.animating = false;
-		that.zoomed = false;
-		that.distX = 0;
-		that.distY = 0;
-		that.absDistX = 0;
-		that.absDistY = 0;
-		that.dirX = 0;
-		that.dirY = 0;
-
-		// Gesture start
-		if (that.options.zoom && hasTouch && e.touches.length > 1) {
-			c1 = m.abs(e.touches[0].pageX-e.touches[1].pageX);
-			c2 = m.abs(e.touches[0].pageY-e.touches[1].pageY);
-			that.touchesDistStart = m.sqrt(c1 * c1 + c2 * c2);
-
-			that.originX = m.abs(e.touches[0].pageX + e.touches[1].pageX - that.wrapperOffsetLeft * 2) / 2 - that.x;
-			that.originY = m.abs(e.touches[0].pageY + e.touches[1].pageY - that.wrapperOffsetTop * 2) / 2 - that.y;
-
-			if (that.options.onZoomStart) that.options.onZoomStart.call(that, e);
-		}
-
-		if (that.options.momentum) {
-			if (that.options.useTransform) {
-				// Very lame general purpose alternative to CSSMatrix
-				matrix = getComputedStyle(that.scroller, null)[transform].replace(/[^0-9\-.,]/g, '').split(',');
-				x = +(matrix[12] || matrix[4]);
-				y = +(matrix[13] || matrix[5]);
-			} else {
-				x = +getComputedStyle(that.scroller, null).left.replace(/[^0-9-]/g, '');
-				y = +getComputedStyle(that.scroller, null).top.replace(/[^0-9-]/g, '');
-			}
-			
-			if (x != that.x || y != that.y) {
-				if (that.options.useTransition) that._unbind(TRNEND_EV);
-				else cancelFrame(that.aniTime);
-				that.steps = [];
-				that._pos(x, y);
-				if (that.options.onScrollEnd) that.options.onScrollEnd.call(that);
-			}
-		}
-
-		that.absStartX = that.x;	// Needed by snap threshold
-		that.absStartY = that.y;
-
-		that.startX = that.x;
-		that.startY = that.y;
-		that.pointX = point.pageX;
-		that.pointY = point.pageY;
-
-		that.startTime = e.timeStamp || Date.now();
-
-		if (that.options.onScrollStart) that.options.onScrollStart.call(that, e);
-
-		that._bind(MOVE_EV, window);
-		that._bind(END_EV, window);
-		that._bind(CANCEL_EV, window);
-	},
-	
-	_move: function (e) {
-		var that = this,
-			point = hasTouch ? e.touches[0] : e,
-			deltaX = point.pageX - that.pointX,
-			deltaY = point.pageY - that.pointY,
-			newX = that.x + deltaX,
-			newY = that.y + deltaY,
-			c1, c2, scale,
-			timestamp = e.timeStamp || Date.now();
-
-		if (that.options.onBeforeScrollMove) that.options.onBeforeScrollMove.call(that, e);
-
-		// Zoom
-		if (that.options.zoom && hasTouch && e.touches.length > 1) {
-			c1 = m.abs(e.touches[0].pageX - e.touches[1].pageX);
-			c2 = m.abs(e.touches[0].pageY - e.touches[1].pageY);
-			that.touchesDist = m.sqrt(c1*c1+c2*c2);
-
-			that.zoomed = true;
-
-			scale = 1 / that.touchesDistStart * that.touchesDist * this.scale;
-
-			if (scale < that.options.zoomMin) scale = 0.5 * that.options.zoomMin * Math.pow(2.0, scale / that.options.zoomMin);
-			else if (scale > that.options.zoomMax) scale = 2.0 * that.options.zoomMax * Math.pow(0.5, that.options.zoomMax / scale);
-
-			that.lastScale = scale / this.scale;
-
-			newX = this.originX - this.originX * that.lastScale + this.x,
-			newY = this.originY - this.originY * that.lastScale + this.y;
-
-			this.scroller.style[transform] = 'translate(' + newX + 'px,' + newY + 'px) scale(' + scale + ')' + translateZ;
-
-			if (that.options.onZoom) that.options.onZoom.call(that, e);
-			return;
-		}
-
-		that.pointX = point.pageX;
-		that.pointY = point.pageY;
-
-		// Slow down if outside of the boundaries
-		if (newX > 0 || newX < that.maxScrollX) {
-			newX = that.options.bounce ? that.x + (deltaX / 2) : newX >= 0 || that.maxScrollX >= 0 ? 0 : that.maxScrollX;
-		}
-		if (newY > that.minScrollY || newY < that.maxScrollY) {
-			newY = that.options.bounce ? that.y + (deltaY / 2) : newY >= that.minScrollY || that.maxScrollY >= 0 ? that.minScrollY : that.maxScrollY;
-		}
-
-		that.distX += deltaX;
-		that.distY += deltaY;
-		that.absDistX = m.abs(that.distX);
-		that.absDistY = m.abs(that.distY);
-
-		if (that.absDistX < 6 && that.absDistY < 6) {
-			return;
-		}
-
-		// Lock direction
-		if (that.options.lockDirection) {
-			if (that.absDistX > that.absDistY + 5) {
-				newY = that.y;
-				deltaY = 0;
-			} else if (that.absDistY > that.absDistX + 5) {
-				newX = that.x;
-				deltaX = 0;
-			}
-		}
-
-		that.moved = true;
-		that._pos(newX, newY);
-		that.dirX = deltaX > 0 ? -1 : deltaX < 0 ? 1 : 0;
-		that.dirY = deltaY > 0 ? -1 : deltaY < 0 ? 1 : 0;
-
-		if (timestamp - that.startTime > 300) {
-			that.startTime = timestamp;
-			that.startX = that.x;
-			that.startY = that.y;
-		}
-		
-		if (that.options.onScrollMove) that.options.onScrollMove.call(that, e);
-	},
-	
-	_end: function (e) {
-		if (hasTouch && e.touches.length !== 0) return;
-
-		var that = this,
-			point = hasTouch ? e.changedTouches[0] : e,
-			target, ev,
-			momentumX = { dist:0, time:0 },
-			momentumY = { dist:0, time:0 },
-			duration = (e.timeStamp || Date.now()) - that.startTime,
-			newPosX = that.x,
-			newPosY = that.y,
-			distX, distY,
-			newDuration,
-			snap,
-			scale;
-
-		that._unbind(MOVE_EV, window);
-		that._unbind(END_EV, window);
-		that._unbind(CANCEL_EV, window);
-
-		if (that.options.onBeforeScrollEnd) that.options.onBeforeScrollEnd.call(that, e);
-
-		if (that.zoomed) {
-			scale = that.scale * that.lastScale;
-			scale = Math.max(that.options.zoomMin, scale);
-			scale = Math.min(that.options.zoomMax, scale);
-			that.lastScale = scale / that.scale;
-			that.scale = scale;
-
-			that.x = that.originX - that.originX * that.lastScale + that.x;
-			that.y = that.originY - that.originY * that.lastScale + that.y;
-			
-			that.scroller.style[transitionDuration] = '200ms';
-			that.scroller.style[transform] = 'translate(' + that.x + 'px,' + that.y + 'px) scale(' + that.scale + ')' + translateZ;
-			
-			that.zoomed = false;
-			that.refresh();
-
-			if (that.options.onZoomEnd) that.options.onZoomEnd.call(that, e);
-			return;
-		}
-
-		if (!that.moved) {
-			if (hasTouch) {
-				if (that.doubleTapTimer && that.options.zoom) {
-					// Double tapped
-					clearTimeout(that.doubleTapTimer);
-					that.doubleTapTimer = null;
-					if (that.options.onZoomStart) that.options.onZoomStart.call(that, e);
-					that.zoom(that.pointX, that.pointY, that.scale == 1 ? that.options.doubleTapZoom : 1);
-					if (that.options.onZoomEnd) {
-						setTimeout(function() {
-							that.options.onZoomEnd.call(that, e);
-						}, 200); // 200 is default zoom duration
-					}
-				} else if (this.options.handleClick) {
-					that.doubleTapTimer = setTimeout(function () {
-						that.doubleTapTimer = null;
-
-						// Find the last touched element
-						target = point.target;
-						while (target.nodeType != 1) target = target.parentNode;
-
-						if (target.tagName != 'SELECT' && target.tagName != 'INPUT' && target.tagName != 'TEXTAREA') {
-							ev = doc.createEvent('MouseEvents');
-							ev.initMouseEvent('click', true, true, e.view, 1,
-								point.screenX, point.screenY, point.clientX, point.clientY,
-								e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,
-								0, null);
-							ev._fake = true;
-							target.dispatchEvent(ev);
-						}
-					}, that.options.zoom ? 250 : 0);
-				}
-			}
-
-			that._resetPos(400);
-
-			if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e);
-			return;
-		}
-
-		if (duration < 300 && that.options.momentum) {
-			momentumX = newPosX ? that._momentum(newPosX - that.startX, duration, -that.x, that.scrollerW - that.wrapperW + that.x, that.options.bounce ? that.wrapperW : 0) : momentumX;
-			momentumY = newPosY ? that._momentum(newPosY - that.startY, duration, -that.y, (that.maxScrollY < 0 ? that.scrollerH - that.wrapperH + that.y - that.minScrollY : 0), that.options.bounce ? that.wrapperH : 0) : momentumY;
-
-			newPosX = that.x + momentumX.dist;
-			newPosY = that.y + momentumY.dist;
-
-			if ((that.x > 0 && newPosX > 0) || (that.x < that.maxScrollX && newPosX < that.maxScrollX)) momentumX = { dist:0, time:0 };
-			if ((that.y > that.minScrollY && newPosY > that.minScrollY) || (that.y < that.maxScrollY && newPosY < that.maxScrollY)) momentumY = { dist:0, time:0 };
-		}
-
-		if (momentumX.dist || momentumY.dist) {
-			newDuration = m.max(m.max(momentumX.time, momentumY.time), 10);
-
-			// Do we need to snap?
-			if (that.options.snap) {
-				distX = newPosX - that.absStartX;
-				distY = newPosY - that.absStartY;
-				if (m.abs(distX) < that.options.snapThreshold && m.abs(distY) < that.options.snapThreshold) { that.scrollTo(that.absStartX, that.absStartY, 200); }
-				else {
-					snap = that._snap(newPosX, newPosY);
-					newPosX = snap.x;
-					newPosY = snap.y;
-					newDuration = m.max(snap.time, newDuration);
-				}
-			}
-
-			that.scrollTo(m.round(newPosX), m.round(newPosY), newDuration);
-
-			if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e);
-			return;
-		}
-
-		// Do we need to snap?
-		if (that.options.snap) {
-			distX = newPosX - that.absStartX;
-			distY = newPosY - that.absStartY;
-			if (m.abs(distX) < that.options.snapThreshold && m.abs(distY) < that.options.snapThreshold) that.scrollTo(that.absStartX, that.absStartY, 200);
-			else {
-				snap = that._snap(that.x, that.y);
-				if (snap.x != that.x || snap.y != that.y) that.scrollTo(snap.x, snap.y, snap.time);
-			}
-
-			if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e);
-			return;
-		}
-
-		that._resetPos(200);
-		if (that.options.onTouchEnd) that.options.onTouchEnd.call(that, e);
-	},
-	
-	_resetPos: function (time) {
-		var that = this,
-			resetX = that.x >= 0 ? 0 : that.x < that.maxScrollX ? that.maxScrollX : that.x,
-			resetY = that.y >= that.minScrollY || that.maxScrollY > 0 ? that.minScrollY : that.y < that.maxScrollY ? that.maxScrollY : that.y;
-
-		if (resetX == that.x && resetY == that.y) {
-			if (that.moved) {
-				that.moved = false;
-				if (that.options.onScrollEnd) that.options.onScrollEnd.call(that);		// Execute custom code on scroll end
-			}
-
-			if (that.hScrollbar && that.options.hideScrollbar) {
-				if (vendor == 'webkit') that.hScrollbarWrapper.style[transitionDelay] = '300ms';
-				that.hScrollbarWrapper.style.opacity = '0';
-			}
-			if (that.vScrollbar && that.options.hideScrollbar) {
-				if (vendor == 'webkit') that.vScrollbarWrapper.style[transitionDelay] = '300ms';
-				that.vScrollbarWrapper.style.opacity = '0';
-			}
-
-			return;
-		}
-
-		that.scrollTo(resetX, resetY, time || 0);
-	},
-
-	_wheel: function (e) {
-		var that = this,
-			wheelDeltaX, wheelDeltaY,
-			deltaX, deltaY,
-			deltaScale;
-
-		if ('wheelDeltaX' in e) {
-			wheelDeltaX = e.wheelDeltaX / 12;
-			wheelDeltaY = e.wheelDeltaY / 12;
-		} else if('wheelDelta' in e) {
-			wheelDeltaX = wheelDeltaY = e.wheelDelta / 12;
-		} else if ('detail' in e) {
-			wheelDeltaX = wheelDeltaY = -e.detail * 3;
-		} else {
-			return;
-		}
-		
-		if (that.options.wheelAction == 'zoom') {
-			deltaScale = that.scale * Math.pow(2, 1/3 * (wheelDeltaY ? wheelDeltaY / Math.abs(wheelDeltaY) : 0));
-			if (deltaScale < that.options.zoomMin) deltaScale = that.options.zoomMin;
-			if (deltaScale > that.options.zoomMax) deltaScale = that.options.zoomMax;
-			
-			if (deltaScale != that.scale) {
-				if (!that.wheelZoomCount && that.options.onZoomStart) that.options.onZoomStart.call(that, e);
-				that.wheelZoomCount++;
-				
-				that.zoom(e.pageX, e.pageY, deltaScale, 400);
-				
-				setTimeout(function() {
-					that.wheelZoomCount--;
-					if (!that.wheelZoomCount && that.options.onZoomEnd) that.options.onZoomEnd.call(that, e);
-				}, 400);
-			}
-			
-			return;
-		}
-		
-		deltaX = that.x + wheelDeltaX;
-		deltaY = that.y + wheelDeltaY;
-
-		if (deltaX > 0) deltaX = 0;
-		else if (deltaX < that.maxScrollX) deltaX = that.maxScrollX;
-
-		if (deltaY > that.minScrollY) deltaY = that.minScrollY;
-		else if (deltaY < that.maxScrollY) deltaY = that.maxScrollY;
-    
-		if (that.maxScrollY < 0) {
-			that.scrollTo(deltaX, deltaY, 0);
-		}
-	},
-	
-	_transitionEnd: function (e) {
-		var that = this;
-
-		if (e.target != that.scroller) return;
-
-		that._unbind(TRNEND_EV);
-		
-		that._startAni();
-	},
-
-
-	/**
-	*
-	* Utilities
-	*
-	*/
-	_startAni: function () {
-		var that = this,
-			startX = that.x, startY = that.y,
-			startTime = Date.now(),
-			step, easeOut,
-			animate;
-
-		if (that.animating) return;
-		
-		if (!that.steps.length) {
-			that._resetPos(400);
-			return;
-		}
-		
-		step = that.steps.shift();
-		
-		if (step.x == startX && step.y == startY) step.time = 0;
-
-		that.animating = true;
-		that.moved = true;
-		
-		if (that.options.useTransition) {
-			that._transitionTime(step.time);
-			that._pos(step.x, step.y);
-			that.animating = false;
-			if (step.time) that._bind(TRNEND_EV);
-			else that._resetPos(0);
-			return;
-		}
-
-		animate = function () {
-			var now = Date.now(),
-				newX, newY;
-
-			if (now >= startTime + step.time) {
-				that._pos(step.x, step.y);
-				that.animating = false;
-				if (that.options.onAnimationEnd) that.options.onAnimationEnd.call(that);			// Execute custom code on animation end
-				that._startAni();
-				return;
-			}
-
-			now = (now - startTime) / step.time - 1;
-			easeOut = m.sqrt(1 - now * now);
-			newX = (step.x - startX) * easeOut + startX;
-			newY = (step.y - startY) * easeOut + startY;
-			that._pos(newX, newY);
-			if (that.animating) that.aniTime = nextFrame(animate);
-		};
-
-		animate();
-	},
-
-	_transitionTime: function (time) {
-		time += 'ms';
-		this.scroller.style[transitionDuration] = time;
-		if (this.hScrollbar) this.hScrollbarIndicator.style[transitionDuration] = time;
-		if (this.vScrollbar) this.vScrollbarIndicator.style[transitionDuration] = time;
-	},
-
-	_momentum: function (dist, time, maxDistUpper, maxDistLower, size) {
-		var deceleration = 0.0006,
-			speed = m.abs(dist) / time,
-			newDist = (speed * speed) / (2 * deceleration),
-			newTime = 0, outsideDist = 0;
-
-		// Proportinally reduce speed if we are outside of the boundaries
-		if (dist > 0 && newDist > maxDistUpper) {
-			outsideDist = size / (6 / (newDist / speed * deceleration));
-			maxDistUpper = maxDistUpper + outsideDist;
-			speed = speed * maxDistUpper / newDist;
-			newDist = maxDistUpper;
-		} else if (dist < 0 && newDist > maxDistLower) {
-			outsideDist = size / (6 / (newDist / speed * deceleration));
-			maxDistLower = maxDistLower + outsideDist;
-			speed = speed * maxDistLower / newDist;
-			newDist = maxDistLower;
-		}
-
-		newDist = newDist * (dist < 0 ? -1 : 1);
-		newTime = speed / deceleration;
-
-		return { dist: newDist, time: m.round(newTime) };
-	},
-
-	_offset: function (el) {
-		var left = -el.offsetLeft,
-			top = -el.offsetTop;
-			
-		while (el = el.offsetParent) {
-			left -= el.offsetLeft;
-			top -= el.offsetTop;
-		}
-		
-		if (el != this.wrapper) {
-			left *= this.scale;
-			top *= this.scale;
-		}
-
-		return { left: left, top: top };
-	},
-
-	_snap: function (x, y) {
-		var that = this,
-			i, l,
-			page, time,
-			sizeX, sizeY;
-
-		// Check page X
-		page = that.pagesX.length - 1;
-		for (i=0, l=that.pagesX.length; i<l; i++) {
-			if (x >= that.pagesX[i]) {
-				page = i;
-				break;
-			}
-		}
-		if (page == that.currPageX && page > 0 && that.dirX < 0) page--;
-		x = that.pagesX[page];
-		sizeX = m.abs(x - that.pagesX[that.currPageX]);
-		sizeX = sizeX ? m.abs(that.x - x) / sizeX * 500 : 0;
-		that.currPageX = page;
-
-		// Check page Y
-		page = that.pagesY.length-1;
-		for (i=0; i<page; i++) {
-			if (y >= that.pagesY[i]) {
-				page = i;
-				break;
-			}
-		}
-		if (page == that.currPageY && page > 0 && that.dirY < 0) page--;
-		y = that.pagesY[page];
-		sizeY = m.abs(y - that.pagesY[that.currPageY]);
-		sizeY = sizeY ? m.abs(that.y - y) / sizeY * 500 : 0;
-		that.currPageY = page;
-
-		// Snap with constant speed (proportional duration)
-		time = m.round(m.max(sizeX, sizeY)) || 200;
-
-		return { x: x, y: y, time: time };
-	},
-
-	_bind: function (type, el, bubble) {
-		(el || this.scroller).addEventListener(type, this, !!bubble);
-	},
-
-	_unbind: function (type, el, bubble) {
-		(el || this.scroller).removeEventListener(type, this, !!bubble);
-	},
-
-
-	/**
-	*
-	* Public methods
-	*
-	*/
-	destroy: function () {
-		var that = this;
-
-		that.scroller.style[transform] = '';
-
-		// Remove the scrollbars
-		that.hScrollbar = false;
-		that.vScrollbar = false;
-		that._scrollbar('h');
-		that._scrollbar('v');
-
-		// Remove the event listeners
-		that._unbind(RESIZE_EV, window);
-		that._unbind(START_EV);
-		that._unbind(MOVE_EV, window);
-		that._unbind(END_EV, window);
-		that._unbind(CANCEL_EV, window);
-		
-		if (!that.options.hasTouch) {
-			that._unbind('DOMMouseScroll');
-			that._unbind('mousewheel');
-		}
-		
-		if (that.options.useTransition) that._unbind(TRNEND_EV);
-		
-		if (that.options.checkDOMChanges) clearInterval(that.checkDOMTime);
-		
-		if (that.options.onDestroy) that.options.onDestroy.call(that);
-	},
-
-	refresh: function () {
-		var that = this,
-			offset,
-			i, l,
-			els,
-			pos = 0,
-			page = 0;
-
-		if (that.scale < that.options.zoomMin) that.scale = that.options.zoomMin;
-		that.wrapperW = that.wrapper.clientWidth || 1;
-		that.wrapperH = that.wrapper.clientHeight || 1;
-
-		that.minScrollY = -that.options.topOffset || 0;
-		that.scrollerW = m.round(that.scroller.offsetWidth * that.scale);
-		that.scrollerH = m.round((that.scroller.offsetHeight + that.minScrollY) * that.scale);
-		that.maxScrollX = that.wrapperW - that.scrollerW;
-		that.maxScrollY = that.wrapperH - that.scrollerH + that.minScrollY;
-		that.dirX = 0;
-		that.dirY = 0;
-
-		if (that.options.onRefresh) that.options.onRefresh.call(that);
-
-		that.hScroll = that.options.hScroll && that.maxScrollX < 0;
-		that.vScroll = that.options.vScroll && (!that.options.bounceLock && !that.hScroll || that.scrollerH > that.wrapperH);
-
-		that.hScrollbar = that.hScroll && that.options.hScrollbar;
-		that.vScrollbar = that.vScroll && that.options.vScrollbar && that.scrollerH > that.wrapperH;
-
-		offset = that._offset(that.wrapper);
-		that.wrapperOffsetLeft = -offset.left;
-		that.wrapperOffsetTop = -offset.top;
-
-		// Prepare snap
-		if (typeof that.options.snap == 'string') {
-			that.pagesX = [];
-			that.pagesY = [];
-			els = that.scroller.querySelectorAll(that.options.snap);
-			for (i=0, l=els.length; i<l; i++) {
-				pos = that._offset(els[i]);
-				pos.left += that.wrapperOffsetLeft;
-				pos.top += that.wrapperOffsetTop;
-				that.pagesX[i] = pos.left < that.maxScrollX ? that.maxScrollX : pos.left * that.scale;
-				that.pagesY[i] = pos.top < that.maxScrollY ? that.maxScrollY : pos.top * that.scale;
-			}
-		} else if (that.options.snap) {
-			that.pagesX = [];
-			while (pos >= that.maxScrollX) {
-				that.pagesX[page] = pos;
-				pos = pos - that.wrapperW;
-				page++;
-			}
-			if (that.maxScrollX%that.wrapperW) that.pagesX[that.pagesX.length] = that.maxScrollX - that.pagesX[that.pagesX.length-1] + that.pagesX[that.pagesX.length-1];
-
-			pos = 0;
-			page = 0;
-			that.pagesY = [];
-			while (pos >= that.maxScrollY) {
-				that.pagesY[page] = pos;
-				pos = pos - that.wrapperH;
-				page++;
-			}
-			if (that.maxScrollY%that.wrapperH) that.pagesY[that.pagesY.length] = that.maxScrollY - that.pagesY[that.pagesY.length-1] + that.pagesY[that.pagesY.length-1];
-		}
-
-		// Prepare the scrollbars
-		that._scrollbar('h');
-		that._scrollbar('v');
-
-		if (!that.zoomed) {
-			that.scroller.style[transitionDuration] = '0';
-			that._resetPos(400);
-		}
-	},
-
-	scrollTo: function (x, y, time, relative) {
-		var that = this,
-			step = x,
-			i, l;
-
-		that.stop();
-
-		if (!step.length) step = [{ x: x, y: y, time: time, relative: relative }];
-		
-		for (i=0, l=step.length; i<l; i++) {
-			if (step[i].relative) { step[i].x = that.x - step[i].x; step[i].y = that.y - step[i].y; }
-			that.steps.push({ x: step[i].x, y: step[i].y, time: step[i].time || 0 });
-		}
-
-		that._startAni();
-	},
-
-	scrollToElement: function (el, time) {
-		var that = this, pos;
-		el = el.nodeType ? el : that.scroller.querySelector(el);
-		if (!el) return;
-
-		pos = that._offset(el);
-		pos.left += that.wrapperOffsetLeft;
-		pos.top += that.wrapperOffsetTop;
-
-		pos.left = pos.left > 0 ? 0 : pos.left < that.maxScrollX ? that.maxScrollX : pos.left;
-		pos.top = pos.top > that.minScrollY ? that.minScrollY : pos.top < that.maxScrollY ? that.maxScrollY : pos.top;
-		time = time === undefined ? m.max(m.abs(pos.left)*2, m.abs(pos.top)*2) : time;
-
-		that.scrollTo(pos.left, pos.top, time);
-	},
-
-	scrollToPage: function (pageX, pageY, time) {
-		var that = this, x, y;
-		
-		time = time === undefined ? 400 : time;
-
-		if (that.options.onScrollStart) that.options.onScrollStart.call(that);
-
-		if (that.options.snap) {
-			pageX = pageX == 'next' ? that.currPageX+1 : pageX == 'prev' ? that.currPageX-1 : pageX;
-			pageY = pageY == 'next' ? that.currPageY+1 : pageY == 'prev' ? that.currPageY-1 : pageY;
-
-			pageX = pageX < 0 ? 0 : pageX > that.pagesX.length-1 ? that.pagesX.length-1 : pageX;
-			pageY = pageY < 0 ? 0 : pageY > that.pagesY.length-1 ? that.pagesY.length-1 : pageY;
-
-			that.currPageX = pageX;
-			that.currPageY = pageY;
-			x = that.pagesX[pageX];
-			y = that.pagesY[pageY];
-		} else {
-			x = -that.wrapperW * pageX;
-			y = -that.wrapperH * pageY;
-			if (x < that.maxScrollX) x = that.maxScrollX;
-			if (y < that.maxScrollY) y = that.maxScrollY;
-		}
-
-		that.scrollTo(x, y, time);
-	},
-
-	disable: function () {
-		this.stop();
-		this._resetPos(0);
-		this.enabled = false;
-
-		// If disabled after touchstart we make sure that there are no left over events
-		this._unbind(MOVE_EV, window);
-		this._unbind(END_EV, window);
-		this._unbind(CANCEL_EV, window);
-	},
-	
-	enable: function () {
-		this.enabled = true;
-	},
-	
-	stop: function () {
-		if (this.options.useTransition) this._unbind(TRNEND_EV);
-		else cancelFrame(this.aniTime);
-		this.steps = [];
-		this.moved = false;
-		this.animating = false;
-	},
-	
-	zoom: function (x, y, scale, time) {
-		var that = this,
-			relScale = scale / that.scale;
-
-		if (!that.options.useTransform) return;
-
-		that.zoomed = true;
-		time = time === undefined ? 200 : time;
-		x = x - that.wrapperOffsetLeft - that.x;
-		y = y - that.wrapperOffsetTop - that.y;
-		that.x = x - x * relScale + that.x;
-		that.y = y - y * relScale + that.y;
-
-		that.scale = scale;
-		that.refresh();
-
-		that.x = that.x > 0 ? 0 : that.x < that.maxScrollX ? that.maxScrollX : that.x;
-		that.y = that.y > that.minScrollY ? that.minScrollY : that.y < that.maxScrollY ? that.maxScrollY : that.y;
-
-		that.scroller.style[transitionDuration] = time + 'ms';
-		that.scroller.style[transform] = 'translate(' + that.x + 'px,' + that.y + 'px) scale(' + scale + ')' + translateZ;
-		that.zoomed = false;
-	},
-	
-	isReady: function () {
-		return !this.moved && !this.zoomed && !this.animating;
-	}
-};
-
-function prefixStyle (style) {
-	if ( vendor === '' ) return style;
-
-	style = style.charAt(0).toUpperCase() + style.substr(1);
-	return vendor + style;
-}
-
-dummyStyle = null;	// for the sake of it
-
-if (typeof exports !== 'undefined') exports.iScroll = iScroll;
-else window.iScroll = iScroll;
-
-})(window, document);

+ 0 - 120
sites/all/themes/gui/inigui/js/libs/jquery.jscrollpane.css

@@ -1,120 +0,0 @@
-/*
- * CSS Styles that are needed by jScrollPane for it to operate correctly.
- *
- * Include this stylesheet in your site or copy and paste the styles below into your stylesheet - jScrollPane
- * may not operate correctly without them.
- */
-
-.jspContainer
-{
-	overflow: hidden;
-	position: relative;
-}
-
-.jspPane
-{
-	position: absolute;
-}
-
-.jspVerticalBar
-{
-	position: absolute;
-	top: 0;
-	right: 0;
-	width: 16px;
-	height: 100%;
-	background: red;
-}
-
-.jspHorizontalBar
-{
-	position: absolute;
-	bottom: 0;
-	left: 0;
-	width: 100%;
-	height: 16px;
-	background: red;
-}
-
-.jspVerticalBar *,
-.jspHorizontalBar *
-{
-	margin: 0;
-	padding: 0;
-}
-
-.jspCap
-{
-	display: none;
-}
-
-.jspHorizontalBar .jspCap
-{
-	float: left;
-}
-
-.jspTrack
-{
-	background: #dde;
-	position: relative;
-}
-
-.jspDrag
-{
-	background: #bbd;
-	position: relative;
-	top: 0;
-	left: 0;
-	cursor: pointer;
-}
-
-.jspHorizontalBar .jspTrack,
-.jspHorizontalBar .jspDrag
-{
-	float: left;
-	height: 100%;
-}
-
-.jspArrow
-{
-	background: #50506d;
-	text-indent: -20000px;
-	display: block;
-	cursor: pointer;
-}
-
-.jspArrow.jspDisabled
-{
-	cursor: default;
-	background: #80808d;
-}
-
-.jspVerticalBar .jspArrow
-{
-	height: 16px;
-}
-
-.jspHorizontalBar .jspArrow
-{
-	width: 16px;
-	float: left;
-	height: 100%;
-}
-
-.jspVerticalBar .jspArrow:focus
-{
-	outline: none;
-}
-
-.jspCorner
-{
-	background: #eeeef4;
-	float: left;
-	height: 100%;
-}
-
-/* Yuk! CSS Hack for IE6 3 pixel bug :( */
-* html .jspCorner
-{
-	margin: 0 -3px 0 0;
-}

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 7
sites/all/themes/gui/inigui/js/libs/jquery.jscrollpane.min.js


+ 0 - 84
sites/all/themes/gui/inigui/js/libs/jquery.mousewheel.js

@@ -1,84 +0,0 @@
-/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
- * Licensed under the MIT License (LICENSE.txt).
- *
- * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
- * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
- * Thanks to: Seamus Leahy for adding deltaX and deltaY
- *
- * Version: 3.0.6
- * 
- * Requires: 1.2.2+
- */
-
-(function($) {
-
-var types = ['DOMMouseScroll', 'mousewheel'];
-
-if ($.event.fixHooks) {
-    for ( var i=types.length; i; ) {
-        $.event.fixHooks[ types[--i] ] = $.event.mouseHooks;
-    }
-}
-
-$.event.special.mousewheel = {
-    setup: function() {
-        if ( this.addEventListener ) {
-            for ( var i=types.length; i; ) {
-                this.addEventListener( types[--i], handler, false );
-            }
-        } else {
-            this.onmousewheel = handler;
-        }
-    },
-    
-    teardown: function() {
-        if ( this.removeEventListener ) {
-            for ( var i=types.length; i; ) {
-                this.removeEventListener( types[--i], handler, false );
-            }
-        } else {
-            this.onmousewheel = null;
-        }
-    }
-};
-
-$.fn.extend({
-    mousewheel: function(fn) {
-        return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
-    },
-    
-    unmousewheel: function(fn) {
-        return this.unbind("mousewheel", fn);
-    }
-});
-
-
-function handler(event) {
-    var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
-    event = $.event.fix(orgEvent);
-    event.type = "mousewheel";
-    
-    // Old school scrollwheel delta
-    if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta/120; }
-    if ( orgEvent.detail     ) { delta = -orgEvent.detail/3; }
-    
-    // New school multidimensional scroll (touchpads) deltas
-    deltaY = delta;
-    
-    // Gecko
-    if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
-        deltaY = 0;
-        deltaX = -1*delta;
-    }
-    
-    // Webkit
-    if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; }
-    if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; }
-    
-    // Add event and delta to the front of the arguments
-    args.unshift(event, delta, deltaX, deltaY);
-    
-    return ($.event.dispatch || $.event.handle).apply(this, args);
-}
-
-})(jQuery);

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 1
sites/all/themes/gui/inigui/js/libs/modernizr-2.6.1.min.js


+ 0 - 76
sites/all/themes/gui/inigui/js/libs/mwheelIntent.js

@@ -1,76 +0,0 @@
-/**
- * @author trixta
- * @version 1.2
- */
-(function($){
-
-var mwheelI = {
-			pos: [-260, -260]
-		},
-	minDif 	= 3,
-	doc 	= document,
-	root 	= doc.documentElement,
-	body 	= doc.body,
-	longDelay, shortDelay
-;
-
-function unsetPos(){
-	if(this === mwheelI.elem){
-		mwheelI.pos = [-260, -260];
-		mwheelI.elem = false;
-		minDif = 3;
-	}
-}
-
-$.event.special.mwheelIntent = {
-	setup: function(){
-		var jElm = $(this).bind('mousewheel', $.event.special.mwheelIntent.handler);
-		if( this !== doc && this !== root && this !== body ){
-			jElm.bind('mouseleave', unsetPos);
-		}
-		jElm = null;
-        return true;
-    },
-	teardown: function(){
-        $(this)
-			.unbind('mousewheel', $.event.special.mwheelIntent.handler)
-			.unbind('mouseleave', unsetPos)
-		;
-        return true;
-    },
-    handler: function(e, d){
-		var pos = [e.clientX, e.clientY];
-		if( this === mwheelI.elem || Math.abs(mwheelI.pos[0] - pos[0]) > minDif || Math.abs(mwheelI.pos[1] - pos[1]) > minDif ){
-            mwheelI.elem = this;
-			mwheelI.pos = pos;
-			minDif = 250;
-			
-			clearTimeout(shortDelay);
-			shortDelay = setTimeout(function(){
-				minDif = 10;
-			}, 200);
-			clearTimeout(longDelay);
-			longDelay = setTimeout(function(){
-				minDif = 3;
-			}, 1500);
-			e = $.extend({}, e, {type: 'mwheelIntent'});
-            return $.event.handle.apply(this, arguments);
-		}
-    }
-};
-$.fn.extend({
-	mwheelIntent: function(fn) {
-		return fn ? this.bind("mwheelIntent", fn) : this.trigger("mwheelIntent");
-	},
-	
-	unmwheelIntent: function(fn) {
-		return this.unbind("mwheelIntent", fn);
-	}
-});
-
-$(function(){
-	body = doc.body;
-	//assume that document is always scrollable, doesn't hurt if not
-	$(doc).bind('mwheelIntent.mwheelIntentDefault', $.noop);
-});
-})(jQuery);

+ 0 - 254
sites/all/themes/gui/inigui/less/styles.less

@@ -1,254 +0,0 @@
-/** 
- * Primary Drupal Styles
- * Author: g-u-i.net
- */
-
-@import "gui.less";
-
-
-body{font-size:16px; font-family: Arial, "MS Trebuchet", sans-serif;}
-
-
-a{color: #007BC2; text-decoration: none;}
-
-
-h1{font-size:1.6em;}
-h2{font-size:1.5em;}
-h3{font-size:1.4em;}
-h4{font-size:1.3em;}
-h5{font-size:1.2em;}
-h6{font-size:1.1em;}
-
-input{font-family: Arial, "MS Trebuchet", sans-serif; font-size:0.8em;}
-
-
-
-/** layout */
-#center, #sidebar-first, #sidebar-second, .footer-block .region, .header-block{ display:inline-block; vertical-align: top;}
-
-body.two-sidebars #center { width: 54%; }
-body.sidebar-first #center { width: 73%; }
-body.sidebar-second #center { width: 80%; }
-body.no-sidebars #center { width: 100%; }
-
-#sidebar-first { width: 24%; }
-#sidebar-second { width: 18%; }
-
-#header, #main, #footer{ padding:1em; }
-
-body{background-color: #DFDFDF;}
-
-#container{width:1024px; margin:0 auto; background-color: #FFF;}
-
-#header, #footer{background-color: #535353; color:#fff;}
-
-.block, .panel-pane{
-	border: 1px solid #D1D1D1;  padding:0.5em; margin:0.5em;
-	-moz-border-radius: 5px;
-	-webkit-border-radius: 5px;
-	border-radius: 5px;
-	background-color: #EAEAEA;
-}
-
-.footer-block .block{
-	background-color: #353535; border: 1px solid #1a1a1a;
-}
-#footer-bottom{ text-align: center;}
-#footer-bottom .block{ background-color: transparent; border: 0 solid #999; font-size:0.7em;}
-
-#content{padding:1em;}
-
-.logo h1, h1.page-title{font-size:2em;}
-
-#header ul.menu li, 
-#content-top ul.menu li, 
-#content-bottom ul.menu li, 
-#footer ul.menu li{display:inline-block; vertical-align:top; }
-
-.views-row{margin-bottom:1em;}
-
-.views-field-title{font-size:1.1em; font-weight:bold;}
-.views-field-title a{color: #444444; text-decoration:none;}
-
-li, .item-list ul li{list-style: none inside url(); margin-left:0;}
-
-/** Messages. */
-
-div.messages {
-  padding: 9px;
-  margin: 0.5em 0 0;
-  color: #036;
-  background: #bdf;
-  border: 1px solid #ace;
-	-moz-border-radius: 5px;
-		-webkit-border-radius: 5px;
-		border-radius: 5px;
-		
-}
-
-div.warning {
-  color: #840;
-  background: #fe6;
-  border-color: #ed5;
-}
-
-div.error {
-  color: #fff;
-  background: #e63;
-  border-color: #d52;
-}
-
-div.error p.error {
-  color: #333;
-}
-
-div.status {
-  color: #360;
-  background: #cf8;
-  border-color: #be7;
-}
-
-
-
-/** Tab navigation */
-
-ul.primary, .views-admin-links ul {
-	font:13px/1.231 sans-serif; *font-size:small;	
-  border-collapse: collapse;
-  padding: 0 0 0 1em; /* LTR */
-  white-space: nowrap;
-  list-style: none;
-  margin: 5px;
-  height: auto;
-  line-height: normal;
-  border-bottom: 1px solid #bbb;
-}
-ul.primary li, .views-admin-links li{
-  display: inline;
-		
-}
-ul.primary li a, .views-admin-links li a {
-  background-color: #ddd;
-  border-color: #bbb;
-  border-width: 1px;
-  border-style: solid solid none solid;
-  height: auto;
-  margin-right: 0.5em; /* LTR */
-  padding: 0 1em;
-  text-decoration: none;
-	-moz-border-radius-topleft: 5px;
-		-webkit-border-top-left-radius: 5px;
-		border-top-left-radius: 5px;
-	-moz-border-radius-topright: 5px;
-		-webkit-border-top-right-radius: 5px;
-		border-top-right-radius: 5px;
-}
-ul.primary li.active a {
-  background-color: #fff;
-  border: 1px solid #bbb;
-  border-bottom: #fff 1px solid;
-}
-ul.primary li a:hover, .views-admin-links li a:hover{
-  background-color: #eee;
-  border-color: #ccc;
-  border-bottom-color: #eee;
-}
-
-ul.secondary {
-  border-bottom: 1px solid #bbb;
-  padding: 0.5em 1em;
-  margin: 5px;
-}
-ul.secondary li {
-  display: inline;
-  padding: 0 1em;
-  border-right: 1px solid #ccc; /* LTR */
-}
-ul.secondary a {
-  padding: 0;
-  text-decoration: none;
-}
-ul.secondary a.active {
-  border-bottom: 4px solid #999;
-}
-
-
-/** Form */
-
-#node-form .form-region-main{border-right: 1px solid #BFBFBF; padding-right:10px; width:68%;}
-#node-form .form-region-main label{float:left; min-width:25%;}
-#node-form .form-region-main input.form-text{width:40%;}
-
-#node-form .form-region-right{padding-left:5px;}
-#node-form .form-region-right label{float:left; min-width:35%;}
-#node-form .form-region-right input.form-text{width:60%;}
-
-#node-form .form-region-main label.option, #node-form .form-region-right label.option{float: none;}
-
-
-form:not(	#views-ui-config-item-form ) .form-item {
-    position:relative;
-/*    padding:9px;*/
-    }
-
-	form:not(	#views-ui-config-item-form ) .form-item .description{
-	  position:absolute;
-	  bottom:140%;
-/*	  right:-15px;*/
-	  z-index:5;
-		left:50%;
-	  color:#1A1A1A;
-		line-height:1.1;
-	  background:url(../images/popup.png) 50% 100% no-repeat;
-	  width:240px;
-	  margin:0px 0px -15px;
-	  padding:9px 10px 20px;
-	  display:none;
-		border-top: 1px solid #9F9F9F;
-	  }
- form:not(	#views-ui-config-item-form )  .form-item:hover {
-    z-index:1;
-    height:auto; /* Fix for flicker in IE7 */
-    }
- form:not(	#views-ui-config-item-form )  .form-item:hover > .description { display:block; }
-
-
-fieldset{
-	border: 1px solid #D4D4D4;
-	padding:10px;
-	margin-bottom:1em;
-	-moz-border-radius: 5px;
-		-webkit-border-radius: 5px;
-		border-radius: 5px;
-}
-
-fieldset legend{
-	font-size:1.6em;
-}
-
-input.form-text{max-width:95%;}
-
-/** TABLE */
-
-table{width:100%; 
-	-moz-border-radius: 5px;
-	-webkit-border-radius: 5px;
-	border-radius: 5px;
-}
-table thead th{
-	background-color: #CCC;
-	padding:0.5em 1em;
-	text-align: left;
-}
-table tbody tr.even, table tbody tr.odd{
-	border-bottom: 0 solid #CCCCCC;
-	padding: 0.1em 0.6em;
-}
-table tbody tr.even{background-color: #EEE;}
-table tbody tr.odd{background-color: #E5E5E5;}
-
-table tbody td{
-	padding:0.5em 1em;
-	text-align: left;
-}
-td.active {background-color: transparent;}

BIN
sites/all/themes/gui/inigui/logo-lite-alpha.png


BIN
sites/all/themes/gui/inigui/logo-lite.png


BIN
sites/all/themes/gui/inigui/logo.png


+ 0 - 7
sites/all/themes/gui/inigui/preprocess/node.pre.php

@@ -1,7 +0,0 @@
-<?php 
-
-//dsm($vars);
-
-$vars['theme_hook_suggestions'][] = 'node__'.$vars['view_mode'];
-$vars['theme_hook_suggestions'][] = 'node__' . $vars['type'] . '__' . $vars['view_mode'];
-

BIN
sites/all/themes/gui/inigui/screenshot.png


+ 0 - 175
sites/all/themes/gui/inigui/templates/page.tpl.php

@@ -1,175 +0,0 @@
-<?php
-
-/**
- * @file
- * Default theme implementation to display a single Drupal page.
- *
- * Available variables:
- *
- * General utility variables:
- * - $base_path: The base URL path of the Drupal installation. At the very
- *   least, this will always default to /.
- * - $directory: The directory the template is located in, e.g. modules/system
- *   or themes/bartik.
- * - $is_front: TRUE if the current page is the front page.
- * - $logged_in: TRUE if the user is registered and signed in.
- * - $is_admin: TRUE if the user has permission to access administration pages.
- *
- * Site identity:
- * - $front_page: The URL of the front page. Use this instead of $base_path,
- *   when linking to the front page. This includes the language domain or
- *   prefix.
- * - $logo: The path to the logo image, as defined in theme configuration.
- * - $site_name: The name of the site, empty when display has been disabled
- *   in theme settings.
- * - $site_slogan: The slogan of the site, empty when display has been disabled
- *   in theme settings.
- *
- * Navigation:
- * - $main_menu (array): An array containing the Main menu links for the
- *   site, if they have been configured.
- * - $secondary_menu (array): An array containing the Secondary menu links for
- *   the site, if they have been configured.
- * - $breadcrumb: The breadcrumb trail for the current page.
- *
- * Page content (in order of occurrence in the default page.tpl.php):
- * - $title_prefix (array): An array containing additional output populated by
- *   modules, intended to be displayed in front of the main title tag that
- *   appears in the template.
- * - $title: The page title, for use in the actual HTML content.
- * - $title_suffix (array): An array containing additional output populated by
- *   modules, intended to be displayed after the main title tag that appears in
- *   the template.
- * - $messages: HTML for status and error messages. Should be displayed
- *   prominently.
- * - $tabs (array): Tabs linking to any sub-pages beneath the current page
- *   (e.g., the view and edit tabs when displaying a node).
- * - $action_links (array): Actions local to the page, such as 'Add menu' on the
- *   menu administration interface.
- * - $feed_icons: A string of all feed icons for the current page.
- * - $node: The node object, if there is an automatically-loaded node
- *   associated with the page, and the node ID is the second argument
- *   in the page's path (e.g. node/12345 and node/12345/revisions, but not
- *   comment/reply/12345).
- *
- * Regions:
- * - $page['help']: Dynamic help text, mostly for admin pages.
- * - $page['highlighted']: Items for the highlighted content region.
- * - $page['content']: The main content of the current page.
- * - $page['sidebar_first']: Items for the first sidebar.
- * - $page['sidebar_second']: Items for the second sidebar.
- * - $page['header']: Items for the header region.
- * - $page['footer']: Items for the footer region.
- *
- * @see template_preprocess()
- * @see template_preprocess_page()
- * @see template_process()
- */
-?>
-<header id="header">
-  <hgroup class="logo">
-  <?php
-	if ($site_title) {
-  	print $site_title;
-	}
-  ?>
-  </hgroup>		
-
-	<?php if ($page['headerblock_left'] || $page['headerblock_middle'] || $page['headerblock_right']): ?>
-		<div id="header-blocks">
-			<?php print render($page['headerblock_left']); ?>
-			<?php print render($page['headerblock_middle']); ?>
-			<?php print render($page['headerblock_right']); ?>
-    </div>
-	<?php endif; ?>
-	
-	<?php if ($breadcrumb): ?>
-    <section id="breadcrumb"><?php print $breadcrumb; ?></section>
-  <?php endif; ?>
-  
-	
-</header> 
-<!-- /header -->		 		
-
-
-
-<div id="main">
-      
-
-    <?php if ($method == 0 || $method == 2): ?>
-      <?php print render($page['sidebar_first']); ?>	       	
-    <?php endif; ?>	 					
-
-    <?php if ($method == 2): ?>
-      <?php print render($page['sidebar_second']) ?>
-    <?php endif; ?>
-
-		<?php if(isset($page['sidebar_first']) || isset($page['sidebar_second'])): ?>
-		<section id="center">	
-		<?php endif; ?>
-
-				<?php if ($primary_local_tasks || $secondary_local_tasks || $action_links): ?>
-          <div id="tasks">
-            <?php if ($primary_local_tasks): ?>
-              <ul class="tabs primary"><?php print render($primary_local_tasks); ?></ul>
-            <?php endif; ?>
-            <?php if ($secondary_local_tasks): ?>
-              <ul class="tabs secondary"><?php print render($secondary_local_tasks); ?></ul>
-            <?php endif; ?>
-            <?php if ($action_links = render($action_links)): ?>
-              <ul class="action-links"><?php print $action_links; ?></ul>
-            <?php endif; ?>
-          </div>
-        <?php endif; ?>
-
-				<?php if ($show_messages && $messages): print $messages; endif; ?>
-
-
-				<?php print render($page['help']); ?>
-
-				<?php print render($page['content_top']); ?>
-
-				<section id="content">
-					<?php if($title): ?><h1 class="page-title"><?php print $title ?></h1><?php endif; ?>
-					<?php print render($page['content']); ?>
-				</section>
-
-				<?php print render($page['content_bottom']); ?>
-				
-
-		<?php if(isset($page['sidebar_first']) || isset($page['sidebar_second'])): ?>
-		</section>
-		<?php endif; ?>
-		    <!-- /center -->					
-         
-         
-    <?php if ($method == 1): ?>
-      <?php print render($page['sidebar_first']); ?>
-    <?php endif; ?>	 					
-         
-    <?php if ($method == 0 || $method == 1): ?>
-      <?php print render($page['sidebar_second']) ?>
-    <?php endif; ?>
-          
-</div><!-- /main -->	
-    		 			
-		
-<footer id="footer">
-		
-		<?php print render($page['footer_top']); ?>
-
-		<?php if ($page['footer_left'] || $page['footer_middle_left'] || $page['footer_middle_right'] || $page['footer_right']): ?> 	        
-      <div class="footer-block">					
-				
-				<?php print render($page['footer_left']); ?>
-				<?php print render($page['footer_middle-left']); ?>
-				<?php print render($page['footer_midle-right']); ?>
-				<?php print render($page['footer_right']); ?>
-
-      </div>
-		<?php endif; ?>
-
-		<?php print render($page['footer_bottom']); ?> 		
-</footer> 
-<!-- /footer -->	
-

+ 0 - 35
sites/all/themes/gui/inigui/theme-settings.php

@@ -1,35 +0,0 @@
-<?php 
-
-function inigui_form_system_theme_settings_alter(&$form, $form_state) {
-
-  if (theme_get_setting('layout_enable_settings') == 'on') {
-    $form['inigui']['page_layout'] = array(
-      '#type' => 'fieldset',
-      '#title' => t('Page Layout'),
-      '#description' => t('Use these settings to set the width of the page, each sidebar, and to set the position of sidebars.'),
-    );
-
-    if (theme_get_setting('layout_enable_method') == 'on') {
-      $form['at']['page_layout']['select_method'] = array(
-        '#type' => 'fieldset',
-        '#title' => t('Sidebar Position'),
-        '#collapsible' => FALSE,
-        '#collapsed' => FALSE,
-      );
-      $form['at']['page_layout']['select_method']['layout_method'] = array(
-        '#type' => 'radios',
-        '#description' => t('The sidebar layout descriptions are for LTR (left to right languages), these will flip in RTL mode.'),
-        '#default_value' => theme_get_setting('layout_method'),
-        '#options' => array(
-          0 => t('<strong>Layout #1</strong> <span class="layout-type-0">Standard three column layout — Sidebar first | Content | Sidebar last</span>'),
-          1 => t('<strong>Layout #2</strong> <span class="layout-type-1">Two columns on the right — Content | Sidebar first | Sidebar last</span>'),
-          2 => t('<strong>Layout #3</strong> <span class="layout-type-2">Two columns on the left — Sidebar first | Sidebar last | Content</span>'),
-        ),
-      );
-      $form['at']['page_layout']['layout_enable_settings'] = array(
-        '#type' => 'hidden',
-        '#value' => theme_get_setting('layout_enable_settings'),
-      );
-    } // endif layout method
-  } // endif layout settings
-}

BIN
sites/all/themes/gui/jee/.sass-cache/06dcbe1fa5b03937e94c01bbbc1f20c6e165e878/communs.scssc


BIN
sites/all/themes/gui/jee/.sass-cache/06dcbe1fa5b03937e94c01bbbc1f20c6e165e878/fonts.scssc


BIN
sites/all/themes/gui/jee/.sass-cache/06dcbe1fa5b03937e94c01bbbc1f20c6e165e878/jee.scssc


BIN
sites/all/themes/gui/jee/.sass-cache/06dcbe1fa5b03937e94c01bbbc1f20c6e165e878/wysiwyg.scssc


BIN
sites/all/themes/gui/jee/.sass-cache/508c2942ecf20a20483dbe0feab6c07e47d871b4/_functions.scssc


BIN
sites/all/themes/gui/jee/.sass-cache/96a50d22516e601e4678845ba0cfa5f3ded6dc03/normalize.scssc


BIN
sites/all/themes/gui/jee/.sass-cache/da30a33d7b6e9d651fc40a4fed3055ba0eb36689/_block-grid.scssc


BIN
sites/all/themes/gui/jee/.sass-cache/da30a33d7b6e9d651fc40a4fed3055ba0eb36689/_clearing.scssc


BIN
sites/all/themes/gui/jee/.sass-cache/da30a33d7b6e9d651fc40a4fed3055ba0eb36689/_global.scssc


BIN
sites/all/themes/gui/jee/.sass-cache/da30a33d7b6e9d651fc40a4fed3055ba0eb36689/_grid.scssc


BIN
sites/all/themes/gui/jee/.sass-cache/da30a33d7b6e9d651fc40a4fed3055ba0eb36689/_type.scssc


+ 43 - 0
sites/all/themes/gui/jee/Gruntfile.js

@@ -0,0 +1,43 @@
+module.exports = function (grunt) {
+  grunt.initConfig({
+    watch: {
+      compass: {
+        files: ['css/jee.scss', 'css/wysiwyg.scss'],
+        tasks: ['compass:dev']
+      },
+      postcss: {
+        files: ['css/jee.scss', 'css/wysiwyg.scss'],
+        tasks: ['postcss']
+      },
+      //    options: {
+      //         livereload: true,
+      //     },
+    },
+    compass: {
+      dev: {
+        options: {
+          sassDir: 'css',
+          cssDir: 'css',
+          imagesPath: 'assets/img',
+          noLineComments: false,
+          outputStyle: 'compressed'
+        }
+      }
+    },
+    postcss: {
+      options: {
+        processors: [
+          require('autoprefixer-core')({browsers: 'last 3 version'}).postcss,
+        ]
+      },
+      dist: { src: 'css/*.css' }
+    },
+  });
+  grunt.loadNpmTasks('grunt-contrib-compass');
+  grunt.loadNpmTasks('grunt-contrib-sass');
+  grunt.loadNpmTasks('grunt-contrib-watch');
+  grunt.loadNpmTasks('grunt-postcss');
+
+
+  grunt.registerTask('default', ['compass', 'postcss']);
+};

BIN
sites/all/themes/gui/jee/apple-touch-icon-114x114-precomposed.png


BIN
sites/all/themes/gui/jee/apple-touch-icon-144x144-precomposed.png


BIN
sites/all/themes/gui/jee/apple-touch-icon-72x72-precomposed.png


BIN
sites/all/themes/gui/jee/apple-touch-icon-precomposed.png


Diferenças do arquivo suprimidas por serem muito extensas
+ 66 - 0
sites/all/themes/gui/jee/assets/img/logo-blured.svg


Diferenças do arquivo suprimidas por serem muito extensas
+ 2974 - 0
sites/all/themes/gui/jee/assets/img/logo.svg


+ 2989 - 0
sites/all/themes/gui/jee/assets/img/slogan.svg

@@ -0,0 +1,2989 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="535"
+   height="60"
+   viewBox="0 0 535.00001 60.000001"
+   id="svg48449"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   sodipodi:docname="slogan.svg">
+  <defs
+     id="defs48451">
+    <linearGradient
+       y2="-840.49237"
+       x2="-6147.0063"
+       y1="-924.50067"
+       x1="-6732.0649"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_393_">
+      <stop
+         id="stop10243"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10245"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10247"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10249"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10251"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-842.89648"
+       x2="-6146.6611"
+       y1="-926.90479"
+       x1="-6731.7197"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_394_">
+      <stop
+         id="stop10256"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10258"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10260"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10262"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10264"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-847.89917"
+       x2="-6145.9429"
+       y1="-931.90747"
+       x1="-6731.0015"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_395_">
+      <stop
+         id="stop10269"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10271"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10273"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10275"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10277"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-850.73407"
+       x2="-6145.5356"
+       y1="-934.74237"
+       x1="-6730.5942"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_396_">
+      <stop
+         id="stop10282"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10284"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10286"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10288"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10290"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-852.42212"
+       x2="-6145.293"
+       y1="-936.43042"
+       x1="-6730.3516"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_397_">
+      <stop
+         id="stop10295"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10297"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10299"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10301"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10303"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-854.85468"
+       x2="-6144.9438"
+       y1="-938.86298"
+       x1="-6730.0024"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_398_">
+      <stop
+         id="stop10308"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10310"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10312"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10314"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10316"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-857.98022"
+       x2="-6144.4951"
+       y1="-941.98853"
+       x1="-6729.5537"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_399_">
+      <stop
+         id="stop10321"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10323"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10325"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10327"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10329"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-860.60687"
+       x2="-6144.1182"
+       y1="-944.61517"
+       x1="-6729.1768"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_400_">
+      <stop
+         id="stop10334"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10336"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10338"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10340"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10342"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-863.29321"
+       x2="-6143.7324"
+       y1="-947.30151"
+       x1="-6728.791"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_401_">
+      <stop
+         id="stop10347"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10349"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10351"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10353"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10355"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-865.8623"
+       x2="-6143.3633"
+       y1="-949.87061"
+       x1="-6728.4219"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_402_">
+      <stop
+         id="stop10360"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10362"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10364"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10366"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10368"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-868.87451"
+       x2="-6142.9307"
+       y1="-952.88281"
+       x1="-6727.9893"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_403_">
+      <stop
+         id="stop10373"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10375"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10377"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10379"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10381"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-870.948"
+       x2="-6142.6333"
+       y1="-954.9563"
+       x1="-6727.6919"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_404_">
+      <stop
+         id="stop10386"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10388"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10390"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10392"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10394"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-873.82129"
+       x2="-6142.2207"
+       y1="-957.82959"
+       x1="-6727.2793"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_405_">
+      <stop
+         id="stop10399"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10401"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10403"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10405"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10407"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-875.34619"
+       x2="-6142.0015"
+       y1="-959.35449"
+       x1="-6727.0601"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_406_">
+      <stop
+         id="stop10412"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10414"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10416"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10418"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10420"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-877.86353"
+       x2="-6141.6401"
+       y1="-961.87183"
+       x1="-6726.6987"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_407_">
+      <stop
+         id="stop10425"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10427"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10429"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10431"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10433"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-879.4458"
+       x2="-6141.4131"
+       y1="-963.4541"
+       x1="-6726.4717"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_408_">
+      <stop
+         id="stop10438"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10440"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10442"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10444"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10446"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-882.68158"
+       x2="-6140.9482"
+       y1="-966.68988"
+       x1="-6726.0068"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_409_">
+      <stop
+         id="stop10451"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10453"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10455"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10457"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10459"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-792.44458"
+       x2="-6153.9053"
+       y1="-876.45288"
+       x1="-6738.9639"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_410_">
+      <stop
+         id="stop10464"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10466"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10468"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10470"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10472"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-795.1272"
+       x2="-6153.52"
+       y1="-879.1355"
+       x1="-6738.5786"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_411_">
+      <stop
+         id="stop10477"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10479"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10481"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10483"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10485"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-797.14581"
+       x2="-6153.2305"
+       y1="-881.15411"
+       x1="-6738.2891"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_412_">
+      <stop
+         id="stop10490"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10492"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10494"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10496"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10498"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-800.81421"
+       x2="-6152.7036"
+       y1="-884.82251"
+       x1="-6737.7622"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_413_">
+      <stop
+         id="stop10503"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10505"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10507"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10509"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10511"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-803.24103"
+       x2="-6152.355"
+       y1="-887.24933"
+       x1="-6737.4136"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_414_">
+      <stop
+         id="stop10516"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10518"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10520"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10522"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10524"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-807.14581"
+       x2="-6151.7944"
+       y1="-891.15411"
+       x1="-6736.853"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_415_">
+      <stop
+         id="stop10529"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10531"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10533"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10535"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10537"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-810.27081"
+       x2="-6151.3457"
+       y1="-894.27911"
+       x1="-6736.4043"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_416_">
+      <stop
+         id="stop10542"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10544"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10546"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10548"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10550"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-812.89789"
+       x2="-6150.9688"
+       y1="-896.90619"
+       x1="-6736.0273"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_417_">
+      <stop
+         id="stop10555"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10557"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10559"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10561"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10563"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-815.60638"
+       x2="-6150.5796"
+       y1="-899.61469"
+       x1="-6735.6382"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_418_">
+      <stop
+         id="stop10568"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10570"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10572"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10574"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10576"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-817.27148"
+       x2="-6150.3403"
+       y1="-901.27979"
+       x1="-6735.3989"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_419_">
+      <stop
+         id="stop10581"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10583"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10585"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10587"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10589"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-819.62842"
+       x2="-6150.002"
+       y1="-903.63672"
+       x1="-6735.0605"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_420_">
+      <stop
+         id="stop10594"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10596"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10598"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10600"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10602"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-821.59589"
+       x2="-6149.7197"
+       y1="-905.60419"
+       x1="-6734.7783"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_421_">
+      <stop
+         id="stop10607"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10609"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10611"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10613"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10615"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-824.44647"
+       x2="-6149.3101"
+       y1="-908.45477"
+       x1="-6734.3687"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_422_">
+      <stop
+         id="stop10620"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10622"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10624"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10626"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10628"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-827.66937"
+       x2="-6148.8477"
+       y1="-911.67767"
+       x1="-6733.9062"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_423_">
+      <stop
+         id="stop10633"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10635"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10637"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10639"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10641"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-830.12872"
+       x2="-6148.4941"
+       y1="-914.13702"
+       x1="-6733.5527"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_424_">
+      <stop
+         id="stop10646"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10648"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10650"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10652"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10654"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-832.75562"
+       x2="-6148.1172"
+       y1="-916.76392"
+       x1="-6733.1758"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_425_">
+      <stop
+         id="stop10659"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10661"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10663"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10665"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10667"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-834.56201"
+       x2="-6147.8579"
+       y1="-918.57031"
+       x1="-6732.9165"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_426_">
+      <stop
+         id="stop10672"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10674"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10676"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10678"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10680"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-836.00372"
+       x2="-6147.6509"
+       y1="-920.01202"
+       x1="-6732.7095"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_427_">
+      <stop
+         id="stop10685"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10687"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10689"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10691"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10693"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-838.52081"
+       x2="-6147.2891"
+       y1="-922.52911"
+       x1="-6732.3477"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_428_">
+      <stop
+         id="stop10698"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10700"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10702"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10704"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10706"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-841.69647"
+       x2="-6146.8335"
+       y1="-925.70477"
+       x1="-6731.8921"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_429_">
+      <stop
+         id="stop10711"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10713"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10715"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10717"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10719"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-844.50153"
+       x2="-6146.4307"
+       y1="-928.50983"
+       x1="-6731.4893"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_430_">
+      <stop
+         id="stop10724"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10726"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10728"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10730"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10732"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-847.84943"
+       x2="-6145.9497"
+       y1="-931.85773"
+       x1="-6731.0083"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_431_">
+      <stop
+         id="stop10737"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10739"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10741"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10743"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10745"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-850.57892"
+       x2="-6145.5581"
+       y1="-934.58722"
+       x1="-6730.6167"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_432_">
+      <stop
+         id="stop10750"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10752"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10754"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10756"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10758"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-858.5957"
+       x2="-6144.4067"
+       y1="-942.604"
+       x1="-6729.4653"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_433_">
+      <stop
+         id="stop10763"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10765"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10767"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10769"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10771"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-855.06641"
+       x2="-6144.9136"
+       y1="-939.07471"
+       x1="-6729.9722"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_434_">
+      <stop
+         id="stop10776"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10778"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10780"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10782"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10784"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-869.71259"
+       x2="-6142.8105"
+       y1="-953.72089"
+       x1="-6727.8691"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_435_">
+      <stop
+         id="stop10789"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10791"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10793"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10795"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10797"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-857.1394"
+       x2="-6144.6157"
+       y1="-941.14771"
+       x1="-6729.6743"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_436_">
+      <stop
+         id="stop10802"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10804"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10806"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10808"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10810"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-859.02881"
+       x2="-6144.3447"
+       y1="-943.03711"
+       x1="-6729.4033"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_437_">
+      <stop
+         id="stop10815"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10817"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10819"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10821"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10823"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-861.32501"
+       x2="-6144.0146"
+       y1="-945.33331"
+       x1="-6729.0732"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_438_">
+      <stop
+         id="stop10828"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10830"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10832"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10834"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10836"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-863.13062"
+       x2="-6143.7554"
+       y1="-947.13892"
+       x1="-6728.814"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_439_">
+      <stop
+         id="stop10841"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10843"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10845"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10847"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10849"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="-865.81268"
+       x2="-6143.3706"
+       y1="-949.82098"
+       x1="-6728.4292"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_440_">
+      <stop
+         id="stop10854"
+         style="stop-color:#7C146B"
+         offset="0" />
+      <stop
+         id="stop10856"
+         style="stop-color:#722D70"
+         offset="0.1339" />
+      <stop
+         id="stop10858"
+         style="stop-color:#52537E"
+         offset="0.4232" />
+      <stop
+         id="stop10860"
+         style="stop-color:#006F81"
+         offset="0.8425" />
+      <stop
+         id="stop10862"
+         style="stop-color:#00747D"
+         offset="1" />
+    </linearGradient>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1.979899"
+     inkscape:cx="279.02621"
+     inkscape:cy="7.3831688"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     units="px"
+     inkscape:window-width="1920"
+     inkscape:window-height="1155"
+     inkscape:window-x="-2"
+     inkscape:window-y="22"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata48454">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Calque 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-992.36216)">
+    <g
+       transform="translate(6762.8572,1917.5051)"
+       id="g10240">
+      <linearGradient
+         y2="-840.49237"
+         x2="-6147.0063"
+         y1="-924.50067"
+         x1="-6732.0649"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient47825">
+        <stop
+           id="stop47827"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop47829"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop47831"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop47833"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop47835"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10253"
+         d="m -6641.098,-908.24 0,-14.476 -4.648,0 0,14.476 c 0,1.288 -1.064,2.324 -2.352,2.324 -1.288,0 -2.324,-1.036 -2.324,-2.324 l 0,-14.476 -4.676,0 0,14.476 c 0,3.864 3.136,7 7,7 3.892,0 7,-3.136 7,-7 z"
+         style="fill:url(#SVGID_393_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-842.89648"
+         x2="-6146.6611"
+         y1="-926.90479"
+         x1="-6731.7197"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient47838">
+        <stop
+           id="stop47840"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop47842"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop47844"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop47846"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop47848"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <polygon
+         id="polygon10266"
+         points="-6636.421,-922.716 -6636.421,-901.716 -6631.746,-901.716 -6631.746,-913.784 -6627.07,-909.108 -6627.07,-901.716 -6622.422,-901.716 -6622.422,-922.716 -6627.07,-922.716 -6627.07,-915.716 -6634.07,-922.716 "
+         style="fill:url(#SVGID_394_)" />
+      <linearGradient
+         y2="-847.89917"
+         x2="-6145.9429"
+         y1="-931.90747"
+         x1="-6731.0015"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient47851">
+        <stop
+           id="stop47853"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop47855"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop47857"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop47859"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop47861"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <polygon
+         id="polygon10279"
+         points="-6603.746,-901.716 -6598.93,-901.716 -6597.67,-905.188 -6596.41,-901.716 -6591.622,-901.716 -6583.978,-922.716 -6588.934,-922.716 -6594.03,-908.296 -6597.67,-918.684 -6601.338,-908.296 -6606.434,-922.716 -6611.39,-922.716 "
+         style="fill:url(#SVGID_395_)" />
+      <linearGradient
+         y2="-850.73407"
+         x2="-6145.5356"
+         y1="-934.74237"
+         x1="-6730.5942"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient47864">
+        <stop
+           id="stop47866"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop47868"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop47870"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop47872"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop47874"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10292"
+         d="m -6576.334,-901.716 5.712,0 0,-4.676 -5.712,0 c -0.952,0 -1.764,-0.784 -1.764,-1.736 0,-0.952 0.812,-1.764 1.764,-1.764 l 5.712,0 0,-4.648 -5.712,0 c -0.952,0 -1.764,-0.812 -1.764,-1.764 0,-0.952 0.812,-1.736 1.764,-1.736 l 5.712,0 0,-4.676 -5.712,0 c -3.556,0 -6.412,2.884 -6.412,6.412 0,1.54 0.56,2.968 1.456,4.088 -0.896,1.12 -1.456,2.548 -1.456,4.088 0,3.556 2.856,6.412 6.412,6.412 z"
+         style="fill:url(#SVGID_396_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-852.42212"
+         x2="-6145.293"
+         y1="-936.43042"
+         x1="-6730.3516"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient47877">
+        <stop
+           id="stop47879"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop47881"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop47883"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop47885"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop47887"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10305"
+         d="m -6551.499,-908.128 c 0,-1.54 -0.56,-2.968 -1.484,-4.088 0.924,-1.12 1.484,-2.548 1.484,-4.088 0,-3.528 -2.884,-6.412 -6.412,-6.412 l -8.064,0 0,21 8.064,0 c 3.529,0 6.412,-2.856 6.412,-6.412 z m -6.411,1.736 -3.388,0 0,-3.5 3.388,0 c 0.952,0 1.736,0.812 1.736,1.764 0,0.952 -0.784,1.736 -1.736,1.736 z m 0,-8.148 -3.388,0 0,-3.5 3.388,0 c 0.952,0 1.736,0.784 1.736,1.736 0,0.952 -0.784,1.764 -1.736,1.764 z"
+         style="fill:url(#SVGID_397_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-854.85468"
+         x2="-6144.9438"
+         y1="-938.86298"
+         x1="-6730.0024"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient47890">
+        <stop
+           id="stop47892"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop47894"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop47896"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop47898"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop47900"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10318"
+         d="m -6542.146,-922.716 -5.152,0 0,21 5.152,0 c 5.152,0 9.324,-4.676 9.324,-10.5 0,-5.796 -4.173,-10.5 -9.324,-10.5 z m 0,16.324 -0.476,0 0,-11.648 0.476,0 c 2.548,0 4.648,2.604 4.648,5.824 0,3.22 -2.101,5.824 -4.648,5.824 z"
+         style="fill:url(#SVGID_398_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-857.98022"
+         x2="-6144.4951"
+         y1="-941.98853"
+         x1="-6729.5537"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient47903">
+        <stop
+           id="stop47905"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop47907"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop47909"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop47911"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop47913"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10331"
+         d="m -6522.211,-923.192 c -3.864,0 -7,3.136 -7,7 l 0,7.952 c 0,3.864 3.136,7 7,7 3.892,0 7,-3.136 7,-7 l 0,-7.952 c 0,-3.864 -3.108,-7 -7,-7 z m 2.352,14.952 c 0,1.288 -1.064,2.324 -2.352,2.324 -1.288,0 -2.324,-1.036 -2.324,-2.324 l 0,-7.952 c 0,-1.26 1.036,-2.324 2.324,-2.324 1.288,0 2.352,1.064 2.352,2.324 l 0,7.952 z"
+         style="fill:url(#SVGID_399_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-860.60687"
+         x2="-6144.1182"
+         y1="-944.61517"
+         x1="-6729.1768"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient47916">
+        <stop
+           id="stop47918"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop47920"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop47922"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop47924"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop47926"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10344"
+         d="m -6503.535,-901.24 c 3.22,0 5.936,-2.184 6.748,-5.152 l -5.348,0 c -0.392,0.308 -0.868,0.476 -1.4,0.476 -1.288,0 -2.324,-1.036 -2.324,-2.324 l 0,-7.952 c 0,-1.26 1.036,-2.324 2.324,-2.324 0.532,0 1.008,0.168 1.4,0.476 l 5.348,0 c -0.812,-2.968 -3.528,-5.152 -6.748,-5.152 -3.864,0 -7,3.136 -7,7 l 0,7.952 c 0,3.864 3.136,7 7,7 z"
+         style="fill:url(#SVGID_400_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-863.29321"
+         x2="-6143.7324"
+         y1="-947.30151"
+         x1="-6728.791"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient47929">
+        <stop
+           id="stop47931"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop47933"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop47935"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop47937"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop47939"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10357"
+         d="m -6483.683,-908.24 c 0,1.288 -1.064,2.324 -2.352,2.324 -1.288,0 -2.324,-1.036 -2.324,-2.324 l 0,-14.476 -4.676,0 0,14.476 c 0,3.864 3.136,7 7,7 3.892,0 7,-3.136 7,-7 l 0,-14.476 -4.648,0 0,14.476 z"
+         style="fill:url(#SVGID_401_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-865.8623"
+         x2="-6143.3633"
+         y1="-949.87061"
+         x1="-6728.4219"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient47942">
+        <stop
+           id="stop47944"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop47946"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop47948"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop47950"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop47952"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <polygon
+         id="polygon10370"
+         points="-6469.683,-911.572 -6466.183,-906.728 -6462.683,-911.572 -6462.683,-901.716 -6458.007,-901.716 -6458.007,-922.716 -6460.359,-922.716 -6466.183,-914.652 -6472.007,-922.716 -6474.359,-922.716 -6474.359,-901.716 -6469.683,-901.716 "
+         style="fill:url(#SVGID_402_)" />
+      <linearGradient
+         y2="-868.87451"
+         x2="-6142.9307"
+         y1="-952.88281"
+         x1="-6727.9893"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient47955">
+        <stop
+           id="stop47957"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop47959"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop47961"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop47963"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop47965"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10383"
+         d="m -6441.683,-901.716 0,-4.676 -5.712,0 c -0.952,0 -1.764,-0.784 -1.764,-1.736 0,-0.952 0.812,-1.764 1.764,-1.764 l 5.712,0 0,-4.648 -5.712,0 c -0.952,0 -1.764,-0.812 -1.764,-1.764 0,-0.952 0.812,-1.736 1.764,-1.736 l 5.712,0 0,-4.676 -5.712,0 c -3.556,0 -6.412,2.884 -6.412,6.412 0,1.54 0.56,2.968 1.456,4.088 -0.896,1.12 -1.456,2.548 -1.456,4.088 0,3.556 2.856,6.412 6.412,6.412 l 5.712,0 z"
+         style="fill:url(#SVGID_403_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-870.948"
+         x2="-6142.6333"
+         y1="-954.9563"
+         x1="-6727.6919"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient47968">
+        <stop
+           id="stop47970"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop47972"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop47974"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop47976"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop47978"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <polygon
+         id="polygon10396"
+         points="-6437.035,-922.716 -6437.035,-901.716 -6432.359,-901.716 -6432.359,-913.784 -6427.684,-909.108 -6427.684,-901.716 -6423.036,-901.716 -6423.036,-922.716 -6427.684,-922.716 -6427.684,-915.716 -6434.684,-922.716 "
+         style="fill:url(#SVGID_404_)" />
+      <linearGradient
+         y2="-873.82129"
+         x2="-6142.2207"
+         y1="-957.82959"
+         x1="-6727.2793"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient47981">
+        <stop
+           id="stop47983"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop47985"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop47987"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop47989"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop47991"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <polygon
+         id="polygon10409"
+         points="-6410.184,-918.04 -6404.36,-918.04 -6404.36,-922.716 -6420.684,-922.716 -6420.684,-918.04 -6414.859,-918.04 -6414.859,-901.716 -6410.184,-901.716 "
+         style="fill:url(#SVGID_405_)" />
+      <linearGradient
+         y2="-875.34619"
+         x2="-6142.0015"
+         y1="-959.35449"
+         x1="-6727.0601"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient47994">
+        <stop
+           id="stop47996"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop47998"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48000"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48002"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48004"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10422"
+         d="m -6392.544,-922.716 -4.816,0 -7.644,21 4.956,0 1.232,-3.5 7.7,0 1.232,3.5 4.956,0 -7.616,-21 z m -4.62,12.824 2.212,-6.244 2.212,6.244 -4.424,0 z"
+         style="fill:url(#SVGID_406_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-877.86353"
+         x2="-6141.6401"
+         y1="-961.87183"
+         x1="-6726.6987"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48007">
+        <stop
+           id="stop48009"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48011"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48013"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48015"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48017"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <rect
+         id="rect10435"
+         height="21"
+         width="4.6760001"
+         y="-922.716"
+         x="-6383.2202"
+         style="fill:url(#SVGID_407_)" />
+      <linearGradient
+         y2="-879.4458"
+         x2="-6141.4131"
+         y1="-963.4541"
+         x1="-6726.4717"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48020">
+        <stop
+           id="stop48022"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48024"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48026"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48028"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48030"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10448"
+         d="m -6359.42,-916.304 c 0,-3.528 -2.884,-6.412 -6.411,-6.412 l -8.064,0 0,21 4.676,0 0,-8.176 1.12,0 5.937,8.176 5.768,0 -6.469,-8.876 c 2.044,-1.092 3.443,-3.22 3.443,-5.712 z m -6.411,1.764 -3.389,0 0,-3.5 3.389,0 c 0.951,0 1.735,0.784 1.735,1.736 0,0.952 -0.784,1.764 -1.735,1.764 z"
+         style="fill:url(#SVGID_408_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-882.68158"
+         x2="-6140.9482"
+         y1="-966.68988"
+         x1="-6726.0068"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48033">
+        <stop
+           id="stop48035"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48037"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48039"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48041"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48043"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10461"
+         d="m -6355.668,-916.304 c 0,1.54 0.56,2.968 1.456,4.088 -0.896,1.12 -1.456,2.548 -1.456,4.088 0,3.556 2.856,6.412 6.412,6.412 l 5.712,0 0,-4.676 -5.712,0 c -0.952,0 -1.765,-0.784 -1.765,-1.736 0,-0.952 0.812,-1.764 1.765,-1.764 l 5.712,0 0,-4.648 -5.712,0 c -0.952,0 -1.765,-0.812 -1.765,-1.764 0,-0.952 0.812,-1.736 1.765,-1.736 l 5.712,0 0,-4.676 -5.712,0 c -3.556,0 -6.412,2.884 -6.412,6.412 z"
+         style="fill:url(#SVGID_409_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-792.44458"
+         x2="-6153.9053"
+         y1="-876.45288"
+         x1="-6738.9639"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48046">
+        <stop
+           id="stop48048"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48050"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48052"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48054"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48056"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10474"
+         d="m -6754.02,-880.94 c -1.288,0 -2.352,-0.896 -2.352,-1.988 0,-1.092 1.064,-1.988 2.352,-1.988 0.56,0 1.092,0.196 1.484,0.476 l 5.32,0 c -0.728,-2.94 -3.5,-5.152 -6.804,-5.152 -3.892,0 -7,2.996 -7,6.664 0,3.668 3.108,6.636 7,6.636 1.26,0 2.324,0.896 2.324,1.988 0,1.092 -1.064,1.988 -2.324,1.988 -0.588,0 -1.12,-0.196 -1.512,-0.476 l -5.32,0 c 0.728,2.94 3.5,5.152 6.832,5.152 3.864,0 7,-2.996 7,-6.664 0,-3.668 -3.136,-6.636 -7,-6.636 z"
+         style="fill:url(#SVGID_410_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-795.1272"
+         x2="-6153.52"
+         y1="-879.1355"
+         x1="-6738.5786"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48059">
+        <stop
+           id="stop48061"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48063"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48065"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48067"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48069"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10487"
+         d="m -6734.196,-874.64 c 0,1.288 -1.064,2.324 -2.352,2.324 -1.288,0 -2.324,-1.036 -2.324,-2.324 l 0,-14.476 -4.676,0 0,14.476 c 0,3.864 3.136,7 7,7 3.892,0 7,-3.136 7,-7 l 0,-14.476 -4.648,0 0,14.476 z"
+         style="fill:url(#SVGID_411_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-797.14581"
+         x2="-6153.2305"
+         y1="-881.15411"
+         x1="-6738.2891"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48072">
+        <stop
+           id="stop48074"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48076"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48078"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48080"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48082"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10500"
+         d="m -6710.396,-882.704 c 0,-3.528 -2.884,-6.412 -6.412,-6.412 l -8.064,0 0,21 4.676,0 0,-8.176 1.12,0 5.936,8.176 5.768,0 -6.468,-8.876 c 2.044,-1.092 3.444,-3.22 3.444,-5.712 z m -6.412,1.764 -3.388,0 0,-3.5 3.388,0 c 0.952,0 1.736,0.784 1.736,1.736 0,0.952 -0.784,1.764 -1.736,1.764 z"
+         style="fill:url(#SVGID_412_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-800.81421"
+         x2="-6152.7036"
+         y1="-884.82251"
+         x1="-6737.7622"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48085">
+        <stop
+           id="stop48087"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48089"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48091"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48093"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48095"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <polygon
+         id="polygon10513"
+         points="-6692.197,-872.792 -6692.197,-889.116 -6696.873,-889.116 -6696.873,-868.116 -6685.197,-868.116 -6685.197,-872.792 "
+         style="fill:url(#SVGID_413_)" />
+      <linearGradient
+         y2="-803.24103"
+         x2="-6152.355"
+         y1="-887.24933"
+         x1="-6737.4136"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48098">
+        <stop
+           id="stop48100"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48102"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48104"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48106"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48108"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10526"
+         d="m -6675.873,-889.116 -7.644,21 4.956,0 1.232,-3.5 7.7,0 1.232,3.5 4.956,0 -7.616,-21 -4.816,0 z m 0.196,12.824 2.212,-6.244 2.212,6.244 -4.424,0 z"
+         style="fill:url(#SVGID_414_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-807.14581"
+         x2="-6151.7944"
+         y1="-891.15411"
+         x1="-6736.853"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48111">
+        <stop
+           id="stop48113"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48115"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48117"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48119"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48121"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10539"
+         d="m -6647.257,-889.116 -5.152,0 0,21 5.152,0 c 5.152,0 9.324,-4.676 9.324,-10.5 0,-5.796 -4.172,-10.5 -9.324,-10.5 z m 0,16.324 -0.476,0 0,-11.648 0.476,0 c 2.548,0 4.648,2.604 4.648,5.824 0,3.22 -2.1,5.824 -4.648,5.824 z"
+         style="fill:url(#SVGID_415_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-810.27081"
+         x2="-6151.3457"
+         y1="-894.27911"
+         x1="-6736.4043"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48124">
+        <stop
+           id="stop48126"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48128"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48130"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48132"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48134"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10552"
+         d="m -6627.322,-889.592 c -3.864,0 -7,3.136 -7,7 l 0,7.952 c 0,3.864 3.136,7 7,7 3.892,0 7,-3.136 7,-7 l 0,-7.952 c 0,-3.864 -3.108,-7 -7,-7 z m 2.352,14.952 c 0,1.288 -1.064,2.324 -2.352,2.324 -1.288,0 -2.324,-1.036 -2.324,-2.324 l 0,-7.952 c 0,-1.26 1.036,-2.324 2.324,-2.324 1.288,0 2.352,1.064 2.352,2.324 l 0,7.952 z"
+         style="fill:url(#SVGID_416_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-812.89789"
+         x2="-6150.9688"
+         y1="-896.90619"
+         x1="-6736.0273"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48137">
+        <stop
+           id="stop48139"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48141"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48143"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48145"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48147"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10565"
+         d="m -6608.646,-884.916 c 0.532,0 1.008,0.168 1.4,0.476 l 5.348,0 c -0.812,-2.968 -3.528,-5.152 -6.748,-5.152 -3.864,0 -7,3.136 -7,7 l 0,7.952 c 0,3.864 3.136,7 7,7 3.22,0 5.936,-2.184 6.748,-5.152 l -5.348,0 c -0.392,0.308 -0.868,0.476 -1.4,0.476 -1.288,0 -2.324,-1.036 -2.324,-2.324 l 0,-7.952 c 0,-1.26 1.036,-2.324 2.324,-2.324 z"
+         style="fill:url(#SVGID_417_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-815.60638"
+         x2="-6150.5796"
+         y1="-899.61469"
+         x1="-6735.6382"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48150">
+        <stop
+           id="stop48152"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48154"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48156"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48158"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48160"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <polygon
+         id="polygon10578"
+         points="-6594.646,-884.44 -6594.646,-868.116 -6589.97,-868.116 -6589.97,-884.44 -6584.146,-884.44 -6584.146,-889.116 -6600.47,-889.116 -6600.47,-884.44 "
+         style="fill:url(#SVGID_418_)" />
+      <linearGradient
+         y2="-817.27148"
+         x2="-6150.3403"
+         y1="-901.27979"
+         x1="-6735.3989"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48163">
+        <stop
+           id="stop48165"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48167"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48169"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48171"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48173"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10591"
+         d="m -6567.346,-882.704 c 0,-3.528 -2.884,-6.412 -6.412,-6.412 l -8.064,0 0,21 4.676,0 0,-8.176 1.12,0 5.936,8.176 5.768,0 -6.468,-8.876 c 2.044,-1.092 3.444,-3.22 3.444,-5.712 z m -6.411,1.764 -3.388,0 0,-3.5 3.388,0 c 0.952,0 1.736,0.784 1.736,1.736 0,0.952 -0.785,1.764 -1.736,1.764 z"
+         style="fill:url(#SVGID_419_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-819.62842"
+         x2="-6150.002"
+         y1="-903.63672"
+         x1="-6735.0605"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48176">
+        <stop
+           id="stop48178"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48180"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48182"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48184"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48186"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <rect
+         id="rect10604"
+         height="21"
+         width="4.6760001"
+         y="-889.11603"
+         x="-6563.146"
+         style="fill:url(#SVGID_420_)" />
+      <linearGradient
+         y2="-821.59589"
+         x2="-6149.7197"
+         y1="-905.60419"
+         x1="-6734.7783"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48189">
+        <stop
+           id="stop48191"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48193"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48195"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48197"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48199"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <polygon
+         id="polygon10617"
+         points="-6539.822,-868.116 -6539.822,-889.116 -6544.47,-889.116 -6544.47,-882.116 -6551.47,-889.116 -6553.822,-889.116 -6553.822,-868.116 -6549.146,-868.116 -6549.146,-880.184 -6544.47,-875.508 -6544.47,-868.116 "
+         style="fill:url(#SVGID_421_)" />
+      <linearGradient
+         y2="-824.44647"
+         x2="-6149.3101"
+         y1="-908.45477"
+         x1="-6734.3687"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48202">
+        <stop
+           id="stop48204"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48206"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48208"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48210"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48212"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10630"
+         d="m -6535.594,-882.704 c 0,1.54 0.56,2.968 1.456,4.088 -0.896,1.12 -1.456,2.548 -1.456,4.088 0,3.556 2.856,6.412 6.412,6.412 l 5.712,0 0,-4.676 -5.712,0 c -0.952,0 -1.764,-0.784 -1.764,-1.736 0,-0.952 0.812,-1.764 1.764,-1.764 l 5.712,0 0,-4.648 -5.712,0 c -0.952,0 -1.764,-0.812 -1.764,-1.764 0,-0.952 0.812,-1.736 1.764,-1.736 l 5.712,0 0,-4.676 -5.712,0 c -3.556,0 -6.412,2.884 -6.412,6.412 z"
+         style="fill:url(#SVGID_422_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-827.66937"
+         x2="-6148.8477"
+         y1="-911.67767"
+         x1="-6733.9062"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48215">
+        <stop
+           id="stop48217"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48219"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48221"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48223"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48225"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10643"
+         d="m -6503.647,-880.94 c -1.288,0 -2.352,-0.896 -2.352,-1.988 0,-1.092 1.064,-1.988 2.352,-1.988 0.56,0 1.092,0.196 1.484,0.476 l 5.32,0 c -0.728,-2.94 -3.5,-5.152 -6.804,-5.152 -3.892,0 -7,2.996 -7,6.664 0,3.668 3.108,6.636 7,6.636 1.26,0 2.324,0.896 2.324,1.988 0,1.092 -1.064,1.988 -2.324,1.988 -0.588,0 -1.12,-0.196 -1.512,-0.476 l -5.32,0 c 0.728,2.94 3.5,5.152 6.832,5.152 3.864,0 7,-2.996 7,-6.664 0,-3.668 -3.136,-6.636 -7,-6.636 z"
+         style="fill:url(#SVGID_423_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-830.12872"
+         x2="-6148.4941"
+         y1="-914.13702"
+         x1="-6733.5527"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48228">
+        <stop
+           id="stop48230"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48232"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48234"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48236"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48238"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10656"
+         d="m -6486.175,-889.592 c -3.864,0 -7,3.136 -7,7 l 0,7.952 c 0,3.864 3.136,7 7,7 3.892,0 7,-3.136 7,-7 l 0,-7.952 c 0,-3.864 -3.108,-7 -7,-7 z m 2.352,14.952 c 0,1.288 -1.064,2.324 -2.352,2.324 -1.288,0 -2.324,-1.036 -2.324,-2.324 l 0,-7.952 c 0,-1.26 1.036,-2.324 2.324,-2.324 1.288,0 2.352,1.064 2.352,2.324 l 0,7.952 z"
+         style="fill:url(#SVGID_424_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-832.75562"
+         x2="-6148.1172"
+         y1="-916.76392"
+         x1="-6733.1758"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48241">
+        <stop
+           id="stop48243"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48245"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48247"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48249"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48251"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10669"
+         d="m -6467.5,-884.916 c 0.532,0 1.008,0.168 1.4,0.476 l 5.348,0 c -0.812,-2.968 -3.528,-5.152 -6.748,-5.152 -3.864,0 -7,3.136 -7,7 l 0,7.952 c 0,3.864 3.136,7 7,7 3.22,0 5.936,-2.184 6.748,-5.152 l -5.348,0 c -0.392,0.308 -0.868,0.476 -1.4,0.476 -1.288,0 -2.324,-1.036 -2.324,-2.324 l 0,-7.952 c 10e-4,-1.26 1.037,-2.324 2.324,-2.324 z"
+         style="fill:url(#SVGID_425_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-834.56201"
+         x2="-6147.8579"
+         y1="-918.57031"
+         x1="-6732.9165"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48254">
+        <stop
+           id="stop48256"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48258"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48260"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48262"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48264"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <rect
+         id="rect10682"
+         height="21"
+         width="4.6760001"
+         y="-889.11603"
+         x="-6456.999"
+         style="fill:url(#SVGID_426_)" />
+      <linearGradient
+         y2="-836.00372"
+         x2="-6147.6509"
+         y1="-920.01202"
+         x1="-6732.7095"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48267">
+        <stop
+           id="stop48269"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48271"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48273"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48275"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48277"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10695"
+         d="m -6443,-889.116 -7.644,21 4.956,0 1.232,-3.5 7.7,0 1.232,3.5 4.956,0 -7.616,-21 -4.816,0 z m 0.196,12.824 2.212,-6.244 2.212,6.244 -4.424,0 z"
+         style="fill:url(#SVGID_427_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-838.52081"
+         x2="-6147.2891"
+         y1="-922.52911"
+         x1="-6732.3477"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48280">
+        <stop
+           id="stop48282"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48284"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48286"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48288"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48290"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <polygon
+         id="polygon10708"
+         points="-6424.184,-872.792 -6424.184,-889.116 -6428.859,-889.116 -6428.859,-868.116 -6417.184,-868.116 -6417.184,-872.792 "
+         style="fill:url(#SVGID_428_)" />
+      <linearGradient
+         y2="-841.69647"
+         x2="-6146.8335"
+         y1="-925.70477"
+         x1="-6731.8921"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48293">
+        <stop
+           id="stop48295"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48297"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48299"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48301"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48303"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10721"
+         d="m -6412.984,-882.704 c 0,1.54 0.56,2.968 1.456,4.088 -0.896,1.12 -1.456,2.548 -1.456,4.088 0,3.556 2.856,6.412 6.412,6.412 l 5.712,0 0,-4.676 -5.712,0 c -0.952,0 -1.764,-0.784 -1.764,-1.736 0,-0.952 0.812,-1.764 1.764,-1.764 l 5.712,0 0,-4.648 -5.712,0 c -0.952,0 -1.764,-0.812 -1.764,-1.764 0,-0.952 0.812,-1.736 1.764,-1.736 l 5.712,0 0,-4.676 -5.712,0 c -3.556,0 -6.412,2.884 -6.412,6.412 z"
+         style="fill:url(#SVGID_429_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-844.50153"
+         x2="-6146.4307"
+         y1="-928.50983"
+         x1="-6731.4893"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48306">
+        <stop
+           id="stop48308"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48310"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48312"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48314"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48316"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10734"
+         d="m -6381.735,-889.116 -5.152,0 0,21 5.152,0 c 5.151,0 9.323,-4.676 9.323,-10.5 0,-5.796 -4.172,-10.5 -9.323,-10.5 z m 0,16.324 -0.477,0 0,-11.648 0.477,0 c 2.547,0 4.647,2.604 4.647,5.824 0,3.22 -2.1,5.824 -4.647,5.824 z"
+         style="fill:url(#SVGID_430_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-847.84943"
+         x2="-6145.9497"
+         y1="-931.85773"
+         x1="-6731.0083"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48319">
+        <stop
+           id="stop48321"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48323"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48325"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48327"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48329"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10747"
+         d="m -6369.248,-882.704 c 0,1.54 0.56,2.968 1.456,4.088 -0.896,1.12 -1.456,2.548 -1.456,4.088 0,3.556 2.856,6.412 6.412,6.412 l 5.712,0 0,-4.676 -5.712,0 c -0.952,0 -1.765,-0.784 -1.765,-1.736 0,-0.952 0.812,-1.764 1.765,-1.764 l 5.712,0 0,-4.648 -5.712,0 c -0.952,0 -1.765,-0.812 -1.765,-1.764 0,-0.952 0.812,-1.736 1.765,-1.736 l 5.712,0 0,-4.676 -5.712,0 c -3.556,0 -6.412,2.884 -6.412,6.412 z"
+         style="fill:url(#SVGID_431_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-850.57892"
+         x2="-6145.5581"
+         y1="-934.58722"
+         x1="-6730.6167"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48332">
+        <stop
+           id="stop48334"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48336"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48338"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48340"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48342"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <polygon
+         id="polygon10760"
+         points="-6338.477,-872.792 -6338.477,-889.116 -6343.152,-889.116 -6343.152,-868.116 -6331.477,-868.116 -6331.477,-872.792 "
+         style="fill:url(#SVGID_432_)" />
+      <linearGradient
+         y2="-858.5957"
+         x2="-6144.4067"
+         y1="-942.604"
+         x1="-6729.4653"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48345">
+        <stop
+           id="stop48347"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48349"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48351"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48353"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48355"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <rect
+         id="rect10773"
+         height="9.3240004"
+         width="4.6760001"
+         y="-889.11603"
+         x="-6326.8291"
+         style="fill:url(#SVGID_433_)" />
+      <linearGradient
+         y2="-855.06641"
+         x2="-6144.9136"
+         y1="-939.07471"
+         x1="-6729.9722"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48358">
+        <stop
+           id="stop48360"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48362"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48364"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48366"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48368"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10786"
+         d="m -6317.953,-882.704 c 0,1.54 0.56,2.968 1.456,4.088 -0.896,1.12 -1.456,2.548 -1.456,4.088 0,3.556 2.856,6.412 6.412,6.412 l 5.712,0 0,-4.676 -5.712,0 c -0.952,0 -1.765,-0.784 -1.765,-1.736 0,-0.952 0.812,-1.764 1.765,-1.764 l 5.712,0 0,-4.648 -5.712,0 c -0.952,0 -1.765,-0.812 -1.765,-1.764 0,-0.952 0.812,-1.736 1.765,-1.736 l 5.712,0 0,-4.676 -5.712,0 c -3.556,0 -6.412,2.884 -6.412,6.412 z"
+         style="fill:url(#SVGID_434_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-869.71259"
+         x2="-6142.8105"
+         y1="-953.72089"
+         x1="-6727.8691"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48371">
+        <stop
+           id="stop48373"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48375"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48377"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48379"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48381"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <polygon
+         id="polygon10799"
+         points="-6310.029,-891.468 -6305.353,-896.116 -6310.981,-896.116 -6315.657,-891.468 "
+         style="fill:url(#SVGID_435_)" />
+      <linearGradient
+         y2="-857.1394"
+         x2="-6144.6157"
+         y1="-941.14771"
+         x1="-6729.6743"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48384">
+        <stop
+           id="stop48386"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48388"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48390"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48392"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48394"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10812"
+         d="m -6294.182,-876.292 2.353,0 0,1.652 c 0,1.288 -1.064,2.324 -2.353,2.324 -1.289,0 -2.323,-1.036 -2.323,-2.324 l 0,-7.952 c 0,-1.26 1.035,-2.324 2.323,-2.324 0.532,0 1.009,0.168 1.4,0.476 l 5.348,0 c -0.812,-2.968 -3.528,-5.152 -6.748,-5.152 -3.864,0 -6.999,3.136 -6.999,7 l 0,7.952 c 0,3.864 3.135,7 6.999,7 3.892,0 7,-3.136 7,-7 l 0,-6.3 -7,0 0,4.648 z"
+         style="fill:url(#SVGID_436_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-859.02881"
+         x2="-6144.3447"
+         y1="-943.03711"
+         x1="-6729.4033"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48397">
+        <stop
+           id="stop48399"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48401"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48403"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48405"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48407"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <polygon
+         id="polygon10825"
+         points="-6278.417,-872.792 -6278.417,-889.116 -6283.093,-889.116 -6283.093,-868.116 -6271.417,-868.116 -6271.417,-872.792 "
+         style="fill:url(#SVGID_437_)" />
+      <linearGradient
+         y2="-861.32501"
+         x2="-6144.0146"
+         y1="-945.33331"
+         x1="-6729.0732"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48410">
+        <stop
+           id="stop48412"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48414"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48416"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48418"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48420"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <rect
+         id="rect10838"
+         height="21"
+         width="4.6760001"
+         y="-889.11603"
+         x="-6266.77"
+         style="fill:url(#SVGID_438_)" />
+      <linearGradient
+         y2="-863.13062"
+         x2="-6143.7554"
+         y1="-947.13892"
+         x1="-6728.814"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48423">
+        <stop
+           id="stop48425"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48427"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48429"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48431"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48433"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10851"
+         d="m -6251.594,-880.94 c -1.288,0 -2.352,-0.896 -2.352,-1.988 0,-1.092 1.063,-1.988 2.352,-1.988 0.56,0 1.093,0.196 1.484,0.476 l 5.319,0 c -0.728,-2.94 -3.5,-5.152 -6.804,-5.152 -3.892,0 -7,2.996 -7,6.664 0,3.668 3.108,6.636 7,6.636 1.261,0 2.324,0.896 2.324,1.988 0,1.092 -1.063,1.988 -2.324,1.988 -0.588,0 -1.12,-0.196 -1.512,-0.476 l -5.32,0 c 0.728,2.94 3.5,5.152 6.832,5.152 3.864,0 7,-2.996 7,-6.664 0,-3.668 -3.134,-6.636 -6.999,-6.636 z"
+         style="fill:url(#SVGID_439_)"
+         inkscape:connector-curvature="0" />
+      <linearGradient
+         y2="-865.81268"
+         x2="-6143.3706"
+         y1="-949.82098"
+         x1="-6728.4292"
+         gradientUnits="userSpaceOnUse"
+         id="linearGradient48436">
+        <stop
+           id="stop48438"
+           style="stop-color:#7C146B"
+           offset="0" />
+        <stop
+           id="stop48440"
+           style="stop-color:#722D70"
+           offset="0.1339" />
+        <stop
+           id="stop48442"
+           style="stop-color:#52537E"
+           offset="0.4232" />
+        <stop
+           id="stop48444"
+           style="stop-color:#006F81"
+           offset="0.8425" />
+        <stop
+           id="stop48446"
+           style="stop-color:#00747D"
+           offset="1" />
+      </linearGradient>
+      <path
+         id="path10864"
+         d="m -6235.157,-884.44 5.711,0 0,-4.676 -5.711,0 c -3.557,0 -6.412,2.884 -6.412,6.412 0,1.54 0.56,2.968 1.455,4.088 -0.896,1.12 -1.455,2.548 -1.455,4.088 0,3.556 2.855,6.412 6.412,6.412 l 5.711,0 0,-4.676 -5.711,0 c -0.953,0 -1.765,-0.784 -1.765,-1.736 0,-0.952 0.812,-1.764 1.765,-1.764 l 5.711,0 0,-4.648 -5.711,0 c -0.953,0 -1.765,-0.812 -1.765,-1.764 0,-0.952 0.812,-1.736 1.765,-1.736 z"
+         style="fill:url(#SVGID_440_)"
+         inkscape:connector-curvature="0" />
+    </g>
+  </g>
+</svg>

+ 19 - 0
sites/all/themes/gui/jee/bower.json

@@ -0,0 +1,19 @@
+{
+  "name": "esadhar",
+  "dependencies": {
+    "foundation": "~5.5.0"
+  },
+  "version": "7.x-0.1",
+  "authors": [
+    "Bachir Soussi Chiadmi <bachir@g-u-i.me>"
+  ],
+  "license": "MIT",
+  "homepage": "jeune et engagés",
+  "ignore": [
+    "**/.*",
+    "node_modules",
+    "bower_components",
+    "test",
+    "tests"
+  ]
+}

+ 23 - 0
sites/all/themes/gui/jee/bower_components/fastclick/.bower.json

@@ -0,0 +1,23 @@
+{
+  "name": "fastclick",
+  "version": "1.0.3",
+  "main": "lib/fastclick.js",
+  "ignore": [
+    "**/.*",
+    "component.json",
+    "package.json",
+    "Makefile",
+    "tests",
+    "examples"
+  ],
+  "homepage": "https://github.com/ftlabs/fastclick",
+  "_release": "1.0.3",
+  "_resolution": {
+    "type": "version",
+    "tag": "v1.0.3",
+    "commit": "0ea8330a63019a07c8ccc86deca866bb31189b66"
+  },
+  "_source": "git://github.com/ftlabs/fastclick.git",
+  "_target": ">=0.6.11",
+  "_originalSource": "fastclick"
+}

+ 22 - 0
sites/all/themes/gui/jee/bower_components/fastclick/LICENSE

@@ -0,0 +1,22 @@
+Copyright (c) 2014 The Financial Times Ltd.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.

+ 133 - 0
sites/all/themes/gui/jee/bower_components/fastclick/README.md

@@ -0,0 +1,133 @@
+# FastClick #
+
+FastClick is a simple, easy-to-use library for eliminating the 300ms delay between a physical tap and the firing of a `click` event on mobile browsers. The aim is to make your application feel less laggy and more responsive while avoiding any interference with your current logic.
+
+FastClick is developed by [FT Labs](http://labs.ft.com/), part of the Financial Times.
+
+[Explication en français](http://maxime.sh/2013/02/supprimer-le-lag-des-clics-sur-mobile-avec-fastclick/).
+
+[日本語で説明](https://developer.mozilla.org/ja/docs/Mozilla/Firefox_OS/Apps/Tips_and_techniques#Make_events_immediate)。
+
+## Why does the delay exist? ##
+
+According to [Google](https://developers.google.com/mobile/articles/fast_buttons):
+
+> ...mobile browsers will wait approximately 300ms from the time that you tap the button to fire the click event. The reason for this is that the browser is waiting to see if you are actually performing a double tap.
+
+## Compatibility ##
+
+The library has been deployed as part of the [FT Web App](http://app.ft.com/) and is tried and tested on the following mobile browsers:
+
+* Mobile Safari on iOS 3 and upwards
+* Chrome on iOS 5 and upwards
+* Chrome on Android (ICS)
+* Opera Mobile 11.5 and upwards
+* Android Browser since Android 2
+* PlayBook OS 1 and upwards
+
+## When it isn't needed ##
+
+FastClick doesn't attach any listeners on desktop browsers.
+
+Chrome 32+ on Android with `width=device-width` in the [viewport meta tag](https://developer.mozilla.org/en-US/docs/Mobile/Viewport_meta_tag) doesn't have a 300ms delay, therefore listeners aren't attached.
+
+```html
+<meta name="viewport" content="width=device-width, initial-scale=1">
+```
+
+Same goes for Chrome on Android (all versions) with `user-scalable=no` in the viewport meta tag. But be aware that `user-scalable=no` also disables pinch zooming, which may be an accessibility concern.
+
+For IE10, you can use `-ms-touch-action: none` to disable double-tap-to-zoom on certain elements (like links and buttons) as described in [this MSDN blog post](http://blogs.msdn.com/b/askie/archive/2013/01/06/how-to-implement-the-ms-touch-action-none-property-to-disable-double-tap-zoom-on-touch-devices.aspx).
+
+## Usage ##
+
+Include fastclick.js in your JavaScript bundle or add it to your HTML page like this:
+
+```html
+<script type='application/javascript' src='/path/to/fastclick.js'></script>
+```
+
+The script must be loaded prior to instantiating FastClick on any element of the page.
+
+To instantiate FastClick on the `body`, which is the recommended method of use:
+
+```js
+window.addEventListener('load', function() {
+	FastClick.attach(document.body);
+}, false);
+```
+
+Don't forget to add a [shim](https://developer.mozilla.org/en-US/docs/DOM/EventTarget.removeEventListener#Compatibility) for `addEventListener` if you want to support IE8 and below.
+
+Otherwise, if you're using jQuery:
+
+```js
+$(function() {
+	FastClick.attach(document.body);
+});
+```
+
+If you're using Browserify or another CommonJS-style module system, the `FastClick.attach` function will be returned when you call `require('fastclick')`. As a result, the easiest way to use FastClick with these loaders is as follows:
+
+```js
+var attachFastClick = require('fastclick');
+attachFastClick(document.body);
+```
+
+### Minified ###
+
+Run `make` to build a minified version of FastClick using the Closure Compiler REST API. The minified file is saved to `build/fastclick.min.js` or you can [download a pre-minified version](http://build.origami.ft.com/bundles/js?modules=fastclick).
+
+### AMD ###
+
+FastClick has AMD (Asynchronous Module Definition) support. This allows it to be lazy-loaded with an AMD loader, such as [RequireJS](http://requirejs.org/). Note that when using the AMD style require, the full `FastClick` object will be returned, _not_ `FastClick.attach`
+
+```js
+var FastClick = require('fastclick');
+FastClick.attach(document.body);
+```
+
+### Package managers ###
+
+You can install FastClick using [Component](https://github.com/component/component), [npm](https://npmjs.org/package/fastclick) or [Bower](http://bower.io/).
+
+For Ruby, there's a third-party gem called [fastclick-rails](http://rubygems.org/gems/fastclick-rails). For .NET there's a [NuGet package](http://nuget.org/packages/FastClick).
+
+## Advanced ##
+
+### Ignore certain elements with `needsclick` ###
+
+Sometimes you need FastClick to ignore certain elements. You can do this easily by adding the `needsclick` class.
+```html
+<a class="needsclick">Ignored by FastClick</a>
+```
+
+#### Use case 1: non-synthetic click required ####
+
+Internally, FastClick uses `document.createEvent` to fire a synthetic `click` event as soon as `touchend` is fired by the browser. It then suppresses the additional `click` event created by the browser after that. In some cases, the non-synthetic `click` event created by the browser is required, as described in the [triggering focus example](http://ftlabs.github.com/fastclick/examples/focus.html).
+
+This is where the `needsclick` class comes in. Add the class to any element that requires a non-synthetic click.
+
+#### Use case 2: Twitter Bootstrap 2.2.2 dropdowns ####
+
+Another example of when to use the `needsclick` class is with dropdowns in Twitter Bootstrap 2.2.2. Bootstrap add its own `touchstart` listener for dropdowns, so you want to tell FastClick to ignore those. If you don't, touch devices will automatically close the dropdown as soon as it is clicked, because both FastClick and Bootstrap execute the synthetic click, one opens the dropdown, the second closes it immediately after.
+
+```html
+<a class="dropdown-toggle needsclick" data-toggle="dropdown">Dropdown</a>
+```
+
+## Examples ##
+
+FastClick is designed to cope with many different browser oddities. Here are some examples to illustrate this:
+
+* [basic use](http://ftlabs.github.com/fastclick/examples/layer.html) showing the increase in perceived responsiveness
+* [triggering focus](http://ftlabs.github.com/fastclick/examples/focus.html) on an input element from a `click` handler
+* [input element](http://ftlabs.github.com/fastclick/examples/input.html) which never receives clicks but gets fast focus
+
+## Tests ##
+
+There are no automated tests. The files in `tests/` are manual reduced test cases. We've had a think about how best to test these cases, but they tend to be very browser/device specific and sometimes subjective which means it's not so trivial to test.
+
+## Credits and collaboration ##
+
+FastClick is maintained by [Rowan Beentje](http://twitter.com/rowanbeentje), [Matthew Caruana Galizia](http://twitter.com/mcaruanagalizia) and [Matthew Andrews](http://twitter.com/andrewsmatt) at [FT Labs](http://labs.ft.com). All open source code released by FT Labs is licenced under the MIT licence. We welcome comments, feedback and suggestions.  Please feel free to raise an issue or pull request.

+ 13 - 0
sites/all/themes/gui/jee/bower_components/fastclick/bower.json

@@ -0,0 +1,13 @@
+{
+  "name": "fastclick",
+  "version": "1.0.3",
+  "main": "lib/fastclick.js",
+  "ignore": [
+    "**/.*",
+    "component.json",
+    "package.json",
+    "Makefile",
+    "tests",
+    "examples"
+  ]
+}

+ 821 - 0
sites/all/themes/gui/jee/bower_components/fastclick/lib/fastclick.js

@@ -0,0 +1,821 @@
+/**
+ * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
+ *
+ * @version 1.0.3
+ * @codingstandard ftlabs-jsv2
+ * @copyright The Financial Times Limited [All Rights Reserved]
+ * @license MIT License (see LICENSE.txt)
+ */
+
+/*jslint browser:true, node:true*/
+/*global define, Event, Node*/
+
+
+/**
+ * Instantiate fast-clicking listeners on the specified layer.
+ *
+ * @constructor
+ * @param {Element} layer The layer to listen on
+ * @param {Object} options The options to override the defaults
+ */
+function FastClick(layer, options) {
+	'use strict';
+	var oldOnClick;
+
+	options = options || {};
+
+	/**
+	 * Whether a click is currently being tracked.
+	 *
+	 * @type boolean
+	 */
+	this.trackingClick = false;
+
+
+	/**
+	 * Timestamp for when click tracking started.
+	 *
+	 * @type number
+	 */
+	this.trackingClickStart = 0;
+
+
+	/**
+	 * The element being tracked for a click.
+	 *
+	 * @type EventTarget
+	 */
+	this.targetElement = null;
+
+
+	/**
+	 * X-coordinate of touch start event.
+	 *
+	 * @type number
+	 */
+	this.touchStartX = 0;
+
+
+	/**
+	 * Y-coordinate of touch start event.
+	 *
+	 * @type number
+	 */
+	this.touchStartY = 0;
+
+
+	/**
+	 * ID of the last touch, retrieved from Touch.identifier.
+	 *
+	 * @type number
+	 */
+	this.lastTouchIdentifier = 0;
+
+
+	/**
+	 * Touchmove boundary, beyond which a click will be cancelled.
+	 *
+	 * @type number
+	 */
+	this.touchBoundary = options.touchBoundary || 10;
+
+
+	/**
+	 * The FastClick layer.
+	 *
+	 * @type Element
+	 */
+	this.layer = layer;
+
+	/**
+	 * The minimum time between tap(touchstart and touchend) events
+	 *
+	 * @type number
+	 */
+	this.tapDelay = options.tapDelay || 200;
+
+	if (FastClick.notNeeded(layer)) {
+		return;
+	}
+
+	// Some old versions of Android don't have Function.prototype.bind
+	function bind(method, context) {
+		return function() { return method.apply(context, arguments); };
+	}
+
+
+	var methods = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel'];
+	var context = this;
+	for (var i = 0, l = methods.length; i < l; i++) {
+		context[methods[i]] = bind(context[methods[i]], context);
+	}
+
+	// Set up event handlers as required
+	if (deviceIsAndroid) {
+		layer.addEventListener('mouseover', this.onMouse, true);
+		layer.addEventListener('mousedown', this.onMouse, true);
+		layer.addEventListener('mouseup', this.onMouse, true);
+	}
+
+	layer.addEventListener('click', this.onClick, true);
+	layer.addEventListener('touchstart', this.onTouchStart, false);
+	layer.addEventListener('touchmove', this.onTouchMove, false);
+	layer.addEventListener('touchend', this.onTouchEnd, false);
+	layer.addEventListener('touchcancel', this.onTouchCancel, false);
+
+	// Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
+	// which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick
+	// layer when they are cancelled.
+	if (!Event.prototype.stopImmediatePropagation) {
+		layer.removeEventListener = function(type, callback, capture) {
+			var rmv = Node.prototype.removeEventListener;
+			if (type === 'click') {
+				rmv.call(layer, type, callback.hijacked || callback, capture);
+			} else {
+				rmv.call(layer, type, callback, capture);
+			}
+		};
+
+		layer.addEventListener = function(type, callback, capture) {
+			var adv = Node.prototype.addEventListener;
+			if (type === 'click') {
+				adv.call(layer, type, callback.hijacked || (callback.hijacked = function(event) {
+					if (!event.propagationStopped) {
+						callback(event);
+					}
+				}), capture);
+			} else {
+				adv.call(layer, type, callback, capture);
+			}
+		};
+	}
+
+	// If a handler is already declared in the element's onclick attribute, it will be fired before
+	// FastClick's onClick handler. Fix this by pulling out the user-defined handler function and
+	// adding it as listener.
+	if (typeof layer.onclick === 'function') {
+
+		// Android browser on at least 3.2 requires a new reference to the function in layer.onclick
+		// - the old one won't work if passed to addEventListener directly.
+		oldOnClick = layer.onclick;
+		layer.addEventListener('click', function(event) {
+			oldOnClick(event);
+		}, false);
+		layer.onclick = null;
+	}
+}
+
+
+/**
+ * Android requires exceptions.
+ *
+ * @type boolean
+ */
+var deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0;
+
+
+/**
+ * iOS requires exceptions.
+ *
+ * @type boolean
+ */
+var deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent);
+
+
+/**
+ * iOS 4 requires an exception for select elements.
+ *
+ * @type boolean
+ */
+var deviceIsIOS4 = deviceIsIOS && (/OS 4_\d(_\d)?/).test(navigator.userAgent);
+
+
+/**
+ * iOS 6.0(+?) requires the target element to be manually derived
+ *
+ * @type boolean
+ */
+var deviceIsIOSWithBadTarget = deviceIsIOS && (/OS ([6-9]|\d{2})_\d/).test(navigator.userAgent);
+
+/**
+ * BlackBerry requires exceptions.
+ *
+ * @type boolean
+ */
+var deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0;
+
+/**
+ * Determine whether a given element requires a native click.
+ *
+ * @param {EventTarget|Element} target Target DOM element
+ * @returns {boolean} Returns true if the element needs a native click
+ */
+FastClick.prototype.needsClick = function(target) {
+	'use strict';
+	switch (target.nodeName.toLowerCase()) {
+
+	// Don't send a synthetic click to disabled inputs (issue #62)
+	case 'button':
+	case 'select':
+	case 'textarea':
+		if (target.disabled) {
+			return true;
+		}
+
+		break;
+	case 'input':
+
+		// File inputs need real clicks on iOS 6 due to a browser bug (issue #68)
+		if ((deviceIsIOS && target.type === 'file') || target.disabled) {
+			return true;
+		}
+
+		break;
+	case 'label':
+	case 'video':
+		return true;
+	}
+
+	return (/\bneedsclick\b/).test(target.className);
+};
+
+
+/**
+ * Determine whether a given element requires a call to focus to simulate click into element.
+ *
+ * @param {EventTarget|Element} target Target DOM element
+ * @returns {boolean} Returns true if the element requires a call to focus to simulate native click.
+ */
+FastClick.prototype.needsFocus = function(target) {
+	'use strict';
+	switch (target.nodeName.toLowerCase()) {
+	case 'textarea':
+		return true;
+	case 'select':
+		return !deviceIsAndroid;
+	case 'input':
+		switch (target.type) {
+		case 'button':
+		case 'checkbox':
+		case 'file':
+		case 'image':
+		case 'radio':
+		case 'submit':
+			return false;
+		}
+
+		// No point in attempting to focus disabled inputs
+		return !target.disabled && !target.readOnly;
+	default:
+		return (/\bneedsfocus\b/).test(target.className);
+	}
+};
+
+
+/**
+ * Send a click event to the specified element.
+ *
+ * @param {EventTarget|Element} targetElement
+ * @param {Event} event
+ */
+FastClick.prototype.sendClick = function(targetElement, event) {
+	'use strict';
+	var clickEvent, touch;
+
+	// On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24)
+	if (document.activeElement && document.activeElement !== targetElement) {
+		document.activeElement.blur();
+	}
+
+	touch = event.changedTouches[0];
+
+	// Synthesise a click event, with an extra attribute so it can be tracked
+	clickEvent = document.createEvent('MouseEvents');
+	clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
+	clickEvent.forwardedTouchEvent = true;
+	targetElement.dispatchEvent(clickEvent);
+};
+
+FastClick.prototype.determineEventType = function(targetElement) {
+	'use strict';
+
+	//Issue #159: Android Chrome Select Box does not open with a synthetic click event
+	if (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') {
+		return 'mousedown';
+	}
+
+	return 'click';
+};
+
+
+/**
+ * @param {EventTarget|Element} targetElement
+ */
+FastClick.prototype.focus = function(targetElement) {
+	'use strict';
+	var length;
+
+	// Issue #160: on iOS 7, some input elements (e.g. date datetime) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724.
+	if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time') {
+		length = targetElement.value.length;
+		targetElement.setSelectionRange(length, length);
+	} else {
+		targetElement.focus();
+	}
+};
+
+
+/**
+ * Check whether the given target element is a child of a scrollable layer and if so, set a flag on it.
+ *
+ * @param {EventTarget|Element} targetElement
+ */
+FastClick.prototype.updateScrollParent = function(targetElement) {
+	'use strict';
+	var scrollParent, parentElement;
+
+	scrollParent = targetElement.fastClickScrollParent;
+
+	// Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the
+	// target element was moved to another parent.
+	if (!scrollParent || !scrollParent.contains(targetElement)) {
+		parentElement = targetElement;
+		do {
+			if (parentElement.scrollHeight > parentElement.offsetHeight) {
+				scrollParent = parentElement;
+				targetElement.fastClickScrollParent = parentElement;
+				break;
+			}
+
+			parentElement = parentElement.parentElement;
+		} while (parentElement);
+	}
+
+	// Always update the scroll top tracker if possible.
+	if (scrollParent) {
+		scrollParent.fastClickLastScrollTop = scrollParent.scrollTop;
+	}
+};
+
+
+/**
+ * @param {EventTarget} targetElement
+ * @returns {Element|EventTarget}
+ */
+FastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) {
+	'use strict';
+
+	// On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node.
+	if (eventTarget.nodeType === Node.TEXT_NODE) {
+		return eventTarget.parentNode;
+	}
+
+	return eventTarget;
+};
+
+
+/**
+ * On touch start, record the position and scroll offset.
+ *
+ * @param {Event} event
+ * @returns {boolean}
+ */
+FastClick.prototype.onTouchStart = function(event) {
+	'use strict';
+	var targetElement, touch, selection;
+
+	// Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
+	if (event.targetTouches.length > 1) {
+		return true;
+	}
+
+	targetElement = this.getTargetElementFromEventTarget(event.target);
+	touch = event.targetTouches[0];
+
+	if (deviceIsIOS) {
+
+		// Only trusted events will deselect text on iOS (issue #49)
+		selection = window.getSelection();
+		if (selection.rangeCount && !selection.isCollapsed) {
+			return true;
+		}
+
+		if (!deviceIsIOS4) {
+
+			// Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23):
+			// when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched
+			// with the same identifier as the touch event that previously triggered the click that triggered the alert.
+			// Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an
+			// immediately preceeding touch event (issue #52), so this fix is unavailable on that platform.
+			// Issue 120: touch.identifier is 0 when Chrome dev tools 'Emulate touch events' is set with an iOS device UA string,
+			// which causes all touch events to be ignored. As this block only applies to iOS, and iOS identifiers are always long,
+			// random integers, it's safe to to continue if the identifier is 0 here.
+			if (touch.identifier && touch.identifier === this.lastTouchIdentifier) {
+				event.preventDefault();
+				return false;
+			}
+
+			this.lastTouchIdentifier = touch.identifier;
+
+			// If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and:
+			// 1) the user does a fling scroll on the scrollable layer
+			// 2) the user stops the fling scroll with another tap
+			// then the event.target of the last 'touchend' event will be the element that was under the user's finger
+			// when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check
+			// is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42).
+			this.updateScrollParent(targetElement);
+		}
+	}
+
+	this.trackingClick = true;
+	this.trackingClickStart = event.timeStamp;
+	this.targetElement = targetElement;
+
+	this.touchStartX = touch.pageX;
+	this.touchStartY = touch.pageY;
+
+	// Prevent phantom clicks on fast double-tap (issue #36)
+	if ((event.timeStamp - this.lastClickTime) < this.tapDelay) {
+		event.preventDefault();
+	}
+
+	return true;
+};
+
+
+/**
+ * Based on a touchmove event object, check whether the touch has moved past a boundary since it started.
+ *
+ * @param {Event} event
+ * @returns {boolean}
+ */
+FastClick.prototype.touchHasMoved = function(event) {
+	'use strict';
+	var touch = event.changedTouches[0], boundary = this.touchBoundary;
+
+	if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) {
+		return true;
+	}
+
+	return false;
+};
+
+
+/**
+ * Update the last position.
+ *
+ * @param {Event} event
+ * @returns {boolean}
+ */
+FastClick.prototype.onTouchMove = function(event) {
+	'use strict';
+	if (!this.trackingClick) {
+		return true;
+	}
+
+	// If the touch has moved, cancel the click tracking
+	if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) {
+		this.trackingClick = false;
+		this.targetElement = null;
+	}
+
+	return true;
+};
+
+
+/**
+ * Attempt to find the labelled control for the given label element.
+ *
+ * @param {EventTarget|HTMLLabelElement} labelElement
+ * @returns {Element|null}
+ */
+FastClick.prototype.findControl = function(labelElement) {
+	'use strict';
+
+	// Fast path for newer browsers supporting the HTML5 control attribute
+	if (labelElement.control !== undefined) {
+		return labelElement.control;
+	}
+
+	// All browsers under test that support touch events also support the HTML5 htmlFor attribute
+	if (labelElement.htmlFor) {
+		return document.getElementById(labelElement.htmlFor);
+	}
+
+	// If no for attribute exists, attempt to retrieve the first labellable descendant element
+	// the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label
+	return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea');
+};
+
+
+/**
+ * On touch end, determine whether to send a click event at once.
+ *
+ * @param {Event} event
+ * @returns {boolean}
+ */
+FastClick.prototype.onTouchEnd = function(event) {
+	'use strict';
+	var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
+
+	if (!this.trackingClick) {
+		return true;
+	}
+
+	// Prevent phantom clicks on fast double-tap (issue #36)
+	if ((event.timeStamp - this.lastClickTime) < this.tapDelay) {
+		this.cancelNextClick = true;
+		return true;
+	}
+
+	// Reset to prevent wrong click cancel on input (issue #156).
+	this.cancelNextClick = false;
+
+	this.lastClickTime = event.timeStamp;
+
+	trackingClickStart = this.trackingClickStart;
+	this.trackingClick = false;
+	this.trackingClickStart = 0;
+
+	// On some iOS devices, the targetElement supplied with the event is invalid if the layer
+	// is performing a transition or scroll, and has to be re-detected manually. Note that
+	// for this to function correctly, it must be called *after* the event target is checked!
+	// See issue #57; also filed as rdar://13048589 .
+	if (deviceIsIOSWithBadTarget) {
+		touch = event.changedTouches[0];
+
+		// In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null
+		targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement;
+		targetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent;
+	}
+
+	targetTagName = targetElement.tagName.toLowerCase();
+	if (targetTagName === 'label') {
+		forElement = this.findControl(targetElement);
+		if (forElement) {
+			this.focus(targetElement);
+			if (deviceIsAndroid) {
+				return false;
+			}
+
+			targetElement = forElement;
+		}
+	} else if (this.needsFocus(targetElement)) {
+
+		// Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through.
+		// Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37).
+		if ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window && targetTagName === 'input')) {
+			this.targetElement = null;
+			return false;
+		}
+
+		this.focus(targetElement);
+		this.sendClick(targetElement, event);
+
+		// Select elements need the event to go through on iOS 4, otherwise the selector menu won't open.
+		// Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others)
+		if (!deviceIsIOS || targetTagName !== 'select') {
+			this.targetElement = null;
+			event.preventDefault();
+		}
+
+		return false;
+	}
+
+	if (deviceIsIOS && !deviceIsIOS4) {
+
+		// Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled
+		// and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42).
+		scrollParent = targetElement.fastClickScrollParent;
+		if (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) {
+			return true;
+		}
+	}
+
+	// Prevent the actual click from going though - unless the target node is marked as requiring
+	// real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted.
+	if (!this.needsClick(targetElement)) {
+		event.preventDefault();
+		this.sendClick(targetElement, event);
+	}
+
+	return false;
+};
+
+
+/**
+ * On touch cancel, stop tracking the click.
+ *
+ * @returns {void}
+ */
+FastClick.prototype.onTouchCancel = function() {
+	'use strict';
+	this.trackingClick = false;
+	this.targetElement = null;
+};
+
+
+/**
+ * Determine mouse events which should be permitted.
+ *
+ * @param {Event} event
+ * @returns {boolean}
+ */
+FastClick.prototype.onMouse = function(event) {
+	'use strict';
+
+	// If a target element was never set (because a touch event was never fired) allow the event
+	if (!this.targetElement) {
+		return true;
+	}
+
+	if (event.forwardedTouchEvent) {
+		return true;
+	}
+
+	// Programmatically generated events targeting a specific element should be permitted
+	if (!event.cancelable) {
+		return true;
+	}
+
+	// Derive and check the target element to see whether the mouse event needs to be permitted;
+	// unless explicitly enabled, prevent non-touch click events from triggering actions,
+	// to prevent ghost/doubleclicks.
+	if (!this.needsClick(this.targetElement) || this.cancelNextClick) {
+
+		// Prevent any user-added listeners declared on FastClick element from being fired.
+		if (event.stopImmediatePropagation) {
+			event.stopImmediatePropagation();
+		} else {
+
+			// Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
+			event.propagationStopped = true;
+		}
+
+		// Cancel the event
+		event.stopPropagation();
+		event.preventDefault();
+
+		return false;
+	}
+
+	// If the mouse event is permitted, return true for the action to go through.
+	return true;
+};
+
+
+/**
+ * On actual clicks, determine whether this is a touch-generated click, a click action occurring
+ * naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or
+ * an actual click which should be permitted.
+ *
+ * @param {Event} event
+ * @returns {boolean}
+ */
+FastClick.prototype.onClick = function(event) {
+	'use strict';
+	var permitted;
+
+	// It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early.
+	if (this.trackingClick) {
+		this.targetElement = null;
+		this.trackingClick = false;
+		return true;
+	}
+
+	// Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target.
+	if (event.target.type === 'submit' && event.detail === 0) {
+		return true;
+	}
+
+	permitted = this.onMouse(event);
+
+	// Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through.
+	if (!permitted) {
+		this.targetElement = null;
+	}
+
+	// If clicks are permitted, return true for the action to go through.
+	return permitted;
+};
+
+
+/**
+ * Remove all FastClick's event listeners.
+ *
+ * @returns {void}
+ */
+FastClick.prototype.destroy = function() {
+	'use strict';
+	var layer = this.layer;
+
+	if (deviceIsAndroid) {
+		layer.removeEventListener('mouseover', this.onMouse, true);
+		layer.removeEventListener('mousedown', this.onMouse, true);
+		layer.removeEventListener('mouseup', this.onMouse, true);
+	}
+
+	layer.removeEventListener('click', this.onClick, true);
+	layer.removeEventListener('touchstart', this.onTouchStart, false);
+	layer.removeEventListener('touchmove', this.onTouchMove, false);
+	layer.removeEventListener('touchend', this.onTouchEnd, false);
+	layer.removeEventListener('touchcancel', this.onTouchCancel, false);
+};
+
+
+/**
+ * Check whether FastClick is needed.
+ *
+ * @param {Element} layer The layer to listen on
+ */
+FastClick.notNeeded = function(layer) {
+	'use strict';
+	var metaViewport;
+	var chromeVersion;
+	var blackberryVersion;
+
+	// Devices that don't support touch don't need FastClick
+	if (typeof window.ontouchstart === 'undefined') {
+		return true;
+	}
+
+	// Chrome version - zero for other browsers
+	chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];
+
+	if (chromeVersion) {
+
+		if (deviceIsAndroid) {
+			metaViewport = document.querySelector('meta[name=viewport]');
+
+			if (metaViewport) {
+				// Chrome on Android with user-scalable="no" doesn't need FastClick (issue #89)
+				if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
+					return true;
+				}
+				// Chrome 32 and above with width=device-width or less don't need FastClick
+				if (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) {
+					return true;
+				}
+			}
+
+		// Chrome desktop doesn't need FastClick (issue #15)
+		} else {
+			return true;
+		}
+	}
+
+	if (deviceIsBlackBerry10) {
+		blackberryVersion = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/);
+
+		// BlackBerry 10.3+ does not require Fastclick library.
+		// https://github.com/ftlabs/fastclick/issues/251
+		if (blackberryVersion[1] >= 10 && blackberryVersion[2] >= 3) {
+			metaViewport = document.querySelector('meta[name=viewport]');
+
+			if (metaViewport) {
+				// user-scalable=no eliminates click delay.
+				if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
+					return true;
+				}
+				// width=device-width (or less than device-width) eliminates click delay.
+				if (document.documentElement.scrollWidth <= window.outerWidth) {
+					return true;
+				}
+			}
+		}
+	}
+
+	// IE10 with -ms-touch-action: none, which disables double-tap-to-zoom (issue #97)
+	if (layer.style.msTouchAction === 'none') {
+		return true;
+	}
+
+	return false;
+};
+
+
+/**
+ * Factory method for creating a FastClick object
+ *
+ * @param {Element} layer The layer to listen on
+ * @param {Object} options The options to override the defaults
+ */
+FastClick.attach = function(layer, options) {
+	'use strict';
+	return new FastClick(layer, options);
+};
+
+
+if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
+
+	// AMD. Register as an anonymous module.
+	define(function() {
+		'use strict';
+		return FastClick;
+	});
+} else if (typeof module !== 'undefined' && module.exports) {
+	module.exports = FastClick.attach;
+	module.exports.FastClick = FastClick;
+} else {
+	window.FastClick = FastClick;
+}

+ 33 - 0
sites/all/themes/gui/jee/bower_components/foundation/.bower.json

@@ -0,0 +1,33 @@
+{
+  "name": "foundation",
+  "version": "5.5.0",
+  "main": [
+    "css/foundation.css",
+    "css/foundation.css.map",
+    "js/foundation.js"
+  ],
+  "ignore": [],
+  "dependencies": {
+    "jquery": ">= 2.1.0",
+    "modernizr": ">= 2.7.2",
+    "fastclick": ">=0.6.11",
+    "jquery.cookie": "~1.4.0",
+    "jquery-placeholder": "~2.0.7"
+  },
+  "devDependencies": {
+    "jquery.autocomplete": "devbridge/jQuery-Autocomplete#1.2.9",
+    "lodash": "~2.4.1"
+  },
+  "private": true,
+  "homepage": "https://github.com/zurb/bower-foundation",
+  "_release": "5.5.0",
+  "_resolution": {
+    "type": "version",
+    "tag": "5.5.0",
+    "commit": "902d023fac6c4aab3e5e946575a20a0e2a6cf156"
+  },
+  "_source": "git://github.com/zurb/bower-foundation.git",
+  "_target": "~5.5.0",
+  "_originalSource": "foundation",
+  "_direct": true
+}

+ 23 - 0
sites/all/themes/gui/jee/bower_components/foundation/bower.json

@@ -0,0 +1,23 @@
+{
+  "name": "foundation",
+  "version": "5.5.0",
+  "main": [
+    "css/foundation.css",
+    "css/foundation.css.map",
+    "js/foundation.js"
+  ],
+  "ignore": [
+  ],
+  "dependencies": {
+    "jquery": ">= 2.1.0",
+    "modernizr": ">= 2.7.2",
+    "fastclick": ">=0.6.11",
+    "jquery.cookie": "~1.4.0",
+    "jquery-placeholder": "~2.0.7"
+  },
+  "devDependencies": {
+    "jquery.autocomplete": "devbridge/jQuery-Autocomplete#1.2.9",
+    "lodash": "~2.4.1"
+  },
+  "private": true
+}

Diferenças do arquivo suprimidas por serem muito extensas
+ 2744 - 0
sites/all/themes/gui/jee/bower_components/foundation/css/foundation.css


Diferenças do arquivo suprimidas por serem muito extensas
+ 2 - 0
sites/all/themes/gui/jee/bower_components/foundation/css/foundation.css.map


+ 359 - 0
sites/all/themes/gui/jee/bower_components/foundation/css/normalize.css

@@ -0,0 +1,359 @@
+/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
+/**
+ * 1. Set default font family to sans-serif.
+ * 2. Prevent iOS text size adjust after orientation change, without disabling
+ *    user zoom.
+ */
+html {
+  font-family: sans-serif;
+  /* 1 */
+  -ms-text-size-adjust: 100%;
+  /* 2 */
+  -webkit-text-size-adjust: 100%;
+  /* 2 */ }
+
+/**
+ * Remove default margin.
+ */
+body {
+  margin: 0; }
+
+/* HTML5 display definitions
+   ========================================================================== */
+/**
+ * Correct `block` display not defined for any HTML5 element in IE 8/9.
+ * Correct `block` display not defined for `details` or `summary` in IE 10/11
+ * and Firefox.
+ * Correct `block` display not defined for `main` in IE 11.
+ */
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+menu,
+nav,
+section,
+summary {
+  display: block; }
+
+/**
+ * 1. Correct `inline-block` display not defined in IE 8/9.
+ * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
+ */
+audio,
+canvas,
+progress,
+video {
+  display: inline-block;
+  /* 1 */
+  vertical-align: baseline;
+  /* 2 */ }
+
+/**
+ * Prevent modern browsers from displaying `audio` without controls.
+ * Remove excess height in iOS 5 devices.
+ */
+audio:not([controls]) {
+  display: none;
+  height: 0; }
+
+/**
+ * Address `[hidden]` styling not present in IE 8/9/10.
+ * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
+ */
+[hidden],
+template {
+  display: none; }
+
+/* Links
+   ========================================================================== */
+/**
+ * Remove the gray background color from active links in IE 10.
+ */
+a {
+  background-color: transparent; }
+
+/**
+ * Improve readability when focused and also mouse hovered in all browsers.
+ */
+a:active,
+a:hover {
+  outline: 0; }
+
+/* Text-level semantics
+   ========================================================================== */
+/**
+ * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
+ */
+abbr[title] {
+  border-bottom: 1px dotted; }
+
+/**
+ * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
+ */
+b,
+strong {
+  font-weight: bold; }
+
+/**
+ * Address styling not present in Safari and Chrome.
+ */
+dfn {
+  font-style: italic; }
+
+/**
+ * Address variable `h1` font-size and margin within `section` and `article`
+ * contexts in Firefox 4+, Safari, and Chrome.
+ */
+h1 {
+  font-size: 2em;
+  margin: 0.67em 0; }
+
+/**
+ * Address styling not present in IE 8/9.
+ */
+mark {
+  background: #ff0;
+  color: #000; }
+
+/**
+ * Address inconsistent and variable font size in all browsers.
+ */
+small {
+  font-size: 80%; }
+
+/**
+ * Prevent `sub` and `sup` affecting `line-height` in all browsers.
+ */
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline; }
+
+sup {
+  top: -0.5em; }
+
+sub {
+  bottom: -0.25em; }
+
+/* Embedded content
+   ========================================================================== */
+/**
+ * Remove border when inside `a` element in IE 8/9/10.
+ */
+img {
+  border: 0; }
+
+/**
+ * Correct overflow not hidden in IE 9/10/11.
+ */
+svg:not(:root) {
+  overflow: hidden; }
+
+/* Grouping content
+   ========================================================================== */
+/**
+ * Address margin not present in IE 8/9 and Safari.
+ */
+figure {
+  margin: 1em 40px; }
+
+/**
+ * Address differences between Firefox and other browsers.
+ */
+hr {
+  -moz-box-sizing: content-box;
+  box-sizing: content-box;
+  height: 0; }
+
+/**
+ * Contain overflow in all browsers.
+ */
+pre {
+  overflow: auto; }
+
+/**
+ * Address odd `em`-unit font size rendering in all browsers.
+ */
+code,
+kbd,
+pre,
+samp {
+  font-family: monospace, monospace;
+  font-size: 1em; }
+
+/* Forms
+   ========================================================================== */
+/**
+ * Known limitation: by default, Chrome and Safari on OS X allow very limited
+ * styling of `select`, unless a `border` property is set.
+ */
+/**
+ * 1. Correct color not being inherited.
+ *    Known issue: affects color of disabled elements.
+ * 2. Correct font properties not being inherited.
+ * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
+ */
+button,
+input,
+optgroup,
+select,
+textarea {
+  color: inherit;
+  /* 1 */
+  font: inherit;
+  /* 2 */
+  margin: 0;
+  /* 3 */ }
+
+/**
+ * Address `overflow` set to `hidden` in IE 8/9/10/11.
+ */
+button {
+  overflow: visible; }
+
+/**
+ * Address inconsistent `text-transform` inheritance for `button` and `select`.
+ * All other form control elements do not inherit `text-transform` values.
+ * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
+ * Correct `select` style inheritance in Firefox.
+ */
+button,
+select {
+  text-transform: none; }
+
+/**
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
+ *    and `video` controls.
+ * 2. Correct inability to style clickable `input` types in iOS.
+ * 3. Improve usability and consistency of cursor style between image-type
+ *    `input` and others.
+ */
+button,
+html input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+  -webkit-appearance: button;
+  /* 2 */
+  cursor: pointer;
+  /* 3 */ }
+
+/**
+ * Re-set default cursor for disabled elements.
+ */
+button[disabled],
+html input[disabled] {
+  cursor: default; }
+
+/**
+ * Remove inner padding and border in Firefox 4+.
+ */
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+  border: 0;
+  padding: 0; }
+
+/**
+ * Address Firefox 4+ setting `line-height` on `input` using `!important` in
+ * the UA stylesheet.
+ */
+input {
+  line-height: normal; }
+
+/**
+ * It's recommended that you don't attempt to style these elements.
+ * Firefox's implementation doesn't respect box-sizing, padding, or width.
+ *
+ * 1. Address box sizing set to `content-box` in IE 8/9/10.
+ * 2. Remove excess padding in IE 8/9/10.
+ */
+input[type="checkbox"],
+input[type="radio"] {
+  box-sizing: border-box;
+  /* 1 */
+  padding: 0;
+  /* 2 */ }
+
+/**
+ * Fix the cursor style for Chrome's increment/decrement buttons. For certain
+ * `font-size` values of the `input`, it causes the cursor style of the
+ * decrement button to change from `default` to `text`.
+ */
+input[type="number"]::-webkit-inner-spin-button,
+input[type="number"]::-webkit-outer-spin-button {
+  height: auto; }
+
+/**
+ * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
+ * 2. Address `box-sizing` set to `border-box` in Safari and Chrome
+ *    (include `-moz` to future-proof).
+ */
+input[type="search"] {
+  -webkit-appearance: textfield;
+  /* 1 */
+  -moz-box-sizing: content-box;
+  -webkit-box-sizing: content-box;
+  /* 2 */
+  box-sizing: content-box; }
+
+/**
+ * Remove inner padding and search cancel button in Safari and Chrome on OS X.
+ * Safari (but not Chrome) clips the cancel button when the search input has
+ * padding (and `textfield` appearance).
+ */
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none; }
+
+/**
+ * Define consistent border, margin, and padding.
+ */
+fieldset {
+  border: 1px solid #c0c0c0;
+  margin: 0 2px;
+  padding: 0.35em 0.625em 0.75em; }
+
+/**
+ * 1. Correct `color` not being inherited in IE 8/9/10/11.
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
+ */
+legend {
+  border: 0;
+  /* 1 */
+  padding: 0;
+  /* 2 */ }
+
+/**
+ * Remove default vertical scrollbar in IE 8/9/10/11.
+ */
+textarea {
+  overflow: auto; }
+
+/**
+ * Don't inherit the `font-weight` (applied by a rule above).
+ * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
+ */
+optgroup {
+  font-weight: bold; }
+
+/* Tables
+   ========================================================================== */
+/**
+ * Remove most spacing between table cells.
+ */
+table {
+  border-collapse: collapse;
+  border-spacing: 0; }
+
+td,
+th {
+  padding: 0; }
+
+/*# sourceMappingURL=normalize.css.map */

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff