widget_list 1.3.4 → 1.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. data/.gitignore +35 -35
  2. data/Gemfile +3 -3
  3. data/LICENSE.txt +21 -21
  4. data/README.md +736 -728
  5. data/Rakefile +1 -1
  6. data/app/views/widget_list/_condition_fields.html.erb +0 -0
  7. data/app/views/widget_list/_ransack_fields.html.erb +0 -0
  8. data/app/views/widget_list/_ransack_widget_list_advanced_search.html.erb +0 -0
  9. data/app/views/widget_list/administration/_button_row.html.erb +13 -13
  10. data/app/views/widget_list/administration/_checkbox_row.html.erb +18 -18
  11. data/app/views/widget_list/administration/_field_row.html.erb +11 -11
  12. data/app/views/widget_list/administration/_output.html.erb +1100 -1100
  13. data/app/views/widget_list/administration/_output_save.html.erb +1 -1
  14. data/app/views/widget_list/list_partials/_col.html.erb +0 -0
  15. data/app/views/widget_list/list_partials/_list_description.html.erb +2 -2
  16. data/app/views/widget_list/list_partials/_no_sort_column.html.erb +0 -0
  17. data/app/views/widget_list/list_partials/_outer_shell.html.erb +0 -0
  18. data/app/views/widget_list/list_partials/_pagination_jump_active.html.erb +0 -0
  19. data/app/views/widget_list/list_partials/_pagination_jump_unactive.html.erb +0 -0
  20. data/app/views/widget_list/list_partials/_pagination_next_active.html.erb +0 -0
  21. data/app/views/widget_list/list_partials/_pagination_next_disabled.html.erb +0 -0
  22. data/app/views/widget_list/list_partials/_pagination_previous_active.html.erb +0 -0
  23. data/app/views/widget_list/list_partials/_pagination_previous_disabled.html.erb +0 -0
  24. data/app/views/widget_list/list_partials/_pagination_wrapper.html.erb +0 -0
  25. data/app/views/widget_list/list_partials/_row.html.erb +0 -0
  26. data/app/views/widget_list/list_partials/_sequence.html.erb +0 -0
  27. data/app/views/widget_list/list_partials/_sort_column.html.erb +0 -0
  28. data/checkin_gem.sh +0 -0
  29. data/lib/extensions/action_controller_base.rb +33 -33
  30. data/lib/widget_list.rb +4685 -4389
  31. data/lib/widget_list/engine.rb +8 -8
  32. data/lib/widget_list/hash.rb +113 -113
  33. data/lib/widget_list/md5.rb +18 -18
  34. data/lib/widget_list/railtie.rb +42 -42
  35. data/lib/widget_list/sequel.rb +287 -218
  36. data/lib/widget_list/string.rb +41 -41
  37. data/lib/widget_list/tpl.rb +185 -185
  38. data/lib/widget_list/utils.rb +92 -92
  39. data/lib/widget_list/version.rb +3 -3
  40. data/lib/widget_list/widgets.rb +756 -756
  41. data/publish_gem.sh +37 -37
  42. data/vendor/assets/images/gobblecons/README.rtf +127 -127
  43. data/vendor/assets/javascripts/widget_list.js +795 -795
  44. data/vendor/assets/stylesheets/widget_list.css +813 -813
  45. data/vendor/assets/stylesheets/widgets.css +116 -116
  46. data/widget_list.gemspec +38 -38
  47. metadata +63 -54
@@ -1,37 +1,37 @@
1
- #these scripts will create a new gem, mount a vendor folder and publish the gem
2
-
3
- CAMELCASE=WidgetList
4
- GEMNAME=widget_list
5
-
6
- rvm gemset create $GEMNAME
7
- rvm gemset use $GEMNAME
8
- gem install bundler
9
- bundle gem $GEMNAME
10
- #chown wcapp:wcapp -R $GEMNAME/*
11
- cd $GEMNAME/
12
- mkdir -p vendor/assets/{images,javascripts,stylesheets}
13
- touch vendor/assets/javascripts/$GEMNAME.js
14
- touch vendor/assets/stylesheets/$GEMNAME.css
15
- touch lib/$GEMNAME/engine.rb
16
- echo 'Add require "'$GEMNAME'/engine" to lib/'$GEMNAME'.rb'
17
- echo 'Next Add //= require '$GEMNAME' to application.js in your rails application'
18
- echo 'Next Add *= require '$GEMNAME' to application.css in your rails application'
19
- echo 'module '$CAMELCASE > lib/$GEMNAME/engine.rb
20
- echo ' class Engine < Rails::Engine' >> lib/$GEMNAME/engine.rb
21
- echo ' # auto wire' >> lib/$GEMNAME/engine.rb
22
- echo " initializer '""$GEMNAME"".load_static_assets' do |app|" >> lib/$GEMNAME/engine.rb
23
- echo ' app.middleware.use ::ActionDispatch::Static, "#{root}/vendor"' >> lib/$GEMNAME/engine.rb
24
- echo ' end' >> lib/$GEMNAME/engine.rb
25
- echo ' end' >> lib/$GEMNAME/engine.rb
26
- echo 'end' >> lib/$GEMNAME/engine.rb
27
-
28
- #to publish it
29
- #curl -u incubus158 https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials
30
-
31
- #first edit version.rb and increment it to your new version, then run this
32
- gem build *gemspec | awk 'NR==4{print $2}' > tmpfile.txt
33
- GEMBUILD=`cat tmpfile.txt`
34
- gem push $GEMBUILD
35
- rm tmpfile.txt $GEMBUILD
36
-
37
-
1
+ #these scripts will create a new gem, mount a vendor folder and publish the gem
2
+
3
+ CAMELCASE=WidgetList
4
+ GEMNAME=widget_list
5
+
6
+ rvm gemset create $GEMNAME
7
+ rvm gemset use $GEMNAME
8
+ gem install bundler
9
+ bundle gem $GEMNAME
10
+ #chown wcapp:wcapp -R $GEMNAME/*
11
+ cd $GEMNAME/
12
+ mkdir -p vendor/assets/{images,javascripts,stylesheets}
13
+ touch vendor/assets/javascripts/$GEMNAME.js
14
+ touch vendor/assets/stylesheets/$GEMNAME.css
15
+ touch lib/$GEMNAME/engine.rb
16
+ echo 'Add require "'$GEMNAME'/engine" to lib/'$GEMNAME'.rb'
17
+ echo 'Next Add //= require '$GEMNAME' to application.js in your rails application'
18
+ echo 'Next Add *= require '$GEMNAME' to application.css in your rails application'
19
+ echo 'module '$CAMELCASE > lib/$GEMNAME/engine.rb
20
+ echo ' class Engine < Rails::Engine' >> lib/$GEMNAME/engine.rb
21
+ echo ' # auto wire' >> lib/$GEMNAME/engine.rb
22
+ echo " initializer '""$GEMNAME"".load_static_assets' do |app|" >> lib/$GEMNAME/engine.rb
23
+ echo ' app.middleware.use ::ActionDispatch::Static, "#{root}/vendor"' >> lib/$GEMNAME/engine.rb
24
+ echo ' end' >> lib/$GEMNAME/engine.rb
25
+ echo ' end' >> lib/$GEMNAME/engine.rb
26
+ echo 'end' >> lib/$GEMNAME/engine.rb
27
+
28
+ #to publish it
29
+ #curl -u incubus158 https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials
30
+
31
+ #first edit version.rb and increment it to your new version, then run this
32
+ gem build *gemspec | awk 'NR==4{print $2}' > tmpfile.txt
33
+ GEMBUILD=`cat tmpfile.txt`
34
+ gem push $GEMBUILD
35
+ rm tmpfile.txt $GEMBUILD
36
+
37
+
@@ -1,128 +1,128 @@
1
- {\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470
2
- {\fonttbl\f0\fswiss\fcharset0 ArialMT;}
3
- {\colortbl;\red255\green255\blue255;\red38\green38\blue38;\red255\green255\blue255;\red26\green26\blue26;
4
- }
5
- {\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{lower-alpha\}.}{\leveltext\leveltemplateid1\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listname ;}\listid1}
6
- {\list\listtemplateid2\listhybrid{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{lower-alpha\}.}{\leveltext\leveltemplateid101\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listlevel\levelnfc2\levelnfcn2\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{lower-roman\}.}{\leveltext\leveltemplateid102\'02\'01.;}{\levelnumbers\'01;}\fi-360\li1440\lin1440 }{\listname ;}\listid2}
7
- {\list\listtemplateid3\listhybrid{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{lower-alpha\}.}{\leveltext\leveltemplateid201\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listname ;}\listid3}
8
- {\list\listtemplateid4\listhybrid{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{lower-alpha\}.}{\leveltext\leveltemplateid301\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listname ;}\listid4}
9
- {\list\listtemplateid5\listhybrid{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{lower-alpha\}.}{\leveltext\leveltemplateid401\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listname ;}\listid5}}
10
- {\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}{\listoverride\listid3\listoverridecount0\ls3}{\listoverride\listid4\listoverridecount0\ls4}{\listoverride\listid5\listoverridecount0\ls5}}
11
- {\info
12
- {\*\company Gobble Logic}}\margl1440\margr1440\vieww12640\viewh18260\viewkind0
13
- \deftab720
14
- \pard\pardeftab720\sl320\sa360
15
-
16
- \f0\b\fs30 \cf2 \cb3 Gobblicons by Gobble Logic\
17
- Original Author: Alison Foxall\
18
- URI: http://gobblelogic.com or http://alisonfoxall.com\
19
- -------------------\
20
- This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.\
21
- \pard\pardeftab720\sl320\sa360
22
-
23
- \i \cf2 \
24
- License
25
- \i0 \
26
- \pard\pardeftab720\sl320\sa260
27
-
28
- \b0\fs26 \cf2 THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.\
29
- BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.\
30
- \pard\pardeftab720\sl320\sa260
31
-
32
- \b \cf2 1. Definitions
33
- \b0 \
34
- \pard\tx220\tx720\pardeftab720\li720\fi-720\sl320\sa160
35
- \ls1\ilvl0
36
- \b \cf4 {\listtext a. }"Adaptation"
37
- \b0 \cf2 means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License.\
38
- \ls1\ilvl0
39
- \b \cf4 {\listtext b. }"Collection"
40
- \b0 \cf2 means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined below) for the purposes of this License.\
41
- \ls1\ilvl0
42
- \b \cf4 {\listtext c. }"Creative Commons Compatible License"
43
- \b0 \cf2 means a license that is listed at http://creativecommons.org/compatiblelicenses that has been approved by Creative Commons as being essentially equivalent to this License, including, at a minimum, because that license: (i) contains terms that have the same purpose, meaning and effect as the License Elements of this License; and, (ii) explicitly permits the relicensing of adaptations of works made available under that license under this License or a Creative Commons jurisdiction license with the same License Elements as this License.\
44
- \ls1\ilvl0
45
- \b \cf4 {\listtext d. }"Distribute"
46
- \b0 \cf2 means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership.\
47
- \ls1\ilvl0
48
- \b \cf4 {\listtext e. }"License Elements"
49
- \b0 \cf2 means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike.\
50
- \ls1\ilvl0
51
- \b \cf4 {\listtext f. }"Licensor"
52
- \b0 \cf2 means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.\
53
- \ls1\ilvl0
54
- \b \cf4 {\listtext g. }"Original Author"
55
- \b0 \cf2 means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.\
56
- \ls1\ilvl0
57
- \b \cf4 {\listtext h. }"Work"
58
- \b0 \cf2 means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work.\
59
- \ls1\ilvl0
60
- \b \cf4 {\listtext i. }"You"
61
- \b0 \cf2 means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.\
62
- \ls1\ilvl0
63
- \b \cf4 {\listtext j. }"Publicly Perform"
64
- \b0 \cf2 means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.\
65
- \ls1\ilvl0
66
- \b \cf4 {\listtext k. }"Reproduce"
67
- \b0 \cf2 means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium.\
68
- \pard\pardeftab720\sl320\sa260
69
-
70
- \b \cf2 2. Fair Dealing Rights.
71
- \b0 Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws.\
72
-
73
- \b 3. License Grant.
74
- \b0 Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:\
75
- \pard\tx220\tx720\pardeftab720\li720\fi-720\sl320\sa160
76
- \ls2\ilvl0\cf2 {\listtext a. }to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections;\
77
- {\listtext b. }to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified.";\
78
- {\listtext c. }to Distribute and Publicly Perform the Work including as incorporated in Collections; and,\
79
- {\listtext d. }to Distribute and Publicly Perform Adaptations.\
80
- \pard\tx220\tx720\pardeftab720\li720\fi-720\sl320\sa260
81
- \ls2\ilvl0\cf2 {\listtext e. }For the avoidance of doubt:\
82
- \pard\tx940\tx1440\pardeftab720\li1440\fi-1440\sl320\sa160
83
- \ls2\ilvl1
84
- \b \cf4 {\listtext i. }Non-waivable Compulsory License Schemes
85
- \b0 \cf2 . In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License;\
86
- \ls2\ilvl1
87
- \b \cf4 {\listtext ii. }Waivable Compulsory License Schemes
88
- \b0 \cf2 . In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and,\
89
- \ls2\ilvl1
90
- \b \cf4 {\listtext iii. }Voluntary License Schemes
91
- \b0 \cf2 . The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License.\
92
- \pard\pardeftab720\sl320\sa260
93
- \cf2 The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved.\
94
- \pard\pardeftab720\sl320\sa260
95
-
96
- \b \cf2 4. Restrictions.
97
- \b0 The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:\
98
- \pard\tx220\tx720\pardeftab720\li720\fi-720\sl320\sa160
99
- \ls3\ilvl0\cf2 {\listtext a. }You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(c), as requested.\
100
- {\listtext b. }You may Distribute or Publicly Perform an Adaptation only under the terms of: (i) this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license (either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible License. If you license the Adaptation under one of the licenses mentioned in (iv), you must comply with the terms of that license. If you license the Adaptation under the terms of any of the licenses mentioned in (i), (ii) or (iii) (the "Applicable License"), you must comply with the terms of the Applicable License generally and the following provisions: (I) You must include a copy of, or the URI for, the Applicable License with every copy of each Adaptation You Distribute or Publicly Perform; (II) You may not offer or impose any terms on the Adaptation that restrict the terms of the Applicable License or the ability of the recipient of the Adaptation to exercise the rights granted to that recipient under the terms of the Applicable License; (III) You must keep intact all notices that refer to the Applicable License and to the disclaimer of warranties with every copy of the Work as included in the Adaptation You Distribute or Publicly Perform; (IV) when You Distribute or Publicly Perform the Adaptation, You may not impose any effective technological measures on the Adaptation that restrict the ability of a recipient of the Adaptation from You to exercise the rights granted to that recipient under the terms of the Applicable License. This Section 4(b) applies to the Adaptation as incorporated in a Collection, but this does not require the Collection apart from the Adaptation itself to be made subject to the terms of the Applicable License.\
101
- {\listtext c. }If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Ssection 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.\
102
- {\listtext d. }Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise.\
103
- \pard\pardeftab720\sl320\sa260
104
-
105
- \b \cf2 5. Representations, Warranties and Disclaimer
106
- \b0 \
107
- UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.\
108
-
109
- \b 6. Limitation on Liability.
110
- \b0 EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\
111
-
112
- \b 7. Termination
113
- \b0 \
114
- \pard\tx220\tx720\pardeftab720\li720\fi-720\sl320\sa160
115
- \ls4\ilvl0\cf2 {\listtext a. }This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.\
116
- {\listtext b. }Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.\
117
- \pard\pardeftab720\sl320\sa260
118
-
119
- \b \cf2 8. Miscellaneous
120
- \b0 \
121
- \pard\tx220\tx720\pardeftab720\li720\fi-720\sl320\sa160
122
- \ls5\ilvl0\cf2 {\listtext a. }Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.\
123
- {\listtext b. }Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.\
124
- {\listtext c. }If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.\
125
- {\listtext d. }No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.\
126
- {\listtext e. }This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.\
127
- {\listtext f. }The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law.\
1
+ {\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470
2
+ {\fonttbl\f0\fswiss\fcharset0 ArialMT;}
3
+ {\colortbl;\red255\green255\blue255;\red38\green38\blue38;\red255\green255\blue255;\red26\green26\blue26;
4
+ }
5
+ {\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{lower-alpha\}.}{\leveltext\leveltemplateid1\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listname ;}\listid1}
6
+ {\list\listtemplateid2\listhybrid{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{lower-alpha\}.}{\leveltext\leveltemplateid101\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listlevel\levelnfc2\levelnfcn2\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{lower-roman\}.}{\leveltext\leveltemplateid102\'02\'01.;}{\levelnumbers\'01;}\fi-360\li1440\lin1440 }{\listname ;}\listid2}
7
+ {\list\listtemplateid3\listhybrid{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{lower-alpha\}.}{\leveltext\leveltemplateid201\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listname ;}\listid3}
8
+ {\list\listtemplateid4\listhybrid{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{lower-alpha\}.}{\leveltext\leveltemplateid301\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listname ;}\listid4}
9
+ {\list\listtemplateid5\listhybrid{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{lower-alpha\}.}{\leveltext\leveltemplateid401\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listname ;}\listid5}}
10
+ {\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}{\listoverride\listid3\listoverridecount0\ls3}{\listoverride\listid4\listoverridecount0\ls4}{\listoverride\listid5\listoverridecount0\ls5}}
11
+ {\info
12
+ {\*\company Gobble Logic}}\margl1440\margr1440\vieww12640\viewh18260\viewkind0
13
+ \deftab720
14
+ \pard\pardeftab720\sl320\sa360
15
+
16
+ \f0\b\fs30 \cf2 \cb3 Gobblicons by Gobble Logic\
17
+ Original Author: Alison Foxall\
18
+ URI: http://gobblelogic.com or http://alisonfoxall.com\
19
+ -------------------\
20
+ This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.\
21
+ \pard\pardeftab720\sl320\sa360
22
+
23
+ \i \cf2 \
24
+ License
25
+ \i0 \
26
+ \pard\pardeftab720\sl320\sa260
27
+
28
+ \b0\fs26 \cf2 THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.\
29
+ BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.\
30
+ \pard\pardeftab720\sl320\sa260
31
+
32
+ \b \cf2 1. Definitions
33
+ \b0 \
34
+ \pard\tx220\tx720\pardeftab720\li720\fi-720\sl320\sa160
35
+ \ls1\ilvl0
36
+ \b \cf4 {\listtext a. }"Adaptation"
37
+ \b0 \cf2 means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License.\
38
+ \ls1\ilvl0
39
+ \b \cf4 {\listtext b. }"Collection"
40
+ \b0 \cf2 means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined below) for the purposes of this License.\
41
+ \ls1\ilvl0
42
+ \b \cf4 {\listtext c. }"Creative Commons Compatible License"
43
+ \b0 \cf2 means a license that is listed at http://creativecommons.org/compatiblelicenses that has been approved by Creative Commons as being essentially equivalent to this License, including, at a minimum, because that license: (i) contains terms that have the same purpose, meaning and effect as the License Elements of this License; and, (ii) explicitly permits the relicensing of adaptations of works made available under that license under this License or a Creative Commons jurisdiction license with the same License Elements as this License.\
44
+ \ls1\ilvl0
45
+ \b \cf4 {\listtext d. }"Distribute"
46
+ \b0 \cf2 means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership.\
47
+ \ls1\ilvl0
48
+ \b \cf4 {\listtext e. }"License Elements"
49
+ \b0 \cf2 means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike.\
50
+ \ls1\ilvl0
51
+ \b \cf4 {\listtext f. }"Licensor"
52
+ \b0 \cf2 means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.\
53
+ \ls1\ilvl0
54
+ \b \cf4 {\listtext g. }"Original Author"
55
+ \b0 \cf2 means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.\
56
+ \ls1\ilvl0
57
+ \b \cf4 {\listtext h. }"Work"
58
+ \b0 \cf2 means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work.\
59
+ \ls1\ilvl0
60
+ \b \cf4 {\listtext i. }"You"
61
+ \b0 \cf2 means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.\
62
+ \ls1\ilvl0
63
+ \b \cf4 {\listtext j. }"Publicly Perform"
64
+ \b0 \cf2 means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.\
65
+ \ls1\ilvl0
66
+ \b \cf4 {\listtext k. }"Reproduce"
67
+ \b0 \cf2 means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium.\
68
+ \pard\pardeftab720\sl320\sa260
69
+
70
+ \b \cf2 2. Fair Dealing Rights.
71
+ \b0 Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws.\
72
+
73
+ \b 3. License Grant.
74
+ \b0 Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:\
75
+ \pard\tx220\tx720\pardeftab720\li720\fi-720\sl320\sa160
76
+ \ls2\ilvl0\cf2 {\listtext a. }to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections;\
77
+ {\listtext b. }to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified.";\
78
+ {\listtext c. }to Distribute and Publicly Perform the Work including as incorporated in Collections; and,\
79
+ {\listtext d. }to Distribute and Publicly Perform Adaptations.\
80
+ \pard\tx220\tx720\pardeftab720\li720\fi-720\sl320\sa260
81
+ \ls2\ilvl0\cf2 {\listtext e. }For the avoidance of doubt:\
82
+ \pard\tx940\tx1440\pardeftab720\li1440\fi-1440\sl320\sa160
83
+ \ls2\ilvl1
84
+ \b \cf4 {\listtext i. }Non-waivable Compulsory License Schemes
85
+ \b0 \cf2 . In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License;\
86
+ \ls2\ilvl1
87
+ \b \cf4 {\listtext ii. }Waivable Compulsory License Schemes
88
+ \b0 \cf2 . In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and,\
89
+ \ls2\ilvl1
90
+ \b \cf4 {\listtext iii. }Voluntary License Schemes
91
+ \b0 \cf2 . The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License.\
92
+ \pard\pardeftab720\sl320\sa260
93
+ \cf2 The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved.\
94
+ \pard\pardeftab720\sl320\sa260
95
+
96
+ \b \cf2 4. Restrictions.
97
+ \b0 The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:\
98
+ \pard\tx220\tx720\pardeftab720\li720\fi-720\sl320\sa160
99
+ \ls3\ilvl0\cf2 {\listtext a. }You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(c), as requested.\
100
+ {\listtext b. }You may Distribute or Publicly Perform an Adaptation only under the terms of: (i) this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license (either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible License. If you license the Adaptation under one of the licenses mentioned in (iv), you must comply with the terms of that license. If you license the Adaptation under the terms of any of the licenses mentioned in (i), (ii) or (iii) (the "Applicable License"), you must comply with the terms of the Applicable License generally and the following provisions: (I) You must include a copy of, or the URI for, the Applicable License with every copy of each Adaptation You Distribute or Publicly Perform; (II) You may not offer or impose any terms on the Adaptation that restrict the terms of the Applicable License or the ability of the recipient of the Adaptation to exercise the rights granted to that recipient under the terms of the Applicable License; (III) You must keep intact all notices that refer to the Applicable License and to the disclaimer of warranties with every copy of the Work as included in the Adaptation You Distribute or Publicly Perform; (IV) when You Distribute or Publicly Perform the Adaptation, You may not impose any effective technological measures on the Adaptation that restrict the ability of a recipient of the Adaptation from You to exercise the rights granted to that recipient under the terms of the Applicable License. This Section 4(b) applies to the Adaptation as incorporated in a Collection, but this does not require the Collection apart from the Adaptation itself to be made subject to the terms of the Applicable License.\
101
+ {\listtext c. }If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Ssection 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.\
102
+ {\listtext d. }Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise.\
103
+ \pard\pardeftab720\sl320\sa260
104
+
105
+ \b \cf2 5. Representations, Warranties and Disclaimer
106
+ \b0 \
107
+ UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.\
108
+
109
+ \b 6. Limitation on Liability.
110
+ \b0 EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\
111
+
112
+ \b 7. Termination
113
+ \b0 \
114
+ \pard\tx220\tx720\pardeftab720\li720\fi-720\sl320\sa160
115
+ \ls4\ilvl0\cf2 {\listtext a. }This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.\
116
+ {\listtext b. }Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.\
117
+ \pard\pardeftab720\sl320\sa260
118
+
119
+ \b \cf2 8. Miscellaneous
120
+ \b0 \
121
+ \pard\tx220\tx720\pardeftab720\li720\fi-720\sl320\sa160
122
+ \ls5\ilvl0\cf2 {\listtext a. }Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.\
123
+ {\listtext b. }Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.\
124
+ {\listtext c. }If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.\
125
+ {\listtext d. }No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.\
126
+ {\listtext e. }This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.\
127
+ {\listtext f. }The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law.\
128
128
  }
@@ -1,795 +1,795 @@
1
-
2
- var debugFlag = 0;
3
- var debugContainer = '';
4
-
5
-
6
- /**
7
- * ListSearchAheadResponse()
8
- */
9
- var ListSearchAheadGlobalElement = '';
10
- var ListSearchAheadQueueElement = '';
11
- var ListSearchAheadInProgress = false;
12
- var ListSearchAheadInProgressUrl;
13
- var ListSearchAheadInProgressTarget;
14
- var ListSearchAheadInProgressObj;
15
-
16
-
17
-
18
- var AjaxMaintainChecksRunning = false;
19
-
20
-
21
- function SearchWidgetList(url, listId, element)
22
- {
23
- var inputField = jQuery(element).closest('div.inputOuter').find('input.search-ahead');
24
-
25
- if(inputField.length)
26
- {
27
- ListSearchAheadQueue(url, listId, inputField);
28
- }
29
- }
30
-
31
- //simple version
32
- function RefreshList(list_id, callback)
33
- {
34
- ListJumpMin(jQuery('#' + list_id + '_jump_url').val(), list_id, callback);
35
- }
36
-
37
- /**
38
- * Debug()
39
- *
40
- * @param string what
41
- * @return void
42
- */
43
- function Debug(what)
44
- {
45
- if(debugFlag >= 1)
46
- {
47
- if(window.document.getElementById(debugContainer))
48
- {
49
- var time = new Date();
50
-
51
- element = window.document.getElementById(debugContainer);
52
-
53
- element.innerHTML += '<br/><span>' + time.getHours() + ':' + time.getMinutes() + ':' + time.getSeconds() + '</span> ' + what;
54
- element.scrollTop = element.scrollHeight;
55
- }
56
- }
57
- }
58
-
59
- /**
60
- * Redirect()
61
- *
62
- * @param string inUrl
63
- * @return void
64
- */
65
- function Redirect(inUrl)
66
- {
67
- if(typeof(inUrl) == 'string')
68
- {
69
- if(inUrl.length > 0)
70
- {
71
- window.location = inUrl;
72
- }
73
- else
74
- {
75
- throw('Missing URL input for Redirect()');
76
- }
77
- }
78
- else
79
- {
80
- throw('Invalid URL type input for Redirect()');
81
- }
82
- }
83
-
84
- function ButtonFormPost(theForm)
85
- {
86
- try
87
- {
88
- if (typeof(theForm) == "object")
89
- {
90
- theForm.submit();
91
- }
92
- else
93
- {
94
- if (document.getElementById(theForm) && typeof(theForm) !="undefined" && typeof(theForm) != 'null') {
95
- document.getElementById(theForm).submit();
96
- } else {
97
- throw new Exception();
98
- }
99
- }
100
- }
101
- catch(e)
102
- {
103
- // -- id might not be there, so try the form by name
104
- try
105
- {
106
- eval('document.' + theForm + '.submit()');
107
- }
108
- catch(e)
109
- {
110
- if (document.forms.length == 1)
111
- {
112
- document.forms[0].submit();
113
- }
114
- else
115
- {
116
- return false;
117
- }
118
- }
119
- }
120
- }
121
-
122
-
123
- function ButtonLinkPost(inUrl)
124
- {
125
- try
126
- {
127
- Redirect(inUrl);
128
- }
129
- catch(e)
130
- {
131
- if(debugFlag)
132
- {
133
- Debug(e);
134
- }
135
- }
136
- }
137
-
138
- function ajaxStatus(eToHide, fadeInOut)
139
- {
140
-
141
- if(document.getElementById(eToHide))
142
- {
143
- elmToHide = document.getElementById(eToHide);
144
-
145
- eHider = "loading" + eToHide;
146
-
147
- if(document.getElementById(eHider))
148
- {
149
- elmHider = document.getElementById(eHider);
150
- }
151
- else
152
- {
153
- var radius = '';
154
- if(document.getElementById(eToHide + '_radius'))
155
- {
156
- var radiusValue = document.getElementById(eToHide + '_radius').value;
157
- radius = '-moz-border-radius-bottomleft:' + radiusValue + ';-webkit-border-bottom-left-radius:' + radiusValue + ';border-bottom-left-radius:' + radiusValue + ';-moz-border-radius-bottomright:' + radiusValue + ';-webkit-border-bottom-right-radius:' + radiusValue + ';border-bottom-right-radius:' + radiusValue + ';-moz-border-radius-topright:' + radiusValue + ';-webkit-border-top-right-radius:' + radiusValue + ';border-top-right-radius:' + radiusValue + ';-moz-border-radius-topleft:' + radiusValue + ';-webkit-border-top-left-radius:' + radiusValue + ';border-top-left-radius:' + radiusValue + ';';
158
- }
159
- var overLay = '<div style="position:relative;top:0px;"><div class="ajaxLoad" id="' + eHider + '" style="height:' + jQuery(elmToHide).height() + 'px;width:' + jQuery(elmToHide).width() + 'px;top:-' + jQuery(elmToHide).height() + 'px;' + radius + '"></div></div>';
160
-
161
- jQuery(elmToHide).append(overLay);
162
-
163
- elmHider = document.getElementById(eHider);
164
- }
165
-
166
- if(typeof(fadeInOut) == 'number')
167
- {
168
- if(fadeInOut > 0)
169
- {
170
- fadeInOut = 1;
171
- jQuery(elmHider).fadeTo("fast", .20);
172
- }
173
- else
174
- {
175
- fadeInOut = 0;
176
- jQuery(elmHider).remove();
177
- }
178
- }
179
- }
180
- }
181
-
182
-
183
- function ListChangeGrouping(listId, obj, extra)
184
- {
185
- if (typeof(extra) == 'undefined')
186
- {
187
- var extra = '';
188
- }
189
- ajaxStatus(listId, 1);
190
- HideAdvancedSearch(jQuery('#' + listId + '-group'));
191
- jQuery('#list_search_id_' + listId ).val('');
192
- InitInfoFields(jQuery('#list_search_id_' + listId));
193
- ListJumpMin(jQuery('#' + listId + '_jump_url').val() + '&searchClear=1&switch_grouping=' + jQuery('#list_group_id_' + listId ).val() + '&group_row_id=' + jQuery(obj).attr('id') + extra , listId);
194
- }
195
-
196
- function ListHome(listId)
197
- {
198
- ListJumpMin(jQuery('#' + listId + '_jump_url_original').val() + '&searchClear=1', listId, function(){
199
- InitInfoFields(jQuery('#list_search_id_' + listId));
200
- });
201
- }
202
-
203
- function ListDrillDown(mode, data, listId, extra)
204
- {
205
- jQuery('#list_search_id_' + listId).val('');
206
- var grouping = '';
207
- if (jQuery('#list_group_id_' + listId))
208
- {
209
- grouping = '&switch_grouping=' + jQuery('#list_group_id_' + listId).val();
210
- }
211
- ListJumpMin(jQuery('#' + listId + '_jump_url').val() + '&drill_down=' + mode + '&filter=' + data + grouping + '&search_filter=' + extra, listId, function(){
212
- InitInfoFields(jQuery('#list_search_id_' + listId));
213
- });
214
- }
215
-
216
- function ListDrillDownGetRowValue(obj)
217
- {
218
- return (typeof(jQuery(obj).next(".val-db").html()) != 'undefined') ? jQuery(obj).next(".val-db").html() : '';
219
- }
220
-
221
- function ListExport(listId)
222
- {
223
- document.location = jQuery('#' + listId + '_jump_url').val() + '&export_widget_list=1';
224
- }
225
-
226
-
227
- /**
228
- * ListJumpResponse()
229
- */
230
- function ListJumpResponse(response)
231
- {
232
- //ajaxStatus("loading" + response['list_id'], 0);
233
- jQuery(document.getElementById(response['list_id'])).after(response['list']).remove();
234
-
235
- if(typeof response['callback'] === 'string')
236
- {
237
- eval(response['callback'] + '()');
238
- }
239
-
240
- if(typeof response['search_bar'] === 'string')
241
- {
242
- jQuery('.' + response['list_id'] + '-search').replaceWith(response['search_bar']);
243
- InitInfoFields(jQuery('#list_search_id_' + response['list_id']));
244
- RansackEventHandler();
245
- }
246
-
247
- if(typeof response['export_button'] === 'string')
248
- {
249
- jQuery('.' + response['list_id'] + '-export').replaceWith(response['export_button']);
250
- }
251
-
252
- if(typeof response['group_by_items'] === 'string')
253
- {
254
- jQuery('.' + response['list_id'] + '-group-by').replaceWith(response['group_by_items']);
255
- }
256
- }
257
-
258
- /**
259
- * ListMessagePopup()
260
- */
261
- function ListMessagePopup(id, html, hieght, width)
262
- {
263
- jQuery('.ajaxLoad,.ajaxLoad2').remove();
264
- if (typeof(hieght) =="undefined")
265
- {
266
- var hieght = '200'
267
- }
268
- if (typeof(width) =="undefined")
269
- {
270
- var width = '400'
271
- }
272
-
273
- if(document.getElementById(id))
274
- {
275
- elmToHide = document.getElementById(id);
276
- var overLay = '<div style="position:relative;top:0px;"><div id="loading' + id + '" class="ajaxLoad" style="height:' + jQuery(elmToHide).height() + 'px;width:' + jQuery(elmToHide).width() + 'px;top:-' + jQuery(elmToHide).height() + 'px;"></div></div><div class="ajaxLoad2" id="message' + id + '" style="height:' + hieght + 'px;width:' + width + 'px;left:100px;top:200px;left:250px;z-index: 1000;background-position: 50% 50%;position: absolute;display: block;border:2px solid #dadada;box-shadow:0 2px 4px #c0c0c0;text-align:center;background-color:#FFFFFF;padding:15px;">' + html + '</div>';
277
-
278
- jQuery(elmToHide).append(overLay);
279
-
280
- jQuery('#message' + id).children( ).each( function( index )
281
- {
282
- jQuery( this ).addClass( 'tmp-popup-class' );
283
- });
284
-
285
- jQuery('#loading' + id).fadeTo("fast", .20);
286
-
287
- jQuery('html,body').animate({scrollTop: jQuery('#message' + id).offset().top - 100 }, 400);
288
- }
289
-
290
- jQuery("body").unbind('click');
291
-
292
- setTimeout(function() {
293
- jQuery("body").click
294
- (
295
- function(e)
296
- {
297
- if(e.target.id == 'message' + id || e.target.className == 'tmp-popup-class')
298
- {
299
- return false;
300
- }
301
- if (jQuery('#' + e.target.id).parents('#message' + id).length == 0 || (e.target.id != 'message' + id && jQuery('#' + e.target.id).parents('#message' + id).length != 1))
302
- {
303
- jQuery('#message' + id + ', #loading'+ id).remove();
304
- }
305
- }
306
- );
307
- }, 1000);
308
- }
309
-
310
- /**
311
- * ListMessageClose()
312
- */
313
- function ListMessageClose()
314
- {
315
- jQuery('.ajaxLoad,.ajaxLoad2').remove();
316
- }
317
-
318
-
319
- /**
320
- * ListJumpMin()
321
- */
322
- function ListJumpMin(url, id, callback, post)
323
- {
324
- if(document.getElementById(id))
325
- {
326
- ajaxStatus(id, 1);
327
- }
328
-
329
- if(document.getElementById(id))
330
- {
331
- try
332
- {
333
- jQuery.post(url, post, function(response)
334
- {
335
- ListJumpResponse(response);
336
- if (typeof(callback) == 'string')
337
- {
338
- eval(callback);
339
- }
340
- else if (typeof(callback) == 'function')
341
- {
342
- (callback)();
343
- }
344
- }, "json");
345
- }
346
- catch(e)
347
- {
348
- console.log(e);
349
- }
350
- }
351
- }
352
-
353
- function ListSearchAheadResponse()
354
- {
355
- if(ListSearchAheadInProgress)
356
- {
357
- ListSearchAheadInProgress = false;
358
-
359
- if(ListSearchAheadQueueElement != '')
360
- {
361
- (ListSearchAheadQueueElement)(ListSearchAheadInProgressUrl,ListSearchAheadInProgressTarget,ListSearchAheadInProgressObj);
362
-
363
- ListSearchAheadQueueElement = '';
364
- }
365
- }
366
- }
367
-
368
- /**
369
- * ListSearchAhead()
370
- */
371
- function ListSearchAhead(url, id, element)
372
- {
373
- if(! ListSearchAheadInProgress && jQuery(element).length && typeof(jQuery(element).val()) != 'undefined' && jQuery(element).val() != jQuery(element).attr('title'))
374
- {
375
- ListSearchAheadInProgress = true;
376
- ListJumpMin(url+ '&search_filter=' + jQuery(element).val(), id);
377
- }
378
- }
379
-
380
- /**
381
- * ListSearchAheadQueue()
382
- */
383
- function ListSearchAheadQueue(url, id, element)
384
- {
385
- if(! ListSearchAheadInProgress)
386
- {
387
- ListSearchAheadGlobalElement = element;
388
-
389
- setTimeout("ListSearchAhead('"+url+"', '"+id+"', ListSearchAheadGlobalElement)", 500);
390
- }
391
- else
392
- {
393
- ListSearchAheadInProgressUrl = url;
394
- ListSearchAheadInProgressTarget = id;
395
- ListSearchAheadInProgressObj = element;
396
-
397
- ListSearchAheadQueueElement = ListSearchAhead;
398
- }
399
- }
400
-
401
- var WidgetSearchAheadQueuedRawDog = '';
402
- var WidgetSearchAheadInProgress = false;
403
- var WidgetSearchAheadInProgressUrl;
404
- var WidgetSearchAheadInProgressTarget;
405
- var WidgetSearchAheadInProgressObj;
406
-
407
- /**
408
- * WidgetSearchAheadResponse()
409
- *
410
- * @note searchTarget is the
411
- *
412
- * @todo session/token based WidgetSearchAheadQueuedRawDog?
413
- */
414
- function WidgetSearchAheadResponse(response)
415
- {
416
- if(WidgetSearchAheadInProgress)
417
- {
418
- WidgetSearchAheadInProgress = false;
419
-
420
- if(WidgetSearchAheadQueuedRawDog != '')
421
- {
422
- (WidgetSearchAheadQueuedRawDog)(WidgetSearchAheadInProgressUrl,WidgetSearchAheadInProgressTarget,WidgetSearchAheadInProgressObj);
423
-
424
- WidgetSearchAheadQueuedRawDog = '';
425
- }
426
- }
427
-
428
- var searchResults = '';
429
- var searchTarget = '';
430
-
431
- //Capture the results
432
- //
433
- if(response && typeof(response['content']) != 'undefined' && response['content'] != '')
434
- {
435
- searchResults = response['content'];
436
- }
437
-
438
- if(response && typeof(response['target']) != 'undefined' && response['target'] != '')
439
- {
440
- var result = response['target'] + '_results';
441
- var searchTarget = document.getElementById(result);
442
- }
443
-
444
- jQuery('.widget-search-content', searchTarget).html(searchResults);
445
-
446
- if(searchResults != '')
447
- {
448
- if(! jQuery(searchTarget).is(':visible'));
449
- {
450
- jQuery(searchTarget).slideDown();
451
- }
452
- }
453
- else
454
- {
455
- if(jQuery(searchTarget).is(':visible'));
456
- {
457
- jQuery(searchTarget).slideUp();
458
- }
459
- }
460
- }
461
-
462
- /**
463
- * ListSearchAhead()
464
- */
465
- function WidgetInputSearchAhead(url, target, obj)
466
- {
467
- if(! WidgetSearchAheadInProgress)
468
- {
469
- WidgetSearchAheadInProgress = true;
470
-
471
- if(document.getElementById(target) && document.getElementById(target).value != document.getElementById(target).title)
472
- {
473
- var targetElement = document.getElementById(target + '_results');
474
-
475
- if(! jQuery('.widget-search-content', targetElement).html())
476
- {
477
- /* jQuery('.widget-search-content', targetElement).html(limeload);
478
-
479
- if(! jQuery(targetElement).is(':visible'));
480
- {
481
- jQuery(targetElement).slideDown();
482
- }*/
483
- }
484
-
485
- jQuery.post(url, {target:target,value:document.getElementById(target).value}, WidgetSearchAheadResponse, 'json');
486
- }
487
- }
488
- else
489
- {
490
- WidgetSearchAheadInProgressUrl = url;
491
- WidgetSearchAheadInProgressTarget = target;
492
- WidgetSearchAheadInProgressObj = obj;
493
-
494
- WidgetSearchAheadQueuedRawDog = WidgetInputSearchAhead;
495
- }
496
- }
497
-
498
- /**
499
- * WidgetInputSearchAhead()
500
- *
501
- * @todo Log last keyup and launch it if it exceeds the wait time of the pending request
502
- * @todo multiple search aheads on one page
503
- * @todo baseurl
504
- * @todo duration parameter
505
- */
506
- function WidgetInputSearchAheadQueue(url, id, obj)
507
- {
508
- setTimeout("WidgetInputSearchAhead('"+url+"', '"+id+"', '"+obj+"')", 500);
509
- }
510
-
511
-
512
- function WidgetAdvancedSearchReset(form_id, list_id, url)
513
- {
514
- var frm_elements = document.getElementById(form_id);
515
-
516
- for (i = 0; i < frm_elements.length; i++)
517
- {
518
- field_type = frm_elements[i].type.toLowerCase();
519
- switch (field_type)
520
- {
521
- case "text":
522
- case "password":
523
- case "textarea":
524
- frm_elements[i].value = "";
525
- break;
526
- case "radio":
527
- case "checkbox":
528
- if (frm_elements[i].checked)
529
- {
530
- frm_elements[i].checked = false;
531
- }
532
- break;
533
- case "select-one":
534
- case "select-multi":
535
- frm_elements[i].selectedIndex = 0;
536
- break;
537
- default:
538
- break;
539
- }
540
- }
541
-
542
- InitInfoFields();
543
- ListJumpMin(url, list_id);
544
- }
545
-
546
-
547
- function BuildUrl(getVars)
548
- {
549
- var url = '';
550
- jQuery.each(getVars, function(field, value)
551
- {
552
- url += '&' + field + '=' + escape(value);
553
- });
554
- return url;
555
- }
556
-
557
- (function(ll)
558
- {
559
- jQuery(document).ready(
560
- function()
561
- {
562
- RansackEventHandler();
563
- InitInfoFields();
564
- });
565
- })(jQuery);
566
-
567
-
568
- function InjectInfoField(inField,message)
569
- {
570
- if(typeof(message) == 'undefined' || message == '')
571
- {
572
- var message = '';
573
- var color = 'black';
574
- }
575
- else
576
- {
577
- var color = 'red';
578
- }
579
- jQuery(inField).attr('title',message);
580
- InitInfoFields(inField);
581
- jQuery(inField).css('color',color);
582
- }
583
-
584
- /**
585
- * InitInfoFields()
586
- *
587
- * @todo assign the info-input class if an object is passed in to preserve the functionality
588
- */
589
- function InitInfoFields(inField)
590
- {
591
- var theField = jQuery('.info-input');
592
-
593
- if(typeof(inField) != 'undefined')
594
- {
595
- theField = inField;
596
- }
597
-
598
- if(jQuery(theField).length)
599
- {
600
- //Assign an inputs title to its values initially
601
- //
602
- jQuery(theField).each(
603
- function()
604
- {
605
- if(jQuery(this).val() == '')
606
- {
607
- jQuery(this).val(jQuery(this).attr('title'));
608
-
609
- //Adjust its class to appear passive
610
- //
611
- jQuery(this).addClass('info-input-field-inactive');
612
- }
613
- });
614
-
615
- jQuery(theField).blur(
616
- function()
617
- {
618
- if(jQuery(this).val() != jQuery(this).attr('title'))
619
- {
620
- jQuery(this).css('color','black');
621
- if(jQuery(this).val() == '')
622
- {
623
- jQuery(this).css('color','#b4b3b3');
624
- jQuery(this).removeClass('info-input-field-active');
625
- jQuery(this).val(jQuery(this).attr('title'));
626
- jQuery(this).addClass('info-input-field-inactive');
627
- }
628
- }
629
- else
630
- {
631
- jQuery(this).css('color','#b4b3b3');
632
- }
633
- });
634
-
635
- jQuery(theField).focus(
636
- function()
637
- {
638
- if(jQuery(this).val() == jQuery(this).attr('title'))
639
- {
640
- jQuery(this).removeClass('info-input-field-inactive');
641
- jQuery(this).addClass('info-input-field-active');
642
-
643
- //Clear the field of the initial title if its the first onfocus
644
- //
645
- if(jQuery(this).val() != '' && jQuery(this).val() == jQuery(this).attr('title'))
646
- {
647
- jQuery(this).val('');
648
- }
649
- }
650
- else
651
- {
652
- jQuery(this).css('color','black');
653
- jQuery(this).addClass('info-input-field-active');
654
- }
655
- });
656
- }
657
- }
658
-
659
- /**
660
- * AjaxMaintainChecks()
661
- *
662
- * @param obj
663
- * @param checkbox_class
664
- * @param list_id
665
- * @param url
666
- * @param check_all_id
667
- */
668
- function AjaxMaintainChecks(obj, checkbox_class, list_id, url, check_all_id)
669
- {
670
- AjaxMaintainChecksRunning = true;
671
- var serializedChecks = '';
672
- var checkedAllBool = true;
673
- var checkedAllString = '1';
674
- var checkAllId = checkbox_class + '_all';
675
-
676
- /**
677
- * Checking All
678
- */
679
- if(check_all_id && check_all_id != '' && jQuery('#' + check_all_id).length > 0)
680
- {
681
- //Overwrite assumed check-all checkbox id
682
- //
683
- checkAllId = check_all_id;
684
-
685
- //Check or uncheck check-all checkbox
686
- //
687
- jQuery('.' + checkbox_class).not(':disabled').attr('checked', jQuery('#' + checkAllId).is(':checked'));
688
- }
689
-
690
- /**
691
- * Serialize all checkboxes both checked and unchecked
692
- */
693
- jQuery('.' + checkbox_class).not(':disabled').each(
694
- function(key, value)
695
- {
696
- var checked = '0';
697
- if(this.checked)
698
- {
699
- checked = '1';
700
- }
701
- else
702
- {
703
- checkedAllBool = false;
704
- checkedAllString = '0';
705
- }
706
- serializedChecks += escape(this.value) + '=' + checked + '&';
707
- }
708
- );
709
-
710
- /**
711
- * Check All Checkbox Status. On/Off
712
- */
713
- jQuery('#' + checkAllId).attr('checked', checkedAllBool);
714
-
715
- /**
716
- * Check All for this view (page/sequence
717
- */
718
- serializedChecks += 'checked_all=' + checkedAllString;
719
-
720
- /**
721
- * Record everything
722
- */
723
- jQuery.post(url, serializedChecks, function()
724
- {
725
- AjaxMaintainChecksRunning = false;
726
- }, "json");
727
-
728
-
729
-
730
- }
731
-
732
- function ToggleAdvancedSearch(searchElement)
733
- {
734
- var contentArea = jQuery(searchElement).closest('div.inputOuter').find('.widget-search-drilldown');
735
- var inputArrow = jQuery(searchElement).closest('div.inputOuter').find('.widget-search-arrow-advanced');
736
- var searchField = jQuery(searchElement).closest('div.inputOuter').find('.search-ahead');
737
-
738
- jQuery(contentArea).toggle();
739
-
740
- if(jQuery(contentArea).is(':visible'))
741
- {
742
- jQuery(inputArrow).css('visibility', 'hidden');
743
- }
744
- else
745
- {
746
- jQuery(inputArrow).css('visibility', 'visible');
747
- }
748
- }
749
-
750
- function SelectBoxResetSelectedRow(listId)
751
- {
752
- var currentSelection = jQuery('#list_group_id_' + listId).val();
753
- jQuery('.widget-search-results-row[title="' + currentSelection + '"]').addClass('widget-search-results-row-selected');
754
- }
755
-
756
-
757
- function SelectBoxSetValue(value, listId)
758
- {
759
- jQuery('#list_group_id_' + listId).val(value);
760
- SelectBoxResetSelectedRow(listId);
761
- }
762
-
763
-
764
-
765
- function HideAdvancedSearch(searchElement)
766
- {
767
- var contentArea = jQuery(searchElement).closest('div.inputOuter').find('.widget-search-drilldown');
768
- var inputArrow = jQuery(searchElement).closest('div.inputOuter').find('.widget-search-arrow-advanced');
769
-
770
- jQuery(contentArea).hide();
771
-
772
- jQuery(inputArrow).css('visibility', 'visible');
773
- }
774
-
775
- jQuery(document).ready(function($) {
776
- jQuery(document).ajaxSend(function(e, xhr, options) {
777
- var sid = jQuery("meta[name='csrf-token']").attr("content");
778
- xhr.setRequestHeader("X-CSRF-Token", sid);
779
- });
780
- });
781
-
782
- function RansackEventHandler() {
783
- jQuery('.advanced-search-container-inline li form').on('click', '.remove_fields', function(event) {
784
- jQuery(this).closest('.field').remove();
785
- return event.preventDefault();
786
- });
787
- jQuery('.advanced-search-container-inline li form').on('click', '.add_fields', function(event) {
788
- var regexp, time;
789
- time = new Date().getTime();
790
- regexp = new RegExp(jQuery(this).data('id'), 'g');
791
- jQuery(this).before(jQuery(this).data('fields').replace(regexp, time));
792
- return event.preventDefault();
793
- });
794
- }
795
-
1
+
2
+ var debugFlag = 0;
3
+ var debugContainer = '';
4
+
5
+
6
+ /**
7
+ * ListSearchAheadResponse()
8
+ */
9
+ var ListSearchAheadGlobalElement = '';
10
+ var ListSearchAheadQueueElement = '';
11
+ var ListSearchAheadInProgress = false;
12
+ var ListSearchAheadInProgressUrl;
13
+ var ListSearchAheadInProgressTarget;
14
+ var ListSearchAheadInProgressObj;
15
+
16
+
17
+
18
+ var AjaxMaintainChecksRunning = false;
19
+
20
+
21
+ function SearchWidgetList(url, listId, element)
22
+ {
23
+ var inputField = jQuery(element).closest('div.inputOuter').find('input.search-ahead');
24
+
25
+ if(inputField.length)
26
+ {
27
+ ListSearchAheadQueue(url, listId, inputField);
28
+ }
29
+ }
30
+
31
+ //simple version
32
+ function RefreshList(list_id, callback)
33
+ {
34
+ ListJumpMin(jQuery('#' + list_id + '_jump_url').val(), list_id, callback);
35
+ }
36
+
37
+ /**
38
+ * Debug()
39
+ *
40
+ * @param string what
41
+ * @return void
42
+ */
43
+ function Debug(what)
44
+ {
45
+ if(debugFlag >= 1)
46
+ {
47
+ if(window.document.getElementById(debugContainer))
48
+ {
49
+ var time = new Date();
50
+
51
+ element = window.document.getElementById(debugContainer);
52
+
53
+ element.innerHTML += '<br/><span>' + time.getHours() + ':' + time.getMinutes() + ':' + time.getSeconds() + '</span> ' + what;
54
+ element.scrollTop = element.scrollHeight;
55
+ }
56
+ }
57
+ }
58
+
59
+ /**
60
+ * Redirect()
61
+ *
62
+ * @param string inUrl
63
+ * @return void
64
+ */
65
+ function Redirect(inUrl)
66
+ {
67
+ if(typeof(inUrl) == 'string')
68
+ {
69
+ if(inUrl.length > 0)
70
+ {
71
+ window.location = inUrl;
72
+ }
73
+ else
74
+ {
75
+ throw('Missing URL input for Redirect()');
76
+ }
77
+ }
78
+ else
79
+ {
80
+ throw('Invalid URL type input for Redirect()');
81
+ }
82
+ }
83
+
84
+ function ButtonFormPost(theForm)
85
+ {
86
+ try
87
+ {
88
+ if (typeof(theForm) == "object")
89
+ {
90
+ theForm.submit();
91
+ }
92
+ else
93
+ {
94
+ if (document.getElementById(theForm) && typeof(theForm) !="undefined" && typeof(theForm) != 'null') {
95
+ document.getElementById(theForm).submit();
96
+ } else {
97
+ throw new Exception();
98
+ }
99
+ }
100
+ }
101
+ catch(e)
102
+ {
103
+ // -- id might not be there, so try the form by name
104
+ try
105
+ {
106
+ eval('document.' + theForm + '.submit()');
107
+ }
108
+ catch(e)
109
+ {
110
+ if (document.forms.length == 1)
111
+ {
112
+ document.forms[0].submit();
113
+ }
114
+ else
115
+ {
116
+ return false;
117
+ }
118
+ }
119
+ }
120
+ }
121
+
122
+
123
+ function ButtonLinkPost(inUrl)
124
+ {
125
+ try
126
+ {
127
+ Redirect(inUrl);
128
+ }
129
+ catch(e)
130
+ {
131
+ if(debugFlag)
132
+ {
133
+ Debug(e);
134
+ }
135
+ }
136
+ }
137
+
138
+ function ajaxStatus(eToHide, fadeInOut)
139
+ {
140
+
141
+ if(document.getElementById(eToHide))
142
+ {
143
+ elmToHide = document.getElementById(eToHide);
144
+
145
+ eHider = "loading" + eToHide;
146
+
147
+ if(document.getElementById(eHider))
148
+ {
149
+ elmHider = document.getElementById(eHider);
150
+ }
151
+ else
152
+ {
153
+ var radius = '';
154
+ if(document.getElementById(eToHide + '_radius'))
155
+ {
156
+ var radiusValue = document.getElementById(eToHide + '_radius').value;
157
+ radius = '-moz-border-radius-bottomleft:' + radiusValue + ';-webkit-border-bottom-left-radius:' + radiusValue + ';border-bottom-left-radius:' + radiusValue + ';-moz-border-radius-bottomright:' + radiusValue + ';-webkit-border-bottom-right-radius:' + radiusValue + ';border-bottom-right-radius:' + radiusValue + ';-moz-border-radius-topright:' + radiusValue + ';-webkit-border-top-right-radius:' + radiusValue + ';border-top-right-radius:' + radiusValue + ';-moz-border-radius-topleft:' + radiusValue + ';-webkit-border-top-left-radius:' + radiusValue + ';border-top-left-radius:' + radiusValue + ';';
158
+ }
159
+ var overLay = '<div style="position:relative;top:0px;"><div class="ajaxLoad" id="' + eHider + '" style="height:' + jQuery(elmToHide).height() + 'px;width:' + jQuery(elmToHide).width() + 'px;top:-' + jQuery(elmToHide).height() + 'px;' + radius + '"></div></div>';
160
+
161
+ jQuery(elmToHide).append(overLay);
162
+
163
+ elmHider = document.getElementById(eHider);
164
+ }
165
+
166
+ if(typeof(fadeInOut) == 'number')
167
+ {
168
+ if(fadeInOut > 0)
169
+ {
170
+ fadeInOut = 1;
171
+ jQuery(elmHider).fadeTo("fast", .20);
172
+ }
173
+ else
174
+ {
175
+ fadeInOut = 0;
176
+ jQuery(elmHider).remove();
177
+ }
178
+ }
179
+ }
180
+ }
181
+
182
+
183
+ function ListChangeGrouping(listId, obj, extra)
184
+ {
185
+ if (typeof(extra) == 'undefined')
186
+ {
187
+ var extra = '';
188
+ }
189
+ ajaxStatus(listId, 1);
190
+ HideAdvancedSearch(jQuery('#' + listId + '-group'));
191
+ jQuery('#list_search_id_' + listId ).val('');
192
+ InitInfoFields(jQuery('#list_search_id_' + listId));
193
+ ListJumpMin(jQuery('#' + listId + '_jump_url').val() + '&searchClear=1&switch_grouping=' + jQuery('#list_group_id_' + listId ).val() + '&group_row_id=' + jQuery(obj).attr('id') + extra , listId);
194
+ }
195
+
196
+ function ListHome(listId)
197
+ {
198
+ ListJumpMin(jQuery('#' + listId + '_jump_url_original').val() + '&searchClear=1', listId, function(){
199
+ InitInfoFields(jQuery('#list_search_id_' + listId));
200
+ });
201
+ }
202
+
203
+ function ListDrillDown(mode, data, listId, extra)
204
+ {
205
+ jQuery('#list_search_id_' + listId).val('');
206
+ var grouping = '';
207
+ if (jQuery('#list_group_id_' + listId))
208
+ {
209
+ grouping = '&switch_grouping=' + jQuery('#list_group_id_' + listId).val();
210
+ }
211
+ ListJumpMin(jQuery('#' + listId + '_jump_url').val() + '&drill_down=' + mode + '&filter=' + data + grouping + '&search_filter=' + extra, listId, function(){
212
+ InitInfoFields(jQuery('#list_search_id_' + listId));
213
+ });
214
+ }
215
+
216
+ function ListDrillDownGetRowValue(obj)
217
+ {
218
+ return (typeof(jQuery(obj).next(".val-db").html()) != 'undefined') ? jQuery(obj).next(".val-db").html() : '';
219
+ }
220
+
221
+ function ListExport(listId)
222
+ {
223
+ document.location = jQuery('#' + listId + '_jump_url').val() + '&export_widget_list=1';
224
+ }
225
+
226
+
227
+ /**
228
+ * ListJumpResponse()
229
+ */
230
+ function ListJumpResponse(response)
231
+ {
232
+ //ajaxStatus("loading" + response['list_id'], 0);
233
+ jQuery(document.getElementById(response['list_id'])).after(response['list']).remove();
234
+
235
+ if(typeof response['callback'] === 'string')
236
+ {
237
+ eval(response['callback'] + '()');
238
+ }
239
+
240
+ if(typeof response['search_bar'] === 'string')
241
+ {
242
+ jQuery('.' + response['list_id'] + '-search').replaceWith(response['search_bar']);
243
+ InitInfoFields(jQuery('#list_search_id_' + response['list_id']));
244
+ RansackEventHandler();
245
+ }
246
+
247
+ if(typeof response['export_button'] === 'string')
248
+ {
249
+ jQuery('.' + response['list_id'] + '-export').replaceWith(response['export_button']);
250
+ }
251
+
252
+ if(typeof response['group_by_items'] === 'string')
253
+ {
254
+ jQuery('.' + response['list_id'] + '-group-by').replaceWith(response['group_by_items']);
255
+ }
256
+ }
257
+
258
+ /**
259
+ * ListMessagePopup()
260
+ */
261
+ function ListMessagePopup(id, html, hieght, width)
262
+ {
263
+ jQuery('.ajaxLoad,.ajaxLoad2').remove();
264
+ if (typeof(hieght) =="undefined")
265
+ {
266
+ var hieght = '200'
267
+ }
268
+ if (typeof(width) =="undefined")
269
+ {
270
+ var width = '400'
271
+ }
272
+
273
+ if(document.getElementById(id))
274
+ {
275
+ elmToHide = document.getElementById(id);
276
+ var overLay = '<div style="position:relative;top:0px;"><div id="loading' + id + '" class="ajaxLoad" style="height:' + jQuery(elmToHide).height() + 'px;width:' + jQuery(elmToHide).width() + 'px;top:-' + jQuery(elmToHide).height() + 'px;"></div></div><div class="ajaxLoad2" id="message' + id + '" style="height:' + hieght + 'px;width:' + width + 'px;left:100px;top:200px;left:250px;z-index: 1000;background-position: 50% 50%;position: absolute;display: block;border:2px solid #dadada;box-shadow:0 2px 4px #c0c0c0;text-align:center;background-color:#FFFFFF;padding:15px;">' + html + '</div>';
277
+
278
+ jQuery(elmToHide).append(overLay);
279
+
280
+ jQuery('#message' + id).children( ).each( function( index )
281
+ {
282
+ jQuery( this ).addClass( 'tmp-popup-class' );
283
+ });
284
+
285
+ jQuery('#loading' + id).fadeTo("fast", .20);
286
+
287
+ jQuery('html,body').animate({scrollTop: jQuery('#message' + id).offset().top - 100 }, 400);
288
+ }
289
+
290
+ jQuery("body").unbind('click');
291
+
292
+ setTimeout(function() {
293
+ jQuery("body").click
294
+ (
295
+ function(e)
296
+ {
297
+ if(e.target.id == 'message' + id || e.target.className == 'tmp-popup-class')
298
+ {
299
+ return false;
300
+ }
301
+ if (jQuery('#' + e.target.id).parents('#message' + id).length == 0 || (e.target.id != 'message' + id && jQuery('#' + e.target.id).parents('#message' + id).length != 1))
302
+ {
303
+ jQuery('#message' + id + ', #loading'+ id).remove();
304
+ }
305
+ }
306
+ );
307
+ }, 1000);
308
+ }
309
+
310
+ /**
311
+ * ListMessageClose()
312
+ */
313
+ function ListMessageClose()
314
+ {
315
+ jQuery('.ajaxLoad,.ajaxLoad2').remove();
316
+ }
317
+
318
+
319
+ /**
320
+ * ListJumpMin()
321
+ */
322
+ function ListJumpMin(url, id, callback, post)
323
+ {
324
+ if(document.getElementById(id))
325
+ {
326
+ ajaxStatus(id, 1);
327
+ }
328
+
329
+ if(document.getElementById(id))
330
+ {
331
+ try
332
+ {
333
+ jQuery.post(url, post, function(response)
334
+ {
335
+ ListJumpResponse(response);
336
+ if (typeof(callback) == 'string')
337
+ {
338
+ eval(callback);
339
+ }
340
+ else if (typeof(callback) == 'function')
341
+ {
342
+ (callback)();
343
+ }
344
+ }, "json");
345
+ }
346
+ catch(e)
347
+ {
348
+ console.log(e);
349
+ }
350
+ }
351
+ }
352
+
353
+ function ListSearchAheadResponse()
354
+ {
355
+ if(ListSearchAheadInProgress)
356
+ {
357
+ ListSearchAheadInProgress = false;
358
+
359
+ if(ListSearchAheadQueueElement != '')
360
+ {
361
+ (ListSearchAheadQueueElement)(ListSearchAheadInProgressUrl,ListSearchAheadInProgressTarget,ListSearchAheadInProgressObj);
362
+
363
+ ListSearchAheadQueueElement = '';
364
+ }
365
+ }
366
+ }
367
+
368
+ /**
369
+ * ListSearchAhead()
370
+ */
371
+ function ListSearchAhead(url, id, element)
372
+ {
373
+ if(! ListSearchAheadInProgress && jQuery(element).length && typeof(jQuery(element).val()) != 'undefined' && jQuery(element).val() != jQuery(element).attr('title'))
374
+ {
375
+ ListSearchAheadInProgress = true;
376
+ ListJumpMin(url+ '&search_filter=' + jQuery(element).val(), id);
377
+ }
378
+ }
379
+
380
+ /**
381
+ * ListSearchAheadQueue()
382
+ */
383
+ function ListSearchAheadQueue(url, id, element)
384
+ {
385
+ if(! ListSearchAheadInProgress)
386
+ {
387
+ ListSearchAheadGlobalElement = element;
388
+
389
+ setTimeout("ListSearchAhead('"+url+"', '"+id+"', ListSearchAheadGlobalElement)", 500);
390
+ }
391
+ else
392
+ {
393
+ ListSearchAheadInProgressUrl = url;
394
+ ListSearchAheadInProgressTarget = id;
395
+ ListSearchAheadInProgressObj = element;
396
+
397
+ ListSearchAheadQueueElement = ListSearchAhead;
398
+ }
399
+ }
400
+
401
+ var WidgetSearchAheadQueuedRawDog = '';
402
+ var WidgetSearchAheadInProgress = false;
403
+ var WidgetSearchAheadInProgressUrl;
404
+ var WidgetSearchAheadInProgressTarget;
405
+ var WidgetSearchAheadInProgressObj;
406
+
407
+ /**
408
+ * WidgetSearchAheadResponse()
409
+ *
410
+ * @note searchTarget is the
411
+ *
412
+ * @todo session/token based WidgetSearchAheadQueuedRawDog?
413
+ */
414
+ function WidgetSearchAheadResponse(response)
415
+ {
416
+ if(WidgetSearchAheadInProgress)
417
+ {
418
+ WidgetSearchAheadInProgress = false;
419
+
420
+ if(WidgetSearchAheadQueuedRawDog != '')
421
+ {
422
+ (WidgetSearchAheadQueuedRawDog)(WidgetSearchAheadInProgressUrl,WidgetSearchAheadInProgressTarget,WidgetSearchAheadInProgressObj);
423
+
424
+ WidgetSearchAheadQueuedRawDog = '';
425
+ }
426
+ }
427
+
428
+ var searchResults = '';
429
+ var searchTarget = '';
430
+
431
+ //Capture the results
432
+ //
433
+ if(response && typeof(response['content']) != 'undefined' && response['content'] != '')
434
+ {
435
+ searchResults = response['content'];
436
+ }
437
+
438
+ if(response && typeof(response['target']) != 'undefined' && response['target'] != '')
439
+ {
440
+ var result = response['target'] + '_results';
441
+ var searchTarget = document.getElementById(result);
442
+ }
443
+
444
+ jQuery('.widget-search-content', searchTarget).html(searchResults);
445
+
446
+ if(searchResults != '')
447
+ {
448
+ if(! jQuery(searchTarget).is(':visible'));
449
+ {
450
+ jQuery(searchTarget).slideDown();
451
+ }
452
+ }
453
+ else
454
+ {
455
+ if(jQuery(searchTarget).is(':visible'));
456
+ {
457
+ jQuery(searchTarget).slideUp();
458
+ }
459
+ }
460
+ }
461
+
462
+ /**
463
+ * ListSearchAhead()
464
+ */
465
+ function WidgetInputSearchAhead(url, target, obj)
466
+ {
467
+ if(! WidgetSearchAheadInProgress)
468
+ {
469
+ WidgetSearchAheadInProgress = true;
470
+
471
+ if(document.getElementById(target) && document.getElementById(target).value != document.getElementById(target).title)
472
+ {
473
+ var targetElement = document.getElementById(target + '_results');
474
+
475
+ if(! jQuery('.widget-search-content', targetElement).html())
476
+ {
477
+ /* jQuery('.widget-search-content', targetElement).html(limeload);
478
+
479
+ if(! jQuery(targetElement).is(':visible'));
480
+ {
481
+ jQuery(targetElement).slideDown();
482
+ }*/
483
+ }
484
+
485
+ jQuery.post(url, {target:target,value:document.getElementById(target).value}, WidgetSearchAheadResponse, 'json');
486
+ }
487
+ }
488
+ else
489
+ {
490
+ WidgetSearchAheadInProgressUrl = url;
491
+ WidgetSearchAheadInProgressTarget = target;
492
+ WidgetSearchAheadInProgressObj = obj;
493
+
494
+ WidgetSearchAheadQueuedRawDog = WidgetInputSearchAhead;
495
+ }
496
+ }
497
+
498
+ /**
499
+ * WidgetInputSearchAhead()
500
+ *
501
+ * @todo Log last keyup and launch it if it exceeds the wait time of the pending request
502
+ * @todo multiple search aheads on one page
503
+ * @todo baseurl
504
+ * @todo duration parameter
505
+ */
506
+ function WidgetInputSearchAheadQueue(url, id, obj)
507
+ {
508
+ setTimeout("WidgetInputSearchAhead('"+url+"', '"+id+"', '"+obj+"')", 500);
509
+ }
510
+
511
+
512
+ function WidgetAdvancedSearchReset(form_id, list_id, url)
513
+ {
514
+ var frm_elements = document.getElementById(form_id);
515
+
516
+ for (i = 0; i < frm_elements.length; i++)
517
+ {
518
+ field_type = frm_elements[i].type.toLowerCase();
519
+ switch (field_type)
520
+ {
521
+ case "text":
522
+ case "password":
523
+ case "textarea":
524
+ frm_elements[i].value = "";
525
+ break;
526
+ case "radio":
527
+ case "checkbox":
528
+ if (frm_elements[i].checked)
529
+ {
530
+ frm_elements[i].checked = false;
531
+ }
532
+ break;
533
+ case "select-one":
534
+ case "select-multi":
535
+ frm_elements[i].selectedIndex = 0;
536
+ break;
537
+ default:
538
+ break;
539
+ }
540
+ }
541
+
542
+ InitInfoFields();
543
+ ListJumpMin(url, list_id);
544
+ }
545
+
546
+
547
+ function BuildUrl(getVars)
548
+ {
549
+ var url = '';
550
+ jQuery.each(getVars, function(field, value)
551
+ {
552
+ url += '&' + field + '=' + escape(value);
553
+ });
554
+ return url;
555
+ }
556
+
557
+ (function(ll)
558
+ {
559
+ jQuery(document).ready(
560
+ function()
561
+ {
562
+ RansackEventHandler();
563
+ InitInfoFields();
564
+ });
565
+ })(jQuery);
566
+
567
+
568
+ function InjectInfoField(inField,message)
569
+ {
570
+ if(typeof(message) == 'undefined' || message == '')
571
+ {
572
+ var message = '';
573
+ var color = 'black';
574
+ }
575
+ else
576
+ {
577
+ var color = 'red';
578
+ }
579
+ jQuery(inField).attr('title',message);
580
+ InitInfoFields(inField);
581
+ jQuery(inField).css('color',color);
582
+ }
583
+
584
+ /**
585
+ * InitInfoFields()
586
+ *
587
+ * @todo assign the info-input class if an object is passed in to preserve the functionality
588
+ */
589
+ function InitInfoFields(inField)
590
+ {
591
+ var theField = jQuery('.info-input');
592
+
593
+ if(typeof(inField) != 'undefined')
594
+ {
595
+ theField = inField;
596
+ }
597
+
598
+ if(jQuery(theField).length)
599
+ {
600
+ //Assign an inputs title to its values initially
601
+ //
602
+ jQuery(theField).each(
603
+ function()
604
+ {
605
+ if(jQuery(this).val() == '')
606
+ {
607
+ jQuery(this).val(jQuery(this).attr('title'));
608
+
609
+ //Adjust its class to appear passive
610
+ //
611
+ jQuery(this).addClass('info-input-field-inactive');
612
+ }
613
+ });
614
+
615
+ jQuery(theField).blur(
616
+ function()
617
+ {
618
+ if(jQuery(this).val() != jQuery(this).attr('title'))
619
+ {
620
+ jQuery(this).css('color','black');
621
+ if(jQuery(this).val() == '')
622
+ {
623
+ jQuery(this).css('color','#b4b3b3');
624
+ jQuery(this).removeClass('info-input-field-active');
625
+ jQuery(this).val(jQuery(this).attr('title'));
626
+ jQuery(this).addClass('info-input-field-inactive');
627
+ }
628
+ }
629
+ else
630
+ {
631
+ jQuery(this).css('color','#b4b3b3');
632
+ }
633
+ });
634
+
635
+ jQuery(theField).focus(
636
+ function()
637
+ {
638
+ if(jQuery(this).val() == jQuery(this).attr('title'))
639
+ {
640
+ jQuery(this).removeClass('info-input-field-inactive');
641
+ jQuery(this).addClass('info-input-field-active');
642
+
643
+ //Clear the field of the initial title if its the first onfocus
644
+ //
645
+ if(jQuery(this).val() != '' && jQuery(this).val() == jQuery(this).attr('title'))
646
+ {
647
+ jQuery(this).val('');
648
+ }
649
+ }
650
+ else
651
+ {
652
+ jQuery(this).css('color','black');
653
+ jQuery(this).addClass('info-input-field-active');
654
+ }
655
+ });
656
+ }
657
+ }
658
+
659
+ /**
660
+ * AjaxMaintainChecks()
661
+ *
662
+ * @param obj
663
+ * @param checkbox_class
664
+ * @param list_id
665
+ * @param url
666
+ * @param check_all_id
667
+ */
668
+ function AjaxMaintainChecks(obj, checkbox_class, list_id, url, check_all_id)
669
+ {
670
+ AjaxMaintainChecksRunning = true;
671
+ var serializedChecks = '';
672
+ var checkedAllBool = true;
673
+ var checkedAllString = '1';
674
+ var checkAllId = checkbox_class + '_all';
675
+
676
+ /**
677
+ * Checking All
678
+ */
679
+ if(check_all_id && check_all_id != '' && jQuery('#' + check_all_id).length > 0)
680
+ {
681
+ //Overwrite assumed check-all checkbox id
682
+ //
683
+ checkAllId = check_all_id;
684
+
685
+ //Check or uncheck check-all checkbox
686
+ //
687
+ jQuery('.' + checkbox_class).not(':disabled').attr('checked', jQuery('#' + checkAllId).is(':checked'));
688
+ }
689
+
690
+ /**
691
+ * Serialize all checkboxes both checked and unchecked
692
+ */
693
+ jQuery('.' + checkbox_class).not(':disabled').each(
694
+ function(key, value)
695
+ {
696
+ var checked = '0';
697
+ if(this.checked)
698
+ {
699
+ checked = '1';
700
+ }
701
+ else
702
+ {
703
+ checkedAllBool = false;
704
+ checkedAllString = '0';
705
+ }
706
+ serializedChecks += escape(this.value) + '=' + checked + '&';
707
+ }
708
+ );
709
+
710
+ /**
711
+ * Check All Checkbox Status. On/Off
712
+ */
713
+ jQuery('#' + checkAllId).attr('checked', checkedAllBool);
714
+
715
+ /**
716
+ * Check All for this view (page/sequence
717
+ */
718
+ serializedChecks += 'checked_all=' + checkedAllString;
719
+
720
+ /**
721
+ * Record everything
722
+ */
723
+ jQuery.post(url, serializedChecks, function()
724
+ {
725
+ AjaxMaintainChecksRunning = false;
726
+ }, "json");
727
+
728
+
729
+
730
+ }
731
+
732
+ function ToggleAdvancedSearch(searchElement)
733
+ {
734
+ var contentArea = jQuery(searchElement).closest('div.inputOuter').find('.widget-search-drilldown');
735
+ var inputArrow = jQuery(searchElement).closest('div.inputOuter').find('.widget-search-arrow-advanced');
736
+ var searchField = jQuery(searchElement).closest('div.inputOuter').find('.search-ahead');
737
+
738
+ jQuery(contentArea).toggle();
739
+
740
+ if(jQuery(contentArea).is(':visible'))
741
+ {
742
+ jQuery(inputArrow).css('visibility', 'hidden');
743
+ }
744
+ else
745
+ {
746
+ jQuery(inputArrow).css('visibility', 'visible');
747
+ }
748
+ }
749
+
750
+ function SelectBoxResetSelectedRow(listId)
751
+ {
752
+ var currentSelection = jQuery('#list_group_id_' + listId).val();
753
+ jQuery('.widget-search-results-row[title="' + currentSelection + '"]').addClass('widget-search-results-row-selected');
754
+ }
755
+
756
+
757
+ function SelectBoxSetValue(value, listId)
758
+ {
759
+ jQuery('#list_group_id_' + listId).val(value);
760
+ SelectBoxResetSelectedRow(listId);
761
+ }
762
+
763
+
764
+
765
+ function HideAdvancedSearch(searchElement)
766
+ {
767
+ var contentArea = jQuery(searchElement).closest('div.inputOuter').find('.widget-search-drilldown');
768
+ var inputArrow = jQuery(searchElement).closest('div.inputOuter').find('.widget-search-arrow-advanced');
769
+
770
+ jQuery(contentArea).hide();
771
+
772
+ jQuery(inputArrow).css('visibility', 'visible');
773
+ }
774
+
775
+ jQuery(document).ready(function($) {
776
+ jQuery(document).ajaxSend(function(e, xhr, options) {
777
+ var sid = jQuery("meta[name='csrf-token']").attr("content");
778
+ xhr.setRequestHeader("X-CSRF-Token", sid);
779
+ });
780
+ });
781
+
782
+ function RansackEventHandler() {
783
+ jQuery('.advanced-search-container-inline li form').on('click', '.remove_fields', function(event) {
784
+ jQuery(this).closest('.field').remove();
785
+ return event.preventDefault();
786
+ });
787
+ jQuery('.advanced-search-container-inline li form').on('click', '.add_fields', function(event) {
788
+ var regexp, time;
789
+ time = new Date().getTime();
790
+ regexp = new RegExp(jQuery(this).data('id'), 'g');
791
+ jQuery(this).before(jQuery(this).data('fields').replace(regexp, time));
792
+ return event.preventDefault();
793
+ });
794
+ }
795
+