Gravity PDF - Version 4.3.0

Version Description

  • Feature: Add support for Gravity Perks E-Commerce Add-on (GH#671)
  • Dev Feature: Add GPDFAPI::get_pdf_fonts() method
  • Dev Feature: Add 'gfpdf_pdf_generator_pre_processing' filter
  • Dev Feature: Add 'gfpdf_entry_pre_form_data' filter
  • Dev Feature: Add Helper_Trait_Logger class to make it easier to inject our logger into new classes (GH#677)
  • Dev Enhancement: Include the current object as a 5th parameter to 'gfpdf_pdf_field_content' filter
  • Dev Enhancement: Include update message / additonal link helper functions for registered Gravity PDF add-ons (GH#673)
  • Dev Enhancement: Update Easy Digital Download Licensing class to version 1.6.14
  • Future Feature: After plugin updates, copy shipped Mpdf fonts to PDF Working Directory (preparation for removal of all fonts in future release) (GH#676)
  • Bug: Strip URL parameters from home_url(), if any, when building PDF URL (GH#674)
  • Bug: Load the correct PDF Template Configuration file when using 'template' helper param (GH#675)
Download this release

Release Info

Developer Blue Liquid Designs
Plugin Icon 128x128 Gravity PDF
Version 4.3.0
Comparing to
See all releases

Code changes from version 4.2.2 to 4.3.0

Files changed (52) hide show
  1. CHANGELOG.txt +427 -427
  2. README.txt +309 -295
  3. api.php +648 -635
  4. bower_components/backbone.modelbinder/.bower.json +26 -26
  5. bower_components/backbone.modelbinder/Backbone.ModelBinder.min.js +4 -4
  6. bower_components/backbone.modelbinder/README.md +875 -875
  7. bower_components/backbone.modelbinder/component.json +14 -14
  8. bower_components/backbone.modelbinder/package.json +37 -37
  9. initialisation/README.txt +3 -3
  10. initialisation/template.css +172 -172
  11. pdf.php +419 -419
  12. resources/README.txt +3 -3
  13. resources/images/mpdfstyleA4.css +47 -47
  14. resources/images/mpdfstylePaged.css +123 -123
  15. resources/images/mpdfstyletables.css +124 -124
  16. resources/images/tiger.svg +725 -725
  17. src/assets/css/gfpdf-admin-styles.css +17 -17
  18. src/assets/css/gfpdf-styles.css +983 -983
  19. src/assets/js/gfpdf-backbone.js +1112 -1112
  20. src/assets/js/gfpdf-entries.js +40 -40
  21. src/assets/js/gfpdf-migration.js +74 -74
  22. src/assets/js/gfpdf-settings.js +1453 -1453
  23. src/assets/js/react/actionTypes/templates.js +34 -34
  24. src/assets/js/react/actions/templates.js +136 -136
  25. src/assets/js/react/bootstrap/templateBootstrap.js +178 -178
  26. src/assets/js/react/components/Dropzone.js +78 -78
  27. src/assets/js/react/components/Empty.js +36 -36
  28. src/assets/js/react/components/ShowMessage.js +166 -166
  29. src/assets/js/react/components/TemplateActivateButton.js +106 -106
  30. src/assets/js/react/components/TemplateButton.js +77 -77
  31. src/assets/js/react/components/TemplateCloseDialog.js +104 -104
  32. src/assets/js/react/components/TemplateContainer.js +122 -122
  33. src/assets/js/react/components/TemplateDeleteButton.js +153 -153
  34. src/assets/js/react/components/TemplateFooterActions.js +106 -106
  35. src/assets/js/react/components/TemplateHeaderNavigation.js +210 -210
  36. src/assets/js/react/components/TemplateHeaderTitle.js +48 -48
  37. src/assets/js/react/components/TemplateList.js +114 -114
  38. src/assets/js/react/components/TemplateListItem.js +169 -169
  39. src/assets/js/react/components/TemplateListItemComponents.js +60 -60
  40. src/assets/js/react/components/TemplateScreenshot.js +51 -51
  41. src/assets/js/react/components/TemplateScreenshots.js +53 -53
  42. src/assets/js/react/components/TemplateSearch.js +154 -154
  43. src/assets/js/react/components/TemplateSingle.js +173 -173
  44. src/assets/js/react/components/TemplateSingleComponents.js +180 -180
  45. src/assets/js/react/components/TemplateUploader.js +300 -300
  46. src/assets/js/react/gfpdf-main.js +62 -62
  47. src/assets/js/react/reducers/templateReducer.js +154 -154
  48. src/assets/js/react/router/templateRouter.js +121 -121
  49. src/assets/js/react/selectors/getTemplates.js +185 -185
  50. src/assets/js/react/utilities/versionCompare.js +152 -152
  51. src/assets/languages/README.MD +35 -35
  52. src/assets/languages/gravity-forms-pdf-extended-en_AU.po +384 -2595
CHANGELOG.txt CHANGED
@@ -1,427 +1,427 @@
1
- = 3.7.7 =
2
- * Bug - Ensure 'gfpdf_post_pdf_save' action gets triggered for all PDFs when resending notifications
3
- * Housekeeping - Remove compress.php from mPDF package (unneeded)
4
-
5
- = 3.7.6 =
6
- * Bug - Added full support for all Gravity Forms notification events (includes Payment Complete, Payment Refund, Payment Failed, Payment Pending ect)
7
- * Bug - Resolve mPDF PHP7 image parsing error due to a change in variable order parsing.
8
-
9
- = 3.7.5 =
10
- * Housekeeping - Tweak mPDF package to be PHP7 compatible.
11
-
12
- = 3.7.4 =
13
- * Housekeeping - Revert patch made in last update as Gravity Forms 1.9.9 fixes the issue internally.
14
-
15
- = 3.7.3 =
16
- * Bug - Gravity Forms 1.9 didn't automatically nl2br paragraph text mergetags. Fixed this issue in custom PDF templates.
17
-
18
- = 3.7.2 =
19
- * Bug - Updated $form_data['date_created'], $form_data['date_created_usa'], $form_data['misc']['date_time'], $form_data['misc']['time_24hr'] and $form_data['misc']['time_12hr'] to factor in the website's timezone settings.
20
-
21
- = 3.7.1 =
22
- * Housekeeping - Allow control over signature width in default template using the 'gfpdfe_signature_width' filter
23
- * Housekeeping - Add better error checking when migrating PDF template folder
24
- * Housekeeping - Add unit testing to the directory migration function
25
- * Bug - Fixed backwards-compatiiblity PHP error when viewing custom PDF templates on Gravity Forms 1.8.3 or below.
26
- * Bug - Ensure checkbox field names are included in the $form_data array
27
-
28
- = 3.7.0 =
29
- * Feature - Added 'default-show-section-content' configuration option. You can now display the section break content in the default template. Note: if this option is enabled and the section break is empty it will still be displayed on the PDF.
30
- * Feature - Added hooks 'gfpdfe_template_location' and 'gfpdfe_template_location_uri' to change PDF template location
31
- * Housekeeping - Migrate your template and configuration files. As of Gravity PDF 3.7 we'll be dropping the 'site_name' folder for single WordPress installs and changing the multisite install directory to the site ID.
32
- * Housekeeping - Added $form_data['html_id'] key which has the HTML fields added by their ID (much like the signature_details_id key).
33
- * Housekeeping - Add large number of unit tests
34
- * Housekeeping - Derestrict certain pages software loads on.
35
- * Housekeeping - Split up PDF viewing security components into smaller chunks (easier to unit test)
36
- * Housekeeping - Remove CLI-checking override in RAM settings
37
- * Housekeeping - Included directory paths by default on the system status page
38
- * Housekeeping - Updated configuration.php examples to include new default config option and refined the copy
39
- * Bug - Fixed issue initialising plugin when memory limit was set to -1 (unlimited)
40
- * Bug - Fix Multisite migration problem where if an error was thrown for one of the sub sites it caused all of the sites to show an error (even if they were successful)
41
- * Bug - Fix typo in example-template.php file
42
- * Bug - Fix up notices in custom templates when using poll/survey/quiz add ons.
43
- * Bug - Fix up notice in custom template when the form description is empty
44
- * Bug - Fix up notices in mPDF template when using headers/footers
45
- * Bug - Fix up error in PDF when signature field wasn't filled in
46
-
47
- = 3.6.0 =
48
- * Feature - Added support for Gravity Form's sub-field middle name (1.9Beta)
49
- * Feature - Patch mPDF with full :nth-child support on TD and TR table cells
50
- * Feature - Added $form_data[products_totals][subtotal] key (total price without shipping costs added)
51
- * Feature - Added formated money to all product fields in the $form_data array
52
- * Feature - Default templates: only show fields who's conditional logic is true. Perfect when used with default-show-html
53
- * Housekeeping - Move PDF_EXTENDED_TEMPLATES folder to the /wp-content/upload/ directory. Get more info about the move (see http://developer.gravitypdf.com/news/migrating-template-directory-means/)
54
- * Housekeeping - Refined when admin resources are loaded
55
- * Housekeeping - Fixed typo during initial initialisation
56
- * Housekeeping - Switched icons back to FontAwesome which is shipped by default with Gravity Forms
57
- * Housekeeping - Display full path to mPDF tmp directory when there are issues writing to it
58
- * Housekeeping - Modified font installation message.
59
- * Housekeeping - Update example-header-and-footer_06.php and example-advanced-headers_07.php to better reflect current mPDF features
60
- * Bug - Fixed issue pulling the correct configuration when multiple nodes were assigned to multiple forms
61
- * Bug - Fixed number field formatting issue which always rounded to two decimal places
62
- * Bug - Fixed JS namespace issue with WordPress Leads plugin
63
- * Bug - Fixed error initialising fonts / backing up PDF_EXTENDED_TEMPLATES directory when using the glob() function
64
- * Bug - Fix issue with PHP 5.0 and 5.1 array_replace_recursive function when used with an array inside the $gf_pdf_config array
65
- * Bug - Fixed fatal error when logged in user attempts to view PDF they don't have access to
66
- * Bug - Fixed issue in $form_data array where single-column list items where being returned as an array and not a HTML list.
67
- * Bug - Prevent unauthorised users auto-initialising the software or migrating the templates folder
68
- * Bug - Fixed up incorrect formatting issue when using custom font name
69
- * Bug - Fixed issue displaying Times New Roman in PDF templates
70
-
71
- = 3.5.11.1 =
72
- * Bug - Fix issue saving and sending blank PDFs due to security fix
73
-
74
- = 3.5.11 =
75
- * Bug - Fix security issue which gave unauthorised users access to Gravity Form entires
76
-
77
- = 3.5.10 =
78
- * Housekeeping - Include individual scoring for Gravity Form Survey Likert field in the $form_data['survey'] array
79
- * Bug - Fix fatal error when Gravity Forms isn't activated, but Gravity PDF is.
80
-
81
- = 3.5.9 =
82
- * Bug - Rollback recent changes that introduced the GFAPI as introduces errors for older versions of Gravity Forms. Will reintroduce in next major release and increase the minimum Gravity Forms version.
83
-
84
- = 3.5.8 =
85
- * Bug - Fixed issue affected some users where a depreciated function was causing a fatal error
86
-
87
- = 3.5.7 =
88
- * Bug - Fixed issue where the PDF settings page was blank for some users
89
-
90
- = 3.5.6 =
91
- * Bug - Fixed issue with last release that affected checks to see if Gravity Forms has submitting
92
- * Bug - Fixed fatal error with servers using PHP5.2 or lower
93
- * Bug - Fixed E_NOTICE for replacement array_replace_recursive() function in PHP5.2 or lower
94
- * Bug - Fixed issue with AJAX spinner showing when submitting support request
95
-
96
- = 3.5.5 =
97
- * Housekeeping - Include French translation (thanks to Marie-Aude Koiransky-Ballouk)
98
- * Housekeeping - Wrap 'Initialise Fonts' text in translation ready _e() function
99
- * Housekeeping - Tidy up System Status CSS styles to accomidate translation text lengths
100
- * Housekeeping - Fix E_NOTICE when viewing entry details page when form has no PDF configuration
101
- * Bug - Fixed load_plugin_textdomain which was incorrectly called.
102
- * Bug - Correctly check if the plugin is loaded correctly before letting the PDF class fully load
103
-
104
- = 3.5.4 =
105
- * Bug - Fixed issue with incorrect PDF name showing on the entry details page
106
- * Bug - Fixed issue with custom fonts being inaccessible without manually reinstalling after upgrading.
107
- * Housekeeping - Added in two new filters to modify the $mpdf object. 'gfpdfe_mpdf_class' and 'gfpdfe_mpdf_class_pre_render' (replaces the gfpdfe_pre_render_pdf filter).
108
-
109
- = 3.5.3 =
110
- * Bug - Mergetags braces ({}) were being encoded before conversion
111
- * Bug - Fixed issue with empty string being passed to array filter
112
- * Housekeeping - Enabled mergetag usage in the pdf_password and pdf_master_password configuration options
113
- * Housekeeping - Correctly call $wpdb->prepare so the variables in are in the second argument
114
-
115
- = 3.5.2 =
116
- * Bug - Initialisation folder .htaccess file was preventing template.css from being loaded by the default templates.
117
-
118
- = 3.5.1 =
119
- * Bug - Fixed issue with core fonts Arial/Helvetica, Times/Times New Roman and Courier not displaying in the PDF.
120
- * Bug - Fixed display issues for multiple PDFs on the details admin entry page
121
- * Housekeeping - Made the details entry page PDF view consistent for single or multiple PDFs
122
- * Housekeeping - Ensured all javascript files are minified and are correctly being used
123
- * Housekeeping - Remove legacy notices from mPDF package
124
-
125
- = 3.5.0 =
126
- * Feature - No longer need to reinitialise every time the software is updated.
127
- * Feature - Add auto-initialiser on initial installation for sites that have direct write access to their server files
128
- * Feature - Add auto-initialiser on initial installation across entire multisite network for sites who have direct write access to their server files.
129
- * Feature - Add auto-PDF_EXTENDED_TEMPLATES theme syncer for sites that have direct write access to their server files
130
- * Feature - Correctly added language support. The .PO file is located in the /language/ folder if anyone would like to do a translation.
131
-
132
- * Housekeeping - Restrict initialisation process to 64MB or greater to counter problems with users reporting a 'white screen' when running in a low-RAM environment.
133
- * Housekeeping - Refractor the admin notices code
134
- * Housekeeping - Create responsive PDF settings page
135
- * Housekeeping - Minify CSS and Javascript files
136
- * Housekeeping - Remove FontAwesome fonts from package and use Wordpress' build-in 'dashicons'
137
- * Housekeeping - Refine action and error messages
138
- * Housekeeping - Update initialisation tab copy for both pre- and post- initialisation
139
- * Housekeeping - Use Gravity Forms get_ip() function instead of custom function
140
- * Housekeeping - The in-built support form uses SSL once again (disabled in the past due to some servers being unable to verify the certificate).
141
-
142
- * Bug - When testing write permissions, file_exist() is throwing false positives for some users which would generate a warning when unlink() is called. Hide warning using '@'.
143
-
144
- = 3.4.1 =
145
- * Bug - Fix typo that effected sites running PHP5.2 or below.
146
-
147
- = 3.4.0.3 =
148
- * Bug - Define array_replace_recursive() if it doesn't exist, as it is PHP 5.3 only.
149
-
150
- = 3.4.0.2 =
151
- * Housekeeping - Wrapped the View PDF and Download buttons in correct language functions - _e()
152
- * Bug - Fix problem displaying the signature field
153
- * Bug - Fix notice errors with new 'save' PDF hook
154
-
155
- = 3.4.0.1 =
156
- * Housekeeping - Add commas on the last line of every config node in the configuration.php file
157
- * Housekeeping - Fix up initialisation error messages
158
- * Bug - Fix up mPDF bugs - soft hyphens, watermarks over SVG images, inline CSS bug
159
-
160
- = 3.4.0 =
161
- * Feature - Added auto-print prompt ability when you add &print=1 to the PDF URL (see https://developer.gravitypdf.com/documentation/display-pdf-in-browser/ for details)
162
- * Feature - Added ability to rotate absolute positioned text 180 degrees (previously only 90 and -90). Note: feature in beta
163
- * Feature - Backup all template files that are overridden when initialising to a folder inside PDF_EXTENDED_TEMPLATES
164
- * Feature - Added SSH initialisation support
165
- * Feature - Allow MERGETAGS to be used in all PDF templates, including default template (but only in the HTML field).
166
- * Feature - Updated mPDF to 3.7.1
167
- * Feature - Enable text/image watermark support. Added new example template example-watermark09.php showing off its usage (see http://gravitypdf.com/documentation-v3-x-x/templates/watermarks/)
168
- * Feature - Added full survey, poll and quiz support to both the default template and $form_data (see https://developer.gravitypdf.com/documentation/accessing-survey-poll-quiz-data/)
169
- * Feature - Shortcodes will now be processed in all templates, including default template (but only in the HTML field).
170
- * Feature - Added 'save' configuration option so PDFs are saved to the local disk when 'notifications' aren't enabled.
171
- * Feature - Added 'dpi' configuration option to modify the PDF image DPI. Default 96dpi. Use 300dpi for printing.
172
- * Feature - Added PDF/A1-b compliance option. Enable with 'pdfa1b' => true. See http://mpdf1.com/manual/index.php?tid=420&searchstring=pdf/a1-b for more details.
173
- * Feature - Added PDF/X1-a compliance option. Enable with 'pdfx1a' => true. See http://mpdf1.com/manual/index.php?tid=481&searchstring=pdf/x-1a for more details.
174
- * Feature - Added new constant option 'PDF_REPACK_FONT' which when enabled may improve function with some PostScript printers (disabled by default). Existing sites will need to add define('PDF_REPACK_FONT', true); to the bottom of their configuration.php file.
175
- * Feature - Added a sleuth of new hooks and filters for developers. See https://developer.gravitypdf.com/documentation/filters-and-hooks/ for examples.
176
- * Feature - Added $form_data['form_description'] key to $form_data array
177
- * Feature - Update $form_data['products'] array key to field ID
178
- * Feature - Added survey Likert output function for custom templates (much like the product table function). It can be used with the following command 'echo GFPDFEntryDetails::get_likert($form, $lead, $field_id);' where $field_id is substituted for the form field ID.
179
- * Feature - Added field descriptions to the $form_data array under the $form_data['field_descriptions'] key.
180
- * Feature - Added pre and post PDF generation filters and actions to pdf-render.php. These include gfpdfe_pre_render_pdf, gfpdfe_pdf_output_type, gfpdfe_pdf_filename and gfpdf_post_pdf_save.
181
- * Feature: $form_data['signature'] et al. keys now contain the signature width and height attributes
182
-
183
- * Housekeeping - Ensure the form and lead IDs are correctly passed throughout the render functions.
184
- * Housekeeping - Update settings page link to match new Gravity Forms URL structure
185
- * Housekeeping - Check if $lead['gfsurvey_score'] exists before assigning to $form_data array
186
- * Housekeeping - Removed table and font checksum debugging from mPDF when WP_DEBUG enabled as they produced inaccurate results.
187
- * Housekeeping - Fixed up mPDF logging location when WP_DEBUG enabled. Files now stored in wp-content/themes/Active_Theme_Folder/PDF_EXTENDED_TEMPLATES/output/ folder.
188
- * Housekeeping - Removed API logging locally when WP_DEBUG is enabled.
189
- * Housekeeping - Increase API timeout interval as some overseas users reported timeout issues
190
- * Housekeeping - Modified mPDF functions Image() and purify_utf8_text() to validate the input data so we don't have to do it every time through the template.
191
- * Housekeeping - Added ability to not re-deploy every update (not enabled this release as template files were all updated)
192
- * Housekeeping - Additional checks on load to see if any of the required file/folder structure is missing. If so, re-initilise.
193
- * Housekeeping - Save resources and turn off automatic rtl identification. Users must set the RTL option when configuring form
194
- * Housekeeping - Turn off mPDFs packTableData setting, decreasing processing time when working with large tables.
195
- * Housekeeping - $gf_pdf_default_configuration options now merge down into existing PDF nodes, instead of applying to only unassigned forms. $gf_pdf_config settings override any in $gf_pdf_default_configuration
196
- * Housekeeping - Center aligned Survey Likery field results
197
- * Housekeeping - Partially refactored the pdf-entry-detail.php code
198
- * Housekeeping - All default and example templates have been tidied. This won't affect custom templates.
199
- * Housekeeping - Set the gform_notification order number to 100 which will prevent other functions (example snippets from Gravity Forms, for instance) from overridding the attached PDF.
200
- * Housekeeping - Fix spelling mistake on initialising fonts
201
- * Housekeeping - Remove wpautop() function from Gravity Form HTML output, which was applied before rendering and was messing up the HTML markup.
202
- * Housekeeping - Remove empty list rows from the $form_data['list'] array in single and multi-column lists.
203
- * Housekeeping - Apply same CSS styles (padding, border and line height) to HTML fields as done to form values in default templates
204
- * Housekeeping - Replaced arbitrary wrapper IDs in the default templates with the actual field ID
205
-
206
- * Bug - Fixed signature rendering issue when custom signature size was being used
207
- * Bug - Fixed static error types in helper/install-update-manager.php file.
208
- * Bug - Fixed redeployment error message which wasn't showing correctly
209
- * Bug - Fixed issue with PDF not attaching to notification using Paypal's delayed notification feature
210
- * Bug - Fixed strict standard warning about calling GFPDF_Settings::settings_page();
211
- * Bug - Fixed strict standard warning about calling GFPDFEntryDetail::pdf_get_lead_field_display();
212
- * Bug - Fixed issue with Gravity Form Post Category field causing fatal error generating PDF
213
- * Bug - Fixed number field formatting issue when displaying on PDF.
214
- * Bug - Do additional check for PHP's MB_String regex functions before initialising ti prevent errors after initialising
215
- * Bug - Fixed problem with multiple nodes assigned to a form using the same template
216
- * Bug - Fixed path to fallback templates when not found
217
- * Bug - Fixed problem with master password setting to user password
218
-
219
-
220
- = 3.3.4 =
221
- * Bug - Fixed issue linking to PDF from front end
222
- * Housekeeping - Removed autoredirect to initialisation page
223
-
224
- = 3.3.3 =
225
- * Bug - Correctly call javascript to control admin area 'View PDFs' drop down
226
- * Bug - Some users still reported incorrect RAM. Convert MB/KB/GB values to M/K/G as per the PHP documentation.
227
- * Housekeeping - Show initilisation prompt on all admin area pages instead of only on the Gravity Forms pages
228
-
229
- = 3.3.2.1 =
230
- * Bug - Incorrectly showing assigned RAM to website
231
-
232
- = 3.3.2 =
233
- * Bug - Some hosts reported SSL certificate errors when using the support API. Disabled HTTPS for further investigation. Using hash-based verification for authentication.
234
- * Housekeeping - Forgot to disable API debug feature after completing beta
235
-
236
- = 3.3.1 =
237
- * Bug - $form_data['list'] was mapped using an incremental key instead of via the field ID
238
-
239
- = 3.3.0 =
240
- * Feature - Overhauled the initialisation process so that the software better reviews the host for potential problems before initialisation. This should help debug issues and make users aware there could be a problem before they begin using the software.
241
- * Feature - Overhauled the settings page to make it easier to access features of the software
242
- * Feature - Added a Support tab to the settings page which allows users to securely (over HTTPS) submit a support ticket to the Gravity PDF support desk
243
- * Feature - Changed select, multiselect and radio fields so that the default templates use the name rather than the value. $form_data now also includes the name and values for all these fields.
244
- * Feature - $form_data now includes all miscellaneous lead information in the $form_data['misc'] array.
245
- * Feature - $form_data now contains 24 and 12 hour time of entry submission.
246
- * Feature - Added localisation support
247
- * Compatibility - Added new multi-upload support which was added in Gravity Forms 1.8.
248
- * Bug - Added 'aid' parametre to the PDF url when multiple configuration nodes present on a single form
249
- * Bug - Fixed issue when Gravity Forms in No Conflict Mode
250
- * Bug - Font config.php's array keys now in lower case
251
- * Housekeeping - Moved all initialisation files to a folder called 'initialisation'.
252
- * Housekeeping - Renamed the configuration.php file in the plugin folder to configuration.php.example to alleviate confusion for developers who unwittingly modify the plugin configuration file instead of the file in their active theme's PDF_EXTENDED_TEMPLATES folder.
253
- * Housekeeping - Updated the plugin file system to a more MVC-style approach, with model and view folders.
254
- * Housekeeping - Removed ability to directly access default and example template files.
255
- * Housekeeping - Fixed PHP notices in default templates related to the default template-only configuration options
256
- * Housekeeping - Update core styles to match Wordpress 3.8/Gravity Forms 1.8.
257
- * Housekeeping - Updated header/footer examples to use @page in example.
258
-
259
- = 3.2.0 =
260
- * Feature - Can now view multiple PDFs assigned to a single form via the admin area. Note: You must provide a unique 'filename' parameter in configuration.php for multiple PDFs assigned to a single form.
261
- * Feature - You can exclude a field from the default templates using the class name 'exclude'. See our [FAQ topic](https://gravitypdf.com/#faqs) for more details.
262
- * Bug - Fixed issue viewing own PDF entry when logged in as anything lower than editor.
263
- * Bug - Fixed data return bug in pdf-entry-details.php that was preventing all data returning correctly.
264
- * Bug - Fixed PHP Warning when using products with no options
265
- * Bug - Fixed issue with invalid characters being added to the PDF filename. Most notably the date mergetag.
266
- * Bug - Limit filename length to 150 characters which should work on the majority of web servers.
267
- * Bug - Fixed problem sending duplicate PDF when using mass resend notification feature
268
- * Deprecated - Removed GF_FORM_ID and GF_LEAD_ID constants which were used in v2.x.x of the software. Ensure you follow [v2.x.x upgrade guide](https://developer.gravitypdf.com/news/version-2-3-migration-guide/) to your templates before upgrading.
269
-
270
- = 3.1.4 =
271
- * Bug - Fixed issue with plugin breaking website's when the Gravity Forms plugin wasn't activated.
272
- * Housekeeping - The plugin now only supports Gravity Forms 1.7 or higher and Wordpress 3.5 or higher.
273
- * Housekeeping - PDF template files can no longer be accessed directly. Instead, add &html=1 to the end of your URL when viewing a PDF.
274
- * Extension - Added additional filters to allow the lead ID and notifications to be overridden.
275
-
276
- = 3.1.3 =
277
- * Feature - Added signature_details_id to $form_data array which maps a signatures field ID to the array.
278
- * Extension - Added pre-PDF generator filter for use with extensions.
279
- * Bug - Fixed issue with quotes in entry data breaking custom templates.
280
- * Bug - Fixed issue with the plugin not correctly using the new default configuration template, if set.
281
- * Bug - Fixed issue with signature not being removed correctly when only testing with file_exists(). Added second is_dir() test.
282
- * Bug - Fixed issue with empty signature field not displaying when option 'default-show-empty' is set.
283
- * Bug - Fixed initialisation prompt issue when the MPDF package wasn't unpacked.
284
-
285
- = 3.1.2 =
286
- * Feature - Added list array, file path, form ID and lead ID to $form_data array in custom templates
287
- * Bug - Fixed initialisation prompt issue when updating plugin
288
- * Bug - Fixed window.open issue which prevented a new window from opening when viewing a PDF in the admin area
289
- * Bug - Fixed issue with product dropdown and radio button data showing the value instead of the name field.
290
- * Bug - Fixed incorrect URL pointing to signature in $form_data
291
-
292
- = 3.1.1 =
293
- * Bug - Users whose server only supports FTP file manipulation using the WP_Filesystem API moved the files into the wrong directory due to FTP usually being rooted to the Wordpress home directory. To fix this the plugin attempts to determine the FTP directory, otherwise assumes it is the WP base directory.
294
- * Bug - Initialisation error message was being called but the success message was also showing.
295
-
296
- = 3.1.0 =
297
- * Feature - Added defaults to configuration.php which allows users to define the default PDF settings for all Gravity Forms. See the [installation and configuration documentation](https://developer.gravitypdf.com/documentation/getting-started-with-gravity-pdf-configuration/) for more details.
298
- * Feature - Added three new configuration options 'default-show-html', 'default-show-empty' and 'default-show-page-names' which allow different display options to the three default templates. See the [installation and configuration documentation](http://gravitypdf.com/documentation-v3-x-x/installation-and-configuration/#default-template) for more details.
299
- * Feature - Added filter hooks 'gfpdfe_pdf_name' and 'gfpdfe_template' which allows developers to further modify a PDF name and template file, respectively, outside of the configuration.php. This is useful if you have a special case naming convention based on user input. See [https://developer.gravitypdf.com/documentation/filters-and-hooks/](https://developer.gravitypdf.com/documentation/filters-and-hooks/) for more details about using these filters.
300
- * Feature - Custom font support. Any .ttf font file added to the PDF_EXTENDED_TEMPLATES/fonts/ folder will be automatically installed once the plugin has been initialised. Users also have the option to just initialise the fonts via the settings page. See the [font/language documentation ](https://developer.gravitypdf.com/documentation/language-support/#install-custom-fonts) for details.
301
- * Compatability - Use Gravity Forms get_upload_root() and get_upload_url_root() instead of hard coding the signature upload directory in pdf-entry-detail.php
302
- * Compatability - Changed deprecated functions get_themes() and get_theme() to wp_get_theme() (added in Wordpress v3.4).
303
- * Compatability - The plugin now needs to be initialised on fresh installation and upgrade. This allows us to use the WP_Filesystem API for file manipulation.
304
- * Compatability - Automatic copying of PDF_EXTENDED_TEMPLATES folder on a theme change was removed in favour of a user prompt. This allows us to take advantage of the WP_Filesystem API.
305
- * Compatability - Added Wordpress compatibility checker (minimum now 3.4 or higher).
306
- * Bug - Removed ZipArchive in favour of Wordpress's WP_Filesystem API unzip_file() command. Some users reported the plugin would stop their entire website working if this extension wasn't installed.
307
- * Bug - Fixed Gravity Forms compatibility checker which wouldn't return the correct response.
308
- * Bug - Fixed minor bug in pdf.php when using static call 'self' in add_filter hook. Changed to class name.
309
- * Bug - Removed PHP notice about $even variable not being defined in pdf-entry-detail.php
310
- * Bug - Prevent code from continuing to excecute after sending header redirect.
311
-
312
- = 3.0.2 =
313
- * Backwards Compatibility - While PHP 5.3 has was released a number of years ago it seems a number of hosts do not currently offer this version to their clients. In the interest of backwards compatibility we've re-written the plugin to again work with PHP 5+.
314
- * Signature / Image Display Bug - All URLs have been converted to a path so images should now display correctly in PDF.
315
-
316
- = 3.0.1 =
317
- * Bug - Fixed issue that caused website to become unresponsive when Gravity Forms was disabled or upgraded
318
- * Bug - New HTML fields weren't being displayed in $form_data array
319
- * Feature - Options for default templates to disable HTML fields or empty fields (or both)
320
-
321
- = 3.0.0 =
322
- As of Gravity PDF v3.0.0 we have removed the DOMPDF package from our plugin and integrated the more advanced mPDF system. Along with a new HTML to PDF generator, we've rewritten the entire plugin's base code to make it more user friendly to both hobbyists and rock star web developers. Configuration time is cut in half and advanced features like adding security features is now accessible to users who have little experience with PHP.
323
-
324
- New Features include:
325
-
326
- * Language Support - almost all languages are supported including RTL (right to left) languages like Arabic and Hebrew and CJK languages - Chinese, Japanese and Korean.
327
- * HTML Page Numbering
328
- * Odd and even paging with mirrored margins (most commonly used in printing).
329
- * Nested Tables
330
- * Text-justification and hyphenation
331
- * Table of Contents
332
- * Index
333
- * Bookmarks
334
- * Watermarks
335
- * Password protection
336
- * UTF-8 encoded HTML
337
- * Better system resource handling
338
-
339
- A new HTML to PDF package wasn't the only change to this edition of the software. We have rewritten the entire configuration system and made it super easy to get the software up and running.
340
-
341
- Users will no longer place code in their active theme's functions.php file. Instead, configuration will happen in a new file called configuration.php, inside the PDF_EXTENDED_TEMPLATES folder (in your active theme).
342
-
343
- Other changes include
344
- * Improved security - further restrictions were placed on non-administrators viewing template files.
345
- * $form_data array tidied up - images won't be wrapped in anchor tags.
346
-
347
- For more details [view the 3.x.x online documentation](https://developer.gravitypdf.com/).
348
-
349
- = 2.2.3 =
350
- * Bug - Fixed mb_string error in the updated DOMPDF package.
351
-
352
- = 2.2.2 =
353
- * DOMPDF - We updated to the latest version of DOMPDF - DOMPDF 0.6.0 beta 3.
354
- * DOMPDF - We've enabled font subsetting by default which should help limit the increased PDF size when using DejaVu Sans (or any other font).
355
-
356
- = 2.2.1 =
357
- * Bug - Fixed HTML error which caused list items to distort on PDF
358
-
359
- = 2.2.0 =
360
- * Compatibility - Ensure compatibility with Gravity Forms 1.7. We've updated the functions.php code and remove gform_user_notification_attachments and gform_admin_notification_attachments hooks which are now deprecated. Functions gform_pdf_create and gform_add_attachment have been removed and replaced with gfpdfe_create_and_attach_pdf(). See upgrade documentation for details.
361
- * Enhancement - Added deployment code switch so the template redeployment feature can be turned on and off. This release doesn't require redeployment.
362
- * Enhancement - PDF_Generator() variables were getting long and complex so the third variable is now an array which will pass all the optional arguments. The new 1.7 compatible functions.php code includes this method by default. For backwards compatibility the function will still work with the variable structure prior to 2.2.0.
363
- * Bug - Fixed error generated by legacy code in the function PDF_processing() which is located in render_to_pdf.php.
364
- * Bug - Images and stylesheets will now try and be accessed with a local path instead of a URL. It fixes problem where some hosts were preventing read access from a URL. No template changes are required.
365
-
366
- = 2.1.1 =
367
- * Bug - Signatures stopped displaying after 2.1.0 update. Fixed issue.
368
- * Bug - First time install code now won't execute if already have configuration variables in database
369
-
370
- = 2.1.0 =
371
-
372
- * Feature - Product table can now be accessed directly through custom templates by running GFPDFEntryDetail::product_table($form, $lead);. See documentation for more details.
373
- * Feature - Update screen will ask you if you want to deploy new template files, instead of overriding your modified versions.
374
- * Feature - Product subtotal, shipping and total have been added to $form_data['field'] array to make it easier to work with product details in the custom template.
375
- * Feature - Added two new default template files. One displays field and name in two rows (like you see when viewing an entry in the admin area) and the other removes all styling. See documentation on use.
376
- * Security - Tightened PDF template security so that custom templates couldn't be automatically generated by just anyone. Now only logged in users with the correct privileges and the user who submitted the form (matched against IP) can auto generate a PDF. See documentation on usage.
377
- * Deprecated - Removed form data that was added directly to the $form_data array instead of $form_data['field'] array. Users upgrading will need to update their custom templates if not using field data from the $form_data[�field'] array. If using $form_data['field'] in your custom template this won't affect you.
378
- * Bug - Fixed problem with default template not showing and displaying a timeout error. Removed table tags and replaced with divs that are styled appropriately.
379
- * Bug - The new plugin theme folder will successfully create when upgrading. You won't have to deactivate and reactivate to get it working.
380
- * Bug - some installs had plugins that included the function mb_string which is also included in DOMPDF. DOMPDF will now check if the function exists before creating it.
381
- * Bug - Remove empty signature field from the default template.
382
- * Bug - fixed problem with redirecting to login screen even when logged in while accessing template file through the browser window directly.
383
- * Bug - fixed error where sample template would reimport itself automatically even after deleting it. Will now only reimport if any important changes to template need to be viewed straight after an update.
384
- * Bug - Moved render_to_pdf.php constants to pdf.php so we can use the constants in the core files. Was previously generating an error.
385
- * Housekeeping - Cleaned up core template files, moved functions into classes and added more in-file documentation.
386
- * Housekeeping - moved install/upgrade code from pdf.php to installation-update-manager.php
387
- * Housekeeping - changed pdf-entry-detail.php class name from GFEntryDetail to GFPDFEntryDetail to remove compatibility problems with Gravity Forms.
388
- * Housekeeping - created pdf-settings.php file to house the settings page code.
389
-
390
- = 2.0.1 =
391
- * Fixed Signature bug when checking if image file exists using URL instead of filesystem path
392
- * Fixed PHP Constants Notice
393
-
394
- = 2.0.0 =
395
- * Moved templates to active theme folder to prevent custom themes being removed on upgrade
396
- * Allow PDFs to be saved using a custom name
397
- * Fixed WP_Error bug when image/css file cannot be found
398
- * Upgraded to latest version of DOMPDF
399
- * Removed auto-load form bug which would see multiple instances of the example form loaded
400
- * Created a number of constants to allow easier developer modification
401
- * Plugin/Support moved to dedicated website.
402
- * Pro/Business package offers the ability to write fields on an existing PDF.
403
-
404
- = 1.2.3 =
405
- * Fixed $wpdb->prepare error
406
-
407
- = 1.2.2 =
408
- * Fixed bug with tempalte shipping method MERGETAGS
409
- * Fixed bug where attachment wasn't being sent
410
- * Fixed problem when all_url_fopen was turned off on server and failed to retreive remote images. Now uses WP_HTTP class.
411
-
412
- = 1.2.1 =
413
- * Fixed path to custom css file included in PDF template
414
-
415
- = 1.2.0 =
416
- * Template files moved to the plugin's template folder
417
- * Sample Form installed so developers have a working example to modify
418
- * Fixed bug when using WordPress in another directory to the site
419
-
420
- = 1.1.0 =
421
- * Now compatible with Gravity Forms Signature Add-On
422
- * Moved the field data functions out side of the Gravity Forms core so users can freely style their form information (located in pdf-entry-detail.php)
423
- * Simplified the field data output
424
- * Fixed bug when using product information
425
-
426
- = 1.0.0 =
427
- * First release.
1
+ = 3.7.7 =
2
+ * Bug - Ensure 'gfpdf_post_pdf_save' action gets triggered for all PDFs when resending notifications
3
+ * Housekeeping - Remove compress.php from mPDF package (unneeded)
4
+
5
+ = 3.7.6 =
6
+ * Bug - Added full support for all Gravity Forms notification events (includes Payment Complete, Payment Refund, Payment Failed, Payment Pending ect)
7
+ * Bug - Resolve mPDF PHP7 image parsing error due to a change in variable order parsing.
8
+
9
+ = 3.7.5 =
10
+ * Housekeeping - Tweak mPDF package to be PHP7 compatible.
11
+
12
+ = 3.7.4 =
13
+ * Housekeeping - Revert patch made in last update as Gravity Forms 1.9.9 fixes the issue internally.
14
+
15
+ = 3.7.3 =
16
+ * Bug - Gravity Forms 1.9 didn't automatically nl2br paragraph text mergetags. Fixed this issue in custom PDF templates.
17
+
18
+ = 3.7.2 =
19
+ * Bug - Updated $form_data['date_created'], $form_data['date_created_usa'], $form_data['misc']['date_time'], $form_data['misc']['time_24hr'] and $form_data['misc']['time_12hr'] to factor in the website's timezone settings.
20
+
21
+ = 3.7.1 =
22
+ * Housekeeping - Allow control over signature width in default template using the 'gfpdfe_signature_width' filter
23
+ * Housekeeping - Add better error checking when migrating PDF template folder
24
+ * Housekeeping - Add unit testing to the directory migration function
25
+ * Bug - Fixed backwards-compatiiblity PHP error when viewing custom PDF templates on Gravity Forms 1.8.3 or below.
26
+ * Bug - Ensure checkbox field names are included in the $form_data array
27
+
28
+ = 3.7.0 =
29
+ * Feature - Added 'default-show-section-content' configuration option. You can now display the section break content in the default template. Note: if this option is enabled and the section break is empty it will still be displayed on the PDF.
30
+ * Feature - Added hooks 'gfpdfe_template_location' and 'gfpdfe_template_location_uri' to change PDF template location
31
+ * Housekeeping - Migrate your template and configuration files. As of Gravity PDF 3.7 we'll be dropping the 'site_name' folder for single WordPress installs and changing the multisite install directory to the site ID.
32
+ * Housekeeping - Added $form_data['html_id'] key which has the HTML fields added by their ID (much like the signature_details_id key).
33
+ * Housekeeping - Add large number of unit tests
34
+ * Housekeeping - Derestrict certain pages software loads on.
35
+ * Housekeeping - Split up PDF viewing security components into smaller chunks (easier to unit test)
36
+ * Housekeeping - Remove CLI-checking override in RAM settings
37
+ * Housekeeping - Included directory paths by default on the system status page
38
+ * Housekeeping - Updated configuration.php examples to include new default config option and refined the copy
39
+ * Bug - Fixed issue initialising plugin when memory limit was set to -1 (unlimited)
40
+ * Bug - Fix Multisite migration problem where if an error was thrown for one of the sub sites it caused all of the sites to show an error (even if they were successful)
41
+ * Bug - Fix typo in example-template.php file
42
+ * Bug - Fix up notices in custom templates when using poll/survey/quiz add ons.
43
+ * Bug - Fix up notice in custom template when the form description is empty
44
+ * Bug - Fix up notices in mPDF template when using headers/footers
45
+ * Bug - Fix up error in PDF when signature field wasn't filled in
46
+
47
+ = 3.6.0 =
48
+ * Feature - Added support for Gravity Form's sub-field middle name (1.9Beta)
49
+ * Feature - Patch mPDF with full :nth-child support on TD and TR table cells
50
+ * Feature - Added $form_data[products_totals][subtotal] key (total price without shipping costs added)
51
+ * Feature - Added formated money to all product fields in the $form_data array
52
+ * Feature - Default templates: only show fields who's conditional logic is true. Perfect when used with default-show-html
53
+ * Housekeeping - Move PDF_EXTENDED_TEMPLATES folder to the /wp-content/upload/ directory. Get more info about the move (see http://developer.gravitypdf.com/news/migrating-template-directory-means/)
54
+ * Housekeeping - Refined when admin resources are loaded
55
+ * Housekeeping - Fixed typo during initial initialisation
56
+ * Housekeeping - Switched icons back to FontAwesome which is shipped by default with Gravity Forms
57
+ * Housekeeping - Display full path to mPDF tmp directory when there are issues writing to it
58
+ * Housekeeping - Modified font installation message.
59
+ * Housekeeping - Update example-header-and-footer_06.php and example-advanced-headers_07.php to better reflect current mPDF features
60
+ * Bug - Fixed issue pulling the correct configuration when multiple nodes were assigned to multiple forms
61
+ * Bug - Fixed number field formatting issue which always rounded to two decimal places
62
+ * Bug - Fixed JS namespace issue with WordPress Leads plugin
63
+ * Bug - Fixed error initialising fonts / backing up PDF_EXTENDED_TEMPLATES directory when using the glob() function
64
+ * Bug - Fix issue with PHP 5.0 and 5.1 array_replace_recursive function when used with an array inside the $gf_pdf_config array
65
+ * Bug - Fixed fatal error when logged in user attempts to view PDF they don't have access to
66
+ * Bug - Fixed issue in $form_data array where single-column list items where being returned as an array and not a HTML list.
67
+ * Bug - Prevent unauthorised users auto-initialising the software or migrating the templates folder
68
+ * Bug - Fixed up incorrect formatting issue when using custom font name
69
+ * Bug - Fixed issue displaying Times New Roman in PDF templates
70
+
71
+ = 3.5.11.1 =
72
+ * Bug - Fix issue saving and sending blank PDFs due to security fix
73
+
74
+ = 3.5.11 =
75
+ * Bug - Fix security issue which gave unauthorised users access to Gravity Form entires
76
+
77
+ = 3.5.10 =
78
+ * Housekeeping - Include individual scoring for Gravity Form Survey Likert field in the $form_data['survey'] array
79
+ * Bug - Fix fatal error when Gravity Forms isn't activated, but Gravity PDF is.
80
+
81
+ = 3.5.9 =
82
+ * Bug - Rollback recent changes that introduced the GFAPI as introduces errors for older versions of Gravity Forms. Will reintroduce in next major release and increase the minimum Gravity Forms version.
83
+
84
+ = 3.5.8 =
85
+ * Bug - Fixed issue affected some users where a depreciated function was causing a fatal error
86
+
87
+ = 3.5.7 =
88
+ * Bug - Fixed issue where the PDF settings page was blank for some users
89
+
90
+ = 3.5.6 =
91
+ * Bug - Fixed issue with last release that affected checks to see if Gravity Forms has submitting
92
+ * Bug - Fixed fatal error with servers using PHP5.2 or lower
93
+ * Bug - Fixed E_NOTICE for replacement array_replace_recursive() function in PHP5.2 or lower
94
+ * Bug - Fixed issue with AJAX spinner showing when submitting support request
95
+
96
+ = 3.5.5 =
97
+ * Housekeeping - Include French translation (thanks to Marie-Aude Koiransky-Ballouk)
98
+ * Housekeeping - Wrap 'Initialise Fonts' text in translation ready _e() function
99
+ * Housekeeping - Tidy up System Status CSS styles to accomidate translation text lengths
100
+ * Housekeeping - Fix E_NOTICE when viewing entry details page when form has no PDF configuration
101
+ * Bug - Fixed load_plugin_textdomain which was incorrectly called.
102
+ * Bug - Correctly check if the plugin is loaded correctly before letting the PDF class fully load
103
+
104
+ = 3.5.4 =
105
+ * Bug - Fixed issue with incorrect PDF name showing on the entry details page
106
+ * Bug - Fixed issue with custom fonts being inaccessible without manually reinstalling after upgrading.
107
+ * Housekeeping - Added in two new filters to modify the $mpdf object. 'gfpdfe_mpdf_class' and 'gfpdfe_mpdf_class_pre_render' (replaces the gfpdfe_pre_render_pdf filter).
108
+
109
+ = 3.5.3 =
110
+ * Bug - Mergetags braces ({}) were being encoded before conversion
111
+ * Bug - Fixed issue with empty string being passed to array filter
112
+ * Housekeeping - Enabled mergetag usage in the pdf_password and pdf_master_password configuration options
113
+ * Housekeeping - Correctly call $wpdb->prepare so the variables in are in the second argument
114
+
115
+ = 3.5.2 =
116
+ * Bug - Initialisation folder .htaccess file was preventing template.css from being loaded by the default templates.
117
+
118
+ = 3.5.1 =
119
+ * Bug - Fixed issue with core fonts Arial/Helvetica, Times/Times New Roman and Courier not displaying in the PDF.
120
+ * Bug - Fixed display issues for multiple PDFs on the details admin entry page
121
+ * Housekeeping - Made the details entry page PDF view consistent for single or multiple PDFs
122
+ * Housekeeping - Ensured all javascript files are minified and are correctly being used
123
+ * Housekeeping - Remove legacy notices from mPDF package
124
+
125
+ = 3.5.0 =
126
+ * Feature - No longer need to reinitialise every time the software is updated.
127
+ * Feature - Add auto-initialiser on initial installation for sites that have direct write access to their server files
128
+ * Feature - Add auto-initialiser on initial installation across entire multisite network for sites who have direct write access to their server files.
129
+ * Feature - Add auto-PDF_EXTENDED_TEMPLATES theme syncer for sites that have direct write access to their server files
130
+ * Feature - Correctly added language support. The .PO file is located in the /language/ folder if anyone would like to do a translation.
131
+
132
+ * Housekeeping - Restrict initialisation process to 64MB or greater to counter problems with users reporting a 'white screen' when running in a low-RAM environment.
133
+ * Housekeeping - Refractor the admin notices code
134
+ * Housekeeping - Create responsive PDF settings page
135
+ * Housekeeping - Minify CSS and Javascript files
136
+ * Housekeeping - Remove FontAwesome fonts from package and use Wordpress' build-in 'dashicons'
137
+ * Housekeeping - Refine action and error messages
138
+ * Housekeeping - Update initialisation tab copy for both pre- and post- initialisation
139
+ * Housekeeping - Use Gravity Forms get_ip() function instead of custom function
140
+ * Housekeeping - The in-built support form uses SSL once again (disabled in the past due to some servers being unable to verify the certificate).
141
+
142
+ * Bug - When testing write permissions, file_exist() is throwing false positives for some users which would generate a warning when unlink() is called. Hide warning using '@'.
143
+
144
+ = 3.4.1 =
145
+ * Bug - Fix typo that effected sites running PHP5.2 or below.
146
+
147
+ = 3.4.0.3 =
148
+ * Bug - Define array_replace_recursive() if it doesn't exist, as it is PHP 5.3 only.
149
+
150
+ = 3.4.0.2 =
151
+ * Housekeeping - Wrapped the View PDF and Download buttons in correct language functions - _e()
152
+ * Bug - Fix problem displaying the signature field
153
+ * Bug - Fix notice errors with new 'save' PDF hook
154
+
155
+ = 3.4.0.1 =
156
+ * Housekeeping - Add commas on the last line of every config node in the configuration.php file
157
+ * Housekeeping - Fix up initialisation error messages
158
+ * Bug - Fix up mPDF bugs - soft hyphens, watermarks over SVG images, inline CSS bug
159
+
160
+ = 3.4.0 =
161
+ * Feature - Added auto-print prompt ability when you add &print=1 to the PDF URL (see https://developer.gravitypdf.com/documentation/display-pdf-in-browser/ for details)
162
+ * Feature - Added ability to rotate absolute positioned text 180 degrees (previously only 90 and -90). Note: feature in beta
163
+ * Feature - Backup all template files that are overridden when initialising to a folder inside PDF_EXTENDED_TEMPLATES
164
+ * Feature - Added SSH initialisation support
165
+ * Feature - Allow MERGETAGS to be used in all PDF templates, including default template (but only in the HTML field).
166
+ * Feature - Updated mPDF to 3.7.1
167
+ * Feature - Enable text/image watermark support. Added new example template example-watermark09.php showing off its usage (see http://gravitypdf.com/documentation-v3-x-x/templates/watermarks/)
168
+ * Feature - Added full survey, poll and quiz support to both the default template and $form_data (see https://developer.gravitypdf.com/documentation/accessing-survey-poll-quiz-data/)
169
+ * Feature - Shortcodes will now be processed in all templates, including default template (but only in the HTML field).
170
+ * Feature - Added 'save' configuration option so PDFs are saved to the local disk when 'notifications' aren't enabled.
171
+ * Feature - Added 'dpi' configuration option to modify the PDF image DPI. Default 96dpi. Use 300dpi for printing.
172
+ * Feature - Added PDF/A1-b compliance option. Enable with 'pdfa1b' => true. See http://mpdf1.com/manual/index.php?tid=420&searchstring=pdf/a1-b for more details.
173
+ * Feature - Added PDF/X1-a compliance option. Enable with 'pdfx1a' => true. See http://mpdf1.com/manual/index.php?tid=481&searchstring=pdf/x-1a for more details.
174
+ * Feature - Added new constant option 'PDF_REPACK_FONT' which when enabled may improve function with some PostScript printers (disabled by default). Existing sites will need to add define('PDF_REPACK_FONT', true); to the bottom of their configuration.php file.
175
+ * Feature - Added a sleuth of new hooks and filters for developers. See https://developer.gravitypdf.com/documentation/filters-and-hooks/ for examples.
176
+ * Feature - Added $form_data['form_description'] key to $form_data array
177
+ * Feature - Update $form_data['products'] array key to field ID
178
+ * Feature - Added survey Likert output function for custom templates (much like the product table function). It can be used with the following command 'echo GFPDFEntryDetails::get_likert($form, $lead, $field_id);' where $field_id is substituted for the form field ID.
179
+ * Feature - Added field descriptions to the $form_data array under the $form_data['field_descriptions'] key.
180
+ * Feature - Added pre and post PDF generation filters and actions to pdf-render.php. These include gfpdfe_pre_render_pdf, gfpdfe_pdf_output_type, gfpdfe_pdf_filename and gfpdf_post_pdf_save.
181
+ * Feature: $form_data['signature'] et al. keys now contain the signature width and height attributes
182
+
183
+ * Housekeeping - Ensure the form and lead IDs are correctly passed throughout the render functions.
184
+ * Housekeeping - Update settings page link to match new Gravity Forms URL structure
185
+ * Housekeeping - Check if $lead['gfsurvey_score'] exists before assigning to $form_data array
186
+ * Housekeeping - Removed table and font checksum debugging from mPDF when WP_DEBUG enabled as they produced inaccurate results.
187
+ * Housekeeping - Fixed up mPDF logging location when WP_DEBUG enabled. Files now stored in wp-content/themes/Active_Theme_Folder/PDF_EXTENDED_TEMPLATES/output/ folder.
188
+ * Housekeeping - Removed API logging locally when WP_DEBUG is enabled.
189
+ * Housekeeping - Increase API timeout interval as some overseas users reported timeout issues
190
+ * Housekeeping - Modified mPDF functions Image() and purify_utf8_text() to validate the input data so we don't have to do it every time through the template.
191
+ * Housekeeping - Added ability to not re-deploy every update (not enabled this release as template files were all updated)
192
+ * Housekeeping - Additional checks on load to see if any of the required file/folder structure is missing. If so, re-initilise.
193
+ * Housekeeping - Save resources and turn off automatic rtl identification. Users must set the RTL option when configuring form
194
+ * Housekeeping - Turn off mPDFs packTableData setting, decreasing processing time when working with large tables.
195
+ * Housekeeping - $gf_pdf_default_configuration options now merge down into existing PDF nodes, instead of applying to only unassigned forms. $gf_pdf_config settings override any in $gf_pdf_default_configuration
196
+ * Housekeeping - Center aligned Survey Likery field results
197
+ * Housekeeping - Partially refactored the pdf-entry-detail.php code
198
+ * Housekeeping - All default and example templates have been tidied. This won't affect custom templates.
199
+ * Housekeeping - Set the gform_notification order number to 100 which will prevent other functions (example snippets from Gravity Forms, for instance) from overridding the attached PDF.
200
+ * Housekeeping - Fix spelling mistake on initialising fonts
201
+ * Housekeeping - Remove wpautop() function from Gravity Form HTML output, which was applied before rendering and was messing up the HTML markup.
202
+ * Housekeeping - Remove empty list rows from the $form_data['list'] array in single and multi-column lists.
203
+ * Housekeeping - Apply same CSS styles (padding, border and line height) to HTML fields as done to form values in default templates
204
+ * Housekeeping - Replaced arbitrary wrapper IDs in the default templates with the actual field ID
205
+
206
+ * Bug - Fixed signature rendering issue when custom signature size was being used
207
+ * Bug - Fixed static error types in helper/install-update-manager.php file.
208
+ * Bug - Fixed redeployment error message which wasn't showing correctly
209
+ * Bug - Fixed issue with PDF not attaching to notification using Paypal's delayed notification feature
210
+ * Bug - Fixed strict standard warning about calling GFPDF_Settings::settings_page();
211
+ * Bug - Fixed strict standard warning about calling GFPDFEntryDetail::pdf_get_lead_field_display();
212
+ * Bug - Fixed issue with Gravity Form Post Category field causing fatal error generating PDF
213
+ * Bug - Fixed number field formatting issue when displaying on PDF.
214
+ * Bug - Do additional check for PHP's MB_String regex functions before initialising ti prevent errors after initialising
215
+ * Bug - Fixed problem with multiple nodes assigned to a form using the same template
216
+ * Bug - Fixed path to fallback templates when not found
217
+ * Bug - Fixed problem with master password setting to user password
218
+
219
+
220
+ = 3.3.4 =
221
+ * Bug - Fixed issue linking to PDF from front end
222
+ * Housekeeping - Removed autoredirect to initialisation page
223
+
224
+ = 3.3.3 =
225
+ * Bug - Correctly call javascript to control admin area 'View PDFs' drop down
226
+ * Bug - Some users still reported incorrect RAM. Convert MB/KB/GB values to M/K/G as per the PHP documentation.
227
+ * Housekeeping - Show initilisation prompt on all admin area pages instead of only on the Gravity Forms pages
228
+
229
+ = 3.3.2.1 =
230
+ * Bug - Incorrectly showing assigned RAM to website
231
+
232
+ = 3.3.2 =
233
+ * Bug - Some hosts reported SSL certificate errors when using the support API. Disabled HTTPS for further investigation. Using hash-based verification for authentication.
234
+ * Housekeeping - Forgot to disable API debug feature after completing beta
235
+
236
+ = 3.3.1 =
237
+ * Bug - $form_data['list'] was mapped using an incremental key instead of via the field ID
238
+
239
+ = 3.3.0 =
240
+ * Feature - Overhauled the initialisation process so that the software better reviews the host for potential problems before initialisation. This should help debug issues and make users aware there could be a problem before they begin using the software.
241
+ * Feature - Overhauled the settings page to make it easier to access features of the software
242
+ * Feature - Added a Support tab to the settings page which allows users to securely (over HTTPS) submit a support ticket to the Gravity PDF support desk
243
+ * Feature - Changed select, multiselect and radio fields so that the default templates use the name rather than the value. $form_data now also includes the name and values for all these fields.
244
+ * Feature - $form_data now includes all miscellaneous lead information in the $form_data['misc'] array.
245
+ * Feature - $form_data now contains 24 and 12 hour time of entry submission.
246
+ * Feature - Added localisation support
247
+ * Compatibility - Added new multi-upload support which was added in Gravity Forms 1.8.
248
+ * Bug - Added 'aid' parametre to the PDF url when multiple configuration nodes present on a single form
249
+ * Bug - Fixed issue when Gravity Forms in No Conflict Mode
250
+ * Bug - Font config.php's array keys now in lower case
251
+ * Housekeeping - Moved all initialisation files to a folder called 'initialisation'.
252
+ * Housekeeping - Renamed the configuration.php file in the plugin folder to configuration.php.example to alleviate confusion for developers who unwittingly modify the plugin configuration file instead of the file in their active theme's PDF_EXTENDED_TEMPLATES folder.
253
+ * Housekeeping - Updated the plugin file system to a more MVC-style approach, with model and view folders.
254
+ * Housekeeping - Removed ability to directly access default and example template files.
255
+ * Housekeeping - Fixed PHP notices in default templates related to the default template-only configuration options
256
+ * Housekeeping - Update core styles to match Wordpress 3.8/Gravity Forms 1.8.
257
+ * Housekeeping - Updated header/footer examples to use @page in example.
258
+
259
+ = 3.2.0 =
260
+ * Feature - Can now view multiple PDFs assigned to a single form via the admin area. Note: You must provide a unique 'filename' parameter in configuration.php for multiple PDFs assigned to a single form.
261
+ * Feature - You can exclude a field from the default templates using the class name 'exclude'. See our [FAQ topic](https://gravitypdf.com/#faqs) for more details.
262
+ * Bug - Fixed issue viewing own PDF entry when logged in as anything lower than editor.
263
+ * Bug - Fixed data return bug in pdf-entry-details.php that was preventing all data returning correctly.
264
+ * Bug - Fixed PHP Warning when using products with no options
265
+ * Bug - Fixed issue with invalid characters being added to the PDF filename. Most notably the date mergetag.
266
+ * Bug - Limit filename length to 150 characters which should work on the majority of web servers.
267
+ * Bug - Fixed problem sending duplicate PDF when using mass resend notification feature
268
+ * Deprecated - Removed GF_FORM_ID and GF_LEAD_ID constants which were used in v2.x.x of the software. Ensure you follow [v2.x.x upgrade guide](https://developer.gravitypdf.com/news/version-2-3-migration-guide/) to your templates before upgrading.
269
+
270
+ = 3.1.4 =
271
+ * Bug - Fixed issue with plugin breaking website's when the Gravity Forms plugin wasn't activated.
272
+ * Housekeeping - The plugin now only supports Gravity Forms 1.7 or higher and Wordpress 3.5 or higher.
273
+ * Housekeeping - PDF template files can no longer be accessed directly. Instead, add &html=1 to the end of your URL when viewing a PDF.
274
+ * Extension - Added additional filters to allow the lead ID and notifications to be overridden.
275
+
276
+ = 3.1.3 =
277
+ * Feature - Added signature_details_id to $form_data array which maps a signatures field ID to the array.
278
+ * Extension - Added pre-PDF generator filter for use with extensions.
279
+ * Bug - Fixed issue with quotes in entry data breaking custom templates.
280
+ * Bug - Fixed issue with the plugin not correctly using the new default configuration template, if set.
281
+ * Bug - Fixed issue with signature not being removed correctly when only testing with file_exists(). Added second is_dir() test.
282
+ * Bug - Fixed issue with empty signature field not displaying when option 'default-show-empty' is set.
283
+ * Bug - Fixed initialisation prompt issue when the MPDF package wasn't unpacked.
284
+
285
+ = 3.1.2 =
286
+ * Feature - Added list array, file path, form ID and lead ID to $form_data array in custom templates
287
+ * Bug - Fixed initialisation prompt issue when updating plugin
288
+ * Bug - Fixed window.open issue which prevented a new window from opening when viewing a PDF in the admin area
289
+ * Bug - Fixed issue with product dropdown and radio button data showing the value instead of the name field.
290
+ * Bug - Fixed incorrect URL pointing to signature in $form_data
291
+
292
+ = 3.1.1 =
293
+ * Bug - Users whose server only supports FTP file manipulation using the WP_Filesystem API moved the files into the wrong directory due to FTP usually being rooted to the Wordpress home directory. To fix this the plugin attempts to determine the FTP directory, otherwise assumes it is the WP base directory.
294
+ * Bug - Initialisation error message was being called but the success message was also showing.
295
+
296
+ = 3.1.0 =
297
+ * Feature - Added defaults to configuration.php which allows users to define the default PDF settings for all Gravity Forms. See the [installation and configuration documentation](https://developer.gravitypdf.com/documentation/getting-started-with-gravity-pdf-configuration/) for more details.
298
+ * Feature - Added three new configuration options 'default-show-html', 'default-show-empty' and 'default-show-page-names' which allow different display options to the three default templates. See the [installation and configuration documentation](http://gravitypdf.com/documentation-v3-x-x/installation-and-configuration/#default-template) for more details.
299
+ * Feature - Added filter hooks 'gfpdfe_pdf_name' and 'gfpdfe_template' which allows developers to further modify a PDF name and template file, respectively, outside of the configuration.php. This is useful if you have a special case naming convention based on user input. See [https://developer.gravitypdf.com/documentation/filters-and-hooks/](https://developer.gravitypdf.com/documentation/filters-and-hooks/) for more details about using these filters.
300
+ * Feature - Custom font support. Any .ttf font file added to the PDF_EXTENDED_TEMPLATES/fonts/ folder will be automatically installed once the plugin has been initialised. Users also have the option to just initialise the fonts via the settings page. See the [font/language documentation ](https://developer.gravitypdf.com/documentation/language-support/#install-custom-fonts) for details.
301
+ * Compatability - Use Gravity Forms get_upload_root() and get_upload_url_root() instead of hard coding the signature upload directory in pdf-entry-detail.php
302
+ * Compatability - Changed deprecated functions get_themes() and get_theme() to wp_get_theme() (added in Wordpress v3.4).
303
+ * Compatability - The plugin now needs to be initialised on fresh installation and upgrade. This allows us to use the WP_Filesystem API for file manipulation.
304
+ * Compatability - Automatic copying of PDF_EXTENDED_TEMPLATES folder on a theme change was removed in favour of a user prompt. This allows us to take advantage of the WP_Filesystem API.
305
+ * Compatability - Added Wordpress compatibility checker (minimum now 3.4 or higher).
306
+ * Bug - Removed ZipArchive in favour of Wordpress's WP_Filesystem API unzip_file() command. Some users reported the plugin would stop their entire website working if this extension wasn't installed.
307
+ * Bug - Fixed Gravity Forms compatibility checker which wouldn't return the correct response.
308
+ * Bug - Fixed minor bug in pdf.php when using static call 'self' in add_filter hook. Changed to class name.
309
+ * Bug - Removed PHP notice about $even variable not being defined in pdf-entry-detail.php
310
+ * Bug - Prevent code from continuing to excecute after sending header redirect.
311
+
312
+ = 3.0.2 =
313
+ * Backwards Compatibility - While PHP 5.3 has was released a number of years ago it seems a number of hosts do not currently offer this version to their clients. In the interest of backwards compatibility we've re-written the plugin to again work with PHP 5+.
314
+ * Signature / Image Display Bug - All URLs have been converted to a path so images should now display correctly in PDF.
315
+
316
+ = 3.0.1 =
317
+ * Bug - Fixed issue that caused website to become unresponsive when Gravity Forms was disabled or upgraded
318
+ * Bug - New HTML fields weren't being displayed in $form_data array
319
+ * Feature - Options for default templates to disable HTML fields or empty fields (or both)
320
+
321
+ = 3.0.0 =
322
+ As of Gravity PDF v3.0.0 we have removed the DOMPDF package from our plugin and integrated the more advanced mPDF system. Along with a new HTML to PDF generator, we've rewritten the entire plugin's base code to make it more user friendly to both hobbyists and rock star web developers. Configuration time is cut in half and advanced features like adding security features is now accessible to users who have little experience with PHP.
323
+
324
+ New Features include:
325
+
326
+ * Language Support - almost all languages are supported including RTL (right to left) languages like Arabic and Hebrew and CJK languages - Chinese, Japanese and Korean.
327
+ * HTML Page Numbering
328
+ * Odd and even paging with mirrored margins (most commonly used in printing).
329
+ * Nested Tables
330
+ * Text-justification and hyphenation
331
+ * Table of Contents
332
+ * Index
333
+ * Bookmarks
334
+ * Watermarks
335
+ * Password protection
336
+ * UTF-8 encoded HTML
337
+ * Better system resource handling
338
+
339
+ A new HTML to PDF package wasn't the only change to this edition of the software. We have rewritten the entire configuration system and made it super easy to get the software up and running.
340
+
341
+ Users will no longer place code in their active theme's functions.php file. Instead, configuration will happen in a new file called configuration.php, inside the PDF_EXTENDED_TEMPLATES folder (in your active theme).
342
+
343
+ Other changes include
344
+ * Improved security - further restrictions were placed on non-administrators viewing template files.
345
+ * $form_data array tidied up - images won't be wrapped in anchor tags.
346
+
347
+ For more details [view the 3.x.x online documentation](https://developer.gravitypdf.com/).
348
+
349
+ = 2.2.3 =
350
+ * Bug - Fixed mb_string error in the updated DOMPDF package.
351
+
352
+ = 2.2.2 =
353
+ * DOMPDF - We updated to the latest version of DOMPDF - DOMPDF 0.6.0 beta 3.
354
+ * DOMPDF - We've enabled font subsetting by default which should help limit the increased PDF size when using DejaVu Sans (or any other font).
355
+
356
+ = 2.2.1 =
357
+ * Bug - Fixed HTML error which caused list items to distort on PDF
358
+
359
+ = 2.2.0 =
360
+ * Compatibility - Ensure compatibility with Gravity Forms 1.7. We've updated the functions.php code and remove gform_user_notification_attachments and gform_admin_notification_attachments hooks which are now deprecated. Functions gform_pdf_create and gform_add_attachment have been removed and replaced with gfpdfe_create_and_attach_pdf(). See upgrade documentation for details.
361
+ * Enhancement - Added deployment code switch so the template redeployment feature can be turned on and off. This release doesn't require redeployment.
362
+ * Enhancement - PDF_Generator() variables were getting long and complex so the third variable is now an array which will pass all the optional arguments. The new 1.7 compatible functions.php code includes this method by default. For backwards compatibility the function will still work with the variable structure prior to 2.2.0.
363
+ * Bug - Fixed error generated by legacy code in the function PDF_processing() which is located in render_to_pdf.php.
364
+ * Bug - Images and stylesheets will now try and be accessed with a local path instead of a URL. It fixes problem where some hosts were preventing read access from a URL. No template changes are required.
365
+
366
+ = 2.1.1 =
367
+ * Bug - Signatures stopped displaying after 2.1.0 update. Fixed issue.
368
+ * Bug - First time install code now won't execute if already have configuration variables in database
369
+
370
+ = 2.1.0 =
371
+
372
+ * Feature - Product table can now be accessed directly through custom templates by running GFPDFEntryDetail::product_table($form, $lead);. See documentation for more details.
373
+ * Feature - Update screen will ask you if you want to deploy new template files, instead of overriding your modified versions.
374
+ * Feature - Product subtotal, shipping and total have been added to $form_data['field'] array to make it easier to work with product details in the custom template.
375
+ * Feature - Added two new default template files. One displays field and name in two rows (like you see when viewing an entry in the admin area) and the other removes all styling. See documentation on use.
376
+ * Security - Tightened PDF template security so that custom templates couldn't be automatically generated by just anyone. Now only logged in users with the correct privileges and the user who submitted the form (matched against IP) can auto generate a PDF. See documentation on usage.
377
+ * Deprecated - Removed form data that was added directly to the $form_data array instead of $form_data['field'] array. Users upgrading will need to update their custom templates if not using field data from the $form_data[�field'] array. If using $form_data['field'] in your custom template this won't affect you.
378
+ * Bug - Fixed problem with default template not showing and displaying a timeout error. Removed table tags and replaced with divs that are styled appropriately.
379
+ * Bug - The new plugin theme folder will successfully create when upgrading. You won't have to deactivate and reactivate to get it working.
380
+ * Bug - some installs had plugins that included the function mb_string which is also included in DOMPDF. DOMPDF will now check if the function exists before creating it.
381
+ * Bug - Remove empty signature field from the default template.
382
+ * Bug - fixed problem with redirecting to login screen even when logged in while accessing template file through the browser window directly.
383
+ * Bug - fixed error where sample template would reimport itself automatically even after deleting it. Will now only reimport if any important changes to template need to be viewed straight after an update.
384
+ * Bug - Moved render_to_pdf.php constants to pdf.php so we can use the constants in the core files. Was previously generating an error.
385
+ * Housekeeping - Cleaned up core template files, moved functions into classes and added more in-file documentation.
386
+ * Housekeeping - moved install/upgrade code from pdf.php to installation-update-manager.php
387
+ * Housekeeping - changed pdf-entry-detail.php class name from GFEntryDetail to GFPDFEntryDetail to remove compatibility problems with Gravity Forms.
388
+ * Housekeeping - created pdf-settings.php file to house the settings page code.
389
+
390
+ = 2.0.1 =
391
+ * Fixed Signature bug when checking if image file exists using URL instead of filesystem path
392
+ * Fixed PHP Constants Notice
393
+
394
+ = 2.0.0 =
395
+ * Moved templates to active theme folder to prevent custom themes being removed on upgrade
396
+ * Allow PDFs to be saved using a custom name
397
+ * Fixed WP_Error bug when image/css file cannot be found
398
+ * Upgraded to latest version of DOMPDF
399
+ * Removed auto-load form bug which would see multiple instances of the example form loaded
400
+ * Created a number of constants to allow easier developer modification
401
+ * Plugin/Support moved to dedicated website.
402
+ * Pro/Business package offers the ability to write fields on an existing PDF.
403
+
404
+ = 1.2.3 =
405
+ * Fixed $wpdb->prepare error
406
+
407
+ = 1.2.2 =
408
+ * Fixed bug with tempalte shipping method MERGETAGS
409
+ * Fixed bug where attachment wasn't being sent
410
+ * Fixed problem when all_url_fopen was turned off on server and failed to retreive remote images. Now uses WP_HTTP class.
411
+
412
+ = 1.2.1 =
413
+ * Fixed path to custom css file included in PDF template
414
+
415
+ = 1.2.0 =
416
+ * Template files moved to the plugin's template folder
417
+ * Sample Form installed so developers have a working example to modify
418
+ * Fixed bug when using WordPress in another directory to the site
419
+
420
+ = 1.1.0 =
421
+ * Now compatible with Gravity Forms Signature Add-On
422
+ * Moved the field data functions out side of the Gravity Forms core so users can freely style their form information (located in pdf-entry-detail.php)
423
+ * Simplified the field data output
424
+ * Fixed bug when using product information
425
+
426
+ = 1.0.0 =
427
+ * First release.
README.txt CHANGED
@@ -1,295 +1,309 @@
1
- === Gravity PDF ===
2
- Contributors: blue-liquid-designs
3
- Plugin URI: https://gravitypdf.com/
4
- Donate link: https://gravitypdf.com/donate-to-plugin/
5
- Tags: gravity, forms, pdf, automation, attachment, email
6
- Requires at least: 4.4
7
- Tested up to: 4.8
8
- Stable tag: 4.2.2
9
- License: GPLv2 or later
10
- License URI: http://www.gnu.org/licenses/gpl.txt
11
-
12
- Automatically generate, email and download PDF documents with Gravity Forms and Gravity PDF.
13
-
14
- == Description ==
15
-
16
- **Gravity PDF is the ultimate solution for generating digital PDF documents using Gravity Forms and WordPress.**
17
-
18
- https://www.youtube.com/watch?v=z8zKKrjmNjY
19
-
20
- The plugin ships with four highly-customisable PDF templates perfectly suited for displaying your user’s data. Within seconds you can personalise the documents with your company logo, change the font, size, colour and the paper size. If the templates don't suit, [have one tailor made just for you](https://gravitypdf.com/integration-services/) or [roll your own](https://gravitypdf.com/documentation/v4/developer-start-customising/).
21
-
22
- > Digital document management with WordPress and Gravity Forms just became a breeze!
23
-
24
- = Feature =
25
-
26
- * There’s no third-party APIs needed when generating your PDFs. That means no chance of third-party data breaches, no monthly fees or rate limits. You control the software and the documents it generates.
27
- * We support all languages, including complex symbol-based languages like Chinese and Japanese, as well as Right to Left (RTL) written languages such as Arabic and Hebrew.
28
- * Automatically email your PDF when a user completes a form. Have it emailed to people in your organisation, the user, or both. You can also conditionally generate and email the PDF.
29
- * Using Gravity Forms developer-licensed payment add-ons like PayPal, Authorize.net or Stripe you can restrict access to the PDF until after a payment is captured.
30
- * [Protecting your user’s sensitive information is at the heart of Gravity PDF](https://gravitypdf.com/documentation/v4/user-pdf-security/). The plugin’s security settings give you granular control over who has access to the PDFs generated.
31
- * Our [JavaScript-powered font manager](https://gravitypdf.com/documentation/v4/user-custom-fonts/) allows you to install and use your favourite fonts. Now you can keep in line with your corporate style guide, or create beautiful PDF typography.
32
- * [The documentation](https://gravitypdf.com/documentation/v4/user-installation/) has everything from basic install instructions to advanced developer how-to guides. Our friendly team is also on hand to [provide FREE general support](https://gravitypdf.com/support/).
33
- * PHP, HTML and CSS come easy? [You’ll find creating your own PDF templates a breeze](https://gravitypdf.com/documentation/v4/developer-start-customising/). If not, [we offer PDF design services](https://gravitypdf.com/integration-services/) tailored just for you. We can even auto-fill existing PDFs!
34
-
35
- = Requirements =
36
-
37
- Gravity PDF can be run on most shared web hosting without any issues. It requires **PHP 5.4+** (PHP 7.0+ recommended) and at least 64MB of WP Memory (128MB+ recommended). You'll also need to be running WordPress 4.2+ and have [Gravity Forms 1.9+](https://www.e-junkie.com/ecom/gb.php?cl=54585&c=ib&aff=235154) (affiliate link).
38
-
39
- If you aren't sure Gravity PDF will meet your needs (and haven't got a Gravity Forms license yet) you can [try out the software via our demo site](https://demo.gravitypdf.com).
40
-
41
- = Documentation & Support =
42
-
43
- [We have extensive documentation on using Gravity PDF](https://gravitypdf.com/documentation/v4/five-minute-install/), and our friendly support team provides [FREE basic support via our website](https://gravitypdf.com/support/#contact-support) (we also check the WordPress.org forums but submitting a ticket via GravityPDF.com will get a faster response).
44
-
45
- = Custom PDF Integration =
46
-
47
- We offer **comprehensive PDF integration services** and do all the PDF development and integration into Gravity Forms for you. You tell us what you want and our friendly and experienced developers will design, develop and install custom PDF templates tailor specifically for you. We can even auto-fill your existing PDF documents. [Find out more at GravityPDF.com](https://gravitypdf.com/integration-services/).
48
-
49
- = Contribute =
50
-
51
- All development for Gravity PDF [is handled via GitHub](https://github.com/GravityPDF/gravity-pdf/). Opening new issues and submitting pull requests are welcome.
52
-
53
- [Our public roadmap is available on Trello](https://trello.com/b/60YGv1J3/roadmap). We'd love it if you vote and comment on your favourite ideas.
54
-
55
- You can also keep up to date with Gravity PDF by [subscribing to our newsletter](https://gravitypdf.com/#signup-top), [following us on Twitter](https://twitter.com/gravitypdf) or [liking us on Facebook](https://www.facebook.com/gravitypdf).
56
-
57
- Also, if you enjoy using the software [we'd love it if you could give us a review!](https://wordpress.org/support/view/plugin-reviews/gravity-forms-pdf-extended)
58
-
59
- *Note: When Gravity Forms isn't installed and you activate Gravity PDF we display a notice that includes an affiliate link to their website.*
60
-
61
- == Installation ==
62
-
63
- [You'll find detailed installation instructions on GravityPDF.com](https://gravitypdf.com/documentation/v4/user-installation/).
64
-
65
- == Screenshots ==
66
-
67
- 1. Our on-boarding experience will have you up and running in 5 minutes flat.
68
- 2. Set up the global PDF settings then head straight to configuring your first PDF.
69
- 3. Control the default paper size, PDF template and font/size/colour.
70
- 4. Advanced security options give you granular control of PDF access.
71
- 5. Tools like the font manager and custom PDF installer are readily accessible.
72
- 6. Our JavaScript-powered font manager will make using custom fonts a breeze.
73
- 7. A snapshot of your form’s PDF setup.
74
- 8. When adding a new PDF all the important settings are up front in the “General” tab.
75
- 9. Override the default appearance settings on a per-PDF basis.
76
- 10. Each template has its own PDF settings for greater control of the look and feel of your document.
77
- 11. Header and Footer support is built-in.
78
- 12. Advanced format and security settings can be applied to individual PDFs.
79
- 13. PDFs can be accessed from the Gravity Forms entry list page.
80
- 14. They also appear on the individual entry pages for easy access.
81
- 15. Zadani is a minimalist business-style template that will generate a well-spaced document great for printing.
82
- 16. Rubix uses stylish containers to create an aesthetically pleasing design.
83
- 17. Focus Gravity providing a classic layout which epitomises Gravity Forms Print Preview. It’s the familiar layout you’ve come to love.
84
- 18. Blank Slate provides a print-friendly template focusing solely on the user-submitted data.
85
-
86
- == Changelog ==
87
-
88
- = 4.2.2 =
89
- * Bug: Fix empty Master Sassword regression introduced in 4.2 (GH#664)
90
- * Bug: Fix Javascript errors when plugin translation files used (GH#667)
91
- * Bug: Fix PDF Conditional Logic saving problem when using 'Less than' (GH#668)
92
- * Bug: Fix PHP Notices when using custom font (GH#669)
93
- * Bug: Merge Mpdf upstream patches (includes Chrome Viewer Yellow hover fix)
94
-
95
- = 4.2.1 =
96
- * Bug: Fix fatal DateTimeZone error for older versions of PHP (GH#654)
97
-
98
- = 4.2.0 =
99
- * Feature: Merge tags and shortcodes are displayed in the PDF for any administrative fields (GH#633)
100
- * Feature: New field class 'pagebreak' forces a pagebreak in the PDF (GH#634)
101
- * Feature: Instead of the field not showing at all, Gravity Perks Terms of Conditions field now shows the text "Not accepted"
102
- when user hasn't agreed to terms (GH#636)
103
-
104
- * Dev Feature: Add premium add-on and licensing infrastructure (GH#619)
105
- * Dev Feature: [gravitypdf] shortcode debug messages can be toggled on and off for users with the 'gravityforms_view_entries' capability (GH#627)
106
- * Dev Feature: Add filter 'gfpdf_field_label' to modify the PDF field labels (GH#621)
107
- * Dev Feature: Add filter 'gfpdf_pdf_field_content' to modify the field markup before content is wrapped in the PDF markup (GH#620)
108
- * Dev Feature: Add filters 'gfpdf_get_pdf_display_list', 'gfpdf_get_pdf_url', 'gfpdf_get_active_pdfs', 'gfpdf_override_pdf_bypass',
109
- 'gfpdf_maybe_attach_to_notification', 'gfpdf_maybe_always_save_pdf', 'gfpdf_form_data' and 'gfpdf_preprocess_template_arguments' for
110
- greater control over the core PDF functionality. (GH#622)
111
- * Dev Feature: Fix master password being overridden on PDF save after v3 to v4 migration (GH#624)
112
- * Dev Feature: Allow master password field to be shown in the UI with the 'gfpdf_enable_master_password_field' fitler (GH#624)
113
- * Dev Feature: Swapped 'error' log to 'warning' log when template config file not found (GH#613)
114
- * Dev Feature: Upgrade all NPM modules to latest versions. PDF Template Manager now renders faster (GH#631)
115
- * Dev Feature: Remove hard dependancy on the Helper_Interface_Config interface for the template configuration file (GH#632)
116
- * Dev Feature: Added 'gfpdf_field_middleware' filter to control when a field should be displayed in the core PDF templates (GH#635)
117
- * Dev Feature: Greater access to the Field_Product class internals (GH#642)
118
-
119
- * Bug: Correctly exit the script when the PDF is downloaded / sent to the browser (GH#610)
120
- * Bug: Don't auto-redirect to welcome / update screen on plugin install or upgrade which resolves a cached redirect issue (GH#612)
121
- * Bug: Register two PDF endpoints to support both pretty and almost pretty permalinks at the same time (GH#614)
122
- * Bug: Fix [gravitypdf] shortcode display error in GravityView when wrapped in another shortcode (GH#628)
123
- * Bug: Add support for Gravity Forms 2.3 Merge Tags (GH#643)
124
- * Bug: Fix background image relative paths (GH#645)
125
- * Bug: Fix GravityView display issue when view is used on the front page (GH#639)
126
- * Bug: Don't show selected product options in the product field when not grouping products together in PDF (GH#646)
127
- * Bug: Fix edge case that caused PDF settings to be overridden when the form is updated (GH#648)
128
-
129
- = 4.1.1 =
130
- * Bug: Add check to see if headers are already sent before trying to redirect to the welcome / update page (GH#601)
131
- * Bug: Fixed issue accessing the Advanced Template Manager in Safari browser (GH#603)
132
- * Bug: Ensure the Advanced Template Manager notice and error messages have the correct styles in the Form PDF Settings pages (GH#604)
133
- * Bug: Fix PDF generation problem using the legacy v3 URL structure (GH#605)
134
-
135
- = 4.1.0 =
136
- * Feature: Advanced PDF Template Manager. Upload, View, Select and Delete PDF templates with ease (GH#486)
137
- * Feature: Add PDF Mergetags which output PDF URLs and compliment the [gravitypdf] shortcode which output HTML links (GH#404)
138
- * Feature: Add four-column CSS Ready Class support to core PDFs. Note: if you have run "Setup Custom Templates" you will need to re-run it to take advantage of this feature (GH#461)
139
- * Feature: Added support for the WP External Links plugin (GH#386)
140
- * Feature: Added filter to show radio, checkbox, select, multiselect and product field values in core PDF templates (GH#600)
141
- * Enhancement: Gravity PDF Review Notice now only shows up on Gravity Forms pages (#528)
142
- * Enhancement: Convert all strings to American format so they can be correctly translated using Glotpress (GH#525)
143
- * Enhancement: Added Australian, New Zealand and UK language packs (GH#525)
144
- * Enhancement: Add support for Gravity Forms 2.2 Logging Module (GH#596)
145
- * Dev Feature: Added 'Author URI' and 'Tags' headers to PDF template files which get displayed in the Advanced Template Manager (GH#558)
146
- * Dev Feature: Include $this as eighth parameter in 'gfpdf_field_html_value' filter (GH#549)
147
- * Dev Feature: Add 'gfpdf_field_section_break_html' filter to returned Section Field HTML for the PDF (GH#548)
148
- * Dev Feature: Add actions before and after the core template HTML is generated; 'gfpdf_pre_html_fields' and 'gfpdf_post_html_fields' respectively (GH#546)
149
- * Dev Feature: Template PHP Configuration files can impliment setUp and TearDown interfaces which fire when templates are installed or deleted through the Advanced Template Manager (GH#545)
150
- * Dev Feature: Added Font Create and Delete endpoints to API GPDFAPI::add_pdf_font() and GPDFAPI::delete_pdf_font() (GH#541)
151
- * Dev Feature: Allow Rich Text Editor height to be controlled through the 'size' property when used in template config (GH#540)
152
- * Dev Feature: Allow images in radio buttons using the new `'class' => 'image-radio-buttons'` property when used in template config (GH#539)
153
- * Dev Changes: Use Gravity Forms copy of Chosen JS (GH#563)
154
- * Dev Changes: All production CSS and JS saved to /dest/ directory as part of Advanced Template Manager update
155
- * Dev Changes: Standardised all AJAX Authentication so Nonce and Capability checks are easily checked (GH#538)
156
- * Dev Changes: Rename all instances of "depreciated" with "deprecated" in our files and classes (GH#535)
157
- * Dev Changes: Contact our localised JS data to camelCase (GH#532)
158
- * Dev Changes: Utilised PHP5.4 array syntax in code (GH#521)
159
- * Bug: Reset Gravity Forms Merge Tag JS when PDF template changes (GH#551)
160
- * Bug: Fix incorrect variable reference to $include_list_styles which uses 'gfpdf_include_list_styles' to change the behaviour (GH#547)
161
- * Bug: Fix PHP notice in PDF when no products selected in form (GH#523)
162
- * Bug: Fix issue with Gravity PDF update screen showing and not showing at incorrect times (GH#514)
163
- * Bug: Fix false positive when checking if the PDF tmp directory is readable (GH#519)
164
- * Bug: Fix error when using GLOB_BRACE flag in glob() function (GH#562)
165
- * Bug: Remove OTF fonts from being uploaded due to poor support in Mpdf (GH#569)
166
- * Bug: Additional PHP7.1 fixes merged from upstream Mpdf package
167
- * Bug: Allow TTF file mime type to be correctly detected in WordPress 4.7.3 (GH#571)
168
- * Bug: Ensure PDF Delete dialog shows up after being previously 'cancelled' (GH#588)
169
- * Bug: Ensure duplicate mergetags aren't included after PDF template change (GH#589)
170
- * Bug: Fix PHP Notice if there's no active capabilities for a role (GH#590)
171
-
172
- = 4.0.6 =
173
- * Correctly register our PDF link with the WP Rewrite API when "Almost Pretty" permalinks are active (GH#502)
174
- * Correctly process mergetags in password field for Tier 2 PDF templates (GH#503)
175
- * Allow mergetags to be saved in HTML attributes in our Header / Footer settings - DEV NOTE: all Rich Text Editor settings fields should be output with `wp_kses_post( $html )` (GH#492)
176
- * Process mergetags before Header / Footer settings get passed to wp_kses_post() on output (GH#512)
177
- * Renamed `check_wordpress()` method to `is_compatible_wordpress_version()` to prevent false positive using ConfigServer eXploit Scanner (GH#500)
178
- * Explicitly set a forward slash after the home_url() when building PDF links (GH#511)
179
- * Resolve incorrect page numbering in Mpdf's Table of Contents
180
- * Change Helper_Misc->get_contrast() to choose white in more cases (GH#506)
181
-
182
- = 4.0.5 =
183
- * Add support for "Almost Pretty" permalinks for web servers that don't support Mod Rewrite (IIS) (GH#488)
184
- * Add PHP 7.1 support resolves two string-to-array issues (GH#495)
185
- * Add <p> and <br> tags to Rich Text Paragraph field in PDF – using wpautop() (GH#490)
186
- * Disable product table when enabling the 'individual_products' option in core templates (GH#493)
187
-
188
- = 4.0.4 =
189
- * Prevent Finder (Mac) and Ghostscript viewing / processing password-protected PDFs without a password (GH#467)
190
- * Fix Font Manager display issues for users running a version of WP lower than 4.5 (GH#470)
191
- * Ensure new lines in Header / Footer automatically convert to <p> or <br> tags using wpautop() (GH#472)
192
- * Fix issue in $form_data where Radio / Checkbox fields wouldn't display site-owner entered HTML (GH#415)
193
- * Fixed conflict with Enhanced Media Library plugin (GH#433)
194
- * Fixed issue with encoded characters in saved PDF filename (GH#475)
195
- * Fixed issue where PDF settings would always set to "active" when saved (GH#477)
196
- * Fixed depreciation notice for multisites using WordPress 4.6 (GH#479)
197
- * Apply esc_html() and esc_url() to PDF name and URL in admin area (GH#484)
198
-
199
- = 4.0.3 =
200
- * Fix incorrect product calculations when using decimal comma format eg. 1.000,50 (GH#442)
201
- * Rename $config variable to $html_config in core templates (GH#451)
202
- * Don't chain CSS in our default setters or set fixed font size in templates (GH#446)
203
- * Fix display issues for certain characters with DejaVu Sans font family in PDFs (GH#456)
204
- * Ensure QueryPath produces valid UTF-8 data after processing (GH#452)
205
- * Re-running the Custom Template Setup will override working directory templates with same name (GH#457)
206
- * Fixed legacy Name field PHP warnings (GH#448)
207
- * Replace translations with their escaped function counterparts (GH#463)
208
- * Duplicating PDFs will now be inactive by default (GH#458)
209
- * Tweaked the "Show Page Names" field description (GH#449)
210
-
211
- = 4.0.2 =
212
- * Fixes issue displaying address fields in v4 PDFs (GH#429)
213
- * Fixes internal logging issues and added Gravity Forms 1.1 support (GF#428)
214
- * Fixes notice when form pagination information is not available (GH#437)
215
- * Fixes notice when using GPDFAPI::product_table() on form that had no products (GH#438)
216
- * Fixes caching issue with GravityView Enable Notifications plugin that caused PDF attachment not to be updated (GH#436)
217
-
218
- = 4.0.1 =
219
- * Fixes PHP notice when viewing PDF and Category field is empty (GH#419)
220
- * Fixes PHP notice when viewing PDF and custom font directory is empty (GH#416)
221
- * Fixes Font Manager / Help Search features due to Underscore.js conflict when PHP's deprecated ASP Tags enabled (GH#417)
222
- * Allows radio and checkbox values to show HTML in PDFs (GH#415)
223
- * Fixes PDF letter spacing issue with upper and lower case characters (GH#418)
224
- * Fixes character display problems using core Arial font in PDFs (GH#420)
225
- * Fixes documentation search error on PDF Help tab (GH#424)
226
- * Add additional check when cleaning up TMP directory (GH#427)
227
-
228
- = 4.0 =
229
-
230
- * Minimum PHP version changed from PHP 5.2 to PHP 5.4. ENSURE YOUR WEB SERVER IS COMPATIBLE BEFORE UPDATING (Forms -> Settings -> PDF -> System Status)
231
- * Minimum WordPress version changed from 3.9 to 4.2. ENSURE YOU ARE RUNNING THE MINIMUM VERISON OF WP BEFORE UPDATING (Forms -> Settings -> PDF -> System Status)
232
- * Minimum Gravity Forms version changed from 1.8 to 1.9. ENSURE YOU ARE RUNNING THE MINIMUM VERISON OF GRAVITY FORMS BEFORE UPDATING (Forms -> Settings -> PDF -> System Status)
233
- * Maintained backwards compatibility with v3 for 80% of users. Review our migration guide for additional information (https://gravitypdf.com/documentation/v4/v3-to-v4-migration/)
234
- * Created full user interface for managing plugin settings. All settings are now stored in the database
235
- * Overhaul PDF designs that ship with software. Now comes with 4 completely free templates (two are all-new and two are enhanced v3 favourites)
236
- * Added CSS Ready class support in PDFs. Two and three column classes now work in PDF
237
- * Users can apply conditional logic to PDFs via new UI
238
- * Control font, size and colour via new UI
239
- * Control paper size of generated PDF via new UI
240
- * Control advanced security settings via new UI
241
- * Control customisable PDF template options via new UI
242
- * Control PDF header / footers via UI
243
- * Control PDF background via UI
244
- * Change PDF format (PDF/A-1b or PDF/X-1a) via UI
245
- * Password Protect PDF via UI and change end-user privilages
246
- * Added [gravitypdf] shortcode to allow users to display PDF links on confirmation pages, notifications, or anywhere else
247
- * Allow user to change the action of the PDF link view in admin area (view or download)
248
- * Added timeout parameter when unauthenticated user who submitted the form (matched by IP) attempts to access PDF. Defaults to 20 minutes
249
- * Added ability to make a PDF "public". This disabled all security precautions on PDF. Use with caution.
250
- * Deprecated configuration.php and created a migration feature which users can run if that file is detected. Removes /output/ directory during migration (where v3 stored PDFs saved to disk).
251
- * Duplicating Gravity Form will also duplicate Gravity PDF settings assigned to that form. Importing / Exporting forms will also include PDF settings
252
- * Better installation and upgrade experience for users with automated redirect to landing page after install / major update (can be disabled in settings)
253
- * Created a font manager so users have a user interface to install and use their favourite fonts. Support for TTF and certain OTF font files
254
- * Allow users to enable Right to Left language support from UI
255
- * Created uninstaller which removes all trace of plugin from website
256
- * Help tab allows users to live search our documentation
257
- * Remove need to initialise the plugin when first installed
258
- * Remove need to initialise fonts when uploaded to our /fonts/ directory
259
- * Cleanup PDFs from disk when finished with them (also cleans up any stay files every 24 hours)
260
- * Detect if our /tmp/ directory is accessible by browser and suggest ways to fix
261
- * Allow all directories in /PDF_EXTENDED_TEMPLATES/ directory to be moved / renamed via filters (including the base directory)
262
- * Create GPDFAPI class to allow devs to easily build ontop of plugin
263
- * Cleaned up PDF template markup so developers can focus soley on their template code without any extra overhead. See our documentation for more details (https://gravitypdf.com/documentation/v4/developer-start-customising/)
264
- * Enhanced PDF templates by allowing an image and configuration class
265
- * Added large number of new actions and filters and provided documentation and examples for them on our website
266
- * Allow developers to add or remove individual security layers via filters
267
- * Updated mPDF from 5.7 to 6.1
268
- * Added support for Gravity Forms Logging plugin
269
- * Added better product data to $form_data['field']
270
- * Added PHPDocs to all classes / methods / functions
271
- * Fix PDF_EXTENDED_TEMPLATES location in legacy Multisite networks (WP3.5 or lower)
272
- * Automatically make $field array available to PDF templates (array of current form fields accessible by field ID)
273
- * Automatically make $settings array available to PDF templates (the current PDF configuration settigns)
274
- * Automatically make $config array available to PDF templates (the initialised template config class - if any)
275
- * Automatically make $form, $entry and $form_data available to PDF templates
276
- * Automatically make $gfpdf object available to PDF templates (the main Gravity PDF object containing all our helper classes)
277
-
278
- See [CHANGELOG.txt](https://github.com/GravityPDF/gravity-pdf/blob/master/CHANGELOG.txt) for v3 changelog history.
279
-
280
- == Upgrade Notice ==
281
-
282
- = 4.2.1 =
283
- WARNING: The minimum WordPress version supported is now 4.4.
284
-
285
- = 4.2.0 =
286
- WARNING: The minimum WordPress version supported is now 4.4.
287
-
288
- = 4.0.4 =
289
- This patch fixes a PDF security by-passing issue. If you use the PDF Security settings update immediately.
290
-
291
- = 4.0.3 =
292
- The core PDF templates have been updated to version 1.1. If you've previously run the Custom Template Setup make sure you run it again to take advantage of the changes.
293
-
294
- = 4.0 =
295
- **WARNING**: This major release is not 100% backwards compatibile with v3. Review our upgrade guide AND do a full backup before proceeding with the update (https://goo.gl/htd6CK).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Gravity PDF ===
2
+ Contributors: blue-liquid-designs
3
+ Plugin URI: https://gravitypdf.com/
4
+ Donate link: https://gravitypdf.com/donate-to-plugin/
5
+ Tags: gravity, forms, pdf, automation, attachment, email
6
+ Requires at least: 4.4
7
+ Tested up to: 4.9
8
+ Requires PHP: 5.4
9
+ Stable tag: 4.3.0
10
+ License: GPLv2 or later
11
+ License URI: http://www.gnu.org/licenses/gpl.txt
12
+
13
+ Automatically generate, email and download PDF documents with Gravity Forms and Gravity PDF.
14
+
15
+ == Description ==
16
+
17
+ **Gravity PDF is the ultimate solution for generating digital PDF documents using Gravity Forms and WordPress.**
18
+
19
+ https://www.youtube.com/watch?v=z8zKKrjmNjY
20
+
21
+ The plugin ships with four highly-customisable PDF templates perfectly suited for displaying your user’s data. Within seconds you can personalise the documents with your company logo, change the font, size, colour and the paper size. If the templates don't suit, [have one tailor made just for you](https://gravitypdf.com/integration-services/) or [roll your own](https://gravitypdf.com/documentation/v4/developer-start-customising/).
22
+
23
+ > Digital document management with WordPress and Gravity Forms just became a breeze!
24
+
25
+ = Feature =
26
+
27
+ * There’s no third-party APIs needed when generating your PDFs. That means no chance of third-party data breaches, no monthly fees or rate limits. You control the software and the documents it generates.
28
+ * We support all languages, including complex symbol-based languages like Chinese and Japanese, as well as Right to Left (RTL) written languages such as Arabic and Hebrew.
29
+ * Automatically email your PDF when a user completes a form. Have it emailed to people in your organisation, the user, or both. You can also conditionally generate and email the PDF.
30
+ * Using Gravity Forms developer-licensed payment add-ons like PayPal, Authorize.net or Stripe you can restrict access to the PDF until after a payment is captured.
31
+ * [Protecting your user’s sensitive information is at the heart of Gravity PDF](https://gravitypdf.com/documentation/v4/user-pdf-security/). The plugin’s security settings give you granular control over who has access to the PDFs generated.
32
+ * Our [JavaScript-powered font manager](https://gravitypdf.com/documentation/v4/user-custom-fonts/) allows you to install and use your favourite fonts. Now you can keep in line with your corporate style guide, or create beautiful PDF typography.
33
+ * [The documentation](https://gravitypdf.com/documentation/v4/user-installation/) has everything from basic install instructions to advanced developer how-to guides. Our friendly team is also on hand to [provide FREE general support](https://gravitypdf.com/support/).
34
+ * PHP, HTML and CSS come easy? [You’ll find creating your own PDF templates a breeze](https://gravitypdf.com/documentation/v4/developer-start-customising/). If not, [we offer PDF design services](https://gravitypdf.com/integration-services/) tailored just for you. We can even auto-fill existing PDFs!
35
+
36
+ = Requirements =
37
+
38
+ Gravity PDF can be run on most shared web hosting without any issues. It requires **PHP 5.4+** (PHP 7.0+ recommended) and at least 64MB of WP Memory (128MB+ recommended). You'll also need to be running WordPress 4.2+ and have [Gravity Forms 1.9+](https://www.e-junkie.com/ecom/gb.php?cl=54585&c=ib&aff=235154) (affiliate link).
39
+
40
+ If you aren't sure Gravity PDF will meet your needs (and haven't got a Gravity Forms license yet) you can [try out the software via our demo site](https://demo.gravitypdf.com).
41
+
42
+ = Documentation & Support =
43
+
44
+ [We have extensive documentation on using Gravity PDF](https://gravitypdf.com/documentation/v4/five-minute-install/), and our friendly support team provides [FREE basic support via our website](https://gravitypdf.com/support/#contact-support) (we also check the WordPress.org forums but submitting a ticket via GravityPDF.com will get a faster response).
45
+
46
+ = Custom PDF Integration =
47
+
48
+ We offer **comprehensive PDF integration services** and do all the PDF development and integration into Gravity Forms for you. You tell us what you want and our friendly and experienced developers will design, develop and install custom PDF templates tailor specifically for you. We can even auto-fill your existing PDF documents. [Find out more at GravityPDF.com](https://gravitypdf.com/integration-services/).
49
+
50
+ = Contribute =
51
+
52
+ All development for Gravity PDF [is handled via GitHub](https://github.com/GravityPDF/gravity-pdf/). Opening new issues and submitting pull requests are welcome.
53
+
54
+ [Our public roadmap is available on Trello](https://trello.com/b/60YGv1J3/roadmap). We'd love it if you vote and comment on your favourite ideas.
55
+
56
+ You can also keep up to date with Gravity PDF by [subscribing to our newsletter](https://gravitypdf.com/#signup-top), [following us on Twitter](https://twitter.com/gravitypdf) or [liking us on Facebook](https://www.facebook.com/gravitypdf).
57
+
58
+ Also, if you enjoy using the software [we'd love it if you could give us a review!](https://wordpress.org/support/view/plugin-reviews/gravity-forms-pdf-extended)
59
+
60
+ *Note: When Gravity Forms isn't installed and you activate Gravity PDF we display a notice that includes an affiliate link to their website.*
61
+
62
+ == Installation ==
63
+
64
+ [You'll find detailed installation instructions on GravityPDF.com](https://gravitypdf.com/documentation/v4/user-installation/).
65
+
66
+ == Screenshots ==
67
+
68
+ 1. Our on-boarding experience will have you up and running in 5 minutes flat.
69
+ 2. Set up the global PDF settings then head straight to configuring your first PDF.
70
+ 3. Control the default paper size, PDF template and font/size/colour.
71
+ 4. Advanced security options give you granular control of PDF access.
72
+ 5. Tools like the font manager and custom PDF installer are readily accessible.
73
+ 6. Our JavaScript-powered font manager will make using custom fonts a breeze.
74
+ 7. A snapshot of your form’s PDF setup.
75
+ 8. When adding a new PDF all the important settings are up front in the “General” tab.
76
+ 9. Override the default appearance settings on a per-PDF basis.
77
+ 10. Each template has its own PDF settings for greater control of the look and feel of your document.
78
+ 11. Header and Footer support is built-in.
79
+ 12. Advanced format and security settings can be applied to individual PDFs.
80
+ 13. PDFs can be accessed from the Gravity Forms entry list page.
81
+ 14. They also appear on the individual entry pages for easy access.
82
+ 15. Zadani is a minimalist business-style template that will generate a well-spaced document great for printing.
83
+ 16. Rubix uses stylish containers to create an aesthetically pleasing design.
84
+ 17. Focus Gravity providing a classic layout which epitomises Gravity Forms Print Preview. It’s the familiar layout you’ve come to love.
85
+ 18. Blank Slate provides a print-friendly template focusing solely on the user-submitted data.
86
+
87
+ == Changelog ==
88
+
89
+ = 4.3.0 =
90
+ * Feature: Add support for Gravity Perks E-Commerce Add-on (GH#671)
91
+ * Dev Feature: Add GPDFAPI::get_pdf_fonts() method
92
+ * Dev Feature: Add 'gfpdf_pdf_generator_pre_processing' filter
93
+ * Dev Feature: Add 'gfpdf_entry_pre_form_data' filter
94
+ * Dev Feature: Add Helper_Trait_Logger class to make it easier to inject our logger into new classes (GH#677)
95
+ * Dev Enhancement: Include the current object as a 5th parameter to 'gfpdf_pdf_field_content' filter
96
+ * Dev Enhancement: Include update message / additonal link helper functions for registered Gravity PDF add-ons (GH#673)
97
+ * Dev Enhancement: Update Easy Digital Download Licensing class to version 1.6.14
98
+ * Future Feature: After plugin updates, copy shipped Mpdf fonts to PDF Working Directory (preparation for removal of all fonts in future release) (GH#676)
99
+ * Bug: Strip URL parameters from home_url(), if any, when building PDF URL (GH#674)
100
+ * Bug: Load the correct PDF Template Configuration file when using 'template' helper param (GH#675)
101
+
102
+ = 4.2.2 =
103
+ * Bug: Fix empty Master Sassword regression introduced in 4.2 (GH#664)
104
+ * Bug: Fix Javascript errors when plugin translation files used (GH#667)
105
+ * Bug: Fix PDF Conditional Logic saving problem when using 'Less than' (GH#668)
106
+ * Bug: Fix PHP Notices when using custom font (GH#669)
107
+ * Bug: Merge Mpdf upstream patches (includes Chrome Viewer Yellow hover fix)
108
+
109
+ = 4.2.1 =
110
+ * Bug: Fix fatal DateTimeZone error for older versions of PHP (GH#654)
111
+
112
+ = 4.2.0 =
113
+ * Feature: Merge tags and shortcodes are displayed in the PDF for any administrative fields (GH#633)
114
+ * Feature: New field class 'pagebreak' forces a pagebreak in the PDF (GH#634)
115
+ * Feature: Instead of the field not showing at all, Gravity Perks Terms of Conditions field now shows the text "Not accepted"
116
+ when user hasn't agreed to terms (GH#636)
117
+
118
+ * Dev Feature: Add premium add-on and licensing infrastructure (GH#619)
119
+ * Dev Feature: [gravitypdf] shortcode debug messages can be toggled on and off for users with the 'gravityforms_view_entries' capability (GH#627)
120
+ * Dev Feature: Add filter 'gfpdf_field_label' to modify the PDF field labels (GH#621)
121
+ * Dev Feature: Add filter 'gfpdf_pdf_field_content' to modify the field markup before content is wrapped in the PDF markup (GH#620)
122
+ * Dev Feature: Add filters 'gfpdf_get_pdf_display_list', 'gfpdf_get_pdf_url', 'gfpdf_get_active_pdfs', 'gfpdf_override_pdf_bypass',
123
+ 'gfpdf_maybe_attach_to_notification', 'gfpdf_maybe_always_save_pdf', 'gfpdf_form_data' and 'gfpdf_preprocess_template_arguments' for
124
+ greater control over the core PDF functionality. (GH#622)
125
+ * Dev Feature: Fix master password being overridden on PDF save after v3 to v4 migration (GH#624)
126
+ * Dev Feature: Allow master password field to be shown in the UI with the 'gfpdf_enable_master_password_field' fitler (GH#624)
127
+ * Dev Feature: Swapped 'error' log to 'warning' log when template config file not found (GH#613)
128
+ * Dev Feature: Upgrade all NPM modules to latest versions. PDF Template Manager now renders faster (GH#631)
129
+ * Dev Feature: Remove hard dependancy on the Helper_Interface_Config interface for the template configuration file (GH#632)
130
+ * Dev Feature: Added 'gfpdf_field_middleware' filter to control when a field should be displayed in the core PDF templates (GH#635)
131
+ * Dev Feature: Greater access to the Field_Product class internals (GH#642)
132
+
133
+ * Bug: Correctly exit the script when the PDF is downloaded / sent to the browser (GH#610)
134
+ * Bug: Don't auto-redirect to welcome / update screen on plugin install or upgrade which resolves a cached redirect issue (GH#612)
135
+ * Bug: Register two PDF endpoints to support both pretty and almost pretty permalinks at the same time (GH#614)
136
+ * Bug: Fix [gravitypdf] shortcode display error in GravityView when wrapped in another shortcode (GH#628)
137
+ * Bug: Add support for Gravity Forms 2.3 Merge Tags (GH#643)
138
+ * Bug: Fix background image relative paths (GH#645)
139
+ * Bug: Fix GravityView display issue when view is used on the front page (GH#639)
140
+ * Bug: Don't show selected product options in the product field when not grouping products together in PDF (GH#646)
141
+ * Bug: Fix edge case that caused PDF settings to be overridden when the form is updated (GH#648)
142
+
143
+ = 4.1.1 =
144
+ * Bug: Add check to see if headers are already sent before trying to redirect to the welcome / update page (GH#601)
145
+ * Bug: Fixed issue accessing the Advanced Template Manager in Safari browser (GH#603)
146
+ * Bug: Ensure the Advanced Template Manager notice and error messages have the correct styles in the Form PDF Settings pages (GH#604)
147
+ * Bug: Fix PDF generation problem using the legacy v3 URL structure (GH#605)
148
+
149
+ = 4.1.0 =
150
+ * Feature: Advanced PDF Template Manager. Upload, View, Select and Delete PDF templates with ease (GH#486)
151
+ * Feature: Add PDF Mergetags which output PDF URLs and compliment the [gravitypdf] shortcode which output HTML links (GH#404)
152
+ * Feature: Add four-column CSS Ready Class support to core PDFs. Note: if you have run "Setup Custom Templates" you will need to re-run it to take advantage of this feature (GH#461)
153
+ * Feature: Added support for the WP External Links plugin (GH#386)
154
+ * Feature: Added filter to show radio, checkbox, select, multiselect and product field values in core PDF templates (GH#600)
155
+ * Enhancement: Gravity PDF Review Notice now only shows up on Gravity Forms pages (#528)
156
+ * Enhancement: Convert all strings to American format so they can be correctly translated using Glotpress (GH#525)
157
+ * Enhancement: Added Australian, New Zealand and UK language packs (GH#525)
158
+ * Enhancement: Add support for Gravity Forms 2.2 Logging Module (GH#596)
159
+ * Dev Feature: Added 'Author URI' and 'Tags' headers to PDF template files which get displayed in the Advanced Template Manager (GH#558)
160
+ * Dev Feature: Include $this as eighth parameter in 'gfpdf_field_html_value' filter (GH#549)
161
+ * Dev Feature: Add 'gfpdf_field_section_break_html' filter to returned Section Field HTML for the PDF (GH#548)
162
+ * Dev Feature: Add actions before and after the core template HTML is generated; 'gfpdf_pre_html_fields' and 'gfpdf_post_html_fields' respectively (GH#546)
163
+ * Dev Feature: Template PHP Configuration files can impliment setUp and TearDown interfaces which fire when templates are installed or deleted through the Advanced Template Manager (GH#545)
164
+ * Dev Feature: Added Font Create and Delete endpoints to API – GPDFAPI::add_pdf_font() and GPDFAPI::delete_pdf_font() (GH#541)
165
+ * Dev Feature: Allow Rich Text Editor height to be controlled through the 'size' property when used in template config (GH#540)
166
+ * Dev Feature: Allow images in radio buttons using the new `'class' => 'image-radio-buttons'` property when used in template config (GH#539)
167
+ * Dev Changes: Use Gravity Forms copy of Chosen JS (GH#563)
168
+ * Dev Changes: All production CSS and JS saved to /dest/ directory as part of Advanced Template Manager update
169
+ * Dev Changes: Standardised all AJAX Authentication so Nonce and Capability checks are easily checked (GH#538)
170
+ * Dev Changes: Rename all instances of "depreciated" with "deprecated" in our files and classes (GH#535)
171
+ * Dev Changes: Contact our localised JS data to camelCase (GH#532)
172
+ * Dev Changes: Utilised PHP5.4 array syntax in code (GH#521)
173
+ * Bug: Reset Gravity Forms Merge Tag JS when PDF template changes (GH#551)
174
+ * Bug: Fix incorrect variable reference to $include_list_styles which uses 'gfpdf_include_list_styles' to change the behaviour (GH#547)
175
+ * Bug: Fix PHP notice in PDF when no products selected in form (GH#523)
176
+ * Bug: Fix issue with Gravity PDF update screen showing and not showing at incorrect times (GH#514)
177
+ * Bug: Fix false positive when checking if the PDF tmp directory is readable (GH#519)
178
+ * Bug: Fix error when using GLOB_BRACE flag in glob() function (GH#562)
179
+ * Bug: Remove OTF fonts from being uploaded due to poor support in Mpdf (GH#569)
180
+ * Bug: Additional PHP7.1 fixes merged from upstream Mpdf package
181
+ * Bug: Allow TTF file mime type to be correctly detected in WordPress 4.7.3 (GH#571)
182
+ * Bug: Ensure PDF Delete dialog shows up after being previously 'cancelled' (GH#588)
183
+ * Bug: Ensure duplicate mergetags aren't included after PDF template change (GH#589)
184
+ * Bug: Fix PHP Notice if there's no active capabilities for a role (GH#590)
185
+
186
+ = 4.0.6 =
187
+ * Correctly register our PDF link with the WP Rewrite API when "Almost Pretty" permalinks are active (GH#502)
188
+ * Correctly process mergetags in password field for Tier 2 PDF templates (GH#503)
189
+ * Allow mergetags to be saved in HTML attributes in our Header / Footer settings - DEV NOTE: all Rich Text Editor settings fields should be output with `wp_kses_post( $html )` (GH#492)
190
+ * Process mergetags before Header / Footer settings get passed to wp_kses_post() on output (GH#512)
191
+ * Renamed `check_wordpress()` method to `is_compatible_wordpress_version()` to prevent false positive using ConfigServer eXploit Scanner (GH#500)
192
+ * Explicitly set a forward slash after the home_url() when building PDF links (GH#511)
193
+ * Resolve incorrect page numbering in Mpdf's Table of Contents
194
+ * Change Helper_Misc->get_contrast() to choose white in more cases (GH#506)
195
+
196
+ = 4.0.5 =
197
+ * Add support for "Almost Pretty" permalinks for web servers that don't support Mod Rewrite (IIS) (GH#488)
198
+ * Add PHP 7.1 support – resolves two string-to-array issues (GH#495)
199
+ * Add <p> and <br> tags to Rich Text Paragraph field in PDF – using wpautop() (GH#490)
200
+ * Disable product table when enabling the 'individual_products' option in core templates (GH#493)
201
+
202
+ = 4.0.4 =
203
+ * Prevent Finder (Mac) and Ghostscript viewing / processing password-protected PDFs without a password (GH#467)
204
+ * Fix Font Manager display issues for users running a version of WP lower than 4.5 (GH#470)
205
+ * Ensure new lines in Header / Footer automatically convert to <p> or <br> tags using wpautop() (GH#472)
206
+ * Fix issue in $form_data where Radio / Checkbox fields wouldn't display site-owner entered HTML (GH#415)
207
+ * Fixed conflict with Enhanced Media Library plugin (GH#433)
208
+ * Fixed issue with encoded characters in saved PDF filename (GH#475)
209
+ * Fixed issue where PDF settings would always set to "active" when saved (GH#477)
210
+ * Fixed depreciation notice for multisites using WordPress 4.6 (GH#479)
211
+ * Apply esc_html() and esc_url() to PDF name and URL in admin area (GH#484)
212
+
213
+ = 4.0.3 =
214
+ * Fix incorrect product calculations when using decimal comma format eg. 1.000,50 (GH#442)
215
+ * Rename $config variable to $html_config in core templates (GH#451)
216
+ * Don't chain CSS in our default setters or set fixed font size in templates (GH#446)
217
+ * Fix display issues for certain characters with DejaVu Sans font family in PDFs (GH#456)
218
+ * Ensure QueryPath produces valid UTF-8 data after processing (GH#452)
219
+ * Re-running the Custom Template Setup will override working directory templates with same name (GH#457)
220
+ * Fixed legacy Name field PHP warnings (GH#448)
221
+ * Replace translations with their escaped function counterparts (GH#463)
222
+ * Duplicating PDFs will now be inactive by default (GH#458)
223
+ * Tweaked the "Show Page Names" field description (GH#449)
224
+
225
+ = 4.0.2 =
226
+ * Fixes issue displaying address fields in v4 PDFs (GH#429)
227
+ * Fixes internal logging issues and added Gravity Forms 1.1 support (GF#428)
228
+ * Fixes notice when form pagination information is not available (GH#437)
229
+ * Fixes notice when using GPDFAPI::product_table() on form that had no products (GH#438)
230
+ * Fixes caching issue with GravityView Enable Notifications plugin that caused PDF attachment not to be updated (GH#436)
231
+
232
+ = 4.0.1 =
233
+ * Fixes PHP notice when viewing PDF and Category field is empty (GH#419)
234
+ * Fixes PHP notice when viewing PDF and custom font directory is empty (GH#416)
235
+ * Fixes Font Manager / Help Search features due to Underscore.js conflict when PHP's deprecated ASP Tags enabled (GH#417)
236
+ * Allows radio and checkbox values to show HTML in PDFs (GH#415)
237
+ * Fixes PDF letter spacing issue with upper and lower case characters (GH#418)
238
+ * Fixes character display problems using core Arial font in PDFs (GH#420)
239
+ * Fixes documentation search error on PDF Help tab (GH#424)
240
+ * Add additional check when cleaning up TMP directory (GH#427)
241
+
242
+ = 4.0 =
243
+
244
+ * Minimum PHP version changed from PHP 5.2 to PHP 5.4. ENSURE YOUR WEB SERVER IS COMPATIBLE BEFORE UPDATING (Forms -> Settings -> PDF -> System Status)
245
+ * Minimum WordPress version changed from 3.9 to 4.2. ENSURE YOU ARE RUNNING THE MINIMUM VERISON OF WP BEFORE UPDATING (Forms -> Settings -> PDF -> System Status)
246
+ * Minimum Gravity Forms version changed from 1.8 to 1.9. ENSURE YOU ARE RUNNING THE MINIMUM VERISON OF GRAVITY FORMS BEFORE UPDATING (Forms -> Settings -> PDF -> System Status)
247
+ * Maintained backwards compatibility with v3 for 80% of users. Review our migration guide for additional information (https://gravitypdf.com/documentation/v4/v3-to-v4-migration/)
248
+ * Created full user interface for managing plugin settings. All settings are now stored in the database
249
+ * Overhaul PDF designs that ship with software. Now comes with 4 completely free templates (two are all-new and two are enhanced v3 favourites)
250
+ * Added CSS Ready class support in PDFs. Two and three column classes now work in PDF
251
+ * Users can apply conditional logic to PDFs via new UI
252
+ * Control font, size and colour via new UI
253
+ * Control paper size of generated PDF via new UI
254
+ * Control advanced security settings via new UI
255
+ * Control customisable PDF template options via new UI
256
+ * Control PDF header / footers via UI
257
+ * Control PDF background via UI
258
+ * Change PDF format (PDF/A-1b or PDF/X-1a) via UI
259
+ * Password Protect PDF via UI and change end-user privilages
260
+ * Added [gravitypdf] shortcode to allow users to display PDF links on confirmation pages, notifications, or anywhere else
261
+ * Allow user to change the action of the PDF link view in admin area (view or download)
262
+ * Added timeout parameter when unauthenticated user who submitted the form (matched by IP) attempts to access PDF. Defaults to 20 minutes
263
+ * Added ability to make a PDF "public". This disabled all security precautions on PDF. Use with caution.
264
+ * Deprecated configuration.php and created a migration feature which users can run if that file is detected. Removes /output/ directory during migration (where v3 stored PDFs saved to disk).
265
+ * Duplicating Gravity Form will also duplicate Gravity PDF settings assigned to that form. Importing / Exporting forms will also include PDF settings
266
+ * Better installation and upgrade experience for users with automated redirect to landing page after install / major update (can be disabled in settings)
267
+ * Created a font manager so users have a user interface to install and use their favourite fonts. Support for TTF and certain OTF font files
268
+ * Allow users to enable Right to Left language support from UI
269
+ * Created uninstaller which removes all trace of plugin from website
270
+ * Help tab allows users to live search our documentation
271
+ * Remove need to initialise the plugin when first installed
272
+ * Remove need to initialise fonts when uploaded to our /fonts/ directory
273
+ * Cleanup PDFs from disk when finished with them (also cleans up any stay files every 24 hours)
274
+ * Detect if our /tmp/ directory is accessible by browser and suggest ways to fix
275
+ * Allow all directories in /PDF_EXTENDED_TEMPLATES/ directory to be moved / renamed via filters (including the base directory)
276
+ * Create GPDFAPI class to allow devs to easily build ontop of plugin
277
+ * Cleaned up PDF template markup so developers can focus soley on their template code without any extra overhead. See our documentation for more details (https://gravitypdf.com/documentation/v4/developer-start-customising/)
278
+ * Enhanced PDF templates by allowing an image and configuration class
279
+ * Added large number of new actions and filters and provided documentation and examples for them on our website
280
+ * Allow developers to add or remove individual security layers via filters
281
+ * Updated mPDF from 5.7 to 6.1
282
+ * Added support for Gravity Forms Logging plugin
283
+ * Added better product data to $form_data['field']
284
+ * Added PHPDocs to all classes / methods / functions
285
+ * Fix PDF_EXTENDED_TEMPLATES location in legacy Multisite networks (WP3.5 or lower)
286
+ * Automatically make $field array available to PDF templates (array of current form fields accessible by field ID)
287
+ * Automatically make $settings array available to PDF templates (the current PDF configuration settigns)
288
+ * Automatically make $config array available to PDF templates (the initialised template config class - if any)
289
+ * Automatically make $form, $entry and $form_data available to PDF templates
290
+ * Automatically make $gfpdf object available to PDF templates (the main Gravity PDF object containing all our helper classes)
291
+
292
+ See [CHANGELOG.txt](https://github.com/GravityPDF/gravity-pdf/blob/master/CHANGELOG.txt) for v3 changelog history.
293
+
294
+ == Upgrade Notice ==
295
+
296
+ = 4.2.1 =
297
+ WARNING: The minimum WordPress version supported is now 4.4.
298
+
299
+ = 4.2.0 =
300
+ WARNING: The minimum WordPress version supported is now 4.4.
301
+
302
+ = 4.0.4 =
303
+ This patch fixes a PDF security by-passing issue. If you use the PDF Security settings update immediately.
304
+
305
+ = 4.0.3 =
306
+ The core PDF templates have been updated to version 1.1. If you've previously run the Custom Template Setup make sure you run it again to take advantage of the changes.
307
+
308
+ = 4.0 =
309
+ **WARNING**: This major release is not 100% backwards compatibile with v3. Review our upgrade guide AND do a full backup before proceeding with the update (https://goo.gl/htd6CK).
api.php CHANGED
@@ -1,635 +1,648 @@
1
- <?php
2
-
3
- /**
4
- * A public API developers can use to work with Gravity PDF (similar to Gravity Forms GFAPI class)
5
- *
6
- * This class is in the public namespace
7
- *
8
- *
9
- * @package Gravity PDF
10
- * @copyright Copyright (c) 2016, Blue Liquid Designs
11
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
12
- * @since 4.0
13
- */
14
-
15
- /* Exit if accessed directly */
16
- if ( ! defined( 'ABSPATH' ) ) {
17
- exit;
18
- }
19
-
20
- /*
21
- This file is part of Gravity PDF.
22
-
23
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
24
-
25
- This program is free software; you can redistribute it and/or modify
26
- it under the terms of the GNU General Public License as published by
27
- the Free Software Foundation; either version 2 of the License, or
28
- (at your option) any later version.
29
-
30
- This program is distributed in the hope that it will be useful,
31
- but WITHOUT ANY WARRANTY; without even the implied warranty of
32
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33
- GNU General Public License for more details.
34
-
35
- You should have received a copy of the GNU General Public License
36
- along with this program; if not, write to the Free Software
37
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
38
- */
39
-
40
- /**
41
- * An easy-to-use API developers can use to work with Gravity PDF
42
- *
43
- * See https://gravitypdf.com/documentation/v4/developer-api-whats-it-for/ for more information about this API
44
- *
45
- * @since 4.0
46
- */
47
- final class GPDFAPI {
48
-
49
- /**
50
- * Returns our public logger class which uses Monolog (a PSR-3 compatible logging interface - https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md)
51
- *
52
- * Log messages can be added with any of the following:
53
- *
54
- * $gfpdf->log->addDebug( $message, [$parameters = array()] )
55
- * $gfpdf->log->addInfo( $message, [$parameters = array()] )
56
- * $gfpdf->log->addNotice( $message, [$parameters = array()] )
57
- * $gfpdf->log->addWarning( $message, [$parameters = array()] )
58
- * $gfpdf->log->addError( $message, [$parameters = array()] )
59
- * $gfpdf->log->addCritical( $message, [$parameters = array()] )
60
- * $gfpdf->log->addAlert( $message, [$parameters = array()] )
61
- * $gfpdf->log->addEmergency( $message, [$parameters = array()] )
62
- *
63
- * When in production Gravity PDF will only log to a file when the Gravity Forms Logging plugin is enabled and Gravity PDF is set to "Log errors only" ($log->addError() or higher) or "Log all messages" ($log->addNotice() or higher)
64
- *
65
- * See https://gravitypdf.com/documentation/v4/api_get_log_class/ for more information about this method
66
- *
67
- * @return \Monolog\Logger
68
- *
69
- * @since 4.0
70
- */
71
- public static function get_log_class() {
72
- global $gfpdf;
73
-
74
- return $gfpdf->log;
75
- }
76
-
77
- /**
78
- * Returns our public notice queue system to make it easy to display errors and messages to the user.
79
- *
80
- * Usage:
81
- * $notices->add_notice( String $message );
82
- * $notices->add_error( String $error );
83
- *
84
- * This taps into the 'admin_notices' or 'network_admin_notices' WordPress hooks so you need to add your notices before then.
85
- *
86
- * See https://gravitypdf.com/documentation/v4/api_get_notice_class/ for more information about this method
87
- *
88
- * @return \GFPDF\Helper\Helper_Notices
89
- *
90
- * @since 4.0
91
- */
92
- public static function get_notice_class() {
93
- global $gfpdf;
94
-
95
- return $gfpdf->notices;
96
- }
97
-
98
- /**
99
- * Returns our public data class which we use to store important global information related to Gravity PDF
100
- *
101
- * This uses PHP magic methods __set() and __get() to access and store information.
102
- *
103
- * Usage:
104
- *
105
- * $data->title; //returns "Gravity PDF"
106
- * $data->title = 'Gravity PDF 4.0'; //sets $data->title to "Gravity PDF 4.0"
107
- *
108
- * Note: Our __get() magic method returns variables by reference
109
- *
110
- * See https://gravitypdf.com/documentation/v4/get_data_class/ for more information about this method
111
- *
112
- * @return \GFPDF\Helper\Helper_Data
113
- *
114
- * @since 4.0
115
- */
116
- public static function get_data_class() {
117
- global $gfpdf;
118
-
119
- return $gfpdf->data;
120
- }
121
-
122
- /**
123
- * Returns our access layer class for all Gravity PDF Settings (both global and form specific)
124
- *
125
- * Note: Most relevant methods have been broken our and are avaiable through the GPDFAPI directly (GPDFAPI::get_pdf, GPDFAPI::get_plugin_settings ect)
126
- *
127
- * See https://gravitypdf.com/documentation/v4/api_get_options_class/ for more information about this method
128
- *
129
- * @return \GFPDF\Helper\Helper_Options_Fields
130
- *
131
- * @since 4.0
132
- */
133
- public static function get_options_class() {
134
- global $gfpdf;
135
-
136
- return $gfpdf->options;
137
- }
138
-
139
- /**
140
- * Returns our miscellaneous methods (or common methods) used throughout the plugin.
141
- *
142
- * Usage:
143
- *
144
- * $misc->is_gfpdf_page();
145
- *
146
- * See https://gravitypdf.com/documentation/v4/api_get_misc_class/ for more information about this method
147
- *
148
- * @return \GFPDF\Helper\Helper_Misc
149
- *
150
- * @since 4.0
151
- */
152
- public static function get_misc_class() {
153
- global $gfpdf;
154
-
155
- return $gfpdf->misc;
156
- }
157
-
158
- /**
159
- * Returns our templates methods used throughout the plugin.
160
- *
161
- * Usage:
162
- *
163
- * $templates->get_all_templates();
164
- *
165
- * See @TODO https://gravitypdf.com/documentation/v4/api_get_templates_class/ for more information about this method
166
- *
167
- * @return \GFPDF\Helper\Helper_Templates
168
- *
169
- * @since 4.1
170
- */
171
- public static function get_templates_class() {
172
- global $gfpdf;
173
-
174
- return $gfpdf->templates;
175
- }
176
-
177
- /**
178
- * Returns our abstracted Gravity Forms API class we use throughout the plugin
179
- *
180
- * While you could just use the GFAPI directly, some methods in this class have been cache-optimised and are specifically tuned for Gravity PDF.
181
- * Note: not all the methods in the GFAPI are implimented.
182
- *
183
- * Usage:
184
- *
185
- * $gform->get_form( $form_id );
186
- *
187
- * See https://gravitypdf.com/documentation/v4/api_get_form_class/ for more information about this method
188
- *
189
- * @return \GFPDF\Helper\Helper_Form
190
- *
191
- * @since 4.0
192
- */
193
- public static function get_form_class() {
194
- global $gfpdf;
195
-
196
- return $gfpdf->gform;
197
- }
198
-
199
- /**
200
- * Returns the original Model/View/Controller class we initialised in our /src/bootstrap.php file
201
- *
202
- * This method acts like a faux singleton provider (but none of our classes are static or singletons themselves - hence the 'faux') as you get the originally initialised class back
203
- *
204
- * This is very useful when you want to remove any filters / actions we set in a controller's add_filters() or add_actions() methods
205
- * You can also use to to easily access any public methods in our classes
206
- *
207
- * Note: This method only returns Controller_ / Model_ / View_ classes. Use the other methods above to access our Helper_ classes
208
- *
209
- * Usage:
210
- *
211
- * $class = GPDFAPI::get_mcv_class( 'Controller_PDF' );
212
- *
213
- * //if we have a class returned
214
- * if( $class !== false ) {
215
- * //remove a middleware filter
216
- * remove_filter( 'gfpdf_pdf_middleware', array( $class, 'middle_active' ), 10 );
217
- * }
218
- *
219
- * See https://gravitypdf.com/documentation/v4/api_get_mvc_class/ for more information about this method
220
- *
221
- * @param string $class_name The name of one of our MVC classes (no namespace)
222
- *
223
- * @return object|bool Will return your object if found, otherwise false
224
- *
225
- * @since 4.0
226
- */
227
- public static function get_mvc_class( $class_name ) {
228
- global $gfpdf;
229
-
230
- return $gfpdf->singleton->get_class( $class_name );
231
- }
232
-
233
- /**
234
- * Returns a new instance of one of our PDF generating code (model or view)
235
- *
236
- * @param string $type Type of class to return. Valid options include 'view' or 'model'
237
- *
238
- * @return object|WP_Error
239
- *
240
- * @since 4.0
241
- */
242
- public static function get_pdf_class( $type = 'view' ) {
243
-
244
- if ( $type === 'view' ) {
245
- return static::get_mvc_class( 'View_PDF' );
246
- }
247
-
248
- if ( $type === 'model' ) {
249
- return static::get_mvc_class( 'Model_PDF' );
250
- }
251
-
252
- return new WP_Error( 'invalid_type', esc_html__( 'The $type parameter is invalid. Only "view" and "model" are accepted', 'gravity-forms-pdf-extended' ) );
253
- }
254
-
255
- /**
256
- * Gets a list of current PDFs setup for a particular Gravity Form
257
- *
258
- * See https://gravitypdf.com/documentation/v4/api_get_form_pdfs/ for more information about this method
259
- *
260
- * @param integer $form_id The Gravity Form ID
261
- *
262
- * @return array|WP_Error Array of PDF settings or WP_Error
263
- *
264
- * @since 4.0
265
- */
266
- public static function get_form_pdfs( $form_id ) {
267
- $options = static::get_options_class();
268
-
269
- return $options->get_form_pdfs( $form_id );
270
- }
271
-
272
- /**
273
- * Gets a specific Gravity Form PDF configuration
274
- *
275
- * See https://gravitypdf.com/documentation/v4/api_get_pdf/ for more information about this method
276
- *
277
- * @param integer $form_id The Gravity Form ID
278
- * @param string $pdf_id The PDF ID
279
- *
280
- * @return array|WP_Error Array of PDF settings or WP_Error
281
- * @since 4.0
282
- */
283
- public static function get_pdf( $form_id, $pdf_id ) {
284
- $options = static::get_options_class();
285
-
286
- return $options->get_pdf( $form_id, $pdf_id );
287
- }
288
-
289
- /**
290
- * Add a new PDF to a Gravity Form
291
- *
292
- * See https://gravitypdf.com/documentation/v4/api_add_pdf/ for more information about this method
293
- *
294
- * @param integer $form_id The Gravity Form ID
295
- * @param array $settings The settings for the PDF
296
- *
297
- * @return boolean / String The PDF ID on success, false on failure
298
- *
299
- * @since 4.0
300
- */
301
- public static function add_pdf( $form_id, $settings = [] ) {
302
- $options = static::get_options_class();
303
-
304
- return $options->add_pdf( $form_id, $settings );
305
- }
306
-
307
- /**
308
- * Updates an existing Gravity Form PDF. Passing an empty $settings array will delete the PDF
309
- *
310
- * See https://gravitypdf.com/documentation/v4/api_update_pdf/ for more information about this method
311
- *
312
- * @param integer $form_id The Gravity Form ID
313
- * @param string $pdf_id The PDF ID
314
- * @param array $settings The settings for the PDF
315
- *
316
- * @return boolean True on success, false on failure
317
- *
318
- * @since 4.0
319
- */
320
- public static function update_pdf( $form_id, $pdf_id, $settings = [] ) {
321
- $options = static::get_options_class();
322
-
323
- return $options->update_pdf( $form_id, $pdf_id, $settings );
324
- }
325
-
326
- /**
327
- * Deletes a specific Gravity Form PDF configuration
328
- *
329
- * See https://gravitypdf.com/documentation/v4/api_delete_pdf/ for more information about this method
330
- *
331
- * @param integer $form_id The Gravity Form ID
332
- * @param string $pdf_id The PDF ID
333
- *
334
- * @return boolean True on success, false on failure
335
- *
336
- * @since 4.0
337
- */
338
- public static function delete_pdf( $form_id, $pdf_id ) {
339
- $options = static::get_options_class();
340
-
341
- return $options->delete_pdf( $form_id, $pdf_id );
342
- }
343
-
344
- /**
345
- * Retrieve an array of the global Gravity PDF settings (this doesn't include individual form configuration details - see GPDFAPI::get_form_pdfs)
346
- *
347
- * See https://gravitypdf.com/documentation/v4/api_get_plugin_settings/ for more information about this method
348
- *
349
- * @return array
350
- *
351
- * @since 4.0
352
- */
353
- public static function get_plugin_settings() {
354
- $options = static::get_options_class();
355
-
356
- return $options->get_settings();
357
- }
358
-
359
- /**
360
- * Get an option from the global Gravity PDF settings. If it doesn't exist the $default value will be returned
361
- *
362
- * See https://gravitypdf.com/documentation/v4/api_get_plugin_option/ for more information about this method
363
- *
364
- * @param string $key The Gravity PDF option key
365
- * @param mixed $default What's returned if the option doesn't exist
366
- *
367
- * @return mixed
368
- *
369
- * @since 4.0
370
- */
371
- public static function get_plugin_option( $key, $default = '' ) {
372
- $options = static::get_options_class();
373
-
374
- return $options->get_option( $key, $default );
375
- }
376
-
377
- /**
378
- * Add a new Global option to Gravity PDF
379
- *
380
- * If option already exists a WP_Error is returned
381
- * In most cases you'll want to use GPDFAPI::update_plugin_option() instead
382
- *
383
- * See https://gravitypdf.com/documentation/v4/api_add_plugin_option/ for more information about this method
384
- *
385
- * @param string $key The option key to add
386
- * @param mixed $value
387
- *
388
- * @return boolean|WP_Error
389
- *
390
- * @since 4.0
391
- */
392
- public static function add_plugin_option( $key, $value ) {
393
- $options = static::get_options_class();
394
-
395
- /* Check the option doesn't already exist */
396
- if ( null !== $options->get_option( $key, null ) ) {
397
- return new WP_Error( 'option_exists', esc_html__( 'The option key %s already exists. Use GPDFAPI::update_plugin_option instead', 'gravity-forms-pdf-extended' ) );
398
- }
399
-
400
- return static::update_plugin_option( $key, $value );
401
- }
402
-
403
- /**
404
- * Updates a Gravity PDF global option. Will create option if it doesn't exist.
405
- *
406
- * If $value is falsy (determined by empty() ) the option is deleted.
407
- *
408
- * See https://gravitypdf.com/documentation/v4/api_update_plugin_option/ for more information about this method
409
- *
410
- * @param string $key The option key to update
411
- * @param mixed $value
412
- *
413
- * @return boolean|WP_Error
414
- *
415
- * @since 4.0
416
- */
417
- public static function update_plugin_option( $key, $value ) {
418
- $options = static::get_options_class();
419
-
420
- return $options->update_option( $key, $value );
421
- }
422
-
423
- /**
424
- * Delete's a Gravity PDF global option.
425
- *
426
- * See https://gravitypdf.com/documentation/v4/api_delete_plugin_option/ for more information about this method
427
- *
428
- * @param string $key The option key to delete
429
- *
430
- * @return boolean
431
- *
432
- * @since 4.0
433
- */
434
- public static function delete_plugin_option( $key ) {
435
- $options = static::get_options_class();
436
-
437
- return $options->delete_option( $key );
438
- }
439
-
440
- /**
441
- * When provided the Gravity Form entry ID and PDF ID, this method will correctly generate the PDF, save it to disk,
442
- * trigger appropriate actions and return the absolute path to the PDF.
443
- *
444
- * See https://gravitypdf.com/documentation/v4/api_create_pdf/ for more information about this method
445
- *
446
- * @param integer $entry_id The Gravity Form entry ID
447
- * @param string $pdf_id The Gravity PDF ID number (the pid number in the URL when viewing a setting in the admin area)
448
- *
449
- * @return mixed Return the full path to the PDF, or a WP_Error on failure
450
- *
451
- * @since 4.0
452
- */
453
- public static function create_pdf( $entry_id, $pdf_id ) {
454
-
455
- $form_class = static::get_form_class();
456
-
457
- /* Get our entry */
458
- $entry = $form_class->get_entry( $entry_id );
459
-
460
- if ( is_wp_error( $entry ) ) {
461
- return new WP_Error( 'invalid_entry', 'Make sure to pass in a valid Gravity Forms Entry ID' );
462
- }
463
-
464
- /* Get our settings */
465
- $setting = static::get_pdf( $entry['form_id'], $pdf_id );
466
-
467
- if ( is_wp_error( $setting ) ) {
468
- return new WP_Error( 'invalid_pdf_setting', 'Could not located the PDF Settings. Ensure you pass in a valid PDF ID.' );
469
- }
470
-
471
- $pdf = static::get_mvc_class( 'Model_PDF' );
472
-
473
- return $pdf->generate_and_save_pdf( $entry, $setting );
474
- }
475
-
476
- /**
477
- * Generates the current entry's HTML product table
478
- *
479
- * See https://gravitypdf.com/documentation/v4/api_product_table/ for more information about this method
480
- *
481
- * @param array $entry The Gravity Form entry
482
- * @param boolean $return Whether to output or return the HTML
483
- *
484
- * @return string|void The product table or null
485
- *
486
- * @since 4.0
487
- */
488
- public static function product_table( $entry, $return = false ) {
489
- global $gfpdf;
490
-
491
- $products = new GFPDF\Helper\Fields\Field_Products( new GF_Field(), $entry, $gfpdf->gform, $gfpdf->misc );
492
-
493
- if ( ! $products->is_empty() ) {
494
-
495
- if ( $return ) {
496
- return $products->html();
497
- }
498
-
499
- echo $products->html();
500
- }
501
-
502
- return null;
503
- }
504
-
505
- /**
506
- * Generates a likert table
507
- *
508
- * See https://gravitypdf.com/documentation/v4/likert_table/ for more information about this method
509
- *
510
- * @param array $entry The Gravity Form entry
511
- * @param integer $field_id The likert field ID
512
- * @param boolean $return Whether to output or return the HTML
513
- *
514
- * @return Mixed The likert table or null
515
- *
516
- * @since 4.0
517
- */
518
- public static function likert_table( $entry, $field_id, $return = false ) {
519
- global $gfpdf;
520
-
521
- /* Get our form */
522
- $form = $gfpdf->gform->get_form( $entry['form_id'] );
523
-
524
- /* Check for errors */
525
- if ( is_wp_error( $form ) ) {
526
- return null;
527
- }
528
-
529
- /* Find our field ID, if any */
530
- foreach ( $form['fields'] as $field ) {
531
-
532
- if ( $field->id == $field_id && $field->inputType == 'likert' ) {
533
-
534
- /* Output our likert */
535
- $likert = new GFPDF\Helper\Fields\Field_Likert( $field, $entry, $gfpdf->gform, $gfpdf->misc );
536
-
537
- if ( $return ) {
538
- return $likert->html();
539
- }
540
-
541
- echo $likert->html();
542
- break;
543
- }
544
- }
545
-
546
- return null;
547
- }
548
-
549
- /**
550
- * Installs a PDF font on the file system
551
- *
552
- * See https://gravitypdf.com/documentation/v4/api_add_pdf_font/ for more information about this method
553
- *
554
- * @param array $font The font information to add.
555
- *
556
- * This array needs to be in the following format:
557
- *
558
- * Array (
559
- * 'font_name' => 'Lato',
560
- * 'regular' => '/full/path/to/font/Lato-Regular.ttf',
561
- * 'italics' => '/full/path/to/font/Lato-Italic.ttf',
562
- * 'bold' => '/full/path/to/font/Lato-Bold.ttf',
563
- * 'bolditalics' => '/full/path/to/font/Lato-BoldItalic.ttf',
564
- * )
565
- *
566
- * Only the 'font_name' and 'regular' keys are required.
567
- * All fonts should be referenced with the full server path.
568
- * Currently, only .ttf fonts are supported.
569
- * The font name can only contain alphanumeric characters, or a space
570
- *
571
- * @return bool|WP_Error
572
- *
573
- * @since 4.1
574
- */
575
- public static function add_pdf_font( $font ) {
576
- $settings = GPDFAPI::get_mvc_class( 'Model_Settings' );
577
-
578
- if ( ! isset( $font['font_name'] ) || ! $settings->is_font_name_valid( $font['font_name'] ) ) {
579
- return new WP_Error( 'invalid_font_name', 'Font name is not valid. Alphanumeric characters and spaces only.' );
580
- }
581
-
582
- if ( ! $settings->is_font_name_unique( $font['font_name'] ) ) {
583
- return new WP_Error( 'font_name_not_unique', 'A font with the same name already exists.' );
584
- }
585
-
586
- $results = $settings->install_fonts( $font );
587
-
588
- if ( isset( $results['errors'] ) ) {
589
- return new WP_Error( 'font_installation_error', implode( "\n\n", $results['errors'] ) );
590
- }
591
-
592
- return true;
593
- }
594
-
595
- /**
596
- * Deletes one of the v4 fonts that is installed
597
- *
598
- * See https://gravitypdf.com/documentation/v4/delete_pdf_font/ for more information about this method
599
- *
600
- * @param string $font_name The font that should be deleted
601
- *
602
- * @return bool|WP_Error
603
- *
604
- * @since 4.1
605
- */
606
- public static function delete_pdf_font( $font_name ) {
607
- $settings = GPDFAPI::get_mvc_class( 'Model_Settings' );
608
- $options = GPDFAPI::get_options_class();
609
- $misc = GPDFAPI::get_misc_class();
610
- $data = GPDFAPI::get_data_class();
611
-
612
- $fonts = $options->get_option( 'custom_fonts' );
613
- $font_id = $settings->get_font_id_by_name( $font_name );
614
-
615
- if ( ! isset( $fonts[ $font_id ] ) ) {
616
- return new WP_Error( 'font_not_installed', 'Font not installed.' );
617
- }
618
-
619
- /* Remove the font files */
620
- if ( ! $settings->remove_font_file( $fonts[ $font_id ] ) ) {
621
- return new WP_Error( 'font_delete_failure', 'There was a problem deleting the font files.' );
622
- }
623
-
624
- /* Cleanup our fontdata directory to prevent caching issues with mPDF */
625
- $misc->cleanup_dir( $data->template_fontdata_location );
626
-
627
- /* Update the database */
628
- unset( $fonts[ $font_id ] );
629
- if ( ! $options->update_option( 'custom_fonts', $fonts ) ) {
630
- return new WP_Error( 'font_delete_db_failure', 'There was a problem deleting the font from the database.' );
631
- }
632
-
633
- return true;
634
- }
635
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * A public API developers can use to work with Gravity PDF (similar to Gravity Forms GFAPI class)
5
+ *
6
+ * This class is in the public namespace
7
+ *
8
+ *
9
+ * @package Gravity PDF
10
+ * @copyright Copyright (c) 2017 Blue Liquid Designs
11
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
12
+ * @since 4.0
13
+ */
14
+
15
+ /* Exit if accessed directly */
16
+ if ( ! defined( 'ABSPATH' ) ) {
17
+ exit;
18
+ }
19
+
20
+ /*
21
+ This file is part of Gravity PDF.
22
+
23
+ Gravity PDF – Copyright (C) 2017 Blue Liquid Designs
24
+
25
+ This program is free software; you can redistribute it and/or modify
26
+ it under the terms of the GNU General Public License as published by
27
+ the Free Software Foundation; either version 2 of the License, or
28
+ (at your option) any later version.
29
+
30
+ This program is distributed in the hope that it will be useful,
31
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
32
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33
+ GNU General Public License for more details.
34
+
35
+ You should have received a copy of the GNU General Public License
36
+ along with this program; if not, write to the Free Software
37
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
38
+ */
39
+
40
+ /**
41
+ * An easy-to-use API developers can use to work with Gravity PDF
42
+ *
43
+ * See https://gravitypdf.com/documentation/v4/developer-api-whats-it-for/ for more information about this API
44
+ *
45
+ * @since 4.0
46
+ */
47
+ final class GPDFAPI {
48
+
49
+ /**
50
+ * Returns our public logger class which uses Monolog (a PSR-3 compatible logging interface - https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md)
51
+ *
52
+ * Log messages can be added with any of the following:
53
+ *
54
+ * $gfpdf->log->addDebug( $message, [$parameters = array()] )
55
+ * $gfpdf->log->addInfo( $message, [$parameters = array()] )
56
+ * $gfpdf->log->addNotice( $message, [$parameters = array()] )
57
+ * $gfpdf->log->addWarning( $message, [$parameters = array()] )
58
+ * $gfpdf->log->addError( $message, [$parameters = array()] )
59
+ * $gfpdf->log->addCritical( $message, [$parameters = array()] )
60
+ * $gfpdf->log->addAlert( $message, [$parameters = array()] )
61
+ * $gfpdf->log->addEmergency( $message, [$parameters = array()] )
62
+ *
63
+ * When in production Gravity PDF will only log to a file when the Gravity Forms Logging plugin is enabled and Gravity PDF is set to "Log errors only" ($log->addError() or higher) or "Log all messages" ($log->addNotice() or higher)
64
+ *
65
+ * See https://gravitypdf.com/documentation/v4/api_get_log_class/ for more information about this method
66
+ *
67
+ * @return \Monolog\Logger
68
+ *
69
+ * @since 4.0
70
+ */
71
+ public static function get_log_class() {
72
+ global $gfpdf;
73
+
74
+ return $gfpdf->log;
75
+ }
76
+
77
+ /**
78
+ * Returns our public notice queue system to make it easy to display errors and messages to the user.
79
+ *
80
+ * Usage:
81
+ * $notices->add_notice( String $message );
82
+ * $notices->add_error( String $error );
83
+ *
84
+ * This taps into the 'admin_notices' or 'network_admin_notices' WordPress hooks so you need to add your notices before then.
85
+ *
86
+ * See https://gravitypdf.com/documentation/v4/api_get_notice_class/ for more information about this method
87
+ *
88
+ * @return \GFPDF\Helper\Helper_Notices
89
+ *
90
+ * @since 4.0
91
+ */
92
+ public static function get_notice_class() {
93
+ global $gfpdf;
94
+
95
+ return $gfpdf->notices;
96
+ }
97
+
98
+ /**
99
+ * Returns our public data class which we use to store important global information related to Gravity PDF
100
+ *
101
+ * This uses PHP magic methods __set() and __get() to access and store information.
102
+ *
103
+ * Usage:
104
+ *
105
+ * $data->title; //returns "Gravity PDF"
106
+ * $data->title = 'Gravity PDF 4.0'; //sets $data->title to "Gravity PDF 4.0"
107
+ *
108
+ * Note: Our __get() magic method returns variables by reference
109
+ *
110
+ * See https://gravitypdf.com/documentation/v4/get_data_class/ for more information about this method
111
+ *
112
+ * @return \GFPDF\Helper\Helper_Data
113
+ *
114
+ * @since 4.0
115
+ */
116
+ public static function get_data_class() {
117
+ global $gfpdf;
118
+
119
+ return $gfpdf->data;
120
+ }
121
+
122
+ /**
123
+ * Returns our access layer class for all Gravity PDF Settings (both global and form specific)
124
+ *
125
+ * Note: Most relevant methods have been broken our and are avaiable through the GPDFAPI directly (GPDFAPI::get_pdf, GPDFAPI::get_plugin_settings ect)
126
+ *
127
+ * See https://gravitypdf.com/documentation/v4/api_get_options_class/ for more information about this method
128
+ *
129
+ * @return \GFPDF\Helper\Helper_Options_Fields
130
+ *
131
+ * @since 4.0
132
+ */
133
+ public static function get_options_class() {
134
+ global $gfpdf;
135
+
136
+ return $gfpdf->options;
137
+ }
138
+
139
+ /**
140
+ * Returns our miscellaneous methods (or common methods) used throughout the plugin.
141
+ *
142
+ * Usage:
143
+ *
144
+ * $misc->is_gfpdf_page();
145
+ *
146
+ * See https://gravitypdf.com/documentation/v4/api_get_misc_class/ for more information about this method
147
+ *
148
+ * @return \GFPDF\Helper\Helper_Misc
149
+ *
150
+ * @since 4.0
151
+ */
152
+ public static function get_misc_class() {
153
+ global $gfpdf;
154
+
155
+ return $gfpdf->misc;
156
+ }
157
+
158
+ /**
159
+ * Returns our templates methods used throughout the plugin.
160
+ *
161
+ * Usage:
162
+ *
163
+ * $templates->get_all_templates();
164
+ *
165
+ * See @TODO https://gravitypdf.com/documentation/v4/api_get_templates_class/ for more information about this method
166
+ *
167
+ * @return \GFPDF\Helper\Helper_Templates
168
+ *
169
+ * @since 4.1
170
+ */
171
+ public static function get_templates_class() {
172
+ global $gfpdf;
173
+
174
+ return $gfpdf->templates;
175
+ }
176
+
177
+ /**
178
+ * Returns our abstracted Gravity Forms API class we use throughout the plugin
179
+ *
180
+ * While you could just use the GFAPI directly, some methods in this class have been cache-optimised and are specifically tuned for Gravity PDF.
181
+ * Note: not all the methods in the GFAPI are implimented.
182
+ *
183
+ * Usage:
184
+ *
185
+ * $gform->get_form( $form_id );
186
+ *
187
+ * See https://gravitypdf.com/documentation/v4/api_get_form_class/ for more information about this method
188
+ *
189
+ * @return \GFPDF\Helper\Helper_Form
190
+ *
191
+ * @since 4.0
192
+ */
193
+ public static function get_form_class() {
194
+ global $gfpdf;
195
+
196
+ return $gfpdf->gform;
197
+ }
198
+
199
+ /**
200
+ * Returns the original Model/View/Controller class we initialised in our /src/bootstrap.php file
201
+ *
202
+ * This method acts like a faux singleton provider (but none of our classes are static or singletons themselves - hence the 'faux') as you get the originally initialised class back
203
+ *
204
+ * This is very useful when you want to remove any filters / actions we set in a controller's add_filters() or add_actions() methods
205
+ * You can also use to to easily access any public methods in our classes
206
+ *
207
+ * Note: This method only returns Controller_ / Model_ / View_ classes. Use the other methods above to access our Helper_ classes
208
+ *
209
+ * Usage:
210
+ *
211
+ * $class = GPDFAPI::get_mcv_class( 'Controller_PDF' );
212
+ *
213
+ * //if we have a class returned
214
+ * if( $class !== false ) {
215
+ * //remove a middleware filter
216
+ * remove_filter( 'gfpdf_pdf_middleware', array( $class, 'middle_active' ), 10 );
217
+ * }
218
+ *
219
+ * See https://gravitypdf.com/documentation/v4/api_get_mvc_class/ for more information about this method
220
+ *
221
+ * @param string $class_name The name of one of our MVC classes (no namespace)
222
+ *
223
+ * @return object|bool Will return your object if found, otherwise false
224
+ *
225
+ * @since 4.0
226
+ */
227
+ public static function get_mvc_class( $class_name ) {
228
+ global $gfpdf;
229
+
230
+ return $gfpdf->singleton->get_class( $class_name );
231
+ }
232
+
233
+ /**
234
+ * Returns a new instance of one of our PDF generating code (model or view)
235
+ *
236
+ * @param string $type Type of class to return. Valid options include 'view' or 'model'
237
+ *
238
+ * @return object|WP_Error
239
+ *
240
+ * @since 4.0
241
+ */
242
+ public static function get_pdf_class( $type = 'view' ) {
243
+
244
+ if ( $type === 'view' ) {
245
+ return static::get_mvc_class( 'View_PDF' );
246
+ }
247
+
248
+ if ( $type === 'model' ) {
249
+ return static::get_mvc_class( 'Model_PDF' );
250
+ }
251
+
252
+ return new WP_Error( 'invalid_type', esc_html__( 'The $type parameter is invalid. Only "view" and "model" are accepted', 'gravity-forms-pdf-extended' ) );
253
+ }
254
+
255
+ /**
256
+ * Gets a list of current PDFs setup for a particular Gravity Form
257
+ *
258
+ * See https://gravitypdf.com/documentation/v4/api_get_form_pdfs/ for more information about this method
259
+ *
260
+ * @param integer $form_id The Gravity Form ID
261
+ *
262
+ * @return array|WP_Error Array of PDF settings or WP_Error
263
+ *
264
+ * @since 4.0
265
+ */
266
+ public static function get_form_pdfs( $form_id ) {
267
+ $options = static::get_options_class();
268
+
269
+ return $options->get_form_pdfs( $form_id );
270
+ }
271
+
272
+ /**
273
+ * Gets a specific Gravity Form PDF configuration
274
+ *
275
+ * See https://gravitypdf.com/documentation/v4/api_get_pdf/ for more information about this method
276
+ *
277
+ * @param integer $form_id The Gravity Form ID
278
+ * @param string $pdf_id The PDF ID
279
+ *
280
+ * @return array|WP_Error Array of PDF settings or WP_Error
281
+ * @since 4.0
282
+ */
283
+ public static function get_pdf( $form_id, $pdf_id ) {
284
+ $options = static::get_options_class();
285
+
286
+ return $options->get_pdf( $form_id, $pdf_id );
287
+ }
288
+
289
+ /**
290
+ * Add a new PDF to a Gravity Form
291
+ *
292
+ * See https://gravitypdf.com/documentation/v4/api_add_pdf/ for more information about this method
293
+ *
294
+ * @param integer $form_id The Gravity Form ID
295
+ * @param array $settings The settings for the PDF
296
+ *
297
+ * @return boolean / String The PDF ID on success, false on failure
298
+ *
299
+ * @since 4.0
300
+ */
301
+ public static function add_pdf( $form_id, $settings = [] ) {
302
+ $options = static::get_options_class();
303
+
304
+ return $options->add_pdf( $form_id, $settings );
305
+ }
306
+
307
+ /**
308
+ * Updates an existing Gravity Form PDF. Passing an empty $settings array will delete the PDF
309
+ *
310
+ * See https://gravitypdf.com/documentation/v4/api_update_pdf/ for more information about this method
311
+ *
312
+ * @param integer $form_id The Gravity Form ID
313
+ * @param string $pdf_id The PDF ID
314
+ * @param array $settings The settings for the PDF
315
+ *
316
+ * @return boolean True on success, false on failure
317
+ *
318
+ * @since 4.0
319
+ */
320
+ public static function update_pdf( $form_id, $pdf_id, $settings = [] ) {
321
+ $options = static::get_options_class();
322
+
323
+ return $options->update_pdf( $form_id, $pdf_id, $settings );
324
+ }
325
+
326
+ /**
327
+ * Deletes a specific Gravity Form PDF configuration
328
+ *
329
+ * See https://gravitypdf.com/documentation/v4/api_delete_pdf/ for more information about this method
330
+ *
331
+ * @param integer $form_id The Gravity Form ID
332
+ * @param string $pdf_id The PDF ID
333
+ *
334
+ * @return boolean True on success, false on failure
335
+ *
336
+ * @since 4.0
337
+ */
338
+ public static function delete_pdf( $form_id, $pdf_id ) {
339
+ $options = static::get_options_class();
340
+
341
+ return $options->delete_pdf( $form_id, $pdf_id );
342
+ }
343
+
344
+ /**
345
+ * Retrieve an array of the global Gravity PDF settings (this doesn't include individual form configuration details - see GPDFAPI::get_form_pdfs)
346
+ *
347
+ * See https://gravitypdf.com/documentation/v4/api_get_plugin_settings/ for more information about this method
348
+ *
349
+ * @return array
350
+ *
351
+ * @since 4.0
352
+ */
353
+ public static function get_plugin_settings() {
354
+ $options = static::get_options_class();
355
+
356
+ return $options->get_settings();
357
+ }
358
+
359
+ /**
360
+ * Get an option from the global Gravity PDF settings. If it doesn't exist the $default value will be returned
361
+ *
362
+ * See https://gravitypdf.com/documentation/v4/api_get_plugin_option/ for more information about this method
363
+ *
364
+ * @param string $key The Gravity PDF option key
365
+ * @param mixed $default What's returned if the option doesn't exist
366
+ *
367
+ * @return mixed
368
+ *
369
+ * @since 4.0
370
+ */
371
+ public static function get_plugin_option( $key, $default = '' ) {
372
+ $options = static::get_options_class();
373
+
374
+ return $options->get_option( $key, $default );
375
+ }
376
+
377
+ /**
378
+ * Add a new Global option to Gravity PDF
379
+ *
380
+ * If option already exists a WP_Error is returned
381
+ * In most cases you'll want to use GPDFAPI::update_plugin_option() instead
382
+ *
383
+ * See https://gravitypdf.com/documentation/v4/api_add_plugin_option/ for more information about this method
384
+ *
385
+ * @param string $key The option key to add
386
+ * @param mixed $value
387
+ *
388
+ * @return boolean|WP_Error
389
+ *
390
+ * @since 4.0
391
+ */
392
+ public static function add_plugin_option( $key, $value ) {
393
+ $options = static::get_options_class();
394
+
395
+ /* Check the option doesn't already exist */
396
+ if ( null !== $options->get_option( $key, null ) ) {
397
+ return new WP_Error( 'option_exists', esc_html__( 'The option key %s already exists. Use GPDFAPI::update_plugin_option instead', 'gravity-forms-pdf-extended' ) );
398
+ }
399
+
400
+ return static::update_plugin_option( $key, $value );
401
+ }
402
+
403
+ /**
404
+ * Updates a Gravity PDF global option. Will create option if it doesn't exist.
405
+ *
406
+ * If $value is falsy (determined by empty() ) the option is deleted.
407
+ *
408
+ * See https://gravitypdf.com/documentation/v4/api_update_plugin_option/ for more information about this method
409
+ *
410
+ * @param string $key The option key to update
411
+ * @param mixed $value
412
+ *
413
+ * @return boolean|WP_Error
414
+ *
415
+ * @since 4.0
416
+ */
417
+ public static function update_plugin_option( $key, $value ) {
418
+ $options = static::get_options_class();
419
+
420
+ return $options->update_option( $key, $value );
421
+ }
422
+
423
+ /**
424
+ * Delete's a Gravity PDF global option.
425
+ *
426
+ * See https://gravitypdf.com/documentation/v4/api_delete_plugin_option/ for more information about this method
427
+ *
428
+ * @param string $key The option key to delete
429
+ *
430
+ * @return boolean
431
+ *
432
+ * @since 4.0
433
+ */
434
+ public static function delete_plugin_option( $key ) {
435
+ $options = static::get_options_class();
436
+
437
+ return $options->delete_option( $key );
438
+ }
439
+
440
+ /**
441
+ * When provided the Gravity Form entry ID and PDF ID, this method will correctly generate the PDF, save it to disk,
442
+ * trigger appropriate actions and return the absolute path to the PDF.
443
+ *
444
+ * See https://gravitypdf.com/documentation/v4/api_create_pdf/ for more information about this method
445
+ *
446
+ * @param integer $entry_id The Gravity Form entry ID
447
+ * @param string $pdf_id The Gravity PDF ID number (the pid number in the URL when viewing a setting in the admin area)
448
+ *
449
+ * @return mixed Return the full path to the PDF, or a WP_Error on failure
450
+ *
451
+ * @since 4.0
452
+ */
453
+ public static function create_pdf( $entry_id, $pdf_id ) {
454
+
455
+ $form_class = static::get_form_class();
456
+
457
+ /* Get our entry */
458
+ $entry = $form_class->get_entry( $entry_id );
459
+
460
+ if ( is_wp_error( $entry ) ) {
461
+ return new WP_Error( 'invalid_entry', 'Make sure to pass in a valid Gravity Forms Entry ID' );
462
+ }
463
+
464
+ /* Get our settings */
465
+ $setting = static::get_pdf( $entry['form_id'], $pdf_id );
466
+
467
+ if ( is_wp_error( $setting ) ) {
468
+ return new WP_Error( 'invalid_pdf_setting', 'Could not located the PDF Settings. Ensure you pass in a valid PDF ID.' );
469
+ }
470
+
471
+ $pdf = static::get_mvc_class( 'Model_PDF' );
472
+
473
+ return $pdf->generate_and_save_pdf( $entry, $setting );
474
+ }
475
+
476
+ /**
477
+ * Generates the current entry's HTML product table
478
+ *
479
+ * See https://gravitypdf.com/documentation/v4/api_product_table/ for more information about this method
480
+ *
481
+ * @param array $entry The Gravity Form entry
482
+ * @param boolean $return Whether to output or return the HTML
483
+ *
484
+ * @return string|void The product table or null
485
+ *
486
+ * @since 4.0
487
+ */
488
+ public static function product_table( $entry, $return = false ) {
489
+ global $gfpdf;
490
+
491
+ $products = new GFPDF\Helper\Fields\Field_Products( new GF_Field(), $entry, $gfpdf->gform, $gfpdf->misc );
492
+
493
+ if ( ! $products->is_empty() ) {
494
+
495
+ if ( $return ) {
496
+ return $products->html();
497
+ }
498
+
499
+ echo $products->html();
500
+ }
501
+
502
+ return null;
503
+ }
504
+
505
+ /**
506
+ * Generates a likert table
507
+ *
508
+ * See https://gravitypdf.com/documentation/v4/likert_table/ for more information about this method
509
+ *
510
+ * @param array $entry The Gravity Form entry
511
+ * @param integer $field_id The likert field ID
512
+ * @param boolean $return Whether to output or return the HTML
513
+ *
514
+ * @return Mixed The likert table or null
515
+ *
516
+ * @since 4.0
517
+ */
518
+ public static function likert_table( $entry, $field_id, $return = false ) {
519
+ global $gfpdf;
520
+
521
+ /* Get our form */
522
+ $form = $gfpdf->gform->get_form( $entry['form_id'] );
523
+
524
+ /* Check for errors */
525
+ if ( is_wp_error( $form ) ) {
526
+ return null;
527
+ }
528
+
529
+ /* Find our field ID, if any */
530
+ foreach ( $form['fields'] as $field ) {
531
+
532
+ if ( $field->id == $field_id && $field->inputType == 'likert' ) {
533
+
534
+ /* Output our likert */
535
+ $likert = new GFPDF\Helper\Fields\Field_Likert( $field, $entry, $gfpdf->gform, $gfpdf->misc );
536
+
537
+ if ( $return ) {
538
+ return $likert->html();
539
+ }
540
+
541
+ echo $likert->html();
542
+ break;
543
+ }
544
+ }
545
+
546
+ return null;
547
+ }
548
+
549
+ /**
550
+ * Returns an array of all installed fonts
551
+ *
552
+ * @return array
553
+ *
554
+ * @since 4.3
555
+ */
556
+ public static function get_pdf_fonts() {
557
+ $options = static::get_options_class();
558
+
559
+ return $options->get_installed_fonts();
560
+ }
561
+
562
+ /**
563
+ * Installs a PDF font on the file system
564
+ *
565
+ * See https://gravitypdf.com/documentation/v4/api_add_pdf_font/ for more information about this method
566
+ *
567
+ * @param array $font The font information to add.
568
+ *
569
+ * This array needs to be in the following format:
570
+ *
571
+ * Array (
572
+ * 'font_name' => 'Lato',
573
+ * 'regular' => '/full/path/to/font/Lato-Regular.ttf',
574
+ * 'italics' => '/full/path/to/font/Lato-Italic.ttf',
575
+ * 'bold' => '/full/path/to/font/Lato-Bold.ttf',
576
+ * 'bolditalics' => '/full/path/to/font/Lato-BoldItalic.ttf',
577
+ * )
578
+ *
579
+ * Only the 'font_name' and 'regular' keys are required.
580
+ * All fonts should be referenced with the full server path.
581
+ * Currently, only .ttf fonts are supported.
582
+ * The font name can only contain alphanumeric characters, or a space
583
+ *
584
+ * @return bool|WP_Error
585
+ *
586
+ * @since 4.1
587
+ */
588
+ public static function add_pdf_font( $font ) {
589
+ $settings = GPDFAPI::get_mvc_class( 'Model_Settings' );
590
+
591
+ if ( ! isset( $font['font_name'] ) || ! $settings->is_font_name_valid( $font['font_name'] ) ) {
592
+ return new WP_Error( 'invalid_font_name', 'Font name is not valid. Alphanumeric characters and spaces only.' );
593
+ }
594
+
595
+ if ( ! $settings->is_font_name_unique( $font['font_name'] ) ) {
596
+ return new WP_Error( 'font_name_not_unique', 'A font with the same name already exists.' );
597
+ }
598
+
599
+ $results = $settings->install_fonts( $font );
600
+
601
+ if ( isset( $results['errors'] ) ) {
602
+ return new WP_Error( 'font_installation_error', implode( "\n\n", $results['errors'] ) );
603
+ }
604
+
605
+ return true;
606
+ }
607
+
608
+ /**
609
+ * Deletes one of the v4 fonts that is installed
610
+ *
611
+ * See https://gravitypdf.com/documentation/v4/delete_pdf_font/ for more information about this method
612
+ *
613
+ * @param string $font_name The font that should be deleted
614
+ *
615
+ * @return bool|WP_Error
616
+ *
617
+ * @since 4.1
618
+ */
619
+ public static function delete_pdf_font( $font_name ) {
620
+ $settings = GPDFAPI::get_mvc_class( 'Model_Settings' );
621
+ $options = GPDFAPI::get_options_class();
622
+ $misc = GPDFAPI::get_misc_class();
623
+ $data = GPDFAPI::get_data_class();
624
+
625
+ $fonts = $options->get_option( 'custom_fonts' );
626
+ $font_id = $settings->get_font_id_by_name( $font_name );
627
+
628
+ if ( ! isset( $fonts[ $font_id ] ) ) {
629
+ return new WP_Error( 'font_not_installed', 'Font not installed.' );
630
+ }
631
+
632
+ /* Remove the font files */
633
+ if ( ! $settings->remove_font_file( $fonts[ $font_id ] ) ) {
634
+ return new WP_Error( 'font_delete_failure', 'There was a problem deleting the font files.' );
635
+ }
636
+
637
+ /* Cleanup our fontdata directory to prevent caching issues with mPDF */
638
+ $misc->cleanup_dir( $data->template_fontdata_location );
639
+
640
+ /* Update the database */
641
+ unset( $fonts[ $font_id ] );
642
+ if ( ! $options->update_option( 'custom_fonts', $fonts ) ) {
643
+ return new WP_Error( 'font_delete_db_failure', 'There was a problem deleting the font from the database.' );
644
+ }
645
+
646
+ return true;
647
+ }
648
+ }
bower_components/backbone.modelbinder/.bower.json CHANGED
@@ -1,27 +1,27 @@
1
- {
2
- "name": "backbone.modelBinder",
3
- "version": "1.1.0",
4
- "main": [
5
- "Backbone.ModelBinder.js"
6
- ],
7
- "dependencies": {
8
- "backbone": ">=0.9.0",
9
- "underscore": ">=1.3.1",
10
- "jquery": ">=1.7.1"
11
- },
12
- "repository": {
13
- "type": "git",
14
- "url": "git://github.com/theironcook/Backbone.ModelBinder.git"
15
- },
16
- "homepage": "https://github.com/theironcook/Backbone.ModelBinder",
17
- "_release": "1.1.0",
18
- "_resolution": {
19
- "type": "version",
20
- "tag": "1.1.0",
21
- "commit": "f490f9e1f92b0aa427caef43d3591fc79b2188d0"
22
- },
23
- "_source": "git://github.com/theironcook/Backbone.ModelBinder.git",
24
- "_target": "~1.1.0",
25
- "_originalSource": "backbone.modelbinder",
26
- "_direct": true
27
  }
1
+ {
2
+ "name": "backbone.modelBinder",
3
+ "version": "1.1.0",
4
+ "main": [
5
+ "Backbone.ModelBinder.js"
6
+ ],
7
+ "dependencies": {
8
+ "backbone": ">=0.9.0",
9
+ "underscore": ">=1.3.1",
10
+ "jquery": ">=1.7.1"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git://github.com/theironcook/Backbone.ModelBinder.git"
15
+ },
16
+ "homepage": "https://github.com/theironcook/Backbone.ModelBinder",
17
+ "_release": "1.1.0",
18
+ "_resolution": {
19
+ "type": "version",
20
+ "tag": "1.1.0",
21
+ "commit": "f490f9e1f92b0aa427caef43d3591fc79b2188d0"
22
+ },
23
+ "_source": "git://github.com/theironcook/Backbone.ModelBinder.git",
24
+ "_target": "~1.1.0",
25
+ "_originalSource": "backbone.modelbinder",
26
+ "_direct": true
27
  }
bower_components/backbone.modelbinder/Backbone.ModelBinder.min.js CHANGED
@@ -1,5 +1,5 @@
1
- // Backbone.ModelBinder v1.1.0
2
- // (c) 2015 Bart Wood
3
- // Distributed Under MIT License
4
-
5
  !function(t){"function"==typeof define&&define.amd?define(["underscore","jquery","backbone"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("underscore"),require("jquery"),require("backbone")):t(_,jQuery,Backbone)}(function(t,e,i){if(!i)throw"Please include Backbone.js before Backbone.ModelBinder.js";return i.ModelBinder=function(){t.bindAll.apply(t,[this].concat(t.functions(this)))},i.ModelBinder.SetOptions=function(t){i.ModelBinder.options=t},i.ModelBinder.VERSION="1.1.0",i.ModelBinder.Constants={},i.ModelBinder.Constants.ModelToView="ModelToView",i.ModelBinder.Constants.ViewToModel="ViewToModel",t.extend(i.ModelBinder.prototype,{bind:function(t,i,n,o){this.unbind(),this._model=t,this._rootEl=i,this._setOptions(o),this._model||this._throwException("model must be specified"),this._rootEl||this._throwException("rootEl must be specified"),n?(this._attributeBindings=e.extend(!0,{},n),this._initializeAttributeBindings(),this._initializeElBindings()):this._initializeDefaultBindings(),this._bindModelToView(),this._bindViewToModel()},bindCustomTriggers:function(t,e,i,n,o){this._triggers=i,this.bind(t,e,n,o)},unbind:function(){this._unbindModelToView(),this._unbindViewToModel(),this._attributeBindings&&(delete this._attributeBindings,this._attributeBindings=void 0)},_setOptions:function(e){this._options=t.extend({boundAttribute:"name"},i.ModelBinder.options,e),this._options.modelSetOptions||(this._options.modelSetOptions={}),this._options.modelSetOptions.changeSource="ModelBinder",this._options.changeTriggers||(this._options.changeTriggers={"":"change","[contenteditable]":"blur"}),this._options.initialCopyDirection||(this._options.initialCopyDirection=i.ModelBinder.Constants.ModelToView)},_initializeAttributeBindings:function(){var e,i,n,o,s;for(e in this._attributeBindings){for(i=this._attributeBindings[e],t.isString(i)?n={elementBindings:[{selector:i}]}:t.isArray(i)?n={elementBindings:i}:t.isObject(i)?n={elementBindings:[i]}:this._throwException("Unsupported type passed to Model Binder "+n),o=0;o<n.elementBindings.length;o++)s=n.elementBindings[o],s.attributeBinding=n;n.attributeName=e,this._attributeBindings[e]=n}},_initializeDefaultBindings:function(){var t,i,n,o,s;for(this._attributeBindings={},i=e("["+this._options.boundAttribute+"]",this._rootEl),t=0;t<i.length;t++)n=i[t],o=e(n).attr(this._options.boundAttribute),this._attributeBindings[o]?this._attributeBindings[o].elementBindings.push({attributeBinding:this._attributeBindings[o],boundEls:[n]}):(s={attributeName:o},s.elementBindings=[{attributeBinding:s,boundEls:[n]}],this._attributeBindings[o]=s)},_initializeElBindings:function(){var t,i,n,o,s,r,d;for(t in this._attributeBindings)for(i=this._attributeBindings[t],n=0;n<i.elementBindings.length;n++)if(o=i.elementBindings[n],s=""===o.selector?e(this._rootEl):e(o.selector,this._rootEl),0===s.length)this._throwException("Bad binding found. No elements returned for binding selector "+o.selector);else for(o.boundEls=[],r=0;r<s.length;r++)d=s[r],o.boundEls.push(d)},_bindModelToView:function(){this._model.on("change",this._onModelChange,this),this._options.initialCopyDirection===i.ModelBinder.Constants.ModelToView&&this.copyModelAttributesToView()},copyModelAttributesToView:function(e){var i,n;for(i in this._attributeBindings)(void 0===e||-1!==t.indexOf(e,i))&&(n=this._attributeBindings[i],this._copyModelToView(n))},copyViewValuesToModel:function(){var t,i,n,o,s,r;for(t in this._attributeBindings)for(i=this._attributeBindings[t],n=0;n<i.elementBindings.length;n++)if(o=i.elementBindings[n],this._isBindingUserEditable(o))if(this._isBindingRadioGroup(o))r=this._getRadioButtonGroupCheckedEl(o),r&&this._copyViewToModel(o,r);else for(s=0;s<o.boundEls.length;s++)r=e(o.boundEls[s]),this._isElUserEditable(r)&&this._copyViewToModel(o,r)},_unbindModelToView:function(){this._model&&(this._model.off("change",this._onModelChange),this._model=void 0)},_bindViewToModel:function(){t.each(this._options.changeTriggers,function(t,i){e(this._rootEl).on(t,i,this._onElChanged)},this),this._options.initialCopyDirection===i.ModelBinder.Constants.ViewToModel&&this.copyViewValuesToModel()},_unbindViewToModel:function(){this._options&&this._options.changeTriggers&&t.each(this._options.changeTriggers,function(t,i){e(this._rootEl).off(t,i,this._onElChanged)},this)},_onElChanged:function(t){var i,n,o,s;for(i=e(t.target)[0],n=this._getElBindings(i),o=0;o<n.length;o++)s=n[o],this._isBindingUserEditable(s)&&this._copyViewToModel(s,i)},_isBindingUserEditable:function(t){return void 0===t.elAttribute||"text"===t.elAttribute||"html"===t.elAttribute},_isElUserEditable:function(t){var e=t.attr("contenteditable");return e||t.is("input")||t.is("select")||t.is("textarea")},_isBindingRadioGroup:function(t){var i,n,o=t.boundEls.length>0;for(i=0;i<t.boundEls.length;i++)if(n=e(t.boundEls[i]),"radio"!==n.attr("type")){o=!1;break}return o},_getRadioButtonGroupCheckedEl:function(t){var i,n;for(i=0;i<t.boundEls.length;i++)if(n=e(t.boundEls[i]),"radio"===n.attr("type")&&n.prop("checked"))return n;return void 0},_getElBindings:function(t){var e,i,n,o,s,r,d=[];for(e in this._attributeBindings)for(i=this._attributeBindings[e],n=0;n<i.elementBindings.length;n++)for(o=i.elementBindings[n],s=0;s<o.boundEls.length;s++)r=o.boundEls[s],r===t&&d.push(o);return d},_onModelChange:function(){var t,e;for(t in this._model.changedAttributes())e=this._attributeBindings[t],e&&this._copyModelToView(e)},_copyModelToView:function(t){var n,o,s,r,d,l;for(d=this._model.get(t.attributeName),n=0;n<t.elementBindings.length;n++)for(o=t.elementBindings[n],s=0;s<o.boundEls.length;s++)r=o.boundEls[s],r._isSetting||(l=this._getConvertedValue(i.ModelBinder.Constants.ModelToView,o,d),this._setEl(e(r),o,l))},_setEl:function(t,e,i){e.elAttribute?this._setElAttribute(t,e,i):this._setElValue(t,i)},_setElAttribute:function(e,n,o){switch(n.elAttribute){case"html":e.html(o);break;case"text":e.text(o);break;case"enabled":e.prop("disabled",!o);break;case"displayed":e[o?"show":"hide"]();break;case"hidden":e[o?"hide":"show"]();break;case"css":e.css(n.cssAttribute,o);break;case"class":var s=this._model.previous(n.attributeBinding.attributeName),r=this._model.get(n.attributeBinding.attributeName);t.isUndefined(s)&&t.isUndefined(r)||(s=this._getConvertedValue(i.ModelBinder.Constants.ModelToView,n,s),e.removeClass(s)),o&&e.addClass(o);break;default:e.attr(n.elAttribute,o)}},_setElValue:function(t,e){if(t.attr("type"))switch(t.attr("type")){case"radio":t.prop("checked",t.val()===e);break;case"checkbox":t.prop("checked",!!e);break;case"file":break;default:t.val(e)}else t.is("input")||t.is("select")||t.is("textarea")?t.val(e||(0===e?"0":"")):t.text(e||(0===e?"0":""))},_copyViewToModel:function(t,n){var o,s,r;n._isSetting||(n._isSetting=!0,o=this._setModel(t,e(n)),n._isSetting=!1,o&&t.converter&&(s=this._model.get(t.attributeBinding.attributeName),r=this._getConvertedValue(i.ModelBinder.Constants.ModelToView,t,s),this._setEl(e(n),t,r)))},_getElValue:function(t,e){switch(e.attr("type")){case"checkbox":return e.prop("checked")?!0:!1;default:return void 0!==e.attr("contenteditable")?e.html():e.val()}},_setModel:function(t,e){var n={},o=this._getElValue(t,e);return o=this._getConvertedValue(i.ModelBinder.Constants.ViewToModel,t,o),n[t.attributeBinding.attributeName]=o,this._model.set(n,this._options.modelSetOptions)},_getConvertedValue:function(t,e,i){return e.converter?i=e.converter(t,i,e.attributeBinding.attributeName,this._model,e.boundEls):this._options.converter&&(i=this._options.converter(t,i,e.attributeBinding.attributeName,this._model,e.boundEls)),i},_throwException:function(t){if(!this._options.suppressThrows)throw t;"undefined"!=typeof console&&console.error&&console.error(t)}}),i.ModelBinder.CollectionConverter=function(e){if(this._collection=e,!this._collection)throw"Collection must be defined";t.bindAll(this,"convert")},t.extend(i.ModelBinder.CollectionConverter.prototype,{convert:function(t,e){return t===i.ModelBinder.Constants.ModelToView?e?e.id:void 0:this._collection.get(e)}}),i.ModelBinder.createDefaultBindings=function(t,i,n,o){var s,r,d,l,a={};for(s=e("["+i+"]",t),r=0;r<s.length;r++)if(d=s[r],l=e(d).attr(i),!a[l]){var u={selector:"["+i+'="'+l+'"]'};a[l]=u,n&&(a[l].converter=n),o&&(a[l].elAttribute=o)}return a},i.ModelBinder.combineBindings=function(e,i){return t.each(i,function(t,i){var n={selector:t.selector};t.converter&&(n.converter=t.converter),t.elAttribute&&(n.elAttribute=t.elAttribute),e[i]=e[i]?[e[i],n]:n}),e},i.ModelBinder});
1
+ // Backbone.ModelBinder v1.1.0
2
+ // (c) 2015 Bart Wood
3
+ // Distributed Under MIT License
4
+
5
  !function(t){"function"==typeof define&&define.amd?define(["underscore","jquery","backbone"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("underscore"),require("jquery"),require("backbone")):t(_,jQuery,Backbone)}(function(t,e,i){if(!i)throw"Please include Backbone.js before Backbone.ModelBinder.js";return i.ModelBinder=function(){t.bindAll.apply(t,[this].concat(t.functions(this)))},i.ModelBinder.SetOptions=function(t){i.ModelBinder.options=t},i.ModelBinder.VERSION="1.1.0",i.ModelBinder.Constants={},i.ModelBinder.Constants.ModelToView="ModelToView",i.ModelBinder.Constants.ViewToModel="ViewToModel",t.extend(i.ModelBinder.prototype,{bind:function(t,i,n,o){this.unbind(),this._model=t,this._rootEl=i,this._setOptions(o),this._model||this._throwException("model must be specified"),this._rootEl||this._throwException("rootEl must be specified"),n?(this._attributeBindings=e.extend(!0,{},n),this._initializeAttributeBindings(),this._initializeElBindings()):this._initializeDefaultBindings(),this._bindModelToView(),this._bindViewToModel()},bindCustomTriggers:function(t,e,i,n,o){this._triggers=i,this.bind(t,e,n,o)},unbind:function(){this._unbindModelToView(),this._unbindViewToModel(),this._attributeBindings&&(delete this._attributeBindings,this._attributeBindings=void 0)},_setOptions:function(e){this._options=t.extend({boundAttribute:"name"},i.ModelBinder.options,e),this._options.modelSetOptions||(this._options.modelSetOptions={}),this._options.modelSetOptions.changeSource="ModelBinder",this._options.changeTriggers||(this._options.changeTriggers={"":"change","[contenteditable]":"blur"}),this._options.initialCopyDirection||(this._options.initialCopyDirection=i.ModelBinder.Constants.ModelToView)},_initializeAttributeBindings:function(){var e,i,n,o,s;for(e in this._attributeBindings){for(i=this._attributeBindings[e],t.isString(i)?n={elementBindings:[{selector:i}]}:t.isArray(i)?n={elementBindings:i}:t.isObject(i)?n={elementBindings:[i]}:this._throwException("Unsupported type passed to Model Binder "+n),o=0;o<n.elementBindings.length;o++)s=n.elementBindings[o],s.attributeBinding=n;n.attributeName=e,this._attributeBindings[e]=n}},_initializeDefaultBindings:function(){var t,i,n,o,s;for(this._attributeBindings={},i=e("["+this._options.boundAttribute+"]",this._rootEl),t=0;t<i.length;t++)n=i[t],o=e(n).attr(this._options.boundAttribute),this._attributeBindings[o]?this._attributeBindings[o].elementBindings.push({attributeBinding:this._attributeBindings[o],boundEls:[n]}):(s={attributeName:o},s.elementBindings=[{attributeBinding:s,boundEls:[n]}],this._attributeBindings[o]=s)},_initializeElBindings:function(){var t,i,n,o,s,r,d;for(t in this._attributeBindings)for(i=this._attributeBindings[t],n=0;n<i.elementBindings.length;n++)if(o=i.elementBindings[n],s=""===o.selector?e(this._rootEl):e(o.selector,this._rootEl),0===s.length)this._throwException("Bad binding found. No elements returned for binding selector "+o.selector);else for(o.boundEls=[],r=0;r<s.length;r++)d=s[r],o.boundEls.push(d)},_bindModelToView:function(){this._model.on("change",this._onModelChange,this),this._options.initialCopyDirection===i.ModelBinder.Constants.ModelToView&&this.copyModelAttributesToView()},copyModelAttributesToView:function(e){var i,n;for(i in this._attributeBindings)(void 0===e||-1!==t.indexOf(e,i))&&(n=this._attributeBindings[i],this._copyModelToView(n))},copyViewValuesToModel:function(){var t,i,n,o,s,r;for(t in this._attributeBindings)for(i=this._attributeBindings[t],n=0;n<i.elementBindings.length;n++)if(o=i.elementBindings[n],this._isBindingUserEditable(o))if(this._isBindingRadioGroup(o))r=this._getRadioButtonGroupCheckedEl(o),r&&this._copyViewToModel(o,r);else for(s=0;s<o.boundEls.length;s++)r=e(o.boundEls[s]),this._isElUserEditable(r)&&this._copyViewToModel(o,r)},_unbindModelToView:function(){this._model&&(this._model.off("change",this._onModelChange),this._model=void 0)},_bindViewToModel:function(){t.each(this._options.changeTriggers,function(t,i){e(this._rootEl).on(t,i,this._onElChanged)},this),this._options.initialCopyDirection===i.ModelBinder.Constants.ViewToModel&&this.copyViewValuesToModel()},_unbindViewToModel:function(){this._options&&this._options.changeTriggers&&t.each(this._options.changeTriggers,function(t,i){e(this._rootEl).off(t,i,this._onElChanged)},this)},_onElChanged:function(t){var i,n,o,s;for(i=e(t.target)[0],n=this._getElBindings(i),o=0;o<n.length;o++)s=n[o],this._isBindingUserEditable(s)&&this._copyViewToModel(s,i)},_isBindingUserEditable:function(t){return void 0===t.elAttribute||"text"===t.elAttribute||"html"===t.elAttribute},_isElUserEditable:function(t){var e=t.attr("contenteditable");return e||t.is("input")||t.is("select")||t.is("textarea")},_isBindingRadioGroup:function(t){var i,n,o=t.boundEls.length>0;for(i=0;i<t.boundEls.length;i++)if(n=e(t.boundEls[i]),"radio"!==n.attr("type")){o=!1;break}return o},_getRadioButtonGroupCheckedEl:function(t){var i,n;for(i=0;i<t.boundEls.length;i++)if(n=e(t.boundEls[i]),"radio"===n.attr("type")&&n.prop("checked"))return n;return void 0},_getElBindings:function(t){var e,i,n,o,s,r,d=[];for(e in this._attributeBindings)for(i=this._attributeBindings[e],n=0;n<i.elementBindings.length;n++)for(o=i.elementBindings[n],s=0;s<o.boundEls.length;s++)r=o.boundEls[s],r===t&&d.push(o);return d},_onModelChange:function(){var t,e;for(t in this._model.changedAttributes())e=this._attributeBindings[t],e&&this._copyModelToView(e)},_copyModelToView:function(t){var n,o,s,r,d,l;for(d=this._model.get(t.attributeName),n=0;n<t.elementBindings.length;n++)for(o=t.elementBindings[n],s=0;s<o.boundEls.length;s++)r=o.boundEls[s],r._isSetting||(l=this._getConvertedValue(i.ModelBinder.Constants.ModelToView,o,d),this._setEl(e(r),o,l))},_setEl:function(t,e,i){e.elAttribute?this._setElAttribute(t,e,i):this._setElValue(t,i)},_setElAttribute:function(e,n,o){switch(n.elAttribute){case"html":e.html(o);break;case"text":e.text(o);break;case"enabled":e.prop("disabled",!o);break;case"displayed":e[o?"show":"hide"]();break;case"hidden":e[o?"hide":"show"]();break;case"css":e.css(n.cssAttribute,o);break;case"class":var s=this._model.previous(n.attributeBinding.attributeName),r=this._model.get(n.attributeBinding.attributeName);t.isUndefined(s)&&t.isUndefined(r)||(s=this._getConvertedValue(i.ModelBinder.Constants.ModelToView,n,s),e.removeClass(s)),o&&e.addClass(o);break;default:e.attr(n.elAttribute,o)}},_setElValue:function(t,e){if(t.attr("type"))switch(t.attr("type")){case"radio":t.prop("checked",t.val()===e);break;case"checkbox":t.prop("checked",!!e);break;case"file":break;default:t.val(e)}else t.is("input")||t.is("select")||t.is("textarea")?t.val(e||(0===e?"0":"")):t.text(e||(0===e?"0":""))},_copyViewToModel:function(t,n){var o,s,r;n._isSetting||(n._isSetting=!0,o=this._setModel(t,e(n)),n._isSetting=!1,o&&t.converter&&(s=this._model.get(t.attributeBinding.attributeName),r=this._getConvertedValue(i.ModelBinder.Constants.ModelToView,t,s),this._setEl(e(n),t,r)))},_getElValue:function(t,e){switch(e.attr("type")){case"checkbox":return e.prop("checked")?!0:!1;default:return void 0!==e.attr("contenteditable")?e.html():e.val()}},_setModel:function(t,e){var n={},o=this._getElValue(t,e);return o=this._getConvertedValue(i.ModelBinder.Constants.ViewToModel,t,o),n[t.attributeBinding.attributeName]=o,this._model.set(n,this._options.modelSetOptions)},_getConvertedValue:function(t,e,i){return e.converter?i=e.converter(t,i,e.attributeBinding.attributeName,this._model,e.boundEls):this._options.converter&&(i=this._options.converter(t,i,e.attributeBinding.attributeName,this._model,e.boundEls)),i},_throwException:function(t){if(!this._options.suppressThrows)throw t;"undefined"!=typeof console&&console.error&&console.error(t)}}),i.ModelBinder.CollectionConverter=function(e){if(this._collection=e,!this._collection)throw"Collection must be defined";t.bindAll(this,"convert")},t.extend(i.ModelBinder.CollectionConverter.prototype,{convert:function(t,e){return t===i.ModelBinder.Constants.ModelToView?e?e.id:void 0:this._collection.get(e)}}),i.ModelBinder.createDefaultBindings=function(t,i,n,o){var s,r,d,l,a={};for(s=e("["+i+"]",t),r=0;r<s.length;r++)if(d=s[r],l=e(d).attr(i),!a[l]){var u={selector:"["+i+'="'+l+'"]'};a[l]=u,n&&(a[l].converter=n),o&&(a[l].elAttribute=o)}return a},i.ModelBinder.combineBindings=function(e,i){return t.each(i,function(t,i){var n={selector:t.selector};t.converter&&(n.converter=t.converter),t.elAttribute&&(n.elAttribute=t.elAttribute),e[i]=e[i]?[e[i],n]:n}),e},i.ModelBinder});
bower_components/backbone.modelbinder/README.md CHANGED
@@ -1,875 +1,875 @@
1
- Special thanks to [Derick Bailey](http://lostechies.com/derickbailey) for creating predecessor to this plugin.
2
- I've been able to reuse unit tests he created for his [Backbone.ModelBinding](https://github.com/derickbailey/backbone.modelbinding) plugin.
3
-
4
-
5
- ### Rationale
6
- Backbone is a great platform for writing client side applications but I've found that as views grow in complexity, synchronizing my models and views can be a pain.
7
- I've spent the past few months trying to use existing view-model binding libraries that others were kind enough to create and share with the world.
8
- Unfortunately in the majority of my backbone application I wasn't able to leverage the existing view-model binding libraries due to various limitations.
9
-
10
- I created a new `Backbone.ModelBinder` class that I have leveraged in the majority of a large client side application.
11
- The ModelBinder class helped me remove a lot of cluttered boilerplate code that existed to synchronize my models and views.
12
- As my application became more asynchronous, the ModelBinder saves me from a lot of pain by automatically displaying model attributes in the view as they are asynchronously loaded.
13
- Hopefully you'll find the ModelBinder useful too.
14
-
15
- The `Backbone.ModelBinder` class:
16
-
17
- * Is as simple as possible yet still flexible and powerful
18
- * Leverages the exact same jQuery syntax that the Backbone.View event blocks use
19
- * Allows you to define type formatting and type conversion in your bindings
20
- * Provides a simple javascript only solution rather than mixing binding syntax in html templates and javascript files. I personally find mixing binding logic in my html files to be messy and confusing.
21
-
22
- <br>
23
- You can use this ModelBinder class to bind backbone model attributes to:
24
-
25
- * Read-only html elements such as `<span>`, `<div>` etc.
26
- * Html element attributes such as enabled, displayed, style etc.
27
- * Editable form elements such as `<input>`, `<textarea>` etc. This type of binding is bidirectional between the html elements and the Model's attributes.
28
-
29
- <br>
30
- ###The ModelBinder is more efficient###
31
- It seems like many of the backbone view examples I've seen register for the model's change event and then re-render the entire view like the example shown below.
32
-
33
- ````
34
- SomeView = Backbone.View.extend({
35
- initialize: function(){
36
- this.model.on('change', this.render, this);
37
- },
38
-
39
- render: function() {
40
- this.$el.html(this.template(this.model.toJSON()));
41
- return this;
42
- }
43
- });
44
- ````
45
- If the model changes frequently the above type of code will be wasteful because so many DOM elements are just thrown away. Converting the model to json is also an unnecessary conversion.
46
-
47
- The ModelBinder eliminates these ineffeciencies by listening for model changes like the above code. But it doesn't recreate the entire set of DOM elements. Instead, it will change the content of existing DOM elements.
48
-
49
-
50
- <br>
51
- ## Prerequisites
52
-
53
- * Backbone.js v1.0.0 or higher
54
- * Underscore.js v1.4.4 or higher
55
- * jQuery v1.8.3 or higher
56
-
57
-
58
- <br>
59
- ### Availability
60
- You can download the zip/tarball as normal and include it with your other JS assets, but you can now alternatively link to it on [CDNJS](http://www.cdnjs.com/), the free to use, community maintained CDN.
61
-
62
- To do this, just drop a reference to the minified version of the plugin into your document's `<head>` as follows, replacing the version number with whatever the latest one is:
63
- ````
64
- <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/backbone.modelbinder/1.0.4/Backbone.ModelBinder.min.js"></script>
65
- ````
66
-
67
-
68
- <br>
69
- ##Defining Binding Scope with jQuery##
70
-
71
- One of the most powerful capabilities of the ModelBinder class is that it allows you to define scope when you create your bindings using jQuery.
72
-
73
- * If your views are simple (no nested Views etc.) you can rely on default scoping rules that are based off of the html `name` attribute.
74
- * If your views are more complex you can explicitly define scoping rules with jQuery selectors. Scoping will allow you to handle nested views or have the ModelBinder only manage parts of your Views and your own custom code can handle the more complicated problems.
75
-
76
- Both scoping mechanisms will be discussed throughout the rest of this document.
77
-
78
- ***
79
-
80
- ##Basic ModelBinder functionality##
81
-
82
- The `ModelBinder` class contains all of the logic to facilitate bi-directional view-model binding.
83
-
84
- The ModelBinder class exposes 3 public functions shown below:
85
-
86
- ```javascript
87
- // no arguments passed to the constructor
88
- constructor();
89
-
90
- // model is required, it is the backbone Model you're binding to
91
- // rootEl is required, is the root html element containing the elements you want to bind to
92
- // bindings is optional, it's discussed a bit later
93
- // options, discussed at the bottom of the document
94
- bind(model, rootEl, bindings, options);
95
-
96
- // unbinds the Model with the elements found under rootEl - defined when calling bind()
97
- unbind();
98
- ```
99
-
100
- <br>
101
- The `bind()` function's 3rd argument `bindings` is optional. The `bindings` arg is useful for defining binding scope and formatting and will be discussed later.
102
- If `bindings` is not defined, then `bind()` will locate all of the child elements under the rootEl that define a `name` attribute.
103
- Each of the elements with a `name` attribute will be bound to the model's attributes - the value of the element's name attribute will be used as the model's attribute name.
104
-
105
- In the example below, the model's address attribute will be bound to the input text field with the name of 'address'. This binding is bi-directional between the view and the model.
106
-
107
- ````
108
- <!-- The html -->
109
- <input type="text" name="address"/>
110
- ````
111
-
112
- ````
113
- <!-- The javascript -->
114
- SomeView = Backbone.View.extend({
115
- render: function(){
116
- this.modelBinder.bind(this.model, this.el);
117
- }
118
- });
119
- ````
120
-
121
- <br>
122
- ## Binding after elements created, rootEl ##
123
-
124
- The bind() functions `rootEl` parameter should contain all of the elements that you want to bind to.
125
- Your rootEl might be the view.el property or it could be any valid html element. It does not matter if the rootEl is displayed in a browser.
126
-
127
- The example below shows how the rootEl argument is the result of the jQuery selection "#outerDiv". This will work just like the previous example.
128
-
129
- ````
130
- <!-- The html -->
131
- <div id="outerDiv">
132
- <input type="text" name="address"/>
133
- </div>
134
- ````
135
-
136
- ````
137
- <!-- The javascript -->
138
- SomeView = Backbone.View.extend({
139
- render: function(){
140
- this.modelBinder.bind(this.model, this.$('#outerDiv'));
141
- }
142
- });
143
- ````
144
-
145
- <br>
146
- ## Elements are recursively bound ##
147
-
148
- If you do not pass the `bindings` 3rd parameter to the bind() function, <b>all</b> child elements under the rootEl with a "name" attribute are bound.
149
- This includes any nested child elements that define the "name" attribute.
150
-
151
- In the example below, the "address" and the "city" elements will be bound to the model.
152
-
153
- ````
154
- <!-- The html -->
155
- <div id="outerDiv">
156
- <input type="text" name="address"/>
157
- <div id="divTwo">
158
- <input type="text" name="city"/>
159
- </div>
160
- </div>
161
- ````
162
-
163
- ````
164
- <!-- The javascript -->
165
- SomeView = Backbone.View.extend({
166
- render: function(){
167
- this.modelBinder.bind(this.model, this.el);
168
- }
169
- });
170
- ````
171
-
172
-
173
- <br>
174
- ## Binding multiple html elements to the same model attribute ##
175
-
176
- In the example below, the `<span>` and the `<input>` elements are both bound to the model.firstName attribute.
177
- If you modified the firstName input element you would see the span automatically updated because the Model would have been updated.
178
-
179
- ````
180
- <!-- The html -->
181
- Welcome, <span name="firstName"></span>
182
-
183
- Edit your information:
184
- <input type="text" name="firstName"/>
185
- ````
186
-
187
- ````
188
- <!-- The javascript -->
189
- SomeView = Backbone.View.extend({
190
- render: function(){
191
- this.modelBinder.bind(this.model, this.el);
192
- }
193
- });
194
- ````
195
-
196
- <br>
197
- If your View element definitions are simple you can rely on having properly defined "name" attributes in your html elements that match your Model attribute names.
198
- Remember that **all** of the rootEl's child elements (recursive) with a "name" attribute will be bound to your Model.
199
-
200
- If your views require formatting, conversion or more scoping due to nested or complex views you'll need to define a `bindings` parameter to the `bind()` function as discussed in the next section.
201
-
202
-
203
- ***
204
-
205
- ##The bindings parameter to the bind() function##
206
-
207
- For more complicated things like formatting or defining scope for composite or nested Views you'll need to define a `bindings` parameter - the optional 3rd parameter to the `bind()` function.
208
- The bindings parameter is a javascript hash object.
209
-
210
- The bindings hash keys are the model's attribute names and the values, in the simplest case, are jQuery selectors that must return at least 1 html element.
211
-
212
- The example below binds model.address to the element with the id="address":
213
-
214
- ````
215
- <input type='text' id='address'/>
216
-
217
- var bindings = {address: '#address'};
218
- modelBinder.bind(this.model, this.el, bindings);
219
- ````
220
-
221
- The example below binds model.homeAddress to the element with name="homeAddress" and model.workAddress to the element with name="workAddress":
222
-
223
- ````
224
- <input type="text" name="homeAddress"/>
225
- <input type="text" name="workAddress "/>
226
-
227
- var bindings = {homeAddress: '[name=homeAddress]', workAddress : '[name=workAddress ]'};
228
- modelBinder.bind(this.model, this.el, bindings);
229
- ````
230
-
231
- The example below binds model.city to `<input type="text" id="city"/>`:
232
-
233
- ````
234
- var bindings = {city: '#city'};
235
- modelBinder.bind(this.model, this.el, bindings);
236
- ````
237
-
238
- You can use any jQuery selector that you like, as long as the selector returns at least a single element.
239
- In the example below, both the `<span>` and the `<input>` elements are bound to the model.firstName attribute.
240
- In this situation, you could also eliminate the bindings and get the same behavior.
241
-
242
- ````
243
- <!-- The html -->
244
- Welcome, <span name="firstName"></span>
245
-
246
- Edit your information:
247
- <input type="text" name="firstName"/>
248
- ````
249
-
250
- ````
251
- <!-- The javascript -->
252
- var bindings = {firstName: '[name=firstName]'};
253
- modelBinder.bind(this.model, this.el, bindings);
254
- ````
255
-
256
- <br>
257
- Here are a few more examples of the bindings hash syntax.
258
-
259
- ````
260
- Html bindings entry
261
- -----------------------------------------------------------------------------------------------
262
- <input type="text" id="firstName"/> firstName: '#firstName'
263
-
264
- <input type="text" name="firstName"/> firstName: '[name=firstName]'
265
-
266
- <select name="operatorSelectEl"> operator: '[name=operatorSelectEl]'
267
- <option value="1">Dan</option>
268
- <option value="2">Eli</option>
269
- <option value="3">Frank</option>
270
- </select>
271
-
272
- <input type="radio" name="isOk" value="yes"> isOk: '[name=isOk]'
273
-
274
- <input type="text" class="myTestClass" myTestAttribute: '[class~=myTestClass]'
275
- name="address"/>
276
- ````
277
-
278
- <br>
279
- ## You can define multiple jQuery selectors ##
280
-
281
- The binding entries can be defined as strings as shown in all previous examples but internally the string is converted to the type of entry shown below.
282
-
283
- ````
284
- firstName: {selector: '#firstName'}
285
- ````
286
-
287
- The jQuery string is a hash parameter named `selector`.
288
- You can define arrays of `selector` arguments in your bindings as shown in the example below.
289
-
290
- ````
291
- firstName: [{selector: '#firstName'}, {selector: '#title'}]
292
- ````
293
-
294
- In the example above, model.firstName is bound to an element with the id of "firstName" and an element with the id of "title".
295
- To define multiple selectors, just define them as an array.
296
-
297
- The jQuery bindings leverage the jQuery delegate mechanism - which means they should be fairly efficient.
298
-
299
- ##Binding to the Root Element##
300
-
301
- Sometimes, in rare cases, your views are so simple that you just want to bind
302
- to the root element itself. For example, if your view is an `<li>` tag, it
303
- makes sense to have the inner HTML simply be the appropriate model value.
304
-
305
- In those cases, simply use an empty string as your selector:
306
-
307
- ````
308
- firstName: { selector: '' }
309
- ````
310
-
311
- <br>
312
- ***
313
-
314
- ##Formatting and converting values##
315
-
316
- The bindings can also define a `converter` parameter.
317
- A converter is simply a function that is called whenever a model's attribute is copied to an html element or when an html elements value is copied into a model's attribute.
318
-
319
- Converters help you format values in your views but help keep them clean in your models.
320
-
321
- A simple of example of using a converter to format a phone number is shown below.
322
-
323
- ````
324
- var phoneConverter = function(direction, value){
325
- // direction is either ModelToView or ViewToModel
326
- // Return either a formatted value for the view or an un-formatted value for the model
327
- };
328
-
329
- var bindings = {phoneNumber: {selector: '[name=phoneNumber]', converter: phoneConverter}}
330
- modelBinder.bind(this.model, this.el, bindings );
331
- ````
332
-
333
- <br>
334
- A converter function is passed 4 parameters.
335
-
336
- * direction - either ModelToView or ViewToModel
337
- * value - the model's attribute value or the view element's value
338
- * attribute Name
339
- * model - this is more useful when you're dealing with calculated attributes
340
- * els - an array of the els that were bound to the converter
341
-
342
- If your binding to a read-only element like a `<div>` you'll just ignore the direction parameter - it's always ModelToView.
343
- In most cases, you'll be able to ignore the attribute name and model parameters but they can be helpful in some situations discussed later.
344
-
345
- The Model parameter can be quite helpful in complicated situations.
346
- The els array allows a developer to manually modify the els directly when a converter is invoked.
347
- Be very careful when accessing the els directly because any state you set into the els might be overwritten by the ModelBinder after the converter is finished.
348
- For example, if a converter is called with the direction 'ModelToView' and inside the converter the code updates the el values directly those values will be overwritten with the value returned from the converter function.
349
- The els array is more valuable if you need to set other properties etc. on the els. In most situations you should not need the els parameter.
350
-
351
-
352
- <br>
353
- Converters can be used for simple formatting operations like phone numbers but they can also be used for more advanced situations like when you want to convert between a model and some description of the model.
354
- You might want to display a list of models in a `<select>` element - a converter could allow you to convert between a model and a model's id making this type of binding easy to do.
355
-
356
- The example below shows how this could work. The `CollectionConverter` shown is defined in the ModelBinder.js file.
357
-
358
- ````
359
- <!-- The html -->
360
- <select name="nestedModel">
361
- <option value="">Please Select Something</option>
362
- <% _.each(nestedModelChoices, function (modelChoice) { %>
363
- <option value="<%= modelChoice.id %>"><%= modelChoice.description %></option>
364
- <% }); %>
365
- </select>
366
- ````
367
-
368
- ````
369
- <!-- The javascript -->
370
- SomeView = Backbone.View.extend({
371
- render: function(){
372
- // An example of what might be passed to the template function
373
- var nestedModelChoices = [{id: 1, description: 'This is One'}, {id: 2, description: 'This is Two'}];
374
-
375
- $(this.el).html(this.template({nestedModelChoices: nestedModelChoices}));
376
-
377
- var binder = new Backbone.ModelBinder();
378
-
379
- var bindingsHash = {nestedModel: { selector: '[name=nestedModel]',
380
- converter: new Backbone.ModelBinder.CollectionConverter(nestedModelChoices).convert} };
381
-
382
- binder.bind(this.model, this.el, bindingsHash);
383
- ````
384
-
385
- <br>
386
- ## Converters can display calculated attributes ##
387
-
388
- Sometimes your models will have computed attributes.
389
- You could cache computed values inside a model's attribute collection and it would be bound like any other attribute.
390
- I favor this solution but it's not perfect because when you save models back to the server, the calculated attributes are sent.
391
-
392
- If your model's computed attribute is calculated via a function we can use a converter for the binding.
393
- In the example below, we have a simple computed attribute named hoursLeft calculated by the function calculateHoursLeft().
394
-
395
- ````
396
- SomeModel = Backbone.Model.extend({
397
- defaults: {currentHours: 3, totalHours: 8},
398
-
399
- calculateHoursLeft: function(){
400
- return this.get('totalHours') - this.get('currentHours');
401
- }
402
- })
403
-
404
- // Here is how how we could create a binding for a calculated attribute
405
- var bindings = {currentHours: {selector: '[name=hoursLeft]', converter: this.model.calculateHoursLeft}};
406
- modelBinder.bind(this.model, this.el, bindings);
407
- ````
408
-
409
- In the example above, we are binding to the model's attribute 'currentHours' because when currentHours changes the hoursLeft calculated value will change - the converter will be invoked at that time.
410
- The converter is simply the model's calculateHoursLeft() function. The function just ignores the parameters passed to it and calculates the hours left.
411
-
412
- <br>
413
- If the currentHours attribute is also bound to another html element you could specify an array of element bindings in the binding definition like the example shown below.
414
-
415
- ````
416
- var bindings = {currentHours: [ {selector: '[name=hoursLeft]', converter: this.model.calculateHoursLeft},
417
- {selector: '[name=currentHours]']};
418
- modelBinder.bind(this.model, this.el, bindings);
419
- ````
420
-
421
- If converters need any other special logic they can be defined in another function outside of the Model because the converter function is passed the Model as a parameter.
422
-
423
-
424
-
425
- <br>
426
-
427
- ***
428
-
429
- ##Binding to html element attributes##
430
-
431
- You can also define bindings to be bound to any html element's attribute like enabled, class, style or any other attribute you define.
432
- The example below shows how to use the `elAttribute` option. In this example, the address element will be enabled depending on what the Model.isAddressEnabled attribute is.
433
-
434
- ````
435
- var bindings = {isAddressEnabled: {selector: '[name=address]', elAttribute: 'enabled'}};
436
- modelBinder.bind(this.model, this.el, bindings);
437
- ````
438
-
439
- <br>
440
- You could also extend the example above to be a bit more complicated. Let's pretend the Model has an attribute called customerType and if customerType == 'residential' we want the address to enabled, otherwise we want it disabled. We can handle this type of binding by leveraging both `converter` and `elAttribute`. The example below shows how this would work. When the Model.customerType is updated, the address input element's enabled attribute would be updated.
441
-
442
- ````
443
- var addressEnabledConverter = function(direction, value) { return value === 'residential'; };
444
-
445
- var bindings = {customerType: {selector: '[name=address]', elAttribute: 'enabled', converter: addressEnabledConverter}};
446
- modelBinder.bind(this.model, this.el, bindings);
447
- ````
448
-
449
- <br>
450
- You could also bind to an element's class property as shown in the example below.
451
-
452
- ````
453
- <!-- The html -->
454
- <div id="patientPic" class="patientPic"></div>
455
- ````
456
-
457
- ````
458
- <!-- The javascript -->
459
- var bindings = {gender: {selector: '#patientPicture', elAttribute: 'class'}};
460
- modelBinder.bind(this.model, this.el, bindings);
461
- ````
462
-
463
- In this example, the model.gender value is either "M" or "F". The CSS files define styles for "patientPic" with either "M" or "F" to show the correct type of avatar.
464
-
465
-
466
- <br>
467
-
468
- ***
469
-
470
- ##Proper scope helps you bind to complex nested views##
471
-
472
- Sometimes you'll have nested models displayed in nested views.
473
- An example of a nested backbone model is shown below. The personModel has a nested homeAddressModel.
474
-
475
- ````
476
- var personModel = new Backbone.Model({firstName: 'Herman', lastName: 'Munster'});
477
- var homeAddressModel = new Backbone.Model({street: '1313 Mockingbird Lane', city: 'Mockingbird Heights'});
478
-
479
- personModel.set({homeAddress: homeAddressModel});
480
- ````
481
-
482
- In the example above, the nested model is also a backbone.Model but sometimes your nested models are raw javascript objects. I'll talk about that situation a bit later.
483
-
484
- You can bind to this type of nested backbone model fairly easily with the ModelBinder.
485
-
486
- There are 2 basic ways to bind nested Models in a View:
487
-
488
- 1. With a scoped `rootEl` that only contains html elements specific to the nested Model.
489
- 2. With scoped bindings selectors in the bindings hash.
490
-
491
- <br>
492
- ##Nested View option 1: A scoped `rootEl`##
493
-
494
- If your nested view can be defined under a single parent element such as a `<div>` you can pass that parent element as the `rootEl` for your nested ModelBinder as shown in the example below.
495
- It refers to the personModel and homeAddressModels defined in a previous code snippet.
496
-
497
- ````
498
- <!-- html -->
499
- <div id="personFields">
500
- <input type="text" name="firstName"/>
501
- <input type="text" name="lastName"/>
502
- </div>
503
- <div id="homeAddressFields">
504
- <input type="text" name="street"/>
505
- <input type="text" name="city"/>
506
- </div>
507
- ````
508
-
509
- ````
510
- <!-- javascript -->
511
- personBinder.bind(this.personModel, this.$('#personFields'));
512
- addressBinder.bind(this.personModel.get('homeAddress'), this.$('#homeAddressFields'));
513
- ````
514
-
515
- In the example above, the nested homeAddressModel is bound to the correct fields because they are scoped by a single parent element.
516
- The personModel bindings also needed to be separately scoped as well.
517
-
518
- If the personModel fields were defined on a level that also included the homeAddressFields then the homeAddressFields would have appeared in the personModel.
519
- The next option shows how to avoid that situation.
520
-
521
- <br>
522
- ##Nested View option 2: scoped bindings##
523
-
524
- If your parent and nested Model html elements cannot live under their own parent elements then you'll need to define the `bindings` with jQuery selectors that are properly scoped as shown in the example below.
525
-
526
- ````
527
- <!-- Html -->
528
- <input type="text" name="firstName"/>
529
- <input type="text" name="lastName"/>
530
- <input type="text" name="street"/>
531
- <input type="text" name="city"/>
532
- ````
533
-
534
- ````
535
- <!-- javascript -->
536
- var personBindings = {firstName: '[name=firstName]', lastName: '[name=lastName]'};
537
- personBinder.bind(this.personModel, this.el, personBindings);
538
-
539
- var addressBindings = {street: '[name=street]', city: '[name=city]'};
540
- addressBinder.bind(this.personModel.get('homeAddress'), this.el, addressBindings);
541
- ````
542
-
543
-
544
- <br>
545
-
546
- ***
547
-
548
- ##The ModelBinder can be a partial solution##
549
-
550
- In some situations, you might have very complex views where you only want some of your view's elements bound by the ModelBinder.
551
- To limit the scope of which fields are bound, you just need to properly scope your bindings hash.
552
-
553
- In the example below, the modelBinder will ignore the "phone" and "fax" elements.
554
-
555
- ````
556
- <!-- Html -->
557
- <input type="text" name="firstName"/>
558
- <input type="text" name="lastName"/>
559
- <input type="text" name="phone"/>
560
- <input type="text" name="fax"/>
561
- ````
562
-
563
- ````
564
- <!-- javascript -->
565
- var personBindings = {firstName: '[name=firstName]', lastName: '[name=lastName]'};
566
- modelBinder.bind(this.personModel, this.el, personBindings);
567
- ````
568
-
569
-
570
- <br>
571
-
572
- ***
573
-
574
- ##Quickly create and modify bindings##
575
-
576
- In some situations, you might have a large amount of elements that need to be bound but only a few of them need a converter or elAttribute defined.
577
- You probably don't want to define all of the element bindings manually just to add a converter to a few of them.
578
- The utility function Backbone.ModelBinder.createDefaultBindings can help you in this situation.
579
-
580
- The Backbone.ModelBinder.createDefaultBindings( ) is shown below.
581
-
582
- ````
583
- // A static helper function to create a default set of bindings that you can customize before calling the bind() function
584
- // rootEl - where to find all of the bound elements
585
- // attributeType - probably 'name' or 'id' in most cases
586
- // converter(optional) - the default converter you want applied to all your bindings
587
- // elAttribute(optional) - the default elAttribute you want applied to all your bindings
588
- Backbone.ModelBinder.createDefaultBindings = function(rootEl, attributeType, converter, elAttribute){
589
- ...
590
- }
591
- ````
592
-
593
- You can use this function to gather all of the elements under the rootEl with a "name" or "id" attribute and quickly create all of the bindings and then modify those bindings.
594
- You might want to delete one or more of the bindings, add converters or elAttributes to bindings etc.
595
- Be careful when you use this with radio buttons - you might not get the proper selectors if you're not careful.
596
-
597
- An example of how you might use createDefaultBindings( ) is shown below.
598
-
599
- ````
600
- // The view has several form element with a name attribute that should be bound
601
- // but one binding requires a converter and one of the bindings should be removed
602
- var bindings = Backbone.ModelBinder.createDefaultBindings(this.el, 'name');
603
- bindings['phone'].converter = this._phoneConverterFunction;
604
- delete bindings['complicatedAttribute'];
605
-
606
- this._modelBinder.bind(this.model, this.el, bindings);
607
- ````
608
-
609
- ###Change attribute used for binding###
610
-
611
- By default, the `name` attribute of your elements is used to create bindings. Changing this can be accomplished easily in one of two ways. First, by using `createDefaultBindings`:
612
-
613
- ````
614
- var bindings = Backbone.ModelBinder.createDefaultBindings(this.el, 'data-custom');
615
- this._modelBinder.bind(this.model, this.el, bindings);
616
- ````
617
-
618
- Alternatively, setting `boundAttribute` on the options hash given to bind can point it at any attribute.
619
-
620
- ````
621
- // Set the default bindings based on the data-custom attribute rather than name.
622
- this._modelBinder.bind(this.model, this.el, null, { boundAttribute: 'data-custom' });
623
- ````
624
-
625
- <br>
626
-
627
- ***
628
-
629
- <br>
630
-
631
- ## The Power of jQuery ##
632
- Your jQuery selectors can be based off of a class attribute or anything else you'd like as shown in the example below.
633
-
634
- ````
635
- <!-- html -->
636
- <input type="text" class="partOne" name="address"/>
637
- <input type="text" class="partOne" name="phone"/>
638
- <input type="text" class="partOne" name="fax"/>
639
- ````
640
-
641
- ````
642
- <!-- javascript -->
643
- SomeView = Backbone.View.extend({
644
- render: function(){
645
- $(this.el).html(this.template({model: this.model.toJSON()}));
646
-
647
- var bindingsHash = {isPartOneEnabled: {selector: '[class~=partOne]', elAttribute: 'enabled'}};
648
-
649
- this.modelBinder.bind(this.model, this.el, bindingsHash);
650
- }
651
- ````
652
-
653
- In this example, all 3 html elements enabled attribute are bound to the Model's isPartOneEnabled attribute.
654
- This is because the jQuery selector '[class~=partOne]' returned all 3 elements.
655
-
656
-
657
- <br>
658
-
659
- ***
660
-
661
- ## Calling bind() multiple times ##
662
-
663
- Calling ModelBinder.bind() will automatically internally call the unbind() function to unbind the previous model.
664
- You can reuse the same ModelBinder instance with multiple models or even rootEls - just be aware that all previous bindings will be removed.
665
-
666
- <br>
667
- ## Model values are copied to views when bind() is called ##
668
-
669
- The model's attributes are bound are copied from the model to bound elements when the bind() function is called.
670
- View element default values are not copied to the model when bind() is called. That type of behavior usually belongs in the Backbone.Model defaults block.
671
-
672
- If you do need to have values copied from the view to the model when bind() is called I would first question why.
673
- In most situations, especially for single page web apps, it's almost always better to let your models drive the behavior of the app instead of the views.
674
- If you need this behavior, you can use the 4th optional parameter to the bind() function. {initialCopyDirection: Backbone.ModelBinder.Constants.ViewToModel}
675
- You can also specify this behavior as the default for all ModelBinder's by calling Backbone.ModelBinder.SetOptions({initialCopyDirection: Backbone.ModelBinder.Constants.ViewToModel});
676
-
677
- You can also directly invoke the function modelBinder.copyViewValuesToModel() at any time to copy values from the view into the model. In most cases, this is not necessary.
678
-
679
- When you copy explicitly from the view to the model on bind() or via copyViewValuesToModel() text values and checkboxes will be inserted into the model as blank strings or false if the values have not been set.
680
-
681
-
682
- <br>
683
- ## Cleaning up with unbind() ##
684
-
685
- When your views are closed you should always call the unbind() function. The unbind() function will un-register from the model's change events and the view's jQuery change delegate.
686
-
687
- If you don't call unbind() you might end up with zombie views and ModelBinders. This is particularly important for large client side applications that are not frequently refreshed.
688
-
689
-
690
-
691
- <br>
692
- ## The '.' syntax for nested models ##
693
-
694
- The ModelBinder doesn't directly support '.' to reference nested Models when binding.
695
- If you have a Backbone.Model implementation that is able to support the '.' syntax for nested models you'll be able to use the ModelBinder.
696
-
697
- I've done a bit of testing with the [backbone-deep-model](https://github.com/powmedia/backbone-deep-model) and it seems to work well with the ModelBinder.
698
- [Here](https://github.com/theironcook/Backbone.ModelBinder/blob/master/sandbox/Example_NestedAttributes.html) is a simple example showing how to use backbone-deep-model with the ModelBinder.
699
-
700
- The nested models are just plain javascript objects with the deep-model plugin. If your nested objects are Backbone.Models you'll need something similar to the deep-model plugin.
701
-
702
- <br>
703
- The [backbone-nested](https://github.com/afeld/backbone-nested) project also seems to work with the ModelBinder.
704
-
705
-
706
- ***
707
-
708
- <br>
709
- ## AMD / Require.js support
710
-
711
- AMD / Require.js support was added in version 0.1.4
712
-
713
-
714
- ***
715
-
716
- <br>
717
- ### Binding to Collections
718
- I've also created a collection binder that automatically creates/removes views when models are added/removed to a collection.
719
- It can be used with the ModelBinder. The collection binder has saved me just as much time as the model binder. It's a very handy utility.
720
-
721
- You can read about it [here](https://github.com/theironcook/Backbone.ModelBinder/wiki/A-new-Class-to-Bind-Backbone-Collections-to-Views:-Javascript-Weekly-May-18th)
722
-
723
- <br><br>
724
-
725
- ## Examples
726
- Some JSFiddle examples can be found [here](https://github.com/theironcook/Backbone.ModelBinder/wiki/Interactive-JSFiddle-Examples).
727
- <br>The same examples are also under the (examples)[https://github.com/theironcook/Backbone.ModelBinder/tree/master/examples] directory.
728
-
729
-
730
- <br><br>
731
-
732
- ## Configuration Options
733
- * initialCopyDirection
734
- * changeTriggers
735
- * modelSetOptions
736
- * suppressThrows
737
- * boundAttribute
738
- * converter
739
-
740
- Configuration options can either be set for all ModelBinder instances via Backbone.ModelBinder.SetOptions() or for individual ModelBinder instances via the 4th parameter to the bind() function.
741
- Values set at the instance level will eclipse / override values that are set with the SetOptions() function.
742
-
743
- * initialCopyDirection - can either be Backbone.ModelBinder.Constants.ModelToView or Backbone.ModelBinder.Constants.ViewToModel. This property is dicussed in a previous section
744
-
745
- * changeTriggers - an object where the keys are jQuery selectors and the values are jQuery events. These are the events that trigger when values are copied from the view into the model.
746
- The default for change triggers is added below. You can define your own if needed.
747
-
748
- ````
749
- {'': 'change', '[contenteditable]': 'blur'}
750
- ````
751
-
752
- * modelSetOptions - this is an option that you might want sent by default to the Model.set function.
753
- Whenever a bound element changes, it will call the Model.set function as pass the modelSetOptions as the options to the set() function.
754
- If you wanted to turn on backbone model validation for your entire project you might do something like this.
755
-
756
- ````
757
- Backbone.ModelBinder.SetOptions({modelSetOptions: {validate: true}});
758
- ````
759
-
760
- The ModelBinder injects this value into the set options for every set() function.
761
- changeSource = 'ModelBinder'
762
- This allows custom logic to determine if the source of the model attribute change is from the ModelBinder.
763
-
764
- * suppressThrows - set to true if you don't want the ModelBinder to throw exceptions but instead it will show errors via the console.error
765
-
766
- * boundAttribute - change the default attribute used to create bindings. Default value is "name," but can be set to any valid attribute selector that fits the form `$('[' + boundAttribute + ']')`.
767
-
768
- * converter - a default converter for all binders or a single binder. Probably only really useful for when you want view empty strings to map to nulls or undefined. The default is empty string.
769
- If you define a converter, you might want to pay attention to the converter's 5th parameter of bound els. You might want to only convert values for specific element types.
770
-
771
- <br>
772
- <br>
773
-
774
- ## Release Notes / Versions
775
- ### v 1.1.0 June 1, 2015
776
- * Fixed createEl code not to require that Backbone.View#render returns this
777
- * Don't sort elements on add event (only do so on sort)
778
- * Fixed package.json to make NPM publishing possible (fixes #195)
779
- * Use jQuery .on instead of .delegate for event binding (to move off of deprecated .delegate function)
780
- * Use .prop("checked") instead of .attr("checked") (fixes #199)
781
- * Fixed autoSort behavior to actually work when the collection changes
782
-
783
- ### v 1.0.6 November 5, 2014
784
- * Made the CollectionBinder loadable via AMD
785
-
786
- ### v 1.0.5 September 30, 2013
787
- * Fixed issue 164 - Works with jQuery.noConflict
788
- * Added the ability to set static and instance options for the CollectionBinder. As of now, there is only one option: 'autoSort'. You can set the option globally via Backbone.CollectionBinder.SetOptions.
789
- * Added the ability to use template functions with the CollectionBinder.ElManagerFactory. Normally, I wouldn't use the ElManagerFactory except for very simple situations - especially because the content of the data isn't updated.
790
- If you would like to use this option, simply pass a compiled _.template instead of html to the ElManagerFactory constructor. Internally the ElManagerFactory will call the template and pass {model: this._model.toJSON()} to the template function.
791
- * Fix for issue 162. Undid fix for 133. Unnecessary Model.set calls for checkboxes and radio buttons.
792
-
793
- ### v 1.0.4 August 19, 2013
794
- * Fixed the _.bindAll function calls to specify the function names being bound to.
795
- * Added the ability to add a global converter via Backbone.ModelBinder.SetOptions({converter: xxx});
796
-
797
- ### v 1.0.2 April 18, 2013
798
- * Fixed the _unbindViewToModel to use the changeTrigger options
799
- * Fixed the default jQuery selector for all elements to be '*' instead of ''. The undelegate events no longer works in jQuery 1.8.3 with the ''
800
-
801
- ### v 1.0.1 April 15, 2013
802
- * Added suppressThrows configuration option
803
-
804
- ### v 1.0.0 April 11, 2013
805
- * Updated to use backbone v1.0.0, underscore v1.4.4 and jQuery v1.8.3
806
- * Pull requests 96, 67, 85, 80, 78, 67, 66
807
- * Options are now configurable at the ModelBinder class level via Backbone.ModelBinder.SetOptions() or at the instance level via the bind() 4th parameter
808
- * ModelSetOptions have now been incorporated to the generic options argument at the class or instance level.
809
- For example: to set model options globally for all binders Backbone.ModelBinder.SetOptions({modelSetOptions: {validate: true}});
810
- or for a single instance modelBinder.bind(this.model, this.el, bindings, {modelSetOptions: {validate: true}});
811
- For single instance options, the bindings can be a fully configured set of bindings or the value of null if you want the default bindings.
812
- * bindCustomTriggers() has now been incorporated to the generic options argument at the class or instance level.
813
- For example: to set custom triggers options globally for all binders Backbone.ModelBinder.SetOptions({changeTriggers: {'': 'change keyup'}});
814
- or for a single instance modelBinder.bind(this.model, this.el, {changeTriggers: {'': 'change keyup'}});
815
- * Added the els parameter to the converter functions
816
- * Added the changeTriggers to customize which view events trigger the model binder copies values from the view to the model
817
- * Added the modelSetOptions to allow the ModelBinder to send messages to the Model.set function and corresponding callbacks
818
-
819
-
820
- ### v 0.1.6 August 27, 2012
821
-
822
- * Bugfix for issue 51
823
-
824
-
825
- ### v 0.1.5 June 20, 2012
826
-
827
- * Upgraded model binder to allow single DOM element to be bound to multiple model attributes
828
- * Exposed the model binder copyModelAttributesToView to be public and take an optional array of attribute names to copy
829
-
830
- ### v 0.1.4 May 11, 2012
831
-
832
- * AMD / Require.js support added
833
- * Initial version of the CollectionViewBinder added
834
-
835
- ### v 0.1.3 May 9, 2012
836
-
837
- * Started properly tagging my versions :)
838
-
839
- ### v 0.1.2
840
-
841
- * Added the {source: 'ModelBinder'} option to the model.set call - allows you to know the source of a model's change event
842
- * Bug fix - when binding the elAttribute to class I wasn't going through the converter function
843
-
844
- ### v 0.1.1
845
-
846
- * An empty selector string will now bind to the rootEl
847
- * Removed elementBinding.isSetting guard which was unnecessary and short circuited updating multiple bound elements with the same name
848
-
849
- ### v 0.1.0
850
-
851
- * Initial version starting April 16th. Future api changes will have updated version numbers.
852
-
853
-
854
-
855
- # Legal Info (MIT License)
856
-
857
- Copyright (c) 2012 Bart Wood
858
-
859
- Permission is hereby granted, free of charge, to any person obtaining a copy
860
- of this software and associated documentation files (the "Software"), to deal
861
- in the Software without restriction, including without limitation the rights
862
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
863
- copies of the Software, and to permit persons to whom the Software is
864
- furnished to do so, subject to the following conditions:
865
-
866
- The above copyright notice and this permission notice shall be included in
867
- all copies or substantial portions of the Software.
868
-
869
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
870
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
871
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
872
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
873
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
874
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
875
- THE SOFTWARE.
1
+ Special thanks to [Derick Bailey](http://lostechies.com/derickbailey) for creating predecessor to this plugin.
2
+ I've been able to reuse unit tests he created for his [Backbone.ModelBinding](https://github.com/derickbailey/backbone.modelbinding) plugin.
3
+
4
+
5
+ ### Rationale
6
+ Backbone is a great platform for writing client side applications but I've found that as views grow in complexity, synchronizing my models and views can be a pain.
7
+ I've spent the past few months trying to use existing view-model binding libraries that others were kind enough to create and share with the world.
8
+ Unfortunately in the majority of my backbone application I wasn't able to leverage the existing view-model binding libraries due to various limitations.
9
+
10
+ I created a new `Backbone.ModelBinder` class that I have leveraged in the majority of a large client side application.
11
+ The ModelBinder class helped me remove a lot of cluttered boilerplate code that existed to synchronize my models and views.
12
+ As my application became more asynchronous, the ModelBinder saves me from a lot of pain by automatically displaying model attributes in the view as they are asynchronously loaded.
13
+ Hopefully you'll find the ModelBinder useful too.
14
+
15
+ The `Backbone.ModelBinder` class:
16
+
17
+ * Is as simple as possible yet still flexible and powerful
18
+ * Leverages the exact same jQuery syntax that the Backbone.View event blocks use
19
+ * Allows you to define type formatting and type conversion in your bindings
20
+ * Provides a simple javascript only solution rather than mixing binding syntax in html templates and javascript files. I personally find mixing binding logic in my html files to be messy and confusing.
21
+
22
+ <br>
23
+ You can use this ModelBinder class to bind backbone model attributes to:
24
+
25
+ * Read-only html elements such as `<span>`, `<div>` etc.
26
+ * Html element attributes such as enabled, displayed, style etc.
27
+ * Editable form elements such as `<input>`, `<textarea>` etc. This type of binding is bidirectional between the html elements and the Model's attributes.
28
+
29
+ <br>
30
+ ###The ModelBinder is more efficient###
31
+ It seems like many of the backbone view examples I've seen register for the model's change event and then re-render the entire view like the example shown below.
32
+
33
+ ````
34
+ SomeView = Backbone.View.extend({
35
+ initialize: function(){
36
+ this.model.on('change', this.render, this);
37
+ },
38
+
39
+ render: function() {
40
+ this.$el.html(this.template(this.model.toJSON()));
41
+ return this;
42
+ }
43
+ });
44
+ ````
45
+ If the model changes frequently the above type of code will be wasteful because so many DOM elements are just thrown away. Converting the model to json is also an unnecessary conversion.
46
+
47
+ The ModelBinder eliminates these ineffeciencies by listening for model changes like the above code. But it doesn't recreate the entire set of DOM elements. Instead, it will change the content of existing DOM elements.
48
+
49
+
50
+ <br>
51
+ ## Prerequisites
52
+
53
+ * Backbone.js v1.0.0 or higher
54
+ * Underscore.js v1.4.4 or higher
55
+ * jQuery v1.8.3 or higher
56
+
57
+
58
+ <br>
59
+ ### Availability
60
+ You can download the zip/tarball as normal and include it with your other JS assets, but you can now alternatively link to it on [CDNJS](http://www.cdnjs.com/), the free to use, community maintained CDN.
61
+
62
+ To do this, just drop a reference to the minified version of the plugin into your document's `<head>` as follows, replacing the version number with whatever the latest one is:
63
+ ````
64
+ <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/backbone.modelbinder/1.0.4/Backbone.ModelBinder.min.js"></script>
65
+ ````
66
+
67
+
68
+ <br>
69
+ ##Defining Binding Scope with jQuery##
70
+
71
+ One of the most powerful capabilities of the ModelBinder class is that it allows you to define scope when you create your bindings using jQuery.
72
+
73
+ * If your views are simple (no nested Views etc.) you can rely on default scoping rules that are based off of the html `name` attribute.
74
+ * If your views are more complex you can explicitly define scoping rules with jQuery selectors. Scoping will allow you to handle nested views or have the ModelBinder only manage parts of your Views and your own custom code can handle the more complicated problems.
75
+
76
+ Both scoping mechanisms will be discussed throughout the rest of this document.
77
+
78
+ ***
79
+
80
+ ##Basic ModelBinder functionality##
81
+
82
+ The `ModelBinder` class contains all of the logic to facilitate bi-directional view-model binding.
83
+
84
+ The ModelBinder class exposes 3 public functions shown below:
85
+
86
+ ```javascript
87
+ // no arguments passed to the constructor
88
+ constructor();
89
+
90
+ // model is required, it is the backbone Model you're binding to
91
+ // rootEl is required, is the root html element containing the elements you want to bind to
92
+ // bindings is optional, it's discussed a bit later
93
+ // options, discussed at the bottom of the document
94
+ bind(model, rootEl, bindings, options);
95
+
96
+ // unbinds the Model with the elements found under rootEl - defined when calling bind()
97
+ unbind();
98
+ ```
99
+
100
+ <br>
101
+ The `bind()` function's 3rd argument `bindings` is optional. The `bindings` arg is useful for defining binding scope and formatting and will be discussed later.
102
+ If `bindings` is not defined, then `bind()` will locate all of the child elements under the rootEl that define a `name` attribute.
103
+ Each of the elements with a `name` attribute will be bound to the model's attributes - the value of the element's name attribute will be used as the model's attribute name.
104
+
105
+ In the example below, the model's address attribute will be bound to the input text field with the name of 'address'. This binding is bi-directional between the view and the model.
106
+
107
+ ````
108
+ <!-- The html -->
109
+ <input type="text" name="address"/>
110
+ ````
111
+
112
+ ````
113
+ <!-- The javascript -->
114
+ SomeView = Backbone.View.extend({
115
+ render: function(){
116
+ this.modelBinder.bind(this.model, this.el);
117
+ }
118
+ });
119
+ ````
120
+
121
+ <br>
122
+ ## Binding after elements created, rootEl ##
123
+
124
+ The bind() functions `rootEl` parameter should contain all of the elements that you want to bind to.
125
+ Your rootEl might be the view.el property or it could be any valid html element. It does not matter if the rootEl is displayed in a browser.
126
+
127
+ The example below shows how the rootEl argument is the result of the jQuery selection "#outerDiv". This will work just like the previous example.
128
+
129
+ ````
130
+ <!-- The html -->
131
+ <div id="outerDiv">
132
+ <input type="text" name="address"/>
133
+ </div>
134
+ ````
135
+
136
+ ````
137
+ <!-- The javascript -->
138
+ SomeView = Backbone.View.extend({
139
+ render: function(){
140
+ this.modelBinder.bind(this.model, this.$('#outerDiv'));
141
+ }
142
+ });
143
+ ````
144
+
145
+ <br>
146
+ ## Elements are recursively bound ##
147
+
148
+ If you do not pass the `bindings` 3rd parameter to the bind() function, <b>all</b> child elements under the rootEl with a "name" attribute are bound.
149
+ This includes any nested child elements that define the "name" attribute.
150
+
151
+ In the example below, the "address" and the "city" elements will be bound to the model.
152
+
153
+ ````
154
+ <!-- The html -->
155
+ <div id="outerDiv">
156
+ <input type="text" name="address"/>
157
+ <div id="divTwo">
158
+ <input type="text" name="city"/>
159
+ </div>
160
+ </div>
161
+ ````
162
+
163
+ ````
164
+ <!-- The javascript -->
165
+ SomeView = Backbone.View.extend({
166
+ render: function(){
167
+ this.modelBinder.bind(this.model, this.el);
168
+ }
169
+ });
170
+ ````
171
+
172
+
173
+ <br>
174
+ ## Binding multiple html elements to the same model attribute ##
175
+
176
+ In the example below, the `<span>` and the `<input>` elements are both bound to the model.firstName attribute.
177
+ If you modified the firstName input element you would see the span automatically updated because the Model would have been updated.
178
+
179
+ ````
180
+ <!-- The html -->
181
+ Welcome, <span name="firstName"></span>
182
+
183
+ Edit your information:
184
+ <input type="text" name="firstName"/>
185
+ ````
186
+
187
+ ````
188
+ <!-- The javascript -->
189
+ SomeView = Backbone.View.extend({
190
+ render: function(){
191
+ this.modelBinder.bind(this.model, this.el);
192
+ }
193
+ });
194
+ ````
195
+
196
+ <br>
197
+ If your View element definitions are simple you can rely on having properly defined "name" attributes in your html elements that match your Model attribute names.
198
+ Remember that **all** of the rootEl's child elements (recursive) with a "name" attribute will be bound to your Model.
199
+
200
+ If your views require formatting, conversion or more scoping due to nested or complex views you'll need to define a `bindings` parameter to the `bind()` function as discussed in the next section.
201
+
202
+
203
+ ***
204
+
205
+ ##The bindings parameter to the bind() function##
206
+
207
+ For more complicated things like formatting or defining scope for composite or nested Views you'll need to define a `bindings` parameter - the optional 3rd parameter to the `bind()` function.
208
+ The bindings parameter is a javascript hash object.
209
+
210
+ The bindings hash keys are the model's attribute names and the values, in the simplest case, are jQuery selectors that must return at least 1 html element.
211
+
212
+ The example below binds model.address to the element with the id="address":
213
+
214
+ ````
215
+ <input type='text' id='address'/>
216
+
217
+ var bindings = {address: '#address'};
218
+ modelBinder.bind(this.model, this.el, bindings);
219
+ ````
220
+
221
+ The example below binds model.homeAddress to the element with name="homeAddress" and model.workAddress to the element with name="workAddress":
222
+
223
+ ````
224
+ <input type="text" name="homeAddress"/>
225
+ <input type="text" name="workAddress "/>
226
+
227
+ var bindings = {homeAddress: '[name=homeAddress]', workAddress : '[name=workAddress ]'};
228
+ modelBinder.bind(this.model, this.el, bindings);
229
+ ````
230
+
231
+ The example below binds model.city to `<input type="text" id="city"/>`:
232
+
233
+ ````
234
+ var bindings = {city: '#city'};
235
+ modelBinder.bind(this.model, this.el, bindings);
236
+ ````
237
+
238
+ You can use any jQuery selector that you like, as long as the selector returns at least a single element.
239
+ In the example below, both the `<span>` and the `<input>` elements are bound to the model.firstName attribute.
240
+ In this situation, you could also eliminate the bindings and get the same behavior.
241
+
242
+ ````
243
+ <!-- The html -->
244
+ Welcome, <span name="firstName"></span>
245
+
246
+ Edit your information:
247
+ <input type="text" name="firstName"/>
248
+ ````
249
+
250
+ ````
251
+ <!-- The javascript -->
252
+ var bindings = {firstName: '[name=firstName]'};
253
+ modelBinder.bind(this.model, this.el, bindings);
254
+ ````
255
+
256
+ <br>
257
+ Here are a few more examples of the bindings hash syntax.
258
+
259
+ ````
260
+ Html bindings entry
261
+ -----------------------------------------------------------------------------------------------
262
+ <input type="text" id="firstName"/> firstName: '#firstName'
263
+
264
+ <input type="text" name="firstName"/> firstName: '[name=firstName]'
265
+
266
+ <select name="operatorSelectEl"> operator: '[name=operatorSelectEl]'
267
+ <option value="1">Dan</option>
268
+ <option value="2">Eli</option>
269
+ <option value="3">Frank</option>
270
+ </select>
271
+
272
+ <input type="radio" name="isOk" value="yes"> isOk: '[name=isOk]'
273
+
274
+ <input type="text" class="myTestClass" myTestAttribute: '[class~=myTestClass]'
275
+ name="address"/>
276
+ ````
277
+
278
+ <br>
279
+ ## You can define multiple jQuery selectors ##
280
+
281
+ The binding entries can be defined as strings as shown in all previous examples but internally the string is converted to the type of entry shown below.
282
+
283
+ ````
284
+ firstName: {selector: '#firstName'}
285
+ ````
286
+
287
+ The jQuery string is a hash parameter named `selector`.
288
+ You can define arrays of `selector` arguments in your bindings as shown in the example below.
289
+
290
+ ````
291
+ firstName: [{selector: '#firstName'}, {selector: '#title'}]
292
+ ````
293
+
294
+ In the example above, model.firstName is bound to an element with the id of "firstName" and an element with the id of "title".
295
+ To define multiple selectors, just define them as an array.
296
+
297
+ The jQuery bindings leverage the jQuery delegate mechanism - which means they should be fairly efficient.
298
+
299
+ ##Binding to the Root Element##
300
+
301
+ Sometimes, in rare cases, your views are so simple that you just want to bind
302
+ to the root element itself. For example, if your view is an `<li>` tag, it
303
+ makes sense to have the inner HTML simply be the appropriate model value.
304
+
305
+ In those cases, simply use an empty string as your selector:
306
+
307
+ ````
308
+ firstName: { selector: '' }
309
+ ````
310
+
311
+ <br>
312
+ ***
313
+
314
+ ##Formatting and converting values##
315
+
316
+ The bindings can also define a `converter` parameter.
317
+ A converter is simply a function that is called whenever a model's attribute is copied to an html element or when an html elements value is copied into a model's attribute.
318
+
319
+ Converters help you format values in your views but help keep them clean in your models.
320
+
321
+ A simple of example of using a converter to format a phone number is shown below.
322
+
323
+ ````
324
+ var phoneConverter = function(direction, value){
325
+ // direction is either ModelToView or ViewToModel
326
+ // Return either a formatted value for the view or an un-formatted value for the model
327
+ };
328
+
329
+ var bindings = {phoneNumber: {selector: '[name=phoneNumber]', converter: phoneConverter}}
330
+ modelBinder.bind(this.model, this.el, bindings );
331
+ ````
332
+
333
+ <br>
334
+ A converter function is passed 4 parameters.
335
+
336
+ * direction - either ModelToView or ViewToModel
337
+ * value - the model's attribute value or the view element's value
338
+ * attribute Name
339
+ * model - this is more useful when you're dealing with calculated attributes
340
+ * els - an array of the els that were bound to the converter
341
+
342
+ If your binding to a read-only element like a `<div>` you'll just ignore the direction parameter - it's always ModelToView.
343
+ In most cases, you'll be able to ignore the attribute name and model parameters but they can be helpful in some situations discussed later.
344
+
345
+ The Model parameter can be quite helpful in complicated situations.
346
+ The els array allows a developer to manually modify the els directly when a converter is invoked.
347
+ Be very careful when accessing the els directly because any state you set into the els might be overwritten by the ModelBinder after the converter is finished.
348
+ For example, if a converter is called with the direction 'ModelToView' and inside the converter the code updates the el values directly those values will be overwritten with the value returned from the converter function.
349
+ The els array is more valuable if you need to set other properties etc. on the els. In most situations you should not need the els parameter.
350
+
351
+
352
+ <br>
353
+ Converters can be used for simple formatting operations like phone numbers but they can also be used for more advanced situations like when you want to convert between a model and some description of the model.
354
+ You might want to display a list of models in a `<select>` element - a converter could allow you to convert between a model and a model's id making this type of binding easy to do.
355
+
356
+ The example below shows how this could work. The `CollectionConverter` shown is defined in the ModelBinder.js file.
357
+
358
+ ````
359
+ <!-- The html -->
360
+ <select name="nestedModel">
361
+ <option value="">Please Select Something</option>
362
+ <% _.each(nestedModelChoices, function (modelChoice) { %>
363
+ <option value="<%= modelChoice.id %>"><%= modelChoice.description %></option>
364
+ <% }); %>
365
+ </select>
366
+ ````
367
+
368
+ ````
369
+ <!-- The javascript -->
370
+ SomeView = Backbone.View.extend({
371
+ render: function(){
372
+ // An example of what might be passed to the template function
373
+ var nestedModelChoices = [{id: 1, description: 'This is One'}, {id: 2, description: 'This is Two'}];
374
+
375
+ $(this.el).html(this.template({nestedModelChoices: nestedModelChoices}));
376
+
377
+ var binder = new Backbone.ModelBinder();
378
+
379
+ var bindingsHash = {nestedModel: { selector: '[name=nestedModel]',
380
+ converter: new Backbone.ModelBinder.CollectionConverter(nestedModelChoices).convert} };
381
+
382
+ binder.bind(this.model, this.el, bindingsHash);
383
+ ````
384
+
385
+ <br>
386
+ ## Converters can display calculated attributes ##
387
+
388
+ Sometimes your models will have computed attributes.
389
+ You could cache computed values inside a model's attribute collection and it would be bound like any other attribute.
390
+ I favor this solution but it's not perfect because when you save models back to the server, the calculated attributes are sent.
391
+
392
+ If your model's computed attribute is calculated via a function we can use a converter for the binding.
393
+ In the example below, we have a simple computed attribute named hoursLeft calculated by the function calculateHoursLeft().
394
+
395
+ ````
396
+ SomeModel = Backbone.Model.extend({
397
+ defaults: {currentHours: 3, totalHours: 8},
398
+
399
+ calculateHoursLeft: function(){
400
+ return this.get('totalHours') - this.get('currentHours');
401
+ }
402
+ })
403
+
404
+ // Here is how how we could create a binding for a calculated attribute
405
+ var bindings = {currentHours: {selector: '[name=hoursLeft]', converter: this.model.calculateHoursLeft}};
406
+ modelBinder.bind(this.model, this.el, bindings);
407
+ ````
408
+
409
+ In the example above, we are binding to the model's attribute 'currentHours' because when currentHours changes the hoursLeft calculated value will change - the converter will be invoked at that time.
410
+ The converter is simply the model's calculateHoursLeft() function. The function just ignores the parameters passed to it and calculates the hours left.
411
+
412
+ <br>
413
+ If the currentHours attribute is also bound to another html element you could specify an array of element bindings in the binding definition like the example shown below.
414
+
415
+ ````
416
+ var bindings = {currentHours: [ {selector: '[name=hoursLeft]', converter: this.model.calculateHoursLeft},
417
+ {selector: '[name=currentHours]']};
418
+ modelBinder.bind(this.model, this.el, bindings);
419
+ ````
420
+
421
+ If converters need any other special logic they can be defined in another function outside of the Model because the converter function is passed the Model as a parameter.
422
+
423
+
424
+
425
+ <br>
426
+
427
+ ***
428
+
429
+ ##Binding to html element attributes##
430
+
431
+ You can also define bindings to be bound to any html element's attribute like enabled, class, style or any other attribute you define.
432
+ The example below shows how to use the `elAttribute` option. In this example, the address element will be enabled depending on what the Model.isAddressEnabled attribute is.
433
+
434
+ ````
435
+ var bindings = {isAddressEnabled: {selector: '[name=address]', elAttribute: 'enabled'}};
436
+ modelBinder.bind(this.model, this.el, bindings);
437
+ ````
438
+
439
+ <br>
440
+ You could also extend the example above to be a bit more complicated. Let's pretend the Model has an attribute called customerType and if customerType == 'residential' we want the address to enabled, otherwise we want it disabled. We can handle this type of binding by leveraging both `converter` and `elAttribute`. The example below shows how this would work. When the Model.customerType is updated, the address input element's enabled attribute would be updated.
441
+
442
+ ````
443
+ var addressEnabledConverter = function(direction, value) { return value === 'residential'; };
444
+
445
+ var bindings = {customerType: {selector: '[name=address]', elAttribute: 'enabled', converter: addressEnabledConverter}};
446
+ modelBinder.bind(this.model, this.el, bindings);
447
+ ````
448
+
449
+ <br>
450
+ You could also bind to an element's class property as shown in the example below.
451
+
452
+ ````
453
+ <!-- The html -->
454
+ <div id="patientPic" class="patientPic"></div>
455
+ ````
456
+
457
+ ````
458
+ <!-- The javascript -->
459
+ var bindings = {gender: {selector: '#patientPicture', elAttribute: 'class'}};
460
+ modelBinder.bind(this.model, this.el, bindings);
461
+ ````
462
+
463
+ In this example, the model.gender value is either "M" or "F". The CSS files define styles for "patientPic" with either "M" or "F" to show the correct type of avatar.
464
+
465
+
466
+ <br>
467
+
468
+ ***
469
+
470
+ ##Proper scope helps you bind to complex nested views##
471
+
472
+ Sometimes you'll have nested models displayed in nested views.
473
+ An example of a nested backbone model is shown below. The personModel has a nested homeAddressModel.
474
+
475
+ ````
476
+ var personModel = new Backbone.Model({firstName: 'Herman', lastName: 'Munster'});
477
+ var homeAddressModel = new Backbone.Model({street: '1313 Mockingbird Lane', city: 'Mockingbird Heights'});
478
+
479
+ personModel.set({homeAddress: homeAddressModel});
480
+ ````
481
+
482
+ In the example above, the nested model is also a backbone.Model but sometimes your nested models are raw javascript objects. I'll talk about that situation a bit later.
483
+
484
+ You can bind to this type of nested backbone model fairly easily with the ModelBinder.
485
+
486
+ There are 2 basic ways to bind nested Models in a View:
487
+
488
+ 1. With a scoped `rootEl` that only contains html elements specific to the nested Model.
489
+ 2. With scoped bindings selectors in the bindings hash.
490
+
491
+ <br>
492
+ ##Nested View option 1: A scoped `rootEl`##
493
+
494
+ If your nested view can be defined under a single parent element such as a `<div>` you can pass that parent element as the `rootEl` for your nested ModelBinder as shown in the example below.
495
+ It refers to the personModel and homeAddressModels defined in a previous code snippet.
496
+
497
+ ````
498
+ <!-- html -->
499
+ <div id="personFields">
500
+ <input type="text" name="firstName"/>
501
+ <input type="text" name="lastName"/>
502
+ </div>
503
+ <div id="homeAddressFields">
504
+ <input type="text" name="street"/>
505
+ <input type="text" name="city"/>
506
+ </div>
507
+ ````
508
+
509
+ ````
510
+ <!-- javascript -->
511
+ personBinder.bind(this.personModel, this.$('#personFields'));
512
+ addressBinder.bind(this.personModel.get('homeAddress'), this.$('#homeAddressFields'));
513
+ ````
514
+
515
+ In the example above, the nested homeAddressModel is bound to the correct fields because they are scoped by a single parent element.
516
+ The personModel bindings also needed to be separately scoped as well.
517
+
518
+ If the personModel fields were defined on a level that also included the homeAddressFields then the homeAddressFields would have appeared in the personModel.
519
+ The next option shows how to avoid that situation.
520
+
521
+ <br>
522
+ ##Nested View option 2: scoped bindings##
523
+
524
+ If your parent and nested Model html elements cannot live under their own parent elements then you'll need to define the `bindings` with jQuery selectors that are properly scoped as shown in the example below.
525
+
526
+ ````
527
+ <!-- Html -->
528
+ <input type="text" name="firstName"/>
529
+ <input type="text" name="lastName"/>
530
+ <input type="text" name="street"/>
531
+ <input type="text" name="city"/>
532
+ ````
533
+
534
+ ````
535
+ <!-- javascript -->
536
+ var personBindings = {firstName: '[name=firstName]', lastName: '[name=lastName]'};
537
+ personBinder.bind(this.personModel, this.el, personBindings);
538
+
539
+ var addressBindings = {street: '[name=street]', city: '[name=city]'};
540
+ addressBinder.bind(this.personModel.get('homeAddress'), this.el, addressBindings);
541
+ ````
542
+
543
+
544
+ <br>
545
+
546
+ ***
547
+
548
+ ##The ModelBinder can be a partial solution##
549
+
550
+ In some situations, you might have very complex views where you only want some of your view's elements bound by the ModelBinder.
551
+ To limit the scope of which fields are bound, you just need to properly scope your bindings hash.
552
+
553
+ In the example below, the modelBinder will ignore the "phone" and "fax" elements.
554
+
555
+ ````
556
+ <!-- Html -->
557
+ <input type="text" name="firstName"/>
558
+ <input type="text" name="lastName"/>
559
+ <input type="text" name="phone"/>
560
+ <input type="text" name="fax"/>
561
+ ````
562
+
563
+ ````
564
+ <!-- javascript -->
565
+ var personBindings = {firstName: '[name=firstName]', lastName: '[name=lastName]'};
566
+ modelBinder.bind(this.personModel, this.el, personBindings);
567
+ ````
568
+
569
+
570
+ <br>
571
+
572
+ ***
573
+
574
+ ##Quickly create and modify bindings##
575
+
576
+ In some situations, you might have a large amount of elements that need to be bound but only a few of them need a converter or elAttribute defined.
577
+ You probably don't want to define all of the element bindings manually just to add a converter to a few of them.
578
+ The utility function Backbone.ModelBinder.createDefaultBindings can help you in this situation.
579
+
580
+ The Backbone.ModelBinder.createDefaultBindings( ) is shown below.
581
+
582
+ ````
583
+ // A static helper function to create a default set of bindings that you can customize before calling the bind() function
584
+ // rootEl - where to find all of the bound elements
585
+ // attributeType - probably 'name' or 'id' in most cases
586
+ // converter(optional) - the default converter you want applied to all your bindings
587
+ // elAttribute(optional) - the default elAttribute you want applied to all your bindings
588
+ Backbone.ModelBinder.createDefaultBindings = function(rootEl, attributeType, converter, elAttribute){
589
+ ...
590
+ }
591
+ ````
592
+
593
+ You can use this function to gather all of the elements under the rootEl with a "name" or "id" attribute and quickly create all of the bindings and then modify those bindings.
594
+ You might want to delete one or more of the bindings, add converters or elAttributes to bindings etc.
595
+ Be careful when you use this with radio buttons - you might not get the proper selectors if you're not careful.
596
+
597
+ An example of how you might use createDefaultBindings( ) is shown below.
598
+
599
+ ````
600
+ // The view has several form element with a name attribute that should be bound
601
+ // but one binding requires a converter and one of the bindings should be removed
602
+ var bindings = Backbone.ModelBinder.createDefaultBindings(this.el, 'name');
603
+ bindings['phone'].converter = this._phoneConverterFunction;
604
+ delete bindings['complicatedAttribute'];
605
+
606
+ this._modelBinder.bind(this.model, this.el, bindings);
607
+ ````
608
+
609
+ ###Change attribute used for binding###
610
+
611
+ By default, the `name` attribute of your elements is used to create bindings. Changing this can be accomplished easily in one of two ways. First, by using `createDefaultBindings`:
612
+
613
+ ````
614
+ var bindings = Backbone.ModelBinder.createDefaultBindings(this.el, 'data-custom');
615
+ this._modelBinder.bind(this.model, this.el, bindings);
616
+ ````
617
+
618
+ Alternatively, setting `boundAttribute` on the options hash given to bind can point it at any attribute.
619
+
620
+ ````
621
+ // Set the default bindings based on the data-custom attribute rather than name.
622
+ this._modelBinder.bind(this.model, this.el, null, { boundAttribute: 'data-custom' });
623
+ ````
624
+
625
+ <br>
626
+
627
+ ***
628
+
629
+ <br>
630
+
631
+ ## The Power of jQuery ##
632
+ Your jQuery selectors can be based off of a class attribute or anything else you'd like as shown in the example below.
633
+
634
+ ````
635
+ <!-- html -->
636
+ <input type="text" class="partOne" name="address"/>
637
+ <input type="text" class="partOne" name="phone"/>
638
+ <input type="text" class="partOne" name="fax"/>
639
+ ````
640
+
641
+ ````
642
+ <!-- javascript -->
643
+ SomeView = Backbone.View.extend({
644
+ render: function(){
645
+ $(this.el).html(this.template({model: this.model.toJSON()}));
646
+
647
+ var bindingsHash = {isPartOneEnabled: {selector: '[class~=partOne]', elAttribute: 'enabled'}};
648
+
649
+ this.modelBinder.bind(this.model, this.el, bindingsHash);
650
+ }
651
+ ````
652
+
653
+ In this example, all 3 html elements enabled attribute are bound to the Model's isPartOneEnabled attribute.
654
+ This is because the jQuery selector '[class~=partOne]' returned all 3 elements.
655
+
656
+
657
+ <br>
658
+
659
+ ***
660
+
661
+ ## Calling bind() multiple times ##
662
+
663
+ Calling ModelBinder.bind() will automatically internally call the unbind() function to unbind the previous model.
664
+ You can reuse the same ModelBinder instance with multiple models or even rootEls - just be aware that all previous bindings will be removed.
665
+
666
+ <br>
667
+ ## Model values are copied to views when bind() is called ##
668
+
669
+ The model's attributes are bound are copied from the model to bound elements when the bind() function is called.
670
+ View element default values are not copied to the model when bind() is called. That type of behavior usually belongs in the Backbone.Model defaults block.
671
+
672
+ If you do need to have values copied from the view to the model when bind() is called I would first question why.
673
+ In most situations, especially for single page web apps, it's almost always better to let your models drive the behavior of the app instead of the views.
674
+ If you need this behavior, you can use the 4th optional parameter to the bind() function. {initialCopyDirection: Backbone.ModelBinder.Constants.ViewToModel}
675
+ You can also specify this behavior as the default for all ModelBinder's by calling Backbone.ModelBinder.SetOptions({initialCopyDirection: Backbone.ModelBinder.Constants.ViewToModel});
676
+
677
+ You can also directly invoke the function modelBinder.copyViewValuesToModel() at any time to copy values from the view into the model. In most cases, this is not necessary.
678
+
679
+ When you copy explicitly from the view to the model on bind() or via copyViewValuesToModel() text values and checkboxes will be inserted into the model as blank strings or false if the values have not been set.
680
+
681
+
682
+ <br>
683
+ ## Cleaning up with unbind() ##
684
+
685
+ When your views are closed you should always call the unbind() function. The unbind() function will un-register from the model's change events and the view's jQuery change delegate.
686
+
687
+ If you don't call unbind() you might end up with zombie views and ModelBinders. This is particularly important for large client side applications that are not frequently refreshed.
688
+
689
+
690
+
691
+ <br>
692
+ ## The '.' syntax for nested models ##
693
+
694
+ The ModelBinder doesn't directly support '.' to reference nested Models when binding.
695
+ If you have a Backbone.Model implementation that is able to support the '.' syntax for nested models you'll be able to use the ModelBinder.
696
+
697
+ I've done a bit of testing with the [backbone-deep-model](https://github.com/powmedia/backbone-deep-model) and it seems to work well with the ModelBinder.
698
+ [Here](https://github.com/theironcook/Backbone.ModelBinder/blob/master/sandbox/Example_NestedAttributes.html) is a simple example showing how to use backbone-deep-model with the ModelBinder.
699
+
700
+ The nested models are just plain javascript objects with the deep-model plugin. If your nested objects are Backbone.Models you'll need something similar to the deep-model plugin.
701
+
702
+ <br>
703
+ The [backbone-nested](https://github.com/afeld/backbone-nested) project also seems to work with the ModelBinder.
704
+
705
+
706
+ ***
707
+
708
+ <br>
709
+ ## AMD / Require.js support
710
+
711
+ AMD / Require.js support was added in version 0.1.4
712
+
713
+
714
+ ***
715
+
716
+ <br>
717
+ ### Binding to Collections
718
+ I've also created a collection binder that automatically creates/removes views when models are added/removed to a collection.
719
+ It can be used with the ModelBinder. The collection binder has saved me just as much time as the model binder. It's a very handy utility.
720
+
721
+ You can read about it [here](https://github.com/theironcook/Backbone.ModelBinder/wiki/A-new-Class-to-Bind-Backbone-Collections-to-Views:-Javascript-Weekly-May-18th)
722
+
723
+ <br><br>
724
+
725
+ ## Examples
726
+ Some JSFiddle examples can be found [here](https://github.com/theironcook/Backbone.ModelBinder/wiki/Interactive-JSFiddle-Examples).
727
+ <br>The same examples are also under the (examples)[https://github.com/theironcook/Backbone.ModelBinder/tree/master/examples] directory.
728
+
729
+
730
+ <br><br>
731
+
732
+ ## Configuration Options
733
+ * initialCopyDirection
734
+ * changeTriggers
735
+ * modelSetOptions
736
+ * suppressThrows
737
+ * boundAttribute
738
+ * converter
739
+
740
+ Configuration options can either be set for all ModelBinder instances via Backbone.ModelBinder.SetOptions() or for individual ModelBinder instances via the 4th parameter to the bind() function.
741
+ Values set at the instance level will eclipse / override values that are set with the SetOptions() function.
742
+
743
+ * initialCopyDirection - can either be Backbone.ModelBinder.Constants.ModelToView or Backbone.ModelBinder.Constants.ViewToModel. This property is dicussed in a previous section
744
+
745
+ * changeTriggers - an object where the keys are jQuery selectors and the values are jQuery events. These are the events that trigger when values are copied from the view into the model.
746
+ The default for change triggers is added below. You can define your own if needed.
747
+
748
+ ````
749
+ {'': 'change', '[contenteditable]': 'blur'}
750
+ ````
751
+
752
+ * modelSetOptions - this is an option that you might want sent by default to the Model.set function.
753
+ Whenever a bound element changes, it will call the Model.set function as pass the modelSetOptions as the options to the set() function.
754
+ If you wanted to turn on backbone model validation for your entire project you might do something like this.
755
+
756
+ ````
757
+ Backbone.ModelBinder.SetOptions({modelSetOptions: {validate: true}});
758
+ ````
759
+
760
+ The ModelBinder injects this value into the set options for every set() function.
761
+ changeSource = 'ModelBinder'
762
+ This allows custom logic to determine if the source of the model attribute change is from the ModelBinder.
763
+
764
+ * suppressThrows - set to true if you don't want the ModelBinder to throw exceptions but instead it will show errors via the console.error
765
+
766
+ * boundAttribute - change the default attribute used to create bindings. Default value is "name," but can be set to any valid attribute selector that fits the form `$('[' + boundAttribute + ']')`.
767
+
768
+ * converter - a default converter for all binders or a single binder. Probably only really useful for when you want view empty strings to map to nulls or undefined. The default is empty string.
769
+ If you define a converter, you might want to pay attention to the converter's 5th parameter of bound els. You might want to only convert values for specific element types.
770
+
771
+ <br>
772
+ <br>
773
+
774
+ ## Release Notes / Versions
775
+ ### v 1.1.0 June 1, 2015
776
+ * Fixed createEl code not to require that Backbone.View#render returns this
777
+ * Don't sort elements on add event (only do so on sort)
778
+ * Fixed package.json to make NPM publishing possible (fixes #195)
779
+ * Use jQuery .on instead of .delegate for event binding (to move off of deprecated .delegate function)
780
+ * Use .prop("checked") instead of .attr("checked") (fixes #199)
781
+ * Fixed autoSort behavior to actually work when the collection changes
782
+
783
+ ### v 1.0.6 November 5, 2014
784
+ * Made the CollectionBinder loadable via AMD
785
+
786
+ ### v 1.0.5 September 30, 2013
787
+ * Fixed issue 164 - Works with jQuery.noConflict
788
+ * Added the ability to set static and instance options for the CollectionBinder. As of now, there is only one option: 'autoSort'. You can set the option globally via Backbone.CollectionBinder.SetOptions.
789
+ * Added the ability to use template functions with the CollectionBinder.ElManagerFactory. Normally, I wouldn't use the ElManagerFactory except for very simple situations - especially because the content of the data isn't updated.
790
+ If you would like to use this option, simply pass a compiled _.template instead of html to the ElManagerFactory constructor. Internally the ElManagerFactory will call the template and pass {model: this._model.toJSON()} to the template function.
791
+ * Fix for issue 162. Undid fix for 133. Unnecessary Model.set calls for checkboxes and radio buttons.
792
+
793
+ ### v 1.0.4 August 19, 2013
794
+ * Fixed the _.bindAll function calls to specify the function names being bound to.
795
+ * Added the ability to add a global converter via Backbone.ModelBinder.SetOptions({converter: xxx});
796
+
797
+ ### v 1.0.2 April 18, 2013
798
+ * Fixed the _unbindViewToModel to use the changeTrigger options
799
+ * Fixed the default jQuery selector for all elements to be '*' instead of ''. The undelegate events no longer works in jQuery 1.8.3 with the ''
800
+
801
+ ### v 1.0.1 April 15, 2013
802
+ * Added suppressThrows configuration option
803
+
804
+ ### v 1.0.0 April 11, 2013
805
+ * Updated to use backbone v1.0.0, underscore v1.4.4 and jQuery v1.8.3
806
+ * Pull requests 96, 67, 85, 80, 78, 67, 66
807
+ * Options are now configurable at the ModelBinder class level via Backbone.ModelBinder.SetOptions() or at the instance level via the bind() 4th parameter
808
+ * ModelSetOptions have now been incorporated to the generic options argument at the class or instance level.
809
+ For example: to set model options globally for all binders Backbone.ModelBinder.SetOptions({modelSetOptions: {validate: true}});
810
+ or for a single instance modelBinder.bind(this.model, this.el, bindings, {modelSetOptions: {validate: true}});
811
+ For single instance options, the bindings can be a fully configured set of bindings or the value of null if you want the default bindings.
812
+ * bindCustomTriggers() has now been incorporated to the generic options argument at the class or instance level.
813
+ For example: to set custom triggers options globally for all binders Backbone.ModelBinder.SetOptions({changeTriggers: {'': 'change keyup'}});
814
+ or for a single instance modelBinder.bind(this.model, this.el, {changeTriggers: {'': 'change keyup'}});
815
+ * Added the els parameter to the converter functions
816
+ * Added the changeTriggers to customize which view events trigger the model binder copies values from the view to the model
817
+ * Added the modelSetOptions to allow the ModelBinder to send messages to the Model.set function and corresponding callbacks
818
+
819
+
820
+ ### v 0.1.6 August 27, 2012
821
+
822
+ * Bugfix for issue 51
823
+
824
+
825
+ ### v 0.1.5 June 20, 2012
826
+
827
+ * Upgraded model binder to allow single DOM element to be bound to multiple model attributes
828
+ * Exposed the model binder copyModelAttributesToView to be public and take an optional array of attribute names to copy
829
+
830
+ ### v 0.1.4 May 11, 2012
831
+
832
+ * AMD / Require.js support added
833
+ * Initial version of the CollectionViewBinder added
834
+
835
+ ### v 0.1.3 May 9, 2012
836
+
837
+ * Started properly tagging my versions :)
838
+
839
+ ### v 0.1.2
840
+
841
+ * Added the {source: 'ModelBinder'} option to the model.set call - allows you to know the source of a model's change event
842
+ * Bug fix - when binding the elAttribute to class I wasn't going through the converter function
843
+
844
+ ### v 0.1.1
845
+
846
+ * An empty selector string will now bind to the rootEl
847
+ * Removed elementBinding.isSetting guard which was unnecessary and short circuited updating multiple bound elements with the same name
848
+
849
+ ### v 0.1.0
850
+
851
+ * Initial version starting April 16th. Future api changes will have updated version numbers.
852
+
853
+
854
+
855
+ # Legal Info (MIT License)
856
+
857
+ Copyright (c) 2012 Bart Wood
858
+
859
+ Permission is hereby granted, free of charge, to any person obtaining a copy
860
+ of this software and associated documentation files (the "Software"), to deal
861
+ in the Software without restriction, including without limitation the rights
862
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
863
+ copies of the Software, and to permit persons to whom the Software is
864
+ furnished to do so, subject to the following conditions:
865
+
866
+ The above copyright notice and this permission notice shall be included in
867
+ all copies or substantial portions of the Software.
868
+
869
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
870
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
871
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
872
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
873
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
874
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
875
+ THE SOFTWARE.
bower_components/backbone.modelbinder/component.json CHANGED
@@ -1,15 +1,15 @@
1
- {
2
- "name": "backbone.modelBinder",
3
- "version": "0.1.6",
4
- "main": ["Backbone.ModelBinder.js"],
5
- "dependencies" : {
6
- "backbone" : ">=0.9.0",
7
- "underscore" : ">=1.3.1",
8
- "jquery" : ">=1.7.1"
9
- },
10
-
11
- "repository": {
12
- "type": "git",
13
- "url": "git://github.com/theironcook/Backbone.ModelBinder.git"
14
- }
15
  }
1
+ {
2
+ "name": "backbone.modelBinder",
3
+ "version": "0.1.6",
4
+ "main": ["Backbone.ModelBinder.js"],
5
+ "dependencies" : {
6
+ "backbone" : ">=0.9.0",
7
+ "underscore" : ">=1.3.1",
8
+ "jquery" : ">=1.7.1"
9
+ },
10
+
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git://github.com/theironcook/Backbone.ModelBinder.git"
14
+ }
15
  }
bower_components/backbone.modelbinder/package.json CHANGED
@@ -1,37 +1,37 @@
1
- {
2
- "name": "backbone.modelbinder",
3
- "description": "Simple, flexible and powerful Model-View binding for Backbone.",
4
- "version": "1.1.0",
5
- "author": "Bart Wood",
6
- "bugs": {
7
- "url": "https://github.com/theironcook/Backbone.ModelBinder/issues"
8
- },
9
- "dependencies": {
10
- "backbone": ">=0.9.0",
11
- "jquery": ">=1.7.1",
12
- "underscore": ">=1.3.1"
13
- },
14
- "directories": {
15
- "example": "examples"
16
- },
17
- "files": [
18
- "Backbone.ModelBinder.js",
19
- "Backbone.CollectionBinder.js"
20
- ],
21
- "homepage": "https://github.com/theironcook/Backbone.ModelBinder#readme",
22
- "keywords": [
23
- "backbone",
24
- "model",
25
- "view"
26
- ],
27
- "license": "MIT",
28
- "main": "Backbone.ModelBinder.js",
29
- "repository": {
30
- "type": "git",
31
- "url": "git+https://github.com/theironcook/Backbone.ModelBinder.git"
32
- },
33
- "scripts": {
34
- "test": "echo \"Error: no test specified\" && exit 1"
35
- },
36
- "url": "https://github.com/theironcook/Backbone.ModelBinder"
37
- }
1
+ {
2
+ "name": "backbone.modelbinder",
3
+ "description": "Simple, flexible and powerful Model-View binding for Backbone.",
4
+ "version": "1.1.0",
5
+ "author": "Bart Wood",
6
+ "bugs": {
7
+ "url": "https://github.com/theironcook/Backbone.ModelBinder/issues"
8
+ },
9
+ "dependencies": {
10
+ "backbone": ">=0.9.0",
11
+ "jquery": ">=1.7.1",
12
+ "underscore": ">=1.3.1"
13
+ },
14
+ "directories": {
15
+ "example": "examples"
16
+ },
17
+ "files": [
18
+ "Backbone.ModelBinder.js",
19
+ "Backbone.CollectionBinder.js"
20
+ ],
21
+ "homepage": "https://github.com/theironcook/Backbone.ModelBinder#readme",
22
+ "keywords": [
23
+ "backbone",
24
+ "model",
25
+ "view"
26
+ ],
27
+ "license": "MIT",
28
+ "main": "Backbone.ModelBinder.js",
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/theironcook/Backbone.ModelBinder.git"
32
+ },
33
+ "scripts": {
34
+ "test": "echo \"Error: no test specified\" && exit 1"
35
+ },
36
+ "url": "https://github.com/theironcook/Backbone.ModelBinder"
37
+ }
initialisation/README.txt CHANGED
@@ -1,4 +1,4 @@
1
- The initialisation directory is a legacy folder from Gravity PDF v3
2
- We've left it here for v3 templates that reference the template.css file
3
-
4
  See /src/templates/ for the new core PDF templates directory.
1
+ The initialisation directory is a legacy folder from Gravity PDF v3
2
+ We've left it here for v3 templates that reference the template.css file
3
+
4
  See /src/templates/ for the new core PDF templates directory.
initialisation/template.css CHANGED
@@ -1,173 +1,173 @@
1
- /**
2
- * THIS IS A LEGACY CSS FILE FOR Gravity PDF v3 template files
3
- */
4
-
5
- body {
6
- font-family: DejaVu Sans, Helvetica, sans-serif;
7
- letter-spacing: -0.2px;
8
- }
9
-
10
- #container {
11
- border-radius: 4px 4px 4px 4px;
12
- border-spacing: 0;
13
- clear: both;
14
- width: 100%;
15
- background-color: #fff;
16
- border-color: #dfdfdf;
17
- border-style: solid;
18
- border-width: 1px;
19
- margin: 0 0 16px;
20
- }
21
-
22
- h2.default {
23
- background-color: #e3e3e3;
24
- font-size: 14px;
25
- text-align: left;
26
- text-shadow: 0 1px 0 #fff;
27
- margin: 0;
28
- padding: 7px;
29
- }
30
-
31
- .entry-view-field-value, .entry-view-html-value, .entry-view-section-break-content {
32
- border-bottom: 1px solid #dfdfdf;
33
- line-height: 150%;
34
- padding: 6px 6px 6px 7px;
35
- }
36
-
37
- .lastrow {
38
- border-bottom: none;
39
- }
40
-
41
- .entry-view-field-value ul {
42
- margin-left: 15px;
43
- }
44
-
45
- .entry-view-field-value div.strong {
46
- font-weight: bold;
47
- }
48
-
49
- .no-style .entry-view-field-value, .no-style #container, .no-style h2, .no-style .entry-view-html-value, .no-style .entry-view-section-break-content {
50
- background: none;
51
- border: none;
52
- }
53
-
54
- .two_row .entry-view-field-value {
55
- border: 0;
56
- line-height: normal;
57
- padding: 0;
58
- }
59
-
60
- .two_row .entry-view-field-value div.strong {
61
- font-weight: bold;
62
- width: 100%;
63
- border-bottom: 1px solid #dfdfdf;
64
- line-height: 150%;
65
- background-color: #eaf2fa;
66
- padding: 6px 6px 6px 7px;
67
- }
68
-
69
- .two_row .entry-view-field-value div.value {
70
- display: block;
71
- width: 100%;
72
- border-bottom: 1px solid #fff;
73
- line-height: 150%;
74
- padding: 6px 6px 6px 7px;
75
- }
76
-
77
- .two_row .entry-view-field-value span {
78
- font-weight: normal;
79
- }
80
-
81
- td.entry-view-field-value {
82
- padding-left: 9px;
83
- }
84
-
85
- .even {
86
- background: #eaf2fa;
87
- }
88
-
89
- .body_copy {
90
- padding-top: 50px;
91
- }
92
-
93
- .pdf_logo_area {
94
- text-align: center;
95
- margin: 0 auto;
96
- }
97
-
98
- table.entry-products {
99
- width: 98%;
100
- }
101
-
102
- table.entry-products th {
103
- background-color: #F4F4F4;
104
- border-bottom: 1px solid #DFDFDF;
105
- border-right: 1px solid #DFDFDF !important;
106
- }
107
-
108
- table.entry-products td.textcenter, table.entry-products th.textcenter {
109
- text-align: center;
110
- }
111
-
112
- table.entry-products col.entry-products-col2 {
113
- width: 50px;
114
- }
115
-
116
- table.entry-products col.entry-products-col3 {
117
- width: 155px;
118
- }
119
-
120
- table.entry-products col.entry-products-col4 {
121
- width: 155px;
122
- }
123
-
124
- table.entry-products {
125
- border: 1px solid #DFDFDF;
126
- margin: 10px 0;
127
- }
128
-
129
- table.entry-products td {
130
- border-bottom: 1px solid #DFDFDF;
131
- border-right: 1px solid #DFDFDF !important;
132
- padding: 7px 7px 8px;
133
- vertical-align: top;
134
- }
135
-
136
- table.entry-products td.emptycell {
137
- background-color: #F4F4F4;
138
- }
139
-
140
- table.entry-products td.grandtotal, table.entry-products td.grandtotal_amount, table.entry-products td.shipping, table.entry-products td.shipping_amount {
141
- font-size: 13px;
142
- font-weight: bold;
143
- padding-bottom: 8px;
144
- padding-top: 7px;
145
- }
146
-
147
- table.entry-products td.textright, table.entry-products th.textright {
148
- text-align: right;
149
- }
150
-
151
- .two_row .odd, .two_row .even {
152
- background: none;
153
- }
154
-
155
- /**
156
- * Quiz Style Support
157
- */
158
-
159
- .gf-quiz-img {
160
- padding-left: 5px !important;
161
- vertical-align: middle;
162
- }
163
-
164
- /**
165
- * Survey Style Support
166
- */
167
- .gsurvey-likert-choice-label {
168
- padding: 4px;
169
- }
170
-
171
- .gsurvey-likert-choice, .gsurvey-likert-choice-label {
172
- text-align: center;
173
  }
1
+ /**
2
+ * THIS IS A LEGACY CSS FILE FOR Gravity PDF v3 template files
3
+ */
4
+
5
+ body {
6
+ font-family: DejaVu Sans, Helvetica, sans-serif;
7
+ letter-spacing: -0.2px;
8
+ }
9
+
10
+ #container {
11
+ border-radius: 4px 4px 4px 4px;
12
+ border-spacing: 0;
13
+ clear: both;
14
+ width: 100%;
15
+ background-color: #fff;
16
+ border-color: #dfdfdf;
17
+ border-style: solid;
18
+ border-width: 1px;
19
+ margin: 0 0 16px;
20
+ }
21
+
22
+ h2.default {
23
+ background-color: #e3e3e3;
24
+ font-size: 14px;
25
+ text-align: left;
26
+ text-shadow: 0 1px 0 #fff;
27
+ margin: 0;
28
+ padding: 7px;
29
+ }
30
+
31
+ .entry-view-field-value, .entry-view-html-value, .entry-view-section-break-content {
32
+ border-bottom: 1px solid #dfdfdf;
33
+ line-height: 150%;
34
+ padding: 6px 6px 6px 7px;
35
+ }
36
+
37
+ .lastrow {
38
+ border-bottom: none;
39
+ }
40
+
41
+ .entry-view-field-value ul {
42
+ margin-left: 15px;
43
+ }
44
+
45
+ .entry-view-field-value div.strong {
46
+ font-weight: bold;
47
+ }
48
+
49
+ .no-style .entry-view-field-value, .no-style #container, .no-style h2, .no-style .entry-view-html-value, .no-style .entry-view-section-break-content {
50
+ background: none;
51
+ border: none;
52
+ }
53
+
54
+ .two_row .entry-view-field-value {
55
+ border: 0;
56
+ line-height: normal;
57
+ padding: 0;
58
+ }
59
+
60
+ .two_row .entry-view-field-value div.strong {
61
+ font-weight: bold;
62
+ width: 100%;
63
+ border-bottom: 1px solid #dfdfdf;
64
+ line-height: 150%;
65
+ background-color: #eaf2fa;
66
+ padding: 6px 6px 6px 7px;
67
+ }
68
+
69
+ .two_row .entry-view-field-value div.value {
70
+ display: block;
71
+ width: 100%;
72
+ border-bottom: 1px solid #fff;
73
+ line-height: 150%;
74
+ padding: 6px 6px 6px 7px;
75
+ }
76
+
77
+ .two_row .entry-view-field-value span {
78
+ font-weight: normal;
79
+ }
80
+
81
+ td.entry-view-field-value {
82
+ padding-left: 9px;
83
+ }
84
+
85
+ .even {
86
+ background: #eaf2fa;
87
+ }
88
+
89
+ .body_copy {
90
+ padding-top: 50px;
91
+ }
92
+
93
+ .pdf_logo_area {
94
+ text-align: center;
95
+ margin: 0 auto;
96
+ }
97
+
98
+ table.entry-products {
99
+ width: 98%;
100
+ }
101
+
102
+ table.entry-products th {
103
+ background-color: #F4F4F4;
104
+ border-bottom: 1px solid #DFDFDF;
105
+ border-right: 1px solid #DFDFDF !important;
106
+ }
107
+
108
+ table.entry-products td.textcenter, table.entry-products th.textcenter {
109
+ text-align: center;
110
+ }
111
+
112
+ table.entry-products col.entry-products-col2 {
113
+ width: 50px;
114
+ }
115
+
116
+ table.entry-products col.entry-products-col3 {
117
+ width: 155px;
118
+ }
119
+
120
+ table.entry-products col.entry-products-col4 {
121
+ width: 155px;
122
+ }
123
+
124
+ table.entry-products {
125
+ border: 1px solid #DFDFDF;
126
+ margin: 10px 0;
127
+ }
128
+
129
+ table.entry-products td {
130
+ border-bottom: 1px solid #DFDFDF;
131
+ border-right: 1px solid #DFDFDF !important;
132
+ padding: 7px 7px 8px;
133
+ vertical-align: top;
134
+ }
135
+
136
+ table.entry-products td.emptycell {
137
+ background-color: #F4F4F4;
138
+ }
139
+
140
+ table.entry-products td.grandtotal, table.entry-products td.grandtotal_amount, table.entry-products td.shipping, table.entry-products td.shipping_amount {
141
+ font-size: 13px;
142
+ font-weight: bold;
143
+ padding-bottom: 8px;
144
+ padding-top: 7px;
145
+ }
146
+
147
+ table.entry-products td.textright, table.entry-products th.textright {
148
+ text-align: right;
149
+ }
150
+
151
+ .two_row .odd, .two_row .even {
152
+ background: none;
153
+ }
154
+
155
+ /**
156
+ * Quiz Style Support
157
+ */
158
+
159
+ .gf-quiz-img {
160
+ padding-left: 5px !important;
161
+ vertical-align: middle;
162
+ }
163
+
164
+ /**
165
+ * Survey Style Support
166
+ */
167
+ .gsurvey-likert-choice-label {
168
+ padding: 4px;
169
+ }
170
+
171
+ .gsurvey-likert-choice, .gsurvey-likert-choice-label {
172
+ text-align: center;
173
  }
pdf.php CHANGED
@@ -1,419 +1,419 @@
1
- <?php
2
- /*
3
- Plugin Name: Gravity PDF
4
- Version: 4.2.2
5
- Description: Automatically generate highly-customisable PDF documents using Gravity Forms.
6
- Author: Gravity PDF
7
- Author URI: https://gravitypdf.com
8
- Text Domain: gravity-forms-pdf-extended
9
- Domain Path: /src/assets/languages
10
- */
11
-
12
- /* Exit if accessed directly */
13
- if ( ! defined( 'ABSPATH' ) ) {
14
- exit;
15
- }
16
-
17
- /*
18
- This file is part of Gravity PDF
19
-
20
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
21
-
22
- This program is free software; you can redistribute it and/or modify
23
- it under the terms of the GNU General Public License as published by
24
- the Free Software Foundation; either version 2 of the License, or
25
- (at your option) any later version.
26
-
27
- This program is distributed in the hope that it will be useful,
28
- but WITHOUT ANY WARRANTY; without even the implied warranty of
29
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30
- GNU General Public License for more details.
31
-
32
- You should have received a copy of the GNU General Public License
33
- along with this program; if not, write to the Free Software
34
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
35
- */
36
-
37
- /*
38
- * Set base constants we'll use throughout the plugin
39
- */
40
- define( 'PDF_EXTENDED_VERSION', '4.2.2' ); /* the current plugin version */
41
- define( 'PDF_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); /* plugin directory path */
42
- define( 'PDF_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); /* plugin directory url */
43
- define( 'PDF_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); /* the plugin basename */
44
-
45
- /*
46
- * Add our activation hook and deactivation hooks
47
- */
48
- require_once PDF_PLUGIN_DIR . 'src/controller/Controller_Activation.php';
49
- register_deactivation_hook( __FILE__, array( 'Controller_Activation', 'deactivation' ) );
50
-
51
- /**
52
- *
53
- * Our initialisation class
54
- * Check all the dependancy requirements are met, otherwise fallback and show appropriate user error
55
- *
56
- * @since 4.0
57
- */
58
- class GFPDF_Major_Compatibility_Checks {
59
-
60
- /**
61
- * The plugin's basename
62
- *
63
- * @var string
64
- *
65
- * @since 4.0
66
- */
67
- private $basename;
68
-
69
- /**
70
- * The path to the plugin
71
- *
72
- * @var string
73
- *
74
- * @since 4.0
75
- */
76
- private $path;
77
-
78
- /**
79
- * Holds any blocker error messages stopping plugin running
80
- *
81
- * @var array
82
- *
83
- * @since 4.0
84
- */
85
- private $notices = array();
86
-
87
- /**
88
- * The plugin's required Gravity Forms version
89
- *
90
- * @var string
91
- *
92
- * @since 4.0
93
- */
94
- public $required_gf_version = '1.9';
95
-
96
- /**
97
- * The plugin's required WordPress version
98
- *
99
- * @var string
100
- *
101
- * @since 4.0
102
- */
103
- public $required_wp_version = '4.4';
104
-
105
- /**
106
- * The plugin's required PHP version
107
- *
108
- * Gravity PDF 4.0 is such a major release that we can afford to also bump up the version requirements.
109
- * We really wanted to bump this up to an actively supported version of PHP (http://php.net/supported-versions.php)
110
- * but with WordPress supporting PHP5.2+ (and making no moves to increase this) we had to strike a balance.
111
- *
112
- * The initial release will require PHP 5.4 which will strike a better balance.
113
- *
114
- * @var string
115
- *
116
- * @since 4.0
117
- */
118
- public $required_php_version = '5.4';
119
-
120
- /**
121
- * Set our required variables for a fallback and attempt to initialise
122
- *
123
- * @param string $basename Plugin basename
124
- * @param string $path The plugin path
125
- *
126
- * @since 4.0
127
- */
128
- public function __construct( $basename = '', $path = '' ) {
129
-
130
- /* Set our class variables */
131
- $this->basename = $basename;
132
- $this->path = $path;
133
- }
134
-
135
- /**
136
- * Load the plugin
137
- *
138
- * @return void
139
- *
140
- * @since 4.0
141
- */
142
- public function init() {
143
- add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );
144
- }
145
-
146
- /**
147
- * Check if dependancies are met and load plugin, otherwise display errors
148
- *
149
- * @return void
150
- *
151
- * @since 4.0
152
- */
153
- public function plugins_loaded() {
154
-
155
- /* Check minimum requirements are met */
156
- $this->is_compatible_wordpress_version();
157
- $this->check_gravity_forms();
158
- $this->check_php();
159
- $this->check_mb_string();
160
- $this->check_mb_string_regex();
161
- $this->check_gd();
162
- $this->check_dom();
163
- $this->check_ram( ini_get( 'memory_limit' ) );
164
-
165
- /* Check if any errors were thrown, enqueue them and exit early */
166
- if ( sizeof( $this->notices ) > 0 ) {
167
- add_action( 'admin_notices', array( $this, 'display_notices' ) );
168
-
169
- return null;
170
- }
171
-
172
- require_once $this->path . 'src/bootstrap.php';
173
- }
174
-
175
- /**
176
- * Check if WordPress version is compatible
177
- *
178
- * @return boolean Whether compatible or not
179
- *
180
- * @since 4.0
181
- */
182
- public function is_compatible_wordpress_version() {
183
- global $wp_version;
184
-
185
- /* WordPress version not compatible */
186
- if ( ! version_compare( $wp_version, $this->required_wp_version, '>=' ) ) {
187
- $this->notices[] = sprintf( esc_html__( 'WordPress Version %s is required. %sGet more info%s.', 'gravity-forms-pdf-extended' ), $this->required_wp_version, '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#wordpress-version">', '</a>' );
188
-
189
- return false;
190
- }
191
-
192
- return true;
193
- }
194
-
195
- /**
196
- * Check if Gravity Forms version is compatible
197
- *
198
- * @return boolean Whether compatible or not
199
- *
200
- * @since 4.0
201
- */
202
- public function check_gravity_forms() {
203
-
204
- /* Gravity Forms version not compatible */
205
- if ( ! class_exists( 'GFCommon' ) || ! version_compare( GFCommon::$version, $this->required_gf_version, '>=' ) ) {
206
- $this->notices[] = sprintf( esc_html__( '%sGravity Forms%s Version %s is required. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="https://www.e-junkie.com/ecom/gb.php?cl=54585&c=ib&aff=235154">', '</a>', $this->required_gf_version, '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#gravityforms-version">', '</a>' );
207
-
208
- return false;
209
- }
210
-
211
- return true;
212
- }
213
-
214
- /**
215
- * Check if PHP version is compatible
216
- *
217
- * @return boolean Whether compatible or not
218
- *
219
- * @since 4.0
220
- */
221
- public function check_php() {
222
-
223
- /* Check PHP version is compatible */
224
- if ( ! version_compare( phpversion(), $this->required_php_version, '>=' ) ) {
225
- $this->notices[] = sprintf( esc_html__( 'You are running an %soutdated version of PHP%s. Contact your web hosting provider to update. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="http://www.wpupdatephp.com/update/">', '</a>', '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#php-version">', '</a>' );
226
-
227
- return false;
228
- }
229
-
230
- return true;
231
- }
232
-
233
- /**
234
- * Check if PHP MB String enabled
235
- *
236
- * @return boolean Whether compatible or not
237
- *
238
- * @since 4.0
239
- */
240
- public function check_mb_string() {
241
-
242
- /* Check MB String is installed */
243
- if ( ! extension_loaded( 'mbstring' ) ) {
244
- $this->notices[] = sprintf( esc_html__( 'The PHP Extension MB String could not be detected. Contact your web hosting provider to fix. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#php-mbstring">', '</a>' );
245
-
246
- return false;
247
- }
248
-
249
- return true;
250
- }
251
-
252
- /**
253
- * Check if MB String Regex enabled
254
- *
255
- * @return boolean Whether compatible or not
256
- *
257
- * @since 4.0
258
- */
259
- public function check_mb_string_regex() {
260
-
261
- /* Check MB String is compiled with regex capabilities */
262
- if ( extension_loaded( 'mbstring' ) && ! function_exists( 'mb_regex_encoding' ) ) {
263
- $this->notices[] = sprintf( esc_html__( 'The PHP Extension MB String does not have MB Regex enabled. Contact your web hosting provider to fix. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#php-mbstring-regex">', '</a>' );
264
-
265
- return false;
266
- }
267
-
268
- return true;
269
- }
270
-
271
- /**
272
- * Check if PHP GD Library installed
273
- *
274
- * @return boolean Whether compatible or not
275
- *
276
- * @since 4.0
277
- */
278
- public function check_gd() {
279
-
280
- /* Check GD Image Library is installed */
281
- if ( ! extension_loaded( 'gd' ) ) {
282
- $this->notices[] = sprintf( esc_html__( 'The PHP Extension GD Image Library could not be detected. Contact your web hosting provider to fix. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#php-gd">', '</a>' );
283
-
284
- return false;
285
- }
286
-
287
- return true;
288
- }
289
-
290
- /**
291
- * Check if PHP DOM / libxml installed
292
- *
293
- * @return boolean Whether compatible or not
294
- *
295
- * @since 4.0
296
- */
297
- public function check_dom() {
298
-
299
- /* Check DOM Class is installed */
300
- if ( ! extension_loaded( 'dom' ) || ! class_exists( 'DOMDocument' ) ) {
301
- $this->notices[] = sprintf( esc_html__( 'The PHP DOM Extension was not found. Contact your web hosting provider to fix. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#php-dom">', '</a>' );
302
-
303
- return false;
304
- }
305
-
306
- /* Check libxml is loaded */
307
- if ( ! extension_loaded( 'libxml' ) ) {
308
- $this->notices[] = sprintf( esc_html__( 'The PHP Extension libxml could not be detected. Contact your web hosting provider to fix. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#php-xml">', '</a>' );
309
-
310
- return false;
311
- }
312
-
313
- return true;
314
- }
315
-
316
- /**
317
- * Check if minimum RAM requirements met
318
- *
319
- * @param string $ram The PHP RAM setting
320
- *
321
- * @return boolean Whether compatible or not
322
- *
323
- * @since 4.0
324
- */
325
- public function check_ram( $ram ) {
326
-
327
- /* Check Minimum RAM requirements */
328
- $ram = $this->get_ram( $ram );
329
-
330
- if ( $ram < 64 && $ram !== -1 ) {
331
- $this->notices[] = sprintf( esc_html__( "You need %s128MB%s of WP Memory (RAM) but we only found %s available. %sTry these methods to increase your memory limit%s, otherwise contact your web hosting provider to fix.", 'gravity-forms-pdf-extended' ), '<strong>', '</strong>', $ram . 'MB', '<a href="https://gravitypdf.com/documentation/v4/user-increasing-memory-limit/">', '</a>' );
332
-
333
- return false;
334
- }
335
-
336
- return true;
337
- }
338
-
339
-
340
- /**
341
- * Get the available system memory
342
- *
343
- * @param string $ram The PHP RAM setting
344
- *
345
- * @return integer The calculated RAM
346
- *
347
- * @since 4.0
348
- */
349
- public function get_ram( $ram ) {
350
-
351
- /* Get memory in standardised bytes format */
352
- $memory_limit = $this->convert_ini_memory( $ram );
353
-
354
- /* Convert to megabytes, or set to -1 if unlimited */
355
- return ( $memory_limit === '-1' ) ? -1 : floor( $memory_limit / 1024 / 1024 );
356
- }
357
-
358
- /**
359
- * Convert .ini file memory to bytes
360
- *
361
- * @param string $memory The .ini memory limit
362
- *
363
- * @return integer The calculated memory limit in bytes
364
- */
365
- public function convert_ini_memory( $memory ) {
366
-
367
- $convert = array( 'mb' => 'm', 'kb' => 'k', 'gb' => 'g' );
368
-
369
- /* Standardise format */
370
- foreach ( $convert as $k => $v ) {
371
- $memory = str_ireplace( $k, $v, $memory );
372
- }
373
-
374
- /* Check if memory allocation is in mb, kb or gb */
375
- switch ( strtolower( substr( $memory, -1 ) ) ) {
376
- case 'm':
377
- return (int) $memory * 1048576;
378
- case 'k':
379
- return (int) $memory * 1024;
380
- case 'g':
381
- return (int) $memory * 1073741824;
382
- }
383
-
384
- return $memory;
385
- }
386
-
387
-
388
- /**
389
- * Helper function to easily display error messages
390
- *
391
- * @return void
392
- *
393
- * @since 4.0
394
- */
395
- public function display_notices() {
396
- ?>
397
- <div class="error">
398
- <p><strong><?php esc_html_e( 'Gravity PDF Installation Problem', 'gravity-forms-pdf-extended' ); ?></strong></p>
399
-
400
- <p><?php esc_html_e( 'The minimum requirements for Gravity PDF have not been met. Please fix the issue(s) below to continue:', 'gravity-forms-pdf-extended' ); ?></p>
401
- <ul style="padding-bottom: 0.5em">
402
- <?php foreach ( $this->notices as $notice ) : ?>
403
- <li style="padding-left: 20px;list-style: inside"><?php echo $notice; ?></li>
404
- <?php endforeach; ?>
405
- </ul>
406
- </div>
407
- <?php
408
- }
409
- }
410
-
411
- /*
412
- * Initialise the software
413
- */
414
- $gravitypdf = new GFPDF_Major_Compatibility_Checks(
415
- PDF_PLUGIN_BASENAME,
416
- PDF_PLUGIN_DIR
417
- );
418
-
419
- $gravitypdf->init();
1
+ <?php
2
+ /*
3
+ Plugin Name: Gravity PDF
4
+ Version: 4.3.0
5
+ Description: Automatically generate highly-customisable PDF documents using Gravity Forms.
6
+ Author: Gravity PDF
7
+ Author URI: https://gravitypdf.com
8
+ Text Domain: gravity-forms-pdf-extended
9
+ Domain Path: /src/assets/languages
10
+ */
11
+
12
+ /* Exit if accessed directly */
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit;
15
+ }
16
+
17
+ /*
18
+ This file is part of Gravity PDF
19
+
20
+ Gravity PDF – Copyright (C) 2017 Blue Liquid Designs
21
+
22
+ This program is free software; you can redistribute it and/or modify
23
+ it under the terms of the GNU General Public License as published by
24
+ the Free Software Foundation; either version 2 of the License, or
25
+ (at your option) any later version.
26
+
27
+ This program is distributed in the hope that it will be useful,
28
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
29
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30
+ GNU General Public License for more details.
31
+
32
+ You should have received a copy of the GNU General Public License
33
+ along with this program; if not, write to the Free Software
34
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
35
+ */
36
+
37
+ /*
38
+ * Set base constants we'll use throughout the plugin
39
+ */
40
+ define( 'PDF_EXTENDED_VERSION', '4.3.0' ); /* the current plugin version */
41
+ define( 'PDF_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); /* plugin directory path */
42
+ define( 'PDF_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); /* plugin directory url */
43
+ define( 'PDF_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); /* the plugin basename */
44
+
45
+ /*
46
+ * Add our activation hook and deactivation hooks
47
+ */
48
+ require_once PDF_PLUGIN_DIR . 'src/controller/Controller_Activation.php';
49
+ register_deactivation_hook( __FILE__, array( 'Controller_Activation', 'deactivation' ) );
50
+
51
+ /**
52
+ *
53
+ * Our initialisation class
54
+ * Check all the dependancy requirements are met, otherwise fallback and show appropriate user error
55
+ *
56
+ * @since 4.0
57
+ */
58
+ class GFPDF_Major_Compatibility_Checks {
59
+
60
+ /**
61
+ * The plugin's basename
62
+ *
63
+ * @var string
64
+ *
65
+ * @since 4.0
66
+ */
67
+ private $basename;
68
+
69
+ /**
70
+ * The path to the plugin
71
+ *
72
+ * @var string
73
+ *
74
+ * @since 4.0
75
+ */
76
+ private $path;
77
+
78
+ /**
79
+ * Holds any blocker error messages stopping plugin running
80
+ *
81
+ * @var array
82
+ *
83
+ * @since 4.0
84
+ */
85
+ private $notices = array();
86
+
87
+ /**
88
+ * The plugin's required Gravity Forms version
89
+ *
90
+ * @var string
91
+ *
92
+ * @since 4.0
93
+ */
94
+ public $required_gf_version = '1.9';
95
+
96
+ /**
97
+ * The plugin's required WordPress version
98
+ *
99
+ * @var string
100
+ *
101
+ * @since 4.0
102
+ */
103
+ public $required_wp_version = '4.4';
104
+
105
+ /**
106
+ * The plugin's required PHP version
107
+ *
108
+ * Gravity PDF 4.0 is such a major release that we can afford to also bump up the version requirements.
109
+ * We really wanted to bump this up to an actively supported version of PHP (http://php.net/supported-versions.php)
110
+ * but with WordPress supporting PHP5.2+ (and making no moves to increase this) we had to strike a balance.
111
+ *
112
+ * The initial release will require PHP 5.4 which will strike a better balance.
113
+ *
114
+ * @var string
115
+ *
116
+ * @since 4.0
117
+ */
118
+ public $required_php_version = '5.4';
119
+
120
+ /**
121
+ * Set our required variables for a fallback and attempt to initialise
122
+ *
123
+ * @param string $basename Plugin basename
124
+ * @param string $path The plugin path
125
+ *
126
+ * @since 4.0
127
+ */
128
+ public function __construct( $basename = '', $path = '' ) {
129
+
130
+ /* Set our class variables */
131
+ $this->basename = $basename;
132
+ $this->path = $path;
133
+ }
134
+
135
+ /**
136
+ * Load the plugin
137
+ *
138
+ * @return void
139
+ *
140
+ * @since 4.0
141
+ */
142
+ public function init() {
143
+ add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );
144
+ }
145
+
146
+ /**
147
+ * Check if dependancies are met and load plugin, otherwise display errors
148
+ *
149
+ * @return void
150
+ *
151
+ * @since 4.0
152
+ */
153
+ public function plugins_loaded() {
154
+
155
+ /* Check minimum requirements are met */
156
+ $this->is_compatible_wordpress_version();
157
+ $this->check_gravity_forms();
158
+ $this->check_php();
159
+ $this->check_mb_string();
160
+ $this->check_mb_string_regex();
161
+ $this->check_gd();
162
+ $this->check_dom();
163
+ $this->check_ram( ini_get( 'memory_limit' ) );
164
+
165
+ /* Check if any errors were thrown, enqueue them and exit early */
166
+ if ( sizeof( $this->notices ) > 0 ) {
167
+ add_action( 'admin_notices', array( $this, 'display_notices' ) );
168
+
169
+ return null;
170
+ }
171
+
172
+ require_once $this->path . 'src/bootstrap.php';
173
+ }
174
+
175
+ /**
176
+ * Check if WordPress version is compatible
177
+ *
178
+ * @return boolean Whether compatible or not
179
+ *
180
+ * @since 4.0
181
+ */
182
+ public function is_compatible_wordpress_version() {
183
+ global $wp_version;
184
+
185
+ /* WordPress version not compatible */
186
+ if ( ! version_compare( $wp_version, $this->required_wp_version, '>=' ) ) {
187
+ $this->notices[] = sprintf( esc_html__( 'WordPress Version %s is required. %sGet more info%s.', 'gravity-forms-pdf-extended' ), $this->required_wp_version, '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#wordpress-version">', '</a>' );
188
+
189
+ return false;
190
+ }
191
+
192
+ return true;
193
+ }
194
+
195
+ /**
196
+ * Check if Gravity Forms version is compatible
197
+ *
198
+ * @return boolean Whether compatible or not
199
+ *
200
+ * @since 4.0
201
+ */
202
+ public function check_gravity_forms() {
203
+
204
+ /* Gravity Forms version not compatible */
205
+ if ( ! class_exists( 'GFCommon' ) || ! version_compare( GFCommon::$version, $this->required_gf_version, '>=' ) ) {
206
+ $this->notices[] = sprintf( esc_html__( '%sGravity Forms%s Version %s is required. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="https://www.e-junkie.com/ecom/gb.php?cl=54585&c=ib&aff=235154">', '</a>', $this->required_gf_version, '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#gravityforms-version">', '</a>' );
207
+
208
+ return false;
209
+ }
210
+
211
+ return true;
212
+ }
213
+
214
+ /**
215
+ * Check if PHP version is compatible
216
+ *
217
+ * @return boolean Whether compatible or not
218
+ *
219
+ * @since 4.0
220
+ */
221
+ public function check_php() {
222
+
223
+ /* Check PHP version is compatible */
224
+ if ( ! version_compare( phpversion(), $this->required_php_version, '>=' ) ) {
225
+ $this->notices[] = sprintf( esc_html__( 'You are running an %soutdated version of PHP%s. Contact your web hosting provider to update. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="http://www.wpupdatephp.com/update/">', '</a>', '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#php-version">', '</a>' );
226
+
227
+ return false;
228
+ }
229
+
230
+ return true;
231
+ }
232
+
233
+ /**
234
+ * Check if PHP MB String enabled
235
+ *
236
+ * @return boolean Whether compatible or not
237
+ *
238
+ * @since 4.0
239
+ */
240
+ public function check_mb_string() {
241
+
242
+ /* Check MB String is installed */
243
+ if ( ! extension_loaded( 'mbstring' ) ) {
244
+ $this->notices[] = sprintf( esc_html__( 'The PHP Extension MB String could not be detected. Contact your web hosting provider to fix. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#php-mbstring">', '</a>' );
245
+
246
+ return false;
247
+ }
248
+
249
+ return true;
250
+ }
251
+
252
+ /**
253
+ * Check if MB String Regex enabled
254
+ *
255
+ * @return boolean Whether compatible or not
256
+ *
257
+ * @since 4.0
258
+ */
259
+ public function check_mb_string_regex() {
260
+
261
+ /* Check MB String is compiled with regex capabilities */
262
+ if ( extension_loaded( 'mbstring' ) && ! function_exists( 'mb_regex_encoding' ) ) {
263
+ $this->notices[] = sprintf( esc_html__( 'The PHP Extension MB String does not have MB Regex enabled. Contact your web hosting provider to fix. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#php-mbstring-regex">', '</a>' );
264
+
265
+ return false;
266
+ }
267
+
268
+ return true;
269
+ }
270
+
271
+ /**
272
+ * Check if PHP GD Library installed
273
+ *
274
+ * @return boolean Whether compatible or not
275
+ *
276
+ * @since 4.0
277
+ */
278
+ public function check_gd() {
279
+
280
+ /* Check GD Image Library is installed */
281
+ if ( ! extension_loaded( 'gd' ) ) {
282
+ $this->notices[] = sprintf( esc_html__( 'The PHP Extension GD Image Library could not be detected. Contact your web hosting provider to fix. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#php-gd">', '</a>' );
283
+
284
+ return false;
285
+ }
286
+
287
+ return true;
288
+ }
289
+
290
+ /**
291
+ * Check if PHP DOM / libxml installed
292
+ *
293
+ * @return boolean Whether compatible or not
294
+ *
295
+ * @since 4.0
296
+ */
297
+ public function check_dom() {
298
+
299
+ /* Check DOM Class is installed */
300
+ if ( ! extension_loaded( 'dom' ) || ! class_exists( 'DOMDocument' ) ) {
301
+ $this->notices[] = sprintf( esc_html__( 'The PHP DOM Extension was not found. Contact your web hosting provider to fix. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#php-dom">', '</a>' );
302
+
303
+ return false;
304
+ }
305
+
306
+ /* Check libxml is loaded */
307
+ if ( ! extension_loaded( 'libxml' ) ) {
308
+ $this->notices[] = sprintf( esc_html__( 'The PHP Extension libxml could not be detected. Contact your web hosting provider to fix. %sGet more info%s.', 'gravity-forms-pdf-extended' ), '<a href="https://gravitypdf.com/documentation/v4/user-activation-errors/#php-xml">', '</a>' );
309
+
310
+ return false;
311
+ }
312
+
313
+ return true;
314
+ }
315
+
316
+ /**
317
+ * Check if minimum RAM requirements met
318
+ *
319
+ * @param string $ram The PHP RAM setting
320
+ *
321
+ * @return boolean Whether compatible or not
322
+ *
323
+ * @since 4.0
324
+ */
325
+ public function check_ram( $ram ) {
326
+
327
+ /* Check Minimum RAM requirements */
328
+ $ram = $this->get_ram( $ram );
329
+
330
+ if ( $ram < 64 && $ram !== -1 ) {
331
+ $this->notices[] = sprintf( esc_html__( "You need %s128MB%s of WP Memory (RAM) but we only found %s available. %sTry these methods to increase your memory limit%s, otherwise contact your web hosting provider to fix.", 'gravity-forms-pdf-extended' ), '<strong>', '</strong>', $ram . 'MB', '<a href="https://gravitypdf.com/documentation/v4/user-increasing-memory-limit/">', '</a>' );
332
+
333
+ return false;
334
+ }
335
+
336
+ return true;
337
+ }
338
+
339
+
340
+ /**
341
+ * Get the available system memory
342
+ *
343
+ * @param string $ram The PHP RAM setting
344
+ *
345
+ * @return integer The calculated RAM
346
+ *
347
+ * @since 4.0
348
+ */
349
+ public function get_ram( $ram ) {
350
+
351
+ /* Get memory in standardised bytes format */
352
+ $memory_limit = $this->convert_ini_memory( $ram );
353
+
354
+ /* Convert to megabytes, or set to -1 if unlimited */
355
+ return ( $memory_limit === '-1' ) ? -1 : floor( $memory_limit / 1024 / 1024 );
356
+ }
357
+
358
+ /**
359
+ * Convert .ini file memory to bytes
360
+ *
361
+ * @param string $memory The .ini memory limit
362
+ *
363
+ * @return integer The calculated memory limit in bytes
364
+ */
365
+ public function convert_ini_memory( $memory ) {
366
+
367
+ $convert = array( 'mb' => 'm', 'kb' => 'k', 'gb' => 'g' );
368
+
369
+ /* Standardise format */
370
+ foreach ( $convert as $k => $v ) {
371
+ $memory = str_ireplace( $k, $v, $memory );
372
+ }
373
+
374
+ /* Check if memory allocation is in mb, kb or gb */
375
+ switch ( strtolower( substr( $memory, -1 ) ) ) {
376
+ case 'm':
377
+ return (int) $memory * 1048576;
378
+ case 'k':
379
+ return (int) $memory * 1024;
380
+ case 'g':
381
+ return (int) $memory * 1073741824;
382
+ }
383
+
384
+ return $memory;
385
+ }
386
+
387
+
388
+ /**
389
+ * Helper function to easily display error messages
390
+ *
391
+ * @return void
392
+ *
393
+ * @since 4.0
394
+ */
395
+ public function display_notices() {
396
+ ?>
397
+ <div class="error">
398
+ <p><strong><?php esc_html_e( 'Gravity PDF Installation Problem', 'gravity-forms-pdf-extended' ); ?></strong></p>
399
+
400
+ <p><?php esc_html_e( 'The minimum requirements for Gravity PDF have not been met. Please fix the issue(s) below to continue:', 'gravity-forms-pdf-extended' ); ?></p>
401
+ <ul style="padding-bottom: 0.5em">
402
+ <?php foreach ( $this->notices as $notice ) : ?>
403
+ <li style="padding-left: 20px;list-style: inside"><?php echo $notice; ?></li>
404
+ <?php endforeach; ?>
405
+ </ul>
406
+ </div>
407
+ <?php
408
+ }
409
+ }
410
+
411
+ /*
412
+ * Initialise the software
413
+ */
414
+ $gravitypdf = new GFPDF_Major_Compatibility_Checks(
415
+ PDF_PLUGIN_BASENAME,
416
+ PDF_PLUGIN_DIR
417
+ );
418
+
419
+ $gravitypdf->init();
resources/README.txt CHANGED
@@ -1,4 +1,4 @@
1
- The resource directory is a legacy folder from Gravity PDF v3
2
- We've left it here for v3 templates that reference the images found in this directory
3
-
4
  See /src/assets/ for the v4 resources directory.
1
+ The resource directory is a legacy folder from Gravity PDF v3
2
+ We've left it here for v3 templates that reference the images found in this directory
3
+
4
  See /src/assets/ for the v4 resources directory.
resources/images/mpdfstyleA4.css CHANGED
@@ -1,48 +1,48 @@
1
- body { font-family: DejaVuSansCondensed, sans-serif; font-size: 11pt; }
2
- p { text-align: justify; margin-bottom: 4pt; margin-top:0pt; }
3
-
4
- hr { width: 70%; height: 1px;
5
- text-align: center; color: #999999;
6
- margin-top: 8pt; margin-bottom: 8pt; }
7
-
8
- a { color: #000066; font-style: normal; text-decoration: underline;
9
- font-weight: normal; }
10
-
11
- ul { text-indent: 5mm; margin-bottom: 9pt; }
12
- ol { text-indent: 5mm; margin-bottom: 9pt; }
13
-
14
- pre { font-family: DejaVuSansMono, monospaced; font-size: 9pt; margin-top: 5pt; margin-bottom: 5pt; }
15
-
16
- h1 { font-weight: normal; font-size: 26pt; color: #000066;
17
- font-family: DejaVuSansCondensed, sans-serif; margin-top: 18pt; margin-bottom: 6pt;
18
- border-top: 0.075cm solid #000000; border-bottom: 0.075cm solid #000000;
19
- text-align: ; page-break-after:avoid; }
20
- h2 { font-weight: bold; font-size: 12pt; color: #000066;
21
- font-family: DejaVuSansCondensed, sans-serif; margin-top: 6pt; margin-bottom: 6pt;
22
- border-top: 0.07cm solid #000000; border-bottom: 0.07cm solid #000000;
23
- text-align: ; text-transform: uppercase; page-break-after:avoid; }
24
- h3 { font-weight: normal; font-size: 26pt; color: #000000;
25
- font-family: DejaVuSansCondensed, sans-serif; margin-top: 0pt; margin-bottom: 6pt;
26
- border-top: 0; border-bottom: 0;
27
- text-align: ; page-break-after:avoid; }
28
- h4 { font-weight: ; font-size: 13pt; color: #9f2b1e;
29
- font-family: DejaVuSansCondensed, sans-serif; margin-top: 10pt; margin-bottom: 7pt;
30
- font-variant: small-caps;
31
- text-align: ; margin-collapse:collapse; page-break-after:avoid; }
32
- h5 { font-weight: bold; font-style:italic; ; font-size: 11pt; color: #000044;
33
- font-family: DejaVuSansCondensed, sans-serif; margin-top: 8pt; margin-bottom: 4pt;
34
- text-align: ; page-break-after:avoid; }
35
- h6 { font-weight: bold; font-size: 9.5pt; color: #333333;
36
- font-family: DejaVuSansCondensed, sans-serif; margin-top: 6pt; margin-bottom: ;
37
- text-align: ; page-break-after:avoid; }
38
-
39
-
40
- .breadcrumb {
41
- text-align: right; font-size: 8pt; font-family: DejaVuSerifCondensed, serif; color: #666666;
42
- font-weight: bold; font-style: normal; margin-bottom: 6pt; }
43
-
44
- .infobox { margin-top:10pt; background-color:#DDDDBB; text-align:center; border:1px solid #880000; }
45
-
46
- .big { font-size: 1.5em; }
47
- .red { color: #880000; }
48
  .slanted { font-style: italic; }
1
+ body { font-family: DejaVuSansCondensed, sans-serif; font-size: 11pt; }
2
+ p { text-align: justify; margin-bottom: 4pt; margin-top:0pt; }
3
+
4
+ hr { width: 70%; height: 1px;
5
+ text-align: center; color: #999999;
6
+ margin-top: 8pt; margin-bottom: 8pt; }
7
+
8
+ a { color: #000066; font-style: normal; text-decoration: underline;
9
+ font-weight: normal; }
10
+
11
+ ul { text-indent: 5mm; margin-bottom: 9pt; }
12
+ ol { text-indent: 5mm; margin-bottom: 9pt; }
13
+
14
+ pre { font-family: DejaVuSansMono, monospaced; font-size: 9pt; margin-top: 5pt; margin-bottom: 5pt; }
15
+
16
+ h1 { font-weight: normal; font-size: 26pt; color: #000066;
17
+ font-family: DejaVuSansCondensed, sans-serif; margin-top: 18pt; margin-bottom: 6pt;
18
+ border-top: 0.075cm solid #000000; border-bottom: 0.075cm solid #000000;
19
+ text-align: ; page-break-after:avoid; }
20
+ h2 { font-weight: bold; font-size: 12pt; color: #000066;
21
+ font-family: DejaVuSansCondensed, sans-serif; margin-top: 6pt; margin-bottom: 6pt;
22
+ border-top: 0.07cm solid #000000; border-bottom: 0.07cm solid #000000;
23
+ text-align: ; text-transform: uppercase; page-break-after:avoid; }
24
+ h3 { font-weight: normal; font-size: 26pt; color: #000000;
25
+ font-family: DejaVuSansCondensed, sans-serif; margin-top: 0pt; margin-bottom: 6pt;
26
+ border-top: 0; border-bottom: 0;
27
+ text-align: ; page-break-after:avoid; }
28
+ h4 { font-weight: ; font-size: 13pt; color: #9f2b1e;
29
+ font-family: DejaVuSansCondensed, sans-serif; margin-top: 10pt; margin-bottom: 7pt;
30
+ font-variant: small-caps;
31
+ text-align: ; margin-collapse:collapse; page-break-after:avoid; }
32
+ h5 { font-weight: bold; font-style:italic; ; font-size: 11pt; color: #000044;
33
+ font-family: DejaVuSansCondensed, sans-serif; margin-top: 8pt; margin-bottom: 4pt;
34
+ text-align: ; page-break-after:avoid; }
35
+ h6 { font-weight: bold; font-size: 9.5pt; color: #333333;
36
+ font-family: DejaVuSansCondensed, sans-serif; margin-top: 6pt; margin-bottom: ;
37
+ text-align: ; page-break-after:avoid; }
38
+
39
+
40
+ .breadcrumb {
41
+ text-align: right; font-size: 8pt; font-family: DejaVuSerifCondensed, serif; color: #666666;
42
+ font-weight: bold; font-style: normal; margin-bottom: 6pt; }
43
+
44
+ .infobox { margin-top:10pt; background-color:#DDDDBB; text-align:center; border:1px solid #880000; }
45
+
46
+ .big { font-size: 1.5em; }
47
+ .red { color: #880000; }
48
  .slanted { font-style: italic; }
resources/images/mpdfstylePaged.css CHANGED
@@ -1,123 +1,123 @@
1
- @page {
2
- size: 15cm 17cm; /* width height <length>{1,2} | auto | portrait | landscape NB 'em' and 'ex' % are not allowed */
3
- margin: 10%; /* % of page-box width for LR, height for TB */
4
- margin-header: 5mm;
5
- margin-footer: 5mm;
6
- margin-left: 4cm;
7
- margin-right: 2cm;
8
- odd-header-name: myHeader2Odd;
9
- even-header-name: html_myHTMLHeaderEven;
10
- odd-footer-name: html_myHTMLFooterOdd;
11
- even-footer-name: myFooter2Even;
12
- marks: crop; /* crop | cross | none */
13
- }
14
-
15
- @page :first {
16
- margin-top: 5cm; /* Top margin on first page 10cm */
17
- }
18
-
19
- @page standard {
20
- size: auto; /* auto is the default mPDF value */
21
- margin: 10%; /* % of page-box width for LR, height for TB */
22
- marks: none; /* crop | cross | none */
23
- }
24
-
25
- @page standard :first {
26
- margin-top: 7cm; /* Top margin on first page 10cm */
27
- }
28
-
29
- @page bigsquare {
30
- size: 15cm 20cm;
31
- margin-left: 4cm;
32
- marks: crop cross; /* crop | cross | none */
33
- background: transparent url('bg.jpg') repeat scroll 5mm 5mm; /* position inset by bleedMargin */
34
- }
35
-
36
- @page bigsquare :right {
37
- header: html_myHTMLHeaderOdd;
38
- footer: html_myHTMLFooterOdd;
39
- }
40
-
41
- @page bigsquare :left { /* left is what mPDF calls EVEN page - right=ODD */
42
- header: html_myHTMLHeaderEven;
43
- footer: html_myHTMLFooterEven;
44
- }
45
-
46
- @page smallsquare {
47
- size: 25cm 15cm;
48
- margin-left: 4cm;
49
- marks: crop; /* crop | cross | none */
50
- background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
51
- }
52
-
53
- @page rotated {
54
- size: landscape;
55
- marks: none; /* crop | cross | none */
56
- background-color: #fff0f2;
57
- margin-left: 3cm;
58
- margin-right: 3cm;
59
- }
60
- @page rotated :first {
61
- margin-top: 7cm; /* Top margin on first page 10cm */
62
- }
63
-
64
- h1.heading1 { color: #1188FF;
65
- }
66
-
67
- h1.heading2 { color: #88FF11;
68
- page-break-before: always;
69
- page: standard;
70
- }
71
- h1.heading3 { color: #FF1188;
72
- page-break-before: right;
73
- }
74
- h1.heading4 { color: #FF8811;
75
- page-break-before: left;
76
- page: bigsquare;
77
- }
78
- h1.heading5 { color: #11FF88;
79
- page: smallsquare;
80
- }
81
- h1.heading6 { color: #8811FF;
82
- page: rotated;
83
- }
84
-
85
- br.paging { page-break-after: always; }
86
-
87
- body { font-family: DejaVuSansCondensed; font-size: 11pt; }
88
- p { text-align: justify; margin-bottom: 4pt; margin-top:0pt; }
89
-
90
- hr { width: 70%; height: 1px;
91
- text-align: center; color: #999999;
92
- margin-top: 8pt; margin-bottom: 8pt; }
93
-
94
- a { color: #000066; font-style: normal; text-decoration: underline;
95
- font-weight: normal; }
96
-
97
- ul { text-indent: 5mm; margin-bottom: 9pt; }
98
- ol { text-indent: 5mm; margin-bottom: 9pt; }
99
-
100
- pre { font-family: DejaVuSansMono; font-size: 9pt; margin-top: 5pt; margin-bottom: 5pt; }
101
-
102
- h1 { font-weight: normal; font-size: 26pt; color: #000066;
103
- font-family: DejaVuSansCondensed; margin-top: 18pt; margin-bottom: 6pt;
104
- border-top: 0.075cm solid #000000; border-bottom: 0.075cm solid #000000;
105
- text-align: ; page-break-after:avoid; }
106
- h2 { font-weight: bold; font-size: 12pt; color: #000066;
107
- font-family: DejaVuSansCondensed; margin-top: 6pt; margin-bottom: 6pt;
108
- border-top: 0.07cm solid #000000; border-bottom: 0.07cm solid #000000;
109
- text-align: ; text-transform: uppercase; page-break-after:avoid; }
110
- h3 { font-weight: normal; font-size: 26pt; color: #000000;
111
- font-family: DejaVuSansCondensed; margin-top: 0pt; margin-bottom: 6pt;
112
- border-top: 0; border-bottom: 0;
113
- text-align: ; page-break-after:avoid; }
114
- h4 { font-weight: ; font-size: 13pt; color: #9f2b1e;
115
- font-family: DejaVuSansCondensed; margin-top: 10pt; margin-bottom: 7pt;
116
- text-align: ; margin-collapse:collapse; page-break-after:avoid; }
117
- h5 { font-weight: bold; font-style:italic; ; font-size: 11pt; color: #000044;
118
- font-family: DejaVuSansCondensed; margin-top: 8pt; margin-bottom: 4pt;
119
- text-align: ; page-break-after:avoid; }
120
- h6 { font-weight: bold; font-size: 9.5pt; color: #333333;
121
- font-family: DejaVuSansCondensed; margin-top: 6pt; margin-bottom: ;
122
- text-align: ; page-break-after:avoid; }
123
-
1
+ @page {
2
+ size: 15cm 17cm; /* width height <length>{1,2} | auto | portrait | landscape NB 'em' and 'ex' % are not allowed */
3
+ margin: 10%; /* % of page-box width for LR, height for TB */
4
+ margin-header: 5mm;
5
+ margin-footer: 5mm;
6
+ margin-left: 4cm;
7
+ margin-right: 2cm;
8
+ odd-header-name: myHeader2Odd;
9
+ even-header-name: html_myHTMLHeaderEven;
10
+ odd-footer-name: html_myHTMLFooterOdd;
11
+ even-footer-name: myFooter2Even;
12
+ marks: crop; /* crop | cross | none */
13
+ }
14
+
15
+ @page :first {
16
+ margin-top: 5cm; /* Top margin on first page 10cm */
17
+ }
18
+
19
+ @page standard {
20
+ size: auto; /* auto is the default mPDF value */
21
+ margin: 10%; /* % of page-box width for LR, height for TB */
22
+ marks: none; /* crop | cross | none */
23
+ }
24
+
25
+ @page standard :first {
26
+ margin-top: 7cm; /* Top margin on first page 10cm */
27
+ }
28
+
29
+ @page bigsquare {
30
+ size: 15cm 20cm;
31
+ margin-left: 4cm;
32
+ marks: crop cross; /* crop | cross | none */
33
+ background: transparent url('bg.jpg') repeat scroll 5mm 5mm; /* position inset by bleedMargin */
34
+ }
35
+
36
+ @page bigsquare :right {
37
+ header: html_myHTMLHeaderOdd;
38
+ footer: html_myHTMLFooterOdd;
39
+ }
40
+
41
+ @page bigsquare :left { /* left is what mPDF calls EVEN page - right=ODD */
42
+ header: html_myHTMLHeaderEven;
43
+ footer: html_myHTMLFooterEven;
44
+ }
45
+
46
+ @page smallsquare {
47
+ size: 25cm 15cm;
48
+ margin-left: 4cm;
49
+ marks: crop; /* crop | cross | none */
50
+ background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;
51
+ }
52
+
53
+ @page rotated {
54
+ size: landscape;
55
+ marks: none; /* crop | cross | none */
56
+ background-color: #fff0f2;
57
+ margin-left: 3cm;
58
+ margin-right: 3cm;
59
+ }
60
+ @page rotated :first {
61
+ margin-top: 7cm; /* Top margin on first page 10cm */
62
+ }
63
+
64
+ h1.heading1 { color: #1188FF;
65
+ }
66
+
67
+ h1.heading2 { color: #88FF11;
68
+ page-break-before: always;
69
+ page: standard;
70
+ }
71
+ h1.heading3 { color: #FF1188;
72
+ page-break-before: right;
73
+ }
74
+ h1.heading4 { color: #FF8811;
75
+ page-break-before: left;
76
+ page: bigsquare;
77
+ }
78
+ h1.heading5 { color: #11FF88;
79
+ page: smallsquare;
80
+ }
81
+ h1.heading6 { color: #8811FF;
82
+ page: rotated;
83
+ }
84
+
85
+ br.paging { page-break-after: always; }
86
+
87
+ body { font-family: DejaVuSansCondensed; font-size: 11pt; }
88
+ p { text-align: justify; margin-bottom: 4pt; margin-top:0pt; }
89
+
90
+ hr { width: 70%; height: 1px;
91
+ text-align: center; color: #999999;
92
+ margin-top: 8pt; margin-bottom: 8pt; }
93
+
94
+ a { color: #000066; font-style: normal; text-decoration: underline;
95
+ font-weight: normal; }
96
+
97
+ ul { text-indent: 5mm; margin-bottom: 9pt; }
98
+ ol { text-indent: 5mm; margin-bottom: 9pt; }
99
+
100
+ pre { font-family: DejaVuSansMono; font-size: 9pt; margin-top: 5pt; margin-bottom: 5pt; }
101
+
102
+ h1 { font-weight: normal; font-size: 26pt; color: #000066;
103
+ font-family: DejaVuSansCondensed; margin-top: 18pt; margin-bottom: 6pt;
104
+ border-top: 0.075cm solid #000000; border-bottom: 0.075cm solid #000000;
105
+ text-align: ; page-break-after:avoid; }
106
+ h2 { font-weight: bold; font-size: 12pt; color: #000066;
107
+ font-family: DejaVuSansCondensed; margin-top: 6pt; margin-bottom: 6pt;
108
+ border-top: 0.07cm solid #000000; border-bottom: 0.07cm solid #000000;
109
+ text-align: ; text-transform: uppercase; page-break-after:avoid; }
110
+ h3 { font-weight: normal; font-size: 26pt; color: #000000;
111
+ font-family: DejaVuSansCondensed; margin-top: 0pt; margin-bottom: 6pt;
112
+ border-top: 0; border-bottom: 0;
113
+ text-align: ; page-break-after:avoid; }
114
+ h4 { font-weight: ; font-size: 13pt; color: #9f2b1e;
115
+ font-family: DejaVuSansCondensed; margin-top: 10pt; margin-bottom: 7pt;
116
+ text-align: ; margin-collapse:collapse; page-break-after:avoid; }
117
+ h5 { font-weight: bold; font-style:italic; ; font-size: 11pt; color: #000044;
118
+ font-family: DejaVuSansCondensed; margin-top: 8pt; margin-bottom: 4pt;
119
+ text-align: ; page-break-after:avoid; }
120
+ h6 { font-weight: bold; font-size: 9.5pt; color: #333333;
121
+ font-family: DejaVuSansCondensed; margin-top: 6pt; margin-bottom: ;
122
+ text-align: ; page-break-after:avoid; }
123
+
resources/images/mpdfstyletables.css CHANGED
@@ -1,124 +1,124 @@
1
-
2
- body { font-family: DejaVuSansCondensed; font-size: 11pt; }
3
- p { text-align: justify; margin-bottom: 4pt; margin-top:0pt; }
4
-
5
- table {font-family: DejaVuSansCondensed; font-size: 9pt; line-height: 1.2;
6
- margin-top: 2pt; margin-bottom: 5pt;
7
- border-collapse: collapse; }
8
-
9
- thead { font-weight: bold; vertical-align: bottom; }
10
- tfoot { font-weight: bold; vertical-align: top; }
11
- thead td { font-weight: bold; }
12
- tfoot td { font-weight: bold; }
13
-
14
- thead td, thead th, tfoot td, tfoot th { font-variant: small-caps; }
15
-
16
- .headerrow td, .headerrow th { background-gradient: linear #b7cebd #f5f8f5 0 1 0 0.2; }
17
- .footerrow td, .footerrow th { background-gradient: linear #b7cebd #f5f8f5 0 1 0 0.2; }
18
-
19
- th { font-weight: bold;
20
- vertical-align: top;
21
- text-align:left;
22
- padding-left: 2mm;
23
- padding-right: 2mm;
24
- padding-top: 0.5mm;
25
- padding-bottom: 0.5mm;
26
- }
27
-
28
- td { padding-left: 2mm;
29
- vertical-align: top;
30
- text-align:left;
31
- padding-right: 2mm;
32
- padding-top: 0.5mm;
33
- padding-bottom: 0.5mm;
34
- }
35
-
36
- th p { text-align: left; margin:0pt; }
37
- td p { text-align: left; margin:0pt; }
38
-
39
- table.widecells td {
40
- padding-left: 5mm;
41
- padding-right: 5mm;
42
- }
43
- table.tallcells td {
44
- padding-top: 3mm;
45
- padding-bottom: 3mm;
46
- }
47
-
48
- hr { width: 70%; height: 1px;
49
- text-align: center; color: #999999;
50
- margin-top: 8pt; margin-bottom: 8pt; }
51
-
52
- a { color: #000066; font-style: normal; text-decoration: underline;
53
- font-weight: normal; }
54
-
55
- ul { text-indent: 5mm; margin-bottom: 9pt; }
56
- ol { text-indent: 5mm; margin-bottom: 9pt; }
57
-
58
- pre { font-family: DejaVuSansMono; font-size: 9pt; margin-top: 5pt; margin-bottom: 5pt; }
59
-
60
- h1 { font-weight: normal; font-size: 26pt; color: #000066;
61
- font-family: DejaVuSansCondensed; margin-top: 18pt; margin-bottom: 6pt;
62
- border-top: 0.075cm solid #000000; border-bottom: 0.075cm solid #000000;
63
- text-align: ; page-break-after:avoid; }
64
- h2 { font-weight: bold; font-size: 12pt; color: #000066;
65
- font-family: DejaVuSansCondensed; margin-top: 6pt; margin-bottom: 6pt;
66
- border-top: 0.07cm solid #000000; border-bottom: 0.07cm solid #000000;
67
- text-align: ; text-transform:uppercase; page-break-after:avoid; }
68
- h3 { font-weight: normal; font-size: 26pt; color: #000000;
69
- font-family: DejaVuSansCondensed; margin-top: 0pt; margin-bottom: 6pt;
70
- border-top: 0; border-bottom: 0;
71
- text-align: ; page-break-after:avoid; }
72
- h4 { font-weight: ; font-size: 13pt; color: #9f2b1e;
73
- font-family: DejaVuSansCondensed; margin-top: 10pt; margin-bottom: 7pt;
74
- font-variant: small-caps;
75
- text-align: ; margin-collapse:collapse; page-break-after:avoid; }
76
- h5 { font-weight: bold; font-style:italic; ; font-size: 11pt; color: #000044;
77
- font-family: DejaVuSansCondensed; margin-top: 8pt; margin-bottom: 4pt;
78
- text-align: ; page-break-after:avoid; }
79
- h6 { font-weight: bold; font-size: 9.5pt; color: #333333;
80
- font-family: DejaVuSansCondensed; margin-top: 6pt; margin-bottom: ;
81
- text-align: ; page-break-after:avoid; }
82
-
83
- .breadcrumb {
84
- text-align: right; font-size: 8pt; font-family: DejaVuSerifCondensed; color: #666666;
85
- font-weight: bold; font-style: normal; margin-bottom: 6pt; }
86
-
87
- .evenrow td, .evenrow th { background-color: #f5f8f5; }
88
- .oddrow td, .oddrow th { background-color: #e3ece4; }
89
-
90
- .bpmTopic { background-color: #e3ece4; }
91
- .bpmTopicC { background-color: #e3ece4; }
92
- .bpmNoLines { background-color: #e3ece4; }
93
- .bpmNoLinesC { background-color: #e3ece4; }
94
- .bpmClear { }
95
- .bpmClearC { text-align: center; }
96
- .bpmTopnTail { background-color: #e3ece4; topntail: 0.02cm solid #495b4a;}
97
- .bpmTopnTailC { background-color: #e3ece4; topntail: 0.02cm solid #495b4a;}
98
- .bpmTopnTailClear { topntail: 0.02cm solid #495b4a; }
99
- .bpmTopnTailClearC { topntail: 0.02cm solid #495b4a; }
100
-
101
- .bpmTopicC td, .bpmTopicC td p { text-align: center; }
102
- .bpmNoLinesC td, .bpmNoLinesC td p { text-align: center; }
103
- .bpmClearC td, .bpmClearC td p { text-align: center; }
104
- .bpmTopnTailC td, .bpmTopnTailC td p { text-align: center; }
105
- .bpmTopnTailClearC td, .bpmTopnTailClearC td p { text-align: center; }
106
-
107
- .pmhMiddleCenter { text-align:center; vertical-align:middle; }
108
- .pmhMiddleRight { text-align:right; vertical-align:middle; }
109
- .pmhBottomCenter { text-align:center; vertical-align:bottom; }
110
- .pmhBottomRight { text-align:right; vertical-align:bottom; }
111
- .pmhTopCenter { text-align:center; vertical-align:top; }
112
- .pmhTopRight { text-align:right; vertical-align:top; }
113
- .pmhTopLeft { text-align:left; vertical-align:top; }
114
- .pmhBottomLeft { text-align:left; vertical-align:bottom; }
115
- .pmhMiddleLeft { text-align:left; vertical-align:middle; }
116
-
117
- .infobox { margin-top:10pt; background-color:#DDDDBB; text-align:center; border:1px solid #880000; }
118
-
119
- .bpmTopic td, .bpmTopic th { border-top: 1px solid #FFFFFF; }
120
- .bpmTopicC td, .bpmTopicC th { border-top: 1px solid #FFFFFF; }
121
- .bpmTopnTail td, .bpmTopnTail th { border-top: 1px solid #FFFFFF; }
122
- .bpmTopnTailC td, .bpmTopnTailC th { border-top: 1px solid #FFFFFF; }
123
-
124
-
1
+
2
+ body { font-family: DejaVuSansCondensed; font-size: 11pt; }
3
+ p { text-align: justify; margin-bottom: 4pt; margin-top:0pt; }
4
+
5
+ table {font-family: DejaVuSansCondensed; font-size: 9pt; line-height: 1.2;
6
+ margin-top: 2pt; margin-bottom: 5pt;
7
+ border-collapse: collapse; }
8
+
9
+ thead { font-weight: bold; vertical-align: bottom; }
10
+ tfoot { font-weight: bold; vertical-align: top; }
11
+ thead td { font-weight: bold; }
12
+ tfoot td { font-weight: bold; }
13
+
14
+ thead td, thead th, tfoot td, tfoot th { font-variant: small-caps; }
15
+
16
+ .headerrow td, .headerrow th { background-gradient: linear #b7cebd #f5f8f5 0 1 0 0.2; }
17
+ .footerrow td, .footerrow th { background-gradient: linear #b7cebd #f5f8f5 0 1 0 0.2; }
18
+
19
+ th { font-weight: bold;
20
+ vertical-align: top;
21
+ text-align:left;
22
+ padding-left: 2mm;
23
+ padding-right: 2mm;
24
+ padding-top: 0.5mm;
25
+ padding-bottom: 0.5mm;
26
+ }
27
+
28
+ td { padding-left: 2mm;
29
+ vertical-align: top;
30
+ text-align:left;
31
+ padding-right: 2mm;
32
+ padding-top: 0.5mm;
33
+ padding-bottom: 0.5mm;
34
+ }
35
+
36
+ th p { text-align: left; margin:0pt; }
37
+ td p { text-align: left; margin:0pt; }
38
+
39
+ table.widecells td {
40
+ padding-left: 5mm;
41
+ padding-right: 5mm;
42
+ }
43
+ table.tallcells td {
44
+ padding-top: 3mm;
45
+ padding-bottom: 3mm;
46
+ }
47
+
48
+ hr { width: 70%; height: 1px;
49
+ text-align: center; color: #999999;
50
+ margin-top: 8pt; margin-bottom: 8pt; }
51
+
52
+ a { color: #000066; font-style: normal; text-decoration: underline;
53
+ font-weight: normal; }
54
+
55
+ ul { text-indent: 5mm; margin-bottom: 9pt; }
56
+ ol { text-indent: 5mm; margin-bottom: 9pt; }
57
+
58
+ pre { font-family: DejaVuSansMono; font-size: 9pt; margin-top: 5pt; margin-bottom: 5pt; }
59
+
60
+ h1 { font-weight: normal; font-size: 26pt; color: #000066;
61
+ font-family: DejaVuSansCondensed; margin-top: 18pt; margin-bottom: 6pt;
62
+ border-top: 0.075cm solid #000000; border-bottom: 0.075cm solid #000000;
63
+ text-align: ; page-break-after:avoid; }
64
+ h2 { font-weight: bold; font-size: 12pt; color: #000066;
65
+ font-family: DejaVuSansCondensed; margin-top: 6pt; margin-bottom: 6pt;
66
+ border-top: 0.07cm solid #000000; border-bottom: 0.07cm solid #000000;
67
+ text-align: ; text-transform:uppercase; page-break-after:avoid; }
68
+ h3 { font-weight: normal; font-size: 26pt; color: #000000;
69
+ font-family: DejaVuSansCondensed; margin-top: 0pt; margin-bottom: 6pt;
70
+ border-top: 0; border-bottom: 0;
71
+ text-align: ; page-break-after:avoid; }
72
+ h4 { font-weight: ; font-size: 13pt; color: #9f2b1e;
73
+ font-family: DejaVuSansCondensed; margin-top: 10pt; margin-bottom: 7pt;
74
+ font-variant: small-caps;
75
+ text-align: ; margin-collapse:collapse; page-break-after:avoid; }
76
+ h5 { font-weight: bold; font-style:italic; ; font-size: 11pt; color: #000044;
77
+ font-family: DejaVuSansCondensed; margin-top: 8pt; margin-bottom: 4pt;
78
+ text-align: ; page-break-after:avoid; }
79
+ h6 { font-weight: bold; font-size: 9.5pt; color: #333333;
80
+ font-family: DejaVuSansCondensed; margin-top: 6pt; margin-bottom: ;
81
+ text-align: ; page-break-after:avoid; }
82
+
83
+ .breadcrumb {
84
+ text-align: right; font-size: 8pt; font-family: DejaVuSerifCondensed; color: #666666;
85
+ font-weight: bold; font-style: normal; margin-bottom: 6pt; }
86
+
87
+ .evenrow td, .evenrow th { background-color: #f5f8f5; }
88
+ .oddrow td, .oddrow th { background-color: #e3ece4; }
89
+
90
+ .bpmTopic { background-color: #e3ece4; }
91
+ .bpmTopicC { background-color: #e3ece4; }
92
+ .bpmNoLines { background-color: #e3ece4; }
93
+ .bpmNoLinesC { background-color: #e3ece4; }
94
+ .bpmClear { }
95
+ .bpmClearC { text-align: center; }
96
+ .bpmTopnTail { background-color: #e3ece4; topntail: 0.02cm solid #495b4a;}
97
+ .bpmTopnTailC { background-color: #e3ece4; topntail: 0.02cm solid #495b4a;}
98
+ .bpmTopnTailClear { topntail: 0.02cm solid #495b4a; }
99
+ .bpmTopnTailClearC { topntail: 0.02cm solid #495b4a; }
100
+
101
+ .bpmTopicC td, .bpmTopicC td p { text-align: center; }
102
+ .bpmNoLinesC td, .bpmNoLinesC td p { text-align: center; }
103
+ .bpmClearC td, .bpmClearC td p { text-align: center; }
104
+ .bpmTopnTailC td, .bpmTopnTailC td p { text-align: center; }
105
+ .bpmTopnTailClearC td, .bpmTopnTailClearC td p { text-align: center; }
106
+
107
+ .pmhMiddleCenter { text-align:center; vertical-align:middle; }
108
+ .pmhMiddleRight { text-align:right; vertical-align:middle; }
109
+ .pmhBottomCenter { text-align:center; vertical-align:bottom; }
110
+ .pmhBottomRight { text-align:right; vertical-align:bottom; }
111
+ .pmhTopCenter { text-align:center; vertical-align:top; }
112
+ .pmhTopRight { text-align:right; vertical-align:top; }
113
+ .pmhTopLeft { text-align:left; vertical-align:top; }
114
+ .pmhBottomLeft { text-align:left; vertical-align:bottom; }
115
+ .pmhMiddleLeft { text-align:left; vertical-align:middle; }
116
+
117
+ .infobox { margin-top:10pt; background-color:#DDDDBB; text-align:center; border:1px solid #880000; }
118
+
119
+ .bpmTopic td, .bpmTopic th { border-top: 1px solid #FFFFFF; }
120
+ .bpmTopicC td, .bpmTopicC th { border-top: 1px solid #FFFFFF; }
121
+ .bpmTopnTail td, .bpmTopnTail th { border-top: 1px solid #FFFFFF; }
122
+ .bpmTopnTailC td, .bpmTopnTailC th { border-top: 1px solid #FFFFFF; }
123
+
124
+
resources/images/tiger.svg CHANGED
@@ -1,726 +1,726 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 40 580 530">
4
- <g transform="translate(200, 200)" style="fill-opacity: 1; fill: none;">
5
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
6
- <path d="M-122.304 84.285C-122.304 84.285 -122.203 86.179 -123.027 86.16C-123.851 86.141 -140.305 38.066 -160.833 40.309C-160.833 40.309 -143.05 32.956 -122.304 84.285z"/>
7
- </g>
8
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
9
- <path d="M-118.774 81.262C-118.774 81.262 -119.323 83.078 -120.092 82.779C-120.86 82.481 -119.977 31.675 -140.043 26.801C-140.043 26.801 -120.82 25.937 -118.774 81.262z"/>
10
- </g>
11
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
12
- <path d="M-91.284 123.59C-91.284 123.59 -89.648 124.55 -90.118 125.227C-90.589 125.904 -139.763 113.102 -149.218 131.459C-149.218 131.459 -145.539 112.572 -91.284 123.59z"/>
13
- </g>
14
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
15
- <path d="M-94.093 133.801C-94.093 133.801 -92.237 134.197 -92.471 134.988C-92.704 135.779 -143.407 139.121 -146.597 159.522C-146.597 159.522 -149.055 140.437 -94.093 133.801z"/>
16
- </g>
17
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
18
- <path d="M-98.304 128.276C-98.304 128.276 -96.526 128.939 -96.872 129.687C-97.218 130.435 -147.866 126.346 -153.998 146.064C-153.998 146.064 -153.646 126.825 -98.304 128.276z"/>
19
- </g>
20
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
21
- <path d="M-109.009 110.072C-109.009 110.072 -107.701 111.446 -108.34 111.967C-108.979 112.488 -152.722 86.634 -166.869 101.676C-166.869 101.676 -158.128 84.533 -109.009 110.072z"/>
22
- </g>
23
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
24
- <path d="M-116.554 114.263C-116.554 114.263 -115.098 115.48 -115.674 116.071C-116.25 116.661 -162.638 95.922 -174.992 112.469C-174.992 112.469 -168.247 94.447 -116.554 114.263z"/>
25
- </g>
26
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
27
- <path d="M-119.154 118.335C-119.154 118.335 -117.546 119.343 -118.036 120.006C-118.526 120.669 -167.308 106.446 -177.291 124.522C-177.291 124.522 -173.066 105.749 -119.154 118.335z"/>
28
- </g>
29
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
30
- <path d="M-108.42 118.949C-108.42 118.949 -107.298 120.48 -107.999 120.915C-108.7 121.35 -148.769 90.102 -164.727 103.207C-164.727 103.207 -153.862 87.326 -108.42 118.949z"/>
31
- </g>
32
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
33
- <path d="M-128.2 90C-128.2 90 -127.6 91.8 -128.4 92C-129.2 92.2 -157.8 50.2 -177.001 57.8C-177.001 57.8 -161.8 46 -128.2 90z"/>
34
- </g>
35
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
36
- <path d="M-127.505 96.979C-127.505 96.979 -126.53 98.608 -127.269 98.975C-128.007 99.343 -164.992 64.499 -182.101 76.061C-182.101 76.061 -169.804 61.261 -127.505 96.979z"/>
37
- </g>
38
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
39
- <path d="M-127.62 101.349C-127.62 101.349 -126.498 102.88 -127.199 103.315C-127.9 103.749 -167.969 72.502 -183.927 85.607C-183.927 85.607 -173.062 69.726 -127.62 101.349z"/>
40
- </g>
41
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0);">
42
- <path d="M-129.83 103.065C-129.327 109.113 -128.339 115.682 -126.6 118.801C-126.6 118.801 -130.2 131.201 -121.4 144.401C-121.4 144.401 -121.8 151.601 -120.2 154.801C-120.2 154.801 -116.2 163.201 -111.4 164.001C-107.516 164.648 -98.793 167.717 -88.932 169.121C-88.932 169.121 -71.8 183.201 -75 196.001C-75 196.001 -75.4 212.401 -79 214.001C-79 214.001 -67.4 202.801 -77 219.601L-81.4 238.401C-81.4 238.401 -55.8 216.801 -71.4 235.201L-81.4 261.201C-81.4 261.201 -61.8 242.801 -69 251.201L-72.2 260.001C-72.2 260.001 -29 232.801 -59.8 262.401C-59.8 262.401 -51.8 258.801 -47.4 261.601C-47.4 261.601 -40.6 260.401 -41.4 262.001C-41.4 262.001 -62.2 272.401 -65.8 290.801C-65.8 290.801 -57.4 280.801 -60.6 291.601L-60.2 303.201C-60.2 303.201 -56.2 281.601 -56.6 319.201C-56.6 319.201 -37.4 301.201 -49 322.001L-49 338.801C-49 338.801 -33.8 322.401 -40.2 335.201C-40.2 335.201 -30.2 326.401 -34.2 341.601C-34.2 341.601 -35 352.001 -30.6 340.801C-30.6 340.801 -14.6 310.201 -20.6 336.401C-20.6 336.401 -21.4 355.601 -16.6 340.801C-16.6 340.801 -16.2 351.201 -7 358.401C-7 358.401 -8.2 307.601 4.6 343.601L8.6 360.001C8.6 360.001 11.4 350.801 11 345.601C11 345.601 25.8 329.201 19 353.601C19 353.601 34.2 330.801 31 344.001C31 344.001 23.4 360.001 25 364.801C25 364.801 41.8 330.001 43 328.401C43 328.401 41 370.802 51.8 334.801C51.8 334.801 57.4 346.801 54.6 351.201C54.6 351.201 62.6 343.201 61.8 340.001C61.8 340.001 66.4 331.801 69.2 345.401C69.2 345.401 71 354.801 72.6 351.601C72.6 351.601 76.6 375.602 77.8 352.801C77.8 352.801 79.4 339.201 72.2 327.601C72.2 327.601 73 324.401 70.2 320.401C70.2 320.401 83.8 342.001 76.6 313.201C76.6 313.201 87.801 321.201 89.001 321.201C89.001 321.201 75.4 298.001 84.2 302.801C84.2 302.801 79 292.401 97.001 304.401C97.001 304.401 81 288.401 98.601 298.001C98.601 298.001 106.601 304.401 99.001 294.401C99.001 294.401 84.6 278.401 106.601 296.401C106.601 296.401 118.201 312.801 119.001 315.601C119.001 315.601 109.001 286.401 104.601 283.601C104.601 283.601 113.001 247.201 154.201 262.801C154.201 262.801 161.001 280.001 165.401 261.601C165.401 261.601 178.201 255.201 189.401 282.801C189.401 282.801 193.401 269.201 192.601 266.401C192.601 266.401 199.401 267.601 198.601 266.401C198.601 266.401 211.801 270.801 213.001 270.001C213.001 270.001 219.801 276.801 220.201 273.201C220.201 273.201 229.401 276.001 227.401 272.401C227.401 272.401 236.201 288.001 236.601 291.601L239.001 277.601L241.001 280.401C241.001 280.401 242.601 272.801 241.801 271.601C241.001 270.401 261.801 278.401 266.601 299.201L268.601 307.601C268.601 307.601 274.601 292.801 273.001 288.801C273.001 288.801 278.201 289.601 278.601 294.001C278.601 294.001 282.601 270.801 277.801 264.801C277.801 264.801 282.201 264.001 283.401 267.601L283.401 260.401C283.401 260.401 290.601 261.201 290.601 258.801C290.601 258.801 295.001 254.801 297.001 259.601C297.001 259.601 284.601 224.401 303.001 243.601C303.001 243.601 310.201 254.401 306.601 235.601C303.001 216.801 299.001 215.201 303.801 214.801C303.801 214.801 304.601 211.201 302.601 209.601C300.601 208.001 303.801 209.601 303.801 209.601C303.801 209.601 308.601 213.601 303.401 191.601C303.401 191.601 309.801 193.201 297.801 164.001C297.801 164.001 300.601 161.601 296.601 153.201C296.601 153.201 304.601 157.601 307.401 156.001C307.401 156.001 307.001 154.401 303.801 150.401C303.801 150.401 282.201 95.6 302.601 117.601C302.601 117.601 314.451 131.151 308.051 108.351C308.051 108.351 298.94 84.341 299.717 80.045L-129.83 103.065z"/>
43
- </g>
44
- <g style="fill: rgb(204, 114, 38); stroke: rgb(0, 0, 0);">
45
- <path d="M299.717 80.245C300.345 80.426 302.551 81.55 303.801 83.2C303.801 83.2 310.601 94 305.401 75.6C305.401 75.6 296.201 46.8 305.001 58C305.001 58 311.001 65.2 307.801 51.6C303.936 35.173 301.401 28.8 301.401 28.8C301.401 28.8 313.001 33.6 286.201 -6L295.001 -2.4C295.001 -2.4 275.401 -42 253.801 -47.2L245.801 -53.2C245.801 -53.2 284.201 -91.2 271.401 -128C271.401 -128 264.601 -133.2 255.001 -124C255.001 -124 248.601 -119.2 242.601 -120.8C242.601 -120.8 211.801 -119.6 209.801 -119.6C207.801 -119.6 173.001 -156.8 107.401 -139.2C107.401 -139.2 102.201 -137.2 97.801 -138.4C97.801 -138.4 79.4 -154.4 30.6 -131.6C30.6 -131.6 20.6 -129.6 19 -129.6C17.4 -129.6 14.6 -129.6 6.6 -123.2C-1.4 -116.8 -1.8 -116 -3.8 -114.4C-3.8 -114.4 -20.2 -103.2 -25 -102.4C-25 -102.4 -36.6 -96 -41 -86L-44.6 -84.8C-44.6 -84.8 -46.2 -77.6 -46.6 -76.4C-46.6 -76.4 -51.4 -72.8 -52.2 -67.2C-52.2 -67.2 -61 -61.2 -60.6 -56.8C-60.6 -56.8 -62.2 -51.6 -63 -46.8C-63 -46.8 -70.2 -42 -69.4 -39.2C-69.4 -39.2 -77 -25.2 -75.8 -18.4C-75.8 -18.4 -82.2 -18.8 -85 -16.4C-85 -16.4 -85.8 -11.6 -87.4 -11.2C-87.4 -11.2 -90.2 -10 -87.8 -6C-87.8 -6 -89.4 -3.2 -89.8 -1.6C-89.8 -1.6 -89 1.2 -93.4 6.8C-93.4 6.8 -99.8 25.6 -97.8 30.8C-97.8 30.8 -97.4 35.6 -100.2 37.2C-100.2 37.2 -103.8 36.8 -95.4 48.8C-95.4 48.8 -94.6 50 -97.8 52.4C-97.8 52.4 -115 56 -117.4 72.4C-117.4 72.4 -131 87.2 -131 92.4C-131 94.705 -130.729 97.852 -130.03 102.465C-130.03 102.465 -130.6 110.801 -103 111.601C-75.4 112.401 299.717 80.245 299.717 80.245z"/>
46
- </g>
47
- <g style="fill: rgb(204, 114, 38);">
48
- <path d="M-115.6 102.6C-140.6 63.2 -126.2 119.601 -126.2 119.601C-117.4 154.001 12.2 116.401 12.2 116.401C12.2 116.401 181.001 86 192.201 82C203.401 78 298.601 84.4 298.601 84.4L293.001 67.6C228.201 21.2 209.001 44.4 195.401 40.4C181.801 36.4 184.201 46 181.001 46.8C177.801 47.6 138.601 22.8 132.201 23.6C125.801 24.4 100.459 0.649 115.401 32.4C131.401 66.4 57 71.6 40.2 60.4C23.4 49.2 47.4 78.8 47.4 78.8C65.8 98.8 31.4 82 31.4 82C-3 69.2 -27 94.8 -30.2 95.6C-33.4 96.4 -38.2 99.6 -39 93.2C-39.8 86.8 -47.31 70.099 -79 96.4C-99 113.001 -112.8 91 -112.8 91L-115.6 102.6z"/>
49
- </g>
50
- <g style="fill: rgb(232, 127, 58);">
51
- <path d="M133.51 25.346C127.11 26.146 101.743 2.407 116.71 34.146C133.31 69.346 58.31 73.346 41.51 62.146C24.709 50.946 48.71 80.546 48.71 80.546C67.11 100.546 32.709 83.746 32.709 83.746C-1.691 70.946 -25.691 96.546 -28.891 97.346C-32.091 98.146 -36.891 101.346 -37.691 94.946C-38.491 88.546 -45.87 72.012 -77.691 98.146C-98.927 115.492 -112.418 94.037 -112.418 94.037L-115.618 104.146C-140.618 64.346 -125.546 122.655 -125.546 122.655C-116.745 157.056 13.509 118.146 13.509 118.146C13.509 118.146 182.31 87.746 193.51 83.746C204.71 79.746 299.038 86.073 299.038 86.073L293.51 68.764C228.71 22.364 210.31 46.146 196.71 42.146C183.11 38.146 185.51 47.746 182.31 48.546C179.11 49.346 139.91 24.546 133.51 25.346z"/>
52
- </g>
53
- <g style="fill: rgb(234, 140, 77);">
54
- <path d="M134.819 27.091C128.419 27.891 103.685 3.862 118.019 35.891C134.219 72.092 59.619 75.092 42.819 63.892C26.019 52.692 50.019 82.292 50.019 82.292C68.419 102.292 34.019 85.492 34.019 85.492C-0.381 72.692 -24.382 98.292 -27.582 99.092C-30.782 99.892 -35.582 103.092 -36.382 96.692C-37.182 90.292 -44.43 73.925 -76.382 99.892C-98.855 117.983 -112.036 97.074 -112.036 97.074L-115.636 105.692C-139.436 66.692 -124.891 125.71 -124.891 125.71C-116.091 160.11 14.819 119.892 14.819 119.892C14.819 119.892 183.619 89.492 194.819 85.492C206.019 81.492 299.474 87.746 299.474 87.746L294.02 69.928C229.219 23.528 211.619 47.891 198.019 43.891C184.419 39.891 186.819 49.491 183.619 50.292C180.419 51.092 141.219 26.291 134.819 27.091z"/>
55
- </g>
56
- <g style="fill: rgb(236, 153, 97);">
57
- <path d="M136.128 28.837C129.728 29.637 104.999 5.605 119.328 37.637C136.128 75.193 60.394 76.482 44.128 65.637C27.328 54.437 51.328 84.037 51.328 84.037C69.728 104.037 35.328 87.237 35.328 87.237C0.928 74.437 -23.072 100.037 -26.272 100.837C-29.472 101.637 -34.272 104.837 -35.072 98.437C-35.872 92.037 -42.989 75.839 -75.073 101.637C-98.782 120.474 -111.655 100.11 -111.655 100.11L-115.655 107.237C-137.455 70.437 -124.236 128.765 -124.236 128.765C-115.436 163.165 16.128 121.637 16.128 121.637C16.128 121.637 184.928 91.237 196.129 87.237C207.329 83.237 299.911 89.419 299.911 89.419L294.529 71.092C229.729 24.691 212.929 49.637 199.329 45.637C185.728 41.637 188.128 51.237 184.928 52.037C181.728 52.837 142.528 28.037 136.128 28.837z"/>
58
- </g>
59
- <g style="fill: rgb(238, 165, 117);">
60
- <path d="M137.438 30.583C131.037 31.383 106.814 7.129 120.637 39.383C137.438 78.583 62.237 78.583 45.437 67.383C28.637 56.183 52.637 85.783 52.637 85.783C71.037 105.783 36.637 88.983 36.637 88.983C2.237 76.183 -21.763 101.783 -24.963 102.583C-28.163 103.383 -32.963 106.583 -33.763 100.183C-34.563 93.783 -41.548 77.752 -73.763 103.383C-98.709 122.965 -111.273 103.146 -111.273 103.146L-115.673 108.783C-135.473 73.982 -123.582 131.819 -123.582 131.819C-114.782 166.22 17.437 123.383 17.437 123.383C17.437 123.383 186.238 92.983 197.438 88.983C208.638 84.983 300.347 91.092 300.347 91.092L295.038 72.255C230.238 25.855 214.238 51.383 200.638 47.383C187.038 43.383 189.438 52.983 186.238 53.783C183.038 54.583 143.838 29.783 137.438 30.583z"/>
61
- </g>
62
- <g style="fill: rgb(241, 178, 136);">
63
- <path d="M138.747 32.328C132.347 33.128 106.383 9.677 121.947 41.128C141.147 79.928 63.546 80.328 46.746 69.128C29.946 57.928 53.946 87.528 53.946 87.528C72.346 107.528 37.946 90.728 37.946 90.728C3.546 77.928 -20.454 103.528 -23.654 104.328C-26.854 105.128 -31.654 108.328 -32.454 101.928C-33.254 95.528 -40.108 79.665 -72.454 105.128C-98.636 125.456 -110.891 106.183 -110.891 106.183L-115.691 110.328C-133.691 77.128 -122.927 134.874 -122.927 134.874C-114.127 169.274 18.746 125.128 18.746 125.128C18.746 125.128 187.547 94.728 198.747 90.728C209.947 86.728 300.783 92.764 300.783 92.764L295.547 73.419C230.747 27.019 215.547 53.128 201.947 49.128C188.347 45.128 190.747 54.728 187.547 55.528C184.347 56.328 145.147 31.528 138.747 32.328z"/>
64
- </g>
65
- <g style="fill: rgb(243, 191, 156);">
66
- <path d="M140.056 34.073C133.655 34.873 107.313 11.613 123.255 42.873C143.656 82.874 64.855 82.074 48.055 70.874C31.255 59.674 55.255 89.274 55.255 89.274C73.655 109.274 39.255 92.474 39.255 92.474C4.855 79.674 -19.145 105.274 -22.345 106.074C-25.545 106.874 -30.345 110.074 -31.145 103.674C-31.945 97.274 -38.668 81.578 -71.145 106.874C-98.564 127.947 -110.509 109.219 -110.509 109.219L-115.709 111.874C-131.709 81.674 -122.273 137.929 -122.273 137.929C-113.473 172.329 20.055 126.874 20.055 126.874C20.055 126.874 188.856 96.474 200.056 92.474C211.256 88.474 301.22 94.437 301.22 94.437L296.056 74.583C231.256 28.183 216.856 54.874 203.256 50.874C189.656 46.873 192.056 56.474 188.856 57.274C185.656 58.074 146.456 33.273 140.056 34.073z"/>
67
- </g>
68
- <g style="fill: rgb(245, 204, 176);">
69
- <path d="M141.365 35.819C134.965 36.619 107.523 13.944 124.565 44.619C146.565 84.219 66.164 83.819 49.364 72.619C32.564 61.419 56.564 91.019 56.564 91.019C74.964 111.019 40.564 94.219 40.564 94.219C6.164 81.419 -17.836 107.019 -21.036 107.819C-24.236 108.619 -29.036 111.819 -29.836 105.419C-30.636 99.019 -37.227 83.492 -69.836 108.619C-98.491 130.438 -110.127 112.256 -110.127 112.256L-115.727 113.419C-130.128 85.019 -121.618 140.983 -121.618 140.983C-112.818 175.384 21.364 128.619 21.364 128.619C21.364 128.619 190.165 98.219 201.365 94.219C212.565 90.219 301.656 96.11 301.656 96.11L296.565 75.746C231.765 29.346 218.165 56.619 204.565 52.619C190.965 48.619 193.365 58.219 190.165 59.019C186.965 59.819 147.765 35.019 141.365 35.819z"/>
70
- </g>
71
- <g style="fill: rgb(248, 216, 196);">
72
- <path d="M142.674 37.565C136.274 38.365 108.832 15.689 125.874 46.365C147.874 85.965 67.474 85.565 50.674 74.365C33.874 63.165 57.874 92.765 57.874 92.765C76.274 112.765 41.874 95.965 41.874 95.965C7.473 83.165 -16.527 108.765 -19.727 109.565C-22.927 110.365 -27.727 113.565 -28.527 107.165C-29.327 100.765 -35.786 85.405 -68.527 110.365C-98.418 132.929 -109.745 115.293 -109.745 115.293L-115.745 114.965C-129.346 88.564 -120.963 144.038 -120.963 144.038C-112.163 178.438 22.673 130.365 22.673 130.365C22.673 130.365 191.474 99.965 202.674 95.965C213.874 91.965 302.093 97.783 302.093 97.783L297.075 76.91C232.274 30.51 219.474 58.365 205.874 54.365C192.274 50.365 194.674 59.965 191.474 60.765C188.274 61.565 149.074 36.765 142.674 37.565z"/>
73
- </g>
74
- <g style="fill: rgb(250, 229, 215);">
75
- <path d="M143.983 39.31C137.583 40.11 110.529 17.223 127.183 48.11C149.183 88.91 68.783 87.31 51.983 76.11C35.183 64.91 59.183 94.51 59.183 94.51C77.583 114.51 43.183 97.71 43.183 97.71C8.783 84.91 -15.217 110.51 -18.417 111.31C-21.618 112.11 -26.418 115.31 -27.218 108.91C-28.018 102.51 -34.346 87.318 -67.218 112.11C-98.345 135.42 -109.363 118.329 -109.363 118.329L-115.764 116.51C-128.764 92.51 -120.309 147.093 -120.309 147.093C-111.509 181.493 23.983 132.11 23.983 132.11C23.983 132.11 192.783 101.71 203.983 97.71C215.183 93.71 302.529 99.456 302.529 99.456L297.583 78.074C232.783 31.673 220.783 60.11 207.183 56.11C193.583 52.11 195.983 61.71 192.783 62.51C189.583 63.31 150.383 38.51 143.983 39.31z"/>
76
- </g>
77
- <g style="fill: rgb(252, 242, 235);">
78
- <path d="M145.292 41.055C138.892 41.855 112.917 18.411 128.492 49.855C149.692 92.656 70.092 89.056 53.292 77.856C36.492 66.656 60.492 96.256 60.492 96.256C78.892 116.256 44.492 99.456 44.492 99.456C10.092 86.656 -13.908 112.256 -17.108 113.056C-20.308 113.856 -25.108 117.056 -25.908 110.656C-26.708 104.256 -32.905 89.232 -65.908 113.856C-98.273 137.911 -108.982 121.365 -108.982 121.365L-115.782 118.056C-128.582 94.856 -119.654 150.147 -119.654 150.147C-110.854 184.547 25.292 133.856 25.292 133.856C25.292 133.856 194.093 103.456 205.293 99.456C216.493 95.456 302.965 101.128 302.965 101.128L298.093 79.237C233.292 32.837 222.093 61.856 208.493 57.856C194.893 53.855 197.293 63.456 194.093 64.256C190.892 65.056 151.692 40.255 145.292 41.055z"/>
79
- </g>
80
- <g style="fill: rgb(255, 255, 255);">
81
- <path d="M-115.8 119.601C-128.6 97.6 -119 153.201 -119 153.201C-110.2 187.601 26.6 135.601 26.6 135.601C26.6 135.601 195.401 105.2 206.601 101.2C217.801 97.2 303.401 102.8 303.401 102.8L298.601 80.4C233.801 34 223.401 63.6 209.801 59.6C196.201 55.6 198.601 65.2 195.401 66C192.201 66.8 153.001 42 146.601 42.8C140.201 43.6 114.981 19.793 129.801 51.6C152.028 99.307 69.041 89.227 54.6 79.6C37.8 68.4 61.8 98 61.8 98C80.2 118.001 45.8 101.2 45.8 101.2C11.4 88.4 -12.6 114.001 -15.8 114.801C-19 115.601 -23.8 118.801 -24.6 112.401C-25.4 106 -31.465 91.144 -64.6 115.601C-98.2 140.401 -108.6 124.401 -108.6 124.401L-115.8 119.601z"/>
82
- </g>
83
- <g style="fill: rgb(0, 0, 0);">
84
- <path d="M-74.2 149.601C-74.2 149.601 -81.4 161.201 -60.6 174.401C-60.6 174.401 -59.2 175.801 -77.2 171.601C-77.2 171.601 -83.4 169.601 -85 159.201C-85 159.201 -89.8 154.801 -94.6 149.201C-99.4 143.601 -74.2 149.601 -74.2 149.601z"/>
85
- </g>
86
- <g style="fill: rgb(204, 204, 204);">
87
- <path d="M65.8 102C65.8 102 83.498 128.821 82.9 133.601C81.6 144.001 81.4 153.601 84.6 157.601C87.801 161.601 96.601 194.801 96.601 194.801C96.601 194.801 96.201 196.001 108.601 158.001C108.601 158.001 120.201 142.001 100.201 123.601C100.201 123.601 65 94.8 65.8 102z"/>
88
- </g>
89
- <g style="fill: rgb(0, 0, 0);">
90
- <path d="M-54.2 176.401C-54.2 176.401 -43 183.601 -57.4 214.801L-51 212.401C-51 212.401 -51.8 223.601 -55 226.001L-47.8 222.801C-47.8 222.801 -43 230.801 -47 235.601C-47 235.601 -30.2 243.601 -31 250.001C-31 250.001 -24.6 242.001 -28.6 235.601C-32.6 229.201 -39.8 233.201 -39 214.801L-47.8 218.001C-47.8 218.001 -42.2 209.201 -42.2 202.801L-50.2 205.201C-50.2 205.201 -34.731 178.623 -45.4 177.201C-51.4 176.401 -54.2 176.401 -54.2 176.401z"/>
91
- </g>
92
- <g style="fill: rgb(204, 204, 204);">
93
- <path d="M-21.8 193.201C-21.8 193.201 -19 188.801 -21.8 189.601C-24.6 190.401 -55.8 205.201 -61.8 214.801C-61.8 214.801 -27.4 190.401 -21.8 193.201z"/>
94
- </g>
95
- <g style="fill: rgb(204, 204, 204);">
96
- <path d="M-11.4 201.201C-11.4 201.201 -8.6 196.801 -11.4 197.601C-14.2 198.401 -45.4 213.201 -51.4 222.801C-51.4 222.801 -17 198.401 -11.4 201.201z"/>
97
- </g>
98
- <g style="fill: rgb(204, 204, 204);">
99
- <path d="M1.8 186.001C1.8 186.001 4.6 181.601 1.8 182.401C-1 183.201 -32.2 198.001 -38.2 207.601C-38.2 207.601 -3.8 183.201 1.8 186.001z"/>
100
- </g>
101
- <g style="fill: rgb(204, 204, 204);">
102
- <path d="M-21.4 229.601C-21.4 229.601 -21.4 223.601 -24.2 224.401C-27 225.201 -63 242.801 -69 252.401C-69 252.401 -27 226.801 -21.4 229.601z"/>
103
- </g>
104
- <g style="fill: rgb(204, 204, 204);">
105
- <path d="M-20.2 218.801C-20.2 218.801 -19 214.001 -21.8 214.801C-23.8 214.801 -50.2 226.401 -56.2 236.001C-56.2 236.001 -26.6 214.401 -20.2 218.801z"/>
106
- </g>
107
- <g style="fill: rgb(204, 204, 204);">
108
- <path d="M-34.6 266.401L-44.6 274.001C-44.6 274.001 -34.2 266.401 -30.6 267.601C-30.6 267.601 -37.4 278.801 -38.2 284.001C-38.2 284.001 -27.8 271.201 -22.2 271.601C-22.2 271.601 -14.6 272.001 -14.6 282.801C-14.6 282.801 -9 272.401 -5.8 272.801C-5.8 272.801 -4.6 279.201 -5.8 286.001C-5.8 286.001 -1.8 278.401 2.2 280.001C2.2 280.001 8.6 278.001 7.8 289.601C7.8 289.601 7.8 300.001 7 302.801C7 302.801 12.6 276.401 15 276.001C15 276.001 23 274.801 27.8 283.601C27.8 283.601 23.8 276.001 28.6 278.001C28.6 278.001 39.4 279.601 42.6 286.401C42.6 286.401 35.8 274.401 41.4 277.601C41.4 277.601 48.2 277.601 49.4 284.001C49.4 284.001 57.8 305.201 59.8 306.801C59.8 306.801 52.2 285.201 53.8 285.201C53.8 285.201 51.8 273.201 57 288.001C57 288.001 53.8 274.001 59.4 274.801C65 275.601 69.4 285.601 77.8 283.201C77.8 283.201 87.401 288.801 89.401 219.601L-34.6 266.401z"/>
109
- </g>
110
- <g style="fill: rgb(0, 0, 0);">
111
- <path d="M-29.8 173.601C-29.8 173.601 -15 167.601 25 173.601C25 173.601 32.2 174.001 39 165.201C45.8 156.401 72.6 149.201 79 151.201L88.601 157.601L89.401 158.801C89.401 158.801 101.801 169.201 102.201 176.801C102.601 184.401 87.801 232.401 78.2 248.401C68.6 264.401 59 276.801 39.8 274.401C39.8 274.401 19 270.401 -6.6 274.401C-6.6 274.401 -35.8 272.801 -38.6 264.801C-41.4 256.801 -27.4 241.601 -27.4 241.601C-27.4 241.601 -23 233.201 -24.2 218.801C-25.4 204.401 -25 176.401 -29.8 173.601z"/>
112
- </g>
113
- <g style="fill: rgb(229, 102, 140);">
114
- <path d="M-7.8 175.601C0.6 194.001 -29 259.201 -29 259.201C-31 260.801 -16.34 266.846 -6.2 264.401C4.746 261.763 45 266.001 45 266.001C68.6 250.401 81.4 206.001 81.4 206.001C81.4 206.001 91.801 182.001 74.2 178.801C56.6 175.601 -7.8 175.601 -7.8 175.601z"/>
115
- </g>
116
- <g style="fill: rgb(178, 50, 89);">
117
- <path d="M-9.831 206.497C-6.505 193.707 -4.921 181.906 -7.8 175.601C-7.8 175.601 54.6 182.001 65.8 161.201C70.041 153.326 84.801 184.001 84.4 193.601C84.4 193.601 21.4 208.001 6.6 196.801L-9.831 206.497z"/>
118
- </g>
119
- <g style="fill: rgb(165, 38, 76);">
120
- <path d="M-5.4 222.801C-5.4 222.801 -3.4 230.001 -5.8 234.001C-5.8 234.001 -7.4 234.801 -8.6 235.201C-8.6 235.201 -7.4 238.801 -1.4 240.401C-1.4 240.401 0.6 244.801 3 245.201C5.4 245.601 10.2 251.201 14.2 250.001C18.2 248.801 29.4 244.801 29.4 244.801C29.4 244.801 35 241.601 43.8 245.201C43.8 245.201 46.175 244.399 46.6 240.401C47.1 235.701 50.2 232.001 52.2 230.001C54.2 228.001 63.8 215.201 62.6 214.801C61.4 214.401 -5.4 222.801 -5.4 222.801z"/>
121
- </g>
122
- <g style="fill: rgb(255, 114, 127); stroke: rgb(0, 0, 0);">
123
- <path d="M-9.8 174.401C-9.8 174.401 -12.6 196.801 -9.4 205.201C-6.2 213.601 -7 215.601 -7.8 219.601C-8.6 223.601 -4.2 233.601 1.4 239.601L13.4 241.201C13.4 241.201 28.6 237.601 37.8 240.401C37.8 240.401 46.794 241.744 50.2 226.801C50.2 226.801 55 220.401 62.2 217.601C69.4 214.801 76.6 173.201 72.6 165.201C68.6 157.201 54.2 152.801 38.2 168.401C22.2 184.001 20.2 167.201 -9.8 174.401z"/>
124
- </g>
125
- <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
126
- <path d="M-8.2 249.201C-8.2 249.201 -9 247.201 -13.4 246.801C-13.4 246.801 -35.8 243.201 -44.2 230.801C-44.2 230.801 -51 225.201 -46.6 236.801C-46.6 236.801 -36.2 257.201 -29.4 260.001C-29.4 260.001 -13 264.001 -8.2 249.201z"/>
127
- </g>
128
- <g style="fill: rgb(204, 63, 76);">
129
- <path d="M71.742 185.229C72.401 177.323 74.354 168.709 72.6 165.201C66.154 152.307 49.181 157.695 38.2 168.401C22.2 184.001 20.2 167.201 -9.8 174.401C-9.8 174.401 -11.545 188.364 -10.705 198.376C-10.705 198.376 26.6 186.801 27.4 192.401C27.4 192.401 29 189.201 38.2 189.201C47.4 189.201 70.142 188.029 71.742 185.229z"/>
130
- </g>
131
- <g style="stroke: rgb(165, 25, 38); stroke-width: 2;">
132
- <path d="M28.6 175.201C28.6 175.201 33.4 180.001 29.8 189.601C29.8 189.601 15.4 205.601 17.4 219.601"/>
133
- </g>
134
- <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
135
- <path d="M-19.4 260.001C-19.4 260.001 -23.8 247.201 -15 254.001C-15 254.001 -10.2 256.001 -11.4 257.601C-12.6 259.201 -18.2 263.201 -19.4 260.001z"/>
136
- </g>
137
- <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
138
- <path d="M-14.36 261.201C-14.36 261.201 -17.88 250.961 -10.84 256.401C-10.84 256.401 -6.419 258.849 -7.96 259.281C-12.52 260.561 -7.96 263.121 -14.36 261.201z"/>
139
- </g>
140
- <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
141
- <path d="M-9.56 261.201C-9.56 261.201 -13.08 250.961 -6.04 256.401C-6.04 256.401 -1.665 258.711 -3.16 259.281C-6.52 260.561 -3.16 263.121 -9.56 261.201z"/>
142
- </g>
143
- <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
144
- <path d="M-2.96 261.401C-2.96 261.401 -6.48 251.161 0.56 256.601C0.56 256.601 4.943 258.933 3.441 259.481C0.48 260.561 3.441 263.321 -2.96 261.401z"/>
145
- </g>
146
- <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
147
- <path d="M3.52 261.321C3.52 261.321 0 251.081 7.041 256.521C7.041 256.521 10.881 258.121 9.921 259.401C8.961 260.681 9.921 263.241 3.52 261.321z"/>
148
- </g>
149
- <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
150
- <path d="M10.2 262.001C10.2 262.001 5.4 249.601 14.6 256.001C14.6 256.001 19.4 258.001 18.2 259.601C17 261.201 18.2 264.401 10.2 262.001z"/>
151
- </g>
152
- <g style="stroke: rgb(165, 38, 76); stroke-width: 2;">
153
- <path d="M-18.2 244.801C-18.2 244.801 -5 242.001 1 245.201C1 245.201 7 246.401 8.2 246.001C9.4 245.601 12.6 245.201 12.6 245.201"/>
154
- </g>
155
- <g style="stroke: rgb(165, 38, 76); stroke-width: 2;">
156
- <path d="M15.8 253.601C15.8 253.601 27.8 240.001 39.8 244.401C46.816 246.974 45.8 243.601 46.6 240.801C47.4 238.001 47.6 233.801 52.6 230.801"/>
157
- </g>
158
- <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
159
- <path d="M33 237.601C33 237.601 29 226.801 26.2 239.601C23.4 252.401 20.2 256.001 18.6 258.801C18.6 258.801 18.6 264.001 27 263.601C27 263.601 37.8 263.201 38.2 260.401C38.6 257.601 37 246.001 33 237.601z"/>
160
- </g>
161
- <g style="stroke: rgb(165, 38, 76); stroke-width: 2;">
162
- <path d="M47 244.801C47 244.801 50.6 242.401 53 243.601"/>
163
- </g>
164
- <g style="stroke: rgb(165, 38, 76); stroke-width: 2;">
165
- <path d="M53.5 228.401C53.5 228.401 56.4 223.501 61.2 222.701"/>
166
- </g>
167
- <g style="fill: rgb(178, 178, 178);">
168
- <path d="M-25.8 265.201C-25.8 265.201 -7.8 268.401 -3.4 266.801C-3.4 266.801 5.4 266.801 -3 268.801C-3 268.801 -15.8 268.801 -23.8 267.601C-23.8 267.601 -35.4 262.001 -25.8 265.201z"/>
169
- </g>
170
- <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
171
- <path d="M-11.8 172.001C-11.8 172.001 5.8 172.001 7.8 172.801C7.8 172.801 15 203.601 11.4 211.201C11.4 211.201 10.2 214.001 7.4 208.401C7.4 208.401 -11 175.601 -14.2 173.601C-17.4 171.601 -13 172.001 -11.8 172.001z"/>
172
- </g>
173
- <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
174
- <path d="M-88.9 169.301C-88.9 169.301 -80 171.001 -67.4 173.601C-67.4 173.601 -62.6 196.001 -59.4 200.801C-56.2 205.601 -59.8 205.601 -63.4 202.801C-67 200.001 -81.8 186.001 -83.8 181.601C-85.8 177.201 -88.9 169.301 -88.9 169.301z"/>
175
- </g>
176
- <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
177
- <path d="M-67.039 173.818C-67.039 173.818 -61.239 175.366 -60.23 177.581C-59.222 179.795 -61.432 183.092 -61.432 183.092C-61.432 183.092 -62.432 186.397 -63.634 184.235C-64.836 182.072 -67.708 174.412 -67.039 173.818z"/>
178
- </g>
179
- <g style="fill: rgb(0, 0, 0);">
180
- <path d="M-67 173.601C-67 173.601 -63.4 178.801 -59.8 178.801C-56.2 178.801 -55.818 178.388 -53 179.001C-48.4 180.001 -48.8 178.001 -42.2 179.201C-39.56 179.681 -37 178.801 -34.2 180.001C-31.4 181.201 -28.2 180.401 -27 178.401C-25.8 176.401 -21 172.201 -21 172.201C-21 172.201 -33.8 174.001 -36.6 174.801C-36.6 174.801 -59 176.001 -67 173.601z"/>
181
- </g>
182
- <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
183
- <path d="M-22.4 173.801C-22.4 173.801 -28.85 177.301 -29.25 179.701C-29.65 182.101 -24 185.801 -24 185.801C-24 185.801 -21.25 190.401 -20.65 188.001C-20.05 185.601 -21.6 174.201 -22.4 173.801z"/>
184
- </g>
185
- <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
186
- <path d="M-59.885 179.265C-59.885 179.265 -52.878 190.453 -52.661 179.242C-52.661 179.242 -52.104 177.984 -53.864 177.962C-59.939 177.886 -58.418 173.784 -59.885 179.265z"/>
187
- </g>
188
- <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
189
- <path d="M-52.707 179.514C-52.707 179.514 -44.786 190.701 -45.422 179.421C-45.422 179.421 -45.415 179.089 -47.168 178.936C-51.915 178.522 -51.57 174.004 -52.707 179.514z"/>
190
- </g>
191
- <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
192
- <path d="M-45.494 179.522C-45.494 179.522 -37.534 190.15 -38.203 180.484C-38.203 180.484 -38.084 179.251 -39.738 178.95C-43.63 178.244 -43.841 174.995 -45.494 179.522z"/>
193
- </g>
194
- <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
195
- <path d="M-38.618 179.602C-38.618 179.602 -30.718 191.163 -30.37 181.382C-30.37 181.382 -28.726 180.004 -30.472 179.782C-36.29 179.042 -35.492 174.588 -38.618 179.602z"/>
196
- </g>
197
- <g style="fill: rgb(229, 229, 178);">
198
- <path d="M-74.792 183.132L-82.45 181.601C-85.05 176.601 -87.15 170.451 -87.15 170.451C-87.15 170.451 -80.8 171.451 -68.3 174.251C-68.3 174.251 -67.424 177.569 -65.952 183.364L-74.792 183.132z"/>
199
- </g>
200
- <g style="fill: rgb(229, 229, 178);">
201
- <path d="M-9.724 178.47C-11.39 175.964 -12.707 174.206 -13.357 173.8C-16.37 171.917 -12.227 172.294 -11.098 172.294C-11.098 172.294 5.473 172.294 7.356 173.047C7.356 173.047 7.88 175.289 8.564 178.68C8.564 178.68 -1.524 176.67 -9.724 178.47z"/>
202
- </g>
203
- <g style="fill: rgb(204, 114, 38);">
204
- <path d="M43.88 40.321C71.601 44.281 97.121 8.641 98.881 -1.04C100.641 -10.72 90.521 -22.6 90.521 -22.6C91.841 -25.68 87.001 -39.76 81.721 -49C76.441 -58.24 60.54 -57.266 43 -58.24C27.16 -59.12 8.68 -35.8 7.36 -34.04C6.04 -32.28 12.2 6.001 13.52 11.721C14.84 17.441 12.2 43.841 12.2 43.841C46.44 34.741 16.16 36.361 43.88 40.321z"/>
205
- </g>
206
- <g style="fill: rgb(234, 142, 81);">
207
- <path d="M8.088 -33.392C6.792 -31.664 12.84 5.921 14.136 11.537C15.432 17.153 12.84 43.073 12.84 43.073C45.512 34.193 16.728 35.729 43.944 39.617C71.161 43.505 96.217 8.513 97.945 -0.992C99.673 -10.496 89.737 -22.16 89.737 -22.16C91.033 -25.184 86.281 -39.008 81.097 -48.08C75.913 -57.152 60.302 -56.195 43.08 -57.152C27.528 -58.016 9.384 -35.12 8.088 -33.392z"/>
208
- </g>
209
- <g style="fill: rgb(239, 170, 124);">
210
- <path d="M8.816 -32.744C7.544 -31.048 13.48 5.841 14.752 11.353C16.024 16.865 13.48 42.305 13.48 42.305C44.884 33.145 17.296 35.097 44.008 38.913C70.721 42.729 95.313 8.385 97.009 -0.944C98.705 -10.272 88.953 -21.72 88.953 -21.72C90.225 -24.688 85.561 -38.256 80.473 -47.16C75.385 -56.064 60.063 -55.125 43.16 -56.064C27.896 -56.912 10.088 -34.44 8.816 -32.744z"/>
211
- </g>
212
- <g style="fill: rgb(244, 198, 168);">
213
- <path d="M9.544 -32.096C8.296 -30.432 14.12 5.761 15.368 11.169C16.616 16.577 14.12 41.537 14.12 41.537C43.556 32.497 17.864 34.465 44.072 38.209C70.281 41.953 94.409 8.257 96.073 -0.895C97.737 -10.048 88.169 -21.28 88.169 -21.28C89.417 -24.192 84.841 -37.504 79.849 -46.24C74.857 -54.976 59.824 -54.055 43.24 -54.976C28.264 -55.808 10.792 -33.76 9.544 -32.096z"/>
214
- </g>
215
- <g style="fill: rgb(249, 226, 211);">
216
- <path d="M10.272 -31.448C9.048 -29.816 14.76 5.681 15.984 10.985C17.208 16.289 14.76 40.769 14.76 40.769C42.628 31.849 18.432 33.833 44.136 37.505C69.841 41.177 93.505 8.129 95.137 -0.848C96.769 -9.824 87.385 -20.84 87.385 -20.84C88.609 -23.696 84.121 -36.752 79.225 -45.32C74.329 -53.888 59.585 -52.985 43.32 -53.888C28.632 -54.704 11.496 -33.08 10.272 -31.448z"/>
217
- </g>
218
- <g style="fill: rgb(255, 255, 255);">
219
- <path d="M44.2 36.8C69.4 40.4 92.601 8 94.201 -0.8C95.801 -9.6 86.601 -20.4 86.601 -20.4C87.801 -23.2 83.4 -36 78.6 -44.4C73.8 -52.8 59.346 -51.914 43.4 -52.8C29 -53.6 12.2 -32.4 11 -30.8C9.8 -29.2 15.4 5.6 16.6 10.8C17.8 16 15.4 40 15.4 40C40.9 31.4 19 33.2 44.2 36.8z"/>
220
- </g>
221
- <g style="fill: rgb(204, 204, 204);">
222
- <path d="M90.601 2.8C90.601 2.8 62.8 10.4 51.2 8.8C51.2 8.8 35.4 2.2 26.6 24C26.6 24 23 31.2 21 33.2C19 35.2 90.601 2.8 90.601 2.8z"/>
223
- </g>
224
- <g style="fill: rgb(0, 0, 0);">
225
- <path d="M94.401 0.6C94.401 0.6 65.4 12.8 55.4 12.4C55.4 12.4 39 7.8 30.6 22.4C30.6 22.4 22.2 31.6 19 33.2C19 33.2 18.6 34.8 25 30.8L35.4 36C35.4 36 50.2 45.6 59.8 29.6C59.8 29.6 63.8 18.4 63.8 16.4C63.8 14.4 85 8.8 86.601 8.4C88.201 8 94.801 3.8 94.401 0.6z"/>
226
- </g>
227
- <g style="fill: rgb(153, 204, 50);">
228
- <path d="M47 36.514C40.128 36.514 31.755 32.649 31.755 26.4C31.755 20.152 40.128 13.887 47 13.887C53.874 13.887 59.446 18.952 59.446 25.2C59.446 31.449 53.874 36.514 47 36.514z"/>
229
- </g>
230
- <g style="fill: rgb(101, 153, 0);">
231
- <path d="M43.377 19.83C38.531 20.552 33.442 22.055 33.514 21.839C35.054 17.22 41.415 13.887 47 13.887C51.296 13.887 55.084 15.865 57.32 18.875C57.32 18.875 52.004 18.545 43.377 19.83z"/>
232
- </g>
233
- <g style="fill: rgb(255, 255, 255);">
234
- <path d="M55.4 19.6C55.4 19.6 51 16.4 51 18.6C51 18.6 54.6 23 55.4 19.6z"/>
235
- </g>
236
- <g style="fill: rgb(0, 0, 0);">
237
- <path d="M45.4 27.726C42.901 27.726 40.875 25.7 40.875 23.2C40.875 20.701 42.901 18.675 45.4 18.675C47.9 18.675 49.926 20.701 49.926 23.2C49.926 25.7 47.9 27.726 45.4 27.726z"/>
238
- </g>
239
- <g style="fill: rgb(204, 114, 38);">
240
- <path d="M-58.6 14.4C-58.6 14.4 -61.8 -6.8 -59.4 -11.2C-59.4 -11.2 -48.6 -21.2 -49 -24.8C-49 -24.8 -49.4 -42.8 -50.6 -43.6C-51.8 -44.4 -59.4 -50.4 -65.4 -44C-65.4 -44 -75.8 -26 -75 -19.6L-75 -17.6C-75 -17.6 -82.6 -18 -84.2 -16C-84.2 -16 -85.4 -10.8 -86.6 -10.4C-86.6 -10.4 -89.4 -8 -87.4 -5.2C-87.4 -5.2 -89.4 -2.8 -89 1.2L-81.4 5.2C-81.4 5.2 -79.4 19.6 -68.6 24.8C-63.764 27.129 -60.6 20.4 -58.6 14.4z"/>
241
- </g>
242
- <g style="fill: rgb(255, 255, 255);">
243
- <path d="M-59.6 12.56C-59.6 12.56 -62.48 -6.52 -60.32 -10.48C-60.32 -10.48 -50.6 -19.48 -50.96 -22.72C-50.96 -22.72 -51.32 -38.92 -52.4 -39.64C-53.48 -40.36 -60.32 -45.76 -65.72 -40C-65.72 -40 -75.08 -23.8 -74.36 -18.04L-74.36 -16.24C-74.36 -16.24 -81.2 -16.6 -82.64 -14.8C-82.64 -14.8 -83.72 -10.12 -84.8 -9.76C-84.8 -9.76 -87.32 -7.6 -85.52 -5.08C-85.52 -5.08 -87.32 -2.92 -86.96 0.68L-80.12 4.28C-80.12 4.28 -78.32 17.24 -68.6 21.92C-64.248 24.015 -61.4 17.96 -59.6 12.56z"/>
244
- </g>
245
- <g style="fill: rgb(235, 149, 92);">
246
- <path d="M-51.05 -42.61C-52.14 -43.47 -59.63 -49.24 -65.48 -43C-65.48 -43 -75.62 -25.45 -74.84 -19.21L-74.84 -17.26C-74.84 -17.26 -82.25 -17.65 -83.81 -15.7C-83.81 -15.7 -84.98 -10.63 -86.15 -10.24C-86.15 -10.24 -88.88 -7.9 -86.93 -5.17C-86.93 -5.17 -88.88 -2.83 -88.49 1.07L-81.08 4.97C-81.08 4.97 -79.13 19.01 -68.6 24.08C-63.886 26.35 -60.8 19.79 -58.85 13.94C-58.85 13.94 -61.97 -6.73 -59.63 -11.02C-59.63 -11.02 -49.1 -20.77 -49.49 -24.28C-49.49 -24.28 -49.88 -41.83 -51.05 -42.61z"/>
247
- </g>
248
- <g style="fill: rgb(242, 184, 146);">
249
- <path d="M-51.5 -41.62C-52.48 -42.54 -59.86 -48.08 -65.56 -42C-65.56 -42 -75.44 -24.9 -74.68 -18.82L-74.68 -16.92C-74.68 -16.92 -81.9 -17.3 -83.42 -15.4C-83.42 -15.4 -84.56 -10.46 -85.7 -10.08C-85.7 -10.08 -88.36 -7.8 -86.46 -5.14C-86.46 -5.14 -88.36 -2.86 -87.98 0.94L-80.76 4.74C-80.76 4.74 -78.86 18.42 -68.6 23.36C-64.006 25.572 -61 19.18 -59.1 13.48C-59.1 13.48 -62.14 -6.66 -59.86 -10.84C-59.86 -10.84 -49.6 -20.34 -49.98 -23.76C-49.98 -23.76 -50.36 -40.86 -51.5 -41.62z"/>
250
- </g>
251
- <g style="fill: rgb(248, 220, 200);">
252
- <path d="M-51.95 -40.63C-52.82 -41.61 -60.09 -46.92 -65.64 -41C-65.64 -41 -75.26 -24.35 -74.52 -18.43L-74.52 -16.58C-74.52 -16.58 -81.55 -16.95 -83.03 -15.1C-83.03 -15.1 -84.14 -10.29 -85.25 -9.92C-85.25 -9.92 -87.84 -7.7 -85.99 -5.11C-85.99 -5.11 -87.84 -2.89 -87.47 0.81L-80.44 4.51C-80.44 4.51 -78.59 17.83 -68.6 22.64C-64.127 24.794 -61.2 18.57 -59.35 13.02C-59.35 13.02 -62.31 -6.59 -60.09 -10.66C-60.09 -10.66 -50.1 -19.91 -50.47 -23.24C-50.47 -23.24 -50.84 -39.89 -51.95 -40.63z"/>
253
- </g>
254
- <g style="fill: rgb(255, 255, 255);">
255
- <path d="M-59.6 12.46C-59.6 12.46 -62.48 -6.52 -60.32 -10.48C-60.32 -10.48 -50.6 -19.48 -50.96 -22.72C-50.96 -22.72 -51.32 -38.92 -52.4 -39.64C-53.16 -40.68 -60.32 -45.76 -65.72 -40C-65.72 -40 -75.08 -23.8 -74.36 -18.04L-74.36 -16.24C-74.36 -16.24 -81.2 -16.6 -82.64 -14.8C-82.64 -14.8 -83.72 -10.12 -84.8 -9.76C-84.8 -9.76 -87.32 -7.6 -85.52 -5.08C-85.52 -5.08 -87.32 -2.92 -86.96 0.68L-80.12 4.28C-80.12 4.28 -78.32 17.24 -68.6 21.92C-64.248 24.015 -61.4 17.86 -59.6 12.46z"/>
256
- </g>
257
- <g style="fill: rgb(204, 204, 204);">
258
- <path d="M-62.7 6.2C-62.7 6.2 -84.3 -4 -85.2 -4.8C-85.2 -4.8 -76.1 3.4 -75.3 3.4C-74.5 3.4 -62.7 6.2 -62.7 6.2z"/>
259
- </g>
260
- <g style="fill: rgb(0, 0, 0);">
261
- <path d="M-79.8 0C-79.8 0 -61.4 3.6 -61.4 8C-61.4 10.912 -61.643 24.331 -67 22.8C-75.4 20.4 -71.8 6 -79.8 0z"/>
262
- </g>
263
- <g style="fill: rgb(153, 204, 50);">
264
- <path d="M-71.4 3.8C-71.4 3.8 -62.422 5.274 -61.4 8C-60.8 9.6 -60.137 17.908 -65.6 19C-70.152 19.911 -72.382 9.69 -71.4 3.8z"/>
265
- </g>
266
- <g style="fill: rgb(0, 0, 0);">
267
- <path d="M14.595 46.349C14.098 44.607 15.409 44.738 17.2 44.2C19.2 43.6 31.4 39.8 32.2 37.2C33 34.6 46.2 39 46.2 39C48 39.8 52.4 42.4 52.4 42.4C57.2 43.6 63.8 44 63.8 44C66.2 45 69.6 47.8 69.6 47.8C84.2 58 96.601 50.8 96.601 50.8C116.601 44.2 110.601 27 110.601 27C107.601 18 110.801 14.6 110.801 14.6C111.001 10.8 118.201 17.2 118.201 17.2C120.801 21.4 121.601 26.4 121.601 26.4C129.601 37.6 126.201 19.8 126.201 19.8C126.401 18.8 123.601 15.2 123.601 14C123.601 12.8 121.801 9.4 121.801 9.4C118.801 6 121.201 -1 121.201 -1C123.001 -14.8 120.801 -13 120.801 -13C119.601 -14.8 110.401 -4.8 110.401 -4.8C108.201 -1.4 102.201 0.2 102.201 0.2C99.401 2 96.001 0.6 96.001 0.6C93.401 0.2 87.801 7.2 87.801 7.2C90.601 7 93.001 11.4 95.401 11.6C97.801 11.8 99.601 9.2 101.201 8.6C102.801 8 105.601 13.8 105.601 13.8C106.001 16.4 100.401 21.2 100.401 21.2C100.001 25.8 98.401 24.2 98.401 24.2C95.401 23.6 94.201 27.4 93.201 32C92.201 36.6 88.001 37 88.001 37C86.401 44.4 85.2 41.4 85.2 41.4C85 35.8 79 41.6 79 41.6C77.8 43.6 73.2 41.4 73.2 41.4C66.4 39.4 68.8 37.4 68.8 37.4C70.6 35.2 81.8 37.4 81.8 37.4C84 35.8 76 31.8 76 31.8C75.4 30 76.4 25.6 76.4 25.6C77.6 22.4 84.4 16.8 84.4 16.8C93.801 15.6 91.001 14 91.001 14C84.801 8.8 79 16.4 79 16.4C76.8 22.6 59.4 37.6 59.4 37.6C54.6 41 57.2 34.2 53.2 37.6C49.2 41 28.6 32 28.6 32C17.038 30.807 14.306 46.549 10.777 43.429C10.777 43.429 16.195 51.949 14.595 46.349z"/>
268
- </g>
269
- <g style="fill: rgb(0, 0, 0);">
270
- <path d="M209.401 -120C209.401 -120 183.801 -112 181.001 -93.2C181.001 -93.2 178.601 -70.4 199.001 -52.8C199.001 -52.8 199.401 -46.4 201.401 -43.2C201.401 -43.2 199.801 -38.4 218.601 -46L245.801 -54.4C245.801 -54.4 252.201 -56.8 257.401 -65.6C262.601 -74.4 277.801 -93.2 274.201 -118.4C274.201 -118.4 275.401 -129.6 269.401 -130C269.401 -130 261.001 -131.6 253.801 -124C253.801 -124 247.001 -120.8 244.601 -121.2L209.401 -120z"/>
271
- </g>
272
- <g style="fill: rgb(0, 0, 0);">
273
- <path d="M264.022 -120.99C264.022 -120.99 266.122 -129.92 261.282 -125.08C261.282 -125.08 254.242 -119.36 246.761 -119.36C246.761 -119.36 232.241 -117.16 227.841 -103.96C227.841 -103.96 223.881 -77.12 231.801 -71.4C231.801 -71.4 236.641 -63.92 243.681 -70.52C250.722 -77.12 266.222 -107.35 264.022 -120.99z"/>
274
- </g>
275
- <g style="fill: rgb(50, 50, 50);">
276
- <path d="M263.648 -120.632C263.648 -120.632 265.738 -129.376 260.986 -124.624C260.986 -124.624 254.074 -119.008 246.729 -119.008C246.729 -119.008 232.473 -116.848 228.153 -103.888C228.153 -103.888 224.265 -77.536 232.041 -71.92C232.041 -71.92 236.793 -64.576 243.705 -71.056C250.618 -77.536 265.808 -107.24 263.648 -120.632z"/>
277
- </g>
278
- <g style="fill: rgb(102, 102, 102);">
279
- <path d="M263.274 -120.274C263.274 -120.274 265.354 -128.832 260.69 -124.168C260.69 -124.168 253.906 -118.656 246.697 -118.656C246.697 -118.656 232.705 -116.536 228.465 -103.816C228.465 -103.816 224.649 -77.952 232.281 -72.44C232.281 -72.44 236.945 -65.232 243.729 -71.592C250.514 -77.952 265.394 -107.13 263.274 -120.274z"/>
280
- </g>
281
- <g style="fill: rgb(153, 153, 153);">
282
- <path d="M262.9 -119.916C262.9 -119.916 264.97 -128.288 260.394 -123.712C260.394 -123.712 253.738 -118.304 246.665 -118.304C246.665 -118.304 232.937 -116.224 228.777 -103.744C228.777 -103.744 225.033 -78.368 232.521 -72.96C232.521 -72.96 237.097 -65.888 243.753 -72.128C250.41 -78.368 264.98 -107.02 262.9 -119.916z"/>
283
- </g>
284
- <g style="fill: rgb(204, 204, 204);">
285
- <path d="M262.526 -119.558C262.526 -119.558 264.586 -127.744 260.098 -123.256C260.098 -123.256 253.569 -117.952 246.633 -117.952C246.633 -117.952 233.169 -115.912 229.089 -103.672C229.089 -103.672 225.417 -78.784 232.761 -73.48C232.761 -73.48 237.249 -66.544 243.777 -72.664C250.305 -78.784 264.566 -106.91 262.526 -119.558z"/>
286
- </g>
287
- <g style="fill: rgb(255, 255, 255);">
288
- <path d="M262.151 -119.2C262.151 -119.2 264.201 -127.2 259.801 -122.8C259.801 -122.8 253.401 -117.6 246.601 -117.6C246.601 -117.6 233.401 -115.6 229.401 -103.6C229.401 -103.6 225.801 -79.2 233.001 -74C233.001 -74 237.401 -67.2 243.801 -73.2C250.201 -79.2 264.151 -106.8 262.151 -119.2z"/>
289
- </g>
290
- <g style="fill: rgb(153, 38, 0);">
291
- <path d="M50.6 84C50.6 84 30.2 64.8 22.2 64C22.2 64 -12.2 60 -27 78C-27 78 -9.4 57.6 18.2 63.2C18.2 63.2 -3.4 58.8 -15.8 62C-15.8 62 -32.6 62 -42.2 76L-45 80.8C-45 80.8 -41 66 -22.6 60C-22.6 60 0.2 55.2 11 60C11 60 -10.6 53.2 -20.6 55.2C-20.6 55.2 -51 52.8 -63.8 79.2C-63.8 79.2 -59.8 64.8 -45 57.6C-45 57.6 -31.4 48.8 -11 51.6C-11 51.6 3.4 54.8 8.6 57.2C13.8 59.6 12.6 56.8 4.2 52C4.2 52 -1.4 42 -15.4 42.4C-15.4 42.4 -58.2 46 -68.6 58C-68.6 58 -55 46.8 -44.6 44C-44.6 44 -22.2 36 -13.8 36.8C-13.8 36.8 11 37.8 18.6 33.8C18.6 33.8 7.4 38.8 10.6 42C13.8 45.2 20.6 52.8 20.6 54C20.6 55.2 44.8 77.3 48.4 81.7L50.6 84z"/>
292
- </g>
293
- <g style="fill: rgb(204, 204, 204);">
294
- <path d="M189 278C189 278 173.5 241.5 161 232C161 232 187 248 190.5 266C190.5 266 190.5 276 189 278z"/>
295
- </g>
296
- <g style="fill: rgb(204, 204, 204);">
297
- <path d="M236 285.5C236 285.5 209.5 230.5 191 206.5C191 206.5 234.5 244 239.5 270.5L240 276L237 273.5C237 273.5 236.5 282.5 236 285.5z"/>
298
- </g>
299
- <g style="fill: rgb(204, 204, 204);">
300
- <path d="M292.5 237C292.5 237 230 177.5 228.5 175C228.5 175 289 241 292 248.5C292 248.5 290 239.5 292.5 237z"/>
301
- </g>
302
- <g style="fill: rgb(204, 204, 204);">
303
- <path d="M104 280.5C104 280.5 123.5 228.5 142.5 251C142.5 251 157.5 261 157 264C157 264 153 257.5 135 258C135 258 116 255 104 280.5z"/>
304
- </g>
305
- <g style="fill: rgb(204, 204, 204);">
306
- <path d="M294.5 153C294.5 153 249.5 124.5 242 123C230.193 120.639 291.5 152 296.5 162.5C296.5 162.5 298.5 160 294.5 153z"/>
307
- </g>
308
- <g style="fill: rgb(0, 0, 0);">
309
- <path d="M143.801 259.601C143.801 259.601 164.201 257.601 171.001 250.801L175.401 254.401L193.001 216.001L196.601 221.201C196.601 221.201 211.001 206.401 210.201 198.401C209.401 190.401 223.001 204.401 223.001 204.401C223.001 204.401 222.201 192.801 229.401 199.601C229.401 199.601 227.001 184.001 235.401 192.001C235.401 192.001 224.864 161.844 247.401 187.601C253.001 194.001 248.601 187.201 248.601 187.201C248.601 187.201 222.601 139.201 244.201 153.601C244.201 153.601 246.201 130.801 245.001 126.401C243.801 122.001 241.801 99.6 237.001 94.4C232.201 89.2 237.401 87.6 243.001 92.8C243.001 92.8 231.801 68.8 245.001 80.8C245.001 80.8 241.401 65.6 237.001 62.8C237.001 62.8 231.401 45.6 246.601 56.4C246.601 56.4 242.201 44 239.001 40.8C239.001 40.8 227.401 13.2 234.601 18L239.001 21.6C239.001 21.6 232.201 7.6 238.601 12C245.001 16.4 245.001 16 245.001 16C245.001 16 223.801 -17.2 244.201 0.4C244.201 0.4 236.042 -13.518 232.601 -20.4C232.601 -20.4 213.801 -40.8 228.201 -34.4L233.001 -32.8C233.001 -32.8 224.201 -42.8 216.201 -44.4C208.201 -46 218.601 -52.4 225.001 -50.4C231.401 -48.4 247.001 -40.8 247.001 -40.8C247.001 -40.8 259.801 -22 263.801 -21.6C263.801 -21.6 243.801 -29.2 249.801 -21.2C249.801 -21.2 264.201 -7.2 257.001 -7.6C257.001 -7.6 251.001 -0.4 255.801 8.4C255.801 8.4 237.342 -9.991 252.201 15.6L259.001 32C259.001 32 234.601 7.2 245.801 29.2C245.801 29.2 263.001 52.8 265.001 53.2C267.001 53.6 271.401 62.4 271.401 62.4L267.001 60.4L272.201 69.2C272.201 69.2 261.001 57.2 267.001 70.4L272.601 84.8C272.601 84.8 252.201 62.8 265.801 92.4C265.801 92.4 249.401 87.2 258.201 104.4C258.201 104.4 256.601 120.401 257.001 125.601C257.401 130.801 258.601 159.201 254.201 167.201C249.801 175.201 260.201 194.401 262.201 198.401C264.201 202.401 267.801 213.201 259.001 204.001C250.201 194.801 254.601 200.401 256.601 209.201C258.601 218.001 264.601 233.601 263.801 239.201C263.801 239.201 262.601 240.401 259.401 236.801C259.401 236.801 244.601 214.001 246.201 228.401C246.201 228.401 245.001 236.401 241.801 245.201C241.801 245.201 238.601 256.001 238.601 247.201C238.601 247.201 235.401 230.401 232.601 238.001C229.801 245.601 226.201 251.601 223.401 254.001C220.601 256.401 215.401 233.601 214.201 244.001C214.201 244.001 202.201 231.601 197.401 248.001L185.801 264.401C185.801 264.401 185.401 252.001 184.201 258.001C184.201 258.001 154.201 264.001 143.801 259.601z"/>
310
- </g>
311
- <g style="fill: rgb(0, 0, 0);">
312
- <path d="M109.401 -97.2C109.401 -97.2 97.801 -105.2 93.801 -104.8C89.801 -104.4 121.401 -113.6 162.601 -86C162.601 -86 167.401 -83.2 171.001 -83.6C171.001 -83.6 174.201 -81.2 171.401 -77.6C171.401 -77.6 162.601 -68 173.801 -56.8C173.801 -56.8 192.201 -50 186.601 -58.8C186.601 -58.8 197.401 -54.8 199.801 -50.8C202.201 -46.8 201.001 -50.8 201.001 -50.8C201.001 -50.8 194.601 -58 188.601 -63.2C188.601 -63.2 183.401 -65.2 180.601 -73.6C177.801 -82 175.401 -92 179.801 -95.2C179.801 -95.2 175.801 -90.8 176.601 -94.8C177.401 -98.8 181.001 -102.4 182.601 -102.8C184.201 -103.2 200.601 -119 207.401 -119.4C207.401 -119.4 198.201 -118 195.201 -119C192.201 -120 165.601 -131.4 159.601 -132.6C159.601 -132.6 142.801 -139.2 154.801 -137.2C154.801 -137.2 190.601 -133.4 208.801 -120.2C208.801 -120.2 201.601 -128.6 183.201 -135.6C183.201 -135.6 161.001 -148.2 125.801 -143.2C125.801 -143.2 108.001 -140 100.201 -138.2C100.201 -138.2 97.601 -138.8 97.001 -139.2C96.401 -139.6 84.6 -148.6 57 -141.6C57 -141.6 40 -137 31.4 -132.2C31.4 -132.2 16.2 -131 12.6 -127.8C12.6 -127.8 -6 -113.2 -8 -112.4C-10 -111.6 -21.4 -104 -22.2 -103.6C-22.2 -103.6 2.4 -110.2 4.8 -112.6C7.2 -115 24.6 -117.6 27 -116.2C29.4 -114.8 37.8 -115.4 28.2 -114.8C28.2 -114.8 103.801 -100 104.601 -98C105.401 -96 109.401 -97.2 109.401 -97.2z"/>
313
- </g>
314
- <g style="fill: rgb(204, 114, 38);">
315
- <path d="M180.801 -106.4C180.801 -106.4 170.601 -113.8 168.601 -113.8C166.601 -113.8 154.201 -124 150.001 -123.6C145.801 -123.2 133.601 -133.2 106.201 -125C106.201 -125 105.601 -127 109.201 -127.8C109.201 -127.8 115.601 -130 116.001 -130.6C116.001 -130.6 136.201 -134.8 143.401 -131.2C143.401 -131.2 152.601 -128.6 158.801 -122.4C158.801 -122.4 170.001 -119.2 173.201 -120.2C173.201 -120.2 182.001 -118 182.401 -116.2C182.401 -116.2 188.201 -113.2 186.401 -110.6C186.401 -110.6 186.801 -109 180.801 -106.4z"/>
316
- </g>
317
- <g style="fill: rgb(204, 114, 38);">
318
- <path d="M168.33 -108.509C169.137 -107.877 170.156 -107.779 170.761 -106.97C170.995 -106.656 170.706 -106.33 170.391 -106.233C169.348 -105.916 168.292 -106.486 167.15 -105.898C166.748 -105.691 166.106 -105.873 165.553 -106.022C163.921 -106.463 162.092 -106.488 160.401 -105.8C158.416 -106.929 156.056 -106.345 153.975 -107.346C153.917 -107.373 153.695 -107.027 153.621 -107.054C150.575 -108.199 146.832 -107.916 144.401 -110.2C141.973 -110.612 139.616 -111.074 137.188 -111.754C135.37 -112.263 133.961 -113.252 132.341 -114.084C130.964 -114.792 129.507 -115.314 127.973 -115.686C126.11 -116.138 124.279 -116.026 122.386 -116.546C122.293 -116.571 122.101 -116.227 122.019 -116.254C121.695 -116.362 121.405 -116.945 121.234 -116.892C119.553 -116.37 118.065 -117.342 116.401 -117C115.223 -118.224 113.495 -117.979 111.949 -118.421C108.985 -119.269 105.831 -117.999 102.801 -119C106.914 -120.842 111.601 -119.61 115.663 -121.679C117.991 -122.865 120.653 -121.763 123.223 -122.523C123.71 -122.667 124.401 -122.869 124.801 -122.2C124.935 -122.335 125.117 -122.574 125.175 -122.546C127.625 -121.389 129.94 -120.115 132.422 -119.049C132.763 -118.903 133.295 -119.135 133.547 -118.933C135.067 -117.717 137.01 -117.82 138.401 -116.6C140.099 -117.102 141.892 -116.722 143.621 -117.346C143.698 -117.373 143.932 -117.032 143.965 -117.054C145.095 -117.802 146.25 -117.531 147.142 -117.227C147.48 -117.112 148.143 -116.865 148.448 -116.791C149.574 -116.515 150.43 -116.035 151.609 -115.852C151.723 -115.834 151.908 -116.174 151.98 -116.146C153.103 -115.708 154.145 -115.764 154.801 -114.6C154.936 -114.735 155.101 -114.973 155.183 -114.946C156.21 -114.608 156.859 -113.853 157.96 -113.612C158.445 -113.506 159.057 -112.88 159.633 -112.704C162.025 -111.973 163.868 -110.444 166.062 -109.549C166.821 -109.239 167.697 -109.005 168.33 -108.509z"/>
319
- </g>
320
- <g style="fill: rgb(204, 114, 38);">
321
- <path d="M91.696 -122.739C89.178 -124.464 86.81 -125.57 84.368 -127.356C84.187 -127.489 83.827 -127.319 83.625 -127.441C82.618 -128.05 81.73 -128.631 80.748 -129.327C80.209 -129.709 79.388 -129.698 78.88 -129.956C76.336 -131.248 73.707 -131.806 71.2 -133C71.882 -133.638 73.004 -133.394 73.6 -134.2C73.795 -133.92 74.033 -133.636 74.386 -133.827C76.064 -134.731 77.914 -134.884 79.59 -134.794C81.294 -134.702 83.014 -134.397 84.789 -134.125C85.096 -134.078 85.295 -133.555 85.618 -133.458C87.846 -132.795 90.235 -133.32 92.354 -132.482C93.945 -131.853 95.515 -131.03 96.754 -129.755C97.006 -129.495 96.681 -129.194 96.401 -129C96.789 -129.109 97.062 -128.903 97.173 -128.59C97.257 -128.351 97.257 -128.049 97.173 -127.81C97.061 -127.498 96.782 -127.397 96.408 -127.346C95.001 -127.156 96.773 -128.536 96.073 -128.088C94.8 -127.274 95.546 -125.868 94.801 -124.6C94.521 -124.794 94.291 -125.012 94.401 -125.4C94.635 -124.878 94.033 -124.588 93.865 -124.272C93.48 -123.547 92.581 -122.132 91.696 -122.739z"/>
322
- </g>
323
- <g style="fill: rgb(204, 114, 38);">
324
- <path d="M59.198 -115.391C56.044 -116.185 52.994 -116.07 49.978 -117.346C49.911 -117.374 49.688 -117.027 49.624 -117.054C48.258 -117.648 47.34 -118.614 46.264 -119.66C45.351 -120.548 43.693 -120.161 42.419 -120.648C42.095 -120.772 41.892 -121.284 41.591 -121.323C40.372 -121.48 39.445 -122.429 38.4 -123C40.736 -123.795 43.147 -123.764 45.609 -124.148C45.722 -124.166 45.867 -123.845 46 -123.845C46.136 -123.845 46.266 -124.066 46.4 -124.2C46.595 -123.92 46.897 -123.594 47.154 -123.848C47.702 -124.388 48.258 -124.198 48.798 -124.158C48.942 -124.148 49.067 -123.845 49.2 -123.845C49.336 -123.845 49.467 -124.156 49.6 -124.156C49.736 -124.155 49.867 -123.845 50 -123.845C50.136 -123.845 50.266 -124.066 50.4 -124.2C51.092 -123.418 51.977 -123.972 52.799 -123.793C53.837 -123.566 54.104 -122.418 55.178 -122.12C59.893 -120.816 64.03 -118.671 68.393 -116.584C68.7 -116.437 68.91 -116.189 68.8 -115.8C69.067 -115.8 69.38 -115.888 69.57 -115.756C70.628 -115.024 71.669 -114.476 72.366 -113.378C72.582 -113.039 72.253 -112.632 72.02 -112.684C67.591 -113.679 63.585 -114.287 59.198 -115.391z"/>
325
- </g>
326
- <g style="fill: rgb(204, 114, 38);">
327
- <path d="M45.338 -71.179C43.746 -72.398 43.162 -74.429 42.034 -76.221C41.82 -76.561 42.094 -76.875 42.411 -76.964C42.971 -77.123 43.514 -76.645 43.923 -76.443C45.668 -75.581 47.203 -74.339 49.2 -74.2C51.19 -71.966 55.45 -71.581 55.457 -68.2C55.458 -67.341 54.03 -68.259 53.6 -67.4C51.149 -68.403 48.76 -68.3 46.38 -69.767C45.763 -70.148 46.093 -70.601 45.338 -71.179z"/>
328
- </g>
329
- <g style="fill: rgb(204, 114, 38);">
330
- <path d="M17.8 -123.756C17.935 -123.755 24.966 -123.522 24.949 -123.408C24.904 -123.099 17.174 -122.05 16.81 -122.22C16.646 -122.296 9.134 -119.866 9 -120C9.268 -120.135 17.534 -123.756 17.8 -123.756z"/>
331
- </g>
332
- <g style="fill: rgb(0, 0, 0);">
333
- <path d="M33.2 -114C33.2 -114 18.4 -112.2 14 -111C9.6 -109.8 -9 -102.2 -12 -100.2C-12 -100.2 -25.4 -94.8 -42.4 -74.8C-42.4 -74.8 -34.8 -78.2 -32.6 -81C-32.6 -81 -19 -93.6 -19.2 -91C-19.2 -91 -7 -99.6 -7.6 -97.4C-7.6 -97.4 16.8 -108.6 14.8 -105.4C14.8 -105.4 36.4 -110 35.4 -108C35.4 -108 54.2 -103.6 51.4 -103.4C51.4 -103.4 45.6 -102.2 52 -98.6C52 -98.6 48.6 -94.2 43.2 -98.2C37.8 -102.2 40.8 -100 35.8 -99C35.8 -99 33.2 -98.2 28.6 -102.2C28.6 -102.2 23 -106.8 14.2 -103.2C14.2 -103.2 -16.4 -90.6 -18.4 -90C-18.4 -90 -22 -87.2 -24.4 -83.6C-24.4 -83.6 -30.2 -79.2 -33.2 -77.8C-33.2 -77.8 -46 -66.2 -47.2 -64.8C-47.2 -64.8 -50.6 -59.6 -51.4 -59.2C-51.4 -59.2 -45 -63 -43 -65C-43 -65 -29 -75 -23.6 -75.8C-23.6 -75.8 -19.2 -78.8 -18.4 -80.2C-18.4 -80.2 -4 -89.4 0.2 -89.4C0.2 -89.4 9.4 -84.2 11.8 -91.2C11.8 -91.2 17.6 -93 23.2 -91.8C23.2 -91.8 26.4 -94.4 25.6 -96.6C25.6 -96.6 27.2 -98.4 28.2 -94.6C28.2 -94.6 31.6 -91 36.4 -93C36.4 -93 40.4 -93.2 38.4 -90.8C38.4 -90.8 34 -87 22.2 -86.8C22.2 -86.8 9.8 -86.2 -6.6 -78.6C-6.6 -78.6 -36.4 -68.2 -45.6 -57.8C-45.6 -57.8 -52 -49 -57.4 -47.8C-57.4 -47.8 -63.2 -47 -69.2 -39.6C-69.2 -39.6 -59.4 -45.4 -50.4 -45.4C-50.4 -45.4 -46.4 -47.8 -50.2 -44.2C-50.2 -44.2 -53.8 -36.6 -52.2 -31.2C-52.2 -31.2 -52.8 -26 -53.6 -24.4C-53.6 -24.4 -61.4 -11.6 -61.4 -9.2C-61.4 -6.8 -60.2 3 -59.8 3.6C-59.4 4.2 -60.8 2 -57 4.4C-53.2 6.8 -50.4 8.4 -49.6 11.2C-48.8 14 -51.6 5.8 -51.8 4C-52 2.2 -56.2 -5 -55.4 -7.4C-55.4 -7.4 -54.4 -6.4 -53.6 -5C-53.6 -5 -54.2 -5.6 -53.6 -9.2C-53.6 -9.2 -52.8 -14.4 -51.4 -17.6C-50 -20.8 -48 -24.6 -47.6 -25.4C-47.2 -26.2 -47.2 -32 -45.8 -29.4L-42.4 -26.8C-42.4 -26.8 -45.2 -29.4 -43 -31.6C-43 -31.6 -44 -37.2 -42.2 -39.8C-42.2 -39.8 -35.2 -48.2 -33.6 -49.2C-32 -50.2 -33.4 -49.8 -33.4 -49.8C-33.4 -49.8 -27.4 -54 -33.2 -52.4C-33.2 -52.4 -37.2 -50.8 -40.2 -50.8C-40.2 -50.8 -47.8 -48.8 -43.8 -53C-39.8 -57.2 -29.8 -62.6 -26 -62.4L-25.2 -60.8L-14 -63.2L-15.2 -62.4C-15.2 -62.4 -15.4 -62.6 -11.2 -63C-7 -63.4 -1.2 -62 0.2 -63.8C1.6 -65.6 5 -66.6 4.6 -65.2C4.2 -63.8 4 -61.8 4 -61.8C4 -61.8 9 -67.6 8.4 -65.4C7.8 -63.2 -0.4 -58 -1.8 -51.8L8.6 -60L12.2 -63C12.2 -63 15.8 -60.8 16 -62.4C16.2 -64 20.8 -69.8 22 -69.6C23.2 -69.4 25.2 -72.2 25 -69.6C24.8 -67 32.4 -61.6 32.4 -61.6C32.4 -61.6 35.6 -63.4 37 -62C38.4 -60.6 42.6 -81.8 42.6 -81.8L67.6 -92.4L111.201 -95.8L94.201 -102.6L33.2 -114z"/>
334
- </g>
335
- <g style="stroke: rgb(76, 0, 0); stroke-width: 2;">
336
- <path d="M51.4 85C51.4 85 36.4 68.2 28 65.6C28 65.6 14.6 58.8 -10 66.6"/>
337
- </g>
338
- <g style="stroke: rgb(76, 0, 0); stroke-width: 2;">
339
- <path d="M24.8 64.2C24.8 64.2 -0.4 56.2 -15.8 60.4C-15.8 60.4 -34.2 62.4 -42.6 76.2"/>
340
- </g>
341
- <g style="stroke: rgb(76, 0, 0); stroke-width: 2;">
342
- <path d="M21.2 63C21.2 63 4.2 55.8 -10.6 53.6C-10.6 53.6 -27.2 51 -43.8 58.2C-43.8 58.2 -56 64.2 -61.4 74.4"/>
343
- </g>
344
- <g style="stroke: rgb(76, 0, 0); stroke-width: 2;">
345
- <path d="M22.2 63.4C22.2 63.4 6.8 52.4 5.8 51C5.8 51 -1.2 40 -14.2 39.6C-14.2 39.6 -35.6 40.4 -52.8 48.4"/>
346
- </g>
347
- <g style="fill: rgb(0, 0, 0);">
348
- <path d="M20.895 54.407C22.437 55.87 49.4 84.8 49.4 84.8C84.6 121.401 56.6 87.2 56.6 87.2C49 82.4 39.8 63.6 39.8 63.6C38.6 60.8 53.8 70.8 53.8 70.8C57.8 71.6 71.4 90.8 71.4 90.8C64.6 88.4 69.4 95.6 69.4 95.6C72.2 97.6 92.601 113.201 92.601 113.201C96.201 117.201 100.201 118.801 100.201 118.801C114.201 113.601 107.801 126.801 107.801 126.801C110.201 133.601 115.801 122.001 115.801 122.001C127.001 105.2 110.601 107.601 110.601 107.601C80.6 110.401 73.8 94.4 73.8 94.4C71.4 92 80.2 94.4 80.2 94.4C88.601 96.4 73 82 73 82C75.4 82 84.6 88.8 84.6 88.8C95.001 98 97.001 96 97.001 96C115.001 87.2 125.401 94.8 125.401 94.8C127.401 96.4 121.801 103.2 123.401 108.401C125.001 113.601 129.801 126.001 129.801 126.001C127.401 127.601 127.801 138.401 127.801 138.401C144.601 161.601 135.001 159.601 135.001 159.601C119.401 159.201 134.201 166.801 134.201 166.801C137.401 168.801 146.201 176.001 146.201 176.001C143.401 174.801 141.801 180.001 141.801 180.001C146.601 184.001 143.801 188.801 143.801 188.801C137.801 190.001 136.601 194.001 136.601 194.001C143.401 202.001 133.401 202.401 133.401 202.401C137.001 206.801 132.201 218.801 132.201 218.801C127.401 218.801 121.001 224.401 121.001 224.401C123.401 229.201 113.001 234.801 113.001 234.801C104.601 236.401 107.401 243.201 107.401 243.201C99.401 249.201 97.001 265.201 97.001 265.201C96.201 275.601 93.801 278.801 99.001 276.801C104.201 274.801 103.401 262.401 103.401 262.401C98.601 246.801 141.401 230.801 141.401 230.801C145.401 229.201 146.201 224.001 146.201 224.001C148.201 224.401 157.001 232.001 157.001 232.001C164.601 243.201 165.001 234.001 165.001 234.001C166.201 230.401 164.601 224.401 164.601 224.401C170.601 202.801 156.601 196.401 156.601 196.401C146.601 162.801 160.601 171.201 160.601 171.201C163.401 176.801 174.201 182.001 174.201 182.001L177.801 179.601C176.201 174.801 184.601 168.801 184.601 168.801C187.401 175.201 193.401 167.201 193.401 167.201C197.001 142.801 209.401 157.201 209.401 157.201C213.401 158.401 214.601 151.601 214.601 151.601C218.201 141.201 214.601 127.601 214.601 127.601C218.201 127.201 227.801 133.201 227.801 133.201C230.601 129.601 221.401 112.801 225.401 115.201C229.401 117.601 233.801 119.201 233.801 119.201C234.601 117.201 224.601 104.801 224.601 104.801C220.201 102 215.001 81.6 215.001 81.6C222.201 85.2 212.201 70 212.201 70C212.201 66.8 218.201 55.6 218.201 55.6C217.401 48.8 218.201 49.2 218.201 49.2C221.001 50.4 229.001 52 222.201 45.6C215.401 39.2 223.001 34.4 223.001 34.4C227.401 31.6 213.801 32 213.801 32C208.601 27.6 209.001 23.6 209.001 23.6C217.001 25.6 202.601 11.2 200.201 7.6C197.801 4 207.401 -1.2 207.401 -1.2C220.601 -4.8 209.001 -8 209.001 -8C189.401 -7.6 200.201 -18.4 200.201 -18.4C206.201 -18 204.601 -20.4 204.601 -20.4C199.401 -21.6 189.801 -28 189.801 -28C185.801 -31.6 189.401 -30.8 189.401 -30.8C206.201 -29.6 177.401 -40.8 177.401 -40.8C185.401 -40.8 167.401 -51.2 167.401 -51.2C165.401 -52.8 162.201 -60.4 162.201 -60.4C156.201 -65.6 151.401 -72.4 151.401 -72.4C151.001 -76.8 146.201 -81.6 146.201 -81.6C134.601 -95.2 129.001 -94.8 129.001 -94.8C114.201 -98.4 109.001 -97.6 109.001 -97.6L56.2 -93.2C29.8 -80.4 37.6 -59.4 37.6 -59.4C44 -51 53.2 -54.8 53.2 -54.8C57.8 -61 69.4 -58.8 69.4 -58.8C89.801 -55.6 87.201 -59.2 87.201 -59.2C84.801 -63.8 68.6 -70 68.4 -70.6C68.2 -71.2 59.4 -74.6 59.4 -74.6C56.4 -75.8 52 -85 52 -85C48.8 -88.4 64.6 -82.6 64.6 -82.6C63.4 -81.6 70.8 -77.6 70.8 -77.6C88.201 -78.6 98.801 -67.8 98.801 -67.8C109.601 -51.2 109.801 -59.4 109.801 -59.4C112.601 -68.8 100.801 -90 100.801 -90C101.201 -92 109.401 -85.4 109.401 -85.4C110.801 -87.4 111.601 -81.6 111.601 -81.6C111.801 -79.2 115.601 -71.2 115.601 -71.2C118.401 -58.2 122.001 -65.6 122.001 -65.6L126.601 -56.2C128.001 -53.6 122.001 -46 122.001 -46C121.801 -43.2 122.601 -43.4 117.001 -35.8C111.401 -28.2 114.801 -23.8 114.801 -23.8C113.401 -17.2 122.201 -17.6 122.201 -17.6C124.801 -15.4 128.201 -15.4 128.201 -15.4C130.001 -13.4 132.401 -14 132.401 -14C134.001 -17.8 140.201 -15.8 140.201 -15.8C141.601 -18.2 149.801 -18.6 149.801 -18.6C150.801 -21.2 151.201 -22.8 154.601 -23.4C158.001 -24 133.401 -67 133.401 -67C139.801 -67.8 131.601 -80.2 131.601 -80.2C129.401 -86.8 140.801 -72.2 143.001 -70.8C145.201 -69.4 146.201 -67.2 144.601 -67.4C143.001 -67.6 141.201 -65.4 142.601 -65.2C144.001 -65 157.001 -50 160.401 -39.8C163.801 -29.6 169.801 -25.6 176.001 -19.6C182.201 -13.6 181.401 10.6 181.401 10.6C181.001 19.4 187.001 30 187.001 30C189.001 33.8 184.801 52 184.801 52C182.801 54.2 184.201 55 184.201 55C185.201 56.2 192.001 69.4 192.001 69.4C190.201 69.2 193.801 72.8 193.801 72.8C199.001 78.8 192.601 75.8 192.601 75.8C186.601 74.2 193.601 84 193.601 84C194.801 85.8 185.801 81.2 185.801 81.2C176.601 80.6 188.201 87.8 188.201 87.8C196.801 95 185.401 90.6 185.401 90.6C180.801 88.8 184.001 95.6 184.001 95.6C187.201 97.2 204.401 104.2 204.401 104.2C204.801 108.001 201.801 113.001 201.801 113.001C202.201 117.001 200.001 120.401 200.001 120.401C198.801 128.601 198.201 129.401 198.201 129.401C194.001 129.601 186.601 143.401 186.601 143.401C184.801 146.001 174.601 158.001 174.601 158.001C172.601 165.001 154.601 157.801 154.601 157.801C148.001 161.201 150.001 157.801 150.001 157.801C149.601 155.601 154.401 149.601 154.401 149.601C161.401 147.001 158.801 136.201 158.801 136.201C162.801 134.801 151.601 132.001 151.801 130.801C152.001 129.601 157.801 128.201 157.801 128.201C165.801 126.201 161.401 123.801 161.401 123.801C160.801 119.801 163.801 114.201 163.801 114.201C175.401 113.401 163.801 97.2 163.801 97.2C153.001 89.6 152.001 83.8 152.001 83.8C164.601 75.6 156.401 63.2 156.601 59.6C156.801 56 158.001 34.4 158.001 34.4C156.001 28.2 153.001 14.6 153.001 14.6C155.201 9.4 162.601 -3.2 162.601 -3.2C165.401 -7.4 174.201 -12.2 172.001 -15.2C169.801 -18.2 162.001 -16.4 162.001 -16.4C154.201 -17.8 154.801 -12.6 154.801 -12.6C153.201 -11.6 152.401 -6.6 152.401 -6.6C151.68 1.333 142.801 7.6 142.801 7.6C131.601 13.8 140.801 17.8 140.801 17.8C146.801 24.4 137.001 24.6 137.001 24.6C126.001 22.8 134.201 33 134.201 33C145.001 45.8 142.001 48.6 142.001 48.6C131.801 49.6 144.401 58.8 144.401 58.8C144.401 58.8 143.601 56.8 143.801 58.6C144.001 60.4 147.001 64.6 147.801 66.6C148.601 68.6 144.601 68.8 144.601 68.8C145.201 78.4 129.801 74.2 129.801 74.2C129.801 74.2 129.801 74.2 128.201 74.4C126.601 74.6 115.401 73.8 109.601 71.6C103.801 69.4 97.001 69.4 97.001 69.4C97.001 69.4 93.001 71.2 85.4 71C77.8 70.8 69.8 73.6 69.8 73.6C65.4 73.2 74 68.8 74.2 69C74.4 69.2 80 63.6 72 64.2C50.203 65.835 39.4 55.6 39.4 55.6C37.4 54.2 34.8 51.4 34.8 51.4C24.8 49.4 36.2 63.8 36.2 63.8C37.4 65.2 36 66.2 36 66.2C35.2 64.6 27.4 59.2 27.4 59.2C24.589 58.227 23.226 56.893 20.895 54.407z"/>
349
- </g>
350
- <g style="fill: rgb(76, 0, 0);">
351
- <path d="M-3 42.8C-3 42.8 8.6 48.4 11.2 51.2C13.8 54 27.8 65.4 27.8 65.4C27.8 65.4 22.4 63.4 19.8 61.6C17.2 59.8 6.4 51.6 6.4 51.6C6.4 51.6 2.6 45.6 -3 42.8z"/>
352
- </g>
353
- <g style="fill: rgb(153, 204, 50);">
354
- <path d="M-61.009 11.603C-60.672 11.455 -61.196 8.743 -61.4 8.2C-62.422 5.474 -71.4 4 -71.4 4C-71.627 5.365 -71.682 6.961 -71.576 8.599C-71.576 8.599 -66.708 14.118 -61.009 11.603z"/>
355
- </g>
356
- <g style="fill: rgb(101, 153, 0);">
357
- <path d="M-61.009 11.403C-61.458 11.561 -61.024 8.669 -61.2 8.2C-62.222 5.474 -71.4 3.9 -71.4 3.9C-71.627 5.265 -71.682 6.861 -71.576 8.499C-71.576 8.499 -67.308 13.618 -61.009 11.403z"/>
358
- </g>
359
- <g style="fill: rgb(0, 0, 0);">
360
- <path d="M-65.4 11.546C-66.025 11.546 -66.531 10.406 -66.531 9C-66.531 7.595 -66.025 6.455 -65.4 6.455C-64.775 6.455 -64.268 7.595 -64.268 9C-64.268 10.406 -64.775 11.546 -65.4 11.546z"/>
361
- </g>
362
- <g style="fill: rgb(0, 0, 0);">
363
- <path d="M-65.4 9z"/>
364
- </g>
365
- <g style="fill: rgb(0, 0, 0);">
366
- <path d="M-111 109.601C-111 109.601 -116.6 119.601 -91.8 113.601C-91.8 113.601 -77.8 112.401 -75.4 110.001C-74.2 110.801 -65.834 113.734 -63 114.401C-56.2 116.001 -47.8 106 -47.8 106C-47.8 106 -43.2 95.5 -40.4 95.5C-37.6 95.5 -40.8 97.1 -40.8 97.1C-40.8 97.1 -47.4 107.201 -47 108.801C-47 108.801 -52.2 128.801 -68.2 129.601C-68.2 129.601 -84.35 130.551 -83 136.401C-83 136.401 -74.2 134.001 -71.8 136.401C-71.8 136.401 -61 136.001 -69 142.401L-75.8 154.001C-75.8 154.001 -75.66 157.919 -85.8 154.401C-95.6 151.001 -105.9 138.101 -105.9 138.101C-105.9 138.101 -121.85 123.551 -111 109.601z"/>
367
- </g>
368
- <g style="fill: rgb(229, 153, 153);">
369
- <path d="M-112.2 113.601C-112.2 113.601 -114.2 123.201 -77.4 112.801C-77.4 112.801 -73 112.801 -70.6 113.601C-68.2 114.401 -56.2 117.201 -54.2 116.001C-54.2 116.001 -61.4 129.601 -73 128.001C-73 128.001 -86.2 129.601 -85.8 134.401C-85.8 134.401 -81.8 141.601 -77 144.001C-77 144.001 -74.2 146.401 -74.6 149.601C-75 152.801 -77.8 154.401 -79.8 155.201C-81.8 156.001 -85 152.801 -86.6 152.801C-88.2 152.801 -96.6 146.401 -101 141.601C-105.4 136.801 -113.8 124.801 -113.4 122.001C-113 119.201 -112.2 113.601 -112.2 113.601z"/>
370
- </g>
371
- <g style="fill: rgb(178, 101, 101);">
372
- <path d="M-109 131.051C-106.4 135.001 -103.2 139.201 -101 141.601C-96.6 146.401 -88.2 152.801 -86.6 152.801C-85 152.801 -81.8 156.001 -79.8 155.201C-77.8 154.401 -75 152.801 -74.6 149.601C-74.2 146.401 -77 144.001 -77 144.001C-80.066 142.468 -82.806 138.976 -84.385 136.653C-84.385 136.653 -84.2 139.201 -89.4 138.401C-94.6 137.601 -99.8 134.801 -101.4 131.601C-103 128.401 -105.4 126.001 -103.8 129.601C-102.2 133.201 -99.8 136.801 -98.2 137.201C-96.6 137.601 -97 138.801 -99.4 138.401C-101.8 138.001 -104.6 137.601 -109 132.401z"/>
373
- </g>
374
- <g style="fill: rgb(153, 38, 0);">
375
- <path d="M-111.6 110.001C-111.6 110.001 -109.8 96.4 -108.6 92.4C-108.6 92.4 -109.4 85.6 -107 81.4C-104.6 77.2 -102.6 71 -99.6 65.6C-96.6 60.2 -96.4 56.2 -92.4 54.6C-88.4 53 -82.4 44.4 -79.6 43.4C-76.8 42.4 -77 43.2 -77 43.2C-77 43.2 -70.2 28.4 -56.6 32.4C-56.6 32.4 -72.8 29.6 -57 20.2C-57 20.2 -61.8 21.3 -58.5 14.3C-56.299 9.632 -56.8 16.4 -67.8 28.2C-67.8 28.2 -72.8 36.8 -78 39.8C-83.2 42.8 -95.2 49.8 -96.4 53.6C-97.6 57.4 -100.8 63.2 -102.8 64.8C-104.8 66.4 -107.6 70.6 -108 74C-108 74 -109.2 78 -110.6 79.2C-112 80.4 -112.2 83.6 -112.2 85.6C-112.2 87.6 -114.2 90.4 -114 92.8C-114 92.8 -113.2 111.801 -113.6 113.801L-111.6 110.001z"/>
376
- </g>
377
- <g style="fill: rgb(255, 255, 255);">
378
- <path d="M-120.2 114.601C-120.2 114.601 -122.2 113.201 -126.6 119.201C-126.6 119.201 -119.3 152.201 -119.3 153.601C-119.3 153.601 -118.2 151.501 -119.5 144.301C-120.8 137.101 -121.7 124.401 -121.7 124.401L-120.2 114.601z"/>
379
- </g>
380
- <g style="fill: rgb(153, 38, 0);">
381
- <path d="M-98.6 54C-98.6 54 -116.2 57.2 -115.8 86.4L-116.6 111.201C-116.6 111.201 -117.8 85.6 -119 84C-120.2 82.4 -116.2 71.2 -119.4 77.2C-119.4 77.2 -133.4 91.2 -125.4 112.401C-125.4 112.401 -123.9 115.701 -126.9 111.101C-126.9 111.101 -131.5 98.5 -130.4 92.1C-130.4 92.1 -130.2 89.9 -128.3 87.1C-128.3 87.1 -119.7 75.4 -117 73.1C-117 73.1 -115.2 58.7 -99.8 53.5C-99.8 53.5 -94.1 51.2 -98.6 54z"/>
382
- </g>
383
- <g style="fill: rgb(0, 0, 0);">
384
- <path d="M40.8 -12.2C41.46 -12.554 41.451 -13.524 42.031 -13.697C43.18 -14.041 43.344 -15.108 43.862 -15.892C44.735 -17.211 44.928 -18.744 45.51 -20.235C45.782 -20.935 45.809 -21.89 45.496 -22.55C44.322 -25.031 43.62 -27.48 42.178 -29.906C41.91 -30.356 41.648 -31.15 41.447 -31.748C40.984 -33.132 39.727 -34.123 38.867 -35.443C38.579 -35.884 39.104 -36.809 38.388 -36.893C37.491 -36.998 36.042 -37.578 35.809 -36.552C35.221 -33.965 36.232 -31.442 37.2 -29C36.418 -28.308 36.752 -27.387 36.904 -26.62C37.614 -23.014 36.416 -19.662 35.655 -16.188C35.632 -16.084 35.974 -15.886 35.946 -15.824C34.724 -13.138 33.272 -10.693 31.453 -8.312C30.695 -7.32 29.823 -6.404 29.326 -5.341C28.958 -4.554 28.55 -3.588 28.8 -2.6C25.365 0.18 23.115 4.025 20.504 7.871C20.042 8.551 20.333 9.76 20.884 10.029C21.697 10.427 22.653 9.403 23.123 8.557C23.512 7.859 23.865 7.209 24.356 6.566C24.489 6.391 24.31 5.972 24.445 5.851C27.078 3.504 28.747 0.568 31.2 -1.8C33.15 -2.129 34.687 -3.127 36.435 -4.14C36.743 -4.319 37.267 -4.07 37.557 -4.265C39.31 -5.442 39.308 -7.478 39.414 -9.388C39.464 -10.272 39.66 -11.589 40.8 -12.2z"/>
385
- </g>
386
- <g style="fill: rgb(0, 0, 0);">
387
- <path d="M31.959 -16.666C32.083 -16.743 31.928 -17.166 32.037 -17.382C32.199 -17.706 32.602 -17.894 32.764 -18.218C32.873 -18.434 32.71 -18.814 32.846 -18.956C35.179 -21.403 35.436 -24.427 34.4 -27.4C35.424 -28.02 35.485 -29.282 35.06 -30.129C34.207 -31.829 34.014 -33.755 33.039 -35.298C32.237 -36.567 30.659 -37.811 29.288 -36.508C28.867 -36.108 28.546 -35.321 28.824 -34.609C28.888 -34.446 29.173 -34.3 29.146 -34.218C29.039 -33.894 28.493 -33.67 28.487 -33.398C28.457 -31.902 27.503 -30.391 28.133 -29.062C28.905 -27.433 29.724 -25.576 30.4 -23.8C29.166 -21.684 30.199 -19.235 28.446 -17.358C28.31 -17.212 28.319 -16.826 28.441 -16.624C28.733 -16.138 29.139 -15.732 29.625 -15.44C29.827 -15.319 30.175 -15.317 30.375 -15.441C30.953 -15.803 31.351 -16.29 31.959 -16.666z"/>
388
- </g>
389
- <g style="fill: rgb(0, 0, 0);">
390
- <path d="M94.771 -26.977C96.16 -25.185 96.45 -22.39 94.401 -21C94.951 -17.691 98.302 -19.67 100.401 -20.2C100.292 -20.588 100.519 -20.932 100.802 -20.937C101.859 -20.952 102.539 -21.984 103.601 -21.8C104.035 -23.357 105.673 -24.059 106.317 -25.439C108.043 -29.134 107.452 -33.407 104.868 -36.653C104.666 -36.907 104.883 -37.424 104.759 -37.786C104.003 -39.997 101.935 -40.312 100.001 -41C98.824 -44.875 98.163 -48.906 96.401 -52.6C94.787 -52.85 94.089 -54.589 92.752 -55.309C91.419 -56.028 90.851 -54.449 90.892 -53.403C90.899 -53.198 91.351 -52.974 91.181 -52.609C91.105 -52.445 90.845 -52.334 90.845 -52.2C90.846 -52.065 91.067 -51.934 91.201 -51.8C90.283 -50.98 88.86 -50.503 88.565 -49.358C87.611 -45.648 90.184 -42.523 91.852 -39.322C92.443 -38.187 91.707 -36.916 90.947 -35.708C90.509 -35.013 90.617 -33.886 90.893 -33.03C91.645 -30.699 93.236 -28.96 94.771 -26.977z"/>
391
- </g>
392
- <g style="fill: rgb(0, 0, 0);">
393
- <path d="M57.611 -8.591C56.124 -6.74 52.712 -4.171 55.629 -2.243C55.823 -2.114 56.193 -2.11 56.366 -2.244C58.387 -3.809 60.39 -4.712 62.826 -5.294C62.95 -5.323 63.224 -4.856 63.593 -5.017C65.206 -5.72 67.216 -5.662 68.4 -7C72.167 -6.776 75.732 -7.892 79.123 -9.2C80.284 -9.648 81.554 -10.207 82.755 -10.709C84.131 -11.285 85.335 -12.213 86.447 -13.354C86.58 -13.49 86.934 -13.4 87.201 -13.4C87.161 -14.263 88.123 -14.39 88.37 -15.012C88.462 -15.244 88.312 -15.64 88.445 -15.742C90.583 -17.372 91.503 -19.39 90.334 -21.767C90.049 -22.345 89.8 -22.963 89.234 -23.439C88.149 -24.35 87.047 -23.496 86 -23.8C85.841 -23.172 85.112 -23.344 84.726 -23.146C83.867 -22.707 82.534 -23.292 81.675 -22.854C80.313 -22.159 79.072 -21.99 77.65 -21.613C77.338 -21.531 76.56 -21.627 76.4 -21C76.266 -21.134 76.118 -21.368 76.012 -21.346C74.104 -20.95 72.844 -20.736 71.543 -19.044C71.44 -18.911 70.998 -19.09 70.839 -18.955C69.882 -18.147 69.477 -16.913 68.376 -16.241C68.175 -16.118 67.823 -16.286 67.629 -16.157C66.983 -15.726 66.616 -15.085 65.974 -14.638C65.645 -14.409 65.245 -14.734 65.277 -14.99C65.522 -16.937 66.175 -18.724 65.6 -20.6C67.677 -23.12 70.194 -25.069 72 -27.8C72.015 -29.966 72.707 -32.112 72.594 -34.189C72.584 -34.382 72.296 -35.115 72.17 -35.462C71.858 -36.316 72.764 -37.382 71.92 -38.106C70.516 -39.309 69.224 -38.433 68.4 -37C66.562 -36.61 64.496 -35.917 62.918 -37.151C61.911 -37.938 61.333 -38.844 60.534 -39.9C59.549 -41.202 59.884 -42.638 59.954 -44.202C59.96 -44.33 59.645 -44.466 59.645 -44.6C59.646 -44.735 59.866 -44.866 60 -45C59.294 -45.626 59.019 -46.684 58 -47C58.305 -48.092 57.629 -48.976 56.758 -49.278C54.763 -49.969 53.086 -48.057 51.194 -47.984C50.68 -47.965 50.213 -49.003 49.564 -49.328C49.132 -49.544 48.428 -49.577 48.066 -49.311C47.378 -48.807 46.789 -48.693 46.031 -48.488C44.414 -48.052 43.136 -46.958 41.656 -46.103C40.171 -45.246 39.216 -43.809 38.136 -42.489C37.195 -41.337 37.059 -38.923 38.479 -38.423C40.322 -37.773 41.626 -40.476 43.592 -40.15C43.904 -40.099 44.11 -39.788 44 -39.4C44.389 -39.291 44.607 -39.52 44.8 -39.8C45.658 -38.781 46.822 -38.444 47.76 -37.571C48.73 -36.667 50.476 -37.085 51.491 -36.088C53.02 -34.586 52.461 -31.905 54.4 -30.6C53.814 -29.287 53.207 -28.01 52.872 -26.583C52.59 -25.377 53.584 -24.18 54.795 -24.271C56.053 -24.365 56.315 -25.124 56.8 -26.2C57.067 -25.933 57.536 -25.636 57.495 -25.42C57.038 -23.033 56.011 -21.04 55.553 -18.609C55.494 -18.292 55.189 -18.09 54.8 -18.2C54.332 -14.051 50.28 -11.657 47.735 -8.492C47.332 -7.99 47.328 -6.741 47.737 -6.338C49.14 -4.951 51.1 -6.497 52.8 -7C53.013 -8.206 53.872 -9.148 55.204 -9.092C55.46 -9.082 55.695 -9.624 56.019 -9.754C56.367 -9.892 56.869 -9.668 57.155 -9.866C58.884 -11.061 60.292 -12.167 62.03 -13.356C62.222 -13.487 62.566 -13.328 62.782 -13.436C63.107 -13.598 63.294 -13.985 63.617 -14.17C63.965 -14.37 64.207 -14.08 64.4 -13.8C63.754 -13.451 63.75 -12.494 63.168 -12.292C62.393 -12.024 61.832 -11.511 61.158 -11.064C60.866 -10.871 60.207 -11.119 60.103 -10.94C59.505 -9.912 58.321 -9.474 57.611 -8.591z"/>
394
- </g>
395
- <g style="fill: rgb(0, 0, 0);">
396
- <path d="M2.2 -58C2.2 -58 -7.038 -60.872 -18.2 -35.2C-18.2 -35.2 -20.6 -30 -23 -28C-25.4 -26 -36.6 -22.4 -38.6 -18.4L-49 -2.4C-49 -2.4 -34.2 -18.4 -31 -20.8C-31 -20.8 -23 -29.2 -26.2 -22.4C-26.2 -22.4 -40.2 -11.6 -39 -2.4C-39 -2.4 -44.6 12 -45.4 14C-45.4 14 -29.4 -18 -27 -19.2C-24.6 -20.4 -23.4 -20.4 -24.6 -16.8C-25.8 -13.2 -26.2 3.2 -29 5.2C-29 5.2 -21 -15.2 -21.8 -18.4C-21.8 -18.4 -18.6 -22 -16.2 -16.8L-17.4 -0.8L-13 11.2C-13 11.2 -15.4 0 -13.8 -15.6C-13.8 -15.6 -15.8 -26 -11.8 -20.4C-7.8 -14.8 1.8 -8.8 1.8 -4C1.8 -4 -3.4 -21.6 -12.6 -26.4L-16.6 -20.4L-17.8 -22.4C-17.8 -22.4 -21.4 -23.2 -17 -30C-12.6 -36.8 -13 -37.6 -13 -37.6C-13 -37.6 -6.6 -30.4 -5 -30.4C-5 -30.4 8.2 -38 9.4 -13.6C9.4 -13.6 16.2 -28 7 -34.8C7 -34.8 -7.8 -36.8 -6.6 -42L0.6 -54.4C4.2 -59.6 2.6 -56.8 2.6 -56.8z"/>
397
- </g>
398
- <g style="fill: rgb(0, 0, 0);">
399
- <path d="M-17.8 -41.6C-17.8 -41.6 -30.6 -41.6 -33.8 -36.4L-41 -26.8C-41 -26.8 -23.8 -36.8 -19.8 -38C-15.8 -39.2 -17.8 -41.6 -17.8 -41.6z"/>
400
- </g>
401
- <g style="fill: rgb(0, 0, 0);">
402
- <path d="M-57.8 -35.2C-57.8 -35.2 -59.8 -34 -60.2 -31.2C-60.6 -28.4 -63 -28 -62.2 -25.2C-61.4 -22.4 -59.4 -20 -59.4 -24C-59.4 -28 -57.8 -30 -57 -31.2C-56.2 -32.4 -54.6 -36.8 -57.8 -35.2z"/>
403
- </g>
404
- <g style="fill: rgb(0, 0, 0);">
405
- <path d="M-66.6 26C-66.6 26 -75 22 -78.2 18.4C-81.4 14.8 -80.948 19.966 -85.8 19.6C-91.647 19.159 -90.6 3.2 -90.6 3.2L-94.6 10.8C-94.6 10.8 -95.8 25.2 -87.8 22.8C-83.893 21.628 -82.6 23.2 -84.2 24C-85.8 24.8 -78.6 25.2 -81.4 26.8C-84.2 28.4 -69.8 23.2 -72.2 33.6L-66.6 26z"/>
406
- </g>
407
- <g style="fill: rgb(0, 0, 0);">
408
- <path d="M-79.2 40.4C-79.2 40.4 -94.6 44.8 -98.2 35.2C-98.2 35.2 -103 37.6 -100.8 40.6C-98.6 43.6 -97.4 44 -97.4 44C-97.4 44 -92 45.2 -92.6 46C-93.2 46.8 -95.6 50.2 -95.6 50.2C-95.6 50.2 -85.4 44.2 -79.2 40.4z"/>
409
- </g>
410
- <g style="fill: rgb(255, 255, 255);">
411
- <path d="M149.201 118.601C148.774 120.735 147.103 121.536 145.201 122.201C143.284 121.243 140.686 118.137 138.801 120.201C138.327 119.721 137.548 119.661 137.204 118.999C136.739 118.101 137.011 117.055 136.669 116.257C136.124 114.985 135.415 113.619 135.601 112.201C137.407 111.489 138.002 109.583 137.528 107.82C137.459 107.563 137.03 107.366 137.23 107.017C137.416 106.694 137.734 106.467 138.001 106.2C137.866 106.335 137.721 106.568 137.61 106.548C137 106.442 137.124 105.805 137.254 105.418C137.839 103.672 139.853 103.408 141.201 104.6C141.457 104.035 141.966 104.229 142.401 104.2C142.351 103.621 142.759 103.094 142.957 102.674C143.475 101.576 145.104 102.682 145.901 102.07C146.977 101.245 148.04 100.546 149.118 101.149C150.927 102.162 152.636 103.374 153.835 105.115C154.41 105.949 154.65 107.23 154.592 108.188C154.554 108.835 153.173 108.483 152.83 109.412C152.185 111.16 154.016 111.679 154.772 113.017C154.97 113.366 154.706 113.67 154.391 113.768C153.98 113.896 153.196 113.707 153.334 114.16C154.306 117.353 151.55 118.031 149.201 118.601z"/>
412
- </g>
413
- <g style="fill: rgb(255, 255, 255);">
414
- <path d="M139.6 138.201C139.593 136.463 137.992 134.707 139.201 133.001C139.336 133.135 139.467 133.356 139.601 133.356C139.736 133.356 139.867 133.135 140.001 133.001C141.496 135.217 145.148 136.145 145.006 138.991C144.984 139.438 143.897 140.356 144.801 141.001C142.988 142.349 142.933 144.719 142.001 146.601C140.763 146.315 139.551 145.952 138.401 145.401C138.753 143.915 138.636 142.231 139.456 140.911C139.89 140.213 139.603 139.134 139.6 138.201z"/>
415
- </g>
416
- <g style="fill: rgb(204, 204, 204);">
417
- <path d="M-26.6 129.201C-26.6 129.201 -43.458 139.337 -29.4 124.001C-20.6 114.401 -10.6 108.801 -10.6 108.801C-10.6 108.801 -0.2 104.4 3.4 103.2C7 102 22.2 96.8 25.4 96.4C28.6 96 38.2 92 45 96C51.8 100 59.8 104.4 59.8 104.4C59.8 104.4 43.4 96 39.8 98.4C36.2 100.8 29 100.4 23 103.6C23 103.6 8.2 108.001 5 110.001C1.8 112.001 -8.6 123.601 -10.2 122.801C-11.8 122.001 -9.8 121.601 -8.6 118.801C-7.4 116.001 -9.4 114.401 -17.4 120.801C-25.4 127.201 -26.6 129.201 -26.6 129.201z"/>
418
- </g>
419
- <g style="fill: rgb(0, 0, 0);">
420
- <path d="M-19.195 123.234C-19.195 123.234 -17.785 110.194 -9.307 111.859C-9.307 111.859 -1.081 107.689 1.641 105.721C1.641 105.721 9.78 104.019 11.09 103.402C29.569 94.702 44.288 99.221 44.835 98.101C45.381 96.982 65.006 104.099 68.615 108.185C69.006 108.628 58.384 102.588 48.686 100.697C40.413 99.083 18.811 100.944 7.905 106.48C4.932 107.989 -4.013 113.773 -6.544 113.662C-9.075 113.55 -19.195 123.234 -19.195 123.234z"/>
421
- </g>
422
- <g style="fill: rgb(204, 204, 204);">
423
- <path d="M-23 148.801C-23 148.801 -38.2 146.401 -21.4 144.801C-21.4 144.801 -3.4 142.801 0.6 137.601C0.6 137.601 14.2 128.401 17 128.001C19.8 127.601 49.8 120.401 50.2 118.001C50.6 115.601 56.2 115.601 57.8 116.401C59.4 117.201 58.6 118.401 55.8 119.201C53 120.001 21.8 136.401 15.4 137.601C9 138.801 -2.6 146.401 -7.4 147.601C-12.2 148.801 -23 148.801 -23 148.801z"/>
424
- </g>
425
- <g style="fill: rgb(0, 0, 0);">
426
- <path d="M-3.48 141.403C-3.48 141.403 -12.062 140.574 -3.461 139.755C-3.461 139.755 5.355 136.331 7.403 133.668C7.403 133.668 14.367 128.957 15.8 128.753C17.234 128.548 31.194 124.861 31.399 123.633C31.604 122.404 65.67 109.823 70.09 113.013C73.001 115.114 63.1 113.437 53.466 117.847C52.111 118.467 18.258 133.054 14.981 133.668C11.704 134.283 5.765 138.174 3.307 138.788C0.85 139.403 -3.48 141.403 -3.48 141.403z"/>
427
- </g>
428
- <g style="fill: rgb(0, 0, 0);">
429
- <path d="M-11.4 143.601C-11.4 143.601 -6.2 143.201 -7.4 144.801C-8.6 146.401 -11 145.601 -11 145.601L-11.4 143.601z"/>
430
- </g>
431
- <g style="fill: rgb(0, 0, 0);">
432
- <path d="M-18.6 145.201C-18.6 145.201 -13.4 144.801 -14.6 146.401C-15.8 148.001 -18.2 147.201 -18.2 147.201L-18.6 145.201z"/>
433
- </g>
434
- <g style="fill: rgb(0, 0, 0);">
435
- <path d="M-29 146.801C-29 146.801 -23.8 146.401 -25 148.001C-26.2 149.601 -28.6 148.801 -28.6 148.801L-29 146.801z"/>
436
- </g>
437
- <g style="fill: rgb(0, 0, 0);">
438
- <path d="M-36.6 147.601C-36.6 147.601 -31.4 147.201 -32.6 148.801C-33.8 150.401 -36.2 149.601 -36.2 149.601L-36.6 147.601z"/>
439
- </g>
440
- <g style="fill: rgb(0, 0, 0);">
441
- <path d="M1.8 108.001C1.8 108.001 6.2 108.001 5 109.601C3.8 111.201 0.6 110.801 0.6 110.801L1.8 108.001z"/>
442
- </g>
443
- <g style="fill: rgb(0, 0, 0);">
444
- <path d="M-8.2 113.601C-8.2 113.601 -1.694 111.46 -4.2 114.801C-5.4 116.401 -7.8 115.601 -7.8 115.601L-8.2 113.601z"/>
445
- </g>
446
- <g style="fill: rgb(0, 0, 0);">
447
- <path d="M-19.4 118.401C-19.4 118.401 -14.2 118.001 -15.4 119.601C-16.6 121.201 -19 120.401 -19 120.401L-19.4 118.401z"/>
448
- </g>
449
- <g style="fill: rgb(0, 0, 0);">
450
- <path d="M-27 124.401C-27 124.401 -21.8 124.001 -23 125.601C-24.2 127.201 -26.6 126.401 -26.6 126.401L-27 124.401z"/>
451
- </g>
452
- <g style="fill: rgb(0, 0, 0);">
453
- <path d="M-33.8 129.201C-33.8 129.201 -28.6 128.801 -29.8 130.401C-31 132.001 -33.4 131.201 -33.4 131.201L-33.8 129.201z"/>
454
- </g>
455
- <g style="fill: rgb(0, 0, 0);">
456
- <path d="M5.282 135.598C5.282 135.598 12.203 135.066 10.606 137.195C9.009 139.325 5.814 138.26 5.814 138.26L5.282 135.598z"/>
457
- </g>
458
- <g style="fill: rgb(0, 0, 0);">
459
- <path d="M15.682 130.798C15.682 130.798 22.603 130.266 21.006 132.395C19.409 134.525 16.214 133.46 16.214 133.46L15.682 130.798z"/>
460
- </g>
461
- <g style="fill: rgb(0, 0, 0);">
462
- <path d="M26.482 126.398C26.482 126.398 33.403 125.866 31.806 127.995C30.209 130.125 27.014 129.06 27.014 129.06L26.482 126.398z"/>
463
- </g>
464
- <g style="fill: rgb(0, 0, 0);">
465
- <path d="M36.882 121.598C36.882 121.598 43.803 121.066 42.206 123.195C40.609 125.325 37.414 124.26 37.414 124.26L36.882 121.598z"/>
466
- </g>
467
- <g style="fill: rgb(0, 0, 0);">
468
- <path d="M9.282 103.598C9.282 103.598 16.203 103.066 14.606 105.195C13.009 107.325 9.014 107.06 9.014 107.06L9.282 103.598z"/>
469
- </g>
470
- <g style="fill: rgb(0, 0, 0);">
471
- <path d="M19.282 100.398C19.282 100.398 26.203 99.866 24.606 101.995C23.009 104.125 18.614 103.86 18.614 103.86L19.282 100.398z"/>
472
- </g>
473
- <g style="fill: rgb(0, 0, 0);">
474
- <path d="M-3.4 140.401C-3.4 140.401 1.8 140.001 0.6 141.601C-0.6 143.201 -3 142.401 -3 142.401L-3.4 140.401z"/>
475
- </g>
476
- <g style="fill: rgb(153, 38, 0);">
477
- <path d="M-76.6 41.2C-76.6 41.2 -81 50 -81.4 53.2C-81.4 53.2 -80.6 44.4 -79.4 42.4C-78.2 40.4 -76.6 41.2 -76.6 41.2z"/>
478
- </g>
479
- <g style="fill: rgb(153, 38, 0);">
480
- <path d="M-95 55.2C-95 55.2 -98.2 69.6 -97.8 72.4C-97.8 72.4 -99 60.8 -98.6 59.6C-98.2 58.4 -95 55.2 -95 55.2z"/>
481
- </g>
482
- <g style="fill: rgb(204, 204, 204);">
483
- <path d="M-74.2 -19.4L-74.4 -16.2L-76.6 -16C-76.6 -16 -62.4 -3.4 -61.8 4.2C-61.8 4.2 -61 -4 -74.2 -19.4z"/>
484
- </g>
485
- <g style="fill: rgb(0, 0, 0);">
486
- <path d="M-70.216 -18.135C-70.647 -18.551 -70.428 -19.296 -70.836 -19.556C-71.645 -20.072 -69.538 -20.129 -69.766 -20.845C-70.149 -22.051 -69.962 -22.072 -70.084 -23.348C-70.141 -23.946 -69.553 -25.486 -69.168 -25.926C-67.722 -27.578 -69.046 -30.51 -67.406 -32.061C-67.102 -32.35 -66.726 -32.902 -66.441 -33.32C-65.782 -34.283 -64.598 -34.771 -63.648 -35.599C-63.33 -35.875 -63.531 -36.702 -62.962 -36.61C-62.248 -36.495 -61.007 -36.625 -61.052 -35.784C-61.165 -33.664 -62.494 -31.944 -63.774 -30.276C-63.323 -29.572 -63.781 -28.937 -64.065 -28.38C-65.4 -25.76 -65.211 -22.919 -65.385 -20.079C-65.39 -19.994 -65.697 -19.916 -65.689 -19.863C-65.336 -17.528 -64.752 -15.329 -63.873 -13.1C-63.507 -12.17 -63.036 -11.275 -62.886 -10.348C-62.775 -9.662 -62.672 -8.829 -63.08 -8.124C-61.045 -5.234 -62.354 -2.583 -61.185 0.948C-60.978 1.573 -59.286 3.487 -59.749 3.326C-62.262 2.455 -62.374 2.057 -62.551 1.304C-62.697 0.681 -63.027 -0.696 -63.264 -1.298C-63.328 -1.462 -63.499 -3.346 -63.577 -3.468C-65.09 -5.85 -63.732 -5.674 -65.102 -8.032C-66.53 -8.712 -67.496 -9.816 -68.619 -10.978C-68.817 -11.182 -67.674 -11.906 -67.855 -12.119C-68.947 -13.408 -70.1 -14.175 -69.764 -15.668C-69.609 -16.358 -69.472 -17.415 -70.216 -18.135z"/>
487
- </g>
488
- <g style="fill: rgb(0, 0, 0);">
489
- <path d="M-73.8 -16.4C-73.8 -16.4 -73.4 -9.6 -71 -8C-68.6 -6.4 -69.8 -7.2 -73 -8.4C-76.2 -9.6 -75 -10.4 -75 -10.4C-75 -10.4 -77.8 -10 -75.4 -8C-73 -6 -69.4 -3.6 -71 -3.6C-72.6 -3.6 -80.2 -7.6 -80.2 -10.4C-80.2 -13.2 -81.2 -17.3 -81.2 -17.3C-81.2 -17.3 -80.1 -18.1 -75.3 -18C-75.3 -18 -73.9 -17.3 -73.8 -16.4z"/>
490
- </g>
491
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
492
- <path d="M-74.6 2.2C-74.6 2.2 -83.12 -0.591 -101.6 2.8C-101.6 2.8 -92.569 0.722 -73.8 3C-63.5 4.25 -74.6 2.2 -74.6 2.2z"/>
493
- </g>
494
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
495
- <path d="M-72.502 2.129C-72.502 2.129 -80.748 -1.389 -99.453 0.392C-99.453 0.392 -90.275 -0.897 -71.774 2.995C-61.62 5.131 -72.502 2.129 -72.502 2.129z"/>
496
- </g>
497
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
498
- <path d="M-70.714 2.222C-70.714 2.222 -78.676 -1.899 -97.461 -1.514C-97.461 -1.514 -88.213 -2.118 -70.052 3.14C-60.086 6.025 -70.714 2.222 -70.714 2.222z"/>
499
- </g>
500
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
501
- <path d="M-69.444 2.445C-69.444 2.445 -76.268 -1.862 -93.142 -2.96C-93.142 -2.96 -84.803 -2.79 -68.922 3.319C-60.206 6.672 -69.444 2.445 -69.444 2.445z"/>
502
- </g>
503
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
504
- <path d="M45.84 12.961C45.84 12.961 44.91 13.605 45.124 12.424C45.339 11.243 73.547 -1.927 77.161 -1.677C77.161 -1.677 46.913 11.529 45.84 12.961z"/>
505
- </g>
506
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
507
- <path d="M42.446 13.6C42.446 13.6 41.57 14.315 41.691 13.121C41.812 11.927 68.899 -3.418 72.521 -3.452C72.521 -3.452 43.404 12.089 42.446 13.6z"/>
508
- </g>
509
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
510
- <path d="M39.16 14.975C39.16 14.975 38.332 15.747 38.374 14.547C38.416 13.348 58.233 -2.149 68.045 -4.023C68.045 -4.023 50.015 4.104 39.16 14.975z"/>
511
- </g>
512
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
513
- <path d="M36.284 16.838C36.284 16.838 35.539 17.532 35.577 16.453C35.615 15.373 53.449 1.426 62.28 -0.26C62.28 -0.26 46.054 7.054 36.284 16.838z"/>
514
- </g>
515
- <g style="fill: rgb(204, 204, 204);">
516
- <path d="M4.6 164.801C4.6 164.801 -10.6 162.401 6.2 160.801C6.2 160.801 24.2 158.801 28.2 153.601C28.2 153.601 41.8 144.401 44.6 144.001C47.4 143.601 63.8 140.001 64.2 137.601C64.6 135.201 70.6 132.801 72.2 133.601C73.8 134.401 73.8 143.601 71 144.401C68.2 145.201 49.4 152.401 43 153.601C36.6 154.801 25 162.401 20.2 163.601C15.4 164.801 4.6 164.801 4.6 164.801z"/>
517
- </g>
518
- <g style="fill: rgb(0, 0, 0);">
519
- <path d="M77.6 127.401C77.6 127.401 74.6 129.001 73.4 131.601C73.4 131.601 67 142.201 52.8 145.401C52.8 145.401 29.8 154.401 22 156.401C22 156.401 8.6 161.401 1.2 160.601C1.2 160.601 -5.8 160.801 0.4 162.401C0.4 162.401 20.6 160.401 24 158.601C24 158.601 39.6 153.401 42.6 150.801C45.6 148.201 63.8 143.201 66 141.201C68.2 139.201 78 130.801 77.6 127.401z"/>
520
- </g>
521
- <g style="fill: rgb(0, 0, 0);">
522
- <path d="M18.882 158.911C18.882 158.911 24.111 158.685 22.958 160.234C21.805 161.784 19.357 160.91 19.357 160.91L18.882 158.911z"/>
523
- </g>
524
- <g style="fill: rgb(0, 0, 0);">
525
- <path d="M11.68 160.263C11.68 160.263 16.908 160.037 15.756 161.586C14.603 163.136 12.155 162.263 12.155 162.263L11.68 160.263z"/>
526
- </g>
527
- <g style="fill: rgb(0, 0, 0);">
528
- <path d="M1.251 161.511C1.251 161.511 6.48 161.284 5.327 162.834C4.174 164.383 1.726 163.51 1.726 163.51L1.251 161.511z"/>
529
- </g>
530
- <g style="fill: rgb(0, 0, 0);">
531
- <path d="M-6.383 162.055C-6.383 162.055 -1.154 161.829 -2.307 163.378C-3.46 164.928 -5.908 164.054 -5.908 164.054L-6.383 162.055z"/>
532
- </g>
533
- <g style="fill: rgb(0, 0, 0);">
534
- <path d="M35.415 151.513C35.415 151.513 42.375 151.212 40.84 153.274C39.306 155.336 36.047 154.174 36.047 154.174L35.415 151.513z"/>
535
- </g>
536
- <g style="fill: rgb(0, 0, 0);">
537
- <path d="M45.73 147.088C45.73 147.088 51.689 143.787 51.155 148.849C50.885 151.405 46.362 149.749 46.362 149.749L45.73 147.088z"/>
538
- </g>
539
- <g style="fill: rgb(0, 0, 0);">
540
- <path d="M54.862 144.274C54.862 144.274 62.021 140.573 60.287 146.035C59.509 148.485 55.493 146.935 55.493 146.935L54.862 144.274z"/>
541
- </g>
542
- <g style="fill: rgb(0, 0, 0);">
543
- <path d="M64.376 139.449C64.376 139.449 68.735 134.548 69.801 141.21C70.207 143.748 65.008 142.11 65.008 142.11L64.376 139.449z"/>
544
- </g>
545
- <g style="fill: rgb(0, 0, 0);">
546
- <path d="M26.834 155.997C26.834 155.997 32.062 155.77 30.91 157.32C29.757 158.869 27.308 157.996 27.308 157.996L26.834 155.997z"/>
547
- </g>
548
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
549
- <path d="M62.434 34.603C62.434 34.603 61.708 35.268 61.707 34.197C61.707 33.127 79.191 19.863 88.034 18.479C88.034 18.479 71.935 25.208 62.434 34.603z"/>
550
- </g>
551
- <g style="fill: rgb(0, 0, 0);">
552
- <path d="M65.4 98.4C65.4 98.4 87.401 120.801 96.601 124.401C96.601 124.401 105.801 135.601 101.801 161.601C101.801 161.601 98.601 169.201 95.401 148.401C95.401 148.401 98.601 123.201 87.401 139.201C87.401 139.201 79 129.301 85.4 129.601C85.4 129.601 88.601 131.601 89.001 130.001C89.401 128.401 81.4 114.801 64.2 100.4C47 86 65.4 98.4 65.4 98.4z"/>
553
- </g>
554
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
555
- <path d="M7 137.201C7 137.201 6.8 135.401 8.6 136.201C10.4 137.001 104.601 143.201 136.201 167.201C136.201 167.201 91.001 144.001 7 137.201z"/>
556
- </g>
557
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
558
- <path d="M17.4 132.801C17.4 132.801 17.2 131.001 19 131.801C20.8 132.601 157.401 131.601 181.001 164.001C181.001 164.001 159.001 138.801 17.4 132.801z"/>
559
- </g>
560
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
561
- <path d="M29 128.801C29 128.801 28.8 127.001 30.6 127.801C32.4 128.601 205.801 115.601 229.401 148.001C229.401 148.001 219.801 122.401 29 128.801z"/>
562
- </g>
563
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
564
- <path d="M39 124.001C39 124.001 38.8 122.201 40.6 123.001C42.4 123.801 164.601 85.2 188.201 117.601C188.201 117.601 174.801 93 39 124.001z"/>
565
- </g>
566
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
567
- <path d="M-19 146.801C-19 146.801 -19.2 145.001 -17.4 145.801C-15.6 146.601 2.2 148.801 4.2 187.601C4.2 187.601 -3 145.601 -19 146.801z"/>
568
- </g>
569
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
570
- <path d="M-27.8 148.401C-27.8 148.401 -28 146.601 -26.2 147.401C-24.4 148.201 -10.2 143.601 -13 182.401C-13 182.401 -11.8 147.201 -27.8 148.401z"/>
571
- </g>
572
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
573
- <path d="M-35.8 148.801C-35.8 148.801 -36 147.001 -34.2 147.801C-32.4 148.601 -17 149.201 -29.4 171.601C-29.4 171.601 -19.8 147.601 -35.8 148.801z"/>
574
- </g>
575
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
576
- <path d="M11.526 104.465C11.526 104.465 11.082 106.464 12.631 105.247C28.699 92.622 61.141 33.72 116.826 28.086C116.826 28.086 78.518 15.976 11.526 104.465z"/>
577
- </g>
578
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
579
- <path d="M22.726 102.665C22.726 102.665 21.363 101.472 23.231 100.847C25.099 100.222 137.541 27.72 176.826 35.686C176.826 35.686 149.719 28.176 22.726 102.665z"/>
580
- </g>
581
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
582
- <path d="M1.885 108.767C1.885 108.767 1.376 110.366 3.087 109.39C12.062 104.27 15.677 47.059 59.254 45.804C59.254 45.804 26.843 31.09 1.885 108.767z"/>
583
- </g>
584
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
585
- <path d="M-18.038 119.793C-18.038 119.793 -19.115 121.079 -17.162 120.825C-6.916 119.493 14.489 78.222 58.928 83.301C58.928 83.301 26.962 68.955 -18.038 119.793z"/>
586
- </g>
587
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
588
- <path d="M-6.8 113.667C-6.8 113.667 -7.611 115.136 -5.742 114.511C4.057 111.237 17.141 66.625 61.729 63.078C61.729 63.078 27.603 55.135 -6.8 113.667z"/>
589
- </g>
590
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
591
- <path d="M-25.078 124.912C-25.078 124.912 -25.951 125.954 -24.369 125.748C-16.07 124.669 1.268 91.24 37.264 95.354C37.264 95.354 11.371 83.734 -25.078 124.912z"/>
592
- </g>
593
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
594
- <path d="M-32.677 130.821C-32.677 130.821 -33.682 131.866 -32.091 131.748C-27.923 131.439 2.715 98.36 21.183 113.862C21.183 113.862 9.168 95.139 -32.677 130.821z"/>
595
- </g>
596
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
597
- <path d="M36.855 98.898C36.855 98.898 35.654 97.543 37.586 97.158C39.518 96.774 160.221 39.061 198.184 51.927C198.184 51.927 172.243 41.053 36.855 98.898z"/>
598
- </g>
599
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
600
- <path d="M3.4 163.201C3.4 163.201 3.2 161.401 5 162.201C6.8 163.001 22.2 163.601 9.8 186.001C9.8 186.001 19.4 162.001 3.4 163.201z"/>
601
- </g>
602
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
603
- <path d="M13.8 161.601C13.8 161.601 13.6 159.801 15.4 160.601C17.2 161.401 35 163.601 37 202.401C37 202.401 29.8 160.401 13.8 161.601z"/>
604
- </g>
605
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
606
- <path d="M20.6 160.001C20.6 160.001 20.4 158.201 22.2 159.001C24 159.801 48.6 163.201 72.2 195.601C72.2 195.601 36.6 158.801 20.6 160.001z"/>
607
- </g>
608
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
609
- <path d="M28.225 157.972C28.225 157.972 27.788 156.214 29.678 156.768C31.568 157.322 52.002 155.423 90.099 189.599C90.099 189.599 43.924 154.656 28.225 157.972z"/>
610
- </g>
611
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
612
- <path d="M38.625 153.572C38.625 153.572 38.188 151.814 40.078 152.368C41.968 152.922 76.802 157.423 128.499 192.399C128.499 192.399 54.324 150.256 38.625 153.572z"/>
613
- </g>
614
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
615
- <path d="M-1.8 142.001C-1.8 142.001 -2 140.201 -0.2 141.001C1.6 141.801 55 144.401 85.4 171.201C85.4 171.201 50.499 146.426 -1.8 142.001z"/>
616
- </g>
617
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
618
- <path d="M-11.8 146.001C-11.8 146.001 -12 144.201 -10.2 145.001C-8.4 145.801 16.2 149.201 39.8 181.601C39.8 181.601 4.2 144.801 -11.8 146.001z"/>
619
- </g>
620
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
621
- <path d="M49.503 148.962C49.503 148.962 48.938 147.241 50.864 147.655C52.79 148.068 87.86 150.004 141.981 181.098C141.981 181.098 64.317 146.704 49.503 148.962z"/>
622
- </g>
623
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
624
- <path d="M57.903 146.562C57.903 146.562 57.338 144.841 59.264 145.255C61.19 145.668 96.26 147.604 150.381 178.698C150.381 178.698 73.317 143.904 57.903 146.562z"/>
625
- </g>
626
- <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
627
- <path d="M67.503 141.562C67.503 141.562 66.938 139.841 68.864 140.255C70.79 140.668 113.86 145.004 203.582 179.298C203.582 179.298 82.917 138.904 67.503 141.562z"/>
628
- </g>
629
- <g style="fill: rgb(0, 0, 0);">
630
- <path d="M-43.8 148.401C-43.8 148.401 -38.6 148.001 -39.8 149.601C-41 151.201 -43.4 150.401 -43.4 150.401L-43.8 148.401z"/>
631
- </g>
632
- <g style="fill: rgb(0, 0, 0);">
633
- <path d="M-13 162.401C-13 162.401 -7.8 162.001 -9 163.601C-10.2 165.201 -12.6 164.401 -12.6 164.401L-13 162.401z"/>
634
- </g>
635
- <g style="fill: rgb(0, 0, 0);">
636
- <path d="M-21.8 162.001C-21.8 162.001 -16.6 161.601 -17.8 163.201C-19 164.801 -21.4 164.001 -21.4 164.001L-21.8 162.001z"/>
637
- </g>
638
- <g style="fill: rgb(0, 0, 0);">
639
- <path d="M-117.169 150.182C-117.169 150.182 -112.124 151.505 -113.782 152.624C-115.439 153.744 -117.446 152.202 -117.446 152.202L-117.169 150.182z"/>
640
- </g>
641
- <g style="fill: rgb(0, 0, 0);">
642
- <path d="M-115.169 140.582C-115.169 140.582 -110.124 141.905 -111.782 143.024C-113.439 144.144 -115.446 142.602 -115.446 142.602L-115.169 140.582z"/>
643
- </g>
644
- <g style="fill: rgb(0, 0, 0);">
645
- <path d="M-122.369 136.182C-122.369 136.182 -117.324 137.505 -118.982 138.624C-120.639 139.744 -122.646 138.202 -122.646 138.202L-122.369 136.182z"/>
646
- </g>
647
- <g style="fill: rgb(204, 204, 204);">
648
- <path d="M-42.6 211.201C-42.6 211.201 -44.2 211.201 -48.2 213.201C-50.2 213.201 -61.4 216.801 -67 226.801C-67 226.801 -54.6 217.201 -42.6 211.201z"/>
649
- </g>
650
- <g style="fill: rgb(204, 204, 204);">
651
- <path d="M45.116 303.847C45.257 304.105 45.312 304.525 45.604 304.542C46.262 304.582 47.495 304.883 47.37 304.247C46.522 299.941 45.648 295.004 41.515 293.197C40.876 292.918 39.434 293.331 39.36 294.215C39.233 295.739 39.116 297.088 39.425 298.554C39.725 299.975 41.883 299.985 42.8 298.601C43.736 300.273 44.168 302.116 45.116 303.847z"/>
652
- </g>
653
- <g style="fill: rgb(204, 204, 204);">
654
- <path d="M34.038 308.581C34.786 309.994 34.659 311.853 36.074 312.416C36.814 312.71 38.664 311.735 38.246 310.661C37.444 308.6 37.056 306.361 35.667 304.55C35.467 304.288 35.707 303.755 35.547 303.427C34.953 302.207 33.808 301.472 32.4 301.801C31.285 304.004 32.433 306.133 33.955 307.842C34.091 307.994 33.925 308.37 34.038 308.581z"/>
655
- </g>
656
- <g style="fill: rgb(204, 204, 204);">
657
- <path d="M-5.564 303.391C-5.672 303.014 -5.71 302.551 -5.545 302.23C-5.014 301.197 -4.221 300.075 -4.558 299.053C-4.906 297.997 -6.022 298.179 -6.672 298.748C-7.807 299.742 -7.856 301.568 -8.547 302.927C-8.743 303.313 -8.692 303.886 -9.133 304.277C-9.607 304.698 -10.047 306.222 -9.951 306.793C-9.898 307.106 -10.081 317.014 -9.859 316.751C-9.24 316.018 -6.19 306.284 -6.121 305.392C-6.064 304.661 -5.332 304.196 -5.564 303.391z"/>
658
- </g>
659
- <g style="fill: rgb(204, 204, 204);">
660
- <path d="M-31.202 296.599C-28.568 294.1 -25.778 291.139 -26.22 287.427C-26.336 286.451 -28.111 286.978 -28.298 287.824C-29.1 291.449 -31.139 294.11 -33.707 296.502C-35.903 298.549 -37.765 304.893 -38 305.401C-34.303 300.145 -32.046 297.399 -31.202 296.599z"/>
661
- </g>
662
- <g style="fill: rgb(204, 204, 204);">
663
- <path d="M-44.776 290.635C-44.253 290.265 -44.555 289.774 -44.338 289.442C-43.385 287.984 -42.084 286.738 -42.066 285C-42.063 284.723 -42.441 284.414 -42.776 284.638C-43.053 284.822 -43.395 284.952 -43.503 285.082C-45.533 287.531 -46.933 290.202 -48.376 293.014C-48.559 293.371 -49.703 297.862 -49.39 297.973C-49.151 298.058 -47.431 293.877 -47.221 293.763C-45.958 293.077 -45.946 291.462 -44.776 290.635z"/>
664
- </g>
665
- <g style="fill: rgb(204, 204, 204);">
666
- <path d="M-28.043 310.179C-27.599 309.31 -26.023 308.108 -26.136 307.219C-26.254 306.291 -25.786 304.848 -26.698 305.536C-27.955 306.484 -31.404 307.833 -31.674 313.641C-31.7 314.212 -28.726 311.519 -28.043 310.179z"/>
667
- </g>
668
- <g style="fill: rgb(204, 204, 204);">
669
- <path d="M-13.6 293.001C-13.2 292.333 -12.492 292.806 -12.033 292.543C-11.385 292.171 -10.774 291.613 -10.482 290.964C-9.512 288.815 -7.743 286.995 -7.6 284.601C-9.091 283.196 -9.77 285.236 -10.4 286.201C-11.723 284.554 -12.722 286.428 -14.022 286.947C-14.092 286.975 -14.305 286.628 -14.38 286.655C-15.557 287.095 -16.237 288.176 -17.235 288.957C-17.406 289.091 -17.811 288.911 -17.958 289.047C-18.61 289.65 -19.583 289.975 -19.863 290.657C-20.973 293.364 -24.113 295.459 -26 303.001C-25.619 303.91 -21.488 296.359 -21.001 295.661C-20.165 294.465 -20.047 297.322 -18.771 296.656C-18.72 296.629 -18.534 296.867 -18.4 297.001C-18.206 296.721 -17.988 296.492 -17.6 296.601C-17.6 296.201 -17.734 295.645 -17.533 295.486C-16.296 294.509 -16.38 293.441 -15.6 292.201C-15.142 292.99 -14.081 292.271 -13.6 293.001z"/>
670
- </g>
671
- <g style="fill: rgb(204, 204, 204);">
672
- <path d="M46.2 347.401C46.2 347.401 53.6 327.001 49.2 315.801C49.2 315.801 60.6 337.401 56 348.601C56 348.601 55.6 338.201 51.6 333.201C51.6 333.201 47.6 346.001 46.2 347.401z"/>
673
- </g>
674
- <g style="fill: rgb(204, 204, 204);">
675
- <path d="M31.4 344.801C31.4 344.801 36.8 336.001 28.8 317.601C28.8 317.601 28 338.001 21.2 349.001C21.2 349.001 35.4 328.801 31.4 344.801z"/>
676
- </g>
677
- <g style="fill: rgb(204, 204, 204);">
678
- <path d="M21.4 342.801C21.4 342.801 21.2 322.801 21.6 319.801C21.6 319.801 17.8 336.401 7.6 346.001C7.6 346.001 22 334.001 21.4 342.801z"/>
679
- </g>
680
- <g style="fill: rgb(204, 204, 204);">
681
- <path d="M11.8 310.801C11.8 310.801 17.8 324.401 7.8 342.801C7.8 342.801 14.2 330.601 9.4 323.601C9.4 323.601 12 320.201 11.8 310.801z"/>
682
- </g>
683
- <g style="fill: rgb(204, 204, 204);">
684
- <path d="M-7.4 342.401C-7.4 342.401 -8.4 326.801 -6.6 324.601C-6.6 324.601 -6.4 318.201 -6.8 317.201C-6.8 317.201 -2.8 311.001 -2.6 318.401C-2.6 318.401 -1.2 326.201 1.6 330.801C1.6 330.801 5.2 336.201 5 342.601C5 342.601 -5 312.401 -7.4 342.401z"/>
685
- </g>
686
- <g style="fill: rgb(204, 204, 204);">
687
- <path d="M-11 314.801C-11 314.801 -17.6 325.601 -19.4 344.601C-19.4 344.601 -20.8 338.401 -17 324.001C-17 324.001 -12.8 308.601 -11 314.801z"/>
688
- </g>
689
- <g style="fill: rgb(204, 204, 204);">
690
- <path d="M-32.8 334.601C-32.8 334.601 -27.8 329.201 -26.4 324.201C-26.4 324.201 -22.8 308.401 -29.2 317.001C-29.2 317.001 -29 325.001 -37.2 332.401C-37.2 332.401 -32.4 330.001 -32.8 334.601z"/>
691
- </g>
692
- <g style="fill: rgb(204, 204, 204);">
693
- <path d="M-38.6 329.601C-38.6 329.601 -35.2 312.201 -34.4 311.401C-34.4 311.401 -32.6 308.001 -35.4 311.201C-35.4 311.201 -44.2 330.401 -48.2 337.001C-48.2 337.001 -40.2 327.801 -38.6 329.601z"/>
694
- </g>
695
- <g style="fill: rgb(204, 204, 204);">
696
- <path d="M-44.4 313.001C-44.4 313.001 -32.8 290.601 -54.6 316.401C-54.6 316.401 -43.6 306.601 -44.4 313.001z"/>
697
- </g>
698
- <g style="fill: rgb(204, 204, 204);">
699
- <path d="M-59.8 298.401C-59.8 298.401 -55 279.601 -52.4 279.801C-52.4 279.801 -44.2 270.801 -50.8 281.401C-50.8 281.401 -56.8 291.001 -56.2 300.801C-56.2 300.801 -56.8 291.201 -59.8 298.401z"/>
700
- </g>
701
- <g style="fill: rgb(204, 204, 204);">
702
- <path d="M270.5 287C270.5 287 258.5 277 256 273.5C256 273.5 269.5 292 269.5 299C269.5 299 272 291.5 270.5 287z"/>
703
- </g>
704
- <g style="fill: rgb(204, 204, 204);">
705
- <path d="M276 265C276 265 255 250 251.5 242.5C251.5 242.5 278 272 278 276.5C278 276.5 278.5 267.5 276 265z"/>
706
- </g>
707
- <g style="fill: rgb(204, 204, 204);">
708
- <path d="M293 111C293 111 281 103 279.5 105C279.5 105 290 111.5 292.5 120C292.5 120 291 111 293 111z"/>
709
- </g>
710
- <g style="fill: rgb(204, 204, 204);">
711
- <path d="M301.5 191.5L284 179.5C284 179.5 303 196.5 303.5 200.5L301.5 191.5z"/>
712
- </g>
713
- <g style="stroke: rgb(0, 0, 0);">
714
- <path d="M-89.25 169L-67.25 173.75"/>
715
- </g>
716
- <g style="stroke: rgb(0, 0, 0);">
717
- <path d="M-39 331C-39 331 -39.5 327.5 -48.5 338"/>
718
- </g>
719
- <g style="stroke: rgb(0, 0, 0);">
720
- <path d="M-33.5 336C-33.5 336 -31.5 329.5 -38 334"/>
721
- </g>
722
- <g style="stroke: rgb(0, 0, 0);">
723
- <path d="M20.5 344.5C20.5 344.5 22 333.5 10.5 346.5"/>
724
- </g>
725
- </g>
726
  </svg>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 40 580 530">
4
+ <g transform="translate(200, 200)" style="fill-opacity: 1; fill: none;">
5
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
6
+ <path d="M-122.304 84.285C-122.304 84.285 -122.203 86.179 -123.027 86.16C-123.851 86.141 -140.305 38.066 -160.833 40.309C-160.833 40.309 -143.05 32.956 -122.304 84.285z"/>
7
+ </g>
8
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
9
+ <path d="M-118.774 81.262C-118.774 81.262 -119.323 83.078 -120.092 82.779C-120.86 82.481 -119.977 31.675 -140.043 26.801C-140.043 26.801 -120.82 25.937 -118.774 81.262z"/>
10
+ </g>
11
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
12
+ <path d="M-91.284 123.59C-91.284 123.59 -89.648 124.55 -90.118 125.227C-90.589 125.904 -139.763 113.102 -149.218 131.459C-149.218 131.459 -145.539 112.572 -91.284 123.59z"/>
13
+ </g>
14
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
15
+ <path d="M-94.093 133.801C-94.093 133.801 -92.237 134.197 -92.471 134.988C-92.704 135.779 -143.407 139.121 -146.597 159.522C-146.597 159.522 -149.055 140.437 -94.093 133.801z"/>
16
+ </g>
17
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
18
+ <path d="M-98.304 128.276C-98.304 128.276 -96.526 128.939 -96.872 129.687C-97.218 130.435 -147.866 126.346 -153.998 146.064C-153.998 146.064 -153.646 126.825 -98.304 128.276z"/>
19
+ </g>
20
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
21
+ <path d="M-109.009 110.072C-109.009 110.072 -107.701 111.446 -108.34 111.967C-108.979 112.488 -152.722 86.634 -166.869 101.676C-166.869 101.676 -158.128 84.533 -109.009 110.072z"/>
22
+ </g>
23
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
24
+ <path d="M-116.554 114.263C-116.554 114.263 -115.098 115.48 -115.674 116.071C-116.25 116.661 -162.638 95.922 -174.992 112.469C-174.992 112.469 -168.247 94.447 -116.554 114.263z"/>
25
+ </g>
26
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
27
+ <path d="M-119.154 118.335C-119.154 118.335 -117.546 119.343 -118.036 120.006C-118.526 120.669 -167.308 106.446 -177.291 124.522C-177.291 124.522 -173.066 105.749 -119.154 118.335z"/>
28
+ </g>
29
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
30
+ <path d="M-108.42 118.949C-108.42 118.949 -107.298 120.48 -107.999 120.915C-108.7 121.35 -148.769 90.102 -164.727 103.207C-164.727 103.207 -153.862 87.326 -108.42 118.949z"/>
31
+ </g>
32
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
33
+ <path d="M-128.2 90C-128.2 90 -127.6 91.8 -128.4 92C-129.2 92.2 -157.8 50.2 -177.001 57.8C-177.001 57.8 -161.8 46 -128.2 90z"/>
34
+ </g>
35
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
36
+ <path d="M-127.505 96.979C-127.505 96.979 -126.53 98.608 -127.269 98.975C-128.007 99.343 -164.992 64.499 -182.101 76.061C-182.101 76.061 -169.804 61.261 -127.505 96.979z"/>
37
+ </g>
38
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;">
39
+ <path d="M-127.62 101.349C-127.62 101.349 -126.498 102.88 -127.199 103.315C-127.9 103.749 -167.969 72.502 -183.927 85.607C-183.927 85.607 -173.062 69.726 -127.62 101.349z"/>
40
+ </g>
41
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0);">
42
+ <path d="M-129.83 103.065C-129.327 109.113 -128.339 115.682 -126.6 118.801C-126.6 118.801 -130.2 131.201 -121.4 144.401C-121.4 144.401 -121.8 151.601 -120.2 154.801C-120.2 154.801 -116.2 163.201 -111.4 164.001C-107.516 164.648 -98.793 167.717 -88.932 169.121C-88.932 169.121 -71.8 183.201 -75 196.001C-75 196.001 -75.4 212.401 -79 214.001C-79 214.001 -67.4 202.801 -77 219.601L-81.4 238.401C-81.4 238.401 -55.8 216.801 -71.4 235.201L-81.4 261.201C-81.4 261.201 -61.8 242.801 -69 251.201L-72.2 260.001C-72.2 260.001 -29 232.801 -59.8 262.401C-59.8 262.401 -51.8 258.801 -47.4 261.601C-47.4 261.601 -40.6 260.401 -41.4 262.001C-41.4 262.001 -62.2 272.401 -65.8 290.801C-65.8 290.801 -57.4 280.801 -60.6 291.601L-60.2 303.201C-60.2 303.201 -56.2 281.601 -56.6 319.201C-56.6 319.201 -37.4 301.201 -49 322.001L-49 338.801C-49 338.801 -33.8 322.401 -40.2 335.201C-40.2 335.201 -30.2 326.401 -34.2 341.601C-34.2 341.601 -35 352.001 -30.6 340.801C-30.6 340.801 -14.6 310.201 -20.6 336.401C-20.6 336.401 -21.4 355.601 -16.6 340.801C-16.6 340.801 -16.2 351.201 -7 358.401C-7 358.401 -8.2 307.601 4.6 343.601L8.6 360.001C8.6 360.001 11.4 350.801 11 345.601C11 345.601 25.8 329.201 19 353.601C19 353.601 34.2 330.801 31 344.001C31 344.001 23.4 360.001 25 364.801C25 364.801 41.8 330.001 43 328.401C43 328.401 41 370.802 51.8 334.801C51.8 334.801 57.4 346.801 54.6 351.201C54.6 351.201 62.6 343.201 61.8 340.001C61.8 340.001 66.4 331.801 69.2 345.401C69.2 345.401 71 354.801 72.6 351.601C72.6 351.601 76.6 375.602 77.8 352.801C77.8 352.801 79.4 339.201 72.2 327.601C72.2 327.601 73 324.401 70.2 320.401C70.2 320.401 83.8 342.001 76.6 313.201C76.6 313.201 87.801 321.201 89.001 321.201C89.001 321.201 75.4 298.001 84.2 302.801C84.2 302.801 79 292.401 97.001 304.401C97.001 304.401 81 288.401 98.601 298.001C98.601 298.001 106.601 304.401 99.001 294.401C99.001 294.401 84.6 278.401 106.601 296.401C106.601 296.401 118.201 312.801 119.001 315.601C119.001 315.601 109.001 286.401 104.601 283.601C104.601 283.601 113.001 247.201 154.201 262.801C154.201 262.801 161.001 280.001 165.401 261.601C165.401 261.601 178.201 255.201 189.401 282.801C189.401 282.801 193.401 269.201 192.601 266.401C192.601 266.401 199.401 267.601 198.601 266.401C198.601 266.401 211.801 270.801 213.001 270.001C213.001 270.001 219.801 276.801 220.201 273.201C220.201 273.201 229.401 276.001 227.401 272.401C227.401 272.401 236.201 288.001 236.601 291.601L239.001 277.601L241.001 280.401C241.001 280.401 242.601 272.801 241.801 271.601C241.001 270.401 261.801 278.401 266.601 299.201L268.601 307.601C268.601 307.601 274.601 292.801 273.001 288.801C273.001 288.801 278.201 289.601 278.601 294.001C278.601 294.001 282.601 270.801 277.801 264.801C277.801 264.801 282.201 264.001 283.401 267.601L283.401 260.401C283.401 260.401 290.601 261.201 290.601 258.801C290.601 258.801 295.001 254.801 297.001 259.601C297.001 259.601 284.601 224.401 303.001 243.601C303.001 243.601 310.201 254.401 306.601 235.601C303.001 216.801 299.001 215.201 303.801 214.801C303.801 214.801 304.601 211.201 302.601 209.601C300.601 208.001 303.801 209.601 303.801 209.601C303.801 209.601 308.601 213.601 303.401 191.601C303.401 191.601 309.801 193.201 297.801 164.001C297.801 164.001 300.601 161.601 296.601 153.201C296.601 153.201 304.601 157.601 307.401 156.001C307.401 156.001 307.001 154.401 303.801 150.401C303.801 150.401 282.201 95.6 302.601 117.601C302.601 117.601 314.451 131.151 308.051 108.351C308.051 108.351 298.94 84.341 299.717 80.045L-129.83 103.065z"/>
43
+ </g>
44
+ <g style="fill: rgb(204, 114, 38); stroke: rgb(0, 0, 0);">
45
+ <path d="M299.717 80.245C300.345 80.426 302.551 81.55 303.801 83.2C303.801 83.2 310.601 94 305.401 75.6C305.401 75.6 296.201 46.8 305.001 58C305.001 58 311.001 65.2 307.801 51.6C303.936 35.173 301.401 28.8 301.401 28.8C301.401 28.8 313.001 33.6 286.201 -6L295.001 -2.4C295.001 -2.4 275.401 -42 253.801 -47.2L245.801 -53.2C245.801 -53.2 284.201 -91.2 271.401 -128C271.401 -128 264.601 -133.2 255.001 -124C255.001 -124 248.601 -119.2 242.601 -120.8C242.601 -120.8 211.801 -119.6 209.801 -119.6C207.801 -119.6 173.001 -156.8 107.401 -139.2C107.401 -139.2 102.201 -137.2 97.801 -138.4C97.801 -138.4 79.4 -154.4 30.6 -131.6C30.6 -131.6 20.6 -129.6 19 -129.6C17.4 -129.6 14.6 -129.6 6.6 -123.2C-1.4 -116.8 -1.8 -116 -3.8 -114.4C-3.8 -114.4 -20.2 -103.2 -25 -102.4C-25 -102.4 -36.6 -96 -41 -86L-44.6 -84.8C-44.6 -84.8 -46.2 -77.6 -46.6 -76.4C-46.6 -76.4 -51.4 -72.8 -52.2 -67.2C-52.2 -67.2 -61 -61.2 -60.6 -56.8C-60.6 -56.8 -62.2 -51.6 -63 -46.8C-63 -46.8 -70.2 -42 -69.4 -39.2C-69.4 -39.2 -77 -25.2 -75.8 -18.4C-75.8 -18.4 -82.2 -18.8 -85 -16.4C-85 -16.4 -85.8 -11.6 -87.4 -11.2C-87.4 -11.2 -90.2 -10 -87.8 -6C-87.8 -6 -89.4 -3.2 -89.8 -1.6C-89.8 -1.6 -89 1.2 -93.4 6.8C-93.4 6.8 -99.8 25.6 -97.8 30.8C-97.8 30.8 -97.4 35.6 -100.2 37.2C-100.2 37.2 -103.8 36.8 -95.4 48.8C-95.4 48.8 -94.6 50 -97.8 52.4C-97.8 52.4 -115 56 -117.4 72.4C-117.4 72.4 -131 87.2 -131 92.4C-131 94.705 -130.729 97.852 -130.03 102.465C-130.03 102.465 -130.6 110.801 -103 111.601C-75.4 112.401 299.717 80.245 299.717 80.245z"/>
46
+ </g>
47
+ <g style="fill: rgb(204, 114, 38);">
48
+ <path d="M-115.6 102.6C-140.6 63.2 -126.2 119.601 -126.2 119.601C-117.4 154.001 12.2 116.401 12.2 116.401C12.2 116.401 181.001 86 192.201 82C203.401 78 298.601 84.4 298.601 84.4L293.001 67.6C228.201 21.2 209.001 44.4 195.401 40.4C181.801 36.4 184.201 46 181.001 46.8C177.801 47.6 138.601 22.8 132.201 23.6C125.801 24.4 100.459 0.649 115.401 32.4C131.401 66.4 57 71.6 40.2 60.4C23.4 49.2 47.4 78.8 47.4 78.8C65.8 98.8 31.4 82 31.4 82C-3 69.2 -27 94.8 -30.2 95.6C-33.4 96.4 -38.2 99.6 -39 93.2C-39.8 86.8 -47.31 70.099 -79 96.4C-99 113.001 -112.8 91 -112.8 91L-115.6 102.6z"/>
49
+ </g>
50
+ <g style="fill: rgb(232, 127, 58);">
51
+ <path d="M133.51 25.346C127.11 26.146 101.743 2.407 116.71 34.146C133.31 69.346 58.31 73.346 41.51 62.146C24.709 50.946 48.71 80.546 48.71 80.546C67.11 100.546 32.709 83.746 32.709 83.746C-1.691 70.946 -25.691 96.546 -28.891 97.346C-32.091 98.146 -36.891 101.346 -37.691 94.946C-38.491 88.546 -45.87 72.012 -77.691 98.146C-98.927 115.492 -112.418 94.037 -112.418 94.037L-115.618 104.146C-140.618 64.346 -125.546 122.655 -125.546 122.655C-116.745 157.056 13.509 118.146 13.509 118.146C13.509 118.146 182.31 87.746 193.51 83.746C204.71 79.746 299.038 86.073 299.038 86.073L293.51 68.764C228.71 22.364 210.31 46.146 196.71 42.146C183.11 38.146 185.51 47.746 182.31 48.546C179.11 49.346 139.91 24.546 133.51 25.346z"/>
52
+ </g>
53
+ <g style="fill: rgb(234, 140, 77);">
54
+ <path d="M134.819 27.091C128.419 27.891 103.685 3.862 118.019 35.891C134.219 72.092 59.619 75.092 42.819 63.892C26.019 52.692 50.019 82.292 50.019 82.292C68.419 102.292 34.019 85.492 34.019 85.492C-0.381 72.692 -24.382 98.292 -27.582 99.092C-30.782 99.892 -35.582 103.092 -36.382 96.692C-37.182 90.292 -44.43 73.925 -76.382 99.892C-98.855 117.983 -112.036 97.074 -112.036 97.074L-115.636 105.692C-139.436 66.692 -124.891 125.71 -124.891 125.71C-116.091 160.11 14.819 119.892 14.819 119.892C14.819 119.892 183.619 89.492 194.819 85.492C206.019 81.492 299.474 87.746 299.474 87.746L294.02 69.928C229.219 23.528 211.619 47.891 198.019 43.891C184.419 39.891 186.819 49.491 183.619 50.292C180.419 51.092 141.219 26.291 134.819 27.091z"/>
55
+ </g>
56
+ <g style="fill: rgb(236, 153, 97);">
57
+ <path d="M136.128 28.837C129.728 29.637 104.999 5.605 119.328 37.637C136.128 75.193 60.394 76.482 44.128 65.637C27.328 54.437 51.328 84.037 51.328 84.037C69.728 104.037 35.328 87.237 35.328 87.237C0.928 74.437 -23.072 100.037 -26.272 100.837C-29.472 101.637 -34.272 104.837 -35.072 98.437C-35.872 92.037 -42.989 75.839 -75.073 101.637C-98.782 120.474 -111.655 100.11 -111.655 100.11L-115.655 107.237C-137.455 70.437 -124.236 128.765 -124.236 128.765C-115.436 163.165 16.128 121.637 16.128 121.637C16.128 121.637 184.928 91.237 196.129 87.237C207.329 83.237 299.911 89.419 299.911 89.419L294.529 71.092C229.729 24.691 212.929 49.637 199.329 45.637C185.728 41.637 188.128 51.237 184.928 52.037C181.728 52.837 142.528 28.037 136.128 28.837z"/>
58
+ </g>
59
+ <g style="fill: rgb(238, 165, 117);">
60
+ <path d="M137.438 30.583C131.037 31.383 106.814 7.129 120.637 39.383C137.438 78.583 62.237 78.583 45.437 67.383C28.637 56.183 52.637 85.783 52.637 85.783C71.037 105.783 36.637 88.983 36.637 88.983C2.237 76.183 -21.763 101.783 -24.963 102.583C-28.163 103.383 -32.963 106.583 -33.763 100.183C-34.563 93.783 -41.548 77.752 -73.763 103.383C-98.709 122.965 -111.273 103.146 -111.273 103.146L-115.673 108.783C-135.473 73.982 -123.582 131.819 -123.582 131.819C-114.782 166.22 17.437 123.383 17.437 123.383C17.437 123.383 186.238 92.983 197.438 88.983C208.638 84.983 300.347 91.092 300.347 91.092L295.038 72.255C230.238 25.855 214.238 51.383 200.638 47.383C187.038 43.383 189.438 52.983 186.238 53.783C183.038 54.583 143.838 29.783 137.438 30.583z"/>
61
+ </g>
62
+ <g style="fill: rgb(241, 178, 136);">
63
+ <path d="M138.747 32.328C132.347 33.128 106.383 9.677 121.947 41.128C141.147 79.928 63.546 80.328 46.746 69.128C29.946 57.928 53.946 87.528 53.946 87.528C72.346 107.528 37.946 90.728 37.946 90.728C3.546 77.928 -20.454 103.528 -23.654 104.328C-26.854 105.128 -31.654 108.328 -32.454 101.928C-33.254 95.528 -40.108 79.665 -72.454 105.128C-98.636 125.456 -110.891 106.183 -110.891 106.183L-115.691 110.328C-133.691 77.128 -122.927 134.874 -122.927 134.874C-114.127 169.274 18.746 125.128 18.746 125.128C18.746 125.128 187.547 94.728 198.747 90.728C209.947 86.728 300.783 92.764 300.783 92.764L295.547 73.419C230.747 27.019 215.547 53.128 201.947 49.128C188.347 45.128 190.747 54.728 187.547 55.528C184.347 56.328 145.147 31.528 138.747 32.328z"/>
64
+ </g>
65
+ <g style="fill: rgb(243, 191, 156);">
66
+ <path d="M140.056 34.073C133.655 34.873 107.313 11.613 123.255 42.873C143.656 82.874 64.855 82.074 48.055 70.874C31.255 59.674 55.255 89.274 55.255 89.274C73.655 109.274 39.255 92.474 39.255 92.474C4.855 79.674 -19.145 105.274 -22.345 106.074C-25.545 106.874 -30.345 110.074 -31.145 103.674C-31.945 97.274 -38.668 81.578 -71.145 106.874C-98.564 127.947 -110.509 109.219 -110.509 109.219L-115.709 111.874C-131.709 81.674 -122.273 137.929 -122.273 137.929C-113.473 172.329 20.055 126.874 20.055 126.874C20.055 126.874 188.856 96.474 200.056 92.474C211.256 88.474 301.22 94.437 301.22 94.437L296.056 74.583C231.256 28.183 216.856 54.874 203.256 50.874C189.656 46.873 192.056 56.474 188.856 57.274C185.656 58.074 146.456 33.273 140.056 34.073z"/>
67
+ </g>
68
+ <g style="fill: rgb(245, 204, 176);">
69
+ <path d="M141.365 35.819C134.965 36.619 107.523 13.944 124.565 44.619C146.565 84.219 66.164 83.819 49.364 72.619C32.564 61.419 56.564 91.019 56.564 91.019C74.964 111.019 40.564 94.219 40.564 94.219C6.164 81.419 -17.836 107.019 -21.036 107.819C-24.236 108.619 -29.036 111.819 -29.836 105.419C-30.636 99.019 -37.227 83.492 -69.836 108.619C-98.491 130.438 -110.127 112.256 -110.127 112.256L-115.727 113.419C-130.128 85.019 -121.618 140.983 -121.618 140.983C-112.818 175.384 21.364 128.619 21.364 128.619C21.364 128.619 190.165 98.219 201.365 94.219C212.565 90.219 301.656 96.11 301.656 96.11L296.565 75.746C231.765 29.346 218.165 56.619 204.565 52.619C190.965 48.619 193.365 58.219 190.165 59.019C186.965 59.819 147.765 35.019 141.365 35.819z"/>
70
+ </g>
71
+ <g style="fill: rgb(248, 216, 196);">
72
+ <path d="M142.674 37.565C136.274 38.365 108.832 15.689 125.874 46.365C147.874 85.965 67.474 85.565 50.674 74.365C33.874 63.165 57.874 92.765 57.874 92.765C76.274 112.765 41.874 95.965 41.874 95.965C7.473 83.165 -16.527 108.765 -19.727 109.565C-22.927 110.365 -27.727 113.565 -28.527 107.165C-29.327 100.765 -35.786 85.405 -68.527 110.365C-98.418 132.929 -109.745 115.293 -109.745 115.293L-115.745 114.965C-129.346 88.564 -120.963 144.038 -120.963 144.038C-112.163 178.438 22.673 130.365 22.673 130.365C22.673 130.365 191.474 99.965 202.674 95.965C213.874 91.965 302.093 97.783 302.093 97.783L297.075 76.91C232.274 30.51 219.474 58.365 205.874 54.365C192.274 50.365 194.674 59.965 191.474 60.765C188.274 61.565 149.074 36.765 142.674 37.565z"/>
73
+ </g>
74
+ <g style="fill: rgb(250, 229, 215);">
75
+ <path d="M143.983 39.31C137.583 40.11 110.529 17.223 127.183 48.11C149.183 88.91 68.783 87.31 51.983 76.11C35.183 64.91 59.183 94.51 59.183 94.51C77.583 114.51 43.183 97.71 43.183 97.71C8.783 84.91 -15.217 110.51 -18.417 111.31C-21.618 112.11 -26.418 115.31 -27.218 108.91C-28.018 102.51 -34.346 87.318 -67.218 112.11C-98.345 135.42 -109.363 118.329 -109.363 118.329L-115.764 116.51C-128.764 92.51 -120.309 147.093 -120.309 147.093C-111.509 181.493 23.983 132.11 23.983 132.11C23.983 132.11 192.783 101.71 203.983 97.71C215.183 93.71 302.529 99.456 302.529 99.456L297.583 78.074C232.783 31.673 220.783 60.11 207.183 56.11C193.583 52.11 195.983 61.71 192.783 62.51C189.583 63.31 150.383 38.51 143.983 39.31z"/>
76
+ </g>
77
+ <g style="fill: rgb(252, 242, 235);">
78
+ <path d="M145.292 41.055C138.892 41.855 112.917 18.411 128.492 49.855C149.692 92.656 70.092 89.056 53.292 77.856C36.492 66.656 60.492 96.256 60.492 96.256C78.892 116.256 44.492 99.456 44.492 99.456C10.092 86.656 -13.908 112.256 -17.108 113.056C-20.308 113.856 -25.108 117.056 -25.908 110.656C-26.708 104.256 -32.905 89.232 -65.908 113.856C-98.273 137.911 -108.982 121.365 -108.982 121.365L-115.782 118.056C-128.582 94.856 -119.654 150.147 -119.654 150.147C-110.854 184.547 25.292 133.856 25.292 133.856C25.292 133.856 194.093 103.456 205.293 99.456C216.493 95.456 302.965 101.128 302.965 101.128L298.093 79.237C233.292 32.837 222.093 61.856 208.493 57.856C194.893 53.855 197.293 63.456 194.093 64.256C190.892 65.056 151.692 40.255 145.292 41.055z"/>
79
+ </g>
80
+ <g style="fill: rgb(255, 255, 255);">
81
+ <path d="M-115.8 119.601C-128.6 97.6 -119 153.201 -119 153.201C-110.2 187.601 26.6 135.601 26.6 135.601C26.6 135.601 195.401 105.2 206.601 101.2C217.801 97.2 303.401 102.8 303.401 102.8L298.601 80.4C233.801 34 223.401 63.6 209.801 59.6C196.201 55.6 198.601 65.2 195.401 66C192.201 66.8 153.001 42 146.601 42.8C140.201 43.6 114.981 19.793 129.801 51.6C152.028 99.307 69.041 89.227 54.6 79.6C37.8 68.4 61.8 98 61.8 98C80.2 118.001 45.8 101.2 45.8 101.2C11.4 88.4 -12.6 114.001 -15.8 114.801C-19 115.601 -23.8 118.801 -24.6 112.401C-25.4 106 -31.465 91.144 -64.6 115.601C-98.2 140.401 -108.6 124.401 -108.6 124.401L-115.8 119.601z"/>
82
+ </g>
83
+ <g style="fill: rgb(0, 0, 0);">
84
+ <path d="M-74.2 149.601C-74.2 149.601 -81.4 161.201 -60.6 174.401C-60.6 174.401 -59.2 175.801 -77.2 171.601C-77.2 171.601 -83.4 169.601 -85 159.201C-85 159.201 -89.8 154.801 -94.6 149.201C-99.4 143.601 -74.2 149.601 -74.2 149.601z"/>
85
+ </g>
86
+ <g style="fill: rgb(204, 204, 204);">
87
+ <path d="M65.8 102C65.8 102 83.498 128.821 82.9 133.601C81.6 144.001 81.4 153.601 84.6 157.601C87.801 161.601 96.601 194.801 96.601 194.801C96.601 194.801 96.201 196.001 108.601 158.001C108.601 158.001 120.201 142.001 100.201 123.601C100.201 123.601 65 94.8 65.8 102z"/>
88
+ </g>
89
+ <g style="fill: rgb(0, 0, 0);">
90
+ <path d="M-54.2 176.401C-54.2 176.401 -43 183.601 -57.4 214.801L-51 212.401C-51 212.401 -51.8 223.601 -55 226.001L-47.8 222.801C-47.8 222.801 -43 230.801 -47 235.601C-47 235.601 -30.2 243.601 -31 250.001C-31 250.001 -24.6 242.001 -28.6 235.601C-32.6 229.201 -39.8 233.201 -39 214.801L-47.8 218.001C-47.8 218.001 -42.2 209.201 -42.2 202.801L-50.2 205.201C-50.2 205.201 -34.731 178.623 -45.4 177.201C-51.4 176.401 -54.2 176.401 -54.2 176.401z"/>
91
+ </g>
92
+ <g style="fill: rgb(204, 204, 204);">
93
+ <path d="M-21.8 193.201C-21.8 193.201 -19 188.801 -21.8 189.601C-24.6 190.401 -55.8 205.201 -61.8 214.801C-61.8 214.801 -27.4 190.401 -21.8 193.201z"/>
94
+ </g>
95
+ <g style="fill: rgb(204, 204, 204);">
96
+ <path d="M-11.4 201.201C-11.4 201.201 -8.6 196.801 -11.4 197.601C-14.2 198.401 -45.4 213.201 -51.4 222.801C-51.4 222.801 -17 198.401 -11.4 201.201z"/>
97
+ </g>
98
+ <g style="fill: rgb(204, 204, 204);">
99
+ <path d="M1.8 186.001C1.8 186.001 4.6 181.601 1.8 182.401C-1 183.201 -32.2 198.001 -38.2 207.601C-38.2 207.601 -3.8 183.201 1.8 186.001z"/>
100
+ </g>
101
+ <g style="fill: rgb(204, 204, 204);">
102
+ <path d="M-21.4 229.601C-21.4 229.601 -21.4 223.601 -24.2 224.401C-27 225.201 -63 242.801 -69 252.401C-69 252.401 -27 226.801 -21.4 229.601z"/>
103
+ </g>
104
+ <g style="fill: rgb(204, 204, 204);">
105
+ <path d="M-20.2 218.801C-20.2 218.801 -19 214.001 -21.8 214.801C-23.8 214.801 -50.2 226.401 -56.2 236.001C-56.2 236.001 -26.6 214.401 -20.2 218.801z"/>
106
+ </g>
107
+ <g style="fill: rgb(204, 204, 204);">
108
+ <path d="M-34.6 266.401L-44.6 274.001C-44.6 274.001 -34.2 266.401 -30.6 267.601C-30.6 267.601 -37.4 278.801 -38.2 284.001C-38.2 284.001 -27.8 271.201 -22.2 271.601C-22.2 271.601 -14.6 272.001 -14.6 282.801C-14.6 282.801 -9 272.401 -5.8 272.801C-5.8 272.801 -4.6 279.201 -5.8 286.001C-5.8 286.001 -1.8 278.401 2.2 280.001C2.2 280.001 8.6 278.001 7.8 289.601C7.8 289.601 7.8 300.001 7 302.801C7 302.801 12.6 276.401 15 276.001C15 276.001 23 274.801 27.8 283.601C27.8 283.601 23.8 276.001 28.6 278.001C28.6 278.001 39.4 279.601 42.6 286.401C42.6 286.401 35.8 274.401 41.4 277.601C41.4 277.601 48.2 277.601 49.4 284.001C49.4 284.001 57.8 305.201 59.8 306.801C59.8 306.801 52.2 285.201 53.8 285.201C53.8 285.201 51.8 273.201 57 288.001C57 288.001 53.8 274.001 59.4 274.801C65 275.601 69.4 285.601 77.8 283.201C77.8 283.201 87.401 288.801 89.401 219.601L-34.6 266.401z"/>
109
+ </g>
110
+ <g style="fill: rgb(0, 0, 0);">
111
+ <path d="M-29.8 173.601C-29.8 173.601 -15 167.601 25 173.601C25 173.601 32.2 174.001 39 165.201C45.8 156.401 72.6 149.201 79 151.201L88.601 157.601L89.401 158.801C89.401 158.801 101.801 169.201 102.201 176.801C102.601 184.401 87.801 232.401 78.2 248.401C68.6 264.401 59 276.801 39.8 274.401C39.8 274.401 19 270.401 -6.6 274.401C-6.6 274.401 -35.8 272.801 -38.6 264.801C-41.4 256.801 -27.4 241.601 -27.4 241.601C-27.4 241.601 -23 233.201 -24.2 218.801C-25.4 204.401 -25 176.401 -29.8 173.601z"/>
112
+ </g>
113
+ <g style="fill: rgb(229, 102, 140);">
114
+ <path d="M-7.8 175.601C0.6 194.001 -29 259.201 -29 259.201C-31 260.801 -16.34 266.846 -6.2 264.401C4.746 261.763 45 266.001 45 266.001C68.6 250.401 81.4 206.001 81.4 206.001C81.4 206.001 91.801 182.001 74.2 178.801C56.6 175.601 -7.8 175.601 -7.8 175.601z"/>
115
+ </g>
116
+ <g style="fill: rgb(178, 50, 89);">
117
+ <path d="M-9.831 206.497C-6.505 193.707 -4.921 181.906 -7.8 175.601C-7.8 175.601 54.6 182.001 65.8 161.201C70.041 153.326 84.801 184.001 84.4 193.601C84.4 193.601 21.4 208.001 6.6 196.801L-9.831 206.497z"/>
118
+ </g>
119
+ <g style="fill: rgb(165, 38, 76);">
120
+ <path d="M-5.4 222.801C-5.4 222.801 -3.4 230.001 -5.8 234.001C-5.8 234.001 -7.4 234.801 -8.6 235.201C-8.6 235.201 -7.4 238.801 -1.4 240.401C-1.4 240.401 0.6 244.801 3 245.201C5.4 245.601 10.2 251.201 14.2 250.001C18.2 248.801 29.4 244.801 29.4 244.801C29.4 244.801 35 241.601 43.8 245.201C43.8 245.201 46.175 244.399 46.6 240.401C47.1 235.701 50.2 232.001 52.2 230.001C54.2 228.001 63.8 215.201 62.6 214.801C61.4 214.401 -5.4 222.801 -5.4 222.801z"/>
121
+ </g>
122
+ <g style="fill: rgb(255, 114, 127); stroke: rgb(0, 0, 0);">
123
+ <path d="M-9.8 174.401C-9.8 174.401 -12.6 196.801 -9.4 205.201C-6.2 213.601 -7 215.601 -7.8 219.601C-8.6 223.601 -4.2 233.601 1.4 239.601L13.4 241.201C13.4 241.201 28.6 237.601 37.8 240.401C37.8 240.401 46.794 241.744 50.2 226.801C50.2 226.801 55 220.401 62.2 217.601C69.4 214.801 76.6 173.201 72.6 165.201C68.6 157.201 54.2 152.801 38.2 168.401C22.2 184.001 20.2 167.201 -9.8 174.401z"/>
124
+ </g>
125
+ <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
126
+ <path d="M-8.2 249.201C-8.2 249.201 -9 247.201 -13.4 246.801C-13.4 246.801 -35.8 243.201 -44.2 230.801C-44.2 230.801 -51 225.201 -46.6 236.801C-46.6 236.801 -36.2 257.201 -29.4 260.001C-29.4 260.001 -13 264.001 -8.2 249.201z"/>
127
+ </g>
128
+ <g style="fill: rgb(204, 63, 76);">
129
+ <path d="M71.742 185.229C72.401 177.323 74.354 168.709 72.6 165.201C66.154 152.307 49.181 157.695 38.2 168.401C22.2 184.001 20.2 167.201 -9.8 174.401C-9.8 174.401 -11.545 188.364 -10.705 198.376C-10.705 198.376 26.6 186.801 27.4 192.401C27.4 192.401 29 189.201 38.2 189.201C47.4 189.201 70.142 188.029 71.742 185.229z"/>
130
+ </g>
131
+ <g style="stroke: rgb(165, 25, 38); stroke-width: 2;">
132
+ <path d="M28.6 175.201C28.6 175.201 33.4 180.001 29.8 189.601C29.8 189.601 15.4 205.601 17.4 219.601"/>
133
+ </g>
134
+ <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
135
+ <path d="M-19.4 260.001C-19.4 260.001 -23.8 247.201 -15 254.001C-15 254.001 -10.2 256.001 -11.4 257.601C-12.6 259.201 -18.2 263.201 -19.4 260.001z"/>
136
+ </g>
137
+ <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
138
+ <path d="M-14.36 261.201C-14.36 261.201 -17.88 250.961 -10.84 256.401C-10.84 256.401 -6.419 258.849 -7.96 259.281C-12.52 260.561 -7.96 263.121 -14.36 261.201z"/>
139
+ </g>
140
+ <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
141
+ <path d="M-9.56 261.201C-9.56 261.201 -13.08 250.961 -6.04 256.401C-6.04 256.401 -1.665 258.711 -3.16 259.281C-6.52 260.561 -3.16 263.121 -9.56 261.201z"/>
142
+ </g>
143
+ <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
144
+ <path d="M-2.96 261.401C-2.96 261.401 -6.48 251.161 0.56 256.601C0.56 256.601 4.943 258.933 3.441 259.481C0.48 260.561 3.441 263.321 -2.96 261.401z"/>
145
+ </g>
146
+ <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
147
+ <path d="M3.52 261.321C3.52 261.321 0 251.081 7.041 256.521C7.041 256.521 10.881 258.121 9.921 259.401C8.961 260.681 9.921 263.241 3.52 261.321z"/>
148
+ </g>
149
+ <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
150
+ <path d="M10.2 262.001C10.2 262.001 5.4 249.601 14.6 256.001C14.6 256.001 19.4 258.001 18.2 259.601C17 261.201 18.2 264.401 10.2 262.001z"/>
151
+ </g>
152
+ <g style="stroke: rgb(165, 38, 76); stroke-width: 2;">
153
+ <path d="M-18.2 244.801C-18.2 244.801 -5 242.001 1 245.201C1 245.201 7 246.401 8.2 246.001C9.4 245.601 12.6 245.201 12.6 245.201"/>
154
+ </g>
155
+ <g style="stroke: rgb(165, 38, 76); stroke-width: 2;">
156
+ <path d="M15.8 253.601C15.8 253.601 27.8 240.001 39.8 244.401C46.816 246.974 45.8 243.601 46.6 240.801C47.4 238.001 47.6 233.801 52.6 230.801"/>
157
+ </g>
158
+ <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
159
+ <path d="M33 237.601C33 237.601 29 226.801 26.2 239.601C23.4 252.401 20.2 256.001 18.6 258.801C18.6 258.801 18.6 264.001 27 263.601C27 263.601 37.8 263.201 38.2 260.401C38.6 257.601 37 246.001 33 237.601z"/>
160
+ </g>
161
+ <g style="stroke: rgb(165, 38, 76); stroke-width: 2;">
162
+ <path d="M47 244.801C47 244.801 50.6 242.401 53 243.601"/>
163
+ </g>
164
+ <g style="stroke: rgb(165, 38, 76); stroke-width: 2;">
165
+ <path d="M53.5 228.401C53.5 228.401 56.4 223.501 61.2 222.701"/>
166
+ </g>
167
+ <g style="fill: rgb(178, 178, 178);">
168
+ <path d="M-25.8 265.201C-25.8 265.201 -7.8 268.401 -3.4 266.801C-3.4 266.801 5.4 266.801 -3 268.801C-3 268.801 -15.8 268.801 -23.8 267.601C-23.8 267.601 -35.4 262.001 -25.8 265.201z"/>
169
+ </g>
170
+ <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
171
+ <path d="M-11.8 172.001C-11.8 172.001 5.8 172.001 7.8 172.801C7.8 172.801 15 203.601 11.4 211.201C11.4 211.201 10.2 214.001 7.4 208.401C7.4 208.401 -11 175.601 -14.2 173.601C-17.4 171.601 -13 172.001 -11.8 172.001z"/>
172
+ </g>
173
+ <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
174
+ <path d="M-88.9 169.301C-88.9 169.301 -80 171.001 -67.4 173.601C-67.4 173.601 -62.6 196.001 -59.4 200.801C-56.2 205.601 -59.8 205.601 -63.4 202.801C-67 200.001 -81.8 186.001 -83.8 181.601C-85.8 177.201 -88.9 169.301 -88.9 169.301z"/>
175
+ </g>
176
+ <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
177
+ <path d="M-67.039 173.818C-67.039 173.818 -61.239 175.366 -60.23 177.581C-59.222 179.795 -61.432 183.092 -61.432 183.092C-61.432 183.092 -62.432 186.397 -63.634 184.235C-64.836 182.072 -67.708 174.412 -67.039 173.818z"/>
178
+ </g>
179
+ <g style="fill: rgb(0, 0, 0);">
180
+ <path d="M-67 173.601C-67 173.601 -63.4 178.801 -59.8 178.801C-56.2 178.801 -55.818 178.388 -53 179.001C-48.4 180.001 -48.8 178.001 -42.2 179.201C-39.56 179.681 -37 178.801 -34.2 180.001C-31.4 181.201 -28.2 180.401 -27 178.401C-25.8 176.401 -21 172.201 -21 172.201C-21 172.201 -33.8 174.001 -36.6 174.801C-36.6 174.801 -59 176.001 -67 173.601z"/>
181
+ </g>
182
+ <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
183
+ <path d="M-22.4 173.801C-22.4 173.801 -28.85 177.301 -29.25 179.701C-29.65 182.101 -24 185.801 -24 185.801C-24 185.801 -21.25 190.401 -20.65 188.001C-20.05 185.601 -21.6 174.201 -22.4 173.801z"/>
184
+ </g>
185
+ <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
186
+ <path d="M-59.885 179.265C-59.885 179.265 -52.878 190.453 -52.661 179.242C-52.661 179.242 -52.104 177.984 -53.864 177.962C-59.939 177.886 -58.418 173.784 -59.885 179.265z"/>
187
+ </g>
188
+ <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
189
+ <path d="M-52.707 179.514C-52.707 179.514 -44.786 190.701 -45.422 179.421C-45.422 179.421 -45.415 179.089 -47.168 178.936C-51.915 178.522 -51.57 174.004 -52.707 179.514z"/>
190
+ </g>
191
+ <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
192
+ <path d="M-45.494 179.522C-45.494 179.522 -37.534 190.15 -38.203 180.484C-38.203 180.484 -38.084 179.251 -39.738 178.95C-43.63 178.244 -43.841 174.995 -45.494 179.522z"/>
193
+ </g>
194
+ <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;">
195
+ <path d="M-38.618 179.602C-38.618 179.602 -30.718 191.163 -30.37 181.382C-30.37 181.382 -28.726 180.004 -30.472 179.782C-36.29 179.042 -35.492 174.588 -38.618 179.602z"/>
196
+ </g>
197
+ <g style="fill: rgb(229, 229, 178);">
198
+ <path d="M-74.792 183.132L-82.45 181.601C-85.05 176.601 -87.15 170.451 -87.15 170.451C-87.15 170.451 -80.8 171.451 -68.3 174.251C-68.3 174.251 -67.424 177.569 -65.952 183.364L-74.792 183.132z"/>
199
+ </g>
200
+ <g style="fill: rgb(229, 229, 178);">
201
+ <path d="M-9.724 178.47C-11.39 175.964 -12.707 174.206 -13.357 173.8C-16.37 171.917 -12.227 172.294 -11.098 172.294C-11.098 172.294 5.473 172.294 7.356 173.047C7.356 173.047 7.88 175.289 8.564 178.68C8.564 178.68 -1.524 176.67 -9.724 178.47z"/>
202
+ </g>
203
+ <g style="fill: rgb(204, 114, 38);">
204
+ <path d="M43.88 40.321C71.601 44.281 97.121 8.641 98.881 -1.04C100.641 -10.72 90.521 -22.6 90.521 -22.6C91.841 -25.68 87.001 -39.76 81.721 -49C76.441 -58.24 60.54 -57.266 43 -58.24C27.16 -59.12 8.68 -35.8 7.36 -34.04C6.04 -32.28 12.2 6.001 13.52 11.721C14.84 17.441 12.2 43.841 12.2 43.841C46.44 34.741 16.16 36.361 43.88 40.321z"/>
205
+ </g>
206
+ <g style="fill: rgb(234, 142, 81);">
207
+ <path d="M8.088 -33.392C6.792 -31.664 12.84 5.921 14.136 11.537C15.432 17.153 12.84 43.073 12.84 43.073C45.512 34.193 16.728 35.729 43.944 39.617C71.161 43.505 96.217 8.513 97.945 -0.992C99.673 -10.496 89.737 -22.16 89.737 -22.16C91.033 -25.184 86.281 -39.008 81.097 -48.08C75.913 -57.152 60.302 -56.195 43.08 -57.152C27.528 -58.016 9.384 -35.12 8.088 -33.392z"/>
208
+ </g>
209
+ <g style="fill: rgb(239, 170, 124);">
210
+ <path d="M8.816 -32.744C7.544 -31.048 13.48 5.841 14.752 11.353C16.024 16.865 13.48 42.305 13.48 42.305C44.884 33.145 17.296 35.097 44.008 38.913C70.721 42.729 95.313 8.385 97.009 -0.944C98.705 -10.272 88.953 -21.72 88.953 -21.72C90.225 -24.688 85.561 -38.256 80.473 -47.16C75.385 -56.064 60.063 -55.125 43.16 -56.064C27.896 -56.912 10.088 -34.44 8.816 -32.744z"/>
211
+ </g>
212
+ <g style="fill: rgb(244, 198, 168);">
213
+ <path d="M9.544 -32.096C8.296 -30.432 14.12 5.761 15.368 11.169C16.616 16.577 14.12 41.537 14.12 41.537C43.556 32.497 17.864 34.465 44.072 38.209C70.281 41.953 94.409 8.257 96.073 -0.895C97.737 -10.048 88.169 -21.28 88.169 -21.28C89.417 -24.192 84.841 -37.504 79.849 -46.24C74.857 -54.976 59.824 -54.055 43.24 -54.976C28.264 -55.808 10.792 -33.76 9.544 -32.096z"/>
214
+ </g>
215
+ <g style="fill: rgb(249, 226, 211);">
216
+ <path d="M10.272 -31.448C9.048 -29.816 14.76 5.681 15.984 10.985C17.208 16.289 14.76 40.769 14.76 40.769C42.628 31.849 18.432 33.833 44.136 37.505C69.841 41.177 93.505 8.129 95.137 -0.848C96.769 -9.824 87.385 -20.84 87.385 -20.84C88.609 -23.696 84.121 -36.752 79.225 -45.32C74.329 -53.888 59.585 -52.985 43.32 -53.888C28.632 -54.704 11.496 -33.08 10.272 -31.448z"/>
217
+ </g>
218
+ <g style="fill: rgb(255, 255, 255);">
219
+ <path d="M44.2 36.8C69.4 40.4 92.601 8 94.201 -0.8C95.801 -9.6 86.601 -20.4 86.601 -20.4C87.801 -23.2 83.4 -36 78.6 -44.4C73.8 -52.8 59.346 -51.914 43.4 -52.8C29 -53.6 12.2 -32.4 11 -30.8C9.8 -29.2 15.4 5.6 16.6 10.8C17.8 16 15.4 40 15.4 40C40.9 31.4 19 33.2 44.2 36.8z"/>
220
+ </g>
221
+ <g style="fill: rgb(204, 204, 204);">
222
+ <path d="M90.601 2.8C90.601 2.8 62.8 10.4 51.2 8.8C51.2 8.8 35.4 2.2 26.6 24C26.6 24 23 31.2 21 33.2C19 35.2 90.601 2.8 90.601 2.8z"/>
223
+ </g>
224
+ <g style="fill: rgb(0, 0, 0);">
225
+ <path d="M94.401 0.6C94.401 0.6 65.4 12.8 55.4 12.4C55.4 12.4 39 7.8 30.6 22.4C30.6 22.4 22.2 31.6 19 33.2C19 33.2 18.6 34.8 25 30.8L35.4 36C35.4 36 50.2 45.6 59.8 29.6C59.8 29.6 63.8 18.4 63.8 16.4C63.8 14.4 85 8.8 86.601 8.4C88.201 8 94.801 3.8 94.401 0.6z"/>
226
+ </g>
227
+ <g style="fill: rgb(153, 204, 50);">
228
+ <path d="M47 36.514C40.128 36.514 31.755 32.649 31.755 26.4C31.755 20.152 40.128 13.887 47 13.887C53.874 13.887 59.446 18.952 59.446 25.2C59.446 31.449 53.874 36.514 47 36.514z"/>
229
+ </g>
230
+ <g style="fill: rgb(101, 153, 0);">
231
+ <path d="M43.377 19.83C38.531 20.552 33.442 22.055 33.514 21.839C35.054 17.22 41.415 13.887 47 13.887C51.296 13.887 55.084 15.865 57.32 18.875C57.32 18.875 52.004 18.545 43.377 19.83z"/>
232
+ </g>
233
+ <g style="fill: rgb(255, 255, 255);">
234
+ <path d="M55.4 19.6C55.4 19.6 51 16.4 51 18.6C51 18.6 54.6 23 55.4 19.6z"/>
235
+ </g>
236
+ <g style="fill: rgb(0, 0, 0);">
237
+ <path d="M45.4 27.726C42.901 27.726 40.875 25.7 40.875 23.2C40.875 20.701 42.901 18.675 45.4 18.675C47.9 18.675 49.926 20.701 49.926 23.2C49.926 25.7 47.9 27.726 45.4 27.726z"/>
238
+ </g>
239
+ <g style="fill: rgb(204, 114, 38);">
240
+ <path d="M-58.6 14.4C-58.6 14.4 -61.8 -6.8 -59.4 -11.2C-59.4 -11.2 -48.6 -21.2 -49 -24.8C-49 -24.8 -49.4 -42.8 -50.6 -43.6C-51.8 -44.4 -59.4 -50.4 -65.4 -44C-65.4 -44 -75.8 -26 -75 -19.6L-75 -17.6C-75 -17.6 -82.6 -18 -84.2 -16C-84.2 -16 -85.4 -10.8 -86.6 -10.4C-86.6 -10.4 -89.4 -8 -87.4 -5.2C-87.4 -5.2 -89.4 -2.8 -89 1.2L-81.4 5.2C-81.4 5.2 -79.4 19.6 -68.6 24.8C-63.764 27.129 -60.6 20.4 -58.6 14.4z"/>
241
+ </g>
242
+ <g style="fill: rgb(255, 255, 255);">
243
+ <path d="M-59.6 12.56C-59.6 12.56 -62.48 -6.52 -60.32 -10.48C-60.32 -10.48 -50.6 -19.48 -50.96 -22.72C-50.96 -22.72 -51.32 -38.92 -52.4 -39.64C-53.48 -40.36 -60.32 -45.76 -65.72 -40C-65.72 -40 -75.08 -23.8 -74.36 -18.04L-74.36 -16.24C-74.36 -16.24 -81.2 -16.6 -82.64 -14.8C-82.64 -14.8 -83.72 -10.12 -84.8 -9.76C-84.8 -9.76 -87.32 -7.6 -85.52 -5.08C-85.52 -5.08 -87.32 -2.92 -86.96 0.68L-80.12 4.28C-80.12 4.28 -78.32 17.24 -68.6 21.92C-64.248 24.015 -61.4 17.96 -59.6 12.56z"/>
244
+ </g>
245
+ <g style="fill: rgb(235, 149, 92);">
246
+ <path d="M-51.05 -42.61C-52.14 -43.47 -59.63 -49.24 -65.48 -43C-65.48 -43 -75.62 -25.45 -74.84 -19.21L-74.84 -17.26C-74.84 -17.26 -82.25 -17.65 -83.81 -15.7C-83.81 -15.7 -84.98 -10.63 -86.15 -10.24C-86.15 -10.24 -88.88 -7.9 -86.93 -5.17C-86.93 -5.17 -88.88 -2.83 -88.49 1.07L-81.08 4.97C-81.08 4.97 -79.13 19.01 -68.6 24.08C-63.886 26.35 -60.8 19.79 -58.85 13.94C-58.85 13.94 -61.97 -6.73 -59.63 -11.02C-59.63 -11.02 -49.1 -20.77 -49.49 -24.28C-49.49 -24.28 -49.88 -41.83 -51.05 -42.61z"/>
247
+ </g>
248
+ <g style="fill: rgb(242, 184, 146);">
249
+ <path d="M-51.5 -41.62C-52.48 -42.54 -59.86 -48.08 -65.56 -42C-65.56 -42 -75.44 -24.9 -74.68 -18.82L-74.68 -16.92C-74.68 -16.92 -81.9 -17.3 -83.42 -15.4C-83.42 -15.4 -84.56 -10.46 -85.7 -10.08C-85.7 -10.08 -88.36 -7.8 -86.46 -5.14C-86.46 -5.14 -88.36 -2.86 -87.98 0.94L-80.76 4.74C-80.76 4.74 -78.86 18.42 -68.6 23.36C-64.006 25.572 -61 19.18 -59.1 13.48C-59.1 13.48 -62.14 -6.66 -59.86 -10.84C-59.86 -10.84 -49.6 -20.34 -49.98 -23.76C-49.98 -23.76 -50.36 -40.86 -51.5 -41.62z"/>
250
+ </g>
251
+ <g style="fill: rgb(248, 220, 200);">
252
+ <path d="M-51.95 -40.63C-52.82 -41.61 -60.09 -46.92 -65.64 -41C-65.64 -41 -75.26 -24.35 -74.52 -18.43L-74.52 -16.58C-74.52 -16.58 -81.55 -16.95 -83.03 -15.1C-83.03 -15.1 -84.14 -10.29 -85.25 -9.92C-85.25 -9.92 -87.84 -7.7 -85.99 -5.11C-85.99 -5.11 -87.84 -2.89 -87.47 0.81L-80.44 4.51C-80.44 4.51 -78.59 17.83 -68.6 22.64C-64.127 24.794 -61.2 18.57 -59.35 13.02C-59.35 13.02 -62.31 -6.59 -60.09 -10.66C-60.09 -10.66 -50.1 -19.91 -50.47 -23.24C-50.47 -23.24 -50.84 -39.89 -51.95 -40.63z"/>
253
+ </g>
254
+ <g style="fill: rgb(255, 255, 255);">
255
+ <path d="M-59.6 12.46C-59.6 12.46 -62.48 -6.52 -60.32 -10.48C-60.32 -10.48 -50.6 -19.48 -50.96 -22.72C-50.96 -22.72 -51.32 -38.92 -52.4 -39.64C-53.16 -40.68 -60.32 -45.76 -65.72 -40C-65.72 -40 -75.08 -23.8 -74.36 -18.04L-74.36 -16.24C-74.36 -16.24 -81.2 -16.6 -82.64 -14.8C-82.64 -14.8 -83.72 -10.12 -84.8 -9.76C-84.8 -9.76 -87.32 -7.6 -85.52 -5.08C-85.52 -5.08 -87.32 -2.92 -86.96 0.68L-80.12 4.28C-80.12 4.28 -78.32 17.24 -68.6 21.92C-64.248 24.015 -61.4 17.86 -59.6 12.46z"/>
256
+ </g>
257
+ <g style="fill: rgb(204, 204, 204);">
258
+ <path d="M-62.7 6.2C-62.7 6.2 -84.3 -4 -85.2 -4.8C-85.2 -4.8 -76.1 3.4 -75.3 3.4C-74.5 3.4 -62.7 6.2 -62.7 6.2z"/>
259
+ </g>
260
+ <g style="fill: rgb(0, 0, 0);">
261
+ <path d="M-79.8 0C-79.8 0 -61.4 3.6 -61.4 8C-61.4 10.912 -61.643 24.331 -67 22.8C-75.4 20.4 -71.8 6 -79.8 0z"/>
262
+ </g>
263
+ <g style="fill: rgb(153, 204, 50);">
264
+ <path d="M-71.4 3.8C-71.4 3.8 -62.422 5.274 -61.4 8C-60.8 9.6 -60.137 17.908 -65.6 19C-70.152 19.911 -72.382 9.69 -71.4 3.8z"/>
265
+ </g>
266
+ <g style="fill: rgb(0, 0, 0);">
267
+ <path d="M14.595 46.349C14.098 44.607 15.409 44.738 17.2 44.2C19.2 43.6 31.4 39.8 32.2 37.2C33 34.6 46.2 39 46.2 39C48 39.8 52.4 42.4 52.4 42.4C57.2 43.6 63.8 44 63.8 44C66.2 45 69.6 47.8 69.6 47.8C84.2 58 96.601 50.8 96.601 50.8C116.601 44.2 110.601 27 110.601 27C107.601 18 110.801 14.6 110.801 14.6C111.001 10.8 118.201 17.2 118.201 17.2C120.801 21.4 121.601 26.4 121.601 26.4C129.601 37.6 126.201 19.8 126.201 19.8C126.401 18.8 123.601 15.2 123.601 14C123.601 12.8 121.801 9.4 121.801 9.4C118.801 6 121.201 -1 121.201 -1C123.001 -14.8 120.801 -13 120.801 -13C119.601 -14.8 110.401 -4.8 110.401 -4.8C108.201 -1.4 102.201 0.2 102.201 0.2C99.401 2 96.001 0.6 96.001 0.6C93.401 0.2 87.801 7.2 87.801 7.2C90.601 7 93.001 11.4 95.401 11.6C97.801 11.8 99.601 9.2 101.201 8.6C102.801 8 105.601 13.8 105.601 13.8C106.001 16.4 100.401 21.2 100.401 21.2C100.001 25.8 98.401 24.2 98.401 24.2C95.401 23.6 94.201 27.4 93.201 32C92.201 36.6 88.001 37 88.001 37C86.401 44.4 85.2 41.4 85.2 41.4C85 35.8 79 41.6 79 41.6C77.8 43.6 73.2 41.4 73.2 41.4C66.4 39.4 68.8 37.4 68.8 37.4C70.6 35.2 81.8 37.4 81.8 37.4C84 35.8 76 31.8 76 31.8C75.4 30 76.4 25.6 76.4 25.6C77.6 22.4 84.4 16.8 84.4 16.8C93.801 15.6 91.001 14 91.001 14C84.801 8.8 79 16.4 79 16.4C76.8 22.6 59.4 37.6 59.4 37.6C54.6 41 57.2 34.2 53.2 37.6C49.2 41 28.6 32 28.6 32C17.038 30.807 14.306 46.549 10.777 43.429C10.777 43.429 16.195 51.949 14.595 46.349z"/>
268
+ </g>
269
+ <g style="fill: rgb(0, 0, 0);">
270
+ <path d="M209.401 -120C209.401 -120 183.801 -112 181.001 -93.2C181.001 -93.2 178.601 -70.4 199.001 -52.8C199.001 -52.8 199.401 -46.4 201.401 -43.2C201.401 -43.2 199.801 -38.4 218.601 -46L245.801 -54.4C245.801 -54.4 252.201 -56.8 257.401 -65.6C262.601 -74.4 277.801 -93.2 274.201 -118.4C274.201 -118.4 275.401 -129.6 269.401 -130C269.401 -130 261.001 -131.6 253.801 -124C253.801 -124 247.001 -120.8 244.601 -121.2L209.401 -120z"/>
271
+ </g>
272
+ <g style="fill: rgb(0, 0, 0);">
273
+ <path d="M264.022 -120.99C264.022 -120.99 266.122 -129.92 261.282 -125.08C261.282 -125.08 254.242 -119.36 246.761 -119.36C246.761 -119.36 232.241 -117.16 227.841 -103.96C227.841 -103.96 223.881 -77.12 231.801 -71.4C231.801 -71.4 236.641 -63.92 243.681 -70.52C250.722 -77.12 266.222 -107.35 264.022 -120.99z"/>
274
+ </g>
275
+ <g style="fill: rgb(50, 50, 50);">
276
+ <path d="M263.648 -120.632C263.648 -120.632 265.738 -129.376 260.986 -124.624C260.986 -124.624 254.074 -119.008 246.729 -119.008C246.729 -119.008 232.473 -116.848 228.153 -103.888C228.153 -103.888 224.265 -77.536 232.041 -71.92C232.041 -71.92 236.793 -64.576 243.705 -71.056C250.618 -77.536 265.808 -107.24 263.648 -120.632z"/>
277
+ </g>
278
+ <g style="fill: rgb(102, 102, 102);">
279
+ <path d="M263.274 -120.274C263.274 -120.274 265.354 -128.832 260.69 -124.168C260.69 -124.168 253.906 -118.656 246.697 -118.656C246.697 -118.656 232.705 -116.536 228.465 -103.816C228.465 -103.816 224.649 -77.952 232.281 -72.44C232.281 -72.44 236.945 -65.232 243.729 -71.592C250.514 -77.952 265.394 -107.13 263.274 -120.274z"/>
280
+ </g>
281
+ <g style="fill: rgb(153, 153, 153);">
282
+ <path d="M262.9 -119.916C262.9 -119.916 264.97 -128.288 260.394 -123.712C260.394 -123.712 253.738 -118.304 246.665 -118.304C246.665 -118.304 232.937 -116.224 228.777 -103.744C228.777 -103.744 225.033 -78.368 232.521 -72.96C232.521 -72.96 237.097 -65.888 243.753 -72.128C250.41 -78.368 264.98 -107.02 262.9 -119.916z"/>
283
+ </g>
284
+ <g style="fill: rgb(204, 204, 204);">
285
+ <path d="M262.526 -119.558C262.526 -119.558 264.586 -127.744 260.098 -123.256C260.098 -123.256 253.569 -117.952 246.633 -117.952C246.633 -117.952 233.169 -115.912 229.089 -103.672C229.089 -103.672 225.417 -78.784 232.761 -73.48C232.761 -73.48 237.249 -66.544 243.777 -72.664C250.305 -78.784 264.566 -106.91 262.526 -119.558z"/>
286
+ </g>
287
+ <g style="fill: rgb(255, 255, 255);">
288
+ <path d="M262.151 -119.2C262.151 -119.2 264.201 -127.2 259.801 -122.8C259.801 -122.8 253.401 -117.6 246.601 -117.6C246.601 -117.6 233.401 -115.6 229.401 -103.6C229.401 -103.6 225.801 -79.2 233.001 -74C233.001 -74 237.401 -67.2 243.801 -73.2C250.201 -79.2 264.151 -106.8 262.151 -119.2z"/>
289
+ </g>
290
+ <g style="fill: rgb(153, 38, 0);">
291
+ <path d="M50.6 84C50.6 84 30.2 64.8 22.2 64C22.2 64 -12.2 60 -27 78C-27 78 -9.4 57.6 18.2 63.2C18.2 63.2 -3.4 58.8 -15.8 62C-15.8 62 -32.6 62 -42.2 76L-45 80.8C-45 80.8 -41 66 -22.6 60C-22.6 60 0.2 55.2 11 60C11 60 -10.6 53.2 -20.6 55.2C-20.6 55.2 -51 52.8 -63.8 79.2C-63.8 79.2 -59.8 64.8 -45 57.6C-45 57.6 -31.4 48.8 -11 51.6C-11 51.6 3.4 54.8 8.6 57.2C13.8 59.6 12.6 56.8 4.2 52C4.2 52 -1.4 42 -15.4 42.4C-15.4 42.4 -58.2 46 -68.6 58C-68.6 58 -55 46.8 -44.6 44C-44.6 44 -22.2 36 -13.8 36.8C-13.8 36.8 11 37.8 18.6 33.8C18.6 33.8 7.4 38.8 10.6 42C13.8 45.2 20.6 52.8 20.6 54C20.6 55.2 44.8 77.3 48.4 81.7L50.6 84z"/>
292
+ </g>
293
+ <g style="fill: rgb(204, 204, 204);">
294
+ <path d="M189 278C189 278 173.5 241.5 161 232C161 232 187 248 190.5 266C190.5 266 190.5 276 189 278z"/>
295
+ </g>
296
+ <g style="fill: rgb(204, 204, 204);">
297
+ <path d="M236 285.5C236 285.5 209.5 230.5 191 206.5C191 206.5 234.5 244 239.5 270.5L240 276L237 273.5C237 273.5 236.5 282.5 236 285.5z"/>
298
+ </g>
299
+ <g style="fill: rgb(204, 204, 204);">
300
+ <path d="M292.5 237C292.5 237 230 177.5 228.5 175C228.5 175 289 241 292 248.5C292 248.5 290 239.5 292.5 237z"/>
301
+ </g>
302
+ <g style="fill: rgb(204, 204, 204);">
303
+ <path d="M104 280.5C104 280.5 123.5 228.5 142.5 251C142.5 251 157.5 261 157 264C157 264 153 257.5 135 258C135 258 116 255 104 280.5z"/>
304
+ </g>
305
+ <g style="fill: rgb(204, 204, 204);">
306
+ <path d="M294.5 153C294.5 153 249.5 124.5 242 123C230.193 120.639 291.5 152 296.5 162.5C296.5 162.5 298.5 160 294.5 153z"/>
307
+ </g>
308
+ <g style="fill: rgb(0, 0, 0);">
309
+ <path d="M143.801 259.601C143.801 259.601 164.201 257.601 171.001 250.801L175.401 254.401L193.001 216.001L196.601 221.201C196.601 221.201 211.001 206.401 210.201 198.401C209.401 190.401 223.001 204.401 223.001 204.401C223.001 204.401 222.201 192.801 229.401 199.601C229.401 199.601 227.001 184.001 235.401 192.001C235.401 192.001 224.864 161.844 247.401 187.601C253.001 194.001 248.601 187.201 248.601 187.201C248.601 187.201 222.601 139.201 244.201 153.601C244.201 153.601 246.201 130.801 245.001 126.401C243.801 122.001 241.801 99.6 237.001 94.4C232.201 89.2 237.401 87.6 243.001 92.8C243.001 92.8 231.801 68.8 245.001 80.8C245.001 80.8 241.401 65.6 237.001 62.8C237.001 62.8 231.401 45.6 246.601 56.4C246.601 56.4 242.201 44 239.001 40.8C239.001 40.8 227.401 13.2 234.601 18L239.001 21.6C239.001 21.6 232.201 7.6 238.601 12C245.001 16.4 245.001 16 245.001 16C245.001 16 223.801 -17.2 244.201 0.4C244.201 0.4 236.042 -13.518 232.601 -20.4C232.601 -20.4 213.801 -40.8 228.201 -34.4L233.001 -32.8C233.001 -32.8 224.201 -42.8 216.201 -44.4C208.201 -46 218.601 -52.4 225.001 -50.4C231.401 -48.4 247.001 -40.8 247.001 -40.8C247.001 -40.8 259.801 -22 263.801 -21.6C263.801 -21.6 243.801 -29.2 249.801 -21.2C249.801 -21.2 264.201 -7.2 257.001 -7.6C257.001 -7.6 251.001 -0.4 255.801 8.4C255.801 8.4 237.342 -9.991 252.201 15.6L259.001 32C259.001 32 234.601 7.2 245.801 29.2C245.801 29.2 263.001 52.8 265.001 53.2C267.001 53.6 271.401 62.4 271.401 62.4L267.001 60.4L272.201 69.2C272.201 69.2 261.001 57.2 267.001 70.4L272.601 84.8C272.601 84.8 252.201 62.8 265.801 92.4C265.801 92.4 249.401 87.2 258.201 104.4C258.201 104.4 256.601 120.401 257.001 125.601C257.401 130.801 258.601 159.201 254.201 167.201C249.801 175.201 260.201 194.401 262.201 198.401C264.201 202.401 267.801 213.201 259.001 204.001C250.201 194.801 254.601 200.401 256.601 209.201C258.601 218.001 264.601 233.601 263.801 239.201C263.801 239.201 262.601 240.401 259.401 236.801C259.401 236.801 244.601 214.001 246.201 228.401C246.201 228.401 245.001 236.401 241.801 245.201C241.801 245.201 238.601 256.001 238.601 247.201C238.601 247.201 235.401 230.401 232.601 238.001C229.801 245.601 226.201 251.601 223.401 254.001C220.601 256.401 215.401 233.601 214.201 244.001C214.201 244.001 202.201 231.601 197.401 248.001L185.801 264.401C185.801 264.401 185.401 252.001 184.201 258.001C184.201 258.001 154.201 264.001 143.801 259.601z"/>
310
+ </g>
311
+ <g style="fill: rgb(0, 0, 0);">
312
+ <path d="M109.401 -97.2C109.401 -97.2 97.801 -105.2 93.801 -104.8C89.801 -104.4 121.401 -113.6 162.601 -86C162.601 -86 167.401 -83.2 171.001 -83.6C171.001 -83.6 174.201 -81.2 171.401 -77.6C171.401 -77.6 162.601 -68 173.801 -56.8C173.801 -56.8 192.201 -50 186.601 -58.8C186.601 -58.8 197.401 -54.8 199.801 -50.8C202.201 -46.8 201.001 -50.8 201.001 -50.8C201.001 -50.8 194.601 -58 188.601 -63.2C188.601 -63.2 183.401 -65.2 180.601 -73.6C177.801 -82 175.401 -92 179.801 -95.2C179.801 -95.2 175.801 -90.8 176.601 -94.8C177.401 -98.8 181.001 -102.4 182.601 -102.8C184.201 -103.2 200.601 -119 207.401 -119.4C207.401 -119.4 198.201 -118 195.201 -119C192.201 -120 165.601 -131.4 159.601 -132.6C159.601 -132.6 142.801 -139.2 154.801 -137.2C154.801 -137.2 190.601 -133.4 208.801 -120.2C208.801 -120.2 201.601 -128.6 183.201 -135.6C183.201 -135.6 161.001 -148.2 125.801 -143.2C125.801 -143.2 108.001 -140 100.201 -138.2C100.201 -138.2 97.601 -138.8 97.001 -139.2C96.401 -139.6 84.6 -148.6 57 -141.6C57 -141.6 40 -137 31.4 -132.2C31.4 -132.2 16.2 -131 12.6 -127.8C12.6 -127.8 -6 -113.2 -8 -112.4C-10 -111.6 -21.4 -104 -22.2 -103.6C-22.2 -103.6 2.4 -110.2 4.8 -112.6C7.2 -115 24.6 -117.6 27 -116.2C29.4 -114.8 37.8 -115.4 28.2 -114.8C28.2 -114.8 103.801 -100 104.601 -98C105.401 -96 109.401 -97.2 109.401 -97.2z"/>
313
+ </g>
314
+ <g style="fill: rgb(204, 114, 38);">
315
+ <path d="M180.801 -106.4C180.801 -106.4 170.601 -113.8 168.601 -113.8C166.601 -113.8 154.201 -124 150.001 -123.6C145.801 -123.2 133.601 -133.2 106.201 -125C106.201 -125 105.601 -127 109.201 -127.8C109.201 -127.8 115.601 -130 116.001 -130.6C116.001 -130.6 136.201 -134.8 143.401 -131.2C143.401 -131.2 152.601 -128.6 158.801 -122.4C158.801 -122.4 170.001 -119.2 173.201 -120.2C173.201 -120.2 182.001 -118 182.401 -116.2C182.401 -116.2 188.201 -113.2 186.401 -110.6C186.401 -110.6 186.801 -109 180.801 -106.4z"/>
316
+ </g>
317
+ <g style="fill: rgb(204, 114, 38);">
318
+ <path d="M168.33 -108.509C169.137 -107.877 170.156 -107.779 170.761 -106.97C170.995 -106.656 170.706 -106.33 170.391 -106.233C169.348 -105.916 168.292 -106.486 167.15 -105.898C166.748 -105.691 166.106 -105.873 165.553 -106.022C163.921 -106.463 162.092 -106.488 160.401 -105.8C158.416 -106.929 156.056 -106.345 153.975 -107.346C153.917 -107.373 153.695 -107.027 153.621 -107.054C150.575 -108.199 146.832 -107.916 144.401 -110.2C141.973 -110.612 139.616 -111.074 137.188 -111.754C135.37 -112.263 133.961 -113.252 132.341 -114.084C130.964 -114.792 129.507 -115.314 127.973 -115.686C126.11 -116.138 124.279 -116.026 122.386 -116.546C122.293 -116.571 122.101 -116.227 122.019 -116.254C121.695 -116.362 121.405 -116.945 121.234 -116.892C119.553 -116.37 118.065 -117.342 116.401 -117C115.223 -118.224 113.495 -117.979 111.949 -118.421C108.985 -119.269 105.831 -117.999 102.801 -119C106.914 -120.842 111.601 -119.61 115.663 -121.679C117.991 -122.865 120.653 -121.763 123.223 -122.523C123.71 -122.667 124.401 -122.869 124.801 -122.2C124.935 -122.335 125.117 -122.574 125.175 -122.546C127.625 -121.389 129.94 -120.115 132.422 -119.049C132.763 -118.903 133.295 -119.135 133.547 -118.933C135.067 -117.717 137.01 -117.82 138.401 -116.6C140.099 -117.102 141.892 -116.722 143.621 -117.346C143.698 -117.373 143.932 -117.032 143.965 -117.054C145.095 -117.802 146.25 -117.531 147.142 -117.227C147.48 -117.112 148.143 -116.865 148.448 -116.791C149.574 -116.515 150.43 -116.035 151.609 -115.852C151.723 -115.834 151.908 -116.174 151.98 -116.146C153.103 -115.708 154.145 -115.764 154.801 -114.6C154.936 -114.735 155.101 -114.973 155.183 -114.946C156.21 -114.608 156.859 -113.853 157.96 -113.612C158.445 -113.506 159.057 -112.88 159.633 -112.704C162.025 -111.973 163.868 -110.444 166.062 -109.549C166.821 -109.239 167.697 -109.005 168.33 -108.509z"/>
319
+ </g>
320
+ <g style="fill: rgb(204, 114, 38);">
321
+ <path d="M91.696 -122.739C89.178 -124.464 86.81 -125.57 84.368 -127.356C84.187 -127.489 83.827 -127.319 83.625 -127.441C82.618 -128.05 81.73 -128.631 80.748 -129.327C80.209 -129.709 79.388 -129.698 78.88 -129.956C76.336 -131.248 73.707 -131.806 71.2 -133C71.882 -133.638 73.004 -133.394 73.6 -134.2C73.795 -133.92 74.033 -133.636 74.386 -133.827C76.064 -134.731 77.914 -134.884 79.59 -134.794C81.294 -134.702 83.014 -134.397 84.789 -134.125C85.096 -134.078 85.295 -133.555 85.618 -133.458C87.846 -132.795 90.235 -133.32 92.354 -132.482C93.945 -131.853 95.515 -131.03 96.754 -129.755C97.006 -129.495 96.681 -129.194 96.401 -129C96.789 -129.109 97.062 -128.903 97.173 -128.59C97.257 -128.351 97.257 -128.049 97.173 -127.81C97.061 -127.498 96.782 -127.397 96.408 -127.346C95.001 -127.156 96.773 -128.536 96.073 -128.088C94.8 -127.274 95.546 -125.868 94.801 -124.6C94.521 -124.794 94.291 -125.012 94.401 -125.4C94.635 -124.878 94.033 -124.588 93.865 -124.272C93.48 -123.547 92.581 -122.132 91.696 -122.739z"/>
322
+ </g>
323
+ <g style="fill: rgb(204, 114, 38);">
324
+ <path d="M59.198 -115.391C56.044 -116.185 52.994 -116.07 49.978 -117.346C49.911 -117.374 49.688 -117.027 49.624 -117.054C48.258 -117.648 47.34 -118.614 46.264 -119.66C45.351 -120.548 43.693 -120.161 42.419 -120.648C42.095 -120.772 41.892 -121.284 41.591 -121.323C40.372 -121.48 39.445 -122.429 38.4 -123C40.736 -123.795 43.147 -123.764 45.609 -124.148C45.722 -124.166 45.867 -123.845 46 -123.845C46.136 -123.845 46.266 -124.066 46.4 -124.2C46.595 -123.92 46.897 -123.594 47.154 -123.848C47.702 -124.388 48.258 -124.198 48.798 -124.158C48.942 -124.148 49.067 -123.845 49.2 -123.845C49.336 -123.845 49.467 -124.156 49.6 -124.156C49.736 -124.155 49.867 -123.845 50 -123.845C50.136 -123.845 50.266 -124.066 50.4 -124.2C51.092 -123.418 51.977 -123.972 52.799 -123.793C53.837 -123.566 54.104 -122.418 55.178 -122.12C59.893 -120.816 64.03 -118.671 68.393 -116.584C68.7 -116.437 68.91 -116.189 68.8 -115.8C69.067 -115.8 69.38 -115.888 69.57 -115.756C70.628 -115.024 71.669 -114.476 72.366 -113.378C72.582 -113.039 72.253 -112.632 72.02 -112.684C67.591 -113.679 63.585 -114.287 59.198 -115.391z"/>
325
+ </g>
326
+ <g style="fill: rgb(204, 114, 38);">
327
+ <path d="M45.338 -71.179C43.746 -72.398 43.162 -74.429 42.034 -76.221C41.82 -76.561 42.094 -76.875 42.411 -76.964C42.971 -77.123 43.514 -76.645 43.923 -76.443C45.668 -75.581 47.203 -74.339 49.2 -74.2C51.19 -71.966 55.45 -71.581 55.457 -68.2C55.458 -67.341 54.03 -68.259 53.6 -67.4C51.149 -68.403 48.76 -68.3 46.38 -69.767C45.763 -70.148 46.093 -70.601 45.338 -71.179z"/>
328
+ </g>
329
+ <g style="fill: rgb(204, 114, 38);">
330
+ <path d="M17.8 -123.756C17.935 -123.755 24.966 -123.522 24.949 -123.408C24.904 -123.099 17.174 -122.05 16.81 -122.22C16.646 -122.296 9.134 -119.866 9 -120C9.268 -120.135 17.534 -123.756 17.8 -123.756z"/>
331
+ </g>
332
+ <g style="fill: rgb(0, 0, 0);">
333
+ <path d="M33.2 -114C33.2 -114 18.4 -112.2 14 -111C9.6 -109.8 -9 -102.2 -12 -100.2C-12 -100.2 -25.4 -94.8 -42.4 -74.8C-42.4 -74.8 -34.8 -78.2 -32.6 -81C-32.6 -81 -19 -93.6 -19.2 -91C-19.2 -91 -7 -99.6 -7.6 -97.4C-7.6 -97.4 16.8 -108.6 14.8 -105.4C14.8 -105.4 36.4 -110 35.4 -108C35.4 -108 54.2 -103.6 51.4 -103.4C51.4 -103.4 45.6 -102.2 52 -98.6C52 -98.6 48.6 -94.2 43.2 -98.2C37.8 -102.2 40.8 -100 35.8 -99C35.8 -99 33.2 -98.2 28.6 -102.2C28.6 -102.2 23 -106.8 14.2 -103.2C14.2 -103.2 -16.4 -90.6 -18.4 -90C-18.4 -90 -22 -87.2 -24.4 -83.6C-24.4 -83.6 -30.2 -79.2 -33.2 -77.8C-33.2 -77.8 -46 -66.2 -47.2 -64.8C-47.2 -64.8 -50.6 -59.6 -51.4 -59.2C-51.4 -59.2 -45 -63 -43 -65C-43 -65 -29 -75 -23.6 -75.8C-23.6 -75.8 -19.2 -78.8 -18.4 -80.2C-18.4 -80.2 -4 -89.4 0.2 -89.4C0.2 -89.4 9.4 -84.2 11.8 -91.2C11.8 -91.2 17.6 -93 23.2 -91.8C23.2 -91.8 26.4 -94.4 25.6 -96.6C25.6 -96.6 27.2 -98.4 28.2 -94.6C28.2 -94.6 31.6 -91 36.4 -93C36.4 -93 40.4 -93.2 38.4 -90.8C38.4 -90.8 34 -87 22.2 -86.8C22.2 -86.8 9.8 -86.2 -6.6 -78.6C-6.6 -78.6 -36.4 -68.2 -45.6 -57.8C-45.6 -57.8 -52 -49 -57.4 -47.8C-57.4 -47.8 -63.2 -47 -69.2 -39.6C-69.2 -39.6 -59.4 -45.4 -50.4 -45.4C-50.4 -45.4 -46.4 -47.8 -50.2 -44.2C-50.2 -44.2 -53.8 -36.6 -52.2 -31.2C-52.2 -31.2 -52.8 -26 -53.6 -24.4C-53.6 -24.4 -61.4 -11.6 -61.4 -9.2C-61.4 -6.8 -60.2 3 -59.8 3.6C-59.4 4.2 -60.8 2 -57 4.4C-53.2 6.8 -50.4 8.4 -49.6 11.2C-48.8 14 -51.6 5.8 -51.8 4C-52 2.2 -56.2 -5 -55.4 -7.4C-55.4 -7.4 -54.4 -6.4 -53.6 -5C-53.6 -5 -54.2 -5.6 -53.6 -9.2C-53.6 -9.2 -52.8 -14.4 -51.4 -17.6C-50 -20.8 -48 -24.6 -47.6 -25.4C-47.2 -26.2 -47.2 -32 -45.8 -29.4L-42.4 -26.8C-42.4 -26.8 -45.2 -29.4 -43 -31.6C-43 -31.6 -44 -37.2 -42.2 -39.8C-42.2 -39.8 -35.2 -48.2 -33.6 -49.2C-32 -50.2 -33.4 -49.8 -33.4 -49.8C-33.4 -49.8 -27.4 -54 -33.2 -52.4C-33.2 -52.4 -37.2 -50.8 -40.2 -50.8C-40.2 -50.8 -47.8 -48.8 -43.8 -53C-39.8 -57.2 -29.8 -62.6 -26 -62.4L-25.2 -60.8L-14 -63.2L-15.2 -62.4C-15.2 -62.4 -15.4 -62.6 -11.2 -63C-7 -63.4 -1.2 -62 0.2 -63.8C1.6 -65.6 5 -66.6 4.6 -65.2C4.2 -63.8 4 -61.8 4 -61.8C4 -61.8 9 -67.6 8.4 -65.4C7.8 -63.2 -0.4 -58 -1.8 -51.8L8.6 -60L12.2 -63C12.2 -63 15.8 -60.8 16 -62.4C16.2 -64 20.8 -69.8 22 -69.6C23.2 -69.4 25.2 -72.2 25 -69.6C24.8 -67 32.4 -61.6 32.4 -61.6C32.4 -61.6 35.6 -63.4 37 -62C38.4 -60.6 42.6 -81.8 42.6 -81.8L67.6 -92.4L111.201 -95.8L94.201 -102.6L33.2 -114z"/>
334
+ </g>
335
+ <g style="stroke: rgb(76, 0, 0); stroke-width: 2;">
336
+ <path d="M51.4 85C51.4 85 36.4 68.2 28 65.6C28 65.6 14.6 58.8 -10 66.6"/>
337
+ </g>
338
+ <g style="stroke: rgb(76, 0, 0); stroke-width: 2;">
339
+ <path d="M24.8 64.2C24.8 64.2 -0.4 56.2 -15.8 60.4C-15.8 60.4 -34.2 62.4 -42.6 76.2"/>
340
+ </g>
341
+ <g style="stroke: rgb(76, 0, 0); stroke-width: 2;">
342
+ <path d="M21.2 63C21.2 63 4.2 55.8 -10.6 53.6C-10.6 53.6 -27.2 51 -43.8 58.2C-43.8 58.2 -56 64.2 -61.4 74.4"/>
343
+ </g>
344
+ <g style="stroke: rgb(76, 0, 0); stroke-width: 2;">
345
+ <path d="M22.2 63.4C22.2 63.4 6.8 52.4 5.8 51C5.8 51 -1.2 40 -14.2 39.6C-14.2 39.6 -35.6 40.4 -52.8 48.4"/>
346
+ </g>
347
+ <g style="fill: rgb(0, 0, 0);">
348
+ <path d="M20.895 54.407C22.437 55.87 49.4 84.8 49.4 84.8C84.6 121.401 56.6 87.2 56.6 87.2C49 82.4 39.8 63.6 39.8 63.6C38.6 60.8 53.8 70.8 53.8 70.8C57.8 71.6 71.4 90.8 71.4 90.8C64.6 88.4 69.4 95.6 69.4 95.6C72.2 97.6 92.601 113.201 92.601 113.201C96.201 117.201 100.201 118.801 100.201 118.801C114.201 113.601 107.801 126.801 107.801 126.801C110.201 133.601 115.801 122.001 115.801 122.001C127.001 105.2 110.601 107.601 110.601 107.601C80.6 110.401 73.8 94.4 73.8 94.4C71.4 92 80.2 94.4 80.2 94.4C88.601 96.4 73 82 73 82C75.4 82 84.6 88.8 84.6 88.8C95.001 98 97.001 96 97.001 96C115.001 87.2 125.401 94.8 125.401 94.8C127.401 96.4 121.801 103.2 123.401 108.401C125.001 113.601 129.801 126.001 129.801 126.001C127.401 127.601 127.801 138.401 127.801 138.401C144.601 161.601 135.001 159.601 135.001 159.601C119.401 159.201 134.201 166.801 134.201 166.801C137.401 168.801 146.201 176.001 146.201 176.001C143.401 174.801 141.801 180.001 141.801 180.001C146.601 184.001 143.801 188.801 143.801 188.801C137.801 190.001 136.601 194.001 136.601 194.001C143.401 202.001 133.401 202.401 133.401 202.401C137.001 206.801 132.201 218.801 132.201 218.801C127.401 218.801 121.001 224.401 121.001 224.401C123.401 229.201 113.001 234.801 113.001 234.801C104.601 236.401 107.401 243.201 107.401 243.201C99.401 249.201 97.001 265.201 97.001 265.201C96.201 275.601 93.801 278.801 99.001 276.801C104.201 274.801 103.401 262.401 103.401 262.401C98.601 246.801 141.401 230.801 141.401 230.801C145.401 229.201 146.201 224.001 146.201 224.001C148.201 224.401 157.001 232.001 157.001 232.001C164.601 243.201 165.001 234.001 165.001 234.001C166.201 230.401 164.601 224.401 164.601 224.401C170.601 202.801 156.601 196.401 156.601 196.401C146.601 162.801 160.601 171.201 160.601 171.201C163.401 176.801 174.201 182.001 174.201 182.001L177.801 179.601C176.201 174.801 184.601 168.801 184.601 168.801C187.401 175.201 193.401 167.201 193.401 167.201C197.001 142.801 209.401 157.201 209.401 157.201C213.401 158.401 214.601 151.601 214.601 151.601C218.201 141.201 214.601 127.601 214.601 127.601C218.201 127.201 227.801 133.201 227.801 133.201C230.601 129.601 221.401 112.801 225.401 115.201C229.401 117.601 233.801 119.201 233.801 119.201C234.601 117.201 224.601 104.801 224.601 104.801C220.201 102 215.001 81.6 215.001 81.6C222.201 85.2 212.201 70 212.201 70C212.201 66.8 218.201 55.6 218.201 55.6C217.401 48.8 218.201 49.2 218.201 49.2C221.001 50.4 229.001 52 222.201 45.6C215.401 39.2 223.001 34.4 223.001 34.4C227.401 31.6 213.801 32 213.801 32C208.601 27.6 209.001 23.6 209.001 23.6C217.001 25.6 202.601 11.2 200.201 7.6C197.801 4 207.401 -1.2 207.401 -1.2C220.601 -4.8 209.001 -8 209.001 -8C189.401 -7.6 200.201 -18.4 200.201 -18.4C206.201 -18 204.601 -20.4 204.601 -20.4C199.401 -21.6 189.801 -28 189.801 -28C185.801 -31.6 189.401 -30.8 189.401 -30.8C206.201 -29.6 177.401 -40.8 177.401 -40.8C185.401 -40.8 167.401 -51.2 167.401 -51.2C165.401 -52.8 162.201 -60.4 162.201 -60.4C156.201 -65.6 151.401 -72.4 151.401 -72.4C151.001 -76.8 146.201 -81.6 146.201 -81.6C134.601 -95.2 129.001 -94.8 129.001 -94.8C114.201 -98.4 109.001 -97.6 109.001 -97.6L56.2 -93.2C29.8 -80.4 37.6 -59.4 37.6 -59.4C44 -51 53.2 -54.8 53.2 -54.8C57.8 -61 69.4 -58.8 69.4 -58.8C89.801 -55.6 87.201 -59.2 87.201 -59.2C84.801 -63.8 68.6 -70 68.4 -70.6C68.2 -71.2 59.4 -74.6 59.4 -74.6C56.4 -75.8 52 -85 52 -85C48.8 -88.4 64.6 -82.6 64.6 -82.6C63.4 -81.6 70.8 -77.6 70.8 -77.6C88.201 -78.6 98.801 -67.8 98.801 -67.8C109.601 -51.2 109.801 -59.4 109.801 -59.4C112.601 -68.8 100.801 -90 100.801 -90C101.201 -92 109.401 -85.4 109.401 -85.4C110.801 -87.4 111.601 -81.6 111.601 -81.6C111.801 -79.2 115.601 -71.2 115.601 -71.2C118.401 -58.2 122.001 -65.6 122.001 -65.6L126.601 -56.2C128.001 -53.6 122.001 -46 122.001 -46C121.801 -43.2 122.601 -43.4 117.001 -35.8C111.401 -28.2 114.801 -23.8 114.801 -23.8C113.401 -17.2 122.201 -17.6 122.201 -17.6C124.801 -15.4 128.201 -15.4 128.201 -15.4C130.001 -13.4 132.401 -14 132.401 -14C134.001 -17.8 140.201 -15.8 140.201 -15.8C141.601 -18.2 149.801 -18.6 149.801 -18.6C150.801 -21.2 151.201 -22.8 154.601 -23.4C158.001 -24 133.401 -67 133.401 -67C139.801 -67.8 131.601 -80.2 131.601 -80.2C129.401 -86.8 140.801 -72.2 143.001 -70.8C145.201 -69.4 146.201 -67.2 144.601 -67.4C143.001 -67.6 141.201 -65.4 142.601 -65.2C144.001 -65 157.001 -50 160.401 -39.8C163.801 -29.6 169.801 -25.6 176.001 -19.6C182.201 -13.6 181.401 10.6 181.401 10.6C181.001 19.4 187.001 30 187.001 30C189.001 33.8 184.801 52 184.801 52C182.801 54.2 184.201 55 184.201 55C185.201 56.2 192.001 69.4 192.001 69.4C190.201 69.2 193.801 72.8 193.801 72.8C199.001 78.8 192.601 75.8 192.601 75.8C186.601 74.2 193.601 84 193.601 84C194.801 85.8 185.801 81.2 185.801 81.2C176.601 80.6 188.201 87.8 188.201 87.8C196.801 95 185.401 90.6 185.401 90.6C180.801 88.8 184.001 95.6 184.001 95.6C187.201 97.2 204.401 104.2 204.401 104.2C204.801 108.001 201.801 113.001 201.801 113.001C202.201 117.001 200.001 120.401 200.001 120.401C198.801 128.601 198.201 129.401 198.201 129.401C194.001 129.601 186.601 143.401 186.601 143.401C184.801 146.001 174.601 158.001 174.601 158.001C172.601 165.001 154.601 157.801 154.601 157.801C148.001 161.201 150.001 157.801 150.001 157.801C149.601 155.601 154.401 149.601 154.401 149.601C161.401 147.001 158.801 136.201 158.801 136.201C162.801 134.801 151.601 132.001 151.801 130.801C152.001 129.601 157.801 128.201 157.801 128.201C165.801 126.201 161.401 123.801 161.401 123.801C160.801 119.801 163.801 114.201 163.801 114.201C175.401 113.401 163.801 97.2 163.801 97.2C153.001 89.6 152.001 83.8 152.001 83.8C164.601 75.6 156.401 63.2 156.601 59.6C156.801 56 158.001 34.4 158.001 34.4C156.001 28.2 153.001 14.6 153.001 14.6C155.201 9.4 162.601 -3.2 162.601 -3.2C165.401 -7.4 174.201 -12.2 172.001 -15.2C169.801 -18.2 162.001 -16.4 162.001 -16.4C154.201 -17.8 154.801 -12.6 154.801 -12.6C153.201 -11.6 152.401 -6.6 152.401 -6.6C151.68 1.333 142.801 7.6 142.801 7.6C131.601 13.8 140.801 17.8 140.801 17.8C146.801 24.4 137.001 24.6 137.001 24.6C126.001 22.8 134.201 33 134.201 33C145.001 45.8 142.001 48.6 142.001 48.6C131.801 49.6 144.401 58.8 144.401 58.8C144.401 58.8 143.601 56.8 143.801 58.6C144.001 60.4 147.001 64.6 147.801 66.6C148.601 68.6 144.601 68.8 144.601 68.8C145.201 78.4 129.801 74.2 129.801 74.2C129.801 74.2 129.801 74.2 128.201 74.4C126.601 74.6 115.401 73.8 109.601 71.6C103.801 69.4 97.001 69.4 97.001 69.4C97.001 69.4 93.001 71.2 85.4 71C77.8 70.8 69.8 73.6 69.8 73.6C65.4 73.2 74 68.8 74.2 69C74.4 69.2 80 63.6 72 64.2C50.203 65.835 39.4 55.6 39.4 55.6C37.4 54.2 34.8 51.4 34.8 51.4C24.8 49.4 36.2 63.8 36.2 63.8C37.4 65.2 36 66.2 36 66.2C35.2 64.6 27.4 59.2 27.4 59.2C24.589 58.227 23.226 56.893 20.895 54.407z"/>
349
+ </g>
350
+ <g style="fill: rgb(76, 0, 0);">
351
+ <path d="M-3 42.8C-3 42.8 8.6 48.4 11.2 51.2C13.8 54 27.8 65.4 27.8 65.4C27.8 65.4 22.4 63.4 19.8 61.6C17.2 59.8 6.4 51.6 6.4 51.6C6.4 51.6 2.6 45.6 -3 42.8z"/>
352
+ </g>
353
+ <g style="fill: rgb(153, 204, 50);">
354
+ <path d="M-61.009 11.603C-60.672 11.455 -61.196 8.743 -61.4 8.2C-62.422 5.474 -71.4 4 -71.4 4C-71.627 5.365 -71.682 6.961 -71.576 8.599C-71.576 8.599 -66.708 14.118 -61.009 11.603z"/>
355
+ </g>
356
+ <g style="fill: rgb(101, 153, 0);">
357
+ <path d="M-61.009 11.403C-61.458 11.561 -61.024 8.669 -61.2 8.2C-62.222 5.474 -71.4 3.9 -71.4 3.9C-71.627 5.265 -71.682 6.861 -71.576 8.499C-71.576 8.499 -67.308 13.618 -61.009 11.403z"/>
358
+ </g>
359
+ <g style="fill: rgb(0, 0, 0);">
360
+ <path d="M-65.4 11.546C-66.025 11.546 -66.531 10.406 -66.531 9C-66.531 7.595 -66.025 6.455 -65.4 6.455C-64.775 6.455 -64.268 7.595 -64.268 9C-64.268 10.406 -64.775 11.546 -65.4 11.546z"/>
361
+ </g>
362
+ <g style="fill: rgb(0, 0, 0);">
363
+ <path d="M-65.4 9z"/>
364
+ </g>
365
+ <g style="fill: rgb(0, 0, 0);">
366
+ <path d="M-111 109.601C-111 109.601 -116.6 119.601 -91.8 113.601C-91.8 113.601 -77.8 112.401 -75.4 110.001C-74.2 110.801 -65.834 113.734 -63 114.401C-56.2 116.001 -47.8 106 -47.8 106C-47.8 106 -43.2 95.5 -40.4 95.5C-37.6 95.5 -40.8 97.1 -40.8 97.1C-40.8 97.1 -47.4 107.201 -47 108.801C-47 108.801 -52.2 128.801 -68.2 129.601C-68.2 129.601 -84.35 130.551 -83 136.401C-83 136.401 -74.2 134.001 -71.8 136.401C-71.8 136.401 -61 136.001 -69 142.401L-75.8 154.001C-75.8 154.001 -75.66 157.919 -85.8 154.401C-95.6 151.001 -105.9 138.101 -105.9 138.101C-105.9 138.101 -121.85 123.551 -111 109.601z"/>
367
+ </g>
368
+ <g style="fill: rgb(229, 153, 153);">
369
+ <path d="M-112.2 113.601C-112.2 113.601 -114.2 123.201 -77.4 112.801C-77.4 112.801 -73 112.801 -70.6 113.601C-68.2 114.401 -56.2 117.201 -54.2 116.001C-54.2 116.001 -61.4 129.601 -73 128.001C-73 128.001 -86.2 129.601 -85.8 134.401C-85.8 134.401 -81.8 141.601 -77 144.001C-77 144.001 -74.2 146.401 -74.6 149.601C-75 152.801 -77.8 154.401 -79.8 155.201C-81.8 156.001 -85 152.801 -86.6 152.801C-88.2 152.801 -96.6 146.401 -101 141.601C-105.4 136.801 -113.8 124.801 -113.4 122.001C-113 119.201 -112.2 113.601 -112.2 113.601z"/>
370
+ </g>
371
+ <g style="fill: rgb(178, 101, 101);">
372
+ <path d="M-109 131.051C-106.4 135.001 -103.2 139.201 -101 141.601C-96.6 146.401 -88.2 152.801 -86.6 152.801C-85 152.801 -81.8 156.001 -79.8 155.201C-77.8 154.401 -75 152.801 -74.6 149.601C-74.2 146.401 -77 144.001 -77 144.001C-80.066 142.468 -82.806 138.976 -84.385 136.653C-84.385 136.653 -84.2 139.201 -89.4 138.401C-94.6 137.601 -99.8 134.801 -101.4 131.601C-103 128.401 -105.4 126.001 -103.8 129.601C-102.2 133.201 -99.8 136.801 -98.2 137.201C-96.6 137.601 -97 138.801 -99.4 138.401C-101.8 138.001 -104.6 137.601 -109 132.401z"/>
373
+ </g>
374
+ <g style="fill: rgb(153, 38, 0);">
375
+ <path d="M-111.6 110.001C-111.6 110.001 -109.8 96.4 -108.6 92.4C-108.6 92.4 -109.4 85.6 -107 81.4C-104.6 77.2 -102.6 71 -99.6 65.6C-96.6 60.2 -96.4 56.2 -92.4 54.6C-88.4 53 -82.4 44.4 -79.6 43.4C-76.8 42.4 -77 43.2 -77 43.2C-77 43.2 -70.2 28.4 -56.6 32.4C-56.6 32.4 -72.8 29.6 -57 20.2C-57 20.2 -61.8 21.3 -58.5 14.3C-56.299 9.632 -56.8 16.4 -67.8 28.2C-67.8 28.2 -72.8 36.8 -78 39.8C-83.2 42.8 -95.2 49.8 -96.4 53.6C-97.6 57.4 -100.8 63.2 -102.8 64.8C-104.8 66.4 -107.6 70.6 -108 74C-108 74 -109.2 78 -110.6 79.2C-112 80.4 -112.2 83.6 -112.2 85.6C-112.2 87.6 -114.2 90.4 -114 92.8C-114 92.8 -113.2 111.801 -113.6 113.801L-111.6 110.001z"/>
376
+ </g>
377
+ <g style="fill: rgb(255, 255, 255);">
378
+ <path d="M-120.2 114.601C-120.2 114.601 -122.2 113.201 -126.6 119.201C-126.6 119.201 -119.3 152.201 -119.3 153.601C-119.3 153.601 -118.2 151.501 -119.5 144.301C-120.8 137.101 -121.7 124.401 -121.7 124.401L-120.2 114.601z"/>
379
+ </g>
380
+ <g style="fill: rgb(153, 38, 0);">
381
+ <path d="M-98.6 54C-98.6 54 -116.2 57.2 -115.8 86.4L-116.6 111.201C-116.6 111.201 -117.8 85.6 -119 84C-120.2 82.4 -116.2 71.2 -119.4 77.2C-119.4 77.2 -133.4 91.2 -125.4 112.401C-125.4 112.401 -123.9 115.701 -126.9 111.101C-126.9 111.101 -131.5 98.5 -130.4 92.1C-130.4 92.1 -130.2 89.9 -128.3 87.1C-128.3 87.1 -119.7 75.4 -117 73.1C-117 73.1 -115.2 58.7 -99.8 53.5C-99.8 53.5 -94.1 51.2 -98.6 54z"/>
382
+ </g>
383
+ <g style="fill: rgb(0, 0, 0);">
384
+ <path d="M40.8 -12.2C41.46 -12.554 41.451 -13.524 42.031 -13.697C43.18 -14.041 43.344 -15.108 43.862 -15.892C44.735 -17.211 44.928 -18.744 45.51 -20.235C45.782 -20.935 45.809 -21.89 45.496 -22.55C44.322 -25.031 43.62 -27.48 42.178 -29.906C41.91 -30.356 41.648 -31.15 41.447 -31.748C40.984 -33.132 39.727 -34.123 38.867 -35.443C38.579 -35.884 39.104 -36.809 38.388 -36.893C37.491 -36.998 36.042 -37.578 35.809 -36.552C35.221 -33.965 36.232 -31.442 37.2 -29C36.418 -28.308 36.752 -27.387 36.904 -26.62C37.614 -23.014 36.416 -19.662 35.655 -16.188C35.632 -16.084 35.974 -15.886 35.946 -15.824C34.724 -13.138 33.272 -10.693 31.453 -8.312C30.695 -7.32 29.823 -6.404 29.326 -5.341C28.958 -4.554 28.55 -3.588 28.8 -2.6C25.365 0.18 23.115 4.025 20.504 7.871C20.042 8.551 20.333 9.76 20.884 10.029C21.697 10.427 22.653 9.403 23.123 8.557C23.512 7.859 23.865 7.209 24.356 6.566C24.489 6.391 24.31 5.972 24.445 5.851C27.078 3.504 28.747 0.568 31.2 -1.8C33.15 -2.129 34.687 -3.127 36.435 -4.14C36.743 -4.319 37.267 -4.07 37.557 -4.265C39.31 -5.442 39.308 -7.478 39.414 -9.388C39.464 -10.272 39.66 -11.589 40.8 -12.2z"/>
385
+ </g>
386
+ <g style="fill: rgb(0, 0, 0);">
387
+ <path d="M31.959 -16.666C32.083 -16.743 31.928 -17.166 32.037 -17.382C32.199 -17.706 32.602 -17.894 32.764 -18.218C32.873 -18.434 32.71 -18.814 32.846 -18.956C35.179 -21.403 35.436 -24.427 34.4 -27.4C35.424 -28.02 35.485 -29.282 35.06 -30.129C34.207 -31.829 34.014 -33.755 33.039 -35.298C32.237 -36.567 30.659 -37.811 29.288 -36.508C28.867 -36.108 28.546 -35.321 28.824 -34.609C28.888 -34.446 29.173 -34.3 29.146 -34.218C29.039 -33.894 28.493 -33.67 28.487 -33.398C28.457 -31.902 27.503 -30.391 28.133 -29.062C28.905 -27.433 29.724 -25.576 30.4 -23.8C29.166 -21.684 30.199 -19.235 28.446 -17.358C28.31 -17.212 28.319 -16.826 28.441 -16.624C28.733 -16.138 29.139 -15.732 29.625 -15.44C29.827 -15.319 30.175 -15.317 30.375 -15.441C30.953 -15.803 31.351 -16.29 31.959 -16.666z"/>
388
+ </g>
389
+ <g style="fill: rgb(0, 0, 0);">
390
+ <path d="M94.771 -26.977C96.16 -25.185 96.45 -22.39 94.401 -21C94.951 -17.691 98.302 -19.67 100.401 -20.2C100.292 -20.588 100.519 -20.932 100.802 -20.937C101.859 -20.952 102.539 -21.984 103.601 -21.8C104.035 -23.357 105.673 -24.059 106.317 -25.439C108.043 -29.134 107.452 -33.407 104.868 -36.653C104.666 -36.907 104.883 -37.424 104.759 -37.786C104.003 -39.997 101.935 -40.312 100.001 -41C98.824 -44.875 98.163 -48.906 96.401 -52.6C94.787 -52.85 94.089 -54.589 92.752 -55.309C91.419 -56.028 90.851 -54.449 90.892 -53.403C90.899 -53.198 91.351 -52.974 91.181 -52.609C91.105 -52.445 90.845 -52.334 90.845 -52.2C90.846 -52.065 91.067 -51.934 91.201 -51.8C90.283 -50.98 88.86 -50.503 88.565 -49.358C87.611 -45.648 90.184 -42.523 91.852 -39.322C92.443 -38.187 91.707 -36.916 90.947 -35.708C90.509 -35.013 90.617 -33.886 90.893 -33.03C91.645 -30.699 93.236 -28.96 94.771 -26.977z"/>
391
+ </g>
392
+ <g style="fill: rgb(0, 0, 0);">
393
+ <path d="M57.611 -8.591C56.124 -6.74 52.712 -4.171 55.629 -2.243C55.823 -2.114 56.193 -2.11 56.366 -2.244C58.387 -3.809 60.39 -4.712 62.826 -5.294C62.95 -5.323 63.224 -4.856 63.593 -5.017C65.206 -5.72 67.216 -5.662 68.4 -7C72.167 -6.776 75.732 -7.892 79.123 -9.2C80.284 -9.648 81.554 -10.207 82.755 -10.709C84.131 -11.285 85.335 -12.213 86.447 -13.354C86.58 -13.49 86.934 -13.4 87.201 -13.4C87.161 -14.263 88.123 -14.39 88.37 -15.012C88.462 -15.244 88.312 -15.64 88.445 -15.742C90.583 -17.372 91.503 -19.39 90.334 -21.767C90.049 -22.345 89.8 -22.963 89.234 -23.439C88.149 -24.35 87.047 -23.496 86 -23.8C85.841 -23.172 85.112 -23.344 84.726 -23.146C83.867 -22.707 82.534 -23.292 81.675 -22.854C80.313 -22.159 79.072 -21.99 77.65 -21.613C77.338 -21.531 76.56 -21.627 76.4 -21C76.266 -21.134 76.118 -21.368 76.012 -21.346C74.104 -20.95 72.844 -20.736 71.543 -19.044C71.44 -18.911 70.998 -19.09 70.839 -18.955C69.882 -18.147 69.477 -16.913 68.376 -16.241C68.175 -16.118 67.823 -16.286 67.629 -16.157C66.983 -15.726 66.616 -15.085 65.974 -14.638C65.645 -14.409 65.245 -14.734 65.277 -14.99C65.522 -16.937 66.175 -18.724 65.6 -20.6C67.677 -23.12 70.194 -25.069 72 -27.8C72.015 -29.966 72.707 -32.112 72.594 -34.189C72.584 -34.382 72.296 -35.115 72.17 -35.462C71.858 -36.316 72.764 -37.382 71.92 -38.106C70.516 -39.309 69.224 -38.433 68.4 -37C66.562 -36.61 64.496 -35.917 62.918 -37.151C61.911 -37.938 61.333 -38.844 60.534 -39.9C59.549 -41.202 59.884 -42.638 59.954 -44.202C59.96 -44.33 59.645 -44.466 59.645 -44.6C59.646 -44.735 59.866 -44.866 60 -45C59.294 -45.626 59.019 -46.684 58 -47C58.305 -48.092 57.629 -48.976 56.758 -49.278C54.763 -49.969 53.086 -48.057 51.194 -47.984C50.68 -47.965 50.213 -49.003 49.564 -49.328C49.132 -49.544 48.428 -49.577 48.066 -49.311C47.378 -48.807 46.789 -48.693 46.031 -48.488C44.414 -48.052 43.136 -46.958 41.656 -46.103C40.171 -45.246 39.216 -43.809 38.136 -42.489C37.195 -41.337 37.059 -38.923 38.479 -38.423C40.322 -37.773 41.626 -40.476 43.592 -40.15C43.904 -40.099 44.11 -39.788 44 -39.4C44.389 -39.291 44.607 -39.52 44.8 -39.8C45.658 -38.781 46.822 -38.444 47.76 -37.571C48.73 -36.667 50.476 -37.085 51.491 -36.088C53.02 -34.586 52.461 -31.905 54.4 -30.6C53.814 -29.287 53.207 -28.01 52.872 -26.583C52.59 -25.377 53.584 -24.18 54.795 -24.271C56.053 -24.365 56.315 -25.124 56.8 -26.2C57.067 -25.933 57.536 -25.636 57.495 -25.42C57.038 -23.033 56.011 -21.04 55.553 -18.609C55.494 -18.292 55.189 -18.09 54.8 -18.2C54.332 -14.051 50.28 -11.657 47.735 -8.492C47.332 -7.99 47.328 -6.741 47.737 -6.338C49.14 -4.951 51.1 -6.497 52.8 -7C53.013 -8.206 53.872 -9.148 55.204 -9.092C55.46 -9.082 55.695 -9.624 56.019 -9.754C56.367 -9.892 56.869 -9.668 57.155 -9.866C58.884 -11.061 60.292 -12.167 62.03 -13.356C62.222 -13.487 62.566 -13.328 62.782 -13.436C63.107 -13.598 63.294 -13.985 63.617 -14.17C63.965 -14.37 64.207 -14.08 64.4 -13.8C63.754 -13.451 63.75 -12.494 63.168 -12.292C62.393 -12.024 61.832 -11.511 61.158 -11.064C60.866 -10.871 60.207 -11.119 60.103 -10.94C59.505 -9.912 58.321 -9.474 57.611 -8.591z"/>
394
+ </g>
395
+ <g style="fill: rgb(0, 0, 0);">
396
+ <path d="M2.2 -58C2.2 -58 -7.038 -60.872 -18.2 -35.2C-18.2 -35.2 -20.6 -30 -23 -28C-25.4 -26 -36.6 -22.4 -38.6 -18.4L-49 -2.4C-49 -2.4 -34.2 -18.4 -31 -20.8C-31 -20.8 -23 -29.2 -26.2 -22.4C-26.2 -22.4 -40.2 -11.6 -39 -2.4C-39 -2.4 -44.6 12 -45.4 14C-45.4 14 -29.4 -18 -27 -19.2C-24.6 -20.4 -23.4 -20.4 -24.6 -16.8C-25.8 -13.2 -26.2 3.2 -29 5.2C-29 5.2 -21 -15.2 -21.8 -18.4C-21.8 -18.4 -18.6 -22 -16.2 -16.8L-17.4 -0.8L-13 11.2C-13 11.2 -15.4 0 -13.8 -15.6C-13.8 -15.6 -15.8 -26 -11.8 -20.4C-7.8 -14.8 1.8 -8.8 1.8 -4C1.8 -4 -3.4 -21.6 -12.6 -26.4L-16.6 -20.4L-17.8 -22.4C-17.8 -22.4 -21.4 -23.2 -17 -30C-12.6 -36.8 -13 -37.6 -13 -37.6C-13 -37.6 -6.6 -30.4 -5 -30.4C-5 -30.4 8.2 -38 9.4 -13.6C9.4 -13.6 16.2 -28 7 -34.8C7 -34.8 -7.8 -36.8 -6.6 -42L0.6 -54.4C4.2 -59.6 2.6 -56.8 2.6 -56.8z"/>
397
+ </g>
398
+ <g style="fill: rgb(0, 0, 0);">
399
+ <path d="M-17.8 -41.6C-17.8 -41.6 -30.6 -41.6 -33.8 -36.4L-41 -26.8C-41 -26.8 -23.8 -36.8 -19.8 -38C-15.8 -39.2 -17.8 -41.6 -17.8 -41.6z"/>
400
+ </g>
401
+ <g style="fill: rgb(0, 0, 0);">
402
+ <path d="M-57.8 -35.2C-57.8 -35.2 -59.8 -34 -60.2 -31.2C-60.6 -28.4 -63 -28 -62.2 -25.2C-61.4 -22.4 -59.4 -20 -59.4 -24C-59.4 -28 -57.8 -30 -57 -31.2C-56.2 -32.4 -54.6 -36.8 -57.8 -35.2z"/>
403
+ </g>
404
+ <g style="fill: rgb(0, 0, 0);">
405
+ <path d="M-66.6 26C-66.6 26 -75 22 -78.2 18.4C-81.4 14.8 -80.948 19.966 -85.8 19.6C-91.647 19.159 -90.6 3.2 -90.6 3.2L-94.6 10.8C-94.6 10.8 -95.8 25.2 -87.8 22.8C-83.893 21.628 -82.6 23.2 -84.2 24C-85.8 24.8 -78.6 25.2 -81.4 26.8C-84.2 28.4 -69.8 23.2 -72.2 33.6L-66.6 26z"/>
406
+ </g>
407
+ <g style="fill: rgb(0, 0, 0);">
408
+ <path d="M-79.2 40.4C-79.2 40.4 -94.6 44.8 -98.2 35.2C-98.2 35.2 -103 37.6 -100.8 40.6C-98.6 43.6 -97.4 44 -97.4 44C-97.4 44 -92 45.2 -92.6 46C-93.2 46.8 -95.6 50.2 -95.6 50.2C-95.6 50.2 -85.4 44.2 -79.2 40.4z"/>
409
+ </g>
410
+ <g style="fill: rgb(255, 255, 255);">
411
+ <path d="M149.201 118.601C148.774 120.735 147.103 121.536 145.201 122.201C143.284 121.243 140.686 118.137 138.801 120.201C138.327 119.721 137.548 119.661 137.204 118.999C136.739 118.101 137.011 117.055 136.669 116.257C136.124 114.985 135.415 113.619 135.601 112.201C137.407 111.489 138.002 109.583 137.528 107.82C137.459 107.563 137.03 107.366 137.23 107.017C137.416 106.694 137.734 106.467 138.001 106.2C137.866 106.335 137.721 106.568 137.61 106.548C137 106.442 137.124 105.805 137.254 105.418C137.839 103.672 139.853 103.408 141.201 104.6C141.457 104.035 141.966 104.229 142.401 104.2C142.351 103.621 142.759 103.094 142.957 102.674C143.475 101.576 145.104 102.682 145.901 102.07C146.977 101.245 148.04 100.546 149.118 101.149C150.927 102.162 152.636 103.374 153.835 105.115C154.41 105.949 154.65 107.23 154.592 108.188C154.554 108.835 153.173 108.483 152.83 109.412C152.185 111.16 154.016 111.679 154.772 113.017C154.97 113.366 154.706 113.67 154.391 113.768C153.98 113.896 153.196 113.707 153.334 114.16C154.306 117.353 151.55 118.031 149.201 118.601z"/>
412
+ </g>
413
+ <g style="fill: rgb(255, 255, 255);">
414
+ <path d="M139.6 138.201C139.593 136.463 137.992 134.707 139.201 133.001C139.336 133.135 139.467 133.356 139.601 133.356C139.736 133.356 139.867 133.135 140.001 133.001C141.496 135.217 145.148 136.145 145.006 138.991C144.984 139.438 143.897 140.356 144.801 141.001C142.988 142.349 142.933 144.719 142.001 146.601C140.763 146.315 139.551 145.952 138.401 145.401C138.753 143.915 138.636 142.231 139.456 140.911C139.89 140.213 139.603 139.134 139.6 138.201z"/>
415
+ </g>
416
+ <g style="fill: rgb(204, 204, 204);">
417
+ <path d="M-26.6 129.201C-26.6 129.201 -43.458 139.337 -29.4 124.001C-20.6 114.401 -10.6 108.801 -10.6 108.801C-10.6 108.801 -0.2 104.4 3.4 103.2C7 102 22.2 96.8 25.4 96.4C28.6 96 38.2 92 45 96C51.8 100 59.8 104.4 59.8 104.4C59.8 104.4 43.4 96 39.8 98.4C36.2 100.8 29 100.4 23 103.6C23 103.6 8.2 108.001 5 110.001C1.8 112.001 -8.6 123.601 -10.2 122.801C-11.8 122.001 -9.8 121.601 -8.6 118.801C-7.4 116.001 -9.4 114.401 -17.4 120.801C-25.4 127.201 -26.6 129.201 -26.6 129.201z"/>
418
+ </g>
419
+ <g style="fill: rgb(0, 0, 0);">
420
+ <path d="M-19.195 123.234C-19.195 123.234 -17.785 110.194 -9.307 111.859C-9.307 111.859 -1.081 107.689 1.641 105.721C1.641 105.721 9.78 104.019 11.09 103.402C29.569 94.702 44.288 99.221 44.835 98.101C45.381 96.982 65.006 104.099 68.615 108.185C69.006 108.628 58.384 102.588 48.686 100.697C40.413 99.083 18.811 100.944 7.905 106.48C4.932 107.989 -4.013 113.773 -6.544 113.662C-9.075 113.55 -19.195 123.234 -19.195 123.234z"/>
421
+ </g>
422
+ <g style="fill: rgb(204, 204, 204);">
423
+ <path d="M-23 148.801C-23 148.801 -38.2 146.401 -21.4 144.801C-21.4 144.801 -3.4 142.801 0.6 137.601C0.6 137.601 14.2 128.401 17 128.001C19.8 127.601 49.8 120.401 50.2 118.001C50.6 115.601 56.2 115.601 57.8 116.401C59.4 117.201 58.6 118.401 55.8 119.201C53 120.001 21.8 136.401 15.4 137.601C9 138.801 -2.6 146.401 -7.4 147.601C-12.2 148.801 -23 148.801 -23 148.801z"/>
424
+ </g>
425
+ <g style="fill: rgb(0, 0, 0);">
426
+ <path d="M-3.48 141.403C-3.48 141.403 -12.062 140.574 -3.461 139.755C-3.461 139.755 5.355 136.331 7.403 133.668C7.403 133.668 14.367 128.957 15.8 128.753C17.234 128.548 31.194 124.861 31.399 123.633C31.604 122.404 65.67 109.823 70.09 113.013C73.001 115.114 63.1 113.437 53.466 117.847C52.111 118.467 18.258 133.054 14.981 133.668C11.704 134.283 5.765 138.174 3.307 138.788C0.85 139.403 -3.48 141.403 -3.48 141.403z"/>
427
+ </g>
428
+ <g style="fill: rgb(0, 0, 0);">
429
+ <path d="M-11.4 143.601C-11.4 143.601 -6.2 143.201 -7.4 144.801C-8.6 146.401 -11 145.601 -11 145.601L-11.4 143.601z"/>
430
+ </g>
431
+ <g style="fill: rgb(0, 0, 0);">
432
+ <path d="M-18.6 145.201C-18.6 145.201 -13.4 144.801 -14.6 146.401C-15.8 148.001 -18.2 147.201 -18.2 147.201L-18.6 145.201z"/>
433
+ </g>
434
+ <g style="fill: rgb(0, 0, 0);">
435
+ <path d="M-29 146.801C-29 146.801 -23.8 146.401 -25 148.001C-26.2 149.601 -28.6 148.801 -28.6 148.801L-29 146.801z"/>
436
+ </g>
437
+ <g style="fill: rgb(0, 0, 0);">
438
+ <path d="M-36.6 147.601C-36.6 147.601 -31.4 147.201 -32.6 148.801C-33.8 150.401 -36.2 149.601 -36.2 149.601L-36.6 147.601z"/>
439
+ </g>
440
+ <g style="fill: rgb(0, 0, 0);">
441
+ <path d="M1.8 108.001C1.8 108.001 6.2 108.001 5 109.601C3.8 111.201 0.6 110.801 0.6 110.801L1.8 108.001z"/>
442
+ </g>
443
+ <g style="fill: rgb(0, 0, 0);">
444
+ <path d="M-8.2 113.601C-8.2 113.601 -1.694 111.46 -4.2 114.801C-5.4 116.401 -7.8 115.601 -7.8 115.601L-8.2 113.601z"/>
445
+ </g>
446
+ <g style="fill: rgb(0, 0, 0);">
447
+ <path d="M-19.4 118.401C-19.4 118.401 -14.2 118.001 -15.4 119.601C-16.6 121.201 -19 120.401 -19 120.401L-19.4 118.401z"/>
448
+ </g>
449
+ <g style="fill: rgb(0, 0, 0);">
450
+ <path d="M-27 124.401C-27 124.401 -21.8 124.001 -23 125.601C-24.2 127.201 -26.6 126.401 -26.6 126.401L-27 124.401z"/>
451
+ </g>
452
+ <g style="fill: rgb(0, 0, 0);">
453
+ <path d="M-33.8 129.201C-33.8 129.201 -28.6 128.801 -29.8 130.401C-31 132.001 -33.4 131.201 -33.4 131.201L-33.8 129.201z"/>
454
+ </g>
455
+ <g style="fill: rgb(0, 0, 0);">
456
+ <path d="M5.282 135.598C5.282 135.598 12.203 135.066 10.606 137.195C9.009 139.325 5.814 138.26 5.814 138.26L5.282 135.598z"/>
457
+ </g>
458
+ <g style="fill: rgb(0, 0, 0);">
459
+ <path d="M15.682 130.798C15.682 130.798 22.603 130.266 21.006 132.395C19.409 134.525 16.214 133.46 16.214 133.46L15.682 130.798z"/>
460
+ </g>
461
+ <g style="fill: rgb(0, 0, 0);">
462
+ <path d="M26.482 126.398C26.482 126.398 33.403 125.866 31.806 127.995C30.209 130.125 27.014 129.06 27.014 129.06L26.482 126.398z"/>
463
+ </g>
464
+ <g style="fill: rgb(0, 0, 0);">
465
+ <path d="M36.882 121.598C36.882 121.598 43.803 121.066 42.206 123.195C40.609 125.325 37.414 124.26 37.414 124.26L36.882 121.598z"/>
466
+ </g>
467
+ <g style="fill: rgb(0, 0, 0);">
468
+ <path d="M9.282 103.598C9.282 103.598 16.203 103.066 14.606 105.195C13.009 107.325 9.014 107.06 9.014 107.06L9.282 103.598z"/>
469
+ </g>
470
+ <g style="fill: rgb(0, 0, 0);">
471
+ <path d="M19.282 100.398C19.282 100.398 26.203 99.866 24.606 101.995C23.009 104.125 18.614 103.86 18.614 103.86L19.282 100.398z"/>
472
+ </g>
473
+ <g style="fill: rgb(0, 0, 0);">
474
+ <path d="M-3.4 140.401C-3.4 140.401 1.8 140.001 0.6 141.601C-0.6 143.201 -3 142.401 -3 142.401L-3.4 140.401z"/>
475
+ </g>
476
+ <g style="fill: rgb(153, 38, 0);">
477
+ <path d="M-76.6 41.2C-76.6 41.2 -81 50 -81.4 53.2C-81.4 53.2 -80.6 44.4 -79.4 42.4C-78.2 40.4 -76.6 41.2 -76.6 41.2z"/>
478
+ </g>
479
+ <g style="fill: rgb(153, 38, 0);">
480
+ <path d="M-95 55.2C-95 55.2 -98.2 69.6 -97.8 72.4C-97.8 72.4 -99 60.8 -98.6 59.6C-98.2 58.4 -95 55.2 -95 55.2z"/>
481
+ </g>
482
+ <g style="fill: rgb(204, 204, 204);">
483
+ <path d="M-74.2 -19.4L-74.4 -16.2L-76.6 -16C-76.6 -16 -62.4 -3.4 -61.8 4.2C-61.8 4.2 -61 -4 -74.2 -19.4z"/>
484
+ </g>
485
+ <g style="fill: rgb(0, 0, 0);">
486
+ <path d="M-70.216 -18.135C-70.647 -18.551 -70.428 -19.296 -70.836 -19.556C-71.645 -20.072 -69.538 -20.129 -69.766 -20.845C-70.149 -22.051 -69.962 -22.072 -70.084 -23.348C-70.141 -23.946 -69.553 -25.486 -69.168 -25.926C-67.722 -27.578 -69.046 -30.51 -67.406 -32.061C-67.102 -32.35 -66.726 -32.902 -66.441 -33.32C-65.782 -34.283 -64.598 -34.771 -63.648 -35.599C-63.33 -35.875 -63.531 -36.702 -62.962 -36.61C-62.248 -36.495 -61.007 -36.625 -61.052 -35.784C-61.165 -33.664 -62.494 -31.944 -63.774 -30.276C-63.323 -29.572 -63.781 -28.937 -64.065 -28.38C-65.4 -25.76 -65.211 -22.919 -65.385 -20.079C-65.39 -19.994 -65.697 -19.916 -65.689 -19.863C-65.336 -17.528 -64.752 -15.329 -63.873 -13.1C-63.507 -12.17 -63.036 -11.275 -62.886 -10.348C-62.775 -9.662 -62.672 -8.829 -63.08 -8.124C-61.045 -5.234 -62.354 -2.583 -61.185 0.948C-60.978 1.573 -59.286 3.487 -59.749 3.326C-62.262 2.455 -62.374 2.057 -62.551 1.304C-62.697 0.681 -63.027 -0.696 -63.264 -1.298C-63.328 -1.462 -63.499 -3.346 -63.577 -3.468C-65.09 -5.85 -63.732 -5.674 -65.102 -8.032C-66.53 -8.712 -67.496 -9.816 -68.619 -10.978C-68.817 -11.182 -67.674 -11.906 -67.855 -12.119C-68.947 -13.408 -70.1 -14.175 -69.764 -15.668C-69.609 -16.358 -69.472 -17.415 -70.216 -18.135z"/>
487
+ </g>
488
+ <g style="fill: rgb(0, 0, 0);">
489
+ <path d="M-73.8 -16.4C-73.8 -16.4 -73.4 -9.6 -71 -8C-68.6 -6.4 -69.8 -7.2 -73 -8.4C-76.2 -9.6 -75 -10.4 -75 -10.4C-75 -10.4 -77.8 -10 -75.4 -8C-73 -6 -69.4 -3.6 -71 -3.6C-72.6 -3.6 -80.2 -7.6 -80.2 -10.4C-80.2 -13.2 -81.2 -17.3 -81.2 -17.3C-81.2 -17.3 -80.1 -18.1 -75.3 -18C-75.3 -18 -73.9 -17.3 -73.8 -16.4z"/>
490
+ </g>
491
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
492
+ <path d="M-74.6 2.2C-74.6 2.2 -83.12 -0.591 -101.6 2.8C-101.6 2.8 -92.569 0.722 -73.8 3C-63.5 4.25 -74.6 2.2 -74.6 2.2z"/>
493
+ </g>
494
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
495
+ <path d="M-72.502 2.129C-72.502 2.129 -80.748 -1.389 -99.453 0.392C-99.453 0.392 -90.275 -0.897 -71.774 2.995C-61.62 5.131 -72.502 2.129 -72.502 2.129z"/>
496
+ </g>
497
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
498
+ <path d="M-70.714 2.222C-70.714 2.222 -78.676 -1.899 -97.461 -1.514C-97.461 -1.514 -88.213 -2.118 -70.052 3.14C-60.086 6.025 -70.714 2.222 -70.714 2.222z"/>
499
+ </g>
500
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
501
+ <path d="M-69.444 2.445C-69.444 2.445 -76.268 -1.862 -93.142 -2.96C-93.142 -2.96 -84.803 -2.79 -68.922 3.319C-60.206 6.672 -69.444 2.445 -69.444 2.445z"/>
502
+ </g>
503
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
504
+ <path d="M45.84 12.961C45.84 12.961 44.91 13.605 45.124 12.424C45.339 11.243 73.547 -1.927 77.161 -1.677C77.161 -1.677 46.913 11.529 45.84 12.961z"/>
505
+ </g>
506
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
507
+ <path d="M42.446 13.6C42.446 13.6 41.57 14.315 41.691 13.121C41.812 11.927 68.899 -3.418 72.521 -3.452C72.521 -3.452 43.404 12.089 42.446 13.6z"/>
508
+ </g>
509
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
510
+ <path d="M39.16 14.975C39.16 14.975 38.332 15.747 38.374 14.547C38.416 13.348 58.233 -2.149 68.045 -4.023C68.045 -4.023 50.015 4.104 39.16 14.975z"/>
511
+ </g>
512
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
513
+ <path d="M36.284 16.838C36.284 16.838 35.539 17.532 35.577 16.453C35.615 15.373 53.449 1.426 62.28 -0.26C62.28 -0.26 46.054 7.054 36.284 16.838z"/>
514
+ </g>
515
+ <g style="fill: rgb(204, 204, 204);">
516
+ <path d="M4.6 164.801C4.6 164.801 -10.6 162.401 6.2 160.801C6.2 160.801 24.2 158.801 28.2 153.601C28.2 153.601 41.8 144.401 44.6 144.001C47.4 143.601 63.8 140.001 64.2 137.601C64.6 135.201 70.6 132.801 72.2 133.601C73.8 134.401 73.8 143.601 71 144.401C68.2 145.201 49.4 152.401 43 153.601C36.6 154.801 25 162.401 20.2 163.601C15.4 164.801 4.6 164.801 4.6 164.801z"/>
517
+ </g>
518
+ <g style="fill: rgb(0, 0, 0);">
519
+ <path d="M77.6 127.401C77.6 127.401 74.6 129.001 73.4 131.601C73.4 131.601 67 142.201 52.8 145.401C52.8 145.401 29.8 154.401 22 156.401C22 156.401 8.6 161.401 1.2 160.601C1.2 160.601 -5.8 160.801 0.4 162.401C0.4 162.401 20.6 160.401 24 158.601C24 158.601 39.6 153.401 42.6 150.801C45.6 148.201 63.8 143.201 66 141.201C68.2 139.201 78 130.801 77.6 127.401z"/>
520
+ </g>
521
+ <g style="fill: rgb(0, 0, 0);">
522
+ <path d="M18.882 158.911C18.882 158.911 24.111 158.685 22.958 160.234C21.805 161.784 19.357 160.91 19.357 160.91L18.882 158.911z"/>
523
+ </g>
524
+ <g style="fill: rgb(0, 0, 0);">
525
+ <path d="M11.68 160.263C11.68 160.263 16.908 160.037 15.756 161.586C14.603 163.136 12.155 162.263 12.155 162.263L11.68 160.263z"/>
526
+ </g>
527
+ <g style="fill: rgb(0, 0, 0);">
528
+ <path d="M1.251 161.511C1.251 161.511 6.48 161.284 5.327 162.834C4.174 164.383 1.726 163.51 1.726 163.51L1.251 161.511z"/>
529
+ </g>
530
+ <g style="fill: rgb(0, 0, 0);">
531
+ <path d="M-6.383 162.055C-6.383 162.055 -1.154 161.829 -2.307 163.378C-3.46 164.928 -5.908 164.054 -5.908 164.054L-6.383 162.055z"/>
532
+ </g>
533
+ <g style="fill: rgb(0, 0, 0);">
534
+ <path d="M35.415 151.513C35.415 151.513 42.375 151.212 40.84 153.274C39.306 155.336 36.047 154.174 36.047 154.174L35.415 151.513z"/>
535
+ </g>
536
+ <g style="fill: rgb(0, 0, 0);">
537
+ <path d="M45.73 147.088C45.73 147.088 51.689 143.787 51.155 148.849C50.885 151.405 46.362 149.749 46.362 149.749L45.73 147.088z"/>
538
+ </g>
539
+ <g style="fill: rgb(0, 0, 0);">
540
+ <path d="M54.862 144.274C54.862 144.274 62.021 140.573 60.287 146.035C59.509 148.485 55.493 146.935 55.493 146.935L54.862 144.274z"/>
541
+ </g>
542
+ <g style="fill: rgb(0, 0, 0);">
543
+ <path d="M64.376 139.449C64.376 139.449 68.735 134.548 69.801 141.21C70.207 143.748 65.008 142.11 65.008 142.11L64.376 139.449z"/>
544
+ </g>
545
+ <g style="fill: rgb(0, 0, 0);">
546
+ <path d="M26.834 155.997C26.834 155.997 32.062 155.77 30.91 157.32C29.757 158.869 27.308 157.996 27.308 157.996L26.834 155.997z"/>
547
+ </g>
548
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
549
+ <path d="M62.434 34.603C62.434 34.603 61.708 35.268 61.707 34.197C61.707 33.127 79.191 19.863 88.034 18.479C88.034 18.479 71.935 25.208 62.434 34.603z"/>
550
+ </g>
551
+ <g style="fill: rgb(0, 0, 0);">
552
+ <path d="M65.4 98.4C65.4 98.4 87.401 120.801 96.601 124.401C96.601 124.401 105.801 135.601 101.801 161.601C101.801 161.601 98.601 169.201 95.401 148.401C95.401 148.401 98.601 123.201 87.401 139.201C87.401 139.201 79 129.301 85.4 129.601C85.4 129.601 88.601 131.601 89.001 130.001C89.401 128.401 81.4 114.801 64.2 100.4C47 86 65.4 98.4 65.4 98.4z"/>
553
+ </g>
554
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
555
+ <path d="M7 137.201C7 137.201 6.8 135.401 8.6 136.201C10.4 137.001 104.601 143.201 136.201 167.201C136.201 167.201 91.001 144.001 7 137.201z"/>
556
+ </g>
557
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
558
+ <path d="M17.4 132.801C17.4 132.801 17.2 131.001 19 131.801C20.8 132.601 157.401 131.601 181.001 164.001C181.001 164.001 159.001 138.801 17.4 132.801z"/>
559
+ </g>
560
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
561
+ <path d="M29 128.801C29 128.801 28.8 127.001 30.6 127.801C32.4 128.601 205.801 115.601 229.401 148.001C229.401 148.001 219.801 122.401 29 128.801z"/>
562
+ </g>
563
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
564
+ <path d="M39 124.001C39 124.001 38.8 122.201 40.6 123.001C42.4 123.801 164.601 85.2 188.201 117.601C188.201 117.601 174.801 93 39 124.001z"/>
565
+ </g>
566
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
567
+ <path d="M-19 146.801C-19 146.801 -19.2 145.001 -17.4 145.801C-15.6 146.601 2.2 148.801 4.2 187.601C4.2 187.601 -3 145.601 -19 146.801z"/>
568
+ </g>
569
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
570
+ <path d="M-27.8 148.401C-27.8 148.401 -28 146.601 -26.2 147.401C-24.4 148.201 -10.2 143.601 -13 182.401C-13 182.401 -11.8 147.201 -27.8 148.401z"/>
571
+ </g>
572
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
573
+ <path d="M-35.8 148.801C-35.8 148.801 -36 147.001 -34.2 147.801C-32.4 148.601 -17 149.201 -29.4 171.601C-29.4 171.601 -19.8 147.601 -35.8 148.801z"/>
574
+ </g>
575
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
576
+ <path d="M11.526 104.465C11.526 104.465 11.082 106.464 12.631 105.247C28.699 92.622 61.141 33.72 116.826 28.086C116.826 28.086 78.518 15.976 11.526 104.465z"/>
577
+ </g>
578
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
579
+ <path d="M22.726 102.665C22.726 102.665 21.363 101.472 23.231 100.847C25.099 100.222 137.541 27.72 176.826 35.686C176.826 35.686 149.719 28.176 22.726 102.665z"/>
580
+ </g>
581
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
582
+ <path d="M1.885 108.767C1.885 108.767 1.376 110.366 3.087 109.39C12.062 104.27 15.677 47.059 59.254 45.804C59.254 45.804 26.843 31.09 1.885 108.767z"/>
583
+ </g>
584
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
585
+ <path d="M-18.038 119.793C-18.038 119.793 -19.115 121.079 -17.162 120.825C-6.916 119.493 14.489 78.222 58.928 83.301C58.928 83.301 26.962 68.955 -18.038 119.793z"/>
586
+ </g>
587
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
588
+ <path d="M-6.8 113.667C-6.8 113.667 -7.611 115.136 -5.742 114.511C4.057 111.237 17.141 66.625 61.729 63.078C61.729 63.078 27.603 55.135 -6.8 113.667z"/>
589
+ </g>
590
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
591
+ <path d="M-25.078 124.912C-25.078 124.912 -25.951 125.954 -24.369 125.748C-16.07 124.669 1.268 91.24 37.264 95.354C37.264 95.354 11.371 83.734 -25.078 124.912z"/>
592
+ </g>
593
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
594
+ <path d="M-32.677 130.821C-32.677 130.821 -33.682 131.866 -32.091 131.748C-27.923 131.439 2.715 98.36 21.183 113.862C21.183 113.862 9.168 95.139 -32.677 130.821z"/>
595
+ </g>
596
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
597
+ <path d="M36.855 98.898C36.855 98.898 35.654 97.543 37.586 97.158C39.518 96.774 160.221 39.061 198.184 51.927C198.184 51.927 172.243 41.053 36.855 98.898z"/>
598
+ </g>
599
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
600
+ <path d="M3.4 163.201C3.4 163.201 3.2 161.401 5 162.201C6.8 163.001 22.2 163.601 9.8 186.001C9.8 186.001 19.4 162.001 3.4 163.201z"/>
601
+ </g>
602
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
603
+ <path d="M13.8 161.601C13.8 161.601 13.6 159.801 15.4 160.601C17.2 161.401 35 163.601 37 202.401C37 202.401 29.8 160.401 13.8 161.601z"/>
604
+ </g>
605
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
606
+ <path d="M20.6 160.001C20.6 160.001 20.4 158.201 22.2 159.001C24 159.801 48.6 163.201 72.2 195.601C72.2 195.601 36.6 158.801 20.6 160.001z"/>
607
+ </g>
608
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
609
+ <path d="M28.225 157.972C28.225 157.972 27.788 156.214 29.678 156.768C31.568 157.322 52.002 155.423 90.099 189.599C90.099 189.599 43.924 154.656 28.225 157.972z"/>
610
+ </g>
611
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
612
+ <path d="M38.625 153.572C38.625 153.572 38.188 151.814 40.078 152.368C41.968 152.922 76.802 157.423 128.499 192.399C128.499 192.399 54.324 150.256 38.625 153.572z"/>
613
+ </g>
614
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
615
+ <path d="M-1.8 142.001C-1.8 142.001 -2 140.201 -0.2 141.001C1.6 141.801 55 144.401 85.4 171.201C85.4 171.201 50.499 146.426 -1.8 142.001z"/>
616
+ </g>
617
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
618
+ <path d="M-11.8 146.001C-11.8 146.001 -12 144.201 -10.2 145.001C-8.4 145.801 16.2 149.201 39.8 181.601C39.8 181.601 4.2 144.801 -11.8 146.001z"/>
619
+ </g>
620
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
621
+ <path d="M49.503 148.962C49.503 148.962 48.938 147.241 50.864 147.655C52.79 148.068 87.86 150.004 141.981 181.098C141.981 181.098 64.317 146.704 49.503 148.962z"/>
622
+ </g>
623
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
624
+ <path d="M57.903 146.562C57.903 146.562 57.338 144.841 59.264 145.255C61.19 145.668 96.26 147.604 150.381 178.698C150.381 178.698 73.317 143.904 57.903 146.562z"/>
625
+ </g>
626
+ <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;">
627
+ <path d="M67.503 141.562C67.503 141.562 66.938 139.841 68.864 140.255C70.79 140.668 113.86 145.004 203.582 179.298C203.582 179.298 82.917 138.904 67.503 141.562z"/>
628
+ </g>
629
+ <g style="fill: rgb(0, 0, 0);">
630
+ <path d="M-43.8 148.401C-43.8 148.401 -38.6 148.001 -39.8 149.601C-41 151.201 -43.4 150.401 -43.4 150.401L-43.8 148.401z"/>
631
+ </g>
632
+ <g style="fill: rgb(0, 0, 0);">
633
+ <path d="M-13 162.401C-13 162.401 -7.8 162.001 -9 163.601C-10.2 165.201 -12.6 164.401 -12.6 164.401L-13 162.401z"/>
634
+ </g>
635
+ <g style="fill: rgb(0, 0, 0);">
636
+ <path d="M-21.8 162.001C-21.8 162.001 -16.6 161.601 -17.8 163.201C-19 164.801 -21.4 164.001 -21.4 164.001L-21.8 162.001z"/>
637
+ </g>
638
+ <g style="fill: rgb(0, 0, 0);">
639
+ <path d="M-117.169 150.182C-117.169 150.182 -112.124 151.505 -113.782 152.624C-115.439 153.744 -117.446 152.202 -117.446 152.202L-117.169 150.182z"/>
640
+ </g>
641
+ <g style="fill: rgb(0, 0, 0);">
642
+ <path d="M-115.169 140.582C-115.169 140.582 -110.124 141.905 -111.782 143.024C-113.439 144.144 -115.446 142.602 -115.446 142.602L-115.169 140.582z"/>
643
+ </g>
644
+ <g style="fill: rgb(0, 0, 0);">
645
+ <path d="M-122.369 136.182C-122.369 136.182 -117.324 137.505 -118.982 138.624C-120.639 139.744 -122.646 138.202 -122.646 138.202L-122.369 136.182z"/>
646
+ </g>
647
+ <g style="fill: rgb(204, 204, 204);">
648
+ <path d="M-42.6 211.201C-42.6 211.201 -44.2 211.201 -48.2 213.201C-50.2 213.201 -61.4 216.801 -67 226.801C-67 226.801 -54.6 217.201 -42.6 211.201z"/>
649
+ </g>
650
+ <g style="fill: rgb(204, 204, 204);">
651
+ <path d="M45.116 303.847C45.257 304.105 45.312 304.525 45.604 304.542C46.262 304.582 47.495 304.883 47.37 304.247C46.522 299.941 45.648 295.004 41.515 293.197C40.876 292.918 39.434 293.331 39.36 294.215C39.233 295.739 39.116 297.088 39.425 298.554C39.725 299.975 41.883 299.985 42.8 298.601C43.736 300.273 44.168 302.116 45.116 303.847z"/>
652
+ </g>
653
+ <g style="fill: rgb(204, 204, 204);">
654
+ <path d="M34.038 308.581C34.786 309.994 34.659 311.853 36.074 312.416C36.814 312.71 38.664 311.735 38.246 310.661C37.444 308.6 37.056 306.361 35.667 304.55C35.467 304.288 35.707 303.755 35.547 303.427C34.953 302.207 33.808 301.472 32.4 301.801C31.285 304.004 32.433 306.133 33.955 307.842C34.091 307.994 33.925 308.37 34.038 308.581z"/>
655
+ </g>
656
+ <g style="fill: rgb(204, 204, 204);">
657
+ <path d="M-5.564 303.391C-5.672 303.014 -5.71 302.551 -5.545 302.23C-5.014 301.197 -4.221 300.075 -4.558 299.053C-4.906 297.997 -6.022 298.179 -6.672 298.748C-7.807 299.742 -7.856 301.568 -8.547 302.927C-8.743 303.313 -8.692 303.886 -9.133 304.277C-9.607 304.698 -10.047 306.222 -9.951 306.793C-9.898 307.106 -10.081 317.014 -9.859 316.751C-9.24 316.018 -6.19 306.284 -6.121 305.392C-6.064 304.661 -5.332 304.196 -5.564 303.391z"/>
658
+ </g>
659
+ <g style="fill: rgb(204, 204, 204);">
660
+ <path d="M-31.202 296.599C-28.568 294.1 -25.778 291.139 -26.22 287.427C-26.336 286.451 -28.111 286.978 -28.298 287.824C-29.1 291.449 -31.139 294.11 -33.707 296.502C-35.903 298.549 -37.765 304.893 -38 305.401C-34.303 300.145 -32.046 297.399 -31.202 296.599z"/>
661
+ </g>
662
+ <g style="fill: rgb(204, 204, 204);">
663
+ <path d="M-44.776 290.635C-44.253 290.265 -44.555 289.774 -44.338 289.442C-43.385 287.984 -42.084 286.738 -42.066 285C-42.063 284.723 -42.441 284.414 -42.776 284.638C-43.053 284.822 -43.395 284.952 -43.503 285.082C-45.533 287.531 -46.933 290.202 -48.376 293.014C-48.559 293.371 -49.703 297.862 -49.39 297.973C-49.151 298.058 -47.431 293.877 -47.221 293.763C-45.958 293.077 -45.946 291.462 -44.776 290.635z"/>
664
+ </g>
665
+ <g style="fill: rgb(204, 204, 204);">
666
+ <path d="M-28.043 310.179C-27.599 309.31 -26.023 308.108 -26.136 307.219C-26.254 306.291 -25.786 304.848 -26.698 305.536C-27.955 306.484 -31.404 307.833 -31.674 313.641C-31.7 314.212 -28.726 311.519 -28.043 310.179z"/>
667
+ </g>
668
+ <g style="fill: rgb(204, 204, 204);">
669
+ <path d="M-13.6 293.001C-13.2 292.333 -12.492 292.806 -12.033 292.543C-11.385 292.171 -10.774 291.613 -10.482 290.964C-9.512 288.815 -7.743 286.995 -7.6 284.601C-9.091 283.196 -9.77 285.236 -10.4 286.201C-11.723 284.554 -12.722 286.428 -14.022 286.947C-14.092 286.975 -14.305 286.628 -14.38 286.655C-15.557 287.095 -16.237 288.176 -17.235 288.957C-17.406 289.091 -17.811 288.911 -17.958 289.047C-18.61 289.65 -19.583 289.975 -19.863 290.657C-20.973 293.364 -24.113 295.459 -26 303.001C-25.619 303.91 -21.488 296.359 -21.001 295.661C-20.165 294.465 -20.047 297.322 -18.771 296.656C-18.72 296.629 -18.534 296.867 -18.4 297.001C-18.206 296.721 -17.988 296.492 -17.6 296.601C-17.6 296.201 -17.734 295.645 -17.533 295.486C-16.296 294.509 -16.38 293.441 -15.6 292.201C-15.142 292.99 -14.081 292.271 -13.6 293.001z"/>
670
+ </g>
671
+ <g style="fill: rgb(204, 204, 204);">
672
+ <path d="M46.2 347.401C46.2 347.401 53.6 327.001 49.2 315.801C49.2 315.801 60.6 337.401 56 348.601C56 348.601 55.6 338.201 51.6 333.201C51.6 333.201 47.6 346.001 46.2 347.401z"/>
673
+ </g>
674
+ <g style="fill: rgb(204, 204, 204);">
675
+ <path d="M31.4 344.801C31.4 344.801 36.8 336.001 28.8 317.601C28.8 317.601 28 338.001 21.2 349.001C21.2 349.001 35.4 328.801 31.4 344.801z"/>
676
+ </g>
677
+ <g style="fill: rgb(204, 204, 204);">
678
+ <path d="M21.4 342.801C21.4 342.801 21.2 322.801 21.6 319.801C21.6 319.801 17.8 336.401 7.6 346.001C7.6 346.001 22 334.001 21.4 342.801z"/>
679
+ </g>
680
+ <g style="fill: rgb(204, 204, 204);">
681
+ <path d="M11.8 310.801C11.8 310.801 17.8 324.401 7.8 342.801C7.8 342.801 14.2 330.601 9.4 323.601C9.4 323.601 12 320.201 11.8 310.801z"/>
682
+ </g>
683
+ <g style="fill: rgb(204, 204, 204);">
684
+ <path d="M-7.4 342.401C-7.4 342.401 -8.4 326.801 -6.6 324.601C-6.6 324.601 -6.4 318.201 -6.8 317.201C-6.8 317.201 -2.8 311.001 -2.6 318.401C-2.6 318.401 -1.2 326.201 1.6 330.801C1.6 330.801 5.2 336.201 5 342.601C5 342.601 -5 312.401 -7.4 342.401z"/>
685
+ </g>
686
+ <g style="fill: rgb(204, 204, 204);">
687
+ <path d="M-11 314.801C-11 314.801 -17.6 325.601 -19.4 344.601C-19.4 344.601 -20.8 338.401 -17 324.001C-17 324.001 -12.8 308.601 -11 314.801z"/>
688
+ </g>
689
+ <g style="fill: rgb(204, 204, 204);">
690
+ <path d="M-32.8 334.601C-32.8 334.601 -27.8 329.201 -26.4 324.201C-26.4 324.201 -22.8 308.401 -29.2 317.001C-29.2 317.001 -29 325.001 -37.2 332.401C-37.2 332.401 -32.4 330.001 -32.8 334.601z"/>
691
+ </g>
692
+ <g style="fill: rgb(204, 204, 204);">
693
+ <path d="M-38.6 329.601C-38.6 329.601 -35.2 312.201 -34.4 311.401C-34.4 311.401 -32.6 308.001 -35.4 311.201C-35.4 311.201 -44.2 330.401 -48.2 337.001C-48.2 337.001 -40.2 327.801 -38.6 329.601z"/>
694
+ </g>
695
+ <g style="fill: rgb(204, 204, 204);">
696
+ <path d="M-44.4 313.001C-44.4 313.001 -32.8 290.601 -54.6 316.401C-54.6 316.401 -43.6 306.601 -44.4 313.001z"/>
697
+ </g>
698
+ <g style="fill: rgb(204, 204, 204);">
699
+ <path d="M-59.8 298.401C-59.8 298.401 -55 279.601 -52.4 279.801C-52.4 279.801 -44.2 270.801 -50.8 281.401C-50.8 281.401 -56.8 291.001 -56.2 300.801C-56.2 300.801 -56.8 291.201 -59.8 298.401z"/>
700
+ </g>
701
+ <g style="fill: rgb(204, 204, 204);">
702
+ <path d="M270.5 287C270.5 287 258.5 277 256 273.5C256 273.5 269.5 292 269.5 299C269.5 299 272 291.5 270.5 287z"/>
703
+ </g>
704
+ <g style="fill: rgb(204, 204, 204);">
705
+ <path d="M276 265C276 265 255 250 251.5 242.5C251.5 242.5 278 272 278 276.5C278 276.5 278.5 267.5 276 265z"/>
706
+ </g>
707
+ <g style="fill: rgb(204, 204, 204);">
708
+ <path d="M293 111C293 111 281 103 279.5 105C279.5 105 290 111.5 292.5 120C292.5 120 291 111 293 111z"/>
709
+ </g>
710
+ <g style="fill: rgb(204, 204, 204);">
711
+ <path d="M301.5 191.5L284 179.5C284 179.5 303 196.5 303.5 200.5L301.5 191.5z"/>
712
+ </g>
713
+ <g style="stroke: rgb(0, 0, 0);">
714
+ <path d="M-89.25 169L-67.25 173.75"/>
715
+ </g>
716
+ <g style="stroke: rgb(0, 0, 0);">
717
+ <path d="M-39 331C-39 331 -39.5 327.5 -48.5 338"/>
718
+ </g>
719
+ <g style="stroke: rgb(0, 0, 0);">
720
+ <path d="M-33.5 336C-33.5 336 -31.5 329.5 -38 334"/>
721
+ </g>
722
+ <g style="stroke: rgb(0, 0, 0);">
723
+ <path d="M20.5 344.5C20.5 344.5 22 333.5 10.5 346.5"/>
724
+ </g>
725
+ </g>
726
  </svg>
src/assets/css/gfpdf-admin-styles.css CHANGED
@@ -1,17 +1,17 @@
1
-
2
- /**
3
- * CSS file included on all WordPress Admin Pages
4
- * If style is targetted directly at Gravity PDF admin pages include in gfpdf-styles.css instead
5
- */
6
-
7
-
8
- @media only screen and (min-width: 600px) {
9
- .notice.gfpdf-alert-mascot {
10
- padding-left: 145px !important;
11
-
12
- background-image: url(../../../src/assets/images/paws-with-logo-small.png);
13
- background-position: 10px 50%;
14
- background-repeat: no-repeat;
15
- background-size: 125px;
16
- }
17
- }
1
+
2
+ /**
3
+ * CSS file included on all WordPress Admin Pages
4
+ * If style is targetted directly at Gravity PDF admin pages include in gfpdf-styles.css instead
5
+ */
6
+
7
+
8
+ @media only screen and (min-width: 600px) {
9
+ .notice.gfpdf-alert-mascot {
10
+ padding-left: 145px !important;
11
+
12
+ background-image: url(../../../src/assets/images/paws-with-logo-small.png);
13
+ background-position: 10px 50%;
14
+ background-repeat: no-repeat;
15
+ background-size: 125px;
16
+ }
17
+ }
src/assets/css/gfpdf-styles.css CHANGED
@@ -1,983 +1,983 @@
1
- /**
2
- * Welcome Page
3
- */
4
-
5
- .about-wrap .gfpdf-badge {
6
- margin-bottom: 1.5em;
7
- position: relative;
8
- width: 100%;
9
- }
10
-
11
- .about-wrap .feature-section:not(.under-the-hood) .col.gfpdf-breakdown {
12
- margin-top: 0;
13
- }
14
-
15
- .gfpdf-badge {
16
- background: url("../../../src/assets/images/gravitypdf-globe-black.png") no-repeat 50% 5px;
17
- color: #333;
18
- display: inline-block;
19
- font-size: 14px;
20
- font-weight: 600;
21
- height: 40px;
22
- margin: 5px 0 0;
23
- padding-top: 120px;
24
- text-align: center;
25
- text-rendering: optimizelegibility;
26
- }
27
-
28
- .gfpdf-page .about-wrap [class$="col"] .col {
29
- border-bottom: none;
30
- }
31
-
32
- .gfpdf-page .about-wrap .feature-section {
33
- border-bottom: 1px solid rgba(0, 0, 0, 0.1 );
34
- }
35
-
36
- .gfpdf-page .about-wrap .feature-section.two-col .col {
37
- vertical-align: middle;
38
- }
39
-
40
- div img.gfpdf-image {
41
- border: 1px solid #CCC;
42
- max-width: 98%;
43
-
44
- -webkit-box-shadow: 1px 1px 5px 1px rgba(0,0,0,0.15);
45
- -moz-box-shadow: 1px 1px 5px 1px rgba(0,0,0,0.15);
46
- box-shadow: 1px 1px 5px 1px rgba(0,0,0,0.15);
47
-
48
- }
49
-
50
-
51
-
52
- /**
53
- * General Settings Page
54
- */
55
- #pdfextended-settings {
56
- margin-top: 20px;
57
- }
58
-
59
- #pdfextended-settings h3,
60
- #tab_pdf h3 {
61
- margin-top: 5px;
62
- line-height: 1.3em;
63
- }
64
-
65
- #pdfextended-settings h3 i,
66
- #tab_pdf h3 i {
67
- padding-right: 2px;
68
- }
69
-
70
- #pdfextended-settings #add-new-pdf {
71
- padding: 4px 8px;
72
- }
73
-
74
- #pdfextended-settings div.notice, div.pdf-notice {
75
- margin: 5px 15px 2px;
76
- padding: 0 0.6em;
77
- }
78
-
79
- .gfpdf-page #pdfextended-settings .theme div.notice,
80
- .gfpdf-page .theme div.notice,
81
- .gfpdf-page #pdfextended-settings .theme-info div.notice,
82
- .gfpdf-page .theme-info div.notice{
83
- margin: 0;
84
- z-index: 500;
85
- color: #444;
86
- padding: 1px 12px;
87
- }
88
-
89
- .gfpdf-page div.notice, div.pdf-notice,
90
- .gfpdf-page div.error, div.pdf-error {
91
- background-color: #FFFFFF;
92
- border-left: 4px solid #7AD03A;
93
- box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
94
- }
95
-
96
- .gfpdf-page div.error, div.pdf-error {
97
- border-left-color: #dc3232;
98
- }
99
-
100
- .gfpdf-page div.notice, div.pdf-notice {
101
- margin: 5px 0 15px;
102
- padding: 1px 12px;
103
- }
104
-
105
- #pdfextended-settings #gfpdf-advanced-options,
106
- #tab_pdf #gfpdf-advanced-options {
107
- display: none;
108
- margin-bottom: 20px;
109
- }
110
-
111
- .no-js #pdfextended-settings #gfpdf-advanced-options,
112
- .no-js #tab_pdf #gfpdf-advanced-options {
113
- display: block;
114
- }
115
-
116
- #pdfextended-settings .gfpdf-advanced-options,
117
- #tab_pdf .gfpdf-advanced-options {
118
- margin-top: -5px;
119
- }
120
-
121
- .no-js #pdfextended-settings .gfpdf-advanced-options,
122
- .no-js #tab_pdf .gfpdf-advanced-options {
123
- display: none;
124
- }
125
-
126
- #pdfextended-settings select.large,
127
- #tab_pdf select.large {
128
- width: 100%;
129
- max-width: 350px;
130
- }
131
-
132
- #tab_pdf .formSubmitted input:invalid {
133
- border: 1px solid red;
134
- }
135
-
136
- #tab_pdf .wp-editor-wrap {
137
- margin: 0 12px 0 0;
138
- }
139
-
140
- .rtl #pdfextended-settings label, .rtl #tab_pdf label {
141
- float: right;
142
- margin-left: 5px;
143
- }
144
-
145
- /*
146
- * License page
147
- */
148
- #pdf-license .fa-exclamation-circle {
149
- color: red;
150
- }
151
-
152
- #pdf-license .fa-check {
153
- color: green;
154
- }
155
-
156
- /**
157
- * Tools Settings Page
158
- */
159
-
160
- #pdfextended-settings table.gfpdf_table thead th {
161
- font-weight: bold;
162
- }
163
-
164
- #pdfextended-settings table.gfpdf_table tr:nth-child(2n) td,
165
- #pdfextended-settings table.gfpdf_table tr:nth-child(2n) th {
166
- background: none repeat scroll 0 0 #fcfcfc;
167
- }
168
-
169
- #pdfextended-settings p.submit {
170
- padding-bottom: 0;
171
- margin-bottom: 0;
172
- }
173
-
174
- #pdfextended-settings span.path,
175
- #pdfextended-settings span.details.path {
176
- padding: 2px;
177
- background: #f2f2f2;
178
- }
179
-
180
- #setup-templates-confirm ul {
181
- margin-top: 5px;
182
- }
183
- #setup-templates-confirm li {
184
- list-style-type: disc;
185
- margin-left: 20px;
186
- }
187
-
188
- #manage-font-files div {
189
- margin: 10px 0;
190
- }
191
-
192
- #manage-font-files div.updated {
193
- margin-top: 0;
194
- }
195
-
196
- #manage-font-files li {
197
- border: 1px solid #CCC;
198
- position: relative;
199
- }
200
-
201
- #manage-font-files li .delete-font {
202
- position: absolute;
203
- top: 0;
204
- right: 0;
205
- padding: 5px 10px;
206
- }
207
-
208
- #manage-font-files li .delete-font:hover {
209
- background: #dc0606;
210
- color: #FFF;
211
- }
212
-
213
- #manage-font-files input.invalid {
214
- border: 1px solid red;
215
- }
216
-
217
- #manage-font-files .font-submit {
218
- text-align: center;
219
- }
220
-
221
- #manage-font-files #font-add-list {
222
- border: none;
223
- text-align: center;
224
- color: #ccc;
225
- cursor: pointer;
226
- }
227
-
228
- #manage-font-files #font-empty {
229
- font-size: 14px;
230
- font-style: italic;
231
- line-height: 21px;
232
- padding: 60px 0 15px;
233
- text-align: center;
234
- }
235
-
236
- #manage-font-files #font-add-list:hover {
237
- color: #555;
238
- }
239
-
240
- #manage-font-files #font-add-list span {
241
- display: block;
242
- text-transform: uppercase;
243
- margin-top: -5px;
244
- }
245
-
246
- #manage-font-files li a {
247
- display: block;
248
- background: #EEE;
249
- padding: 5px 7px;
250
- text-decoration: none;
251
- }
252
-
253
- #manage-font-files li a.font-name .fa {
254
- margin-right: 5px;
255
- }
256
-
257
- #manage-font-files li a:hover {
258
- background: #e9e9e9;
259
- }
260
-
261
- #manage-font-files .font-settings {
262
- padding: 5px 7px;
263
- }
264
-
265
- #manage-font-files .gf_settings_description {
266
- font-size: 95%;
267
- }
268
-
269
- #manage-font-files .font-settings > label, #manage-font-files .font-selector > label {
270
- float: left;
271
- width: 9em;
272
- }
273
-
274
- #manage-font-files .regular-text {
275
- width: 16em;
276
- }
277
-
278
- #manage-font-files .css-usage {
279
- text-align: center;
280
- }
281
-
282
- #manage-font-files .css-usage input {
283
- width: 100%;
284
- text-align: center;
285
- }
286
-
287
- #manage-font-files .css-usage pre {
288
- margin: 5px 0;
289
- background: #EEE;
290
- padding: 7.5px;
291
- }
292
-
293
- .rtl #font-list .css-usage input {
294
- direction: ltr !important;
295
- }
296
-
297
- /**
298
- * Help Settings Page
299
- */
300
- #pdfextended-settings .metabox-holder h3 {
301
- font-size: 14px;
302
- }
303
-
304
- #pdfextended-settings .postbox-container .postbox {
305
- margin: 0 8px 20px 0;
306
- }
307
-
308
- #pdfextended-settings .postbox h3.hndle {
309
- padding-bottom: 12px;
310
- }
311
-
312
- #pdfextended-settings .postbox .hndle, #pdfextended-settings .widget .widget-top {
313
- cursor: default;
314
- }
315
-
316
- #pdfextended-settings .postbox .handlediv,
317
- #pdfextended-settings #pdf_support_hours h3 {
318
- display: none;
319
- }
320
-
321
- #pdfextended-settings .about-wrap, #pdfextended-settings .about-wrap .about-text {
322
- max-width: none;
323
- min-height: 0;
324
- line-height: 1.8em;
325
- }
326
-
327
- #pdfextended-settings .about-wrap h1, #pdfextended-settings .about-wrap .about-text, #pdfextended-settings .about-wrap #search-knowledgebase {
328
- text-align: center;
329
- margin-right: 0;
330
- }
331
-
332
- #pdfextended-settings .postbox .inside {
333
- margin-bottom: 0;
334
- }
335
-
336
- #pdfextended-settings .about-wrap h1 {
337
- margin-top: 40px;
338
- }
339
-
340
- #pdfextended-settings .about-wrap #search-knowledgebase input {
341
- font-family: 'FontAwesome', 'Open Sans', sans-serif;
342
- font-size: 22px;
343
- margin: 10px 0 0;
344
- padding: 16px 20px;
345
- line-height: 25px;
346
- width: 100%;
347
- }
348
-
349
- #pdfextended-settings #search-results {
350
- text-align: left;
351
- margin: 0 auto;
352
- width: 100%;
353
- }
354
-
355
- #pdfextended-settings #search-results .postbox, #search-results .postbox .inside {
356
- display: none;
357
- }
358
-
359
- #pdfextended-settings #search-results .postbox h3 {
360
- margin-bottom: 0;
361
- }
362
-
363
- #pdfextended-settings #search-results .postbox.is-active h3 {
364
- margin-bottom: 8px;
365
- }
366
-
367
- #pdfextended-settings #dashboard_primary .rss-widget .rssSummary .continue-reading {
368
- display: none;
369
- }
370
-
371
- #pdfextended-settings .spinner.is-active {
372
- visibility: visible;
373
- margin: 0;
374
- }
375
-
376
- #pdfextended-settings .rss-widget ul li {
377
- padding: 6px 0;
378
- margin: 0;
379
- border-bottom: 1px dotted #CCC;
380
- }
381
-
382
- #pdfextended-settings .rss-widget ul li a {
383
- font-size: 16px;
384
- }
385
-
386
- #pdfextended-settings .rss-widget ul li:first-child,
387
- #pdfextended-settings .rss-widget ul li:last-child {
388
- border-bottom: none;
389
- }
390
-
391
- #pdfextended-settings .about-wrap .about-text-disclaimer {
392
- font-size: 13px;
393
- }
394
-
395
- #pdfextended-settings .about-wrap #dashboard-widgets.columns-2 .postbox-container {
396
- width: 100%
397
- }
398
-
399
- #pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a {
400
- background: #f6f6f6 none repeat scroll 0 0;
401
- border: 3px solid #eee;
402
- border-radius: 10px;
403
- color: inherit;
404
- display: block;
405
- padding: 15px;
406
- font-size: 16px;
407
- text-decoration: none;
408
- margin-bottom: 30px;
409
- transition: all 0.5s ease 0s;
410
- }
411
-
412
- #pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a:hover {
413
- border: 3px solid #076aa4;
414
- }
415
-
416
- #pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a span {
417
- font-weight: bold;
418
- }
419
-
420
- #pdfextended-settings .about-wrap .center {
421
- text-align: center;
422
- }
423
-
424
- #pdfextended-settings .about-wrap .button.button-large {
425
- height: 35px;
426
- line-height: 33px;
427
- padding: 0 17px 9px;
428
- }
429
-
430
-
431
-
432
- /**
433
- * System status icons
434
- */
435
- #pdf-system-status .fa-check-circle, #pdf-system-status .fa-exclamation-triangle, #pdf-system-status .fa-times-circle {
436
- font-size: 17px;
437
- margin-left: 5px;
438
- vertical-align: bottom;
439
- margin-top: -2px;
440
- }
441
-
442
- #pdf-system-status .fa-check-circle {
443
- color: #008000;
444
- }
445
-
446
- #pdf-system-status .fa-exclamation-triangle {
447
- color: #ff8a00;
448
- }
449
-
450
- #pdf-system-status .fa-times-circle {
451
- color: #d10b0b;
452
- }
453
-
454
-
455
- /**
456
- * License page
457
- */
458
-
459
- #pdf-system-status #license input[type="email"], #pdf-system-status #license input[type="number"], #pdf-system-status #license input[type="password"], #pdf-system-status #license input[type="search"], #pdf-system-status #license input[type="tel"], #pdf-system-status #license input[type="text"], #pdf-system-status #license input[type="url"], #pdf-system-status #license select, #pdf-system-status #license textarea {
460
- background-color: #FFFFFF;
461
- border: 1px solid #DDDDDD;
462
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07) inset;
463
- color: #333333;
464
- width: 100%;
465
- }
466
-
467
- #pdf-system-status #license input[type="text"][readonly="readonly"] {
468
- background: #EEE;
469
- cursor: not-allowed;
470
- }
471
-
472
- #pdf-system-status #license label {
473
- font-weight: bold;
474
- line-height: 30px;
475
- color: #222;
476
- font-size: 14px;
477
- float: left;
478
- width: 20em;
479
- }
480
-
481
- #pdf-system-status #license .expires, #pdf-system-status #license .inactive, #pdf-system-status #license .limit, #pdf-system-status #license .expired, #pdf-system-status #license .deactivate {
482
- font-style: italic;
483
- }
484
-
485
- #pdf-system-status #license .expired {
486
- display: block;
487
- color: #9e0b0f;
488
- }
489
-
490
- #pdf-system-status #license .gf_keystatus_invalid,
491
- #pdf-system-status #license .gf_keystatus_valid {
492
- font-size: 120%;
493
- }
494
-
495
- #pdf-system-status #license p {
496
- clear: left;
497
- float: left;
498
- width: 100%;
499
- }
500
-
501
- #pdf-system-status #license span.container {
502
- display: block;
503
- }
504
-
505
-
506
- /**
507
- * PDF Form Settings List
508
- */
509
- #gfpdf_list_form .check-column {
510
- width: 50px;
511
- }
512
-
513
- #gfpdf_list_form .duplicate a:hover,
514
- #gfpdf_list_form .delete a:hover {
515
- cursor: pointer;
516
- }
517
-
518
- #gfpdf_list_form .gravitypdf_shortcode {
519
- background: #EEE;
520
- width: 100%;
521
- padding: 5px;
522
- outline: none;
523
- }
524
-
525
- #gfpdf_list_form .gravitypdf_shortcode:focus {
526
-
527
- }
528
-
529
- /**
530
- * PDF Form Settings (individual)
531
- */
532
- .gfpdf-hidden {
533
- display: none;
534
- }
535
-
536
- .gfpdf_conditional_logic {
537
- margin-top: 10px;
538
- }
539
-
540
- #pdf-form-settings .conditional_logic th {
541
- padding-top: 15px;
542
- }
543
-
544
- #pdf-form-settings .conditional_logic td {
545
- vertical-align: top;
546
- }
547
-
548
- #pdf-form-settings .gfpdf-spinner,
549
- #pdfextended-settings .gfpdf-spinner,
550
- .wp-dialog .gfpdf-spinner,
551
- #gfpdf_list_form .gfpdf-spinner {
552
- padding-left: 5px;
553
- vertical-align: middle;
554
- width: 20px;
555
- }
556
-
557
- #gfpdf_list_form .gfpdf-spinner-small {
558
- width: 15px;
559
- }
560
-
561
- #gfpdf-template-example img {
562
- width: 100%;
563
- max-width: 300px;
564
- border: 1px solid #CCC;
565
- display: block;
566
- margin-top: 5px;
567
- }
568
-
569
- #gfpdf-template-example p {
570
- border: 1px solid #ccc;
571
- display: inline-block;
572
- max-width: 300px;
573
- padding: 0 5px;
574
- text-align: center;
575
- width: 100%;
576
- }
577
-
578
- #gfpdf_pdf_form .gfpdf-toggle-wrapper {
579
- padding-top: 25px;
580
- }
581
-
582
- #gfpdf_pdf_form .gfpdf-tab-container {
583
- border-bottom: 1px solid #e6e6e6;
584
- clear: both;
585
- padding: 0 0 24px 0;
586
- margin: 0 0 24px 0;
587
- }
588
-
589
- #gfpdf_pdf_form .nav-tab-wrapper {
590
- margin-bottom: 20px;
591
- }
592
-
593
- .gfpdf-tab-wrapper.wp-filter {
594
- margin: 0 0 15px;
595
- }
596
-
597
- .gfpdf-page .merge-tag-support {
598
- max-width: none;
599
- }
600
-
601
- .gfpdf-page h4.section-title {
602
- font-weight: bold;
603
- margin-bottom: 0;
604
- }
605
-
606
- .gfpdf-page .form-table li {
607
- list-style: inherit;
608
- }
609
-
610
- /**
611
- * Entry List Page
612
- */
613
- .gfpdf_form_action_has_submenu {
614
- position: relative;
615
- }
616
-
617
- .gfpdf_submenu {
618
- width: 200px;
619
- }
620
-
621
- .gfpdf_submenu li {
622
- border-bottom: 1px solid #eee;
623
- }
624
-
625
- /**
626
- * Gravity Forms Entry Details Page
627
- */
628
- .gfpdf_detailed_pdf_container_pdf {
629
- clear: left;
630
- margin-bottom: 3px;
631
- }
632
-
633
- .gfpdf_detailed_pdf_container span {
634
- display: block;
635
- word-wrap: break-word;
636
- padding: 2px 0 2px 2px;
637
- }
638
-
639
- /*
640
- * Fancy Template Selector
641
- */
642
- #gfpdf-template-container .theme .theme-actions {
643
- opacity: 1;
644
- left: inherit;
645
- border-top: none;
646
- -moz-box-sizing: content-box;
647
- -webkit-box-sizing: content-box;
648
- box-sizing: content-box;
649
- }
650
-
651
- #gfpdf-template-container .wp-filter-search {
652
- margin: 0 0 5px;
653
- font-size: 16px;
654
- font-weight: 300;
655
- line-height: 1.5;
656
-
657
- width: 100%;
658
- }
659
-
660
- #gfpdf-template-container .theme .theme-author {
661
- display: block;
662
- }
663
-
664
- #gfpdf-overlay h1 {
665
- float: left;
666
- padding-left: 2%;
667
- }
668
-
669
- #gfpdf-overlay p.no-themes {
670
- display: block;
671
- font-size: 18px;
672
- }
673
-
674
- #fancy-template-selector {
675
- margin-left: 5px;
676
- vertical-align: middle;
677
- }
678
-
679
- #gpdf-advance-template-selector button {
680
- vertical-align: middle;
681
- margin-left: 5px;
682
- }
683
-
684
- #gfpdf-template-container .theme.add-new-theme a.doing-ajax span:after,
685
- #gfpdf-template-container .theme.add-new-theme a.doing-ajax:hover span:after{
686
- font-family: 'FontAwesome', 'Open Sans', sans-serif;
687
- content: '\f1ce';
688
- font-size: 79px;
689
- background: none;
690
- width: auto;
691
- height: auto;
692
- left: 51.5%;
693
- text-indent: 0;
694
- -webkit-animation: fa-spin 1.5s infinite linear;
695
- animation: fa-spin 1.5s infinite linear;
696
- }
697
-
698
- /*
699
- * Dropzone
700
- */
701
- .theme-browser .theme.add-new-theme.gfpdf-dropzone-active a {
702
- background: rgb(0, 115, 170);
703
- }
704
- .theme-browser .theme.add-new-theme.gfpdf-dropzone-active a:after {
705
- border-color: transparent;
706
- }
707
-
708
- .theme-browser .theme.add-new-theme.gfpdf-dropzone-active a span:after {
709
- background: #FFF;
710
- color: rgb(0, 115, 170);
711
- }
712
-
713
- #gfpdf-template-container .theme.add-new-theme a.doing-ajax:hover span:after,
714
- #gfpdf-template-container .theme.add-new-theme a.doing-ajax:focus span:after,
715
- #gfpdf-template-container .theme.add-new-theme.gfpdf-dropzone-active a.doing-ajax span:after {
716
- color: #FFF;
717
- background: none;
718
- }
719
-
720
- .theme-browser .theme.add-new-theme.gfpdf-dropzone-active .theme-name {
721
- color: #FFF;
722
- }
723
-
724
- .gfpdf-dropzone-reject {
725
- background: red;
726
- }
727
-
728
- .gfpdf-template-install-instructions {
729
- font-size: 85%;
730
- text-align: center;
731
- margin-top: 5px;
732
- }
733
-
734
- /*
735
- * Custom Template Field Style
736
- */
737
- .image-radio-buttons input {
738
- display: none;
739
- }
740
-
741
- .image-radio-buttons img {
742
- padding: 6px;
743
- }
744
-
745
- .image-radio-buttons input:checked + img {
746
- background: #2abbff;
747
- }
748
-
749
-
750
- @media only screen and (min-width: 500px) {
751
-
752
- /**
753
- * Responsive Welcome Page
754
- */
755
- .about-wrap .gfpdf-badge {
756
- position: absolute;
757
- right: 0;
758
- top: 0;
759
- margin: 0;
760
- width: 130px;
761
- }
762
-
763
- .rtl .about-wrap .gfpdf-badge {
764
- left: 0;
765
- right: auto;
766
- }
767
- }
768
-
769
- @media only screen and (max-width: 780px) {
770
- #pdfextended-settings table.gfpdf_table th, #pdfextended-settings table.gfpdf_table td {
771
- display: block;
772
- vertical-align: middle;
773
- width: auto;
774
- }
775
-
776
- /* Chosen Styles */
777
- .gfpdf-page .chosen-container {
778
- font-size: 17px;
779
- }
780
-
781
- .gfpdf-page .chosen-container-single .chosen-single {
782
- height: 38px;
783
- line-height: 34px;
784
- }
785
-
786
- .gfpdf-page .chosen-container-single .chosen-single div {
787
- top: 7px;
788
- }
789
-
790
- .gfpdf-page .chosen-container .chosen-results li {
791
- line-height: 24px;
792
- }
793
-
794
- .gfpdf-page .chosen-container-multi .chosen-choices li.search-choice {
795
- line-height: 24px;
796
- }
797
-
798
- .gfpdf-page .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
799
- top: 10px;
800
- }
801
-
802
- .gfpdf-page .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
803
- height: 38px;
804
- }
805
-
806
- /* Input Styles */
807
- .gfpdf-page .form-table tbody td input[type="number"] {
808
- font-size: 16px;
809
- line-height: 1.5;
810
- padding: 7px 10px;
811
- }
812
-
813
- .gfpdf-page .form-table tbody td label {
814
- display: block;
815
- font-size: 16px;
816
- }
817
-
818
- .gfpdf-page .form-table tbody td label:first-of-type {
819
- margin-top: 10px;
820
- }
821
-
822
- .gfpdf-page .form-table th,
823
- .gfpdf-page .form-table td,
824
- .gfpdf-page .gfpdf_table th,
825
- .gfpdf-page .gfpdf_table td,
826
- .gf_delete_notice,
827
- #manage-font-files {
828
- font-size: 16px;
829
- }
830
-
831
- .gf_delete_notice,
832
- #manage-font-files {
833
- line-height: 21px;
834
- }
835
-
836
- .gfpdf-page .form-table tbody .conditional_logic td label {
837
- display: inline;
838
- }
839
-
840
- .gfpdf-page .form-table tbody td input[type="number"] {
841
- padding-right: 3px;
842
- }
843
- }
844
-
845
- @media only screen and (min-width: 782px) {
846
-
847
- /**
848
- * Add out mascot on larger displays only
849
- */
850
- .gfpdf-mascot-sitting {
851
- background: url("../../../src/assets/images/cap-paws-sitting.png") no-repeat 0 0;
852
- width: 181px;
853
- height: 193px;
854
- display: inline-block;
855
- float: right;
856
- margin-top: -149px;
857
- position: relative;
858
- z-index: 100;
859
- }
860
-
861
- .rtl .gfpdf-mascot-sitting {
862
- float: left;
863
- }
864
-
865
- #gfpdf-mascot-container {
866
- padding-bottom: 120px !important;
867
- }
868
-
869
- #pdfextended-settings table.gfpdf_table tbody th {
870
- width: 200px;
871
- }
872
-
873
- #manage-font-files .gf_settings_description {
874
- margin: 0 0 6px 9.5em;
875
- }
876
-
877
- #pdfextended-settings .about-wrap #dashboard-widgets.columns-2 .postbox-container {
878
- width: 49.5%;
879
- }
880
-
881
- #pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a {
882
- margin-right: 30px;
883
- min-height: 245px;
884
- }
885
-
886
- #pdfextended-settings #pdf-system-status th {
887
- padding-top: 12px;
888
- padding-bottom: 12px;
889
- }
890
-
891
- #pdfextended-settings #pdf-system-status td {
892
- padding-top: 10px;
893
- padding-bottom: 10px;
894
- }
895
-
896
- /* Chosen Styles */
897
- .gfpdf-page .chosen-container {
898
- max-width: 300px;
899
- }
900
-
901
- /* Conditional Logic */
902
- #gfpdf_conditional_logic_container .gf_conditional_logic_rules_container :first-child {
903
- max-width: 250px;
904
- width: 100%;
905
- }
906
- }
907
-
908
- @media only screen and (min-width: 900px) {
909
-
910
- /**
911
- * Help and Support
912
- */
913
- #pdfextended-settings .help-container .postbox {
914
- width: 32.66%;
915
- float: left;
916
- margin-left: 0.5%;
917
- margin-right: 0.5%;
918
- min-width: 0;
919
- }
920
-
921
- #pdfextended-settings .help-container .postbox:first-child {
922
- margin-left: 0;
923
- }
924
-
925
- #pdfextended-settings .help-container .postbox:last-child {
926
- margin-right: 0;
927
- }
928
- }
929
-
930
-
931
-
932
- /* Add media queries */
933
- @media only screen and (min-width: 1000px) {
934
-
935
- /**
936
- * License page
937
- */
938
- #pdf-system-status #license label {
939
- float: left;
940
- width: 20%;
941
- }
942
-
943
- #pdf-system-status #license span.container {
944
- float: left;
945
- width: 80%;
946
- }
947
-
948
- #pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a {
949
- min-height: 180px;
950
- }
951
- }
952
-
953
- @media only screen and (max-width: 1120px) {
954
- #gfpdf-template-container .theme:nth-child(odd) {
955
- margin-right: 2%;
956
- }
957
- }
958
-
959
-
960
- @media only screen and (min-width: 1400px) {
961
- /**
962
- * Help and Support
963
- */
964
-
965
- #pdfextended-settings .about-wrap #search-knowledgebase input,
966
- #pdfextended-settings #search-results, #pdfextended-settings .help-container{
967
- width: 75%;
968
- }
969
-
970
- #pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a {
971
- min-height: 90px;
972
- }
973
- }
974
-
975
- @media only screen and (min-width: 1640px) {
976
- #gfpdf-template-container .theme {
977
- margin: 0 2% 2% 0;
978
- }
979
-
980
- #gfpdf-template-container .wp-filter-search {
981
- width: 22.7%;
982
- }
983
- }
1
+ /**
2
+ * Welcome Page
3
+ */
4
+
5
+ .about-wrap .gfpdf-badge {
6
+ margin-bottom: 1.5em;
7
+ position: relative;
8
+ width: 100%;
9
+ }
10
+
11
+ .about-wrap .feature-section:not(.under-the-hood) .col.gfpdf-breakdown {
12
+ margin-top: 0;
13
+ }
14
+
15
+ .gfpdf-badge {
16
+ background: url("../../../src/assets/images/gravitypdf-globe-black.png") no-repeat 50% 5px;
17
+ color: #333;
18
+ display: inline-block;
19
+ font-size: 14px;
20
+ font-weight: 600;
21
+ height: 40px;
22
+ margin: 5px 0 0;
23
+ padding-top: 120px;
24
+ text-align: center;
25
+ text-rendering: optimizelegibility;
26
+ }
27
+
28
+ .gfpdf-page .about-wrap [class$="col"] .col {
29
+ border-bottom: none;
30
+ }
31
+
32
+ .gfpdf-page .about-wrap .feature-section {
33
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1 );
34
+ }
35
+
36
+ .gfpdf-page .about-wrap .feature-section.two-col .col {
37
+ vertical-align: middle;
38
+ }
39
+
40
+ div img.gfpdf-image {
41
+ border: 1px solid #CCC;
42
+ max-width: 98%;
43
+
44
+ -webkit-box-shadow: 1px 1px 5px 1px rgba(0,0,0,0.15);
45
+ -moz-box-shadow: 1px 1px 5px 1px rgba(0,0,0,0.15);
46
+ box-shadow: 1px 1px 5px 1px rgba(0,0,0,0.15);
47
+
48
+ }
49
+
50
+
51
+
52
+ /**
53
+ * General Settings Page
54
+ */
55
+ #pdfextended-settings {
56
+ margin-top: 20px;
57
+ }
58
+
59
+ #pdfextended-settings h3,
60
+ #tab_pdf h3 {
61
+ margin-top: 5px;
62
+ line-height: 1.3em;
63
+ }
64
+
65
+ #pdfextended-settings h3 i,
66
+ #tab_pdf h3 i {
67
+ padding-right: 2px;
68
+ }
69
+
70
+ #pdfextended-settings #add-new-pdf {
71
+ padding: 4px 8px;
72
+ }
73
+
74
+ #pdfextended-settings div.notice, div.pdf-notice {
75
+ margin: 5px 15px 2px;
76
+ padding: 0 0.6em;
77
+ }
78
+
79
+ .gfpdf-page #pdfextended-settings .theme div.notice,
80
+ .gfpdf-page .theme div.notice,
81
+ .gfpdf-page #pdfextended-settings .theme-info div.notice,
82
+ .gfpdf-page .theme-info div.notice{
83
+ margin: 0;
84
+ z-index: 500;
85
+ color: #444;
86
+ padding: 1px 12px;
87
+ }
88
+
89
+ .gfpdf-page div.notice, div.pdf-notice,
90
+ .gfpdf-page div.error, div.pdf-error {
91
+ background-color: #FFFFFF;
92
+ border-left: 4px solid #7AD03A;
93
+ box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
94
+ }
95
+
96
+ .gfpdf-page div.error, div.pdf-error {
97
+ border-left-color: #dc3232;
98
+ }
99
+
100
+ .gfpdf-page div.notice, div.pdf-notice {
101
+ margin: 5px 0 15px;
102
+ padding: 1px 12px;
103
+ }
104
+
105
+ #pdfextended-settings #gfpdf-advanced-options,
106
+ #tab_pdf #gfpdf-advanced-options {
107
+ display: none;
108
+ margin-bottom: 20px;
109
+ }
110
+
111
+ .no-js #pdfextended-settings #gfpdf-advanced-options,
112
+ .no-js #tab_pdf #gfpdf-advanced-options {
113
+ display: block;
114
+ }
115
+
116
+ #pdfextended-settings .gfpdf-advanced-options,
117
+ #tab_pdf .gfpdf-advanced-options {
118
+ margin-top: -5px;
119
+ }
120
+
121
+ .no-js #pdfextended-settings .gfpdf-advanced-options,
122
+ .no-js #tab_pdf .gfpdf-advanced-options {
123
+ display: none;
124
+ }
125
+
126
+ #pdfextended-settings select.large,
127
+ #tab_pdf select.large {
128
+ width: 100%;
129
+ max-width: 350px;
130
+ }
131
+
132
+ #tab_pdf .formSubmitted input:invalid {
133
+ border: 1px solid red;
134
+ }
135
+
136
+ #tab_pdf .wp-editor-wrap {
137
+ margin: 0 12px 0 0;
138
+ }
139
+
140
+ .rtl #pdfextended-settings label, .rtl #tab_pdf label {
141
+ float: right;
142
+ margin-left: 5px;
143
+ }
144
+
145
+ /*
146
+ * License page
147
+ */
148
+ #pdf-license .fa-exclamation-circle {
149
+ color: red;
150
+ }
151
+
152
+ #pdf-license .fa-check {
153
+ color: green;
154
+ }
155
+
156
+ /**
157
+ * Tools Settings Page
158
+ */
159
+
160
+ #pdfextended-settings table.gfpdf_table thead th {
161
+ font-weight: bold;
162
+ }
163
+
164
+ #pdfextended-settings table.gfpdf_table tr:nth-child(2n) td,
165
+ #pdfextended-settings table.gfpdf_table tr:nth-child(2n) th {
166
+ background: none repeat scroll 0 0 #fcfcfc;
167
+ }
168
+
169
+ #pdfextended-settings p.submit {
170
+ padding-bottom: 0;
171
+ margin-bottom: 0;
172
+ }
173
+
174
+ #pdfextended-settings span.path,
175
+ #pdfextended-settings span.details.path {
176
+ padding: 2px;
177
+ background: #f2f2f2;
178
+ }
179
+
180
+ #setup-templates-confirm ul {
181
+ margin-top: 5px;
182
+ }
183
+ #setup-templates-confirm li {
184
+ list-style-type: disc;
185
+ margin-left: 20px;
186
+ }
187
+
188
+ #manage-font-files div {
189
+ margin: 10px 0;
190
+ }
191
+
192
+ #manage-font-files div.updated {
193
+ margin-top: 0;
194
+ }
195
+
196
+ #manage-font-files li {
197
+ border: 1px solid #CCC;
198
+ position: relative;
199
+ }
200
+
201
+ #manage-font-files li .delete-font {
202
+ position: absolute;
203
+ top: 0;
204
+ right: 0;
205
+ padding: 5px 10px;
206
+ }
207
+
208
+ #manage-font-files li .delete-font:hover {
209
+ background: #dc0606;
210
+ color: #FFF;
211
+ }
212
+
213
+ #manage-font-files input.invalid {
214
+ border: 1px solid red;
215
+ }
216
+
217
+ #manage-font-files .font-submit {
218
+ text-align: center;
219
+ }
220
+
221
+ #manage-font-files #font-add-list {
222
+ border: none;
223
+ text-align: center;
224
+ color: #ccc;
225
+ cursor: pointer;
226
+ }
227
+
228
+ #manage-font-files #font-empty {
229
+ font-size: 14px;
230
+ font-style: italic;
231
+ line-height: 21px;
232
+ padding: 60px 0 15px;
233
+ text-align: center;
234
+ }
235
+
236
+ #manage-font-files #font-add-list:hover {
237
+ color: #555;
238
+ }
239
+
240
+ #manage-font-files #font-add-list span {
241
+ display: block;
242
+ text-transform: uppercase;
243
+ margin-top: -5px;
244
+ }
245
+
246
+ #manage-font-files li a {
247
+ display: block;
248
+ background: #EEE;
249
+ padding: 5px 7px;
250
+ text-decoration: none;
251
+ }
252
+
253
+ #manage-font-files li a.font-name .fa {
254
+ margin-right: 5px;
255
+ }
256
+
257
+ #manage-font-files li a:hover {
258
+ background: #e9e9e9;
259
+ }
260
+
261
+ #manage-font-files .font-settings {
262
+ padding: 5px 7px;
263
+ }
264
+
265
+ #manage-font-files .gf_settings_description {
266
+ font-size: 95%;
267
+ }
268
+
269
+ #manage-font-files .font-settings > label, #manage-font-files .font-selector > label {
270
+ float: left;
271
+ width: 9em;
272
+ }
273
+
274
+ #manage-font-files .regular-text {
275
+ width: 16em;
276
+ }
277
+
278
+ #manage-font-files .css-usage {
279
+ text-align: center;
280
+ }
281
+
282
+ #manage-font-files .css-usage input {
283
+ width: 100%;
284
+ text-align: center;
285
+ }
286
+
287
+ #manage-font-files .css-usage pre {
288
+ margin: 5px 0;
289
+ background: #EEE;
290
+ padding: 7.5px;
291
+ }
292
+
293
+ .rtl #font-list .css-usage input {
294
+ direction: ltr !important;
295
+ }
296
+
297
+ /**
298
+ * Help Settings Page
299
+ */
300
+ #pdfextended-settings .metabox-holder h3 {
301
+ font-size: 14px;
302
+ }
303
+
304
+ #pdfextended-settings .postbox-container .postbox {
305
+ margin: 0 8px 20px 0;
306
+ }
307
+
308
+ #pdfextended-settings .postbox h3.hndle {
309
+ padding-bottom: 12px;
310
+ }
311
+
312
+ #pdfextended-settings .postbox .hndle, #pdfextended-settings .widget .widget-top {
313
+ cursor: default;
314
+ }
315
+
316
+ #pdfextended-settings .postbox .handlediv,
317
+ #pdfextended-settings #pdf_support_hours h3 {
318
+ display: none;
319
+ }
320
+
321
+ #pdfextended-settings .about-wrap, #pdfextended-settings .about-wrap .about-text {
322
+ max-width: none;
323
+ min-height: 0;
324
+ line-height: 1.8em;
325
+ }
326
+
327
+ #pdfextended-settings .about-wrap h1, #pdfextended-settings .about-wrap .about-text, #pdfextended-settings .about-wrap #search-knowledgebase {
328
+ text-align: center;
329
+ margin-right: 0;
330
+ }
331
+
332
+ #pdfextended-settings .postbox .inside {
333
+ margin-bottom: 0;
334
+ }
335
+
336
+ #pdfextended-settings .about-wrap h1 {
337
+ margin-top: 40px;
338
+ }
339
+
340
+ #pdfextended-settings .about-wrap #search-knowledgebase input {
341
+ font-family: 'FontAwesome', 'Open Sans', sans-serif;
342
+ font-size: 22px;
343
+ margin: 10px 0 0;
344
+ padding: 16px 20px;
345
+ line-height: 25px;
346
+ width: 100%;
347
+ }
348
+
349
+ #pdfextended-settings #search-results {
350
+ text-align: left;
351
+ margin: 0 auto;
352
+ width: 100%;
353
+ }
354
+
355
+ #pdfextended-settings #search-results .postbox, #search-results .postbox .inside {
356
+ display: none;
357
+ }
358
+
359
+ #pdfextended-settings #search-results .postbox h3 {
360
+ margin-bottom: 0;
361
+ }
362
+
363
+ #pdfextended-settings #search-results .postbox.is-active h3 {
364
+ margin-bottom: 8px;
365
+ }
366
+
367
+ #pdfextended-settings #dashboard_primary .rss-widget .rssSummary .continue-reading {
368
+ display: none;
369
+ }
370
+
371
+ #pdfextended-settings .spinner.is-active {
372
+ visibility: visible;
373
+ margin: 0;
374
+ }
375
+
376
+ #pdfextended-settings .rss-widget ul li {
377
+ padding: 6px 0;
378
+ margin: 0;
379
+ border-bottom: 1px dotted #CCC;
380
+ }
381
+
382
+ #pdfextended-settings .rss-widget ul li a {
383
+ font-size: 16px;
384
+ }
385
+
386
+ #pdfextended-settings .rss-widget ul li:first-child,
387
+ #pdfextended-settings .rss-widget ul li:last-child {
388
+ border-bottom: none;
389
+ }
390
+
391
+ #pdfextended-settings .about-wrap .about-text-disclaimer {
392
+ font-size: 13px;
393
+ }
394
+
395
+ #pdfextended-settings .about-wrap #dashboard-widgets.columns-2 .postbox-container {
396
+ width: 100%
397
+ }
398
+
399
+ #pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a {
400
+ background: #f6f6f6 none repeat scroll 0 0;
401
+ border: 3px solid #eee;
402
+ border-radius: 10px;
403
+ color: inherit;
404
+ display: block;
405
+ padding: 15px;
406
+ font-size: 16px;
407
+ text-decoration: none;
408
+ margin-bottom: 30px;
409
+ transition: all 0.5s ease 0s;
410
+ }
411
+
412
+ #pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a:hover {
413
+ border: 3px solid #076aa4;
414
+ }
415
+
416
+ #pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a span {
417
+ font-weight: bold;
418
+ }
419
+
420
+ #pdfextended-settings .about-wrap .center {
421
+ text-align: center;
422
+ }
423
+
424
+ #pdfextended-settings .about-wrap .button.button-large {
425
+ height: 35px;
426
+ line-height: 33px;
427
+ padding: 0 17px 9px;
428
+ }
429
+
430
+
431
+
432
+ /**
433
+ * System status icons
434
+ */
435
+ #pdf-system-status .fa-check-circle, #pdf-system-status .fa-exclamation-triangle, #pdf-system-status .fa-times-circle {
436
+ font-size: 17px;
437
+ margin-left: 5px;
438
+ vertical-align: bottom;
439
+ margin-top: -2px;
440
+ }
441
+
442
+ #pdf-system-status .fa-check-circle {
443
+ color: #008000;
444
+ }
445
+
446
+ #pdf-system-status .fa-exclamation-triangle {
447
+ color: #ff8a00;
448
+ }
449
+
450
+ #pdf-system-status .fa-times-circle {
451
+ color: #d10b0b;
452
+ }
453
+
454
+
455
+ /**
456
+ * License page
457
+ */
458
+
459
+ #pdf-system-status #license input[type="email"], #pdf-system-status #license input[type="number"], #pdf-system-status #license input[type="password"], #pdf-system-status #license input[type="search"], #pdf-system-status #license input[type="tel"], #pdf-system-status #license input[type="text"], #pdf-system-status #license input[type="url"], #pdf-system-status #license select, #pdf-system-status #license textarea {
460
+ background-color: #FFFFFF;
461
+ border: 1px solid #DDDDDD;
462
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07) inset;
463
+ color: #333333;
464
+ width: 100%;
465
+ }
466
+
467
+ #pdf-system-status #license input[type="text"][readonly="readonly"] {
468
+ background: #EEE;
469
+ cursor: not-allowed;
470
+ }
471
+
472
+ #pdf-system-status #license label {
473
+ font-weight: bold;
474
+ line-height: 30px;
475
+ color: #222;
476
+ font-size: 14px;
477
+ float: left;
478
+ width: 20em;
479
+ }
480
+
481
+ #pdf-system-status #license .expires, #pdf-system-status #license .inactive, #pdf-system-status #license .limit, #pdf-system-status #license .expired, #pdf-system-status #license .deactivate {
482
+ font-style: italic;
483
+ }
484
+
485
+ #pdf-system-status #license .expired {
486
+ display: block;
487
+ color: #9e0b0f;
488
+ }
489
+
490
+ #pdf-system-status #license .gf_keystatus_invalid,
491
+ #pdf-system-status #license .gf_keystatus_valid {
492
+ font-size: 120%;
493
+ }
494
+
495
+ #pdf-system-status #license p {
496
+ clear: left;
497
+ float: left;
498
+ width: 100%;
499
+ }
500
+
501
+ #pdf-system-status #license span.container {
502
+ display: block;
503
+ }
504
+
505
+
506
+ /**
507
+ * PDF Form Settings List
508
+ */
509
+ #gfpdf_list_form .check-column {
510
+ width: 50px;
511
+ }
512
+
513
+ #gfpdf_list_form .duplicate a:hover,
514
+ #gfpdf_list_form .delete a:hover {
515
+ cursor: pointer;
516
+ }
517
+
518
+ #gfpdf_list_form .gravitypdf_shortcode {
519
+ background: #EEE;
520
+ width: 100%;
521
+ padding: 5px;
522
+ outline: none;
523
+ }
524
+
525
+ #gfpdf_list_form .gravitypdf_shortcode:focus {
526
+
527
+ }
528
+
529
+ /**
530
+ * PDF Form Settings (individual)
531
+ */
532
+ .gfpdf-hidden {
533
+ display: none;
534
+ }
535
+
536
+ .gfpdf_conditional_logic {
537
+ margin-top: 10px;
538
+ }
539
+
540
+ #pdf-form-settings .conditional_logic th {
541
+ padding-top: 15px;
542
+ }
543
+
544
+ #pdf-form-settings .conditional_logic td {
545
+ vertical-align: top;
546
+ }
547
+
548
+ #pdf-form-settings .gfpdf-spinner,
549
+ #pdfextended-settings .gfpdf-spinner,
550
+ .wp-dialog .gfpdf-spinner,
551
+ #gfpdf_list_form .gfpdf-spinner {
552
+ padding-left: 5px;
553
+ vertical-align: middle;
554
+ width: 20px;
555
+ }
556
+
557
+ #gfpdf_list_form .gfpdf-spinner-small {
558
+ width: 15px;
559
+ }
560
+
561
+ #gfpdf-template-example img {
562
+ width: 100%;
563
+ max-width: 300px;
564
+ border: 1px solid #CCC;
565
+ display: block;
566
+ margin-top: 5px;
567
+ }
568
+
569
+ #gfpdf-template-example p {
570
+ border: 1px solid #ccc;
571
+ display: inline-block;
572
+ max-width: 300px;
573
+ padding: 0 5px;
574
+ text-align: center;
575
+ width: 100%;
576
+ }
577
+
578
+ #gfpdf_pdf_form .gfpdf-toggle-wrapper {
579
+ padding-top: 25px;
580
+ }
581
+
582
+ #gfpdf_pdf_form .gfpdf-tab-container {
583
+ border-bottom: 1px solid #e6e6e6;
584
+ clear: both;
585
+ padding: 0 0 24px 0;
586
+ margin: 0 0 24px 0;
587
+ }
588
+
589
+ #gfpdf_pdf_form .nav-tab-wrapper {
590
+ margin-bottom: 20px;
591
+ }
592
+
593
+ .gfpdf-tab-wrapper.wp-filter {
594
+ margin: 0 0 15px;
595
+ }
596
+
597
+ .gfpdf-page .merge-tag-support {
598
+ max-width: none;
599
+ }
600
+
601
+ .gfpdf-page h4.section-title {
602
+ font-weight: bold;
603
+ margin-bottom: 0;
604
+ }
605
+
606
+ .gfpdf-page .form-table li {
607
+ list-style: inherit;
608
+ }
609
+
610
+ /**
611
+ * Entry List Page
612
+ */
613
+ .gfpdf_form_action_has_submenu {
614
+ position: relative;
615
+ }
616
+
617
+ .gfpdf_submenu {
618
+ width: 200px;
619
+ }
620
+
621
+ .gfpdf_submenu li {
622
+ border-bottom: 1px solid #eee;
623
+ }
624
+
625
+ /**
626
+ * Gravity Forms Entry Details Page
627
+ */
628
+ .gfpdf_detailed_pdf_container_pdf {
629
+ clear: left;
630
+ margin-bottom: 3px;
631
+ }
632
+
633
+ .gfpdf_detailed_pdf_container span {
634
+ display: block;
635
+ word-wrap: break-word;
636
+ padding: 2px 0 2px 2px;
637
+ }
638
+
639
+ /*
640
+ * Fancy Template Selector
641
+ */
642
+ #gfpdf-template-container .theme .theme-actions {
643
+ opacity: 1;
644
+ left: inherit;
645
+ border-top: none;
646
+ -moz-box-sizing: content-box;
647
+ -webkit-box-sizing: content-box;
648
+ box-sizing: content-box;
649
+ }
650
+
651
+ #gfpdf-template-container .wp-filter-search {
652
+ margin: 0 0 5px;
653
+ font-size: 16px;
654
+ font-weight: 300;
655
+ line-height: 1.5;
656
+
657
+ width: 100%;
658
+ }
659
+
660
+ #gfpdf-template-container .theme .theme-author {
661
+ display: block;
662
+ }
663
+
664
+ #gfpdf-overlay h1 {
665
+ float: left;
666
+ padding-left: 2%;
667
+ }
668
+
669
+ #gfpdf-overlay p.no-themes {
670
+ display: block;
671
+ font-size: 18px;
672
+ }
673
+
674
+ #fancy-template-selector {
675
+ margin-left: 5px;
676
+ vertical-align: middle;
677
+ }
678
+
679
+ #gpdf-advance-template-selector button {
680
+ vertical-align: middle;
681
+ margin-left: 5px;
682
+ }
683
+
684
+ #gfpdf-template-container .theme.add-new-theme a.doing-ajax span:after,
685
+ #gfpdf-template-container .theme.add-new-theme a.doing-ajax:hover span:after{
686
+ font-family: 'FontAwesome', 'Open Sans', sans-serif;
687
+ content: '\f1ce';
688
+ font-size: 79px;
689
+ background: none;
690
+ width: auto;
691
+ height: auto;
692
+ left: 51.5%;
693
+ text-indent: 0;
694
+ -webkit-animation: fa-spin 1.5s infinite linear;
695
+ animation: fa-spin 1.5s infinite linear;
696
+ }
697
+
698
+ /*
699
+ * Dropzone
700
+ */
701
+ .theme-browser .theme.add-new-theme.gfpdf-dropzone-active a {
702
+ background: rgb(0, 115, 170);
703
+ }
704
+ .theme-browser .theme.add-new-theme.gfpdf-dropzone-active a:after {
705
+ border-color: transparent;
706
+ }
707
+
708
+ .theme-browser .theme.add-new-theme.gfpdf-dropzone-active a span:after {
709
+ background: #FFF;
710
+ color: rgb(0, 115, 170);
711
+ }
712
+
713
+ #gfpdf-template-container .theme.add-new-theme a.doing-ajax:hover span:after,
714
+ #gfpdf-template-container .theme.add-new-theme a.doing-ajax:focus span:after,
715
+ #gfpdf-template-container .theme.add-new-theme.gfpdf-dropzone-active a.doing-ajax span:after {
716
+ color: #FFF;
717
+ background: none;
718
+ }
719
+
720
+ .theme-browser .theme.add-new-theme.gfpdf-dropzone-active .theme-name {
721
+ color: #FFF;
722
+ }
723
+
724
+ .gfpdf-dropzone-reject {
725
+ background: red;
726
+ }
727
+
728
+ .gfpdf-template-install-instructions {
729
+ font-size: 85%;
730
+ text-align: center;
731
+ margin-top: 5px;
732
+ }
733
+
734
+ /*
735
+ * Custom Template Field Style
736
+ */
737
+ .image-radio-buttons input {
738
+ display: none;
739
+ }
740
+
741
+ .image-radio-buttons img {
742
+ padding: 6px;
743
+ }
744
+
745
+ .image-radio-buttons input:checked + img {
746
+ background: #2abbff;
747
+ }
748
+
749
+
750
+ @media only screen and (min-width: 500px) {
751
+
752
+ /**
753
+ * Responsive Welcome Page
754
+ */
755
+ .about-wrap .gfpdf-badge {
756
+ position: absolute;
757
+ right: 0;
758
+ top: 0;
759
+ margin: 0;
760
+ width: 130px;
761
+ }
762
+
763
+ .rtl .about-wrap .gfpdf-badge {
764
+ left: 0;
765
+ right: auto;
766
+ }
767
+ }
768
+
769
+ @media only screen and (max-width: 780px) {
770
+ #pdfextended-settings table.gfpdf_table th, #pdfextended-settings table.gfpdf_table td {
771
+ display: block;
772
+ vertical-align: middle;
773
+ width: auto;
774
+ }
775
+
776
+ /* Chosen Styles */
777
+ .gfpdf-page .chosen-container {
778
+ font-size: 17px;
779
+ }
780
+
781
+ .gfpdf-page .chosen-container-single .chosen-single {
782
+ height: 38px;
783
+ line-height: 34px;
784
+ }
785
+
786
+ .gfpdf-page .chosen-container-single .chosen-single div {
787
+ top: 7px;
788
+ }
789
+
790
+ .gfpdf-page .chosen-container .chosen-results li {
791
+ line-height: 24px;
792
+ }
793
+
794
+ .gfpdf-page .chosen-container-multi .chosen-choices li.search-choice {
795
+ line-height: 24px;
796
+ }
797
+
798
+ .gfpdf-page .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
799
+ top: 10px;
800
+ }
801
+
802
+ .gfpdf-page .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
803
+ height: 38px;
804
+ }
805
+
806
+ /* Input Styles */
807
+ .gfpdf-page .form-table tbody td input[type="number"] {
808
+ font-size: 16px;
809
+ line-height: 1.5;
810
+ padding: 7px 10px;
811
+ }
812
+
813
+ .gfpdf-page .form-table tbody td label {
814
+ display: block;
815
+ font-size: 16px;
816
+ }
817
+
818
+ .gfpdf-page .form-table tbody td label:first-of-type {
819
+ margin-top: 10px;
820
+ }
821
+
822
+ .gfpdf-page .form-table th,
823
+ .gfpdf-page .form-table td,
824
+ .gfpdf-page .gfpdf_table th,
825
+ .gfpdf-page .gfpdf_table td,
826
+ .gf_delete_notice,
827
+ #manage-font-files {
828
+ font-size: 16px;
829
+ }
830
+
831
+ .gf_delete_notice,
832
+ #manage-font-files {
833
+ line-height: 21px;
834
+ }
835
+
836
+ .gfpdf-page .form-table tbody .conditional_logic td label {
837
+ display: inline;
838
+ }
839
+
840
+ .gfpdf-page .form-table tbody td input[type="number"] {
841
+ padding-right: 3px;
842
+ }
843
+ }
844
+
845
+ @media only screen and (min-width: 782px) {
846
+
847
+ /**
848
+ * Add out mascot on larger displays only
849
+ */
850
+ .gfpdf-mascot-sitting {
851
+ background: url("../../../src/assets/images/cap-paws-sitting.png") no-repeat 0 0;
852
+ width: 181px;
853
+ height: 193px;
854
+ display: inline-block;
855
+ float: right;
856
+ margin-top: -149px;
857
+ position: relative;
858
+ z-index: 100;
859
+ }
860
+
861
+ .rtl .gfpdf-mascot-sitting {
862
+ float: left;
863
+ }
864
+
865
+ #gfpdf-mascot-container {
866
+ padding-bottom: 120px !important;
867
+ }
868
+
869
+ #pdfextended-settings table.gfpdf_table tbody th {
870
+ width: 200px;
871
+ }
872
+
873
+ #manage-font-files .gf_settings_description {
874
+ margin: 0 0 6px 9.5em;
875
+ }
876
+
877
+ #pdfextended-settings .about-wrap #dashboard-widgets.columns-2 .postbox-container {
878
+ width: 49.5%;
879
+ }
880
+
881
+ #pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a {
882
+ margin-right: 30px;
883
+ min-height: 245px;
884
+ }
885
+
886
+ #pdfextended-settings #pdf-system-status th {
887
+ padding-top: 12px;
888
+ padding-bottom: 12px;
889
+ }
890
+
891
+ #pdfextended-settings #pdf-system-status td {
892
+ padding-top: 10px;
893
+ padding-bottom: 10px;
894
+ }
895
+
896
+ /* Chosen Styles */
897
+ .gfpdf-page .chosen-container {
898
+ max-width: 300px;
899
+ }
900
+
901
+ /* Conditional Logic */
902
+ #gfpdf_conditional_logic_container .gf_conditional_logic_rules_container :first-child {
903
+ max-width: 250px;
904
+ width: 100%;
905
+ }
906
+ }
907
+
908
+ @media only screen and (min-width: 900px) {
909
+
910
+ /**
911
+ * Help and Support
912
+ */
913
+ #pdfextended-settings .help-container .postbox {
914
+ width: 32.66%;
915
+ float: left;
916
+ margin-left: 0.5%;
917
+ margin-right: 0.5%;
918
+ min-width: 0;
919
+ }
920
+
921
+ #pdfextended-settings .help-container .postbox:first-child {
922
+ margin-left: 0;
923
+ }
924
+
925
+ #pdfextended-settings .help-container .postbox:last-child {
926
+ margin-right: 0;
927
+ }
928
+ }
929
+
930
+
931
+
932
+ /* Add media queries */
933
+ @media only screen and (min-width: 1000px) {
934
+
935
+ /**
936
+ * License page
937
+ */
938
+ #pdf-system-status #license label {
939
+ float: left;
940
+ width: 20%;
941
+ }
942
+
943
+ #pdf-system-status #license span.container {
944
+ float: left;
945
+ width: 80%;
946
+ }
947
+
948
+ #pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a {
949
+ min-height: 180px;
950
+ }
951
+ }
952
+
953
+ @media only screen and (max-width: 1120px) {
954
+ #gfpdf-template-container .theme:nth-child(odd) {
955
+ margin-right: 2%;
956
+ }
957
+ }
958
+
959
+
960
+ @media only screen and (min-width: 1400px) {
961
+ /**
962
+ * Help and Support
963
+ */
964
+
965
+ #pdfextended-settings .about-wrap #search-knowledgebase input,
966
+ #pdfextended-settings #search-results, #pdfextended-settings .help-container{
967
+ width: 75%;
968
+ }
969
+
970
+ #pdfextended-settings .about-wrap #dashboard-widgets .postbox-container a {
971
+ min-height: 90px;
972
+ }
973
+ }
974
+
975
+ @media only screen and (min-width: 1640px) {
976
+ #gfpdf-template-container .theme {
977
+ margin: 0 2% 2% 0;
978
+ }
979
+
980
+ #gfpdf-template-container .wp-filter-search {
981
+ width: 22.7%;
982
+ }
983
+ }
src/assets/js/gfpdf-backbone.js CHANGED
@@ -1,1113 +1,1113 @@
1
- /**
2
- * Gravity PDF Settings JS Logic
3
- * Dependancies: backbone, underscore, jquery
4
- * @since 4.0
5
- */
6
-
7
- (function($) {
8
-
9
- $(function() {
10
-
11
- /**
12
- * To prevent problems with PHP's ASP Short tags (removed in PHP 7) we'll change Underscore's delimiters to be Handlebars-ish:
13
- * {{= }}, {{- }} or {{ }}
14
- *
15
- * @see https://github.com/GravityPDF/gravity-pdf/issues/417
16
- * @type {{interpolate: RegExp, evaluate: RegExp, escape: RegExp}}
17
- * @since 4.0.1
18
- */
19
- var UnderscoreSettingsOverride = {
20
- evaluate: /\{\{(.+?)\}\}/gim,
21
- interpolate: /\{\{=(.+?)\}\}/gim,
22
- escape: /\{\{-(.+?)\}\}/gim
23
- };
24
-
25
-
26
- /**
27
- * Handles our Font CRUD Feature
28
- * Allows URLs to TTF font files to be passed
29
- * to a specific custom font 'group' defined by the user.
30
- *
31
- * Backbone model's save and destroy methods have been overridden
32
- * to work with WordPress' ajax-admin.php file endpoint.
33
- *
34
- * @since 4.0
35
- */
36
- var Fonts = {
37
- Model: {},
38
- Collection: {},
39
- View: {},
40
- Misc: {},
41
- };
42
-
43
-
44
- /**
45
- * Our Font Backbone Model which handles validation, saving and deleting
46
- * @since 4.0
47
- */
48
- Fonts.Model.Core = Backbone.Model.extend({
49
- /**
50
- * Set our default model parameters
51
- * Existing models pulled from the database also have an ID parameter
52
- * @type {Object}
53
- * @since 4.0
54
- */
55
- defaults: {
56
- font_name: '',
57
- regular: '',
58
- bold: '',
59
- italics: '',
60
- bolditalics: '',
61
- disabled: false,
62
- },
63
-
64
- /**
65
- * Set our custom endpoint to be used to sync the model
66
- * @type String
67
- * @since 4.0
68
- */
69
- url: GFPDF.ajaxUrl,
70
-
71
- /**
72
- * Route save through ajax-admin.php which doesn't support standard
73
- * REST API features. Emulate POST and JSON data structures.
74
- * @param Object options
75
- * @param Object additional configuration options
76
- * @return Object
77
- * @since 4.0
78
- */
79
- save: function(options, config) {
80
-
81
- var params = {
82
- emulateHTTP: true,
83
- emulateJSON: true,
84
- data: {
85
- action: 'gfpdf_font_save',
86
- nonce: options.nonce,
87
- payload : this.toJSON()
88
- }
89
- };
90
-
91
- /* Merge out two objects together */
92
- $.extend(params, config);
93
-
94
- return Backbone.sync( 'update', this, params );
95
- },
96
-
97
- /**
98
- * Route delete through ajax-admin.php which doesn't support standard
99
- * REST API features. Emulate POST and JSON data structures.
100
- * @param Object options
101
- * @param Object additional configuration options
102
- * @return Object
103
- * @since 4.0
104
- */
105
- destroy: function(options, config) {
106
-
107
- var params = {
108
- emulateHTTP: true,
109
- emulateJSON: true,
110
- data: {
111
- action: 'gfpdf_font_delete',
112
- nonce: options.nonce,
113
- id : this.get('id'),
114
- }
115
- };
116
-
117
- /* Merge out two objects together */
118
- $.extend(params, config);
119
-
120
- return Backbone.sync( 'update', this, params );
121
- },
122
-
123
- /**
124
- * Create custom validation method which will prevent a model being updated
125
- * when using .save() or .set() if the validation fails.
126
- *
127
- * Multiple custom events are also triggered to allow our view to update the DOM as needed
128
- * @param Object attrs The new model data
129
- * @param Object options
130
- * @return String On error, a string is returned
131
- * @since 4.0
132
- */
133
- validate: function(attrs, options) {
134
-
135
- /* Do name validation */
136
- var regex = new RegExp('^[A-Za-z0-9 ]+$');
137
-
138
- if( attrs.font_name.length > 0) {
139
- if(! regex.test(attrs.font_name) ) {
140
-
141
- /* If not successful trigger error */
142
- return 'invalid_characters';
143
- } else {
144
-
145
- /* trigger successful event to disable the view error */
146
- this.trigger('valid_name');
147
- }
148
- }
149
-
150
- /**
151
- * Validate the selected fonts
152
- */
153
- if(this.validateFonts(attrs) === false) {
154
- return 'invalid_font';
155
- }
156
-
157
- this.trigger('validation_passed', this);
158
- },
159
-
160
- /**
161
- * Check if font value (regular, bold, italics, bolditalics)
162
- * has a value at all, and if so whether it has a .ttf extension.
163
- *
164
- * Multiple custom events are also triggered to allow our view to update a particular
165
- * DOM element based on the validation success or failure.
166
- *
167
- * @param Object attrs The new model data
168
- * @return Boolean Whether the group validation passed or failed
169
- * @since 4.0
170
- */
171
- validateFonts: function(attrs) {
172
-
173
- /* set validation to true and any that fail will mark as false */
174
- var validation = true;
175
-
176
- /* set up an object with our key-value pairs refering to the input data */
177
- var fonts = {
178
- regular: attrs.regular,
179
- bold: attrs.bold,
180
- italics: attrs.italics,
181
- bolditalics: attrs.bolditalics,
182
- };
183
-
184
- /* Loop through the object and use jQuery's proxy to correct the 'this' scope */
185
- $.each( fonts, $.proxy(function( index, font ) {
186
-
187
- /* if there is value for the font we'll validate it */
188
- if(font.length > 0 && this.isValidFile(font) === false) {
189
-
190
- /* mark our global validation as false */
191
- validation = false;
192
- this.trigger('invalid_font', this, true, index); /* tell our view the font is invalid */
193
- } else {
194
- this.trigger('valid_font', this, false, index); /* tell our view the font is valid */
195
- }
196
-
197
- }, this));
198
-
199
- return validation;
200
- },
201
-
202
- /**
203
- * Does our actual font validation
204
- * Checks if the string length is large enough to be considered valid,
205
- * and then checks if it has a file extension of .ttf
206
- * @param String font The font string to check
207
- * @return Boolean True on success, false on failure
208
- * @since 4.0
209
- */
210
- isValidFile: function(font) {
211
-
212
- /* Check if the value could contain enough characters to be valid */
213
- if(font.length < 5) {
214
- return false;
215
- }
216
-
217
- /* Get the last 4 characters and convert to lower case */
218
- var extension = font.substr(font.length - 4).toLowerCase();
219
-
220
- /* Check if they match a TTF font file */
221
- if(extension === '.ttf') {
222
-
223
- /* Check if we have a valid URL */
224
- var regex = new RegExp(/^[a-z](?:[-a-z0-9\+\.])*:(?:\/\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])*@)?(?:\[(?:(?:(?:[0-9a-f]{1,4}:){6}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|::(?:[0-9a-f]{1,4}:){5}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:[0-9a-f]{1,4}:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|v[0-9a-f]+[-a-z0-9\._~!\$&'\(\)\*\+,;=:]+)\]|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}|(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])*)(?::[0-9]*)?(?:\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))*)*|\/(?:(?:(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))+)(?:\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))*)*)?|(?:(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))+)(?:\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))*)*|(?!(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])))(?:\?(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\/\?\xA0-\uD7FF\uE000-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDC00-\uDFFD])*)?(?:\#(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\/\?\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])*)?$/igm);
225
-
226
- if(regex.test(font) ) {
227
- return true;
228
- }
229
- }
230
-
231
- return false;
232
- },
233
-
234
- /**
235
- * Our ModelBinder CSS Declaration Converter
236
- * @param String direction Either ModelToView or ViewToModel
237
- * @param String value The value to convert
238
- * @param String target The DOM target name
239
- * @param Object model The Model
240
- * @return String
241
- * @since 4.0
242
- */
243
- cssDeclaration: function(direction, value, target, model) {
244
- var shortname = model.getShortname(value);
245
- return 'font-family: "' + value + '", ' + shortname + ', sans-serif;';
246
- },
247
-
248
- /**
249
- * Converts a standard name to the format used in mPDF
250
- * @param String name The name to convert
251
- * @return String
252
- * @since 4.0
253
- */
254
- getShortname: function(name) {
255
- name = name.toLowerCase();
256
- name = name.replace(' ', '');
257
-
258
- return name;
259
- }
260
- });
261
-
262
-
263
- /**
264
- * Creates a Backbone collection with our model attached
265
- * @type Object
266
- * @since 4.0
267
- */
268
- Fonts.Collection.Core = Backbone.Collection.extend({
269
- model: Fonts.Model.Core
270
- });
271
-
272
-
273
- /**
274
- * Our top-level view for rendering our font list.
275
- * This view is responsible for looping through the Backbone collection,
276
- * creating a new Fonts.View.Item object and appending it to our container
277
- *
278
- * We also have a listenTo() event which triggers the rendering process when a new
279
- * model is added to our collection.
280
- *
281
- * @since 4.0
282
- */
283
- Fonts.View.Container = Backbone.View.extend({
284
-
285
- /**
286
- * Our View Target Element
287
- * @type String
288
- * @since 4.0
289
- */
290
- el: '#font-list',
291
-
292
- /**
293
- * Our View wrapper tag
294
- * @type String
295
- * @since 4.0
296
- */
297
- tagName: 'ul',
298
-
299
- /**
300
- * Automatically render our view upon initialization and add
301
- * an event listener so new Font.View.Item objects can be automatically
302
- * appended to our container (without re-rendering all the objects)
303
- *
304
- * @param Object options Any passed in parameters when the object is created
305
- * @since 4.0
306
- */
307
- initialize: function(options) {
308
-
309
- this.listenTo(this.collection, 'add', this.addRender);
310
- this.listenTo(this.collection, 'remove', this.render);
311
- this.render();
312
- },
313
-
314
- /**
315
- * Handles the DOM display process
316
- * @return Object Returns reference to itself (for chaining purposes)
317
- * @since 4.0
318
- */
319
- render: function() {
320
-
321
- /* Check if our collection has any models */
322
- if(this.collection.length > 0) {
323
-
324
- /* Empty our element */
325
- this.$el.empty();
326
-
327
- /* Loop through our collection and render to our container */
328
- this.collection.each(function(font) {
329
- this.addRender(font);
330
- }, this);
331
- } else {
332
- /* Display getting started message to user */
333
- this.$el.html(_.template($( '#GravityPDFFontsEmpty' ).html(), null, UnderscoreSettingsOverride));
334
- }
335
-
336
- /* Return for chaining purposes */
337
- return this;
338
- },
339
-
340
- /**
341
- * Creates our individual Item View and append to the container
342
- * @param Object font The individual collection model
343
- * @since 4.0
344
- */
345
- addRender: function(font) {
346
-
347
- /* Empty our container if no models exist (as we display a welcome message if list is empty) */
348
- if(this.collection.length === 1) {
349
- this.$el.empty();
350
- }
351
-
352
- /* Create an individual font view */
353
- var item = new Fonts.View.Item({
354
- model: font,
355
- collection: this.collection
356
- });
357
-
358
- /* Append it to our container */
359
- this.$el.append(item.render().el);
360
-
361
- /* Return for chaining purposes */
362
- return this;
363
- }
364
- });
365
-
366
-
367
-
368
- /**
369
- * Handles the individual display of our font model
370
- *
371
- * Multiple DOM events are used to process form interactions, such as toggling the interface, deleting a model and savings.
372
- * Multiple custom event listeners are used to display validation errors in our form.
373
- *
374
- * The Backbone.ModelBinder() object is used to add two-way data binding between our model and view
375
- *
376
- * @since 4.0
377
- */
378
- Fonts.View.Item = Backbone.View.extend({
379
-
380
- /**
381
- * The ID of our Underscore HTML template
382
- * This can be found in /src/view/html/Settings/tools.php
383
- * @type String
384
- * @since 4.0
385
- */
386
- template: '#GravityPDFFonts',
387
-
388
- /**
389
- * Our View wrapper tag
390
- * @type String
391
- * @since 4.0
392
- */
393
- tagName: 'li',
394
-
395
- /**
396
- * Our DOM Events
397
- * @type Object
398
- * @since 4.0
399
- */
400
- events: {
401
-
402
- /* Click event for toggling our form interface for editing */
403
- 'click .font-name' : 'toggleView',
404
-
405
- /* Click event to delete a model */
406
- 'click .delete-font': 'deleteModel',
407
-
408
- /* Submit event for saving a model */
409
- 'submit form': 'formSubmission',
410
- },
411
-
412
- /**
413
- * Initialize our model-view data binder object and set up
414
- * our event listeners for displaying visual validation queues to the user
415
- * @since 4.0
416
- */
417
- initialize: function() {
418
-
419
- /* Intialize our two-way data binder */
420
- this.modelBinder = new Backbone.ModelBinder();
421
-
422
- /* Show Name Validation Errors */
423
- this.listenTo(this.model, 'invalid valid_name', this.nameError);
424
-
425
- /* Show Font Group Validation Errors */
426
- this.listenTo(this.model, 'invalid_font valid_font', this.fontError);
427
-
428
- /* Enable / Disable the Submit button based on validation errors */
429
- this.listenTo(this.model, 'invalid', this.disableSubmitButton);
430
- this.listenTo(this.model, 'validation_passed', this.enableSubmitButton);
431
- },
432
-
433
- /**
434
- * Render the individual view based on an Underscore template
435
- * @return Object Return 'this' for chaining
436
- * @since 4.0
437
- */
438
- render: function() {
439
-
440
- /* Set up our Underscore template file */
441
- this.template = _.template($( this.template ).html(), null, UnderscoreSettingsOverride);
442
-
443
- /* Set View Element HTML to our Underscore template, passing in our model */
444
- this.$el.html(this.template({
445
- model: this.model,
446
- }));
447
-
448
- /**
449
- * Enable two-way data binding between our model and view
450
- *
451
- * By default updates are only triggered on change events but our name field
452
- * should also trigger on keyUp.
453
- *
454
- * We also want to run our validation routine on the this.model.set() command (by default this is disabled)
455
- * so the user isn't confused with the live-update display of the Font Name field.
456
- */
457
- this.modelBinder.bind(this.model, this.el, {
458
- font_name: [ { selector: '[name=font_name]' } , {selector: '[name=usage]', converter: this.model.cssDeclaration } ],
459
- regular: '[name=regular]',
460
- bold: '[name=bold]',
461
- italics: '[name=italics]',
462
- bolditalics: '[name=bolditalics]',
463
- },
464
-
465
- {
466
-
467
- changeTriggers: {
468
- '': 'change',
469
- '.font-name-field': 'keyup'
470
- },
471
-
472
- modelSetOptions: {
473
- validate: true
474
- }
475
- });
476
-
477
- /* Return for chaining purposes */
478
- return this;
479
- },
480
-
481
- /**
482
- * Show / Hide the Font Manager (Editor)
483
- * @param Object ev The Backbone event object
484
- * @since 4.0
485
- */
486
- toggleView: function(ev) {
487
-
488
- /* Prevent default anchor action */
489
- ev.preventDefault();
490
-
491
- /* Toggle our Font Manager Container */
492
- $(ev.currentTarget).next().toggle();
493
-
494
- },
495
-
496
- /**
497
- * Highlight field with red border when error is detected
498
- * @param Object model The model currently being modified
499
- * @param String error The name of the error triggered
500
- * @since 4.0
501
- */
502
- nameError: function(model, error) {
503
-
504
- if(error && error == 'invalid_characters') {
505
-
506
- /* highlight errors */
507
- this.$el.find('input[name="font_name"]').css('border-color', 'red');
508
- } else {
509
-
510
- /* un-highlight errors */
511
- this.$el.find('input[name="font_name"]').removeAttr('style');
512
- }
513
- },
514
-
515
- /**
516
- * Highlight / Un-highlight Font Field that failed validation
517
- * @param Object model The model currently being modified
518
- * @param String error The name of the error triggered
519
- * @param {[type]} name The name of the field which failed validation
520
- * @since 4.0
521
- */
522
- fontError: function(model, error, name) {
523
-
524
- /* Get the input that failed validation */
525
- $input = this.$el.find('input[name="' + name + '"]');
526
-
527
- /* If error is triggered display message to user */
528
- if(error) {
529
-
530
- /* Set up an error message */
531
- $error = $('<span class="gf_settings_description"><label>Only TTF font files are supported.</label></span>');
532
-
533
- /* Tell user about error */
534
- if(! $input.hasClass('invalid')) {
535
- $input.addClass('invalid').next().after($error.clone());
536
- }
537
- } else {
538
-
539
- /* Remove validation error */
540
- if($input.hasClass('invalid')) {
541
- $input.removeClass('invalid').next().next().remove();
542
- }
543
- }
544
- },
545
-
546
- /**
547
- * Disable the form submit button due to validation failure and mark is
548
- * as currently disabled to prevent any funny business
549
- * @param Object model An instance of Fonts.Model.Core()
550
- * @since 4.0
551
- */
552
- disableSubmitButton: function(model) {
553
-
554
- this.$el.find('.font-submit button').prop('disabled', true);
555
- model.set('disabled', true);
556
- },
557
-
558
- /**
559
- * Enable the form submit button due to validation passing and mark is
560
- * as currently enabled. Users can now save the model.
561
- * @param Object model An instance of Fonts.Model.Core()
562
- * @since 4.0
563
- */
564
- enableSubmitButton: function(model) {
565
-
566
- this.$el.find('.font-submit button').prop('disabled', false);
567
- model.set('disabled', false);
568
- },
569
-
570
- /**
571
- * Save model after checking browser's native validation API passes and that model isn't enabled.
572
- * @param Object ev The Backbone event object
573
- * @since 4.0
574
- */
575
- formSubmission: function(ev) {
576
-
577
- /* Allow native validation without submitting actual form to backend */
578
- ev.preventDefault();
579
-
580
- var $form = $(ev.currentTarget);
581
-
582
- /* Check if the native form validation is a success */
583
- if(ev.currentTarget.checkValidity() && this.model.get('disabled') === false) {
584
-
585
- /* Show saving spinner */
586
- this.addSpinner();
587
-
588
- /* Remove previous message */
589
- this.removeMessage();
590
-
591
- console.log(this.model);
592
-
593
- this.model.save({
594
- nonce: this.$el.find('input[name=wpnonce]').val()
595
- }, {
596
- success: $.proxy(function(model, response, options) {
597
-
598
- /* Remove saving spinner */
599
- this.removeSpinner();
600
-
601
- /* Display Message */
602
- this.displayMessage(GFPDF.updateSuccess);
603
-
604
- /* Keep our model in sync */
605
- this.model.set(model);
606
-
607
- }, this),
608
-
609
- error: $.proxy(function(response, type, errorName) {
610
-
611
- /* Remove saving spinner */
612
- this.removeSpinner();
613
-
614
- /* Display Error */
615
- if(response.responseJSON.error) {
616
- this.displayMessage(response.responseJSON.error, true);
617
- }
618
- }, this)
619
- });
620
- }
621
- },
622
-
623
- /**
624
- * Delete our model
625
- * @param Object ev The Backbone event object
626
- * @since 4.0
627
- */
628
- deleteModel: function(ev) {
629
-
630
- /* Prevent default anchor action */
631
- ev.preventDefault();
632
-
633
- /* Get our dialog box */
634
- var $dialog = $( '#delete-confirm' );
635
-
636
- /* Set up our dialog box buttons */
637
- var deleteButtons = [{
638
- text: GFPDF.delete,
639
- click: $.proxy(function() {
640
-
641
- /* Hide the confirmation dialog */
642
- $dialog.wpdialog( 'destroy' );
643
-
644
- /* If an ID is set (pulled from DB) do our AJAX delete call */
645
- if(this.model.get('id')) {
646
-
647
- /* Show saving spinner */
648
- this.addSpinner();
649
-
650
- /* Remove previous message */
651
- this.removeMessage();
652
-
653
- /* Hide the container */
654
- this.$el.hide();
655
-
656
- this.model.destroy({
657
- nonce: this.$el.find('input[name=wpnonce]').val()
658
- }, {
659
- success: $.proxy(function(model, response, options) {
660
-
661
- /* Remove saving spinner */
662
- this.removeSpinner();
663
-
664
- /* Display Message */
665
- this.displayMessage(GFPDF.deleteSuccess);
666
-
667
- /* Remove from collection */
668
- this.collection.remove(this.model);
669
-
670
- }, this),
671
-
672
- error: $.proxy(function(response, type, errorName) {
673
-
674
- /* Remove saving spinner */
675
- this.removeSpinner();
676
-
677
- /* Remove from collection */
678
- this.collection.remove(this.model);
679
-
680
- /* Display Error */
681
- if(response.responseJSON.error) {
682
- this.displayMessage(response.responseJSON.error, true);
683
- }
684
-
685
- }, this)
686
- });
687
-
688
- /* TODO: if destroy() is successful remove the hidden item */
689
- } else {
690
- this.collection.remove(this.model);
691
- }
692
-
693
- }, this)
694
- },
695
- {
696
- text: GFPDF.cancel,
697
- click: function() {
698
-
699
- /* Cancel */
700
- $dialog.wpdialog( 'destroy' );
701
- }
702
- }];
703
-
704
- /* Set up our dialog box */
705
- Fonts.Misc.Dialog($dialog, deleteButtons, 300, 175);
706
-
707
- /* Open the dialog box */
708
- $dialog.wpdialog( 'open' );
709
- },
710
-
711
- /**
712
- * Adds an AJAX loader so the user knows a query is being made
713
- * @since 4.0
714
- */
715
- addSpinner: function() {
716
- var $spinner = $('<img alt="Loading" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner" style="margin-top: 4px;" />');
717
- this.$el.find('.font-submit button').after($spinner);
718
- },
719
-
720
- /**
721
- * Remove AJAX loader so the user knows a query is finished
722
- * @since 4.0
723
- */
724
- removeSpinner: function() {
725
- this.$el.find('.gfpdf-spinner').remove();
726
- },
727
-
728
- /**
729
- * Show message to the user
730
- * @param String msg The message to be displayed
731
- * @param Boolean isError If set to true an error will be displayed
732
- * @since 4.0
733
- */
734
- displayMessage: function(msg, isError) {
735
-
736
- /* Generate our error template */
737
- var $message = $('<div class="updated notice">');
738
-
739
- /* Add our error class if requested */
740
- if(isError === true) {
741
- $message.addClass('error');
742
- }
743
-
744
- /* Add the message to be displayed */
745
- $message.html('<p>' + msg + '</p>');
746
-
747
- /* Add message to the DOM */
748
- this.$el.find('form').before($message);
749
- },
750
-
751
- /**
752
- * Remove any messages currently being shown to the user
753
- * @since 4.0
754
- */
755
- removeMessage: function() {
756
- this.$el.find('div.notice').slideUp(function() {
757
- $(this).remove();
758
- });
759
- }
760
- });
761
-
762
- /**
763
- * A simple view that creates an interface for adding new models to our collection
764
- * @since 4.0
765
- */
766
- Fonts.View.Add = Backbone.View.extend({
767
-
768
- /**
769
- * Our View Target Element
770
- * @type String
771
- * @since 4.0
772
- */
773
- el: '#font-add-list',
774
-
775
- /**
776
- * Our DOM Events
777
- * @type Object
778
- * @since 4.0
779
- */
780
- events: {
781
- 'click': 'addFont',
782
- },
783
-
784
- /**
785
- * Store our Fonts.Container.Core() object so our view can easily add new models
786
- * and renders the view
787
- * @param Object options User-passed parameters
788
- * @since 4.0
789
- */
790
- initialize: function(options) {
791
-
792
- this.container = options.container;
793
- this.render();
794
- },
795
-
796
- /**
797
- * Renders our View
798
- * @since 4.0
799
- */
800
- render: function() {
801
- this.$el.html('<i class="fa fa-plus fa-4x"></i><span>Add Font</span>');
802
- },
803
-
804
- /**
805
- * Add a new model to our collection
806
- * @param Object ev The Backbone event object
807
- * @since 4.0
808
- */
809
- addFont: function(ev) {
810
-
811
- /* Create an empty model */
812
- var font = new Fonts.Model.Core();
813
-
814
- /* Add new model to our collection */
815
- this.collection.add(font);
816
-
817
- /* Toggle the new model's font manager and set focus to our name field */
818
- this.container.$el.find('li:last .font-settings').toggle()
819
- .find('input[type="text"]:first').focus();
820
- }
821
- });
822
-
823
-
824
- /**
825
- * Generate a WP Dialog box
826
- * @param jQuery Object $elm The element we want to bind the dialog box to
827
- * @param Object buttonsList Handles the button creation process. More information found in the jQuery UI Dialog Documentation
828
- * @param Integer boxWidth How wide should the dialog box be
829
- * @param Integer boxHeight How tall should the dialog box be
830
- * @since 4.0
831
- */
832
- Fonts.Misc.Dialog = function($elm, buttonsList, boxWidth, boxHeight) {
833
- $elm.wpdialog({
834
- autoOpen: false,
835
- resizable: false,
836
- draggable: false,
837
- width: boxWidth,
838
- height: boxHeight,
839
- modal: true,
840
- dialogClass: 'wp-dialog',
841
- zIndex: 300000,
842
- buttons: buttonsList,
843
-
844
- /**
845
- * Open our dialog box and set focus to the first button find
846
- * Also add an event listener to close the dialog when the background is clicked
847
- */
848
- open: function() {
849
- $(this).siblings('.ui-dialog-buttonpane').find('button:eq(1)').focus();
850
-
851
- $('.ui-widget-overlay').bind('click', function() {
852
- $elm.wpdialog('close');
853
- });
854
- }
855
- });
856
- };
857
-
858
-
859
-
860
-
861
- /**
862
- * Our Documentation Search API
863
- * We'll add a search bar and output the results of the search
864
- * from our API to assist users with our software.
865
- * @since 4.0
866
- */
867
-
868
- var help = {}; // create namespace for our app
869
-
870
- help.SearchModel = Backbone.Model.extend({});
871
-
872
- help.SearchCollection = Backbone.Collection.extend({
873
- model: help.SearchModel,
874
-
875
- initialize: function(models, options) {
876
- this.url = options.url;
877
- },
878
-
879
- });
880
-
881
- help.ContainerView = Backbone.View.extend({
882
- el: '#search-knowledgebase',
883
-
884
- events: {
885
- 'keyup #search-help-input' : 'doSearch',
886
- 'change #search-help-input' : 'doSearch',
887
- },
888
-
889
- initialize: function() {
890
- /* initialise our timer */
891
- this.timer = true;
892
-
893
- /* render the container view */
894
- this.render();
895
- },
896
-
897
- render: function() {
898
- this.addSearchBar();
899
-
900
- return this;
901
- },
902
-
903
- addSearchBar: function() {
904
- /* create our search element */
905
- var $input = $('<input>').attr('type', 'text')
906
- .attr('placeholder', ' ' + GFPDF.searchPlaceholder)
907
- .attr('id', 'search-help-input');
908
-
909
- /* add out search box and give it focus */
910
- this.$el.prepend($input);
911
-
912
- $input.tooltip({
913
- items: 'input',
914
- content: 'The search must be more than 3 characters.',
915
- tooltipClass: 'ui-state-error',
916
- }).tooltip( 'disable' );
917
-
918
- /* give our search box focus */
919
- $input.focus();
920
- },
921
-
922
- doSearch: function(ev) {
923
- var $search = $(ev.currentTarget);
924
-
925
- /* clear any previous events */
926
- window.clearTimeout(this.timer);
927
-
928
- /* only trigger our search if user has entered more than 3 characters */
929
- var value = $.trim($search.val());
930
- var previousValue = $search.data('currentValue');
931
-
932
- if(value.length > 3 && $search.data('previousValue') !== value) {
933
- $search.tooltip( 'disable' );
934
-
935
- /* track the data value */
936
- $search.data('currentValue', value);
937
-
938
- this.timer = window.setTimeout(_.bind(function() {
939
- this.processSearch(value);
940
- }, this), 500);
941
- } else if(value.length <= 3 && ev.keyCode == 13) {
942
- $search.tooltip( 'enable' ).tooltip( 'open' );
943
- }
944
- },
945
-
946
- processSearch: function(search) {
947
- /* Initialise our Collection and pull the data from our source */
948
- console.log('Searching our collection...');
949
-
950
- new help.DocsView({
951
- s: search,
952
- });
953
- }
954
-
955
- });
956
-
957
- help.MainView = Backbone.View.extend({
958
-
959
- callAPI: function(url) {
960
- /* do our search */
961
- this.collection.fetch({
962
- success: _.bind(this.renderSearch, this),
963
- error: _.bind(this.renderSearchError),
964
- });
965
- },
966
-
967
- renderSearch: function(collection, response) {
968
- console.log('Rendering Search Results');
969
-
970
- this.hideSpinner();
971
-
972
- var $container = this.$el.find('.inside ul');
973
-
974
- $container.html(this.template({
975
- collection: this.collection.toJSON(),
976
- url: this.url,
977
- }));
978
-
979
- var $wrapper = $container.parent();
980
- if(!$wrapper.is(':visible')) {
981
- $wrapper.slideDown(500);
982
- }
983
-
984
- },
985
-
986
- renderSearchError: function(collection, response) {
987
- console.log('Search Failed');
988
- console.log(collection);
989
- console.log(response);
990
- },
991
-
992
-
993
- showSpinner: function() {
994
- this.$el.find('.spinner').addClass('is-active');
995
-
996
- if(!this.$el.is(':visible')) {
997
- this.$el.slideDown(500);
998
- }
999
- },
1000
-
1001
- hideSpinner: function() {
1002
- this.$el.find('.spinner').removeClass('is-active');
1003
- },
1004
- });
1005
-
1006
- help.DocsView = help.MainView.extend({
1007
- el: '#documentation-api',
1008
-
1009
- template: '#GravityPDFSearchResultsDocumentation',
1010
-
1011
- initialize: function(options) {
1012
- this.url = 'https://gravitypdf.com/wp-json/wp/v2/v4_docs/';
1013
- this.s = options.s;
1014
- this.render();
1015
- },
1016
-
1017
- render: function() {
1018
- /* set up out template */
1019
- this.template = _.template($(this.template).html(), null, UnderscoreSettingsOverride);
1020
-
1021
- /* show the loading spinner */
1022
- this.showSpinner();
1023
-
1024
- /* set up view search params */
1025
- var s = encodeURIComponent(this.s);
1026
- var url = this.url + '?search=' + s;
1027
-
1028
- /* initialise our collection */
1029
- this.collection = new help.SearchCollection([], {
1030
- url: url,
1031
- });
1032
-
1033
- /* ping api for results */
1034
- this.callAPI(url);
1035
-
1036
- return this;
1037
- },
1038
- });
1039
-
1040
- /**
1041
- * Our Admin controller
1042
- * Applies correct JS to settings pages
1043
- */
1044
- function GravityPDF () {
1045
- var self = this;
1046
-
1047
- this.init = function() {
1048
- if(this.is_settings()) {
1049
- this.processSettings();
1050
- }
1051
- };
1052
-
1053
- this.is_settings = function() {
1054
- return $('#tab_PDF').length;
1055
- };
1056
-
1057
- this.processSettings = function() {
1058
- var active = $('.nav-tab-wrapper a.nav-tab-active:first').data('id');
1059
-
1060
- switch (active) {
1061
- case 'tools':
1062
- this.tools_settings();
1063
- break;
1064
-
1065
- case 'help':
1066
- this.help_settings();
1067
- break;
1068
- }
1069
- };
1070
-
1071
- /**
1072
- * The help settings model method
1073
- * This sets up and processes any of the JS that needs to be applied on the help settings tab
1074
- * @since 4.0
1075
- */
1076
- this.help_settings = function() {
1077
- /**
1078
- * Load our settings dependancy
1079
- */
1080
- new help.ContainerView();
1081
- };
1082
-
1083
- /**
1084
- * The help tools model method
1085
- * This sets up and processes any of the JS that needs to be applied on the tools settings tab
1086
- * @since 4.0
1087
- */
1088
- this.tools_settings = function() {
1089
-
1090
- var json = JSON.parse(GFPDF.customFontData);
1091
-
1092
- /* Initialise our collection and load with our font JSON data */
1093
- var fontCollection = new Fonts.Collection.Core(json);
1094
-
1095
- /* Create a container View and pass in our collection */
1096
- var container = new Fonts.View.Container({
1097
- collection: fontCollection
1098
- });
1099
-
1100
- /* Create a Add View so user's can add new fonts and pass in our collection and container */
1101
- new Fonts.View.Add({
1102
- collection: fontCollection,
1103
- container: container
1104
- });
1105
- };
1106
-
1107
- }
1108
-
1109
- var pdf = new GravityPDF();
1110
- pdf.init();
1111
-
1112
- });
1113
  })(jQuery);
1
+ /**
2
+ * Gravity PDF Settings JS Logic
3
+ * Dependancies: backbone, underscore, jquery
4
+ * @since 4.0
5
+ */
6
+
7
+ (function($) {
8
+
9
+ $(function() {
10
+
11
+ /**
12
+ * To prevent problems with PHP's ASP Short tags (removed in PHP 7) we'll change Underscore's delimiters to be Handlebars-ish:
13
+ * {{= }}, {{- }} or {{ }}
14
+ *
15
+ * @see https://github.com/GravityPDF/gravity-pdf/issues/417
16
+ * @type {{interpolate: RegExp, evaluate: RegExp, escape: RegExp}}
17
+ * @since 4.0.1
18
+ */
19
+ var UnderscoreSettingsOverride = {
20
+ evaluate: /\{\{(.+?)\}\}/gim,
21
+ interpolate: /\{\{=(.+?)\}\}/gim,
22
+ escape: /\{\{-(.+?)\}\}/gim
23
+ };
24
+
25
+
26
+ /**
27
+ * Handles our Font CRUD Feature
28
+ * Allows URLs to TTF font files to be passed
29
+ * to a specific custom font 'group' defined by the user.
30
+ *
31
+ * Backbone model's save and destroy methods have been overridden
32
+ * to work with WordPress' ajax-admin.php file endpoint.
33
+ *
34
+ * @since 4.0
35
+ */
36
+ var Fonts = {
37
+ Model: {},
38
+ Collection: {},
39
+ View: {},
40
+ Misc: {},
41
+ };
42
+
43
+
44
+ /**
45
+ * Our Font Backbone Model which handles validation, saving and deleting
46
+ * @since 4.0
47
+ */
48
+ Fonts.Model.Core = Backbone.Model.extend({
49
+ /**
50
+ * Set our default model parameters
51
+ * Existing models pulled from the database also have an ID parameter
52
+ * @type {Object}
53
+ * @since 4.0
54
+ */
55
+ defaults: {
56
+ font_name: '',
57
+ regular: '',
58
+ bold: '',
59
+ italics: '',
60
+ bolditalics: '',
61
+ disabled: false,
62
+ },
63
+
64
+ /**
65
+ * Set our custom endpoint to be used to sync the model
66
+ * @type String
67
+ * @since 4.0
68
+ */
69
+ url: GFPDF.ajaxUrl,
70
+
71
+ /**
72
+ * Route save through ajax-admin.php which doesn't support standard
73
+ * REST API features. Emulate POST and JSON data structures.
74
+ * @param Object options
75
+ * @param Object additional configuration options
76
+ * @return Object
77
+ * @since 4.0
78
+ */
79
+ save: function(options, config) {
80
+
81
+ var params = {
82
+ emulateHTTP: true,
83
+ emulateJSON: true,
84
+ data: {
85
+ action: 'gfpdf_font_save',
86
+ nonce: options.nonce,
87
+ payload : this.toJSON()
88
+ }
89
+ };
90
+
91
+ /* Merge out two objects together */
92
+ $.extend(params, config);
93
+
94
+ return Backbone.sync( 'update', this, params );
95
+ },
96
+
97
+ /**
98
+ * Route delete through ajax-admin.php which doesn't support standard
99
+ * REST API features. Emulate POST and JSON data structures.
100
+ * @param Object options
101
+ * @param Object additional configuration options
102
+ * @return Object
103
+ * @since 4.0
104
+ */
105
+ destroy: function(options, config) {
106
+
107
+ var params = {
108
+ emulateHTTP: true,
109
+ emulateJSON: true,
110
+ data: {
111
+ action: 'gfpdf_font_delete',
112
+ nonce: options.nonce,
113
+ id : this.get('id'),
114
+ }
115
+ };
116
+
117
+ /* Merge out two objects together */
118
+ $.extend(params, config);
119
+
120
+ return Backbone.sync( 'update', this, params );
121
+ },
122
+
123
+ /**
124
+ * Create custom validation method which will prevent a model being updated
125
+ * when using .save() or .set() if the validation fails.
126
+ *
127
+ * Multiple custom events are also triggered to allow our view to update the DOM as needed
128
+ * @param Object attrs The new model data
129
+ * @param Object options
130
+ * @return String On error, a string is returned
131
+ * @since 4.0
132
+ */
133
+ validate: function(attrs, options) {
134
+
135
+ /* Do name validation */
136
+ var regex = new RegExp('^[A-Za-z0-9 ]+$');
137
+
138
+ if( attrs.font_name.length > 0) {
139
+ if(! regex.test(attrs.font_name) ) {
140
+
141
+ /* If not successful trigger error */
142
+ return 'invalid_characters';
143
+ } else {
144
+
145
+ /* trigger successful event to disable the view error */
146
+ this.trigger('valid_name');
147
+ }
148
+ }
149
+
150
+ /**
151
+ * Validate the selected fonts
152
+ */
153
+ if(this.validateFonts(attrs) === false) {
154
+ return 'invalid_font';
155
+ }
156
+
157
+ this.trigger('validation_passed', this);
158
+ },
159
+
160
+ /**
161
+ * Check if font value (regular, bold, italics, bolditalics)
162
+ * has a value at all, and if so whether it has a .ttf extension.
163
+ *
164
+ * Multiple custom events are also triggered to allow our view to update a particular
165
+ * DOM element based on the validation success or failure.
166
+ *
167
+ * @param Object attrs The new model data
168
+ * @return Boolean Whether the group validation passed or failed
169
+ * @since 4.0
170
+ */
171
+ validateFonts: function(attrs) {
172
+
173
+ /* set validation to true and any that fail will mark as false */
174
+ var validation = true;
175
+
176
+ /* set up an object with our key-value pairs refering to the input data */
177
+ var fonts = {
178
+ regular: attrs.regular,
179
+ bold: attrs.bold,
180
+ italics: attrs.italics,
181
+ bolditalics: attrs.bolditalics,
182
+ };
183
+
184
+ /* Loop through the object and use jQuery's proxy to correct the 'this' scope */
185
+ $.each( fonts, $.proxy(function( index, font ) {
186
+
187
+ /* if there is value for the font we'll validate it */
188
+ if(font.length > 0 && this.isValidFile(font) === false) {
189
+
190
+ /* mark our global validation as false */
191
+ validation = false;
192
+ this.trigger('invalid_font', this, true, index); /* tell our view the font is invalid */
193
+ } else {
194
+ this.trigger('valid_font', this, false, index); /* tell our view the font is valid */
195
+ }
196
+
197
+ }, this));
198
+
199
+ return validation;
200
+ },
201
+
202
+ /**
203
+ * Does our actual font validation
204
+ * Checks if the string length is large enough to be considered valid,
205
+ * and then checks if it has a file extension of .ttf
206
+ * @param String font The font string to check
207
+ * @return Boolean True on success, false on failure
208
+ * @since 4.0
209
+ */
210
+ isValidFile: function(font) {
211
+
212
+ /* Check if the value could contain enough characters to be valid */
213
+ if(font.length < 5) {
214
+ return false;
215
+ }
216
+
217
+ /* Get the last 4 characters and convert to lower case */
218
+ var extension = font.substr(font.length - 4).toLowerCase();
219
+
220
+ /* Check if they match a TTF font file */
221
+ if(extension === '.ttf') {
222
+
223
+ /* Check if we have a valid URL */
224
+ var regex = new RegExp(/^[a-z](?:[-a-z0-9\+\.])*:(?:\/\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])*@)?(?:\[(?:(?:(?:[0-9a-f]{1,4}:){6}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|::(?:[0-9a-f]{1,4}:){5}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:[0-9a-f]{1,4}:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|v[0-9a-f]+[-a-z0-9\._~!\$&'\(\)\*\+,;=:]+)\]|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}|(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])*)(?::[0-9]*)?(?:\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))*)*|\/(?:(?:(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))+)(?:\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))*)*)?|(?:(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))+)(?:\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD]))*)*|(?!(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])))(?:\?(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\/\?\xA0-\uD7FF\uE000-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDC00-\uDFFD])*)?(?:\#(?:%[0-9a-f][0-9a-f]|[-a-z0-9\._~!\$&'\(\)\*\+,;=:@\/\?\xA0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB44-\uDB7E][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F][\uDC00-\uDFFD])*)?$/igm);
225
+
226
+ if(regex.test(font) ) {
227
+ return true;
228
+ }
229
+ }
230
+
231
+ return false;
232
+ },
233
+
234
+ /**
235
+ * Our ModelBinder CSS Declaration Converter
236
+ * @param String direction Either ModelToView or ViewToModel
237
+ * @param String value The value to convert
238
+ * @param String target The DOM target name
239
+ * @param Object model The Model
240
+ * @return String
241
+ * @since 4.0
242
+ */
243
+ cssDeclaration: function(direction, value, target, model) {
244
+ var shortname = model.getShortname(value);
245
+ return 'font-family: "' + value + '", ' + shortname + ', sans-serif;';
246
+ },
247
+
248
+ /**
249
+ * Converts a standard name to the format used in mPDF
250
+ * @param String name The name to convert
251
+ * @return String
252
+ * @since 4.0
253
+ */
254
+ getShortname: function(name) {
255
+ name = name.toLowerCase();
256
+ name = name.replace(' ', '');
257
+
258
+ return name;
259
+ }
260
+ });
261
+
262
+
263
+ /**
264
+ * Creates a Backbone collection with our model attached
265
+ * @type Object
266
+ * @since 4.0
267
+ */
268
+ Fonts.Collection.Core = Backbone.Collection.extend({
269
+ model: Fonts.Model.Core
270
+ });
271
+
272
+
273
+ /**
274
+ * Our top-level view for rendering our font list.
275
+ * This view is responsible for looping through the Backbone collection,
276
+ * creating a new Fonts.View.Item object and appending it to our container
277
+ *
278
+ * We also have a listenTo() event which triggers the rendering process when a new
279
+ * model is added to our collection.
280
+ *
281
+ * @since 4.0
282
+ */
283
+ Fonts.View.Container = Backbone.View.extend({
284
+
285
+ /**
286
+ * Our View Target Element
287
+ * @type String
288
+ * @since 4.0
289
+ */
290
+ el: '#font-list',
291
+
292
+ /**
293
+ * Our View wrapper tag
294
+ * @type String
295
+ * @since 4.0
296
+ */
297
+ tagName: 'ul',
298
+
299
+ /**
300
+ * Automatically render our view upon initialization and add
301
+ * an event listener so new Font.View.Item objects can be automatically
302
+ * appended to our container (without re-rendering all the objects)
303
+ *
304
+ * @param Object options Any passed in parameters when the object is created
305
+ * @since 4.0
306
+ */
307
+ initialize: function(options) {
308
+
309
+ this.listenTo(this.collection, 'add', this.addRender);
310
+ this.listenTo(this.collection, 'remove', this.render);
311
+ this.render();
312
+ },
313
+
314
+ /**
315
+ * Handles the DOM display process
316
+ * @return Object Returns reference to itself (for chaining purposes)
317
+ * @since 4.0
318
+ */
319
+ render: function() {
320
+
321
+ /* Check if our collection has any models */
322
+ if(this.collection.length > 0) {
323
+
324
+ /* Empty our element */
325
+ this.$el.empty();
326
+
327
+ /* Loop through our collection and render to our container */
328
+ this.collection.each(function(font) {
329
+ this.addRender(font);
330
+ }, this);
331
+ } else {
332
+ /* Display getting started message to user */
333
+ this.$el.html(_.template($( '#GravityPDFFontsEmpty' ).html(), null, UnderscoreSettingsOverride));
334
+ }
335
+
336
+ /* Return for chaining purposes */
337
+ return this;
338
+ },
339
+
340
+ /**
341
+ * Creates our individual Item View and append to the container
342
+ * @param Object font The individual collection model
343
+ * @since 4.0
344
+ */
345
+ addRender: function(font) {
346
+
347
+ /* Empty our container if no models exist (as we display a welcome message if list is empty) */
348
+ if(this.collection.length === 1) {
349
+ this.$el.empty();
350
+ }
351
+
352
+ /* Create an individual font view */
353
+ var item = new Fonts.View.Item({
354
+ model: font,
355
+ collection: this.collection
356
+ });
357
+
358
+ /* Append it to our container */
359
+ this.$el.append(item.render().el);
360
+
361
+ /* Return for chaining purposes */
362
+ return this;
363
+ }
364
+ });
365
+
366
+
367
+
368
+ /**
369
+ * Handles the individual display of our font model
370
+ *
371
+ * Multiple DOM events are used to process form interactions, such as toggling the interface, deleting a model and savings.
372
+ * Multiple custom event listeners are used to display validation errors in our form.
373
+ *
374
+ * The Backbone.ModelBinder() object is used to add two-way data binding between our model and view
375
+ *
376
+ * @since 4.0
377
+ */
378
+ Fonts.View.Item = Backbone.View.extend({
379
+
380
+ /**
381
+ * The ID of our Underscore HTML template
382
+ * This can be found in /src/view/html/Settings/tools.php
383
+ * @type String
384
+ * @since 4.0
385
+ */
386
+ template: '#GravityPDFFonts',
387
+
388
+ /**
389
+ * Our View wrapper tag
390
+ * @type String
391
+ * @since 4.0
392
+ */
393
+ tagName: 'li',
394
+
395
+ /**
396
+ * Our DOM Events
397
+ * @type Object
398
+ * @since 4.0
399
+ */
400
+ events: {
401
+
402
+ /* Click event for toggling our form interface for editing */
403
+ 'click .font-name' : 'toggleView',
404
+
405
+ /* Click event to delete a model */
406
+ 'click .delete-font': 'deleteModel',
407
+
408
+ /* Submit event for saving a model */
409
+ 'submit form': 'formSubmission',
410
+ },
411
+
412
+ /**
413
+ * Initialize our model-view data binder object and set up
414
+ * our event listeners for displaying visual validation queues to the user
415
+ * @since 4.0
416
+ */
417
+ initialize: function() {
418
+
419
+ /* Intialize our two-way data binder */
420
+ this.modelBinder = new Backbone.ModelBinder();
421
+
422
+ /* Show Name Validation Errors */
423
+ this.listenTo(this.model, 'invalid valid_name', this.nameError);
424
+
425
+ /* Show Font Group Validation Errors */
426
+ this.listenTo(this.model, 'invalid_font valid_font', this.fontError);
427
+
428
+ /* Enable / Disable the Submit button based on validation errors */
429
+ this.listenTo(this.model, 'invalid', this.disableSubmitButton);
430
+ this.listenTo(this.model, 'validation_passed', this.enableSubmitButton);
431
+ },
432
+
433
+ /**
434
+ * Render the individual view based on an Underscore template
435
+ * @return Object Return 'this' for chaining
436
+ * @since 4.0
437
+ */
438
+ render: function() {
439
+
440
+ /* Set up our Underscore template file */
441
+ this.template = _.template($( this.template ).html(), null, UnderscoreSettingsOverride);
442
+
443
+ /* Set View Element HTML to our Underscore template, passing in our model */
444
+ this.$el.html(this.template({
445
+ model: this.model,
446
+ }));
447
+
448
+ /**
449
+ * Enable two-way data binding between our model and view
450
+ *
451
+ * By default updates are only triggered on change events but our name field
452
+ * should also trigger on keyUp.
453
+ *
454
+ * We also want to run our validation routine on the this.model.set() command (by default this is disabled)
455
+ * so the user isn't confused with the live-update display of the Font Name field.
456
+ */
457
+ this.modelBinder.bind(this.model, this.el, {
458
+ font_name: [ { selector: '[name=font_name]' } , {selector: '[name=usage]', converter: this.model.cssDeclaration } ],
459
+ regular: '[name=regular]',
460
+ bold: '[name=bold]',
461
+ italics: '[name=italics]',
462
+ bolditalics: '[name=bolditalics]',
463
+ },
464
+
465
+ {
466
+
467
+ changeTriggers: {
468
+ '': 'change',
469
+ '.font-name-field': 'keyup'
470
+ },
471
+
472
+ modelSetOptions: {
473
+ validate: true
474
+ }
475
+ });
476
+
477
+ /* Return for chaining purposes */
478
+ return this;
479
+ },
480
+
481
+ /**
482
+ * Show / Hide the Font Manager (Editor)
483
+ * @param Object ev The Backbone event object
484
+ * @since 4.0
485
+ */
486
+ toggleView: function(ev) {
487
+
488
+ /* Prevent default anchor action */
489
+ ev.preventDefault();
490
+
491
+ /* Toggle our Font Manager Container */
492
+ $(ev.currentTarget).next().toggle();
493
+
494
+ },
495
+
496
+ /**
497
+ * Highlight field with red border when error is detected
498
+ * @param Object model The model currently being modified
499
+ * @param String error The name of the error triggered
500
+ * @since 4.0
501
+ */
502
+ nameError: function(model, error) {
503
+
504
+ if(error && error == 'invalid_characters') {
505
+
506
+ /* highlight errors */
507
+ this.$el.find('input[name="font_name"]').css('border-color', 'red');
508
+ } else {
509
+
510
+ /* un-highlight errors */
511
+ this.$el.find('input[name="font_name"]').removeAttr('style');
512
+ }
513
+ },
514
+
515
+ /**
516
+ * Highlight / Un-highlight Font Field that failed validation
517
+ * @param Object model The model currently being modified
518
+ * @param String error The name of the error triggered
519
+ * @param {[type]} name The name of the field which failed validation
520
+ * @since 4.0
521
+ */
522
+ fontError: function(model, error, name) {
523
+
524
+ /* Get the input that failed validation */
525
+ $input = this.$el.find('input[name="' + name + '"]');
526
+
527
+ /* If error is triggered display message to user */
528
+ if(error) {
529
+
530
+ /* Set up an error message */
531
+ $error = $('<span class="gf_settings_description"><label>Only TTF font files are supported.</label></span>');
532
+
533
+ /* Tell user about error */
534
+ if(! $input.hasClass('invalid')) {
535
+ $input.addClass('invalid').next().after($error.clone());
536
+ }
537
+ } else {
538
+
539
+ /* Remove validation error */
540
+ if($input.hasClass('invalid')) {
541
+ $input.removeClass('invalid').next().next().remove();
542
+ }
543
+ }
544
+ },
545
+
546
+ /**
547
+ * Disable the form submit button due to validation failure and mark is
548
+ * as currently disabled to prevent any funny business
549
+ * @param Object model An instance of Fonts.Model.Core()
550
+ * @since 4.0
551
+ */
552
+ disableSubmitButton: function(model) {
553
+
554
+ this.$el.find('.font-submit button').prop('disabled', true);
555
+ model.set('disabled', true);
556
+ },
557
+
558
+ /**
559
+ * Enable the form submit button due to validation passing and mark is
560
+ * as currently enabled. Users can now save the model.
561
+ * @param Object model An instance of Fonts.Model.Core()
562
+ * @since 4.0
563
+ */
564
+ enableSubmitButton: function(model) {
565
+
566
+ this.$el.find('.font-submit button').prop('disabled', false);
567
+ model.set('disabled', false);
568
+ },
569
+
570
+ /**
571
+ * Save model after checking browser's native validation API passes and that model isn't enabled.
572
+ * @param Object ev The Backbone event object
573
+ * @since 4.0
574
+ */
575
+ formSubmission: function(ev) {
576
+
577
+ /* Allow native validation without submitting actual form to backend */
578
+ ev.preventDefault();
579
+
580
+ var $form = $(ev.currentTarget);
581
+
582
+ /* Check if the native form validation is a success */
583
+ if(ev.currentTarget.checkValidity() && this.model.get('disabled') === false) {
584
+
585
+ /* Show saving spinner */
586
+ this.addSpinner();
587
+
588
+ /* Remove previous message */
589
+ this.removeMessage();
590
+
591
+ console.log(this.model);
592
+
593
+ this.model.save({
594
+ nonce: this.$el.find('input[name=wpnonce]').val()
595
+ }, {
596
+ success: $.proxy(function(model, response, options) {
597
+
598
+ /* Remove saving spinner */
599
+ this.removeSpinner();
600
+
601
+ /* Display Message */
602
+ this.displayMessage(GFPDF.updateSuccess);
603
+
604
+ /* Keep our model in sync */
605
+ this.model.set(model);
606
+
607
+ }, this),
608
+
609
+ error: $.proxy(function(response, type, errorName) {
610
+
611
+ /* Remove saving spinner */
612
+ this.removeSpinner();
613
+
614
+ /* Display Error */
615
+ if(response.responseJSON.error) {
616
+ this.displayMessage(response.responseJSON.error, true);
617
+ }
618
+ }, this)
619
+ });
620
+ }
621
+ },
622
+
623
+ /**
624
+ * Delete our model
625
+ * @param Object ev The Backbone event object
626
+ * @since 4.0
627
+ */
628
+ deleteModel: function(ev) {
629
+
630
+ /* Prevent default anchor action */
631
+ ev.preventDefault();
632
+
633
+ /* Get our dialog box */
634
+ var $dialog = $( '#delete-confirm' );
635
+
636
+ /* Set up our dialog box buttons */
637
+ var deleteButtons = [{
638
+ text: GFPDF.delete,
639
+ click: $.proxy(function() {
640
+
641
+ /* Hide the confirmation dialog */
642
+ $dialog.wpdialog( 'destroy' );
643
+
644
+ /* If an ID is set (pulled from DB) do our AJAX delete call */
645
+ if(this.model.get('id')) {
646
+
647
+ /* Show saving spinner */
648
+ this.addSpinner();
649
+
650
+ /* Remove previous message */
651
+ this.removeMessage();
652
+
653
+ /* Hide the container */
654
+ this.$el.hide();
655
+
656
+ this.model.destroy({
657
+ nonce: this.$el.find('input[name=wpnonce]').val()
658
+ }, {
659
+ success: $.proxy(function(model, response, options) {
660
+
661
+ /* Remove saving spinner */
662
+ this.removeSpinner();
663
+
664
+ /* Display Message */
665
+ this.displayMessage(GFPDF.deleteSuccess);
666
+
667
+ /* Remove from collection */
668
+ this.collection.remove(this.model);
669
+
670
+ }, this),
671
+
672
+ error: $.proxy(function(response, type, errorName) {
673
+
674
+ /* Remove saving spinner */
675
+ this.removeSpinner();
676
+
677
+ /* Remove from collection */
678
+ this.collection.remove(this.model);
679
+
680
+ /* Display Error */
681
+ if(response.responseJSON.error) {
682
+ this.displayMessage(response.responseJSON.error, true);
683
+ }
684
+
685
+ }, this)
686
+ });
687
+
688
+ /* TODO: if destroy() is successful remove the hidden item */
689
+ } else {
690
+ this.collection.remove(this.model);
691
+ }
692
+
693
+ }, this)
694
+ },
695
+ {
696
+ text: GFPDF.cancel,
697
+ click: function() {
698
+
699
+ /* Cancel */
700
+ $dialog.wpdialog( 'destroy' );
701
+ }
702
+ }];
703
+
704
+ /* Set up our dialog box */
705
+ Fonts.Misc.Dialog($dialog, deleteButtons, 300, 175);
706
+
707
+ /* Open the dialog box */
708
+ $dialog.wpdialog( 'open' );
709
+ },
710
+
711
+ /**
712
+ * Adds an AJAX loader so the user knows a query is being made
713
+ * @since 4.0
714
+ */
715
+ addSpinner: function() {
716
+ var $spinner = $('<img alt="Loading" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner" style="margin-top: 4px;" />');
717
+ this.$el.find('.font-submit button').after($spinner);
718
+ },
719
+
720
+ /**
721
+ * Remove AJAX loader so the user knows a query is finished
722
+ * @since 4.0
723
+ */
724
+ removeSpinner: function() {
725
+ this.$el.find('.gfpdf-spinner').remove();
726
+ },
727
+
728
+ /**
729
+ * Show message to the user
730
+ * @param String msg The message to be displayed
731
+ * @param Boolean isError If set to true an error will be displayed
732
+ * @since 4.0
733
+ */
734
+ displayMessage: function(msg, isError) {
735
+
736
+ /* Generate our error template */
737
+ var $message = $('<div class="updated notice">');
738
+
739
+ /* Add our error class if requested */
740
+ if(isError === true) {
741
+ $message.addClass('error');
742
+ }
743
+
744
+ /* Add the message to be displayed */
745
+ $message.html('<p>' + msg + '</p>');
746
+
747
+ /* Add message to the DOM */
748
+ this.$el.find('form').before($message);
749
+ },
750
+
751
+ /**
752
+ * Remove any messages currently being shown to the user
753
+ * @since 4.0
754
+ */
755
+ removeMessage: function() {
756
+ this.$el.find('div.notice').slideUp(function() {
757
+ $(this).remove();
758
+ });
759
+ }
760
+ });
761
+
762
+ /**
763
+ * A simple view that creates an interface for adding new models to our collection
764
+ * @since 4.0
765
+ */
766
+ Fonts.View.Add = Backbone.View.extend({
767
+
768
+ /**
769
+ * Our View Target Element
770
+ * @type String
771
+ * @since 4.0
772
+ */
773
+ el: '#font-add-list',
774
+
775
+ /**
776
+ * Our DOM Events
777
+ * @type Object
778
+ * @since 4.0
779
+ */
780
+ events: {
781
+ 'click': 'addFont',
782
+ },
783
+
784
+ /**
785
+ * Store our Fonts.Container.Core() object so our view can easily add new models
786
+ * and renders the view
787
+ * @param Object options User-passed parameters
788
+ * @since 4.0
789
+ */
790
+ initialize: function(options) {
791
+
792
+ this.container = options.container;
793
+ this.render();
794
+ },
795
+
796
+ /**
797
+ * Renders our View
798
+ * @since 4.0
799
+ */
800
+ render: function() {
801
+ this.$el.html('<i class="fa fa-plus fa-4x"></i><span>Add Font</span>');
802
+ },
803
+
804
+ /**
805
+ * Add a new model to our collection
806
+ * @param Object ev The Backbone event object
807
+ * @since 4.0
808
+ */
809
+ addFont: function(ev) {
810
+
811
+ /* Create an empty model */
812
+ var font = new Fonts.Model.Core();
813
+
814
+ /* Add new model to our collection */
815
+ this.collection.add(font);
816
+
817
+ /* Toggle the new model's font manager and set focus to our name field */
818
+ this.container.$el.find('li:last .font-settings').toggle()
819
+ .find('input[type="text"]:first').focus();
820
+ }
821
+ });
822
+
823
+
824
+ /**
825
+ * Generate a WP Dialog box
826
+ * @param jQuery Object $elm The element we want to bind the dialog box to
827
+ * @param Object buttonsList Handles the button creation process. More information found in the jQuery UI Dialog Documentation
828
+ * @param Integer boxWidth How wide should the dialog box be
829
+ * @param Integer boxHeight How tall should the dialog box be
830
+ * @since 4.0
831
+ */
832
+ Fonts.Misc.Dialog = function($elm, buttonsList, boxWidth, boxHeight) {
833
+ $elm.wpdialog({
834
+ autoOpen: false,
835
+ resizable: false,
836
+ draggable: false,
837
+ width: boxWidth,
838
+ height: boxHeight,
839
+ modal: true,
840
+ dialogClass: 'wp-dialog',
841
+ zIndex: 300000,
842
+ buttons: buttonsList,
843
+
844
+ /**
845
+ * Open our dialog box and set focus to the first button find
846
+ * Also add an event listener to close the dialog when the background is clicked
847
+ */
848
+ open: function() {
849
+ $(this).siblings('.ui-dialog-buttonpane').find('button:eq(1)').focus();
850
+
851
+ $('.ui-widget-overlay').bind('click', function() {
852
+ $elm.wpdialog('close');
853
+ });
854
+ }
855
+ });
856
+ };
857
+
858
+
859
+
860
+
861
+ /**
862
+ * Our Documentation Search API
863
+ * We'll add a search bar and output the results of the search
864
+ * from our API to assist users with our software.
865
+ * @since 4.0
866
+ */
867
+
868
+ var help = {}; // create namespace for our app
869
+
870
+ help.SearchModel = Backbone.Model.extend({});
871
+
872
+ help.SearchCollection = Backbone.Collection.extend({
873
+ model: help.SearchModel,
874
+
875
+ initialize: function(models, options) {
876
+ this.url = options.url;
877
+ },
878
+
879
+ });
880
+
881
+ help.ContainerView = Backbone.View.extend({
882
+ el: '#search-knowledgebase',
883
+
884
+ events: {
885
+ 'keyup #search-help-input' : 'doSearch',
886
+ 'change #search-help-input' : 'doSearch',
887
+ },
888
+
889
+ initialize: function() {
890
+ /* initialise our timer */
891
+ this.timer = true;
892
+
893
+ /* render the container view */
894
+ this.render();
895
+ },
896
+
897
+ render: function() {
898
+ this.addSearchBar();
899
+
900
+ return this;
901
+ },
902
+
903
+ addSearchBar: function() {
904
+ /* create our search element */
905
+ var $input = $('<input>').attr('type', 'text')
906
+ .attr('placeholder', ' ' + GFPDF.searchPlaceholder)
907
+ .attr('id', 'search-help-input');
908
+
909
+ /* add out search box and give it focus */
910
+ this.$el.prepend($input);
911
+
912
+ $input.tooltip({
913
+ items: 'input',
914
+ content: 'The search must be more than 3 characters.',
915
+ tooltipClass: 'ui-state-error',
916
+ }).tooltip( 'disable' );
917
+
918
+ /* give our search box focus */
919
+ $input.focus();
920
+ },
921
+
922
+ doSearch: function(ev) {
923
+ var $search = $(ev.currentTarget);
924
+
925
+ /* clear any previous events */
926
+ window.clearTimeout(this.timer);
927
+
928
+ /* only trigger our search if user has entered more than 3 characters */
929
+ var value = $.trim($search.val());
930
+ var previousValue = $search.data('currentValue');
931
+
932
+ if(value.length > 3 && $search.data('previousValue') !== value) {
933
+ $search.tooltip( 'disable' );
934
+
935
+ /* track the data value */
936
+ $search.data('currentValue', value);
937
+
938
+ this.timer = window.setTimeout(_.bind(function() {
939
+ this.processSearch(value);
940
+ }, this), 500);
941
+ } else if(value.length <= 3 && ev.keyCode == 13) {
942
+ $search.tooltip( 'enable' ).tooltip( 'open' );
943
+ }
944
+ },
945
+
946
+ processSearch: function(search) {
947
+ /* Initialise our Collection and pull the data from our source */
948
+ console.log('Searching our collection...');
949
+
950
+ new help.DocsView({
951
+ s: search,
952
+ });
953
+ }
954
+
955
+ });
956
+
957
+ help.MainView = Backbone.View.extend({
958
+
959
+ callAPI: function(url) {
960
+ /* do our search */
961
+ this.collection.fetch({
962
+ success: _.bind(this.renderSearch, this),
963
+ error: _.bind(this.renderSearchError),
964
+ });
965
+ },
966
+
967
+ renderSearch: function(collection, response) {
968
+ console.log('Rendering Search Results');
969
+
970
+ this.hideSpinner();
971
+
972
+ var $container = this.$el.find('.inside ul');
973
+
974
+ $container.html(this.template({
975
+ collection: this.collection.toJSON(),
976
+ url: this.url,
977
+ }));
978
+
979
+ var $wrapper = $container.parent();
980
+ if(!$wrapper.is(':visible')) {
981
+ $wrapper.slideDown(500);
982
+ }
983
+
984
+ },
985
+
986
+ renderSearchError: function(collection, response) {
987
+ console.log('Search Failed');
988
+ console.log(collection);
989
+ console.log(response);
990
+ },
991
+
992
+
993
+ showSpinner: function() {
994
+ this.$el.find('.spinner').addClass('is-active');
995
+
996
+ if(!this.$el.is(':visible')) {
997
+ this.$el.slideDown(500);
998
+ }
999
+ },
1000
+
1001
+ hideSpinner: function() {
1002
+ this.$el.find('.spinner').removeClass('is-active');
1003
+ },
1004
+ });
1005
+
1006
+ help.DocsView = help.MainView.extend({
1007
+ el: '#documentation-api',
1008
+
1009
+ template: '#GravityPDFSearchResultsDocumentation',
1010
+
1011
+ initialize: function(options) {
1012
+ this.url = 'https://gravitypdf.com/wp-json/wp/v2/v4_docs/';
1013
+ this.s = options.s;
1014
+ this.render();
1015
+ },
1016
+
1017
+ render: function() {
1018
+ /* set up out template */
1019
+ this.template = _.template($(this.template).html(), null, UnderscoreSettingsOverride);
1020
+
1021
+ /* show the loading spinner */
1022
+ this.showSpinner();
1023
+
1024
+ /* set up view search params */
1025
+ var s = encodeURIComponent(this.s);
1026
+ var url = this.url + '?search=' + s;
1027
+
1028
+ /* initialise our collection */
1029
+ this.collection = new help.SearchCollection([], {
1030
+ url: url,
1031
+ });
1032
+
1033
+ /* ping api for results */
1034
+ this.callAPI(url);
1035
+
1036
+ return this;
1037
+ },
1038
+ });
1039
+
1040
+ /**
1041
+ * Our Admin controller
1042
+ * Applies correct JS to settings pages
1043
+ */
1044
+ function GravityPDF () {
1045
+ var self = this;
1046
+
1047
+ this.init = function() {
1048
+ if(this.is_settings()) {
1049
+ this.processSettings();
1050
+ }
1051
+ };
1052
+
1053
+ this.is_settings = function() {
1054
+ return $('#tab_PDF').length;
1055
+ };
1056
+
1057
+ this.processSettings = function() {
1058
+ var active = $('.nav-tab-wrapper a.nav-tab-active:first').data('id');
1059
+
1060
+ switch (active) {
1061
+ case 'tools':
1062
+ this.tools_settings();
1063
+ break;
1064
+
1065
+ case 'help':
1066
+ this.help_settings();
1067
+ break;
1068
+ }
1069
+ };
1070
+
1071
+ /**
1072
+ * The help settings model method
1073
+ * This sets up and processes any of the JS that needs to be applied on the help settings tab
1074
+ * @since 4.0
1075
+ */
1076
+ this.help_settings = function() {
1077
+ /**
1078
+ * Load our settings dependancy
1079
+ */
1080
+ new help.ContainerView();
1081
+ };
1082
+
1083
+ /**
1084
+ * The help tools model method
1085
+ * This sets up and processes any of the JS that needs to be applied on the tools settings tab
1086
+ * @since 4.0
1087
+ */
1088
+ this.tools_settings = function() {
1089
+
1090
+ var json = JSON.parse(GFPDF.customFontData);
1091
+
1092
+ /* Initialise our collection and load with our font JSON data */
1093
+ var fontCollection = new Fonts.Collection.Core(json);
1094
+
1095
+ /* Create a container View and pass in our collection */
1096
+ var container = new Fonts.View.Container({
1097
+ collection: fontCollection
1098
+ });
1099
+
1100
+ /* Create a Add View so user's can add new fonts and pass in our collection and container */
1101
+ new Fonts.View.Add({
1102
+ collection: fontCollection,
1103
+ container: container
1104
+ });
1105
+ };
1106
+
1107
+ }
1108
+
1109
+ var pdf = new GravityPDF();
1110
+ pdf.init();
1111
+
1112
+ });
1113
  })(jQuery);
src/assets/js/gfpdf-entries.js CHANGED
@@ -1,41 +1,41 @@
1
- /**
2
- * Gravity PDF Entries
3
- * Dependancies: jQuery
4
- * @since 4.0
5
- */
6
-
7
- (function($) {
8
-
9
- var GFPDF = {
10
-
11
- /**
12
- * Do a better hover when accessing the PDF submenu
13
- * This allows for a longer timeout before the submenu is hidden again
14
- * @since 4.0
15
- */
16
- PDFSubmenuHover: function() {
17
- $('table .gf_form_action_has_submenu').hover(function() {
18
-
19
- clearTimeout($(this).data('timeout'));
20
-
21
- $(this).find('.gf_submenu').show();
22
- }, function() {
23
-
24
- var self = this;
25
- var t = setTimeout(function() {
26
- $(self).find('.gf_submenu').hide();
27
- }, 350);
28
-
29
- $(this).data('timeout', t);
30
- });
31
- }
32
- };
33
-
34
- /**
35
- * Fires on the Document Ready Event (the same as $(document).ready(function() { ... });)
36
- * @since 4.0
37
- */
38
- $(function() {
39
- GFPDF.PDFSubmenuHover();
40
- });
41
  })(jQuery);
1
+ /**
2
+ * Gravity PDF Entries
3
+ * Dependancies: jQuery
4
+ * @since 4.0
5
+ */
6
+
7
+ (function($) {
8
+
9
+ var GFPDF = {
10
+
11
+ /**
12
+ * Do a better hover when accessing the PDF submenu
13
+ * This allows for a longer timeout before the submenu is hidden again
14
+ * @since 4.0
15
+ */
16
+ PDFSubmenuHover: function() {
17
+ $('table .gf_form_action_has_submenu').hover(function() {
18
+
19
+ clearTimeout($(this).data('timeout'));
20
+
21
+ $(this).find('.gf_submenu').show();
22
+ }, function() {
23
+
24
+ var self = this;
25
+ var t = setTimeout(function() {
26
+ $(self).find('.gf_submenu').hide();
27
+ }, 350);
28
+
29
+ $(this).data('timeout', t);
30
+ });
31
+ }
32
+ };
33
+
34
+ /**
35
+ * Fires on the Document Ready Event (the same as $(document).ready(function() { ... });)
36
+ * @since 4.0
37
+ */
38
+ $(function() {
39
+ GFPDF.PDFSubmenuHover();
40
+ });
41
  })(jQuery);
src/assets/js/gfpdf-migration.js CHANGED
@@ -1,74 +1,74 @@
1
- /**
2
- * Gravity PDF Multisite v3 to v4 Migration Script
3
- * Dependancies: jQuery
4
- * @since 4.0
5
- */
6
-
7
- (function($) {
8
-
9
- function ajax_migration( blog_id, nonce, $container ) {
10
- $container.append( '<p>' + GFPDF.migratingSite.replace( /%s/g, blog_id ) + ' <img alt="' + GFPDF.spinnerAlt + '" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner" style="width:20px;vertical-align: middle;padding-left:5px" /></p>' );
11
-
12
- $.ajax({
13
- type : "post",
14
- dataType : "json",
15
- url : GFPDF.ajaxUrl,
16
- data : {
17
- 'action': 'multisite_v3_migration',
18
- 'nonce': nonce,
19
- 'blog_id': blog_id,
20
- },
21
- success: function( json ) {
22
- /* Remove the spinner */
23
- $container.find( '.gfpdf-spinner' ).remove();
24
-
25
- /* Display appropriate response. Either complete, specific error or generic error */
26
- if( json.results === "complete" ) {
27
- $container.append( '<p>' + GFPDF.siteMigrationComplete.replace( /%s/g, blog_id ) + '</p>' );
28
- } else if( json.results.error ) {
29
- $container.append( '<p><strong>' + GFPDF.migrationError + ': ' + json.results.error + '</strong></p>' );
30
- } else {
31
- $container.append( '<p><strong>' + GFPDF.siteMigrationErrors.replace( /%s/g, blog_id ) + '</strong></p>' );
32
- }
33
-
34
- /* Run the next migration, if it exists, or show as complete */
35
- if( gfpdf_migration_multisite_ids.length > 0 ) {
36
- ajax_migration( gfpdf_migration_multisite_ids.shift(), nonce, $container );
37
- } else {
38
- $( '#gfpdf-multisite-migration-complete' ).show();
39
- }
40
- },
41
- error: function() {
42
- /* Remove the spinner */
43
- $container.find( '.gfpdf-spinner' ).remove();
44
-
45
- /* Add a generic error */
46
- $container.append( '<p><strong>' + GFPDF.siteMigrationErrors.replace( /%s/g, blog_id ) + '</strong></p>' );
47
-
48
- /* Run the next migration, if it exists, or show as complete */
49
- if( gfpdf_migration_multisite_ids.length > 0 ) {
50
- ajax_migration( gfpdf_migration_multisite_ids.shift(), nonce, $container );
51
- } else {
52
- $( '#gfpdf-multisite-migration-complete' ).show();
53
- }
54
- },
55
- });
56
- }
57
-
58
- /**
59
- * Fires on the Document Ready Event (the same as $(document).ready(function() { ... });)
60
- * @since 4.0
61
- */
62
- $(function() {
63
-
64
- /* Grab the container and nonce */
65
- var $container = $( '#gfpdf-multisite-migration-copy' );
66
- var nonce = $container.data( 'nonce' );
67
-
68
- /* Begin the migration */
69
- if( gfpdf_migration_multisite_ids.length > 0 ) {
70
- ajax_migration( gfpdf_migration_multisite_ids.shift(), nonce, $container );
71
- }
72
- });
73
-
74
- })( jQuery );
1
+ /**
2
+ * Gravity PDF Multisite v3 to v4 Migration Script
3
+ * Dependancies: jQuery
4
+ * @since 4.0
5
+ */
6
+
7
+ (function($) {
8
+
9
+ function ajax_migration( blog_id, nonce, $container ) {
10
+ $container.append( '<p>' + GFPDF.migratingSite.replace( /%s/g, blog_id ) + ' <img alt="' + GFPDF.spinnerAlt + '" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner" style="width:20px;vertical-align: middle;padding-left:5px" /></p>' );
11
+
12
+ $.ajax({
13
+ type : "post",
14
+ dataType : "json",
15
+ url : GFPDF.ajaxUrl,
16
+ data : {
17
+ 'action': 'multisite_v3_migration',
18
+ 'nonce': nonce,
19
+ 'blog_id': blog_id,
20
+ },
21
+ success: function( json ) {
22
+ /* Remove the spinner */
23
+ $container.find( '.gfpdf-spinner' ).remove();
24
+
25
+ /* Display appropriate response. Either complete, specific error or generic error */
26
+ if( json.results === "complete" ) {
27
+ $container.append( '<p>' + GFPDF.siteMigrationComplete.replace( /%s/g, blog_id ) + '</p>' );
28
+ } else if( json.results.error ) {
29
+ $container.append( '<p><strong>' + GFPDF.migrationError + ': ' + json.results.error + '</strong></p>' );
30
+ } else {
31
+ $container.append( '<p><strong>' + GFPDF.siteMigrationErrors.replace( /%s/g, blog_id ) + '</strong></p>' );
32
+ }
33
+
34
+ /* Run the next migration, if it exists, or show as complete */
35
+ if( gfpdf_migration_multisite_ids.length > 0 ) {
36
+ ajax_migration( gfpdf_migration_multisite_ids.shift(), nonce, $container );
37
+ } else {
38
+ $( '#gfpdf-multisite-migration-complete' ).show();
39
+ }
40
+ },
41
+ error: function() {
42
+ /* Remove the spinner */
43
+ $container.find( '.gfpdf-spinner' ).remove();
44
+
45
+ /* Add a generic error */
46
+ $container.append( '<p><strong>' + GFPDF.siteMigrationErrors.replace( /%s/g, blog_id ) + '</strong></p>' );
47
+
48
+ /* Run the next migration, if it exists, or show as complete */
49
+ if( gfpdf_migration_multisite_ids.length > 0 ) {
50
+ ajax_migration( gfpdf_migration_multisite_ids.shift(), nonce, $container );
51
+ } else {
52
+ $( '#gfpdf-multisite-migration-complete' ).show();
53
+ }
54
+ },
55
+ });
56
+ }
57
+
58
+ /**
59
+ * Fires on the Document Ready Event (the same as $(document).ready(function() { ... });)
60
+ * @since 4.0
61
+ */
62
+ $(function() {
63
+
64
+ /* Grab the container and nonce */
65
+ var $container = $( '#gfpdf-multisite-migration-copy' );
66
+ var nonce = $container.data( 'nonce' );
67
+
68
+ /* Begin the migration */
69
+ if( gfpdf_migration_multisite_ids.length > 0 ) {
70
+ ajax_migration( gfpdf_migration_multisite_ids.shift(), nonce, $container );
71
+ }
72
+ });
73
+
74
+ })( jQuery );
src/assets/js/gfpdf-settings.js CHANGED
@@ -1,1453 +1,1453 @@
1
- /**
2
- * Gravity PDF Settings JS Logic
3
- * Dependancies: backbone, underscore, jquery
4
- * @since 4.0
5
- */
6
-
7
- (function ($) {
8
-
9
- /**
10
- * Fires on the Document Ready Event (the same as $(document).ready(function() { ... });)
11
- * @since 4.0
12
- */
13
- $(function () {
14
-
15
- /**
16
- * Our Admin controller
17
- * Applies correct JS to our Gravity PDF pages
18
- * @since 4.0
19
- */
20
- function GravityPDF () {
21
-
22
- /**
23
- * A reference to the GravityPDF object when 'this' refers to a different object
24
- * Usage is inside AJAX closures. All other functions should use $.proxy() to set this appropriately
25
- * @type Object
26
- * @since 4.0
27
- */
28
- var self = this
29
-
30
- /**
31
- * Process the correct settings area (the global PDF settings or individual form PDF settings)
32
- * Also set up any event listeners needed
33
- * @return void
34
- * @since 4.0
35
- */
36
- this.init = function () {
37
-
38
- /* Process any common functions */
39
- this.initCommon()
40
-
41
- /* Process the global PDF settings */
42
- if (this.isSettings()) {
43
- this.processSettings()
44
- }
45
-
46
- /* Process the individual form PDF settings */
47
- if (this.isFormSettings()) {
48
- this.processFormSettings()
49
- }
50
- }
51
-
52
- /**
53
- * Initialise any common elements
54
- * @return void
55
- * @since 4.0
56
- */
57
- this.initCommon = function () {
58
-
59
- /* Change some Gravity Forms parameters */
60
- this.setupGravityForms()
61
-
62
- /* If we have a upload field handle the logic */
63
- this.doUploadListener()
64
-
65
- /* If we have a colour picker handle the logic */
66
- this.doColorPicker()
67
-
68
- /* If we have any select boxes to handle */
69
- this.setupSelectBoxes()
70
-
71
- /* Enable tooltips, if needed */
72
- this.showTooltips()
73
-
74
- /* Setup custom paper size, if needed */
75
- this.setupCustomPaperSize()
76
-
77
- /* Setup toggled fields, if needed */
78
- this.setupToggledFields()
79
-
80
- /* Setup our template loader, if needed */
81
- this.setupDynamicTemplateFields()
82
-
83
- /* Setup license deactivation, if needed */
84
- this.setupLicenseDeactivation()
85
- }
86
-
87
- /**
88
- * Replace some of Gravity Forms JS variables so it functions correctly with our PDF version
89
- *
90
- * @since 4.1
91
- */
92
- this.setupGravityForms = function () {
93
- /**
94
- * Check if the global gf_vars has been set and if so replace the .thisFormButton, .show, .hide objects with our
95
- * customised options.
96
- * @since 4.0
97
- */
98
- if (typeof gf_vars !== 'undefined') {
99
- gf_vars.thisFormButton = GFPDF.conditionalText
100
- gf_vars.show = GFPDF.enable
101
- gf_vars.hide = GFPDF.disable
102
- }
103
-
104
- /*
105
- * Backwards compatibility support prior to Gravity Forms 2.3
106
- *
107
- * Override the gfMergeTagsObj.getTargetElement prototype to better handle CSS special characters in selectors
108
- * This is because Gravity Forms doesn't correctly espace meta-characters such a [ and ] (which we use extensively as IDs)
109
- * This functionality assists with the merge tag loader
110
- * @since 4.0
111
- */
112
- if (window.gfMergeTags && typeof form != 'undefined') {
113
- window.gfMergeTags.getTargetElement = this.resetGfMergeTags
114
- }
115
- }
116
-
117
- /**
118
- * Get if on the global PDF settings pages
119
- * @return Integer
120
- * @since 4.0
121
- */
122
- this.isSettings = function () {
123
- return $('#tab_PDF').length
124
- }
125
-
126
- /**
127
- * Check if on the individual PDF form settings pages
128
- * @return Integer
129
- * @since 4.0
130
- */
131
- this.isFormSettings = function () {
132
- return $('#tab_pdf').length
133
- }
134
-
135
- /**
136
- * See if we are on the form settings list page
137
- * @return Integer
138
- * @since 4.0
139
- */
140
- this.isFormSettingsList = function () {
141
- return $('#gfpdf_list_form').length
142
- }
143
-
144
- /**
145
- * See if we are on the form settings edit page
146
- * @return Integer
147
- * @since 4.0
148
- */
149
- this.isFormSettingsEdit = function () {
150
- return $('#gfpdf_pdf_form').length
151
- }
152
-
153
- /**
154
- * Check the current active PDF settings page
155
- * @return String
156
- * @since 4.0
157
- */
158
- this.getCurrentSettingsPage = function () {
159
- if (this.isSettings()) {
160
- return $('.nav-tab-wrapper a.nav-tab-active:first').data('id')
161
- }
162
- return ''
163
- }
164
-
165
- /**
166
- * Process the global settings page
167
- * @return void
168
- * @since 4.0
169
- */
170
- this.processSettings = function () {
171
-
172
- /* Ensure the Gravity Forms settings navigation (Form Settings / Notifications / Confirmation) has the 'tab' URI stripped from it */
173
- this.cleanupGFNavigation()
174
-
175
- /* Run our direct PDF status check */
176
- this.runPDFAccessCheck()
177
-
178
- /* Run the appropriate settings page */
179
- switch (this.getCurrentSettingsPage()) {
180
- case 'general':
181
- this.generalSettings()
182
- break
183
-
184
- case 'tools':
185
- this.toolsSettings()
186
- break
187
- }
188
- }
189
-
190
- /**
191
- * Routing functionality for the individual form settings page
192
- * @return void
193
- * @since 4.0
194
- */
195
- this.processFormSettings = function () {
196
-
197
- /* Process PDF list page */
198
- if (this.isFormSettingsList()) {
199
- this.doFormSettingsListPage()
200
- }
201
-
202
- /* Process single edit page */
203
- if (this.isFormSettingsEdit()) {
204
- this.doFormSettingsEditPage()
205
- }
206
- }
207
-
208
- /**
209
- * Process the individual PDF GF Form Settings Page
210
- * @return void
211
- * @since 4.0
212
- */
213
- this.doFormSettingsEditPage = function () {
214
-
215
- this.setupRequiredFields($('#gfpdf_pdf_form'))
216
- /* highlight which fields are required and disable in-browser validation */
217
- this.setupPdfTabs()
218
- this.handleSecurityConditionals()
219
- this.handlePDFConditionalLogic()
220
- this.handleOwnerRestriction()
221
- this.toggleFontAppearance($('#gfpdf_settings\\[template\\]').data('template_group'))
222
- this.toggleAppearanceTab()
223
-
224
- /*
225
- * Workaround for Firefix TinyMCE Editor Bug NS_ERROR_UNEXPECTED (http://www.tinymce.com/develop/bugtracker_view.php?id=3152) when loading wp_editor via AJAX
226
- * Manual save TinyMCE editors on form submission
227
- */
228
- $('#gfpdf_pdf_form').submit(function () {
229
- try {
230
- tinyMCE.triggerSave()
231
- } catch (e) {}
232
-
233
- })
234
-
235
- /* Add listener on submit functionality */
236
- $('#gfpdf_pdf_form').submit(function () {
237
- /* JSONify the conditional logic so we can pass it through the form and use it in PHP (after running json_decode) */
238
- $('#gfpdf_settings\\[conditionalLogic\\]').val(jQuery.toJSON(window.gfpdf_current_pdf.conditionalLogic))
239
- })
240
-
241
- }
242
-
243
- /**
244
- * Handles our DOM security conditional logic based on the user selection
245
- * @return void
246
- * @since 4.0
247
- */
248
- this.handleSecurityConditionals = function () {
249
-
250
- /* Get the appropriate elements for use */
251
- var $secTable = $('#pdf-general-advanced')
252
- var $pdfSecurity = $secTable.find('input[name="gfpdf_settings[security]"]')
253
- var $format = $secTable.find('input[name="gfpdf_settings[format]"]')
254
-
255
- /* Add change event to admin restrictions to show/hide dependant fields */
256
- $pdfSecurity.change(function () {
257
-
258
- if ($(this).is(':checked')) {
259
-
260
- /* Get the format dependancy */
261
- var format = $format.filter(':checked').val()
262
-
263
- if ($(this).val() === GFPDF.no || format !== GFPDF.standard) {
264
- /* hide security password / privileges */
265
- $secTable.find('tr:nth-child(3),tr:nth-child(4),tr:nth-child(5):not(.gfpdf-hidden)').hide()
266
- } else {
267
- /* show security password / privileges */
268
- $secTable.find('tr:nth-child(3),tr:nth-child(4),tr:nth-child(5):not(.gfpdf-hidden)').show()
269
- }
270
-
271
- if (format !== GFPDF.standard) {
272
- $secTable.find('tr:nth-child(2)').hide()
273
- } else {
274
- $secTable.find('tr:nth-child(2)').show()
275
- }
276
- }
277
-
278
- }).trigger('change')
279
-
280
- /* The format field effects the security field. When it changes it triggers the security field as changed */
281
- $format.change(function () {
282
- if ($(this).is(':checked')) {
283
- $pdfSecurity.trigger('change')
284
- }
285
- }).trigger('change')
286
- }
287
-
288
- /**
289
- * Add GF JS filter to change the conditional logic object type to our PDF
290
- * @return Object
291
- * @since 4.0
292
- */
293
- this.handlePDFConditionalLogic = function () {
294
-
295
- gform.addFilter('gform_conditional_object', function (object, objectType) {
296
- if (objectType === 'gfpdf') {
297
- return window.gfpdf_current_pdf
298
- }
299
- return object
300
- })
301
-
302
- /* Add change event to conditional logic field */
303
- $('#gfpdf_conditional_logic').change(function () {
304
-
305
- /* Only set up a .conditionalLogic object if it doesn't exist */
306
- if (typeof window.gfpdf_current_pdf.conditionalLogic == 'undefined' && $(this).prop('checked')) {
307
-
308
- window.gfpdf_current_pdf.conditionalLogic = new ConditionalLogic()
309
- } else if (!$(this).prop('checked')) {
310
-
311
- window.gfpdf_current_pdf.conditionalLogic = null
312
- }
313
- ToggleConditionalLogic(false, 'gfpdf')
314
-
315
- }).trigger('change')
316
- }
317
-
318
- /**
319
- * Show / Hide the Restrict Owner when `Enable Public Access` is set to "Yes"
320
- * @since 4.0
321
- */
322
- this.handleOwnerRestriction = function () {
323
-
324
- var $table = $('#gfpdf-advanced-pdf-options')
325
- var $publicAccess = $table.find('input[name="gfpdf_settings[public_access]"]')
326
-
327
- /*
328
- * Add change event to admin restrictions to show/hide dependant fields
329
- */
330
- $publicAccess.change(function () {
331
-
332
- if ($(this).is(':checked')) {
333
- if ($(this).val() === 'Yes') {
334
- /* hide user restrictions */
335
- $table.find('tr:nth-child(8)').hide()
336
- } else {
337
- /* show user restrictions */
338
- $table.find('tr:nth-child(8)').show()
339
- }
340
- }
341
- }).trigger('change')
342
- }
343
-
344
- /**
345
- * Process the functionality for the PDF form settings 'list' page
346
- * @return void
347
- * @since 4.0
348
- */
349
- this.doFormSettingsListPage = function () {
350
-
351
- this.setupAJAXListDeleteListener()
352
- this.setupAJAXListDuplicateListener()
353
- this.setupAJAXListStateListener()
354
- }
355
-
356
- /**
357
- * Handles the state change of a PDF list item via AJAX
358
- * @return void
359
- * @since 4.0
360
- */
361
- this.setupAJAXListStateListener = function () {
362
-
363
- /* Add live state listener to change active / inactive value */
364
- $('#gfpdf_list_form').on('click', '.check-column img', function () {
365
- var id = String($(this).data('id'))
366
- var that = this
367
-
368
- if (id.length > 0) {
369
- var is_active = that.src.indexOf('active1.png') >= 0
370
-
371
- if (is_active) {
372
- that.src = that.src.replace('active1.png', 'active0.png')
373
- $(that).attr('title', GFPDF.inactive).attr('alt', GFPDF.inactive)
374
- } else {
375
- that.src = that.src.replace('active0.png', 'active1.png')
376
- $(that).attr('title', GFPDF.active).attr('alt', GFPDF.active)
377
- }
378
-
379
- /* Set up ajax data */
380
- var data = {
381
- 'action': 'gfpdf_change_state',
382
- 'nonce': $(this).data('nonce'),
383
- 'fid': $(this).data('fid'),
384
- 'pid': $(this).data('id'),
385
- }
386
-
387
- /* Do ajax call */
388
- self.ajax(data, function (response) {
389
- /* Don't do anything with a successful response */
390
- })
391
- }
392
- })
393
- }
394
-
395
- /**
396
- * Handles the duplicate of a PDF list item via AJAX and fixes up all the nonce actions
397
- * @return void
398
- * @since 4.0
399
- */
400
- this.setupAJAXListDuplicateListener = function () {
401
-
402
- /* Add live duplicate listener */
403
- $('#gfpdf_list_form').on('click', 'a.submitduplicate', function () {
404
-
405
- var id = String($(this).data('id'))
406
- var that = this
407
-
408
- /* Add spinner */
409
- var $spinner = $('<img alt="' + GFPDF.spinnerAlt + '" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner gfpdf-spinner-small" />')
410
-
411
- /* Add our spinner */
412
- $(this).after($spinner).parent().parent().attr('style', 'position:static; visibility: visible;')
413
-
414
- if (id.length > 0) {
415
- /* Set up ajax data */
416
- var data = {
417
- 'action': 'gfpdf_list_duplicate',
418
- 'nonce': $(this).data('nonce'),
419
- 'fid': $(this).data('fid'),
420
- 'pid': $(this).data('id'),
421
- }
422
-
423
- /* Do ajax call */
424
- self.ajax(data, function (response) {
425
- if (response.msg) {
426
-
427
- /* Remove the spinner */
428
- $(that).parent().parent().attr('style', '').find('.gfpdf-spinner').remove()
429
-
430
- /* Provide feedback to use */
431
- self.show_message(response.msg)
432
-
433
- /* Clone the row to be duplicated */
434
- var $row = $(that).parents('tr')
435
- var $newRow = $row.clone().css('background', '#baffb8')
436
-
437
- /* Update the edit links to point to the new location */
438
- $newRow.find('.column-name > a, .edit a').each(function () {
439
- var href = $(this).attr('href')
440
- href = self.updateURLParameter(href, 'pid', response.pid)
441
- $(this).attr('href', href)
442
- })
443
-
444
- /* Update the name field */
445
- $newRow.find('.column-name > a').html(response.name)
446
-
447
- /* Find duplicate and delete elements */
448
- var $duplicate = $newRow.find('.duplicate a')
449
- var $delete = $newRow.find('.delete a')
450
- var $state = $newRow.find('.check-column img')
451
- var $shortcode = $newRow.find('.column-shortcode input')
452
-
453
- /* Update duplicate ID and nonce pointers so the actions are valid */
454
- $duplicate.data('id', response.pid)
455
- $duplicate.data('nonce', response.dup_nonce)
456
-
457
- /* Update delete ID and nonce pointers so the actions are valid */
458
- $delete.data('id', response.pid)
459
- $delete.data('nonce', response.del_nonce)
460
-
461
- /* update state ID and nonce pointers so the actions are valid */
462
- $state.data('id', response.pid)
463
- $state.data('nonce', response.state_nonce)
464
-
465
- /* Update our shortcode ID */
466
- var shortcodeValue = $shortcode.val()
467
- shortcodeValue = shortcodeValue.replace(id, response.pid)
468
- $shortcode.val(shortcodeValue)
469
-
470
- /* Add fix for alternate row background */
471
- var background = ''
472
- if ($row.hasClass('alternate')) {
473
- $newRow.removeClass('alternate')
474
- background = '#FFF'
475
- } else {
476
- $newRow.addClass('alternate')
477
- background = '#f9f9f9'
478
- }
479
-
480
- /* Add fix for toggle image */
481
- var toggle_src = $state.attr('src')
482
- $state
483
- .attr('title', GFPDF.inactive)
484
- .attr('alt', GFPDF.inactive)
485
- .attr('src', toggle_src.replace('active1.png', 'active0.png'))
486
-
487
- /* Add row to node and fade in */
488
- $newRow.hide().insertAfter($row).fadeIn().animate({backgroundColor: background})
489
- }
490
- })
491
- }
492
- })
493
- }
494
-
495
- /**
496
- * Check if the last item was just deleted
497
- */
498
- this.maybeShowEmptyRow = function () {
499
- var $container = $('#gfpdf_list_form tbody')
500
-
501
- if ($container.find('tr').length === 0) {
502
- var $row = $('<tr>').addClass('no-items')
503
- var $cell = $('<td>').attr('colspan', '5').addClass('colspanchange')
504
- var $add_new = $('<a>').attr('href', $('#add-new-pdf').attr('href')).append(GFPDF.letsGoCreateOne + '.')
505
- $cell.append(GFPDF.thisFormHasNoPdfs).append(' ').append($add_new)
506
- $row.append($cell)
507
- $container.append($row)
508
- }
509
- }
510
-
511
- /**
512
- * Handles the deletion of a PDF list item via AJAX
513
- * @return void
514
- * @since 4.0
515
- */
516
- this.setupAJAXListDeleteListener = function () {
517
-
518
- /* Set up our delete dialog */
519
- var $deleteDialog = $('#delete-confirm')
520
-
521
- var deleteButtons = [{
522
- text: GFPDF.delete,
523
- click: function () {
524
- /* handle ajax call */
525
- $deleteDialog.wpdialog('close')
526
- $elm = $($deleteDialog.data('elm'))
527
-
528
- /* Add spinner */
529
- var $spinner = $('<img alt="' + GFPDF.spinnerAlt + '" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner gfpdf-spinner-small" />')
530
-
531
- /* Add the spinner */
532
- $elm.append($spinner).parent().parent().attr('style', 'position:static; visibility: visible;')
533
-
534
- var data = {
535
- 'action': 'gfpdf_list_delete',
536
- 'nonce': $elm.data('nonce'),
537
- 'fid': $elm.data('fid'),
538
- 'pid': $elm.data('id'),
539
- }
540
-
541
- self.ajax(data, function (response) {
542
- if (response.msg) {
543
- /* Remove spinner */
544
- $elm.parent().parent().attr('style', '').find('.gfpdf-spinner').remove()
545
-
546
- self.show_message(response.msg)
547
- var $row = $elm.parents('tr')
548
- $row.css('background', '#ffb8b8').fadeOut(400, function () {
549
- this.remove()
550
- self.maybeShowEmptyRow()
551
- })
552
- }
553
-
554
- $deleteDialog.data('elm', null)
555
- })
556
-
557
- }
558
- },
559
- {
560
- text: GFPDF.cancel,
561
- click: function () {
562
- /* cancel */
563
- $deleteDialog.wpdialog('close').data('elm', null)
564
- }
565
- }]
566
-
567
- /* Add our delete dialog box */
568
- this.wp_dialog($deleteDialog, deleteButtons, 300, 175)
569
-
570
- /* Add live delete listener */
571
- $('#gfpdf_list_form').on('click', 'a.submitdelete', function () {
572
- var id = String($(this).data('id'))
573
- if (id.length > 0 && !$deleteDialog.data('elm')) {
574
- /* Allow responsiveness */
575
- self.resizeDialogIfNeeded($deleteDialog, 300, 175)
576
-
577
- $deleteDialog.wpdialog('open').data('elm', this)
578
- }
579
- })
580
- }
581
-
582
- /**
583
- * Handle our AJAX tabs to make it easier to navigate around our settings
584
- * @return void
585
- * @since 4.0
586
- */
587
- this.setupPdfTabs = function () {
588
-
589
- /* Hide all containers except the first one */
590
- $('.gfpdf-tab-container').not(":eq(0)").hide()
591
-
592
- /* Add click handler when our nav is selected */
593
- $('.gfpdf-tab-wrapper a').click(function () {
594
-
595
- /* Reset the active class */
596
- $(this).parents('ul').find('a').removeClass('current')
597
-
598
- /* Add the new active class */
599
- $(this).addClass('current').blur()
600
-
601
- /* Hide all containers */
602
- $('.gfpdf-tab-container').hide()
603
-
604
- /* Show new active container */
605
- $($(this).attr('href')).show()
606
-
607
- return false
608
-
609
- })
610
- }
611
-
612
- /**
613
- * Add change event listeners on our toggle params and toggle the container
614
- * @return void
615
- * @since 4.0
616
- */
617
- this.setupToggledFields = function () {
618
-
619
- $('form').off('change', '.gfpdf-input-toggle').on('change', '.gfpdf-input-toggle', function () {
620
-
621
- var $container = $(this).parent().next()
622
-
623
- /* Currently checked so hide out input and if cotains rich_text, textarea or input we will delete values */
624
- if ($(this).prop('checked')) {
625
- $container.slideDown('slow')
626
- } else {
627
- $container.slideUp('slow')
628
-
629
- /* Remove TinyMCE Content */
630
- $container.find('.wp-editor-area').each(function () {
631
- var editor = tinyMCE.get($(this).attr('id'))
632
-
633
- if (editor !== null) {
634
- editor.setContent('')
635
- }
636
-
637
- })
638
-
639
- /* Remove textarea content */
640
- $container.find('textarea').each(function () {
641
- $(this).val('')
642
- })
643
- }
644
- })
645
- }
646
-
647
- /**
648
- * PDF Templates can assign their own custom settings which can enhance a template
649
- * This function setups the required listeners and functionality to allow this behaviour
650
- * @return return
651
- * @since 4.0
652
- */
653
- this.setupDynamicTemplateFields = function () {
654
-
655
- /* Add change listener to our template */
656
- $('#gfpdf_settings\\[template\\]').off('change').change(function () {
657
-
658
- /* Add spinner */
659
- var $spinner = $('<img alt="' + GFPDF.spinnerAlt + '" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner" />')
660
-
661
- $(this).next().after($spinner)
662
-
663
- var data = {
664
- 'action': 'gfpdf_get_template_fields',
665
- 'nonce': GFPDF.ajaxNonce,
666
- 'template': $(this).val(),
667
- 'type': $(this).attr('id'),
668
- 'id': $('#gform_id').val(),
669
- 'gform_pdf_id': $('#gform_pdf_id').val(),
670
- }
671
-
672
- self.ajax(data, function (response) {
673
-
674
- /* Remove our UI loader */
675
- $spinner.remove()
676
-
677
- /* Reset our legacy Advanced Template option */
678
- $('input[name="gfpdf_settings[advanced_template]"][value="No"]').prop("checked", true).trigger('change')
679
-
680
- /* Only process if the response is valid */
681
- if (response.fields) {
682
-
683
- /* Backwards compatibility support prior to Gravity Forms 2.3 */
684
- if (window.gfMergeTags) {
685
- /* Remove any existing mergetag-marked inputs so they aren't processed twice after we add our new fields to the DOM */
686
- $('.merge-tag-support').removeClass('merge-tag-support')
687
- $('.all-merge-tags a.open-list').off('click')
688
- }
689
-
690
- /* Remove any previously loaded editors to prevent conflicts loading an editor with same name */
691
- $.each(response.editors, function (index, value) {
692
-
693
- var editor = tinyMCE.get(value)
694
- if (editor !== null) {
695
- /* Bug Fix for Firefox - http://www.tinymce.com/develop/bugtracker_view.php?id=3152 */
696
- try {
697
- tinyMCE.remove(editor)
698
- } catch (e) {}
699
- }
700
-
701
- })
702
-
703
- /* Replace the custom appearance with the AJAX response fields */
704
- $('#pdf-custom-appearance').hide().html(response.fields).fadeIn()
705
-
706
- /* Ensure our template nav item isn't hidden */
707
- $('#gfpdf-custom-appearance-nav').show()
708
-
709
- /* Load our new editors */
710
- self.loadTinyMCEEditor(response.editors, response.editor_init)
711
-
712
- /* reinitialise new dom elements */
713
- self.initCommon()
714
- self.doMergetags()
715
-
716
- } else {
717
- /* Hide our template nav item as there are no fields and clear our the HTML */
718
- $('#gfpdf-custom-appearance-nav').hide()
719
- $('#pdf-custom-appearance').html('')
720
- }
721
-
722
- /* Check if we should hide or show our font fields */
723
- if (response.template_type) {
724
- self.toggleFontAppearance(response.template_type)
725
- }
726
- })
727
- })
728
- }
729
-
730
- /**
731
- * Handles individual add-on license key deactivation via AJAX
732
- * @since 4.2
733
- */
734
- this.setupLicenseDeactivation = function () {
735
- $('.gfpdf-deactivate-license').click(function () {
736
- /* Do AJAX call so user can deactivate license */
737
- var $container = $(this).parent()
738
- $container.find('.gf_settings_description label').html('')
739
-
740
- /* Add spinner */
741
- var $spinner = $('<img alt="' + GFPDF.spinnerAlt + '" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner" />')
742
-
743
- /* Add our spinner */
744
- $(this).append($spinner)
745
-
746
- /* Set up ajax data */
747
- var slug = $(this).data('addon-name')
748
-
749
- var data = {
750
- 'action': 'gfpdf_deactivate_license',
751
- 'addon_name': slug,
752
- 'license': $(this).data('license'),
753
- 'nonce': $(this).data('nonce'),
754
- }
755
-
756
- /* Do ajax call */
757
- self.ajax(data, function (response) {
758
-
759
- /* Remove our loading spinner */
760
- $spinner.remove()
761
-
762
- if (response.success) {
763
- /* cleanup inputs */
764
- $('#gfpdf_settings\\[license_' + slug + '\\]').val('')
765
- $('#gfpdf_settings\\[license_' + slug + '_message\\]').val('')
766
- $('#gfpdf_settings\\[license_' + slug + '_status\\]').val('')
767
- $container.find('i').remove()
768
- $container.find('a').remove()
769
-
770
- $container.find('.gf_settings_description label').html(response.success)
771
- } else {
772
- /* Show error message */
773
- $container.find('.gf_settings_description label').html(response.error)
774
- }
775
- })
776
-
777
- return false
778
- })
779
- }
780
-
781
- /**
782
- * Check if the template type is 'legacy' and hide the font type, size and colour, otherwise show those fields
783
- * @param type
784
- * @since 4.0
785
- */
786
- this.toggleFontAppearance = function (type) {
787
- var $rows = $('#pdf-general-appearance').find('tr.gfpdf_font_type, tr.gfpdf_font_size, tr.gfpdf_font_colour')
788
-
789
- /* Hide our font fields if processing a legacy template */
790
- if (type == 'legacy') {
791
- $rows.hide()
792
- } else { /* Ensure the fields are showing */
793
- $rows.show()
794
- }
795
- }
796
-
797
- /**
798
- * Check if the current PDF template selection uses the legacy Enable Advanced Templating option
799
- * and hide the Appearance tab altogether
800
- * @since 4.0
801
- */
802
- this.toggleAppearanceTab = function () {
803
-
804
- $('input[name="gfpdf_settings[advanced_template]"]').change(function () {
805
- if ($(this).val() == 'Yes') {
806
- $('#gfpdf-appearance-nav').hide()
807
- } else {
808
- $('#gfpdf-appearance-nav').show()
809
- }
810
- })
811
-
812
- $('input[name="gfpdf_settings[advanced_template]"]:checked').trigger('change')
813
- }
814
-
815
- /**
816
- * Initialises AJAX-loaded wp_editor TinyMCE containers for use
817
- * @param Array editors The DOM element IDs to parse
818
- * @param Object settings The TinyMCE settings to use
819
- * @return void
820
- * @since 4.0
821
- */
822
- this.loadTinyMCEEditor = function (editors, settings) {
823
-
824
- if (settings != null) {
825
- /* Ensure appropriate settings defaults */
826
- settings.body_class = 'id post-type-post post-status-publish post-format-standard'
827
- settings.formats = {
828
- alignleft: [
829
- {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: {textAlign: 'left'}},
830
- {selector: 'img,table,dl.wp-caption', classes: 'alignleft'}
831
- ],
832
- aligncenter: [
833
- {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: {textAlign: 'center'}},
834
- {selector: 'img,table,dl.wp-caption', classes: 'aligncenter'}
835
- ],
836
- alignright: [
837
- {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: {textAlign: 'right'}},
838
- {selector: 'img,table,dl.wp-caption', classes: 'alignright'}
839
- ],
840
- strikethrough: {inline: 'del'}
841
- }
842
- }
843
-
844
- /* Load our new editors */
845
- $.each(editors, function (index, fullId) {
846
-
847
- /* Setup out selector */
848
- settings.selector = '#' + fullId
849
-
850
- /* Initialise our editor */
851
- tinyMCE.init(settings)
852
-
853
- /* Add our editor to the DOM */
854
- tinyMCE.execCommand('mceAddEditor', false, fullId)
855
-
856
- /* Enable WP quick tags */
857
- if (typeof(QTags) == 'function') {
858
- QTags({'id': fullId})
859
- QTags._buttonsInit()
860
-
861
- /* remember last tab selected */
862
- if (typeof switchEditors.switchto === 'function') {
863
- switchEditors.switchto(jQuery('#wp-' + fullId + '-wrap').find('.wp-switch-editor.switch-' + ( getUserSetting('editor') == 'html' ? 'html' : 'tmce' ))[0])
864
- }
865
- }
866
-
867
- })
868
- }
869
-
870
- /**
871
- * Rich Media Uploader
872
- * JS Pulled straight from Easy Digital Download's admin-scripts.js
873
- * @return void
874
- * @since 4.0
875
- */
876
- this.doUploadListener = function () {
877
- // WP 3.5+ uploader
878
- var file_frame
879
- window.formfield = ''
880
-
881
- $('body').off('click', '.gfpdf_settings_upload_button').on('click', '.gfpdf_settings_upload_button', function (e) {
882
- e.preventDefault()
883
-
884
- var $button = $(this)
885
- window.formfield = $(this).parent().prev()
886
-
887
- /* If the media frame already exists, reopen it. */
888
- if (file_frame) {
889
- file_frame.open()
890
- return
891
- }
892
-
893
- /* Create the media frame. */
894
- file_frame = wp.media.frames.file_frame = wp.media({
895
- title: $button.data('uploader-title'),
896
- button: {
897
- text: $button.data('uploader-button-text')
898
- },
899
- multiple: false,
900
- })
901
-
902
- /* When a file is selected, run a callback. */
903
- file_frame.on('select', function () {
904
- var selection = file_frame.state().get('selection')
905
- selection.each(function (attachment, index) {
906
- attachment = attachment.toJSON()
907
- window.formfield.val(attachment.url).change()
908
- })
909
- })
910
-
911
- /* Finally, open the modal */
912
- file_frame.open()
913
- })
914
- }
915
-
916
- /**
917
- * Check if a Gravity PDF color picker field is present and initialise
918
- * @return void
919
- * @since 4.0
920
- */
921
- this.doColorPicker = function () {
922
-
923
- $('.gfpdf-color-picker').each(function () {
924
- $(this).wpColorPicker()
925
- })
926
- }
927
-
928
- /**
929
- * Remove any existing merge tags and reinitialise
930
- * @return void
931
- * @since 4.0
932
- */
933
- this.doMergetags = function () {
934
-
935
- /* Backwards compatibility support prior to Gravity Forms 2.3 */
936
- if (window.gfMergeTags && typeof form != 'undefined') {
937
- window.gfMergeTags = new gfMergeTagsObj(form)
938
- window.gfMergeTags.getTargetElement = this.resetGfMergeTags
939
- }
940
-
941
- /* Gravity Forms 2.3+ Merge tag support */
942
- if (!window.gfMergeTags && typeof form != 'undefined' && $('.merge-tag-support').length >= 0) {
943
- $('.merge-tag-support').each(function () {
944
- new gfMergeTagsObj(form, $(this))
945
- })
946
- }
947
- }
948
-
949
- /**
950
- * Escape any meta characters in the target element ID, as per the jQuery spec
951
- *
952
- * @param elem
953
- * @returns {*|HTMLElement}
954
- * @since 4.1
955
- */
956
- this.resetGfMergeTags = function (elem) {
957
- var $elem = $(elem)
958
- var selector = $elem.parents('span.all-merge-tags').data('targetElement')
959
-
960
- /* escape any meta-characters as per jQuery Spec http://api.jquery.com/category/selectors/ */
961
- selector = selector.replace(/[!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g, "\\$&")
962
-
963
- return $('#' + selector)
964
- }
965
-
966
- /**
967
- * Show / Hide our custom paper size as needed
968
- * @return void
969
- * @since 4.0
970
- */
971
- this.setupCustomPaperSize = function () {
972
-
973
- $('.gfpdf_paper_size').each(function () {
974
- var $customPaperSize = $(this).nextAll('.gfpdf_paper_size_other').first()
975
- var $paperSize = $(this).find('select')
976
-
977
- /* Add our change event */
978
- $paperSize.off('change').change(function () {
979
- if ($(this).val() === 'CUSTOM') {
980
- $customPaperSize.fadeIn()
981
- } else {
982
- $customPaperSize.fadeOut()
983
- }
984
- }).trigger('change')
985
-
986
- })
987
-
988
- }
989
-
990
- /**
991
- * Our &tab=(.+?) url param causes issues with the default GF navigation
992
- * @return void
993
- * @since 4.0
994
- */
995
- this.cleanupGFNavigation = function () {
996
- var $nav = $('#gform_tabs a')
997
-
998
- $nav.each(function () {
999
- var href = $(this).attr('href')
1000
- var regex = new RegExp('&tab=[^&;]*', 'g')
1001
-
1002
- $(this).attr('href', href.replace(regex, ''))
1003
- })
1004
- }
1005
-
1006
- /**
1007
- * Do an AJAX call to verify a user is protected
1008
- * @return void
1009
- * @since 4.0
1010
- */
1011
- this.runPDFAccessCheck = function () {
1012
- var $status = $('#gfpdf-direct-pdf-protection-check')
1013
-
1014
- if ($status.length > 0) {
1015
- /* Do our AJAX call */
1016
-
1017
- /* Add spinner */
1018
- var $spinner = $('<img alt="' + GFPDF.spinnerAlt + '" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner" />')
1019
-
1020
- /* Add our spinner */
1021
- $status.append($spinner)
1022
-
1023
- /* Set up ajax data */
1024
- var data = {
1025
- 'action': 'gfpdf_has_pdf_protection',
1026
- 'nonce': $status.data('nonce'),
1027
- }
1028
-
1029
- /* Do ajax call */
1030
- this.ajax(data, function (response) {
1031
-
1032
- /* Remove our loading spinner */
1033
- $spinner.remove()
1034
-
1035
- if (response === true) {
1036
- /* enable our protected message */
1037
- $status.find('#gfpdf-direct-pdf-check-protected').show()
1038
- } else {
1039
- /* enable our unprotected message */
1040
- $status.find('#gfpdf-direct-pdf-check-unprotected').show()
1041
- }
1042
- })
1043
- }
1044
- }
1045
-
1046
- /**
1047
- * Enable dynamic required fields on the Gravity Forms PDF Settings page
1048
- * This function will highlight to the user which fields should be processed, and disable in-browser validation
1049
- * @return void
1050
- * @since 4.0
1051
- */
1052
- this.setupRequiredFields = function ($elm) {
1053
- /* prevent in browser validation */
1054
- $elm.attr('novalidate', 'novalidate')
1055
-
1056
- /* gf compatibility + disable automatic field validation */
1057
- $elm.find('tr input[type="submit"]').click(function () {
1058
- $elm.addClass('formSubmitted')
1059
- })
1060
-
1061
- /* add the required star to make it easier for users */
1062
- $elm.find('tr').each(function () {
1063
- $(this).find(':input[required=""]:first, :input[required]:first').parents('tr').find('th').append('<span class="gfield_required">*</span>')
1064
- })
1065
- }
1066
-
1067
- /**
1068
- * Because we are using the WordPress Settings API Gravity Forms tooltip support was lacking
1069
- * This method fixes that issue
1070
- * @return void
1071
- * @since 4.0
1072
- */
1073
- this.showTooltips = function () {
1074
-
1075
- if (typeof gform_initialize_tooltips !== 'function') {
1076
- return
1077
- }
1078
-
1079
- $('.gf_hidden_tooltip').each(function () {
1080
- $(this)
1081
- .parent()
1082
- .siblings('th:first')
1083
- .append(' ')
1084
- .append(
1085
- self.get_tooltip($(this).html())
1086
- )
1087
-
1088
- $(this).remove()
1089
- })
1090
-
1091
- gform_initialize_tooltips()
1092
- }
1093
-
1094
- /**
1095
- * Set up 'chosen' select boxes
1096
- * @return void
1097
- * @since 4.0
1098
- */
1099
- this.setupSelectBoxes = function () {
1100
- $('.gfpdf-chosen').each(function () {
1101
-
1102
- $(this).chosen({
1103
- disable_search_threshold: 5,
1104
- width: '100%',
1105
- })
1106
- })
1107
- }
1108
-
1109
- /**
1110
- * Controls the Advanced Options hide / show functionality
1111
- * By default these fields are hidden, but are show automatically if an error occurs.
1112
- * @return void
1113
- * @since 4.0
1114
- */
1115
- this.setup_advanced_options = function () {
1116
- var $advanced_options_toggle_container = $('.gfpdf-advanced-options')
1117
- var $advanced_options_container = $advanced_options_toggle_container.prev()
1118
- var $advanced_options = $advanced_options_toggle_container.find('a')
1119
-
1120
- /*
1121
- * Show / Hide Advanced options
1122
- */
1123
- $advanced_options.click(function () {
1124
- var click = this
1125
-
1126
- /* toggle our slider */
1127
- $advanced_options_container.slideToggle(600, function () {
1128
- /* Toggle our link text */
1129
- var text = $(click).text()
1130
- $(click).text(
1131
- text == GFPDF.showAdvancedOptions ? GFPDF.hideAdvancedOptions : GFPDF.showAdvancedOptions
1132
- )
1133
- })
1134
-
1135
- return false
1136
- })
1137
-
1138
- if ($('.gfpdf-advanced-options').prev().find('.gfield_error').length) {
1139
- $advanced_options_container.show()
1140
- }
1141
- }
1142
-
1143
- /**
1144
- * The general settings model method
1145
- * This sets up and processes any of the JS that needs to be applied on the general settings tab
1146
- * @return void
1147
- * @since 4.0
1148
- */
1149
- this.generalSettings = function () {
1150
- this.setupRequiredFields($('#pdfextended-settings > form'))
1151
-
1152
- var $table = $('#pdf-general-security')
1153
- var $adminRestrictions = $table.find('input[name="gfpdf_settings[default_restrict_owner]"]')
1154
-
1155
- /*
1156
- * Add change event to admin restrictions to show/hide dependant fields
1157
- */
1158
- $adminRestrictions.change(function () {
1159
-
1160
- if ($(this).is(':checked')) {
1161
- if ($(this).val() === 'Yes') {
1162
- /* hide user restrictions and logged out user timeout */
1163
- $table.find('tr:nth-child(3)').hide()
1164
- } else {
1165
- /* hide user restrictions and logged out user timeout */
1166
- $table.find('tr:nth-child(3)').show()
1167
- }
1168
- }
1169
- }).trigger('change')
1170
-
1171
- /* setup advanced options */
1172
- this.setup_advanced_options()
1173
- }
1174
-
1175
- /**
1176
- * The tools settings model method
1177
- * This sets up and processes any of the JS that needs to be applied on the tools settings tab
1178
- * @since 4.0
1179
- */
1180
- this.toolsSettings = function () {
1181
- this.setupToolsTemplateInstallerDialog()
1182
- this.setupToolsFontsDialog()
1183
- this.setupToolsUninstallDialog()
1184
- }
1185
-
1186
- /**
1187
- * Handles the Template Installer Dialog Box
1188
- * @return void
1189
- * @since 4.0
1190
- */
1191
- this.setupToolsTemplateInstallerDialog = function () {
1192
-
1193
- var $copy = $('#gfpdf_settings\\[setup_templates\\]')
1194
- /* escape braces */
1195
- var $copyDialog = $('#setup-templates-confirm')
1196
-
1197
- /* Set up copy dialog */
1198
- var copyButtons = [{
1199
- text: GFPDF.continue,
1200
- click: function () {
1201
- /* submit form */
1202
- $copy.unbind().click()
1203
- }
1204
- },
1205
- {
1206
- text: GFPDF.cancel,
1207
- click: function () {
1208
- /* cancel */
1209
- $copyDialog.wpdialog('close')
1210
- }
1211
- }]
1212
-
1213
- if ($copyDialog.length) {
1214
- this.wp_dialog($copyDialog, copyButtons, 500, 350)
1215
-
1216
- $copy.click(function () {
1217
- /* Allow responsiveness */
1218
- self.resizeDialogIfNeeded($copyDialog, 500, 350)
1219
-
1220
- $copyDialog.wpdialog('open')
1221
- return false
1222
- })
1223
- }
1224
- }
1225
-
1226
- /**
1227
- * Handles the Fonts Dialog Box
1228
- * @return void
1229
- * @since 4.0
1230
- */
1231
- this.setupToolsFontsDialog = function () {
1232
- var $font = $('#gfpdf_settings\\[manage_fonts\\]')
1233
- /* escape braces */
1234
- var $fontDialog = $('#manage-font-files')
1235
-
1236
- /* setup fonts dialog */
1237
- this.wp_dialog($fontDialog, [], 500, 500)
1238
-
1239
- $font.click(function () {
1240
- /* Allow responsiveness */
1241
- self.resizeDialogIfNeeded($fontDialog, 500, 500)
1242
-
1243
- $fontDialog.wpdialog('open')
1244
- return false
1245
- })
1246
-
1247
- /* Check if our manage_fonts hash and open the dialog */
1248
- if (window.location.hash) {
1249
- if (window.location.hash == '#manage_fonts') {
1250
- $font.click()
1251
- }
1252
- }
1253
- }
1254
-
1255
- /**
1256
- * Handles the Uninstall Dialog Box
1257
- * @return void
1258
- * @since 4.0
1259
- */
1260
- this.setupToolsUninstallDialog = function () {
1261
- var $uninstall = $('#gfpdf-uninstall')
1262
- var $uninstallDialog = $('#uninstall-confirm')
1263
-
1264
- /* Set up uninstall dialog */
1265
- var uninstallButtons = [{
1266
- text: GFPDF.uninstall,
1267
- click: function () {
1268
- /* submit form */
1269
- $uninstall.parents('form').submit()
1270
- }
1271
- },
1272
- {
1273
- text: GFPDF.cancel,
1274
- click: function () {
1275
- /* cancel */
1276
- $uninstallDialog.wpdialog('close')
1277
- }
1278
- }]
1279
-
1280
- this.wp_dialog($uninstallDialog, uninstallButtons, 500, 175)
1281
-
1282
- $uninstall.click(function () {
1283
- /* Allow responsiveness */
1284
- self.resizeDialogIfNeeded($uninstallDialog, 500, 175)
1285
-
1286
- $uninstallDialog.wpdialog('open')
1287
- return false
1288
- })
1289
- }
1290
-
1291
- /**
1292
- * Check the current browser width and height and set the dialog box size to fit
1293
- * If the size is over 500 pixels (width or height) it will default to 500
1294
- *
1295
- * @param $dialog an object initialised with this.wp_dialog
1296
- * @param Integer maxWidth The maximum width of the dialog box, if it will fit
1297
- * @param Integer maxHeight The maximum height of the dialog box, if it will fit
1298
- * @return void
1299
- * @since 4.0
1300
- */
1301
- this.resizeDialogIfNeeded = function ($dialog, maxWidth, maxHeight) {
1302
- var windowWidth = $(window).width()
1303
- var windowHeight = $(window).height()
1304
-
1305
- var dialogWidth = (windowWidth < 500) ? windowWidth - 20 : maxWidth
1306
- var dialogHeight = (windowHeight < 500) ? windowHeight - 50 : maxHeight
1307
-
1308
- $dialog.wpdialog('option', 'width', dialogWidth)
1309
- $dialog.wpdialog('option', 'height', dialogHeight)
1310
- }
1311
-
1312
- /**
1313
- * Generate a WP Dialog box
1314
- * @param jQuery Object $elm [description]
1315
- * @param Object buttonsList [description]
1316
- * @param Integer boxWidth [description]
1317
- * @param Integer boxHeight [description]
1318
- * @return void
1319
- * @since 4.0
1320
- */
1321
- this.wp_dialog = function ($elm, buttonsList, boxWidth, boxHeight) {
1322
- $elm.wpdialog({
1323
- autoOpen: false,
1324
- resizable: false,
1325
- draggable: false,
1326
- width: boxWidth,
1327
- height: boxHeight,
1328
- modal: true,
1329
- dialogClass: 'wp-dialog',
1330
- zIndex: 300000,
1331
- buttons: buttonsList,
1332
- open: function () {
1333
- $(this).siblings('.ui-dialog-buttonpane').find('button:eq(1)').focus()
1334
-
1335
- $('.ui-widget-overlay').bind('click', function () {
1336
- $elm.wpdialog('close')
1337
- })
1338
- }
1339
- })
1340
- }
1341
-
1342
- /**
1343
- * Create the tooltip HTML
1344
- * @param String html The tooltip message
1345
- * @return String
1346
- * @since 4.0
1347
- */
1348
- this.get_tooltip = function (html) {
1349
- var $a = $('<a>')
1350
- var $i = $('<i class="fa fa-question-circle">')
1351
-
1352
- $a.append($i)
1353
- $a.addClass('gf_tooltip tooltip')
1354
- $a.click(function () {
1355
- return false
1356
- })
1357
-
1358
- $a.attr('title', html)
1359
-
1360
- return $a
1361
- }
1362
-
1363
- /**
1364
- * An AJAX Wrapper function we can use to ajaxify our plugin
1365
- * @param post Object an object of data to submit to our ajax endpoint. This MUST include an 'nonce' and an 'action'
1366
- * @param successCallback a callback function
1367
- * @return void
1368
- * @since 4.0
1369
- */
1370
- this.ajax = function (post, successCallback) {
1371
- $.ajax({
1372
- type: "post",
1373
- dataType: "json",
1374
- url: GFPDF.ajaxUrl,
1375
- data: post,
1376
- success: successCallback,
1377
- error: this.ajax_error,
1378
- })
1379
- }
1380
-
1381
- /**
1382
- * Log the error to the console
1383
- * @return void
1384
- * @since 4.0
1385
- */
1386
- this.ajax_error = function (jqXHR, textStatus, errorThrown) {
1387
- console.log(textStatus)
1388
- console.log(errorThrown)
1389
- }
1390
-
1391
- /**
1392
- * Display a message or error to the user with an appropriate timeout
1393
- * @param String msg The message to be displayed
1394
- * @param Integer timeout How long to show the message
1395
- * @param Boolean error Whether to show an error (true) or a message (false or undefined)
1396
- * @return void
1397
- * @since 4.0
1398
- */
1399
- this.show_message = function (msg, timeout, error) {
1400
- timeout = typeof timeout !== 'undefined' ? timeout : 4500
1401
- error = typeof error !== 'undefined' ? error : false
1402
-
1403
- var $elm = $('<div id="message">').html('<p>' + msg + '</p>')
1404
-
1405
- if (error === true) {
1406
- $elm.addClass('error')
1407
- } else {
1408
- $elm.addClass('updated')
1409
- }
1410
-
1411
- $('.wrap > h2').after($elm)
1412
-
1413
- setTimeout(function () {
1414
- $elm.slideUp()
1415
- }, timeout)
1416
-
1417
- }
1418
-
1419
- /**
1420
- * Update the URL parameter
1421
- * @param String The URL to parse
1422
- * @param String The URL parameter to want to update
1423
- * @param String The replacement string for the URL parameter
1424
- * @return String The processed URL
1425
- * @since 4.0
1426
- * @link http://stackoverflow.com/a/10997390/11236
1427
- */
1428
- this.updateURLParameter = function (url, param, paramVal) {
1429
- var newAdditionalURL = ""
1430
- var tempArray = url.split("?")
1431
- var baseURL = tempArray[0]
1432
- var additionalURL = tempArray[1]
1433
- var temp = ""
1434
- if (additionalURL) {
1435
- tempArray = additionalURL.split("&")
1436
- for (i = 0; i < tempArray.length; i++) {
1437
- if (tempArray[i].split('=')[0] != param) {
1438
- newAdditionalURL += temp + tempArray[i]
1439
- temp = "&"
1440
- }
1441
- }
1442
- }
1443
-
1444
- var rows_txt = temp + "" + param + "=" + paramVal
1445
- return baseURL + "?" + newAdditionalURL + rows_txt
1446
- }
1447
- }
1448
-
1449
- var pdf = new GravityPDF()
1450
- pdf.init()
1451
-
1452
- })
1453
- })(jQuery)
1
+ /**
2
+ * Gravity PDF Settings JS Logic
3
+ * Dependancies: backbone, underscore, jquery
4
+ * @since 4.0
5
+ */
6
+
7
+ (function ($) {
8
+
9
+ /**
10
+ * Fires on the Document Ready Event (the same as $(document).ready(function() { ... });)
11
+ * @since 4.0
12
+ */
13
+ $(function () {
14
+
15
+ /**
16
+ * Our Admin controller
17
+ * Applies correct JS to our Gravity PDF pages
18
+ * @since 4.0
19
+ */
20
+ function GravityPDF () {
21
+
22
+ /**
23
+ * A reference to the GravityPDF object when 'this' refers to a different object
24
+ * Usage is inside AJAX closures. All other functions should use $.proxy() to set this appropriately
25
+ * @type Object
26
+ * @since 4.0
27
+ */
28
+ var self = this
29
+
30
+ /**
31
+ * Process the correct settings area (the global PDF settings or individual form PDF settings)
32
+ * Also set up any event listeners needed
33
+ * @return void
34
+ * @since 4.0
35
+ */
36
+ this.init = function () {
37
+
38
+ /* Process any common functions */
39
+ this.initCommon()
40
+
41
+ /* Process the global PDF settings */
42
+ if (this.isSettings()) {
43
+ this.processSettings()
44
+ }
45
+
46
+ /* Process the individual form PDF settings */
47
+ if (this.isFormSettings()) {
48
+ this.processFormSettings()
49
+ }
50
+ }
51
+
52
+ /**
53
+ * Initialise any common elements
54
+ * @return void
55
+ * @since 4.0
56
+ */
57
+ this.initCommon = function () {
58
+
59
+ /* Change some Gravity Forms parameters */
60
+ this.setupGravityForms()
61
+
62
+ /* If we have a upload field handle the logic */
63
+ this.doUploadListener()
64
+
65
+ /* If we have a colour picker handle the logic */
66
+ this.doColorPicker()
67
+
68
+ /* If we have any select boxes to handle */
69
+ this.setupSelectBoxes()
70
+
71
+ /* Enable tooltips, if needed */
72
+ this.showTooltips()
73
+
74
+ /* Setup custom paper size, if needed */
75
+ this.setupCustomPaperSize()
76
+
77
+ /* Setup toggled fields, if needed */
78
+ this.setupToggledFields()
79
+
80
+ /* Setup our template loader, if needed */
81
+ this.setupDynamicTemplateFields()
82
+
83
+ /* Setup license deactivation, if needed */
84
+ this.setupLicenseDeactivation()
85
+ }
86
+
87
+ /**
88
+ * Replace some of Gravity Forms JS variables so it functions correctly with our PDF version
89
+ *
90
+ * @since 4.1
91
+ */
92
+ this.setupGravityForms = function () {
93
+ /**
94
+ * Check if the global gf_vars has been set and if so replace the .thisFormButton, .show, .hide objects with our
95
+ * customised options.
96
+ * @since 4.0
97
+ */
98
+ if (typeof gf_vars !== 'undefined') {
99
+ gf_vars.thisFormButton = GFPDF.conditionalText
100
+ gf_vars.show = GFPDF.enable
101
+ gf_vars.hide = GFPDF.disable
102
+ }
103
+
104
+ /*
105
+ * Backwards compatibility support prior to Gravity Forms 2.3
106
+ *
107
+ * Override the gfMergeTagsObj.getTargetElement prototype to better handle CSS special characters in selectors
108
+ * This is because Gravity Forms doesn't correctly espace meta-characters such a [ and ] (which we use extensively as IDs)
109
+ * This functionality assists with the merge tag loader
110
+ * @since 4.0
111
+ */
112
+ if (window.gfMergeTags && typeof form != 'undefined') {
113
+ window.gfMergeTags.getTargetElement = this.resetGfMergeTags
114
+ }
115
+ }
116
+
117
+ /**
118
+ * Get if on the global PDF settings pages
119
+ * @return Integer
120
+ * @since 4.0
121
+ */
122
+ this.isSettings = function () {
123
+ return $('#tab_PDF').length
124
+ }
125
+
126
+ /**
127
+ * Check if on the individual PDF form settings pages
128
+ * @return Integer
129
+ * @since 4.0
130
+ */
131
+ this.isFormSettings = function () {
132
+ return $('#tab_pdf').length
133
+ }
134
+
135
+ /**
136
+ * See if we are on the form settings list page
137
+ * @return Integer
138
+ * @since 4.0
139
+ */
140
+ this.isFormSettingsList = function () {
141
+ return $('#gfpdf_list_form').length
142
+ }
143
+
144
+ /**
145
+ * See if we are on the form settings edit page
146
+ * @return Integer
147
+ * @since 4.0
148
+ */
149
+ this.isFormSettingsEdit = function () {
150
+ return $('#gfpdf_pdf_form').length
151
+ }
152
+
153
+ /**
154
+ * Check the current active PDF settings page
155
+ * @return String
156
+ * @since 4.0
157
+ */
158
+ this.getCurrentSettingsPage = function () {
159
+ if (this.isSettings()) {
160
+ return $('.nav-tab-wrapper a.nav-tab-active:first').data('id')
161
+ }
162
+ return ''
163
+ }
164
+
165
+ /**
166
+ * Process the global settings page
167
+ * @return void
168
+ * @since 4.0
169
+ */
170
+ this.processSettings = function () {
171
+
172
+ /* Ensure the Gravity Forms settings navigation (Form Settings / Notifications / Confirmation) has the 'tab' URI stripped from it */
173
+ this.cleanupGFNavigation()
174
+
175
+ /* Run our direct PDF status check */
176
+ this.runPDFAccessCheck()
177
+
178
+ /* Run the appropriate settings page */
179
+ switch (this.getCurrentSettingsPage()) {
180
+ case 'general':
181
+ this.generalSettings()
182
+ break
183
+
184
+ case 'tools':
185
+ this.toolsSettings()
186
+ break
187
+ }
188
+ }
189
+
190
+ /**
191
+ * Routing functionality for the individual form settings page
192
+ * @return void
193
+ * @since 4.0
194
+ */
195
+ this.processFormSettings = function () {
196
+
197
+ /* Process PDF list page */
198
+ if (this.isFormSettingsList()) {
199
+ this.doFormSettingsListPage()
200
+ }
201
+
202
+ /* Process single edit page */
203
+ if (this.isFormSettingsEdit()) {
204
+ this.doFormSettingsEditPage()
205
+ }
206
+ }
207
+
208
+ /**
209
+ * Process the individual PDF GF Form Settings Page
210
+ * @return void
211
+ * @since 4.0
212
+ */
213
+ this.doFormSettingsEditPage = function () {
214
+
215
+ this.setupRequiredFields($('#gfpdf_pdf_form'))
216
+ /* highlight which fields are required and disable in-browser validation */
217
+ this.setupPdfTabs()
218
+ this.handleSecurityConditionals()
219
+ this.handlePDFConditionalLogic()
220
+ this.handleOwnerRestriction()
221
+ this.toggleFontAppearance($('#gfpdf_settings\\[template\\]').data('template_group'))
222
+ this.toggleAppearanceTab()
223
+
224
+ /*
225
+ * Workaround for Firefix TinyMCE Editor Bug NS_ERROR_UNEXPECTED (http://www.tinymce.com/develop/bugtracker_view.php?id=3152) when loading wp_editor via AJAX
226
+ * Manual save TinyMCE editors on form submission
227
+ */
228
+ $('#gfpdf_pdf_form').submit(function () {
229
+ try {
230
+ tinyMCE.triggerSave()
231
+ } catch (e) {}
232
+
233
+ })
234
+
235
+ /* Add listener on submit functionality */
236
+ $('#gfpdf_pdf_form').submit(function () {
237
+ /* JSONify the conditional logic so we can pass it through the form and use it in PHP (after running json_decode) */
238
+ $('#gfpdf_settings\\[conditionalLogic\\]').val(jQuery.toJSON(window.gfpdf_current_pdf.conditionalLogic))
239
+ })
240
+
241
+ }
242
+
243
+ /**
244
+ * Handles our DOM security conditional logic based on the user selection
245
+ * @return void
246
+ * @since 4.0
247
+ */
248
+ this.handleSecurityConditionals = function () {
249
+
250
+ /* Get the appropriate elements for use */
251
+ var $secTable = $('#pdf-general-advanced')
252
+ var $pdfSecurity = $secTable.find('input[name="gfpdf_settings[security]"]')
253
+ var $format = $secTable.find('input[name="gfpdf_settings[format]"]')
254
+
255
+ /* Add change event to admin restrictions to show/hide dependant fields */
256
+ $pdfSecurity.change(function () {
257
+
258
+ if ($(this).is(':checked')) {
259
+
260
+ /* Get the format dependancy */
261
+ var format = $format.filter(':checked').val()
262
+
263
+ if ($(this).val() === GFPDF.no || format !== GFPDF.standard) {
264
+ /* hide security password / privileges */
265
+ $secTable.find('tr:nth-child(3),tr:nth-child(4),tr:nth-child(5):not(.gfpdf-hidden)').hide()
266
+ } else {
267
+ /* show security password / privileges */
268
+ $secTable.find('tr:nth-child(3),tr:nth-child(4),tr:nth-child(5):not(.gfpdf-hidden)').show()
269
+ }
270
+
271
+ if (format !== GFPDF.standard) {
272
+ $secTable.find('tr:nth-child(2)').hide()
273
+ } else {
274
+ $secTable.find('tr:nth-child(2)').show()
275
+ }
276
+ }
277
+
278
+ }).trigger('change')
279
+
280
+ /* The format field effects the security field. When it changes it triggers the security field as changed */
281
+ $format.change(function () {
282
+ if ($(this).is(':checked')) {
283
+ $pdfSecurity.trigger('change')
284
+ }
285
+ }).trigger('change')
286
+ }
287
+
288
+ /**
289
+ * Add GF JS filter to change the conditional logic object type to our PDF
290
+ * @return Object
291
+ * @since 4.0
292
+ */
293
+ this.handlePDFConditionalLogic = function () {
294
+
295
+ gform.addFilter('gform_conditional_object', function (object, objectType) {
296
+ if (objectType === 'gfpdf') {
297
+ return window.gfpdf_current_pdf
298
+ }
299
+ return object
300
+ })
301
+
302
+ /* Add change event to conditional logic field */
303
+ $('#gfpdf_conditional_logic').change(function () {
304
+
305
+ /* Only set up a .conditionalLogic object if it doesn't exist */
306
+ if (typeof window.gfpdf_current_pdf.conditionalLogic == 'undefined' && $(this).prop('checked')) {
307
+
308
+ window.gfpdf_current_pdf.conditionalLogic = new ConditionalLogic()
309
+ } else if (!$(this).prop('checked')) {
310
+
311
+ window.gfpdf_current_pdf.conditionalLogic = null
312
+ }
313
+ ToggleConditionalLogic(false, 'gfpdf')
314
+
315
+ }).trigger('change')
316
+ }
317
+
318
+ /**
319
+ * Show / Hide the Restrict Owner when `Enable Public Access` is set to "Yes"
320
+ * @since 4.0
321
+ */
322
+ this.handleOwnerRestriction = function () {
323
+
324
+ var $table = $('#gfpdf-advanced-pdf-options')
325
+ var $publicAccess = $table.find('input[name="gfpdf_settings[public_access]"]')
326
+
327
+ /*
328
+ * Add change event to admin restrictions to show/hide dependant fields
329
+ */
330
+ $publicAccess.change(function () {
331
+
332
+ if ($(this).is(':checked')) {
333
+ if ($(this).val() === 'Yes') {
334
+ /* hide user restrictions */
335
+ $table.find('tr:nth-child(8)').hide()
336
+ } else {
337
+ /* show user restrictions */
338
+ $table.find('tr:nth-child(8)').show()
339
+ }
340
+ }
341
+ }).trigger('change')
342
+ }
343
+
344
+ /**
345
+ * Process the functionality for the PDF form settings 'list' page
346
+ * @return void
347
+ * @since 4.0
348
+ */
349
+ this.doFormSettingsListPage = function () {
350
+
351
+ this.setupAJAXListDeleteListener()
352
+ this.setupAJAXListDuplicateListener()
353
+ this.setupAJAXListStateListener()
354
+ }
355
+
356
+ /**
357
+ * Handles the state change of a PDF list item via AJAX
358
+ * @return void
359
+ * @since 4.0
360
+ */
361
+ this.setupAJAXListStateListener = function () {
362
+
363
+ /* Add live state listener to change active / inactive value */
364
+ $('#gfpdf_list_form').on('click', '.check-column img', function () {
365
+ var id = String($(this).data('id'))
366
+ var that = this
367
+
368
+ if (id.length > 0) {
369
+ var is_active = that.src.indexOf('active1.png') >= 0
370
+
371
+ if (is_active) {
372
+ that.src = that.src.replace('active1.png', 'active0.png')
373
+ $(that).attr('title', GFPDF.inactive).attr('alt', GFPDF.inactive)
374
+ } else {
375
+ that.src = that.src.replace('active0.png', 'active1.png')
376
+ $(that).attr('title', GFPDF.active).attr('alt', GFPDF.active)
377
+ }
378
+
379
+ /* Set up ajax data */
380
+ var data = {
381
+ 'action': 'gfpdf_change_state',
382
+ 'nonce': $(this).data('nonce'),
383
+ 'fid': $(this).data('fid'),
384
+ 'pid': $(this).data('id'),
385
+ }
386
+
387
+ /* Do ajax call */
388
+ self.ajax(data, function (response) {
389
+ /* Don't do anything with a successful response */
390
+ })
391
+ }
392
+ })
393
+ }
394
+
395
+ /**
396
+ * Handles the duplicate of a PDF list item via AJAX and fixes up all the nonce actions
397
+ * @return void
398
+ * @since 4.0
399
+ */
400
+ this.setupAJAXListDuplicateListener = function () {
401
+
402
+ /* Add live duplicate listener */
403
+ $('#gfpdf_list_form').on('click', 'a.submitduplicate', function () {
404
+
405
+ var id = String($(this).data('id'))
406
+ var that = this
407
+
408
+ /* Add spinner */
409
+ var $spinner = $('<img alt="' + GFPDF.spinnerAlt + '" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner gfpdf-spinner-small" />')
410
+
411
+ /* Add our spinner */
412
+ $(this).after($spinner).parent().parent().attr('style', 'position:static; visibility: visible;')
413
+
414
+ if (id.length > 0) {
415
+ /* Set up ajax data */
416
+ var data = {
417
+ 'action': 'gfpdf_list_duplicate',
418
+ 'nonce': $(this).data('nonce'),
419
+ 'fid': $(this).data('fid'),
420
+ 'pid': $(this).data('id'),
421
+ }
422
+
423
+ /* Do ajax call */
424
+ self.ajax(data, function (response) {
425
+ if (response.msg) {
426
+
427
+ /* Remove the spinner */
428
+ $(that).parent().parent().attr('style', '').find('.gfpdf-spinner').remove()
429
+
430
+ /* Provide feedback to use */
431
+ self.show_message(response.msg)
432
+
433
+ /* Clone the row to be duplicated */
434
+ var $row = $(that).parents('tr')
435
+ var $newRow = $row.clone().css('background', '#baffb8')
436
+
437
+ /* Update the edit links to point to the new location */
438
+ $newRow.find('.column-name > a, .edit a').each(function () {
439
+ var href = $(this).attr('href')
440
+ href = self.updateURLParameter(href, 'pid', response.pid)
441
+ $(this).attr('href', href)
442
+ })
443
+
444
+ /* Update the name field */
445
+ $newRow.find('.column-name > a').html(response.name)
446
+
447
+ /* Find duplicate and delete elements */
448
+ var $duplicate = $newRow.find('.duplicate a')
449
+ var $delete = $newRow.find('.delete a')
450
+ var $state = $newRow.find('.check-column img')
451
+ var $shortcode = $newRow.find('.column-shortcode input')
452
+
453
+ /* Update duplicate ID and nonce pointers so the actions are valid */
454
+ $duplicate.data('id', response.pid)
455
+ $duplicate.data('nonce', response.dup_nonce)
456
+
457
+ /* Update delete ID and nonce pointers so the actions are valid */
458
+ $delete.data('id', response.pid)
459
+ $delete.data('nonce', response.del_nonce)
460
+
461
+ /* update state ID and nonce pointers so the actions are valid */
462
+ $state.data('id', response.pid)
463
+ $state.data('nonce', response.state_nonce)
464
+
465
+ /* Update our shortcode ID */
466
+ var shortcodeValue = $shortcode.val()
467
+ shortcodeValue = shortcodeValue.replace(id, response.pid)
468
+ $shortcode.val(shortcodeValue)
469
+
470
+ /* Add fix for alternate row background */
471
+ var background = ''
472
+ if ($row.hasClass('alternate')) {
473
+ $newRow.removeClass('alternate')
474
+ background = '#FFF'
475
+ } else {
476
+ $newRow.addClass('alternate')
477
+ background = '#f9f9f9'
478
+ }
479
+
480
+ /* Add fix for toggle image */
481
+ var toggle_src = $state.attr('src')
482
+ $state
483
+ .attr('title', GFPDF.inactive)
484
+ .attr('alt', GFPDF.inactive)
485
+ .attr('src', toggle_src.replace('active1.png', 'active0.png'))
486
+
487
+ /* Add row to node and fade in */
488
+ $newRow.hide().insertAfter($row).fadeIn().animate({backgroundColor: background})
489
+ }
490
+ })
491
+ }
492
+ })
493
+ }
494
+
495
+ /**
496
+ * Check if the last item was just deleted
497
+ */
498
+ this.maybeShowEmptyRow = function () {
499
+ var $container = $('#gfpdf_list_form tbody')
500
+
501
+ if ($container.find('tr').length === 0) {
502
+ var $row = $('<tr>').addClass('no-items')
503
+ var $cell = $('<td>').attr('colspan', '5').addClass('colspanchange')
504
+ var $add_new = $('<a>').attr('href', $('#add-new-pdf').attr('href')).append(GFPDF.letsGoCreateOne + '.')
505
+ $cell.append(GFPDF.thisFormHasNoPdfs).append(' ').append($add_new)
506
+ $row.append($cell)
507
+ $container.append($row)
508
+ }
509
+ }
510
+
511
+ /**
512
+ * Handles the deletion of a PDF list item via AJAX
513
+ * @return void
514
+ * @since 4.0
515
+ */
516
+ this.setupAJAXListDeleteListener = function () {
517
+
518
+ /* Set up our delete dialog */
519
+ var $deleteDialog = $('#delete-confirm')
520
+
521
+ var deleteButtons = [{
522
+ text: GFPDF.delete,
523
+ click: function () {
524
+ /* handle ajax call */
525
+ $deleteDialog.wpdialog('close')
526
+ $elm = $($deleteDialog.data('elm'))
527
+
528
+ /* Add spinner */
529
+ var $spinner = $('<img alt="' + GFPDF.spinnerAlt + '" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner gfpdf-spinner-small" />')
530
+
531
+ /* Add the spinner */
532
+ $elm.append($spinner).parent().parent().attr('style', 'position:static; visibility: visible;')
533
+
534
+ var data = {
535
+ 'action': 'gfpdf_list_delete',
536
+ 'nonce': $elm.data('nonce'),
537
+ 'fid': $elm.data('fid'),
538
+ 'pid': $elm.data('id'),
539
+ }
540
+
541
+ self.ajax(data, function (response) {
542
+ if (response.msg) {
543
+ /* Remove spinner */
544
+ $elm.parent().parent().attr('style', '').find('.gfpdf-spinner').remove()
545
+
546
+ self.show_message(response.msg)
547
+ var $row = $elm.parents('tr')
548
+ $row.css('background', '#ffb8b8').fadeOut(400, function () {
549
+ this.remove()
550
+ self.maybeShowEmptyRow()
551
+ })
552
+ }
553
+
554
+ $deleteDialog.data('elm', null)
555
+ })
556
+
557
+ }
558
+ },
559
+ {
560
+ text: GFPDF.cancel,
561
+ click: function () {
562
+ /* cancel */
563
+ $deleteDialog.wpdialog('close').data('elm', null)
564
+ }
565
+ }]
566
+
567
+ /* Add our delete dialog box */
568
+ this.wp_dialog($deleteDialog, deleteButtons, 300, 175)
569
+
570
+ /* Add live delete listener */
571
+ $('#gfpdf_list_form').on('click', 'a.submitdelete', function () {
572
+ var id = String($(this).data('id'))
573
+ if (id.length > 0 && !$deleteDialog.data('elm')) {
574
+ /* Allow responsiveness */
575
+ self.resizeDialogIfNeeded($deleteDialog, 300, 175)
576
+
577
+ $deleteDialog.wpdialog('open').data('elm', this)
578
+ }
579
+ })
580
+ }
581
+
582
+ /**
583
+ * Handle our AJAX tabs to make it easier to navigate around our settings
584
+ * @return void
585
+ * @since 4.0
586
+ */
587
+ this.setupPdfTabs = function () {
588
+
589
+ /* Hide all containers except the first one */
590
+ $('.gfpdf-tab-container').not(":eq(0)").hide()
591
+
592
+ /* Add click handler when our nav is selected */
593
+ $('.gfpdf-tab-wrapper a').click(function () {
594
+
595
+ /* Reset the active class */
596
+ $(this).parents('ul').find('a').removeClass('current')
597
+
598
+ /* Add the new active class */
599
+ $(this).addClass('current').blur()
600
+
601
+ /* Hide all containers */
602
+ $('.gfpdf-tab-container').hide()
603
+
604
+ /* Show new active container */
605
+ $($(this).attr('href')).show()
606
+
607
+ return false
608
+
609
+ })
610
+ }
611
+
612
+ /**
613
+ * Add change event listeners on our toggle params and toggle the container
614
+ * @return void
615
+ * @since 4.0
616
+ */
617
+ this.setupToggledFields = function () {
618
+
619
+ $('form').off('change', '.gfpdf-input-toggle').on('change', '.gfpdf-input-toggle', function () {
620
+
621
+ var $container = $(this).parent().next()
622
+
623
+ /* Currently checked so hide out input and if cotains rich_text, textarea or input we will delete values */
624
+ if ($(this).prop('checked')) {
625
+ $container.slideDown('slow')
626
+ } else {
627
+ $container.slideUp('slow')
628
+
629
+ /* Remove TinyMCE Content */
630
+ $container.find('.wp-editor-area').each(function () {
631
+ var editor = tinyMCE.get($(this).attr('id'))
632
+
633
+ if (editor !== null) {
634
+ editor.setContent('')
635
+ }
636
+
637
+ })
638
+
639
+ /* Remove textarea content */
640
+ $container.find('textarea').each(function () {
641
+ $(this).val('')
642
+ })
643
+ }
644
+ })
645
+ }
646
+
647
+ /**
648
+ * PDF Templates can assign their own custom settings which can enhance a template
649
+ * This function setups the required listeners and functionality to allow this behaviour
650
+ * @return return
651
+ * @since 4.0
652
+ */
653
+ this.setupDynamicTemplateFields = function () {
654
+
655
+ /* Add change listener to our template */
656
+ $('#gfpdf_settings\\[template\\]').off('change').change(function () {
657
+
658
+ /* Add spinner */
659
+ var $spinner = $('<img alt="' + GFPDF.spinnerAlt + '" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner" />')
660
+
661
+ $(this).next().after($spinner)
662
+
663
+ var data = {
664
+ 'action': 'gfpdf_get_template_fields',
665
+ 'nonce': GFPDF.ajaxNonce,
666
+ 'template': $(this).val(),
667
+ 'type': $(this).attr('id'),
668
+ 'id': $('#gform_id').val(),
669
+ 'gform_pdf_id': $('#gform_pdf_id').val(),
670
+ }
671
+
672
+ self.ajax(data, function (response) {
673
+
674
+ /* Remove our UI loader */
675
+ $spinner.remove()
676
+
677
+ /* Reset our legacy Advanced Template option */
678
+ $('input[name="gfpdf_settings[advanced_template]"][value="No"]').prop("checked", true).trigger('change')
679
+
680
+ /* Only process if the response is valid */
681
+ if (response.fields) {
682
+
683
+ /* Backwards compatibility support prior to Gravity Forms 2.3 */
684
+ if (window.gfMergeTags) {
685
+ /* Remove any existing mergetag-marked inputs so they aren't processed twice after we add our new fields to the DOM */
686
+ $('.merge-tag-support').removeClass('merge-tag-support')
687
+ $('.all-merge-tags a.open-list').off('click')
688
+ }
689
+
690
+ /* Remove any previously loaded editors to prevent conflicts loading an editor with same name */
691
+ $.each(response.editors, function (index, value) {
692
+
693
+ var editor = tinyMCE.get(value)
694
+ if (editor !== null) {
695
+ /* Bug Fix for Firefox - http://www.tinymce.com/develop/bugtracker_view.php?id=3152 */
696
+ try {
697
+ tinyMCE.remove(editor)
698
+ } catch (e) {}
699
+ }
700
+
701
+ })
702
+
703
+ /* Replace the custom appearance with the AJAX response fields */
704
+ $('#pdf-custom-appearance').hide().html(response.fields).fadeIn()
705
+
706
+ /* Ensure our template nav item isn't hidden */
707
+ $('#gfpdf-custom-appearance-nav').show()
708
+
709
+ /* Load our new editors */
710
+ self.loadTinyMCEEditor(response.editors, response.editor_init)
711
+
712
+ /* reinitialise new dom elements */
713
+ self.initCommon()
714
+ self.doMergetags()
715
+
716
+ } else {
717
+ /* Hide our template nav item as there are no fields and clear our the HTML */
718
+ $('#gfpdf-custom-appearance-nav').hide()
719
+ $('#pdf-custom-appearance').html('')
720
+ }
721
+
722
+ /* Check if we should hide or show our font fields */
723
+ if (response.template_type) {
724
+ self.toggleFontAppearance(response.template_type)
725
+ }
726
+ })
727
+ })
728
+ }
729
+
730
+ /**
731
+ * Handles individual add-on license key deactivation via AJAX
732
+ * @since 4.2
733
+ */
734
+ this.setupLicenseDeactivation = function () {
735
+ $('.gfpdf-deactivate-license').click(function () {
736
+ /* Do AJAX call so user can deactivate license */
737
+ var $container = $(this).parent()
738
+ $container.find('.gf_settings_description label').html('')
739
+
740
+ /* Add spinner */
741
+ var $spinner = $('<img alt="' + GFPDF.spinnerAlt + '" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner" />')
742
+
743
+ /* Add our spinner */
744
+ $(this).append($spinner)
745
+
746
+ /* Set up ajax data */
747
+ var slug = $(this).data('addon-name')
748
+
749
+ var data = {
750
+ 'action': 'gfpdf_deactivate_license',
751
+ 'addon_name': slug,
752
+ 'license': $(this).data('license'),
753
+ 'nonce': $(this).data('nonce'),
754
+ }
755
+
756
+ /* Do ajax call */
757
+ self.ajax(data, function (response) {
758
+
759
+ /* Remove our loading spinner */
760
+ $spinner.remove()
761
+
762
+ if (response.success) {
763
+ /* cleanup inputs */
764
+ $('#gfpdf_settings\\[license_' + slug + '\\]').val('')
765
+ $('#gfpdf_settings\\[license_' + slug + '_message\\]').val('')
766
+ $('#gfpdf_settings\\[license_' + slug + '_status\\]').val('')
767
+ $container.find('i').remove()
768
+ $container.find('a').remove()
769
+
770
+ $container.find('.gf_settings_description label').html(response.success)
771
+ } else {
772
+ /* Show error message */
773
+ $container.find('.gf_settings_description label').html(response.error)
774
+ }
775
+ })
776
+
777
+ return false
778
+ })
779
+ }
780
+
781
+ /**
782
+ * Check if the template type is 'legacy' and hide the font type, size and colour, otherwise show those fields
783
+ * @param type
784
+ * @since 4.0
785
+ */
786
+ this.toggleFontAppearance = function (type) {
787
+ var $rows = $('#pdf-general-appearance').find('tr.gfpdf_font_type, tr.gfpdf_font_size, tr.gfpdf_font_colour')
788
+
789
+ /* Hide our font fields if processing a legacy template */
790
+ if (type == 'legacy') {
791
+ $rows.hide()
792
+ } else { /* Ensure the fields are showing */
793
+ $rows.show()
794
+ }
795
+ }
796
+
797
+ /**
798
+ * Check if the current PDF template selection uses the legacy Enable Advanced Templating option
799
+ * and hide the Appearance tab altogether
800
+ * @since 4.0
801
+ */
802
+ this.toggleAppearanceTab = function () {
803
+
804
+ $('input[name="gfpdf_settings[advanced_template]"]').change(function () {
805
+ if ($(this).val() == 'Yes') {
806
+ $('#gfpdf-appearance-nav').hide()
807
+ } else {
808
+ $('#gfpdf-appearance-nav').show()
809
+ }
810
+ })
811
+
812
+ $('input[name="gfpdf_settings[advanced_template]"]:checked').trigger('change')
813
+ }
814
+
815
+ /**
816
+ * Initialises AJAX-loaded wp_editor TinyMCE containers for use
817
+ * @param Array editors The DOM element IDs to parse
818
+ * @param Object settings The TinyMCE settings to use
819
+ * @return void
820
+ * @since 4.0
821
+ */
822
+ this.loadTinyMCEEditor = function (editors, settings) {
823
+
824
+ if (settings != null) {
825
+ /* Ensure appropriate settings defaults */
826
+ settings.body_class = 'id post-type-post post-status-publish post-format-standard'
827
+ settings.formats = {
828
+ alignleft: [
829
+ {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: {textAlign: 'left'}},
830
+ {selector: 'img,table,dl.wp-caption', classes: 'alignleft'}
831
+ ],
832
+ aligncenter: [
833
+ {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: {textAlign: 'center'}},
834
+ {selector: 'img,table,dl.wp-caption', classes: 'aligncenter'}
835
+ ],
836
+ alignright: [
837
+ {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: {textAlign: 'right'}},
838
+ {selector: 'img,table,dl.wp-caption', classes: 'alignright'}
839
+ ],
840
+ strikethrough: {inline: 'del'}
841
+ }
842
+ }
843
+
844
+ /* Load our new editors */
845
+ $.each(editors, function (index, fullId) {
846
+
847
+ /* Setup out selector */
848
+ settings.selector = '#' + fullId
849
+
850
+ /* Initialise our editor */
851
+ tinyMCE.init(settings)
852
+
853
+ /* Add our editor to the DOM */
854
+ tinyMCE.execCommand('mceAddEditor', false, fullId)
855
+
856
+ /* Enable WP quick tags */
857
+ if (typeof(QTags) == 'function') {
858
+ QTags({'id': fullId})
859
+ QTags._buttonsInit()
860
+
861
+ /* remember last tab selected */
862
+ if (typeof switchEditors.switchto === 'function') {
863
+ switchEditors.switchto(jQuery('#wp-' + fullId + '-wrap').find('.wp-switch-editor.switch-' + ( getUserSetting('editor') == 'html' ? 'html' : 'tmce' ))[0])
864
+ }
865
+ }
866
+
867
+ })
868
+ }
869
+
870
+ /**
871
+ * Rich Media Uploader
872
+ * JS Pulled straight from Easy Digital Download's admin-scripts.js
873
+ * @return void
874
+ * @since 4.0
875
+ */
876
+ this.doUploadListener = function () {
877
+ // WP 3.5+ uploader
878
+ var file_frame
879
+ window.formfield = ''
880
+
881
+ $('body').off('click', '.gfpdf_settings_upload_button').on('click', '.gfpdf_settings_upload_button', function (e) {
882
+ e.preventDefault()
883
+
884
+ var $button = $(this)
885
+ window.formfield = $(this).parent().prev()
886
+
887
+ /* If the media frame already exists, reopen it. */
888
+ if (file_frame) {
889
+ file_frame.open()
890
+ return
891
+ }
892
+
893
+ /* Create the media frame. */
894
+ file_frame = wp.media.frames.file_frame = wp.media({
895
+ title: $button.data('uploader-title'),
896
+ button: {
897
+ text: $button.data('uploader-button-text')
898
+ },
899
+ multiple: false,
900
+ })
901
+
902
+ /* When a file is selected, run a callback. */
903
+ file_frame.on('select', function () {
904
+ var selection = file_frame.state().get('selection')
905
+ selection.each(function (attachment, index) {
906
+ attachment = attachment.toJSON()
907
+ window.formfield.val(attachment.url).change()
908
+ })
909
+ })
910
+
911
+ /* Finally, open the modal */
912
+ file_frame.open()
913
+ })
914
+ }
915
+
916
+ /**
917
+ * Check if a Gravity PDF color picker field is present and initialise
918
+ * @return void
919
+ * @since 4.0
920
+ */
921
+ this.doColorPicker = function () {
922
+
923
+ $('.gfpdf-color-picker').each(function () {
924
+ $(this).wpColorPicker()
925
+ })
926
+ }
927
+
928
+ /**
929
+ * Remove any existing merge tags and reinitialise
930
+ * @return void
931
+ * @since 4.0
932
+ */
933
+ this.doMergetags = function () {
934
+
935
+ /* Backwards compatibility support prior to Gravity Forms 2.3 */
936
+ if (window.gfMergeTags && typeof form != 'undefined') {
937
+ window.gfMergeTags = new gfMergeTagsObj(form)
938
+ window.gfMergeTags.getTargetElement = this.resetGfMergeTags
939
+ }
940
+
941
+ /* Gravity Forms 2.3+ Merge tag support */
942
+ if (!window.gfMergeTags && typeof form != 'undefined' && $('.merge-tag-support').length >= 0) {
943
+ $('.merge-tag-support').each(function () {
944
+ new gfMergeTagsObj(form, $(this))
945
+ })
946
+ }
947
+ }
948
+
949
+ /**
950
+ * Escape any meta characters in the target element ID, as per the jQuery spec
951
+ *
952
+ * @param elem
953
+ * @returns {*|HTMLElement}
954
+ * @since 4.1
955
+ */
956
+ this.resetGfMergeTags = function (elem) {
957
+ var $elem = $(elem)
958
+ var selector = $elem.parents('span.all-merge-tags').data('targetElement')
959
+
960
+ /* escape any meta-characters as per jQuery Spec http://api.jquery.com/category/selectors/ */
961
+ selector = selector.replace(/[!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g, "\\$&")
962
+
963
+ return $('#' + selector)
964
+ }
965
+
966
+ /**
967
+ * Show / Hide our custom paper size as needed
968
+ * @return void
969
+ * @since 4.0
970
+ */
971
+ this.setupCustomPaperSize = function () {
972
+
973
+ $('.gfpdf_paper_size').each(function () {
974
+ var $customPaperSize = $(this).nextAll('.gfpdf_paper_size_other').first()
975
+ var $paperSize = $(this).find('select')
976
+
977
+ /* Add our change event */
978
+ $paperSize.off('change').change(function () {
979
+ if ($(this).val() === 'CUSTOM') {
980
+ $customPaperSize.fadeIn()
981
+ } else {
982
+ $customPaperSize.fadeOut()
983
+ }
984
+ }).trigger('change')
985
+
986
+ })
987
+
988
+ }
989
+
990
+ /**
991
+ * Our &tab=(.+?) url param causes issues with the default GF navigation
992
+ * @return void
993
+ * @since 4.0
994
+ */
995
+ this.cleanupGFNavigation = function () {
996
+ var $nav = $('#gform_tabs a')
997
+
998
+ $nav.each(function () {
999
+ var href = $(this).attr('href')
1000
+ var regex = new RegExp('&tab=[^&;]*', 'g')
1001
+
1002
+ $(this).attr('href', href.replace(regex, ''))
1003
+ })
1004
+ }
1005
+
1006
+ /**
1007
+ * Do an AJAX call to verify a user is protected
1008
+ * @return void
1009
+ * @since 4.0
1010
+ */
1011
+ this.runPDFAccessCheck = function () {
1012
+ var $status = $('#gfpdf-direct-pdf-protection-check')
1013
+
1014
+ if ($status.length > 0) {
1015
+ /* Do our AJAX call */
1016
+
1017
+ /* Add spinner */
1018
+ var $spinner = $('<img alt="' + GFPDF.spinnerAlt + '" src="' + GFPDF.spinnerUrl + '" class="gfpdf-spinner" />')
1019
+
1020
+ /* Add our spinner */
1021
+ $status.append($spinner)
1022
+
1023
+ /* Set up ajax data */
1024
+ var data = {
1025
+ 'action': 'gfpdf_has_pdf_protection',
1026
+ 'nonce': $status.data('nonce'),
1027
+ }
1028
+
1029
+ /* Do ajax call */
1030
+ this.ajax(data, function (response) {
1031
+
1032
+ /* Remove our loading spinner */
1033
+ $spinner.remove()
1034
+
1035
+ if (response === true) {
1036
+ /* enable our protected message */
1037
+ $status.find('#gfpdf-direct-pdf-check-protected').show()
1038
+ } else {
1039
+ /* enable our unprotected message */
1040
+ $status.find('#gfpdf-direct-pdf-check-unprotected').show()
1041
+ }
1042
+ })
1043
+ }
1044
+ }
1045
+
1046
+ /**
1047
+ * Enable dynamic required fields on the Gravity Forms PDF Settings page
1048
+ * This function will highlight to the user which fields should be processed, and disable in-browser validation
1049
+ * @return void
1050
+ * @since 4.0
1051
+ */
1052
+ this.setupRequiredFields = function ($elm) {
1053
+ /* prevent in browser validation */
1054
+ $elm.attr('novalidate', 'novalidate')
1055
+
1056
+ /* gf compatibility + disable automatic field validation */
1057
+ $elm.find('tr input[type="submit"]').click(function () {
1058
+ $elm.addClass('formSubmitted')
1059
+ })
1060
+
1061
+ /* add the required star to make it easier for users */
1062
+ $elm.find('tr').each(function () {
1063
+ $(this).find(':input[required=""]:first, :input[required]:first').parents('tr').find('th').append('<span class="gfield_required">*</span>')
1064
+ })
1065
+ }
1066
+
1067
+ /**
1068
+ * Because we are using the WordPress Settings API Gravity Forms tooltip support was lacking
1069
+ * This method fixes that issue
1070
+ * @return void
1071
+ * @since 4.0
1072
+ */
1073
+ this.showTooltips = function () {
1074
+
1075
+ if (typeof gform_initialize_tooltips !== 'function') {
1076
+ return
1077
+ }
1078
+
1079
+ $('.gf_hidden_tooltip').each(function () {
1080
+ $(this)
1081
+ .parent()
1082
+ .siblings('th:first')
1083
+ .append(' ')
1084
+ .append(
1085
+ self.get_tooltip($(this).html())
1086
+ )
1087
+
1088
+ $(this).remove()
1089
+ })
1090
+
1091
+ gform_initialize_tooltips()
1092
+ }
1093
+
1094
+ /**
1095
+ * Set up 'chosen' select boxes
1096
+ * @return void
1097
+ * @since 4.0
1098
+ */
1099
+ this.setupSelectBoxes = function () {
1100
+ $('.gfpdf-chosen').each(function () {
1101
+
1102
+ $(this).chosen({
1103
+ disable_search_threshold: 5,
1104
+ width: '100%',
1105
+ })
1106
+ })
1107
+ }
1108
+
1109
+ /**
1110
+ * Controls the Advanced Options hide / show functionality
1111
+ * By default these fields are hidden, but are show automatically if an error occurs.
1112
+ * @return void
1113
+ * @since 4.0
1114
+ */
1115
+ this.setup_advanced_options = function () {
1116
+ var $advanced_options_toggle_container = $('.gfpdf-advanced-options')
1117
+ var $advanced_options_container = $advanced_options_toggle_container.prev()
1118
+ var $advanced_options = $advanced_options_toggle_container.find('a')
1119
+
1120
+ /*
1121
+ * Show / Hide Advanced options
1122
+ */
1123
+ $advanced_options.click(function () {
1124
+ var click = this
1125
+
1126
+ /* toggle our slider */
1127
+ $advanced_options_container.slideToggle(600, function () {
1128
+ /* Toggle our link text */
1129
+ var text = $(click).text()
1130
+ $(click).text(
1131
+ text == GFPDF.showAdvancedOptions ? GFPDF.hideAdvancedOptions : GFPDF.showAdvancedOptions
1132
+ )
1133
+ })
1134
+
1135
+ return false
1136
+ })
1137
+
1138
+ if ($('.gfpdf-advanced-options').prev().find('.gfield_error').length) {
1139
+ $advanced_options_container.show()
1140
+ }
1141
+ }
1142
+
1143
+ /**
1144
+ * The general settings model method
1145
+ * This sets up and processes any of the JS that needs to be applied on the general settings tab
1146
+ * @return void
1147
+ * @since 4.0
1148
+ */
1149
+ this.generalSettings = function () {
1150
+ this.setupRequiredFields($('#pdfextended-settings > form'))
1151
+
1152
+ var $table = $('#pdf-general-security')
1153
+ var $adminRestrictions = $table.find('input[name="gfpdf_settings[default_restrict_owner]"]')
1154
+
1155
+ /*
1156
+ * Add change event to admin restrictions to show/hide dependant fields
1157
+ */
1158
+ $adminRestrictions.change(function () {
1159
+
1160
+ if ($(this).is(':checked')) {
1161
+ if ($(this).val() === 'Yes') {
1162
+ /* hide user restrictions and logged out user timeout */
1163
+ $table.find('tr:nth-child(3)').hide()
1164
+ } else {
1165
+ /* hide user restrictions and logged out user timeout */
1166
+ $table.find('tr:nth-child(3)').show()
1167
+ }
1168
+ }
1169
+ }).trigger('change')
1170
+
1171
+ /* setup advanced options */
1172
+ this.setup_advanced_options()
1173
+ }
1174
+
1175
+ /**
1176
+ * The tools settings model method
1177
+ * This sets up and processes any of the JS that needs to be applied on the tools settings tab
1178
+ * @since 4.0
1179
+ */
1180
+ this.toolsSettings = function () {
1181
+ this.setupToolsTemplateInstallerDialog()
1182
+ this.setupToolsFontsDialog()
1183
+ this.setupToolsUninstallDialog()
1184
+ }
1185
+
1186
+ /**
1187
+ * Handles the Template Installer Dialog Box
1188
+ * @return void
1189
+ * @since 4.0
1190
+ */
1191
+ this.setupToolsTemplateInstallerDialog = function () {
1192
+
1193
+ var $copy = $('#gfpdf_settings\\[setup_templates\\]')
1194
+ /* escape braces */
1195
+ var $copyDialog = $('#setup-templates-confirm')
1196
+
1197
+ /* Set up copy dialog */
1198
+ var copyButtons = [{
1199
+ text: GFPDF.continue,
1200
+ click: function () {
1201
+ /* submit form */
1202
+ $copy.unbind().click()
1203
+ }
1204
+ },
1205
+ {
1206
+ text: GFPDF.cancel,
1207
+ click: function () {
1208
+ /* cancel */
1209
+ $copyDialog.wpdialog('close')
1210
+ }
1211
+ }]
1212
+
1213
+ if ($copyDialog.length) {
1214
+ this.wp_dialog($copyDialog, copyButtons, 500, 350)
1215
+
1216
+ $copy.click(function () {
1217
+ /* Allow responsiveness */
1218
+ self.resizeDialogIfNeeded($copyDialog, 500, 350)
1219
+
1220
+ $copyDialog.wpdialog('open')
1221
+ return false
1222
+ })
1223
+ }
1224
+ }
1225
+
1226
+ /**
1227
+ * Handles the Fonts Dialog Box
1228
+ * @return void
1229
+ * @since 4.0
1230
+ */
1231
+ this.setupToolsFontsDialog = function () {
1232
+ var $font = $('#gfpdf_settings\\[manage_fonts\\]')
1233
+ /* escape braces */
1234
+ var $fontDialog = $('#manage-font-files')
1235
+
1236
+ /* setup fonts dialog */
1237
+ this.wp_dialog($fontDialog, [], 500, 500)
1238
+
1239
+ $font.click(function () {
1240
+ /* Allow responsiveness */
1241
+ self.resizeDialogIfNeeded($fontDialog, 500, 500)
1242
+
1243
+ $fontDialog.wpdialog('open')
1244
+ return false
1245
+ })
1246
+
1247
+ /* Check if our manage_fonts hash and open the dialog */
1248
+ if (window.location.hash) {
1249
+ if (window.location.hash == '#manage_fonts') {
1250
+ $font.click()
1251
+ }
1252
+ }
1253
+ }
1254
+
1255
+ /**
1256
+ * Handles the Uninstall Dialog Box
1257
+ * @return void
1258
+ * @since 4.0
1259
+ */
1260
+ this.setupToolsUninstallDialog = function () {
1261
+ var $uninstall = $('#gfpdf-uninstall')
1262
+ var $uninstallDialog = $('#uninstall-confirm')
1263
+
1264
+ /* Set up uninstall dialog */
1265
+ var uninstallButtons = [{
1266
+ text: GFPDF.uninstall,
1267
+ click: function () {
1268
+ /* submit form */
1269
+ $uninstall.parents('form').submit()
1270
+ }
1271
+ },
1272
+ {
1273
+ text: GFPDF.cancel,
1274
+ click: function () {
1275
+ /* cancel */
1276
+ $uninstallDialog.wpdialog('close')
1277
+ }
1278
+ }]
1279
+
1280
+ this.wp_dialog($uninstallDialog, uninstallButtons, 500, 175)
1281
+
1282
+ $uninstall.click(function () {
1283
+ /* Allow responsiveness */
1284
+ self.resizeDialogIfNeeded($uninstallDialog, 500, 175)
1285
+
1286
+ $uninstallDialog.wpdialog('open')
1287
+ return false
1288
+ })
1289
+ }
1290
+
1291
+ /**
1292
+ * Check the current browser width and height and set the dialog box size to fit
1293
+ * If the size is over 500 pixels (width or height) it will default to 500
1294
+ *
1295
+ * @param $dialog an object initialised with this.wp_dialog
1296
+ * @param Integer maxWidth The maximum width of the dialog box, if it will fit
1297
+ * @param Integer maxHeight The maximum height of the dialog box, if it will fit
1298
+ * @return void
1299
+ * @since 4.0
1300
+ */
1301
+ this.resizeDialogIfNeeded = function ($dialog, maxWidth, maxHeight) {
1302
+ var windowWidth = $(window).width()
1303
+ var windowHeight = $(window).height()
1304
+
1305
+ var dialogWidth = (windowWidth < 500) ? windowWidth - 20 : maxWidth
1306
+ var dialogHeight = (windowHeight < 500) ? windowHeight - 50 : maxHeight
1307
+
1308
+ $dialog.wpdialog('option', 'width', dialogWidth)
1309
+ $dialog.wpdialog('option', 'height', dialogHeight)
1310
+ }
1311
+
1312
+ /**
1313
+ * Generate a WP Dialog box
1314
+ * @param jQuery Object $elm [description]
1315
+ * @param Object buttonsList [description]
1316
+ * @param Integer boxWidth [description]
1317
+ * @param Integer boxHeight [description]
1318
+ * @return void
1319
+ * @since 4.0
1320
+ */
1321
+ this.wp_dialog = function ($elm, buttonsList, boxWidth, boxHeight) {
1322
+ $elm.wpdialog({
1323
+ autoOpen: false,
1324
+ resizable: false,
1325
+ draggable: false,
1326
+ width: boxWidth,
1327
+ height: boxHeight,
1328
+ modal: true,
1329
+ dialogClass: 'wp-dialog',
1330
+ zIndex: 300000,
1331
+ buttons: buttonsList,
1332
+ open: function () {
1333
+ $(this).siblings('.ui-dialog-buttonpane').find('button:eq(1)').focus()
1334
+
1335
+ $('.ui-widget-overlay').bind('click', function () {
1336
+ $elm.wpdialog('close')
1337
+ })
1338
+ }
1339
+ })
1340
+ }
1341
+
1342
+ /**
1343
+ * Create the tooltip HTML
1344
+ * @param String html The tooltip message
1345
+ * @return String
1346
+ * @since 4.0
1347
+ */
1348
+ this.get_tooltip = function (html) {
1349
+ var $a = $('<a>')
1350
+ var $i = $('<i class="fa fa-question-circle">')
1351
+
1352
+ $a.append($i)
1353
+ $a.addClass('gf_tooltip tooltip')
1354
+ $a.click(function () {
1355
+ return false
1356
+ })
1357
+
1358
+ $a.attr('title', html)
1359
+
1360
+ return $a
1361
+ }
1362
+
1363
+ /**
1364
+ * An AJAX Wrapper function we can use to ajaxify our plugin
1365
+ * @param post Object an object of data to submit to our ajax endpoint. This MUST include an 'nonce' and an 'action'
1366
+ * @param successCallback a callback function
1367
+ * @return void
1368
+ * @since 4.0
1369
+ */
1370
+ this.ajax = function (post, successCallback) {
1371
+ $.ajax({
1372
+ type: "post",
1373
+ dataType: "json",
1374
+ url: GFPDF.ajaxUrl,
1375
+ data: post,
1376
+ success: successCallback,
1377
+ error: this.ajax_error,
1378
+ })
1379
+ }
1380
+
1381
+ /**
1382
+ * Log the error to the console
1383
+ * @return void
1384
+ * @since 4.0
1385
+ */
1386
+ this.ajax_error = function (jqXHR, textStatus, errorThrown) {
1387
+ console.log(textStatus)
1388
+ console.log(errorThrown)
1389
+ }
1390
+
1391
+ /**
1392
+ * Display a message or error to the user with an appropriate timeout
1393
+ * @param String msg The message to be displayed
1394
+ * @param Integer timeout How long to show the message
1395
+ * @param Boolean error Whether to show an error (true) or a message (false or undefined)
1396
+ * @return void
1397
+ * @since 4.0
1398
+ */
1399
+ this.show_message = function (msg, timeout, error) {
1400
+ timeout = typeof timeout !== 'undefined' ? timeout : 4500
1401
+ error = typeof error !== 'undefined' ? error : false
1402
+
1403
+ var $elm = $('<div id="message">').html('<p>' + msg + '</p>')
1404
+
1405
+ if (error === true) {
1406
+ $elm.addClass('error')
1407
+ } else {
1408
+ $elm.addClass('updated')
1409
+ }
1410
+
1411
+ $('.wrap > h2').after($elm)
1412
+
1413
+ setTimeout(function () {
1414
+ $elm.slideUp()
1415
+ }, timeout)
1416
+
1417
+ }
1418
+
1419
+ /**
1420
+ * Update the URL parameter
1421
+ * @param String The URL to parse
1422
+ * @param String The URL parameter to want to update
1423
+ * @param String The replacement string for the URL parameter
1424
+ * @return String The processed URL
1425
+ * @since 4.0
1426
+ * @link http://stackoverflow.com/a/10997390/11236
1427
+ */
1428
+ this.updateURLParameter = function (url, param, paramVal) {
1429
+ var newAdditionalURL = ""
1430
+ var tempArray = url.split("?")
1431
+ var baseURL = tempArray[0]
1432
+ var additionalURL = tempArray[1]
1433
+ var temp = ""
1434
+ if (additionalURL) {
1435
+ tempArray = additionalURL.split("&")
1436
+ for (i = 0; i < tempArray.length; i++) {
1437
+ if (tempArray[i].split('=')[0] != param) {
1438
+ newAdditionalURL += temp + tempArray[i]
1439
+ temp = "&"
1440
+ }
1441
+ }
1442
+ }
1443
+
1444
+ var rows_txt = temp + "" + param + "=" + paramVal
1445
+ return baseURL + "?" + newAdditionalURL + rows_txt
1446
+ }
1447
+ }
1448
+
1449
+ var pdf = new GravityPDF()
1450
+ pdf.init()
1451
+
1452
+ })
1453
+ })(jQuery)
src/assets/js/react/actionTypes/templates.js CHANGED
@@ -1,35 +1,35 @@
1
- /**
2
- * Our Redux Action Type Constants
3
- *
4
- * @package Gravity PDF
5
- * @copyright Copyright (c) 2016, Blue Liquid Designs
6
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
7
- * @since 4.1
8
- */
9
-
10
- /*
11
- This file is part of Gravity PDF.
12
-
13
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
14
-
15
- This program is free software; you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License as published by
17
- the Free Software Foundation; either version 2 of the License, or
18
- (at your option) any later version.
19
-
20
- This program is distributed in the hope that it will be useful,
21
- but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
- GNU General Public License for more details.
24
-
25
- You should have received a copy of the GNU General Public License
26
- along with this program; if not, write to the Free Software
27
- Found
28
- */
29
-
30
- export const SEARCH_TEMPLATES = 'SEARCH_TEMPLATES'
31
- export const SELECT_TEMPLATE = 'SELECT_TEMPLATE'
32
- export const ADD_TEMPLATE = 'ADD_TEMPLATE'
33
- export const UPDATE_TEMPLATE = 'UPDATE_TEMPLATE'
34
- export const UPDATE_TEMPLATE_PARAM = 'UPDATE_TEMPLATE_PARAM'
35
  export const DELETE_TEMPLATE = 'DELETE_TEMPLATE'
1
+ /**
2
+ * Our Redux Action Type Constants
3
+ *
4
+ * @package Gravity PDF
5
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
6
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
7
+ * @since 4.1
8
+ */
9
+
10
+ /*
11
+ This file is part of Gravity PDF.
12
+
13
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
14
+
15
+ This program is free software; you can redistribute it and/or modify
16
+ it under the terms of the GNU General Public License as published by
17
+ the Free Software Foundation; either version 2 of the License, or
18
+ (at your option) any later version.
19
+
20
+ This program is distributed in the hope that it will be useful,
21
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
+ GNU General Public License for more details.
24
+
25
+ You should have received a copy of the GNU General Public License
26
+ along with this program; if not, write to the Free Software
27
+ Found
28
+ */
29
+
30
+ export const SEARCH_TEMPLATES = 'SEARCH_TEMPLATES'
31
+ export const SELECT_TEMPLATE = 'SELECT_TEMPLATE'
32
+ export const ADD_TEMPLATE = 'ADD_TEMPLATE'
33
+ export const UPDATE_TEMPLATE = 'UPDATE_TEMPLATE'
34
+ export const UPDATE_TEMPLATE_PARAM = 'UPDATE_TEMPLATE_PARAM'
35
  export const DELETE_TEMPLATE = 'DELETE_TEMPLATE'
src/assets/js/react/actions/templates.js CHANGED
@@ -1,137 +1,137 @@
1
- import {
2
- SEARCH_TEMPLATES,
3
- SELECT_TEMPLATE,
4
- ADD_TEMPLATE,
5
- UPDATE_TEMPLATE,
6
- UPDATE_TEMPLATE_PARAM,
7
- DELETE_TEMPLATE,
8
- } from '../actionTypes/templates'
9
-
10
- /**
11
- * Redux Actions - payloads of information that send data from your application to your store
12
- *
13
- * @package Gravity PDF
14
- * @copyright Copyright (c) 2016, Blue Liquid Designs
15
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
16
- * @since 4.1
17
- */
18
-
19
- /*
20
- This file is part of Gravity PDF.
21
-
22
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
23
-
24
- This program is free software; you can redistribute it and/or modify
25
- it under the terms of the GNU General Public License as published by
26
- the Free Software Foundation; either version 2 of the License, or
27
- (at your option) any later version.
28
-
29
- This program is distributed in the hope that it will be useful,
30
- but WITHOUT ANY WARRANTY; without even the implied warranty of
31
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32
- GNU General Public License for more details.
33
-
34
- You should have received a copy of the GNU General Public License
35
- along with this program; if not, write to the Free Software
36
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
37
- */
38
-
39
- /**
40
- * Fires the Advanced Template Search action
41
- *
42
- * @param {string} text
43
- *
44
- * @returns {{type, text: *}}
45
- *
46
- * @since 4.1
47
- */
48
- export const searchTemplates = (text) => {
49
- return {
50
- type: SEARCH_TEMPLATES,
51
- text
52
- }
53
- }
54
-
55
- /**
56
- * Fires the Advanced Template select/activate action
57
- *
58
- * @param {string} id The template ID
59
- *
60
- * @returns {{type, id: *}}
61
- *
62
- * @since 4.1
63
- */
64
- export const selectTemplate = (id) => {
65
- return {
66
- type: SELECT_TEMPLATE,
67
- id
68
- }
69
- }
70
-
71
- /**
72
- * Fires the Advanced Template add new template action
73
- *
74
- * @param {object} template An Immutable Map
75
- *
76
- * @returns {{type, template: *}}
77
- *
78
- * @since 4.1
79
- */
80
- export const addTemplate = (template) => {
81
- return {
82
- type: ADD_TEMPLATE,
83
- template
84
- }
85
- }
86
-
87
- /**
88
- * Fires the Advanced Template update action which overrides the entire template object with a new one
89
- *
90
- * @param {object} template An Immutable Map
91
- *
92
- * @returns {{type, template: *}}
93
- *
94
- * @since 4.1
95
- */
96
- export const updateTemplate = (template) => {
97
- return {
98
- type: UPDATE_TEMPLATE,
99
- template
100
- }
101
- }
102
-
103
- /**
104
- * Fires the Advanced Template update action which replaces a template parameter with a new value
105
- *
106
- * @param {string} id The template ID
107
- * @param {string} name The parameter key to update
108
- * @param {string} value The new value for the parameter
109
- *
110
- * @returns {{type, id: *, name: *, value: *}}
111
- *
112
- * @since 4.1
113
- */
114
- export const updateTemplateParam = (id, name, value) => {
115
- return {
116
- type: UPDATE_TEMPLATE_PARAM,
117
- id,
118
- name,
119
- value
120
- }
121
- }
122
-
123
- /**
124
- * Fires the Advanced Template delete action which removes the template from our store
125
- *
126
- * @param {string} id The template ID
127
- *
128
- * @returns {{type, id: *}}
129
- *
130
- * @since 4.1
131
- */
132
- export const deleteTemplate = (id) => {
133
- return {
134
- type: DELETE_TEMPLATE,
135
- id
136
- }
137
  }
1
+ import {
2
+ SEARCH_TEMPLATES,
3
+ SELECT_TEMPLATE,
4
+ ADD_TEMPLATE,
5
+ UPDATE_TEMPLATE,
6
+ UPDATE_TEMPLATE_PARAM,
7
+ DELETE_TEMPLATE,
8
+ } from '../actionTypes/templates'
9
+
10
+ /**
11
+ * Redux Actions - payloads of information that send data from your application to your store
12
+ *
13
+ * @package Gravity PDF
14
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
15
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
16
+ * @since 4.1
17
+ */
18
+
19
+ /*
20
+ This file is part of Gravity PDF.
21
+
22
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
23
+
24
+ This program is free software; you can redistribute it and/or modify
25
+ it under the terms of the GNU General Public License as published by
26
+ the Free Software Foundation; either version 2 of the License, or
27
+ (at your option) any later version.
28
+
29
+ This program is distributed in the hope that it will be useful,
30
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
31
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32
+ GNU General Public License for more details.
33
+
34
+ You should have received a copy of the GNU General Public License
35
+ along with this program; if not, write to the Free Software
36
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
37
+ */
38
+
39
+ /**
40
+ * Fires the Advanced Template Search action
41
+ *
42
+ * @param {string} text
43
+ *
44
+ * @returns {{type, text: *}}
45
+ *
46
+ * @since 4.1
47
+ */
48
+ export const searchTemplates = (text) => {
49
+ return {
50
+ type: SEARCH_TEMPLATES,
51
+ text
52
+ }
53
+ }
54
+
55
+ /**
56
+ * Fires the Advanced Template select/activate action
57
+ *
58
+ * @param {string} id The template ID
59
+ *
60
+ * @returns {{type, id: *}}
61
+ *
62
+ * @since 4.1
63
+ */
64
+ export const selectTemplate = (id) => {
65
+ return {
66
+ type: SELECT_TEMPLATE,
67
+ id
68
+ }
69
+ }
70
+
71
+ /**
72
+ * Fires the Advanced Template add new template action
73
+ *
74
+ * @param {object} template An Immutable Map
75
+ *
76
+ * @returns {{type, template: *}}
77
+ *
78
+ * @since 4.1
79
+ */
80
+ export const addTemplate = (template) => {
81
+ return {
82
+ type: ADD_TEMPLATE,
83
+ template
84
+ }
85
+ }
86
+
87
+ /**
88
+ * Fires the Advanced Template update action which overrides the entire template object with a new one
89
+ *
90
+ * @param {object} template An Immutable Map
91
+ *
92
+ * @returns {{type, template: *}}
93
+ *
94
+ * @since 4.1
95
+ */
96
+ export const updateTemplate = (template) => {
97
+ return {
98
+ type: UPDATE_TEMPLATE,
99
+ template
100
+ }
101
+ }
102
+
103
+ /**
104
+ * Fires the Advanced Template update action which replaces a template parameter with a new value
105
+ *
106
+ * @param {string} id The template ID
107
+ * @param {string} name The parameter key to update
108
+ * @param {string} value The new value for the parameter
109
+ *
110
+ * @returns {{type, id: *, name: *, value: *}}
111
+ *
112
+ * @since 4.1
113
+ */
114
+ export const updateTemplateParam = (id, name, value) => {
115
+ return {
116
+ type: UPDATE_TEMPLATE_PARAM,
117
+ id,
118
+ name,
119
+ value
120
+ }
121
+ }
122
+
123
+ /**
124
+ * Fires the Advanced Template delete action which removes the template from our store
125
+ *
126
+ * @param {string} id The template ID
127
+ *
128
+ * @returns {{type, id: *}}
129
+ *
130
+ * @since 4.1
131
+ */
132
+ export const deleteTemplate = (id) => {
133
+ return {
134
+ type: DELETE_TEMPLATE,
135
+ id
136
+ }
137
  }
src/assets/js/react/bootstrap/templateBootstrap.js CHANGED
@@ -1,179 +1,179 @@
1
- import React from 'react'
2
- import { render } from 'react-dom'
3
- import { HashRouter as Router, Route } from 'react-router-dom'
4
- import request from 'superagent'
5
-
6
- import { createStore, combineReducers } from 'redux'
7
- import watch from 'redux-watch'
8
-
9
- import { selectTemplate } from '../actions/templates'
10
- import templateRouter from '../router/templateRouter'
11
- import templateReducer from '../reducers/templateReducer'
12
- import TemplateButton from '../components/TemplateButton'
13
-
14
- /**
15
- * Advanced Template Selector Bootstrap
16
- *
17
- * @package Gravity PDF
18
- * @copyright Copyright (c) 2016, Blue Liquid Designs
19
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
20
- * @since 4.1
21
- */
22
-
23
- /*
24
- This file is part of Gravity PDF.
25
-
26
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
27
-
28
- This program is free software; you can redistribute it and/or modify
29
- it under the terms of the GNU General Public License as published by
30
- the Free Software Foundation; either version 2 of the License, or
31
- (at your option) any later version.
32
-
33
- This program is distributed in the hope that it will be useful,
34
- but WITHOUT ANY WARRANTY; without even the implied warranty of
35
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36
- GNU General Public License for more details.
37
-
38
- You should have received a copy of the GNU General Public License
39
- along with this program; if not, write to the Free Software
40
- Found
41
- */
42
-
43
- /**
44
- * Handles the loading of our Fancy Template Selector
45
- *
46
- * @param {Object} $templateField The jQuery select box we should attach the fancy template selector to
47
- *
48
- * @since 4.1
49
- */
50
- export default function templateBootstrap ($templateField) {
51
-
52
- /* Combine our Redux Reducers */
53
- const reducers = setupReducers()
54
-
55
- /* Create our store and enable the Redux dev tools, if they exist */
56
- const store = createStore(reducers, window.devToolsExtension && window.devToolsExtension())
57
-
58
- /* Create our button container and render our component in it */
59
- createTemplateMarkup($templateField)
60
-
61
- /* Render our React Component in the DOM */
62
- render(
63
- <Router>
64
- <Route render={(props) => <TemplateButton {...props} store={store} buttonText={GFPDF.advanced}/>} />
65
- </Router>,
66
- document.getElementById('gpdf-advance-template-selector')
67
- )
68
-
69
- /* Mount our router */
70
- templateRouter(store)
71
-
72
- /*
73
- * Listen for Redux store updates and do DOM updates
74
- */
75
- activeTemplateStoreListener(store, $templateField)
76
- templateChangeStoreListener(store, $templateField)
77
- }
78
-
79
- /**
80
- * Combine our Redux reducers for use in a single store
81
- * If you want to add new top-level keys to our store, this is the place
82
- *
83
- * @returns {Function}
84
- *
85
- * @since 4.1
86
- */
87
- export function setupReducers () {
88
- return combineReducers({
89
- template: templateReducer,
90
- })
91
- }
92
-
93
- /**
94
- * Dynamically add the required markup to attach our React components to.
95
- *
96
- * @param {Object} $templateField The jQuery select box we should attach the fancy template selector to
97
- *
98
- * @since 4.1
99
- */
100
- export function createTemplateMarkup ($templateField) {
101
- $templateField
102
- .next()
103
- .after('<span id="gpdf-advance-template-selector">')
104
- .next()
105
- .after('<div id="gfpdf-overlay" class="theme-overlay">')
106
- }
107
-
108
- /**
109
- * Listen for updates to the template.activeTemplate data in our Redux store
110
- * and update the select box value based on this change. Also, listen for changes
111
- * to our select box and update the store when needed.
112
- *
113
- * @param {Object} store The Redux store returned from createStore()
114
- * @param {Object} $templateField The jQuery select box we should attach the fancy template selector to
115
- *
116
- * @since 4.1
117
- */
118
- export function activeTemplateStoreListener (store, $templateField) {
119
-
120
- /* Watch our store for changes */
121
- let w = watch(store.getState, 'template.activeTemplate')
122
- store.subscribe(w((template) => {
123
-
124
- /* Check store and DOM are different to prevent any update recursions */
125
- if ($templateField.val() !== template) {
126
- $templateField
127
- .val(template)
128
- .trigger('chosen:updated')
129
- .trigger('change')
130
- }
131
- }))
132
-
133
- /* Watch our DOM for changes */
134
- $templateField.change(function () {
135
- /* Check store and DOM are different to prevent any update recursions */
136
- if (this.value !== store.getState().template.activeTemplate) {
137
- store.dispatch(selectTemplate(this.value))
138
- }
139
- })
140
- }
141
-
142
- /**
143
- * PHP builds the Select box DOM for the templates and when we add or delete a template we need to rebuild this.
144
- * Instead of duplicating the code on both server and client side we do an AJAX call to get the new Selex box HTML when
145
- * the template.list length changes and update the DOM accordingly.
146
- *
147
- * @param {Object} store The Redux store returned from createStore()
148
- * @param {Object} $templateField The jQuery select box we should attach the fancy template selector to
149
- *
150
- * @since 4.1
151
- */
152
- export function templateChangeStoreListener (store, $templateField) {
153
-
154
- /* Track the initial list size */
155
- let listCount = store.getState().template.list.size
156
-
157
- /* Watch our store for changes */
158
- let w = watch(store.getState, 'template.list')
159
- store.subscribe(w((list) => {
160
-
161
- /* Only update if the list size differs from what we expect */
162
- if (listCount !== list.size) {
163
- /* update the list size so we don't run it twice */
164
- listCount = list.size
165
-
166
- /* Do our AJAX call to get the new Select Box DOM */
167
- request
168
- .post(GFPDF.ajaxUrl)
169
- .field('action', 'gfpdf_get_template_options')
170
- .field('nonce', GFPDF.ajaxNonce)
171
- .then((response) => {
172
- $templateField
173
- .html(response.text)
174
- .trigger('chosen:updated')
175
- .trigger('change')
176
- })
177
- }
178
- }))
179
  }
1
+ import React from 'react'
2
+ import { render } from 'react-dom'
3
+ import { HashRouter as Router, Route } from 'react-router-dom'
4
+ import request from 'superagent'
5
+
6
+ import { createStore, combineReducers } from 'redux'
7
+ import watch from 'redux-watch'
8
+
9
+ import { selectTemplate } from '../actions/templates'
10
+ import templateRouter from '../router/templateRouter'
11
+ import templateReducer from '../reducers/templateReducer'
12
+ import TemplateButton from '../components/TemplateButton'
13
+
14
+ /**
15
+ * Advanced Template Selector Bootstrap
16
+ *
17
+ * @package Gravity PDF
18
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
19
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
20
+ * @since 4.1
21
+ */
22
+
23
+ /*
24
+ This file is part of Gravity PDF.
25
+
26
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
27
+
28
+ This program is free software; you can redistribute it and/or modify
29
+ it under the terms of the GNU General Public License as published by
30
+ the Free Software Foundation; either version 2 of the License, or
31
+ (at your option) any later version.
32
+
33
+ This program is distributed in the hope that it will be useful,
34
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
35
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36
+ GNU General Public License for more details.
37
+
38
+ You should have received a copy of the GNU General Public License
39
+ along with this program; if not, write to the Free Software
40
+ Found
41
+ */
42
+
43
+ /**
44
+ * Handles the loading of our Fancy Template Selector
45
+ *
46
+ * @param {Object} $templateField The jQuery select box we should attach the fancy template selector to
47
+ *
48
+ * @since 4.1
49
+ */
50
+ export default function templateBootstrap ($templateField) {
51
+
52
+ /* Combine our Redux Reducers */
53
+ const reducers = setupReducers()
54
+
55
+ /* Create our store and enable the Redux dev tools, if they exist */
56
+ const store = createStore(reducers, window.devToolsExtension && window.devToolsExtension())
57
+
58
+ /* Create our button container and render our component in it */
59
+ createTemplateMarkup($templateField)
60
+
61
+ /* Render our React Component in the DOM */
62
+ render(
63
+ <Router>
64
+ <Route render={(props) => <TemplateButton {...props} store={store} buttonText={GFPDF.advanced}/>} />
65
+ </Router>,
66
+ document.getElementById('gpdf-advance-template-selector')
67
+ )
68
+
69
+ /* Mount our router */
70
+ templateRouter(store)
71
+
72
+ /*
73
+ * Listen for Redux store updates and do DOM updates
74
+ */
75
+ activeTemplateStoreListener(store, $templateField)
76
+ templateChangeStoreListener(store, $templateField)
77
+ }
78
+
79
+ /**
80
+ * Combine our Redux reducers for use in a single store
81
+ * If you want to add new top-level keys to our store, this is the place
82
+ *
83
+ * @returns {Function}
84
+ *
85
+ * @since 4.1
86
+ */
87
+ export function setupReducers () {
88
+ return combineReducers({
89
+ template: templateReducer,
90
+ })
91
+ }
92
+
93
+ /**
94
+ * Dynamically add the required markup to attach our React components to.
95
+ *
96
+ * @param {Object} $templateField The jQuery select box we should attach the fancy template selector to
97
+ *
98
+ * @since 4.1
99
+ */
100
+ export function createTemplateMarkup ($templateField) {
101
+ $templateField
102
+ .next()
103
+ .after('<span id="gpdf-advance-template-selector">')
104
+ .next()
105
+ .after('<div id="gfpdf-overlay" class="theme-overlay">')
106
+ }
107
+
108
+ /**
109
+ * Listen for updates to the template.activeTemplate data in our Redux store
110
+ * and update the select box value based on this change. Also, listen for changes
111
+ * to our select box and update the store when needed.
112
+ *
113
+ * @param {Object} store The Redux store returned from createStore()
114
+ * @param {Object} $templateField The jQuery select box we should attach the fancy template selector to
115
+ *
116
+ * @since 4.1
117
+ */
118
+ export function activeTemplateStoreListener (store, $templateField) {
119
+
120
+ /* Watch our store for changes */
121
+ let w = watch(store.getState, 'template.activeTemplate')
122
+ store.subscribe(w((template) => {
123
+
124
+ /* Check store and DOM are different to prevent any update recursions */
125
+ if ($templateField.val() !== template) {
126
+ $templateField
127
+ .val(template)
128
+ .trigger('chosen:updated')
129
+ .trigger('change')
130
+ }
131
+ }))
132
+
133
+ /* Watch our DOM for changes */
134
+ $templateField.change(function () {
135
+ /* Check store and DOM are different to prevent any update recursions */
136
+ if (this.value !== store.getState().template.activeTemplate) {
137
+ store.dispatch(selectTemplate(this.value))
138
+ }
139
+ })
140
+ }
141
+
142
+ /**
143
+ * PHP builds the Select box DOM for the templates and when we add or delete a template we need to rebuild this.
144
+ * Instead of duplicating the code on both server and client side we do an AJAX call to get the new Selex box HTML when
145
+ * the template.list length changes and update the DOM accordingly.
146
+ *
147
+ * @param {Object} store The Redux store returned from createStore()
148
+ * @param {Object} $templateField The jQuery select box we should attach the fancy template selector to
149
+ *
150
+ * @since 4.1
151
+ */
152
+ export function templateChangeStoreListener (store, $templateField) {
153
+
154
+ /* Track the initial list size */
155
+ let listCount = store.getState().template.list.size
156
+
157
+ /* Watch our store for changes */
158
+ let w = watch(store.getState, 'template.list')
159
+ store.subscribe(w((list) => {
160
+
161
+ /* Only update if the list size differs from what we expect */
162
+ if (listCount !== list.size) {
163
+ /* update the list size so we don't run it twice */
164
+ listCount = list.size
165
+
166
+ /* Do our AJAX call to get the new Select Box DOM */
167
+ request
168
+ .post(GFPDF.ajaxUrl)
169
+ .field('action', 'gfpdf_get_template_options')
170
+ .field('nonce', GFPDF.ajaxNonce)
171
+ .then((response) => {
172
+ $templateField
173
+ .html(response.text)
174
+ .trigger('chosen:updated')
175
+ .trigger('change')
176
+ })
177
+ }
178
+ }))
179
  }
src/assets/js/react/components/Dropzone.js CHANGED
@@ -1,79 +1,79 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react'
3
- import ReactDropzone from 'react-dropzone'
4
-
5
- /**
6
- * Our Drag and Drop File upload Component which is a wrapper
7
- * for react-dropzone
8
- *
9
- * @package Gravity PDF
10
- * @copyright Copyright (c) 2016, Blue Liquid Designs
11
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
12
- * @since 4.1
13
- */
14
-
15
- /*
16
- This file is part of Gravity PDF.
17
-
18
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
19
-
20
- This program is free software; you can redistribute it and/or modify
21
- it under the terms of the GNU General Public License as published by
22
- the Free Software Foundation; either version 2 of the License, or
23
- (at your option) any later version.
24
-
25
- This program is distributed in the hope that it will be useful,
26
- but WITHOUT ANY WARRANTY; without even the implied warranty of
27
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28
- GNU General Public License for more details.
29
-
30
- You should have received a copy of the GNU General Public License
31
- along with this program; if not, write to the Free Software
32
- Found
33
- */
34
-
35
- /**
36
- * React Component
37
- *
38
- * @since 4.1
39
- */
40
- class Dropzone extends React.Component {
41
- /**
42
- * @since 4.1
43
- */
44
- static propTypes = {
45
- children: PropTypes.node.isRequired,
46
- onDrop: PropTypes.func.isRequired,
47
- multiple: PropTypes.bool,
48
- className: PropTypes.string,
49
- activeClassName: PropTypes.string
50
- };
51
-
52
- /**
53
- * @since 4.1
54
- */
55
- static defaultProps = {
56
- multiple: false,
57
- maxSize: Infinity,
58
- className: 'gfpdf-dropzone',
59
- activeClassName: 'gfpdf-dropzone-active'
60
- };
61
-
62
- /**
63
- * @since 4.1
64
- */
65
- render() {
66
- return (
67
- <ReactDropzone
68
- onDrop={this.props.onDrop}
69
- multiple={this.props.multiple}
70
- disablePreview={true}
71
- className={this.props.className}
72
- activeClassName={this.props.activeClassName}>
73
- {this.props.children}
74
- </ReactDropzone>
75
- )
76
- }
77
- }
78
-
79
  export default Dropzone
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react'
3
+ import ReactDropzone from 'react-dropzone'
4
+
5
+ /**
6
+ * Our Drag and Drop File upload Component which is a wrapper
7
+ * for react-dropzone
8
+ *
9
+ * @package Gravity PDF
10
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
11
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
12
+ * @since 4.1
13
+ */
14
+
15
+ /*
16
+ This file is part of Gravity PDF.
17
+
18
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
19
+
20
+ This program is free software; you can redistribute it and/or modify
21
+ it under the terms of the GNU General Public License as published by
22
+ the Free Software Foundation; either version 2 of the License, or
23
+ (at your option) any later version.
24
+
25
+ This program is distributed in the hope that it will be useful,
26
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
27
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28
+ GNU General Public License for more details.
29
+
30
+ You should have received a copy of the GNU General Public License
31
+ along with this program; if not, write to the Free Software
32
+ Found
33
+ */
34
+
35
+ /**
36
+ * React Component
37
+ *
38
+ * @since 4.1
39
+ */
40
+ class Dropzone extends React.Component {
41
+ /**
42
+ * @since 4.1
43
+ */
44
+ static propTypes = {
45
+ children: PropTypes.node.isRequired,
46
+ onDrop: PropTypes.func.isRequired,
47
+ multiple: PropTypes.bool,
48
+ className: PropTypes.string,
49
+ activeClassName: PropTypes.string
50
+ };
51
+
52
+ /**
53
+ * @since 4.1
54
+ */
55
+ static defaultProps = {
56
+ multiple: false,
57
+ maxSize: Infinity,
58
+ className: 'gfpdf-dropzone',
59
+ activeClassName: 'gfpdf-dropzone-active'
60
+ };
61
+
62
+ /**
63
+ * @since 4.1
64
+ */
65
+ render() {
66
+ return (
67
+ <ReactDropzone
68
+ onDrop={this.props.onDrop}
69
+ multiple={this.props.multiple}
70
+ disablePreview={true}
71
+ className={this.props.className}
72
+ activeClassName={this.props.activeClassName}>
73
+ {this.props.children}
74
+ </ReactDropzone>
75
+ )
76
+ }
77
+ }
78
+
79
  export default Dropzone
src/assets/js/react/components/Empty.js CHANGED
@@ -1,37 +1,37 @@
1
- /**
2
- * Render a blank component for use with React Router's default route
3
- *
4
- * @package Gravity PDF
5
- * @copyright Copyright (c) 2016, Blue Liquid Designs
6
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
7
- * @since 4.1
8
- */
9
-
10
- /*
11
- This file is part of Gravity PDF.
12
-
13
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
14
-
15
- This program is free software; you can redistribute it and/or modify
16
- it under the terms of the GNU General Public License as published by
17
- the Free Software Foundation; either version 2 of the License, or
18
- (at your option) any later version.
19
-
20
- This program is distributed in the hope that it will be useful,
21
- but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
- GNU General Public License for more details.
24
-
25
- You should have received a copy of the GNU General Public License
26
- along with this program; if not, write to the Free Software
27
- Found
28
- */
29
-
30
- /**
31
- * React Component
32
- *
33
- * @since 4.1
34
- */
35
- export default () => {
36
- return false
37
  }
1
+ /**
2
+ * Render a blank component for use with React Router's default route
3
+ *
4
+ * @package Gravity PDF
5
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
6
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
7
+ * @since 4.1
8
+ */
9
+
10
+ /*
11
+ This file is part of Gravity PDF.
12
+
13
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
14
+
15
+ This program is free software; you can redistribute it and/or modify
16
+ it under the terms of the GNU General Public License as published by
17
+ the Free Software Foundation; either version 2 of the License, or
18
+ (at your option) any later version.
19
+
20
+ This program is distributed in the hope that it will be useful,
21
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
+ GNU General Public License for more details.
24
+
25
+ You should have received a copy of the GNU General Public License
26
+ along with this program; if not, write to the Free Software
27
+ Found
28
+ */
29
+
30
+ /**
31
+ * React Component
32
+ *
33
+ * @since 4.1
34
+ */
35
+ export default () => {
36
+ return false
37
  }
src/assets/js/react/components/ShowMessage.js CHANGED
@@ -1,167 +1,167 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react'
3
- import $ from 'jquery'
4
-
5
- /**
6
- * Renders a message or error, with the option to self-clear itself
7
- *
8
- * @package Gravity PDF
9
- * @copyright Copyright (c) 2016, Blue Liquid Designs
10
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
11
- * @since 4.1
12
- */
13
-
14
- /*
15
- This file is part of Gravity PDF.
16
-
17
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
18
-
19
- This program is free software; you can redistribute it and/or modify
20
- it under the terms of the GNU General Public License as published by
21
- the Free Software Foundation; either version 2 of the License, or
22
- (at your option) any later version.
23
-
24
- This program is distributed in the hope that it will be useful,
25
- but WITHOUT ANY WARRANTY; without even the implied warranty of
26
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
- GNU General Public License for more details.
28
-
29
- You should have received a copy of the GNU General Public License
30
- along with this program; if not, write to the Free Software
31
- Found
32
- */
33
-
34
- /**
35
- * React Component
36
- *
37
- * @since 4.1
38
- */
39
- class showMessage extends React.Component {
40
- /**
41
- * Pass the "dismissable" prop to enable auto-clearing
42
- *
43
- * @returns {{delay: number, dismissable: boolean}}
44
- *
45
- * @since 4.1
46
- */
47
- static defaultProps = {
48
- delay: 4000,
49
- dismissable: false,
50
- };
51
-
52
- /**
53
- * @since 4.1
54
- */
55
- static propTypes = {
56
- text: PropTypes.string.isRequired,
57
- error: PropTypes.bool,
58
-
59
- delay: PropTypes.number,
60
- dismissable: PropTypes.bool,
61
- dismissableCallback: PropTypes.func,
62
- };
63
-
64
- /**
65
- * @returns {{visible: boolean}}
66
- *
67
- * @since 4.1
68
- */
69
- state = {
70
- visible: true
71
- };
72
-
73
- /**
74
- * Resets our state and timer when new props received
75
- *
76
- * @since 4.1
77
- */
78
- componentWillReceiveProps() {
79
- this.setState({ visible: true })
80
- this.shouldSetTimer()
81
- }
82
-
83
- /**
84
- * On mount, maybe set dismissable timer
85
- *
86
- * @since 4.1
87
- */
88
- componentDidMount() {
89
- this.shouldSetTimer()
90
- }
91
-
92
- /**
93
- * Check if we should make the message auto-dismissable
94
- *
95
- * @since 4.1
96
- */
97
- shouldSetTimer = () => {
98
- if (this.props.dismissable) {
99
- this.setTimer()
100
- }
101
- };
102
-
103
- /**
104
- * Slide message up after "X" milliseconds (see props.delay)
105
- * and triggers callback if passed in (see props.dismissableCallback)
106
- *
107
- * Also clears the initial timeout if called multiple times before removal
108
- *
109
- * @since 4.1
110
- */
111
- setTimer = () => {
112
- // clear any existing timer
113
- this._timer != null ? clearTimeout(this._timer) : null
114
-
115
- // hide after `delay` milliseconds
116
- this._timer = setTimeout(() => {
117
-
118
- $(this._message)
119
- .removeClass('inline')
120
- .slideUp(400, () => {
121
- $(this._message).removeAttr('style')
122
- this.setState({ visible: false })
123
- this._timer = null
124
-
125
- if(this.props.dismissableCallback) {
126
- this.props.dismissableCallback()
127
- }
128
- })
129
-
130
- }, this.props.delay)
131
- };
132
-
133
- /**
134
- * Clear timeout on unmount
135
- *
136
- * @since 4.1
137
- */
138
- componentWillUnmount() {
139
- if (this.props.dismissable) {
140
- clearTimeout(this._timer)
141
- }
142
- }
143
-
144
- /**
145
- * Renders our message or error
146
- *
147
- * @since 4.1
148
- */
149
- render() {
150
- const { text, error } = this.props
151
-
152
- let classes = 'notice inline'
153
-
154
- if (error) {
155
- classes = classes + ' error'
156
- }
157
-
158
- return this.state.visible ?
159
- (
160
- <div ref={(message) => this._message = message} className={classes}>
161
- <p>{text}</p>
162
- </div>
163
- ) : <div />
164
- }
165
- }
166
-
167
  export default showMessage
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react'
3
+ import $ from 'jquery'
4
+
5
+ /**
6
+ * Renders a message or error, with the option to self-clear itself
7
+ *
8
+ * @package Gravity PDF
9
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
10
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
11
+ * @since 4.1
12
+ */
13
+
14
+ /*
15
+ This file is part of Gravity PDF.
16
+
17
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
18
+
19
+ This program is free software; you can redistribute it and/or modify
20
+ it under the terms of the GNU General Public License as published by
21
+ the Free Software Foundation; either version 2 of the License, or
22
+ (at your option) any later version.
23
+
24
+ This program is distributed in the hope that it will be useful,
25
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
26
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
+ GNU General Public License for more details.
28
+
29
+ You should have received a copy of the GNU General Public License
30
+ along with this program; if not, write to the Free Software
31
+ Found
32
+ */
33
+
34
+ /**
35
+ * React Component
36
+ *
37
+ * @since 4.1
38
+ */
39
+ class showMessage extends React.Component {
40
+ /**
41
+ * Pass the "dismissable" prop to enable auto-clearing
42
+ *
43
+ * @returns {{delay: number, dismissable: boolean}}
44
+ *
45
+ * @since 4.1
46
+ */
47
+ static defaultProps = {
48
+ delay: 4000,
49
+ dismissable: false,
50
+ };
51
+
52
+ /**
53
+ * @since 4.1
54
+ */
55
+ static propTypes = {
56
+ text: PropTypes.string.isRequired,
57
+ error: PropTypes.bool,
58
+
59
+ delay: PropTypes.number,
60
+ dismissable: PropTypes.bool,
61
+ dismissableCallback: PropTypes.func,
62
+ };
63
+
64
+ /**
65
+ * @returns {{visible: boolean}}
66
+ *
67
+ * @since 4.1
68
+ */
69
+ state = {
70
+ visible: true
71
+ };
72
+
73
+ /**
74
+ * Resets our state and timer when new props received
75
+ *
76
+ * @since 4.1
77
+ */
78
+ componentWillReceiveProps() {
79
+ this.setState({ visible: true })
80
+ this.shouldSetTimer()
81
+ }
82
+
83
+ /**
84
+ * On mount, maybe set dismissable timer
85
+ *
86
+ * @since 4.1
87
+ */
88
+ componentDidMount() {
89
+ this.shouldSetTimer()
90
+ }
91
+
92
+ /**
93
+ * Check if we should make the message auto-dismissable
94
+ *
95
+ * @since 4.1
96
+ */
97
+ shouldSetTimer = () => {
98
+ if (this.props.dismissable) {
99
+ this.setTimer()
100
+ }
101
+ };
102
+
103
+ /**
104
+ * Slide message up after "X" milliseconds (see props.delay)
105
+ * and triggers callback if passed in (see props.dismissableCallback)
106
+ *
107
+ * Also clears the initial timeout if called multiple times before removal
108
+ *
109
+ * @since 4.1
110
+ */
111
+ setTimer = () => {
112
+ // clear any existing timer
113
+ this._timer != null ? clearTimeout(this._timer) : null
114
+
115
+ // hide after `delay` milliseconds
116
+ this._timer = setTimeout(() => {
117
+
118
+ $(this._message)
119
+ .removeClass('inline')
120
+ .slideUp(400, () => {
121
+ $(this._message).removeAttr('style')
122
+ this.setState({ visible: false })
123
+ this._timer = null
124
+
125
+ if(this.props.dismissableCallback) {
126
+ this.props.dismissableCallback()
127
+ }
128
+ })
129
+
130
+ }, this.props.delay)
131
+ };
132
+
133
+ /**
134
+ * Clear timeout on unmount
135
+ *
136
+ * @since 4.1
137
+ */
138
+ componentWillUnmount() {
139
+ if (this.props.dismissable) {
140
+ clearTimeout(this._timer)
141
+ }
142
+ }
143
+
144
+ /**
145
+ * Renders our message or error
146
+ *
147
+ * @since 4.1
148
+ */
149
+ render() {
150
+ const { text, error } = this.props
151
+
152
+ let classes = 'notice inline'
153
+
154
+ if (error) {
155
+ classes = classes + ' error'
156
+ }
157
+
158
+ return this.state.visible ?
159
+ (
160
+ <div ref={(message) => this._message = message} className={classes}>
161
+ <p>{text}</p>
162
+ </div>
163
+ ) : <div />
164
+ }
165
+ }
166
+
167
  export default showMessage
src/assets/js/react/components/TemplateActivateButton.js CHANGED
@@ -1,106 +1,106 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react'
3
- import { connect } from 'react-redux'
4
- import { selectTemplate } from '../actions/templates'
5
- import { withRouter } from 'react-router-dom'
6
-
7
- /**
8
- * Renders the button used to trigger the current active PDF template
9
- * On click it triggers our Redux action.
10
- *
11
- * @package Gravity PDF
12
- * @copyright Copyright (c) 2016, Blue Liquid Designs
13
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
14
- * @since 4.1
15
- */
16
-
17
- /*
18
- This file is part of Gravity PDF.
19
-
20
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
21
-
22
- This program is free software; you can redistribute it and/or modify
23
- it under the terms of the GNU General Public License as published by
24
- the Free Software Foundation; either version 2 of the License, or
25
- (at your option) any later version.
26
-
27
- This program is distributed in the hope that it will be useful,
28
- but WITHOUT ANY WARRANTY; without even the implied warranty of
29
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30
- GNU General Public License for more details.
31
-
32
- You should have received a copy of the GNU General Public License
33
- along with this program; if not, write to the Free Software
34
- Found
35
- */
36
-
37
- /**
38
- * React Component
39
- *
40
- * @since 4.1
41
- */
42
- export class TemplateActivateButton extends React.Component {
43
- /**
44
- * @since 4.1
45
- */
46
- static propTypes = {
47
- template: PropTypes.object,
48
- onTemplateSelect: PropTypes.func,
49
- buttonText: PropTypes.string,
50
- };
51
-
52
- /**
53
- * Update our route and trigger a Redux action to select the current template
54
- *
55
- * @param {Object} e Event
56
- *
57
- * @since 4.1
58
- */
59
- selectTemplate = (e) => {
60
- e.preventDefault()
61
- e.stopPropagation()
62
-
63
- this.props.history.push('')
64
- this.props.onTemplateSelect(this.props.template.get('id'))
65
- };
66
-
67
- /**
68
- * @since 4.1
69
- */
70
- render() {
71
- return (
72
- <a
73
- onClick={this.selectTemplate}
74
- href="#"
75
- tabIndex="150"
76
- className="button button-primary activate">
77
- {this.props.buttonText}
78
- </a>
79
- )
80
- }
81
- }
82
-
83
- /**
84
- * Map actions to props
85
- *
86
- * @param {func} dispatch Redux dispatcher
87
- *
88
- * @returns {{onTemplateSelect: (function(id=string))}}
89
- *
90
- * @since 4.1
91
- */
92
- const mapDispatchToProps = (dispatch) => {
93
- return {
94
- onTemplateSelect: (id) => {
95
- dispatch(selectTemplate(id))
96
- }
97
- }
98
- }
99
-
100
- /**
101
- * Maps our Redux store to our React component
102
- *
103
- * @since 4.1
104
- */
105
- export default withRouter(connect(null, mapDispatchToProps)(TemplateActivateButton))
106
-
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react'
3
+ import { connect } from 'react-redux'
4
+ import { selectTemplate } from '../actions/templates'
5
+ import { withRouter } from 'react-router-dom'
6
+
7
+ /**
8
+ * Renders the button used to trigger the current active PDF template
9
+ * On click it triggers our Redux action.
10
+ *
11
+ * @package Gravity PDF
12
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
13
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
14
+ * @since 4.1
15
+ */
16
+
17
+ /*
18
+ This file is part of Gravity PDF.
19
+
20
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
21
+
22
+ This program is free software; you can redistribute it and/or modify
23
+ it under the terms of the GNU General Public License as published by
24
+ the Free Software Foundation; either version 2 of the License, or
25
+ (at your option) any later version.
26
+
27
+ This program is distributed in the hope that it will be useful,
28
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
29
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30
+ GNU General Public License for more details.
31
+
32
+ You should have received a copy of the GNU General Public License
33
+ along with this program; if not, write to the Free Software
34
+ Found
35
+ */
36
+
37
+ /**
38
+ * React Component
39
+ *
40
+ * @since 4.1
41
+ */
42
+ export class TemplateActivateButton extends React.Component {
43
+ /**
44
+ * @since 4.1
45
+ */
46
+ static propTypes = {
47
+ template: PropTypes.object,
48
+ onTemplateSelect: PropTypes.func,
49
+ buttonText: PropTypes.string,
50
+ };
51
+
52
+ /**
53
+ * Update our route and trigger a Redux action to select the current template
54
+ *
55
+ * @param {Object} e Event
56
+ *
57
+ * @since 4.1
58
+ */
59
+ selectTemplate = (e) => {
60
+ e.preventDefault()
61
+ e.stopPropagation()
62
+
63
+ this.props.history.push('')
64
+ this.props.onTemplateSelect(this.props.template.get('id'))
65
+ };
66
+
67
+ /**
68
+ * @since 4.1
69
+ */
70
+ render() {
71
+ return (
72
+ <a
73
+ onClick={this.selectTemplate}
74
+ href="#"
75
+ tabIndex="150"
76
+ className="button button-primary activate">
77
+ {this.props.buttonText}
78
+ </a>
79
+ )
80
+ }
81
+ }
82
+
83
+ /**
84
+ * Map actions to props
85
+ *
86
+ * @param {func} dispatch Redux dispatcher
87
+ *
88
+ * @returns {{onTemplateSelect: (function(id=string))}}
89
+ *
90
+ * @since 4.1
91
+ */
92
+ const mapDispatchToProps = (dispatch) => {
93
+ return {
94
+ onTemplateSelect: (id) => {
95
+ dispatch(selectTemplate(id))
96
+ }
97
+ }
98
+ }
99
+
100
+ /**
101
+ * Maps our Redux store to our React component
102
+ *
103
+ * @since 4.1
104
+ */
105
+ export default withRouter(connect(null, mapDispatchToProps)(TemplateActivateButton))
106
+
src/assets/js/react/components/TemplateButton.js CHANGED
@@ -1,78 +1,78 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react'
3
-
4
- /**
5
- * Render the button used to option our Fancy PDF template selector
6
- *
7
- * @package Gravity PDF
8
- * @copyright Copyright (c) 2016, Blue Liquid Designs
9
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
10
- * @since 4.1
11
- */
12
-
13
- /*
14
- This file is part of Gravity PDF.
15
-
16
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
17
-
18
- This program is free software; you can redistribute it and/or modify
19
- it under the terms of the GNU General Public License as published by
20
- the Free Software Foundation; either version 2 of the License, or
21
- (at your option) any later version.
22
-
23
- This program is distributed in the hope that it will be useful,
24
- but WITHOUT ANY WARRANTY; without even the implied warranty of
25
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
- GNU General Public License for more details.
27
-
28
- You should have received a copy of the GNU General Public License
29
- along with this program; if not, write to the Free Software
30
- Found
31
- */
32
-
33
- /**
34
- * React Component
35
- *
36
- * @since 4.1
37
- */
38
- class TemplateButton extends React.Component {
39
- /**
40
- * @since 4.1
41
- */
42
- static propTypes = {
43
- buttonText: PropTypes.string,
44
- };
45
-
46
- /**
47
- * When the button is clicked we'll display the `/template` route
48
- *
49
- * @param {Object} e Event
50
- *
51
- * @since 4.1
52
- */
53
- handleClick = (e) => {
54
- e.preventDefault()
55
- e.stopPropagation()
56
-
57
- this.props.history.push('/template')
58
- };
59
-
60
- /**
61
- * @since 4.1
62
- */
63
- render() {
64
- return (
65
- <button
66
- type="button"
67
- id="fancy-template-selector"
68
- className="button gfpdf-button"
69
- onClick={this.handleClick}
70
- ref={node => this.button = node}
71
- >
72
- {this.props.buttonText}
73
- </button>
74
- )
75
- }
76
- }
77
-
78
  export default TemplateButton
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react'
3
+
4
+ /**
5
+ * Render the button used to option our Fancy PDF template selector
6
+ *
7
+ * @package Gravity PDF
8
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
9
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
10
+ * @since 4.1
11
+ */
12
+
13
+ /*
14
+ This file is part of Gravity PDF.
15
+
16
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
17
+
18
+ This program is free software; you can redistribute it and/or modify
19
+ it under the terms of the GNU General Public License as published by
20
+ the Free Software Foundation; either version 2 of the License, or
21
+ (at your option) any later version.
22
+
23
+ This program is distributed in the hope that it will be useful,
24
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
25
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
+ GNU General Public License for more details.
27
+
28
+ You should have received a copy of the GNU General Public License
29
+ along with this program; if not, write to the Free Software
30
+ Found
31
+ */
32
+
33
+ /**
34
+ * React Component
35
+ *
36
+ * @since 4.1
37
+ */
38
+ class TemplateButton extends React.Component {
39
+ /**
40
+ * @since 4.1
41
+ */
42
+ static propTypes = {
43
+ buttonText: PropTypes.string,
44
+ };
45
+
46
+ /**
47
+ * When the button is clicked we'll display the `/template` route
48
+ *
49
+ * @param {Object} e Event
50
+ *
51
+ * @since 4.1
52
+ */
53
+ handleClick = (e) => {
54
+ e.preventDefault()
55
+ e.stopPropagation()
56
+
57
+ this.props.history.push('/template')
58
+ };
59
+
60
+ /**
61
+ * @since 4.1
62
+ */
63
+ render() {
64
+ return (
65
+ <button
66
+ type="button"
67
+ id="fancy-template-selector"
68
+ className="button gfpdf-button"
69
+ onClick={this.handleClick}
70
+ ref={node => this.button = node}
71
+ >
72
+ {this.props.buttonText}
73
+ </button>
74
+ )
75
+ }
76
+ }
77
+
78
  export default TemplateButton
src/assets/js/react/components/TemplateCloseDialog.js CHANGED
@@ -1,105 +1,105 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react'
3
- import { withRouter } from 'react-router-dom'
4
-
5
- /**
6
- * Renders our close dialog element
7
- *
8
- * @package Gravity PDF
9
- * @copyright Copyright (c) 2016, Blue Liquid Designs
10
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
11
- * @since 4.1
12
- */
13
-
14
- /*
15
- This file is part of Gravity PDF.
16
-
17
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
18
-
19
- This program is free software; you can redistribute it and/or modify
20
- it under the terms of the GNU General Public License as published by
21
- the Free Software Foundation; either version 2 of the License, or
22
- (at your option) any later version.
23
-
24
- This program is distributed in the hope that it will be useful,
25
- but WITHOUT ANY WARRANTY; without even the implied warranty of
26
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
- GNU General Public License for more details.
28
-
29
- You should have received a copy of the GNU General Public License
30
- along with this program; if not, write to the Free Software
31
- Found
32
- */
33
-
34
- /**
35
- * React Component
36
- *
37
- * @since 4.1
38
- */
39
- export class TemplateCloseDialog extends React.Component {
40
- /**
41
- * @since 4.1
42
- */
43
- static propTypes = {
44
- closeRoute: PropTypes.string
45
- };
46
-
47
- /**
48
- * Assign keydown listener to document on mount
49
- *
50
- * @since 4.1
51
- */
52
- componentDidMount() {
53
- document.addEventListener('keydown', this.handleKeyPress, false)
54
- }
55
-
56
- /**
57
- * Remove keydown listener to document on mount
58
- *
59
- * @since 4.1
60
- */
61
- componentWillUnmount() {
62
- document.removeEventListener('keydown', this.handleKeyPress, false)
63
- }
64
-
65
- /**
66
- * Check if Escape key pressed and current event target isn't our search box,
67
- * or the search box is blank already
68
- *
69
- * @param {Object} e Event
70
- *
71
- * @since 4.1
72
- */
73
- handleKeyPress = (e) => {
74
- /* Escape Key */
75
- if (e.keyCode === 27 && (e.target.className !== 'wp-filter-search' || e.target.value === '')) {
76
- this.closeDialog()
77
- }
78
- };
79
-
80
- /**
81
- * @since 4.1
82
- */
83
- closeDialog = () => {
84
- /* trigger router */
85
- this.props.history.push(this.props.closeRoute || '/')
86
- };
87
-
88
- /**
89
- * @since 4.1
90
- */
91
- render() {
92
- return (
93
- <button
94
- className="close dashicons dashicons-no"
95
- tabIndex="142"
96
- onClick={this.closeDialog}
97
- onKeyDown={this.handleKeyPress}
98
- aria-label="close">
99
- <span className="screen-reader-text">Close dialog</span>
100
- </button>
101
- )
102
- }
103
- }
104
-
105
  export default withRouter(TemplateCloseDialog)
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react'
3
+ import { withRouter } from 'react-router-dom'
4
+
5
+ /**
6
+ * Renders our close dialog element
7
+ *
8
+ * @package Gravity PDF
9
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
10
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
11
+ * @since 4.1
12
+ */
13
+
14
+ /*
15
+ This file is part of Gravity PDF.
16
+
17
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
18
+
19
+ This program is free software; you can redistribute it and/or modify
20
+ it under the terms of the GNU General Public License as published by
21
+ the Free Software Foundation; either version 2 of the License, or
22
+ (at your option) any later version.
23
+
24
+ This program is distributed in the hope that it will be useful,
25
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
26
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
+ GNU General Public License for more details.
28
+
29
+ You should have received a copy of the GNU General Public License
30
+ along with this program; if not, write to the Free Software
31
+ Found
32
+ */
33
+
34
+ /**
35
+ * React Component
36
+ *
37
+ * @since 4.1
38
+ */
39
+ export class TemplateCloseDialog extends React.Component {
40
+ /**
41
+ * @since 4.1
42
+ */
43
+ static propTypes = {
44
+ closeRoute: PropTypes.string
45
+ };
46
+
47
+ /**
48
+ * Assign keydown listener to document on mount
49
+ *
50
+ * @since 4.1
51
+ */
52
+ componentDidMount() {
53
+ document.addEventListener('keydown', this.handleKeyPress, false)
54
+ }
55
+
56
+ /**
57
+ * Remove keydown listener to document on mount
58
+ *
59
+ * @since 4.1
60
+ */
61
+ componentWillUnmount() {
62
+ document.removeEventListener('keydown', this.handleKeyPress, false)
63
+ }
64
+
65
+ /**
66
+ * Check if Escape key pressed and current event target isn't our search box,
67
+ * or the search box is blank already
68
+ *
69
+ * @param {Object} e Event
70
+ *
71
+ * @since 4.1
72
+ */
73
+ handleKeyPress = (e) => {
74
+ /* Escape Key */
75
+ if (e.keyCode === 27 && (e.target.className !== 'wp-filter-search' || e.target.value === '')) {
76
+ this.closeDialog()
77
+ }
78
+ };
79
+
80
+ /**
81
+ * @since 4.1
82
+ */
83
+ closeDialog = () => {
84
+ /* trigger router */
85
+ this.props.history.push(this.props.closeRoute || '/')
86
+ };
87
+
88
+ /**
89
+ * @since 4.1
90
+ */
91
+ render() {
92
+ return (
93
+ <button
94
+ className="close dashicons dashicons-no"
95
+ tabIndex="142"
96
+ onClick={this.closeDialog}
97
+ onKeyDown={this.handleKeyPress}
98
+ aria-label="close">
99
+ <span className="screen-reader-text">Close dialog</span>
100
+ </button>
101
+ )
102
+ }
103
+ }
104
+
105
  export default withRouter(TemplateCloseDialog)
src/assets/js/react/components/TemplateContainer.js CHANGED
@@ -1,122 +1,122 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react'
3
- import TemplateCloseDialog from './TemplateCloseDialog'
4
-
5
- /**
6
- * Renders our Advanced Template Selector container which is shared amongst the components
7
- *
8
- * @package Gravity PDF
9
- * @copyright Copyright (c) 2016, Blue Liquid Designs
10
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
11
- * @since 4.1
12
- */
13
-
14
- /*
15
- This file is part of Gravity PDF.
16
-
17
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
18
-
19
- This program is free software; you can redistribute it and/or modify
20
- it under the terms of the GNU General Public License as published by
21
- the Free Software Foundation; either version 2 of the License, or
22
- (at your option) any later version.
23
-
24
- This program is distributed in the hope that it will be useful,
25
- but WITHOUT ANY WARRANTY; without even the implied warranty of
26
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
- GNU General Public License for more details.
28
-
29
- You should have received a copy of the GNU General Public License
30
- along with this program; if not, write to the Free Software
31
- Found
32
- */
33
-
34
- /**
35
- * React Component
36
- *
37
- * @since 4.1
38
- */
39
- class Container extends React.Component {
40
- /**
41
- * @since 4.1
42
- */
43
- static propTypes = {
44
- header: PropTypes.oneOfType([ PropTypes.string, PropTypes.element ]),
45
- footer: PropTypes.oneOfType([ PropTypes.string, PropTypes.element ]),
46
- children: PropTypes.node.isRequired,
47
- closeRoute: PropTypes.string,
48
- };
49
-
50
- /**
51
- * On mount, add focus event to document option on mount
52
- * Also, if focus isn't currently applied to the search box we'll apply it
53
- * to our container to help with tabbing between elements
54
- *
55
- * @since 4.1
56
- */
57
- componentDidMount() {
58
- document.addEventListener('focus', this.handleFocus, true)
59
-
60
- /* Add focus if not currently applied to search box */
61
- if (document.activeElement && document.activeElement.className !== 'wp-filter-search') {
62
- this.container.focus()
63
- }
64
- }
65
-
66
- /**
67
- * Cleanup our document event listeners
68
- *
69
- * @since 4.1
70
- */
71
- componentWillUnmount() {
72
- document.removeEventListener('focus', this.handleFocus, true)
73
- }
74
-
75
- /**
76
- * When a focus event is fired and it's not apart of any DOM elements in our
77
- * container we will focus the container instead. In most cases this keeps the focus from
78
- * jumping outside our Template Container and allows for better keyboard navigation.
79
- *
80
- * @param e
81
- *
82
- * @since 4.1
83
- */
84
- handleFocus = (e) => {
85
- if (!this.container.contains(e.target)) {
86
- e.stopPropagation()
87
- this.container.focus()
88
- }
89
- };
90
-
91
- /**
92
- * @since 4.1
93
- */
94
- render() {
95
- const header = this.props.header,
96
- footer = this.props.footer,
97
- children = this.props.children,
98
- closeRoute = this.props.closeRoute
99
-
100
- return (
101
- <div ref={node => this.container = node} tabIndex="140">
102
- <div className="backdrop theme-backdrop"></div>
103
- <div className="container theme-wrap">
104
- <div className="theme-header">
105
- {header}
106
- <TemplateCloseDialog closeRoute={closeRoute}/>
107
- </div>
108
-
109
- <div
110
- id="gfpdf-template-container"
111
- className="theme-about wp-clearfix theme-browser rendered">
112
- {children}
113
- </div>
114
-
115
- {footer}
116
- </div>
117
- </div>
118
- )
119
- }
120
- }
121
-
122
- export default Container
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react'
3
+ import TemplateCloseDialog from './TemplateCloseDialog'
4
+
5
+ /**
6
+ * Renders our Advanced Template Selector container which is shared amongst the components
7
+ *
8
+ * @package Gravity PDF
9
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
10
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
11
+ * @since 4.1
12
+ */
13
+
14
+ /*
15
+ This file is part of Gravity PDF.
16
+
17
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
18
+
19
+ This program is free software; you can redistribute it and/or modify
20
+ it under the terms of the GNU General Public License as published by
21
+ the Free Software Foundation; either version 2 of the License, or
22
+ (at your option) any later version.
23
+
24
+ This program is distributed in the hope that it will be useful,
25
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
26
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
+ GNU General Public License for more details.
28
+
29
+ You should have received a copy of the GNU General Public License
30
+ along with this program; if not, write to the Free Software
31
+ Found
32
+ */
33
+
34
+ /**
35
+ * React Component
36
+ *
37
+ * @since 4.1
38
+ */
39
+ class Container extends React.Component {
40
+ /**
41
+ * @since 4.1
42
+ */
43
+ static propTypes = {
44
+ header: PropTypes.oneOfType([ PropTypes.string, PropTypes.element ]),
45
+ footer: PropTypes.oneOfType([ PropTypes.string, PropTypes.element ]),
46
+ children: PropTypes.node.isRequired,
47
+ closeRoute: PropTypes.string,
48
+ };
49
+
50
+ /**
51
+ * On mount, add focus event to document option on mount
52
+ * Also, if focus isn't currently applied to the search box we'll apply it
53
+ * to our container to help with tabbing between elements
54
+ *
55
+ * @since 4.1
56
+ */
57
+ componentDidMount() {
58
+ document.addEventListener('focus', this.handleFocus, true)
59
+
60
+ /* Add focus if not currently applied to search box */
61
+ if (document.activeElement && document.activeElement.className !== 'wp-filter-search') {
62
+ this.container.focus()
63
+ }
64
+ }
65
+
66
+ /**
67
+ * Cleanup our document event listeners
68
+ *
69
+ * @since 4.1
70
+ */
71
+ componentWillUnmount() {
72
+ document.removeEventListener('focus', this.handleFocus, true)
73
+ }
74
+
75
+ /**
76
+ * When a focus event is fired and it's not apart of any DOM elements in our
77
+ * container we will focus the container instead. In most cases this keeps the focus from
78
+ * jumping outside our Template Container and allows for better keyboard navigation.
79
+ *
80
+ * @param e
81
+ *
82
+ * @since 4.1
83
+ */
84
+ handleFocus = (e) => {
85
+ if (!this.container.contains(e.target)) {
86
+ e.stopPropagation()
87
+ this.container.focus()
88
+ }
89
+ };
90
+
91
+ /**
92
+ * @since 4.1
93
+ */
94
+ render() {
95
+ const header = this.props.header,
96
+ footer = this.props.footer,
97
+ children = this.props.children,
98
+ closeRoute = this.props.closeRoute
99
+
100
+ return (
101
+ <div ref={node => this.container = node} tabIndex="140">
102
+ <div className="backdrop theme-backdrop"></div>
103
+ <div className="container theme-wrap">
104
+ <div className="theme-header">
105
+ {header}
106
+ <TemplateCloseDialog closeRoute={closeRoute}/>
107
+ </div>
108
+
109
+ <div
110
+ id="gfpdf-template-container"
111
+ className="theme-about wp-clearfix theme-browser rendered">
112
+ {children}
113
+ </div>
114
+
115
+ {footer}
116
+ </div>
117
+ </div>
118
+ )
119
+ }
120
+ }
121
+
122
+ export default Container
src/assets/js/react/components/TemplateDeleteButton.js CHANGED
@@ -1,153 +1,153 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react'
3
- import { connect } from 'react-redux'
4
- import { addTemplate, deleteTemplate } from '../actions/templates'
5
- import { withRouter } from 'react-router-dom'
6
- import request from 'superagent'
7
-
8
- /**
9
- * Renders a delete button which then queries our server and
10
- * removes the selected PDF template
11
- *
12
- * @package Gravity PDF
13
- * @copyright Copyright (c) 2016, Blue Liquid Designs
14
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
15
- * @since 4.1
16
- */
17
-
18
- /*
19
- This file is part of Gravity PDF.
20
-
21
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
22
-
23
- This program is free software; you can redistribute it and/or modify
24
- it under the terms of the GNU General Public License as published by
25
- the Free Software Foundation; either version 2 of the License, or
26
- (at your option) any later version.
27
-
28
- This program is distributed in the hope that it will be useful,
29
- but WITHOUT ANY WARRANTY; without even the implied warranty of
30
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31
- GNU General Public License for more details.
32
-
33
- You should have received a copy of the GNU General Public License
34
- along with this program; if not, write to the Free Software
35
- Found
36
- */
37
-
38
- /**
39
- * React Component
40
- *
41
- * @since 4.1
42
- */
43
- export class TemplateDeleteButton extends React.Component {
44
- /**
45
- * @since 4.1
46
- */
47
- static propTypes = {
48
- ajaxUrl: PropTypes.string,
49
- ajaxNonce: PropTypes.string,
50
-
51
- template: PropTypes.object,
52
- addTemplate: PropTypes.func,
53
- onTemplateDelete: PropTypes.func,
54
- callbackFunction: PropTypes.func,
55
-
56
- buttonText: PropTypes.string,
57
- templateConfirmDeleteText: PropTypes.string,
58
- templateDeleteErrorText: PropTypes.string,
59
- };
60
-
61
- /**
62
- * Display a confirmation window asking user to verify they want template deleted.
63
- *
64
- * Once verified, we make an AJAX call to the server requesting template to be deleted.
65
- *
66
- * Before we receive the response we remove the PDF template automatically and update the
67
- * URL to /template. If the AJAX call fails the PDF template gets restored to our list with
68
- * an appropriate error message (it feels snapper this way).
69
- *
70
- * @param {Object} e Event
71
- */
72
- deleteTemplate = (e) => {
73
- e.preventDefault()
74
- e.stopPropagation()
75
-
76
- if (window.confirm(this.props.templateConfirmDeleteText)) {
77
-
78
- const templateId = this.props.template.get('id')
79
-
80
- /* POST the PDF template to our endpoint for processing */
81
- request
82
- .post(this.props.ajaxUrl)
83
- .field('action', 'gfpdf_delete_template')
84
- .field('nonce', this.props.ajaxNonce)
85
- .field('id', templateId)
86
- .then(
87
- () => { /* success. Leave blank */},
88
- this.ajaxFailed
89
- )
90
-
91
- this.props.history.push('/template')
92
- this.props.onTemplateDelete(templateId)
93
- }
94
- };
95
-
96
- /**
97
- * If the server cannot delete the template we re-add the template to our list
98
- * and display an appropriate inline error message
99
- *
100
- * @since 4.1
101
- */
102
- ajaxFailed = () => {
103
- const errorTemplate = this.props.template.set('error', this.props.templateDeleteErrorText)
104
- this.props.addTemplate(errorTemplate)
105
- };
106
-
107
- /**
108
- * @since 4.1
109
- */
110
- render() {
111
-
112
- const callback = (this.props.callbackFunction) ? this.props.callbackFunction : this.deleteTemplate
113
-
114
- return (
115
- <a
116
- onClick={callback}
117
- href="#"
118
- tabIndex="150"
119
- className="button button-secondary delete-theme">
120
- {this.props.buttonText}
121
- </a>
122
- )
123
- }
124
- }
125
-
126
- /**
127
- * Map actions to props
128
- *
129
- * @param {func} dispatch Redux dispatcher
130
- *
131
- * @returns {{addTemplate: (function(template=Immutable List)), onTemplateDelete: (function(id=string))}}
132
- *
133
- * @since 4.1
134
- */
135
- const mapDispatchToProps = (dispatch) => {
136
- return {
137
- addTemplate: (template) => {
138
- dispatch(addTemplate(template))
139
- },
140
-
141
- onTemplateDelete: (id) => {
142
- dispatch(deleteTemplate(id))
143
- }
144
- }
145
- }
146
-
147
- /**
148
- * Maps our Redux store to our React component
149
- *
150
- * @since 4.1
151
- */
152
- export default withRouter(connect(null, mapDispatchToProps)(TemplateDeleteButton))
153
-
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react'
3
+ import { connect } from 'react-redux'
4
+ import { addTemplate, deleteTemplate } from '../actions/templates'
5
+ import { withRouter } from 'react-router-dom'
6
+ import request from 'superagent'
7
+
8
+ /**
9
+ * Renders a delete button which then queries our server and
10
+ * removes the selected PDF template
11
+ *
12
+ * @package Gravity PDF
13
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
14
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
15
+ * @since 4.1
16
+ */
17
+
18
+ /*
19
+ This file is part of Gravity PDF.
20
+
21
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
22
+
23
+ This program is free software; you can redistribute it and/or modify
24
+ it under the terms of the GNU General Public License as published by
25
+ the Free Software Foundation; either version 2 of the License, or
26
+ (at your option) any later version.
27
+
28
+ This program is distributed in the hope that it will be useful,
29
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
30
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31
+ GNU General Public License for more details.
32
+
33
+ You should have received a copy of the GNU General Public License
34
+ along with this program; if not, write to the Free Software
35
+ Found
36
+ */
37
+
38
+ /**
39
+ * React Component
40
+ *
41
+ * @since 4.1
42
+ */
43
+ export class TemplateDeleteButton extends React.Component {
44
+ /**
45
+ * @since 4.1
46
+ */
47
+ static propTypes = {
48
+ ajaxUrl: PropTypes.string,
49
+ ajaxNonce: PropTypes.string,
50
+
51
+ template: PropTypes.object,
52
+ addTemplate: PropTypes.func,
53
+ onTemplateDelete: PropTypes.func,
54
+ callbackFunction: PropTypes.func,
55
+
56
+ buttonText: PropTypes.string,
57
+ templateConfirmDeleteText: PropTypes.string,
58
+ templateDeleteErrorText: PropTypes.string,
59
+ };
60
+
61
+ /**
62
+ * Display a confirmation window asking user to verify they want template deleted.
63
+ *
64
+ * Once verified, we make an AJAX call to the server requesting template to be deleted.
65
+ *
66
+ * Before we receive the response we remove the PDF template automatically and update the
67
+ * URL to /template. If the AJAX call fails the PDF template gets restored to our list with
68
+ * an appropriate error message (it feels snapper this way).
69
+ *
70
+ * @param {Object} e Event
71
+ */
72
+ deleteTemplate = (e) => {
73
+ e.preventDefault()
74
+ e.stopPropagation()
75
+
76
+ if (window.confirm(this.props.templateConfirmDeleteText)) {
77
+
78
+ const templateId = this.props.template.get('id')
79
+
80
+ /* POST the PDF template to our endpoint for processing */
81
+ request
82
+ .post(this.props.ajaxUrl)
83
+ .field('action', 'gfpdf_delete_template')
84
+ .field('nonce', this.props.ajaxNonce)
85
+ .field('id', templateId)
86
+ .then(
87
+ () => { /* success. Leave blank */},
88
+ this.ajaxFailed
89
+ )
90
+
91
+ this.props.history.push('/template')
92
+ this.props.onTemplateDelete(templateId)
93
+ }
94
+ };
95
+
96
+ /**
97
+ * If the server cannot delete the template we re-add the template to our list
98
+ * and display an appropriate inline error message
99
+ *
100
+ * @since 4.1
101
+ */
102
+ ajaxFailed = () => {
103
+ const errorTemplate = this.props.template.set('error', this.props.templateDeleteErrorText)
104
+ this.props.addTemplate(errorTemplate)
105
+ };
106
+
107
+ /**
108
+ * @since 4.1
109
+ */
110
+ render() {
111
+
112
+ const callback = (this.props.callbackFunction) ? this.props.callbackFunction : this.deleteTemplate
113
+
114
+ return (
115
+ <a
116
+ onClick={callback}
117
+ href="#"
118
+ tabIndex="150"
119
+ className="button button-secondary delete-theme">
120
+ {this.props.buttonText}
121
+ </a>
122
+ )
123
+ }
124
+ }
125
+
126
+ /**
127
+ * Map actions to props
128
+ *
129
+ * @param {func} dispatch Redux dispatcher
130
+ *
131
+ * @returns {{addTemplate: (function(template=Immutable List)), onTemplateDelete: (function(id=string))}}
132
+ *
133
+ * @since 4.1
134
+ */
135
+ const mapDispatchToProps = (dispatch) => {
136
+ return {
137
+ addTemplate: (template) => {
138
+ dispatch(addTemplate(template))
139
+ },
140
+
141
+ onTemplateDelete: (id) => {
142
+ dispatch(deleteTemplate(id))
143
+ }
144
+ }
145
+ }
146
+
147
+ /**
148
+ * Maps our Redux store to our React component
149
+ *
150
+ * @since 4.1
151
+ */
152
+ export default withRouter(connect(null, mapDispatchToProps)(TemplateDeleteButton))
153
+
src/assets/js/react/components/TemplateFooterActions.js CHANGED
@@ -1,106 +1,106 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react'
3
- import TemplateActivateButton from './TemplateActivateButton'
4
- import TemplateDeleteButton from './TemplateDeleteButton'
5
-
6
- /**
7
- * Renders the template footer actions that get displayed on the
8
- * /template/:id pages.
9
- *
10
- * @package Gravity PDF
11
- * @copyright Copyright (c) 2016, Blue Liquid Designs
12
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
13
- * @since 4.1
14
- */
15
-
16
- /*
17
- This file is part of Gravity PDF.
18
-
19
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
20
-
21
- This program is free software; you can redistribute it and/or modify
22
- it under the terms of the GNU General Public License as published by
23
- the Free Software Foundation; either version 2 of the License, or
24
- (at your option) any later version.
25
-
26
- This program is distributed in the hope that it will be useful,
27
- but WITHOUT ANY WARRANTY; without even the implied warranty of
28
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29
- GNU General Public License for more details.
30
-
31
- You should have received a copy of the GNU General Public License
32
- along with this program; if not, write to the Free Software
33
- Found
34
- */
35
-
36
- /**
37
- * React Component
38
- *
39
- * @since 4.1
40
- */
41
- class TemplateFooterActions extends React.Component {
42
- /**
43
- * @since 4.1
44
- */
45
- static propTypes = {
46
- template: PropTypes.object.isRequired,
47
- isActiveTemplate: PropTypes.bool,
48
-
49
- ajaxUrl: PropTypes.string,
50
- ajaxNonce: PropTypes.string,
51
-
52
- activateText: PropTypes.string,
53
- pdfWorkingDirPath: PropTypes.string,
54
- templateDeleteText: PropTypes.string,
55
- templateConfirmDeleteText: PropTypes.string,
56
- templateDeleteErrorText: PropTypes.string,
57
- };
58
-
59
- /**
60
- * Check if the current PDF template is a core template or not (i.e is shipped with Gravity PDF)
61
- *
62
- * @param {Object} template Immutable Map
63
- *
64
- * @returns {boolean}
65
- *
66
- * @since 4.1
67
- */
68
- notCoreTemplate = (template) => {
69
- return template.get('path').indexOf(this.props.pdfWorkingDirPath) !== -1
70
- };
71
-
72
- /**
73
- * @since 4.1
74
- */
75
- render() {
76
- const template = this.props.template
77
- const isCompatible = template.get('compatible')
78
-
79
- return (
80
- <div className="theme-actions">
81
- {!this.props.isActiveTemplate && isCompatible ?
82
- <TemplateActivateButton
83
- template={template}
84
- buttonText={this.props.activateText}/>
85
- : null
86
- }
87
-
88
- {!this.props.isActiveTemplate && this.notCoreTemplate(template) ?
89
- <TemplateDeleteButton
90
- template={template}
91
-
92
- ajaxUrl={this.props.ajaxUrl}
93
- ajaxNonce={this.props.ajaxNonce}
94
-
95
- buttonText={this.props.templateDeleteText}
96
- templateConfirmDeleteText={this.props.templateConfirmDeleteText}
97
- templateDeleteErrorText={this.props.templateDeleteErrorText}/>
98
- : null
99
- }
100
- </div>
101
- )
102
- }
103
- }
104
-
105
- export default TemplateFooterActions
106
-
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react'
3
+ import TemplateActivateButton from './TemplateActivateButton'
4
+ import TemplateDeleteButton from './TemplateDeleteButton'
5
+
6
+ /**
7
+ * Renders the template footer actions that get displayed on the
8
+ * /template/:id pages.
9
+ *
10
+ * @package Gravity PDF
11
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
12
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
13
+ * @since 4.1
14
+ */
15
+
16
+ /*
17
+ This file is part of Gravity PDF.
18
+
19
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
20
+
21
+ This program is free software; you can redistribute it and/or modify
22
+ it under the terms of the GNU General Public License as published by
23
+ the Free Software Foundation; either version 2 of the License, or
24
+ (at your option) any later version.
25
+
26
+ This program is distributed in the hope that it will be useful,
27
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
28
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29
+ GNU General Public License for more details.
30
+
31
+ You should have received a copy of the GNU General Public License
32
+ along with this program; if not, write to the Free Software
33
+ Found
34
+ */
35
+
36
+ /**
37
+ * React Component
38
+ *
39
+ * @since 4.1
40
+ */
41
+ class TemplateFooterActions extends React.Component {
42
+ /**
43
+ * @since 4.1
44
+ */
45
+ static propTypes = {
46
+ template: PropTypes.object.isRequired,
47
+ isActiveTemplate: PropTypes.bool,
48
+
49
+ ajaxUrl: PropTypes.string,
50
+ ajaxNonce: PropTypes.string,
51
+
52
+ activateText: PropTypes.string,
53
+ pdfWorkingDirPath: PropTypes.string,
54
+ templateDeleteText: PropTypes.string,
55
+ templateConfirmDeleteText: PropTypes.string,
56
+ templateDeleteErrorText: PropTypes.string,
57
+ };
58
+
59
+ /**
60
+ * Check if the current PDF template is a core template or not (i.e is shipped with Gravity PDF)
61
+ *
62
+ * @param {Object} template Immutable Map
63
+ *
64
+ * @returns {boolean}
65
+ *
66
+ * @since 4.1
67
+ */
68
+ notCoreTemplate = (template) => {
69
+ return template.get('path').indexOf(this.props.pdfWorkingDirPath) !== -1
70
+ };
71
+
72
+ /**
73
+ * @since 4.1
74
+ */
75
+ render() {
76
+ const template = this.props.template
77
+ const isCompatible = template.get('compatible')
78
+
79
+ return (
80
+ <div className="theme-actions">
81
+ {!this.props.isActiveTemplate && isCompatible ?
82
+ <TemplateActivateButton
83
+ template={template}
84
+ buttonText={this.props.activateText}/>
85
+ : null
86
+ }
87
+
88
+ {!this.props.isActiveTemplate && this.notCoreTemplate(template) ?
89
+ <TemplateDeleteButton
90
+ template={template}
91
+
92
+ ajaxUrl={this.props.ajaxUrl}
93
+ ajaxNonce={this.props.ajaxNonce}
94
+
95
+ buttonText={this.props.templateDeleteText}
96
+ templateConfirmDeleteText={this.props.templateConfirmDeleteText}
97
+ templateDeleteErrorText={this.props.templateDeleteErrorText}/>
98
+ : null
99
+ }
100
+ </div>
101
+ )
102
+ }
103
+ }
104
+
105
+ export default TemplateFooterActions
106
+
src/assets/js/react/components/TemplateHeaderNavigation.js CHANGED
@@ -1,210 +1,210 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react'
3
- import { connect } from 'react-redux'
4
- import { withRouter } from 'react-router-dom'
5
- import { List } from 'immutable'
6
-
7
- /**
8
- * Renders the template navigation header that get displayed on the
9
- * /template/:id pages.
10
- *
11
- * @package Gravity PDF
12
- * @copyright Copyright (c) 2016, Blue Liquid Designs
13
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
14
- * @since 4.1
15
- */
16
-
17
- /*
18
- This file is part of Gravity PDF.
19
-
20
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
21
-
22
- This program is free software; you can redistribute it and/or modify
23
- it under the terms of the GNU General Public License as published by
24
- the Free Software Foundation; either version 2 of the License, or
25
- (at your option) any later version.
26
-
27
- This program is distributed in the hope that it will be useful,
28
- but WITHOUT ANY WARRANTY; without even the implied warranty of
29
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30
- GNU General Public License for more details.
31
-
32
- You should have received a copy of the GNU General Public License
33
- along with this program; if not, write to the Free Software
34
- Found
35
- */
36
-
37
- /**
38
- * React Component
39
- *
40
- * @since 4.1
41
- */
42
- export class TemplateHeaderNavigation extends React.Component {
43
- /**
44
- * @since 4.1
45
- */
46
- static propTypes = {
47
- templates: PropTypes.object.isRequired,
48
- templateIndex: PropTypes.number.isRequired,
49
- isFirst: PropTypes.bool,
50
- isLast: PropTypes.bool,
51
-
52
- showPreviousTemplateText: PropTypes.string,
53
- showNextTemplateText: PropTypes.string
54
- };
55
-
56
- /**
57
- * Add window event listeners
58
- *
59
- * @since 4.1
60
- */
61
- componentDidMount() {
62
- window.addEventListener('keydown', this.handleKeyPress, false)
63
- }
64
-
65
- /**
66
- * Cleanup window event listeners
67
- *
68
- * @since 4.1
69
- */
70
- componentWillUnmount() {
71
- window.removeEventListener('keydown', this.handleKeyPress, false)
72
- }
73
-
74
- /**
75
- * Attempt to get the previous template in our Immutable list and update the URL
76
- *
77
- * @param {Object} e Event
78
- *
79
- * @since 4.1
80
- */
81
- previousTemplate = (e) => {
82
- e.preventDefault()
83
- e.stopPropagation()
84
-
85
- const prevId = this.props.templates.get(this.props.templateIndex - 1).get('id')
86
-
87
- if (prevId) {
88
- this.props.history.push('/template/' + prevId)
89
- }
90
- };
91
-
92
- /**
93
- * Attempt to get the next template in our Immutable list and update the URL
94
- *
95
- * @param {Object} e Event
96
- *
97
- * @since 4.1
98
- */
99
- nextTemplate = (e) => {
100
- e.preventDefault()
101
- e.stopPropagation()
102
-
103
- const nextId = this.props.templates.get(this.props.templateIndex + 1).get('id')
104
-
105
- if (nextId) {
106
- this.props.history.push('/template/' + nextId)
107
- }
108
- };
109
-
110
- /**
111
- * Checks if the Left or Right arrow keys are pressed and fires appropriate functions
112
- *
113
- * @param {Object} e Event
114
- *
115
- * @since 4.1
116
- */
117
- handleKeyPress = (e) => {
118
- /* Left Arrow */
119
- if (!this.props.isFirst && e.keyCode === 37) {
120
- this.previousTemplate(e)
121
- }
122
-
123
- /* Right Arrow */
124
- if (!this.props.isLast && e.keyCode === 39) {
125
- this.nextTemplate(e)
126
- }
127
- };
128
-
129
- /**
130
- * @since 4.1
131
- */
132
- render() {
133
-
134
- /*
135
- * Work our the correct classes and attributes for our left and right arrows
136
- * based on if we are currently showing the first or last templates
137
- */
138
- const isFirst = this.props.isFirst
139
- const isLast = this.props.isLast
140
-
141
- let baseClass = List([ 'dashicons', 'dashicons-no' ])
142
-
143
- let prevClass = baseClass.push('left')
144
- let nextClass = baseClass.push('right')
145
- prevClass = (isFirst) ? prevClass.push('disabled') : prevClass
146
- nextClass = (isLast) ? nextClass.push('disabled') : nextClass
147
-
148
- let leftDisabled = (isFirst) ? 'disabled' : ''
149
- let rightDisabled = (isLast) ? 'disabled' : ''
150
-
151
- return (
152
- <span>
153
- <button
154
- onClick={this.previousTemplate}
155
- onKeyDown={this.handleKeyPress}
156
- className={prevClass.join(' ')}
157
- tabIndex="141"
158
- disabled={leftDisabled}>
159
- <span
160
- className="screen-reader-text">
161
- {this.props.showPreviousTemplateText}
162
- </span>
163
- </button>
164
-
165
- <button
166
- onClick={this.nextTemplate}
167
- onKeyDown={this.handleKeyPress}
168
- className={nextClass.join(' ')}
169
- tabIndex="141"
170
- disabled={rightDisabled}>
171
- <span
172
- className="screen-reader-text">
173
- {this.props.showNextTemplateText}
174
- </span>
175
- </button>
176
- </span>
177
- )
178
- }
179
- }
180
-
181
- /**
182
- * Map state to props
183
- *
184
- * @param {Object} state The current Redux State
185
- * @param {Object} props The current React props
186
- *
187
- * @returns {{isFirst: boolean, isLast: boolean}}
188
- *
189
- * @since 4.1
190
- */
191
- const MapStateToProps = (state, props) => {
192
- /* Check if the current template is the first or last in our templates */
193
- const templates = props.templates
194
- const currentTemplateId = props.template.get('id')
195
- const first = templates.first().get('id')
196
- const last = templates.last().get('id')
197
-
198
- return {
199
- isFirst: first === currentTemplateId,
200
- isLast: last === currentTemplateId,
201
- }
202
- }
203
-
204
- /**
205
- * Maps our Redux store to our React component
206
- *
207
- * @since 4.1
208
- */
209
- export default withRouter(connect(MapStateToProps)(TemplateHeaderNavigation))
210
-
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react'
3
+ import { connect } from 'react-redux'
4
+ import { withRouter } from 'react-router-dom'
5
+ import { List } from 'immutable'
6
+
7
+ /**
8
+ * Renders the template navigation header that get displayed on the
9
+ * /template/:id pages.
10
+ *
11
+ * @package Gravity PDF
12
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
13
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
14
+ * @since 4.1
15
+ */
16
+
17
+ /*
18
+ This file is part of Gravity PDF.
19
+
20
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
21
+
22
+ This program is free software; you can redistribute it and/or modify
23
+ it under the terms of the GNU General Public License as published by
24
+ the Free Software Foundation; either version 2 of the License, or
25
+ (at your option) any later version.
26
+
27
+ This program is distributed in the hope that it will be useful,
28
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
29
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30
+ GNU General Public License for more details.
31
+
32
+ You should have received a copy of the GNU General Public License
33
+ along with this program; if not, write to the Free Software
34
+ Found
35
+ */
36
+
37
+ /**
38
+ * React Component
39
+ *
40
+ * @since 4.1
41
+ */
42
+ export class TemplateHeaderNavigation extends React.Component {
43
+ /**
44
+ * @since 4.1
45
+ */
46
+ static propTypes = {
47
+ templates: PropTypes.object.isRequired,
48
+ templateIndex: PropTypes.number.isRequired,
49
+ isFirst: PropTypes.bool,
50
+ isLast: PropTypes.bool,
51
+
52
+ showPreviousTemplateText: PropTypes.string,
53
+ showNextTemplateText: PropTypes.string
54
+ };
55
+
56
+ /**
57
+ * Add window event listeners
58
+ *
59
+ * @since 4.1
60
+ */
61
+ componentDidMount() {
62
+ window.addEventListener('keydown', this.handleKeyPress, false)
63
+ }
64
+
65
+ /**
66
+ * Cleanup window event listeners
67
+ *
68
+ * @since 4.1
69
+ */
70
+ componentWillUnmount() {
71
+ window.removeEventListener('keydown', this.handleKeyPress, false)
72
+ }
73
+
74
+ /**
75
+ * Attempt to get the previous template in our Immutable list and update the URL
76
+ *
77
+ * @param {Object} e Event
78
+ *
79
+ * @since 4.1
80
+ */
81
+ previousTemplate = (e) => {
82
+ e.preventDefault()
83
+ e.stopPropagation()
84
+
85
+ const prevId = this.props.templates.get(this.props.templateIndex - 1).get('id')
86
+
87
+ if (prevId) {
88
+ this.props.history.push('/template/' + prevId)
89
+ }
90
+ };
91
+
92
+ /**
93
+ * Attempt to get the next template in our Immutable list and update the URL
94
+ *
95
+ * @param {Object} e Event
96
+ *
97
+ * @since 4.1
98
+ */
99
+ nextTemplate = (e) => {
100
+ e.preventDefault()
101
+ e.stopPropagation()
102
+
103
+ const nextId = this.props.templates.get(this.props.templateIndex + 1).get('id')
104
+
105
+ if (nextId) {
106
+ this.props.history.push('/template/' + nextId)
107
+ }
108
+ };
109
+
110
+ /**
111
+ * Checks if the Left or Right arrow keys are pressed and fires appropriate functions
112
+ *
113
+ * @param {Object} e Event
114
+ *
115
+ * @since 4.1
116
+ */
117
+ handleKeyPress = (e) => {
118
+ /* Left Arrow */
119
+ if (!this.props.isFirst && e.keyCode === 37) {
120
+ this.previousTemplate(e)
121
+ }
122
+
123
+ /* Right Arrow */
124
+ if (!this.props.isLast && e.keyCode === 39) {
125
+ this.nextTemplate(e)
126
+ }
127
+ };
128
+
129
+ /**
130
+ * @since 4.1
131
+ */
132
+ render() {
133
+
134
+ /*
135
+ * Work our the correct classes and attributes for our left and right arrows
136
+ * based on if we are currently showing the first or last templates
137
+ */
138
+ const isFirst = this.props.isFirst
139
+ const isLast = this.props.isLast
140
+
141
+ let baseClass = List([ 'dashicons', 'dashicons-no' ])
142
+
143
+ let prevClass = baseClass.push('left')
144
+ let nextClass = baseClass.push('right')
145
+ prevClass = (isFirst) ? prevClass.push('disabled') : prevClass
146
+ nextClass = (isLast) ? nextClass.push('disabled') : nextClass
147
+
148
+ let leftDisabled = (isFirst) ? 'disabled' : ''
149
+ let rightDisabled = (isLast) ? 'disabled' : ''
150
+
151
+ return (
152
+ <span>
153
+ <button
154
+ onClick={this.previousTemplate}
155
+ onKeyDown={this.handleKeyPress}
156
+ className={prevClass.join(' ')}
157
+ tabIndex="141"
158
+ disabled={leftDisabled}>
159
+ <span
160
+ className="screen-reader-text">
161
+ {this.props.showPreviousTemplateText}
162
+ </span>
163
+ </button>
164
+
165
+ <button
166
+ onClick={this.nextTemplate}
167
+ onKeyDown={this.handleKeyPress}
168
+ className={nextClass.join(' ')}
169
+ tabIndex="141"
170
+ disabled={rightDisabled}>
171
+ <span
172
+ className="screen-reader-text">
173
+ {this.props.showNextTemplateText}
174
+ </span>
175
+ </button>
176
+ </span>
177
+ )
178
+ }
179
+ }
180
+
181
+ /**
182
+ * Map state to props
183
+ *
184
+ * @param {Object} state The current Redux State
185
+ * @param {Object} props The current React props
186
+ *
187
+ * @returns {{isFirst: boolean, isLast: boolean}}
188
+ *
189
+ * @since 4.1
190
+ */
191
+ const MapStateToProps = (state, props) => {
192
+ /* Check if the current template is the first or last in our templates */
193
+ const templates = props.templates
194
+ const currentTemplateId = props.template.get('id')
195
+ const first = templates.first().get('id')
196
+ const last = templates.last().get('id')
197
+
198
+ return {
199
+ isFirst: first === currentTemplateId,
200
+ isLast: last === currentTemplateId,
201
+ }
202
+ }
203
+
204
+ /**
205
+ * Maps our Redux store to our React component
206
+ *
207
+ * @since 4.1
208
+ */
209
+ export default withRouter(connect(MapStateToProps)(TemplateHeaderNavigation))
210
+
src/assets/js/react/components/TemplateHeaderTitle.js CHANGED
@@ -1,49 +1,49 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react'
3
-
4
- /**
5
- * Renders the Template Header Title
6
- *
7
- * @package Gravity PDF
8
- * @copyright Copyright (c) 2016, Blue Liquid Designs
9
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
10
- * @since 4.1
11
- */
12
-
13
- /*
14
- This file is part of Gravity PDF.
15
-
16
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
17
-
18
- This program is free software; you can redistribute it and/or modify
19
- it under the terms of the GNU General Public License as published by
20
- the Free Software Foundation; either version 2 of the License, or
21
- (at your option) any later version.
22
-
23
- This program is distributed in the hope that it will be useful,
24
- but WITHOUT ANY WARRANTY; without even the implied warranty of
25
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
- GNU General Public License for more details.
27
-
28
- You should have received a copy of the GNU General Public License
29
- along with this program; if not, write to the Free Software
30
- Found
31
- */
32
-
33
- /**
34
- * React Component
35
- *
36
- * @since 4.1
37
- */
38
- const TemplateHeaderTitle = ({ header }) => (
39
- <h1>{header}</h1>
40
- )
41
-
42
- /**
43
- * @since 4.1
44
- */
45
- TemplateHeaderTitle.propTypes = {
46
- header: PropTypes.string
47
- }
48
-
49
  export default TemplateHeaderTitle
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react'
3
+
4
+ /**
5
+ * Renders the Template Header Title
6
+ *
7
+ * @package Gravity PDF
8
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
9
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
10
+ * @since 4.1
11
+ */
12
+
13
+ /*
14
+ This file is part of Gravity PDF.
15
+
16
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
17
+
18
+ This program is free software; you can redistribute it and/or modify
19
+ it under the terms of the GNU General Public License as published by
20
+ the Free Software Foundation; either version 2 of the License, or
21
+ (at your option) any later version.
22
+
23
+ This program is distributed in the hope that it will be useful,
24
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
25
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
+ GNU General Public License for more details.
27
+
28
+ You should have received a copy of the GNU General Public License
29
+ along with this program; if not, write to the Free Software
30
+ Found
31
+ */
32
+
33
+ /**
34
+ * React Component
35
+ *
36
+ * @since 4.1
37
+ */
38
+ const TemplateHeaderTitle = ({ header }) => (
39
+ <h1>{header}</h1>
40
+ )
41
+
42
+ /**
43
+ * @since 4.1
44
+ */
45
+ TemplateHeaderTitle.propTypes = {
46
+ header: PropTypes.string
47
+ }
48
+
49
  export default TemplateHeaderTitle
src/assets/js/react/components/TemplateList.js CHANGED
@@ -1,115 +1,115 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react'
3
- import { connect } from 'react-redux'
4
-
5
- import getTemplates from '../selectors/getTemplates'
6
-
7
- import TemplateContainer from './TemplateContainer'
8
- import TemplateListItem from './TemplateListItem'
9
- import TemplateSearch from './TemplateSearch'
10
- import TemplateHeaderTitle from './TemplateHeaderTitle'
11
- import TemplateUploader from './TemplateUploader'
12
-
13
- /**
14
- * The master component for rendering the all PDF templates as a list
15
- *
16
- * @package Gravity PDF
17
- * @copyright Copyright (c) 2016, Blue Liquid Designs
18
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
19
- * @since 4.1
20
- */
21
-
22
- /*
23
- This file is part of Gravity PDF.
24
-
25
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
26
-
27
- This program is free software; you can redistribute it and/or modify
28
- it under the terms of the GNU General Public License as published by
29
- the Free Software Foundation; either version 2 of the License, or
30
- (at your option) any later version.
31
-
32
- This program is distributed in the hope that it will be useful,
33
- but WITHOUT ANY WARRANTY; without even the implied warranty of
34
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35
- GNU General Public License for more details.
36
-
37
- You should have received a copy of the GNU General Public License
38
- along with this program; if not, write to the Free Software
39
- Found
40
- */
41
-
42
- /**
43
- * React Component
44
- *
45
- * @since 4.1
46
- */
47
- export class TemplateList extends React.Component {
48
- /**
49
- * @since 4.1
50
- */
51
- static propTypes = {
52
- templates: PropTypes.object,
53
- route: PropTypes.object
54
- };
55
-
56
- /**
57
- * @since 4.1
58
- */
59
- render () {
60
- const header = <TemplateHeaderTitle header={this.props.templateHeaderText}/>
61
-
62
- return (
63
- <TemplateContainer header={header} closeRoute="/">
64
- <TemplateSearch />
65
- <div>
66
- {
67
- this.props.templates.map((value, index) => {
68
- return <TemplateListItem
69
- key={index}
70
- template={value}
71
- templateDetailsText={this.props.templateDetailsText}
72
- activateText={this.props.activateText}/>
73
- })
74
- }
75
-
76
- <TemplateUploader
77
- ajaxUrl={this.props.ajaxUrl}
78
- ajaxNonce={this.props.ajaxNonce}
79
- addTemplateText={this.props.addTemplateText}
80
- genericUploadErrorText={this.props.genericUploadErrorText}
81
- filenameErrorText={this.props.filenameErrorText}
82
- filesizeErrorText={this.props.filesizeErrorText}
83
- installSuccessText={this.props.installSuccessText}
84
- installUpdatedText={this.props.installUpdatedText}
85
- templateSuccessfullyInstalledUpdated={this.props.templateSuccessfullyInstalledUpdated}
86
- templateInstallInstructions={this.props.templateInstallInstructions}
87
- />
88
-
89
- </div>
90
- </TemplateContainer>
91
- )
92
- }
93
- }
94
-
95
- /**
96
- * Map state to props
97
- *
98
- * @param {Object} state The current Redux State
99
- *
100
- * @returns {{templates}}
101
- *
102
- * @since 4.1
103
- */
104
- const mapStateToProps = (state) => {
105
- return {
106
- templates: getTemplates(state)
107
- }
108
- }
109
-
110
- /**
111
- * Maps our Redux store to our React component
112
- *
113
- * @since 4.1
114
- */
115
  export default connect(mapStateToProps)(TemplateList)
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react'
3
+ import { connect } from 'react-redux'
4
+
5
+ import getTemplates from '../selectors/getTemplates'
6
+
7
+ import TemplateContainer from './TemplateContainer'
8
+ import TemplateListItem from './TemplateListItem'
9
+ import TemplateSearch from './TemplateSearch'
10
+ import TemplateHeaderTitle from './TemplateHeaderTitle'
11
+ import TemplateUploader from './TemplateUploader'
12
+
13
+ /**
14
+ * The master component for rendering the all PDF templates as a list
15
+ *
16
+ * @package Gravity PDF
17
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
18
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
19
+ * @since 4.1
20
+ */
21
+
22
+ /*
23
+ This file is part of Gravity PDF.
24
+
25
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
26
+
27
+ This program is free software; you can redistribute it and/or modify
28
+ it under the terms of the GNU General Public License as published by
29
+ the Free Software Foundation; either version 2 of the License, or
30
+ (at your option) any later version.
31
+
32
+ This program is distributed in the hope that it will be useful,
33
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
34
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35
+ GNU General Public License for more details.
36
+
37
+ You should have received a copy of the GNU General Public License
38
+ along with this program; if not, write to the Free Software
39
+ Found
40
+ */
41
+
42
+ /**
43
+ * React Component
44
+ *
45
+ * @since 4.1
46
+ */
47
+ export class TemplateList extends React.Component {
48
+ /**
49
+ * @since 4.1
50
+ */
51
+ static propTypes = {
52
+ templates: PropTypes.object,
53
+ route: PropTypes.object
54
+ };
55
+
56
+ /**
57
+ * @since 4.1
58
+ */
59
+ render () {
60
+ const header = <TemplateHeaderTitle header={this.props.templateHeaderText}/>
61
+
62
+ return (
63
+ <TemplateContainer header={header} closeRoute="/">
64
+ <TemplateSearch />
65
+ <div>
66
+ {
67
+ this.props.templates.map((value, index) => {
68
+ return <TemplateListItem
69
+ key={index}
70
+ template={value}
71
+ templateDetailsText={this.props.templateDetailsText}
72
+ activateText={this.props.activateText}/>
73
+ })
74
+ }
75
+
76
+ <TemplateUploader
77
+ ajaxUrl={this.props.ajaxUrl}
78
+ ajaxNonce={this.props.ajaxNonce}
79
+ addTemplateText={this.props.addTemplateText}
80
+ genericUploadErrorText={this.props.genericUploadErrorText}
81
+ filenameErrorText={this.props.filenameErrorText}
82
+ filesizeErrorText={this.props.filesizeErrorText}
83
+ installSuccessText={this.props.installSuccessText}
84
+ installUpdatedText={this.props.installUpdatedText}
85
+ templateSuccessfullyInstalledUpdated={this.props.templateSuccessfullyInstalledUpdated}
86
+ templateInstallInstructions={this.props.templateInstallInstructions}
87
+ />
88
+
89
+ </div>
90
+ </TemplateContainer>
91
+ )
92
+ }
93
+ }
94
+
95
+ /**
96
+ * Map state to props
97
+ *
98
+ * @param {Object} state The current Redux State
99
+ *
100
+ * @returns {{templates}}
101
+ *
102
+ * @since 4.1
103
+ */
104
+ const mapStateToProps = (state) => {
105
+ return {
106
+ templates: getTemplates(state)
107
+ }
108
+ }
109
+
110
+ /**
111
+ * Maps our Redux store to our React component
112
+ *
113
+ * @since 4.1
114
+ */
115
  export default connect(mapStateToProps)(TemplateList)
src/assets/js/react/components/TemplateListItem.js CHANGED
@@ -1,170 +1,170 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react'
3
- import { connect } from 'react-redux'
4
- import { withRouter } from 'react-router-dom'
5
- import { updateTemplateParam } from '../actions/templates'
6
-
7
- import TemplateScreenshot from './TemplateScreenshot'
8
- import ShowMessage from './ShowMessage'
9
-
10
- import {
11
- TemplateDetails,
12
- Group
13
- } from './TemplateListItemComponents'
14
-
15
- import { Name } from './TemplateSingleComponents'
16
- import TemplateActivateButton from './TemplateActivateButton'
17
-
18
- /**
19
- * Display the individual template item for usage our template list
20
- *
21
- * @package Gravity PDF
22
- * @copyright Copyright (c) 2016, Blue Liquid Designs
23
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
24
- * @since 4.1
25
- */
26
-
27
- /*
28
- This file is part of Gravity PDF.
29
-
30
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
31
-
32
- This program is free software; you can redistribute it and/or modify
33
- it under the terms of the GNU General Public License as published by
34
- the Free Software Foundation; either version 2 of the License, or
35
- (at your option) any later version.
36
-
37
- This program is distributed in the hope that it will be useful,
38
- but WITHOUT ANY WARRANTY; without even the implied warranty of
39
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40
- GNU General Public License for more details.
41
-
42
- You should have received a copy of the GNU General Public License
43
- along with this program; if not, write to the Free Software
44
- Found
45
- */
46
-
47
- /**
48
- * React Component
49
- *
50
- * @since 4.1
51
- */
52
- export class TemplateListItem extends React.Component {
53
- /**
54
- * @since 4.1
55
- */
56
- static propTypes = {
57
- template: PropTypes.object,
58
-
59
- activeTemplate: PropTypes.string,
60
- updateTemplateParam: PropTypes.func,
61
-
62
- activateText: PropTypes.string,
63
- templateDetailsText: PropTypes.string,
64
- };
65
-
66
- /**
67
- * Check if the Enter key is pressed and not focused on a button
68
- * then display the template details page
69
- *
70
- * @param {Object} e Event
71
- *
72
- * @since 4.1
73
- */
74
- maybeShowDetailedTemplate = (e) => {
75
- /* Show detailed template when the Enter key is pressed and the active element doesn't include a 'button' class */
76
- if (e.keyCode === 13 && (e.target.className.indexOf('button') === -1)) {
77
- this.showDetailedTemplate()
78
- }
79
- };
80
-
81
- /**
82
- * Update the URL to show the PDF template details page
83
- *
84
- * @since 4.1
85
- */
86
- showDetailedTemplate = () => {
87
- this.props.history.push('/template/' + this.props.template.get('id'))
88
- };
89
-
90
- /**
91
- * Call Redux action to remove any stored messages for this template
92
- *
93
- * @since 4.1
94
- */
95
- removeMessage = () => {
96
- this.props.updateTemplateParam(this.props.template.get('id'), 'message', null)
97
- };
98
-
99
- /**
100
- * @since 4.1
101
- */
102
- render() {
103
- const item = this.props.template
104
- const isActiveTemplate = this.props.activeTemplate === item.get('id')
105
- const isCompatible = item.get('compatible')
106
- const activeTemplate = (isActiveTemplate) ? 'active theme' : 'theme'
107
-
108
- return (
109
- <div
110
- onClick={this.showDetailedTemplate}
111
- onKeyDown={this.maybeShowDetailedTemplate}
112
- className={activeTemplate}
113
- data-slug={item.get('id')}
114
- tabIndex="150">
115
-
116
- <TemplateScreenshot image={item.get('screenshot')}/>
117
- {item.get('error') ? <ShowMessage text={item.get('error')} error={true}/> : null}
118
- {item.get('message') ? <ShowMessage text={item.get('message')} dismissableCallback={this.removeMessage} dismissable={true} delay={12000} /> : null}
119
-
120
- <TemplateDetails label={this.props.templateDetailsText} />
121
- <Group group={item.get('group')}/>
122
- <Name name={item.get('template')}/>
123
-
124
- <div className="theme-actions">
125
- {!isActiveTemplate && isCompatible ?
126
- <TemplateActivateButton template={this.props.template} buttonText={this.props.activateText}/> : null}
127
- </div>
128
- </div>
129
- )
130
- }
131
- }
132
-
133
- /**
134
- * Map state to props
135
- *
136
- * @param {Object} state The current Redux State
137
- *
138
- * @returns {{activeTemplate: string}}
139
- *
140
- * @since 4.1
141
- */
142
- const mapStateToProps = (state) => {
143
- return {
144
- activeTemplate: state.template.activeTemplate
145
- }
146
- }
147
-
148
- /**
149
- * Map actions to props
150
- *
151
- * @param {func} dispatch Redux dispatcher
152
- *
153
- * @returns {{updateTemplateParam: (function(id=string, name=string, value=string))}}
154
- *
155
- * @since 4.1
156
- */
157
- const mapDispatchToProps = (dispatch) => {
158
- return {
159
- updateTemplateParam: (id, name, value) => {
160
- dispatch(updateTemplateParam(id, name, value))
161
- }
162
- }
163
- }
164
-
165
- /**
166
- * Maps our Redux store to our React component
167
- *
168
- * @since 4.1
169
- */
170
  export default withRouter(connect(mapStateToProps, mapDispatchToProps)(TemplateListItem))
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react'
3
+ import { connect } from 'react-redux'
4
+ import { withRouter } from 'react-router-dom'
5
+ import { updateTemplateParam } from '../actions/templates'
6
+
7
+ import TemplateScreenshot from './TemplateScreenshot'
8
+ import ShowMessage from './ShowMessage'
9
+
10
+ import {
11
+ TemplateDetails,
12
+ Group
13
+ } from './TemplateListItemComponents'
14
+
15
+ import { Name } from './TemplateSingleComponents'
16
+ import TemplateActivateButton from './TemplateActivateButton'
17
+
18
+ /**
19
+ * Display the individual template item for usage our template list
20
+ *
21
+ * @package Gravity PDF
22
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
23
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
24
+ * @since 4.1
25
+ */
26
+
27
+ /*
28
+ This file is part of Gravity PDF.
29
+
30
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
31
+
32
+ This program is free software; you can redistribute it and/or modify
33
+ it under the terms of the GNU General Public License as published by
34
+ the Free Software Foundation; either version 2 of the License, or
35
+ (at your option) any later version.
36
+
37
+ This program is distributed in the hope that it will be useful,
38
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
39
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40
+ GNU General Public License for more details.
41
+
42
+ You should have received a copy of the GNU General Public License
43
+ along with this program; if not, write to the Free Software
44
+ Found
45
+ */
46
+
47
+ /**
48
+ * React Component
49
+ *
50
+ * @since 4.1
51
+ */
52
+ export class TemplateListItem extends React.Component {
53
+ /**
54
+ * @since 4.1
55
+ */
56
+ static propTypes = {
57
+ template: PropTypes.object,
58
+
59
+ activeTemplate: PropTypes.string,
60
+ updateTemplateParam: PropTypes.func,
61
+
62
+ activateText: PropTypes.string,
63
+ templateDetailsText: PropTypes.string,
64
+ };
65
+
66
+ /**
67
+ * Check if the Enter key is pressed and not focused on a button
68
+ * then display the template details page
69
+ *
70
+ * @param {Object} e Event
71
+ *
72
+ * @since 4.1
73
+ */
74
+ maybeShowDetailedTemplate = (e) => {
75
+ /* Show detailed template when the Enter key is pressed and the active element doesn't include a 'button' class */
76
+ if (e.keyCode === 13 && (e.target.className.indexOf('button') === -1)) {
77
+ this.showDetailedTemplate()
78
+ }
79
+ };
80
+
81
+ /**
82
+ * Update the URL to show the PDF template details page
83
+ *
84
+ * @since 4.1
85
+ */
86
+ showDetailedTemplate = () => {
87
+ this.props.history.push('/template/' + this.props.template.get('id'))
88
+ };
89
+
90
+ /**
91
+ * Call Redux action to remove any stored messages for this template
92
+ *
93
+ * @since 4.1
94
+ */
95
+ removeMessage = () => {
96
+ this.props.updateTemplateParam(this.props.template.get('id'), 'message', null)
97
+ };
98
+
99
+ /**
100
+ * @since 4.1
101
+ */
102
+ render() {
103
+ const item = this.props.template
104
+ const isActiveTemplate = this.props.activeTemplate === item.get('id')
105
+ const isCompatible = item.get('compatible')
106
+ const activeTemplate = (isActiveTemplate) ? 'active theme' : 'theme'
107
+
108
+ return (
109
+ <div
110
+ onClick={this.showDetailedTemplate}
111
+ onKeyDown={this.maybeShowDetailedTemplate}
112
+ className={activeTemplate}
113
+ data-slug={item.get('id')}
114
+ tabIndex="150">
115
+
116
+ <TemplateScreenshot image={item.get('screenshot')}/>
117
+ {item.get('error') ? <ShowMessage text={item.get('error')} error={true}/> : null}
118
+ {item.get('message') ? <ShowMessage text={item.get('message')} dismissableCallback={this.removeMessage} dismissable={true} delay={12000} /> : null}
119
+
120
+ <TemplateDetails label={this.props.templateDetailsText} />
121
+ <Group group={item.get('group')}/>
122
+ <Name name={item.get('template')}/>
123
+
124
+ <div className="theme-actions">
125
+ {!isActiveTemplate && isCompatible ?
126
+ <TemplateActivateButton template={this.props.template} buttonText={this.props.activateText}/> : null}
127
+ </div>
128
+ </div>
129
+ )
130
+ }
131
+ }
132
+
133
+ /**
134
+ * Map state to props
135
+ *
136
+ * @param {Object} state The current Redux State
137
+ *
138
+ * @returns {{activeTemplate: string}}
139
+ *
140
+ * @since 4.1
141
+ */
142
+ const mapStateToProps = (state) => {
143
+ return {
144
+ activeTemplate: state.template.activeTemplate
145
+ }
146
+ }
147
+
148
+ /**
149
+ * Map actions to props
150
+ *
151
+ * @param {func} dispatch Redux dispatcher
152
+ *
153
+ * @returns {{updateTemplateParam: (function(id=string, name=string, value=string))}}
154
+ *
155
+ * @since 4.1
156
+ */
157
+ const mapDispatchToProps = (dispatch) => {
158
+ return {
159
+ updateTemplateParam: (id, name, value) => {
160
+ dispatch(updateTemplateParam(id, name, value))
161
+ }
162
+ }
163
+ }
164
+
165
+ /**
166
+ * Maps our Redux store to our React component
167
+ *
168
+ * @since 4.1
169
+ */
170
  export default withRouter(connect(mapStateToProps, mapDispatchToProps)(TemplateListItem))
src/assets/js/react/components/TemplateListItemComponents.js CHANGED
@@ -1,61 +1,61 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react'
3
-
4
- /**
5
- * Contains stateless React components for our Template List Items
6
- *
7
- * @package Gravity PDF
8
- * @copyright Copyright (c) 2016, Blue Liquid Designs
9
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
10
- * @since 4.1
11
- */
12
-
13
- /*
14
- This file is part of Gravity PDF.
15
-
16
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
17
-
18
- This program is free software; you can redistribute it and/or modify
19
- it under the terms of the GNU General Public License as published by
20
- the Free Software Foundation; either version 2 of the License, or
21
- (at your option) any later version.
22
-
23
- This program is distributed in the hope that it will be useful,
24
- but WITHOUT ANY WARRANTY; without even the implied warranty of
25
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
- GNU General Public License for more details.
27
-
28
- You should have received a copy of the GNU General Public License
29
- along with this program; if not, write to the Free Software
30
- Found
31
- */
32
-
33
- /**
34
- * React Stateless Component
35
- *
36
- * Display the Template Details hover
37
- *
38
- * @since 4.1
39
- */
40
- export const TemplateDetails = ({ label }) => (
41
- <span className="more-details">{label}</span>
42
- )
43
-
44
- TemplateDetails.propTypes = {
45
- name: PropTypes.string,
46
- }
47
-
48
- /**
49
- * React Stateless Component
50
- *
51
- * Display the template group
52
- *
53
- * @since 4.1
54
- */
55
- export const Group = ({ group }) => (
56
- <p className="theme-author">{group}</p>
57
- )
58
-
59
- Group.propTypes = {
60
- group: PropTypes.string,
61
  }
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react'
3
+
4
+ /**
5
+ * Contains stateless React components for our Template List Items
6
+ *
7
+ * @package Gravity PDF
8
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
9
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
10
+ * @since 4.1
11
+ */
12
+
13
+ /*
14
+ This file is part of Gravity PDF.
15
+
16
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
17
+
18
+ This program is free software; you can redistribute it and/or modify
19
+ it under the terms of the GNU General Public License as published by
20
+ the Free Software Foundation; either version 2 of the License, or
21
+ (at your option) any later version.
22
+
23
+ This program is distributed in the hope that it will be useful,
24
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
25
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
+ GNU General Public License for more details.
27
+
28
+ You should have received a copy of the GNU General Public License
29
+ along with this program; if not, write to the Free Software
30
+ Found
31
+ */
32
+
33
+ /**
34
+ * React Stateless Component
35
+ *
36
+ * Display the Template Details hover
37
+ *
38
+ * @since 4.1
39
+ */
40
+ export const TemplateDetails = ({ label }) => (
41
+ <span className="more-details">{label}</span>
42
+ )
43
+
44
+ TemplateDetails.propTypes = {
45
+ name: PropTypes.string,
46
+ }
47
+
48
+ /**
49
+ * React Stateless Component
50
+ *
51
+ * Display the template group
52
+ *
53
+ * @since 4.1
54
+ */
55
+ export const Group = ({ group }) => (
56
+ <p className="theme-author">{group}</p>
57
+ )
58
+
59
+ Group.propTypes = {
60
+ group: PropTypes.string,
61
  }
src/assets/js/react/components/TemplateScreenshot.js CHANGED
@@ -1,52 +1,52 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react'
3
-
4
- /**
5
- * Display the Template Screenshot for the List Items
6
- *
7
- * @package Gravity PDF
8
- * @copyright Copyright (c) 2016, Blue Liquid Designs
9
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
10
- * @since 4.1
11
- */
12
-
13
- /*
14
- This file is part of Gravity PDF.
15
-
16
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
17
-
18
- This program is free software; you can redistribute it and/or modify
19
- it under the terms of the GNU General Public License as published by
20
- the Free Software Foundation; either version 2 of the License, or
21
- (at your option) any later version.
22
-
23
- This program is distributed in the hope that it will be useful,
24
- but WITHOUT ANY WARRANTY; without even the implied warranty of
25
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
- GNU General Public License for more details.
27
-
28
- You should have received a copy of the GNU General Public License
29
- along with this program; if not, write to the Free Software
30
- Found
31
- */
32
-
33
- /**
34
- * React Stateless Component
35
- *
36
- * @since 4.1
37
- */
38
- const TemplateScreenshot = ({ image }) => {
39
- const className = (image) ? 'theme-screenshot' : 'theme-screenshot blank'
40
-
41
- return (
42
- <div className={className}>
43
- {image ? <img src={image} alt=""/> : null}
44
- </div>
45
- )
46
- }
47
-
48
- TemplateScreenshot.propTypes = {
49
- image: PropTypes.string
50
- }
51
-
52
  export default TemplateScreenshot
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react'
3
+
4
+ /**
5
+ * Display the Template Screenshot for the List Items
6
+ *
7
+ * @package Gravity PDF
8
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
9
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
10
+ * @since 4.1
11
+ */
12
+
13
+ /*
14
+ This file is part of Gravity PDF.
15
+
16
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
17
+
18
+ This program is free software; you can redistribute it and/or modify
19
+ it under the terms of the GNU General Public License as published by
20
+ the Free Software Foundation; either version 2 of the License, or
21
+ (at your option) any later version.
22
+
23
+ This program is distributed in the hope that it will be useful,
24
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
25
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
+ GNU General Public License for more details.
27
+
28
+ You should have received a copy of the GNU General Public License
29
+ along with this program; if not, write to the Free Software
30
+ Found
31
+ */
32
+
33
+ /**
34
+ * React Stateless Component
35
+ *
36
+ * @since 4.1
37
+ */
38
+ const TemplateScreenshot = ({ image }) => {
39
+ const className = (image) ? 'theme-screenshot' : 'theme-screenshot blank'
40
+
41
+ return (
42
+ <div className={className}>
43
+ {image ? <img src={image} alt=""/> : null}
44
+ </div>
45
+ )
46
+ }
47
+
48
+ TemplateScreenshot.propTypes = {
49
+ image: PropTypes.string
50
+ }
51
+
52
  export default TemplateScreenshot
src/assets/js/react/components/TemplateScreenshots.js CHANGED
@@ -1,54 +1,54 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react'
3
-
4
- /**
5
- * Display the Template Screenshot for the individual templates (uses different markup - out of our control)
6
- *
7
- * @package Gravity PDF
8
- * @copyright Copyright (c) 2016, Blue Liquid Designs
9
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
10
- * @since 4.1
11
- */
12
-
13
- /*
14
- This file is part of Gravity PDF.
15
-
16
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
17
-
18
- This program is free software; you can redistribute it and/or modify
19
- it under the terms of the GNU General Public License as published by
20
- the Free Software Foundation; either version 2 of the License, or
21
- (at your option) any later version.
22
-
23
- This program is distributed in the hope that it will be useful,
24
- but WITHOUT ANY WARRANTY; without even the implied warranty of
25
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
- GNU General Public License for more details.
27
-
28
- You should have received a copy of the GNU General Public License
29
- along with this program; if not, write to the Free Software
30
- Found
31
- */
32
-
33
- /**
34
- * React Stateless Component
35
- *
36
- * @since 4.1
37
- */
38
- const TemplateScreenshots = ({ image }) => {
39
- const className = (image) ? 'screenshot' : 'screenshot blank'
40
-
41
- return (
42
- <div className="theme-screenshots">
43
- <div className={className}>
44
- {image ? <img src={image} alt=""/> : null}
45
- </div>
46
- </div>
47
- )
48
- }
49
-
50
- TemplateScreenshots.propTypes = {
51
- image: PropTypes.string
52
- }
53
-
54
  export default TemplateScreenshots
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react'
3
+
4
+ /**
5
+ * Display the Template Screenshot for the individual templates (uses different markup - out of our control)
6
+ *
7
+ * @package Gravity PDF
8
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
9
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
10
+ * @since 4.1
11
+ */
12
+
13
+ /*
14
+ This file is part of Gravity PDF.
15
+
16
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
17
+
18
+ This program is free software; you can redistribute it and/or modify
19
+ it under the terms of the GNU General Public License as published by
20
+ the Free Software Foundation; either version 2 of the License, or
21
+ (at your option) any later version.
22
+
23
+ This program is distributed in the hope that it will be useful,
24
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
25
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
+ GNU General Public License for more details.
27
+
28
+ You should have received a copy of the GNU General Public License
29
+ along with this program; if not, write to the Free Software
30
+ Found
31
+ */
32
+
33
+ /**
34
+ * React Stateless Component
35
+ *
36
+ * @since 4.1
37
+ */
38
+ const TemplateScreenshots = ({ image }) => {
39
+ const className = (image) ? 'screenshot' : 'screenshot blank'
40
+
41
+ return (
42
+ <div className="theme-screenshots">
43
+ <div className={className}>
44
+ {image ? <img src={image} alt=""/> : null}
45
+ </div>
46
+ </div>
47
+ )
48
+ }
49
+
50
+ TemplateScreenshots.propTypes = {
51
+ image: PropTypes.string
52
+ }
53
+
54
  export default TemplateScreenshots
src/assets/js/react/components/TemplateSearch.js CHANGED
@@ -1,155 +1,155 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react'
3
- import { connect } from 'react-redux'
4
- import debounce from 'lodash.debounce'
5
-
6
- import { searchTemplates } from '../actions/templates'
7
-
8
- /**
9
- * Handles the PDF template search functionality
10
- *
11
- * @package Gravity PDF
12
- * @copyright Copyright (c) 2016, Blue Liquid Designs
13
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
14
- * @since 4.1
15
- */
16
-
17
- /*
18
- This file is part of Gravity PDF.
19
-
20
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
21
-
22
- This program is free software; you can redistribute it and/or modify
23
- it under the terms of the GNU General Public License as published by
24
- the Free Software Foundation; either version 2 of the License, or
25
- (at your option) any later version.
26
-
27
- This program is distributed in the hope that it will be useful,
28
- but WITHOUT ANY WARRANTY; without even the implied warranty of
29
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30
- GNU General Public License for more details.
31
-
32
- You should have received a copy of the GNU General Public License
33
- along with this program; if not, write to the Free Software
34
- Found
35
- */
36
-
37
- /**
38
- * React Component
39
- *
40
- * @since 4.1
41
- */
42
- export class TemplateSearch extends React.Component {
43
- /**
44
- * @since 4.1
45
- */
46
- static propTypes = {
47
- onSearch: PropTypes.func,
48
- search: PropTypes.string
49
- };
50
-
51
- /**
52
- * Debounce our runSearch function so it can only be run once every 200 milliseconds
53
- *
54
- * @since 4.1
55
- */
56
- componentWillMount() {
57
- this.runSearch = debounce(this.runSearch, 200)
58
- }
59
-
60
- /**
61
- * On mount, add focus to the search box
62
- *
63
- * @since 4.1
64
- */
65
- componentDidMount() {
66
- /* add focus to element */
67
- this.input.focus()
68
- }
69
-
70
- /**
71
- * Handles our search event
72
- *
73
- * Because ReactJS pools SyntheticEvent and we delay the search with debounce we need
74
- * to ensure the event is persisted (see https://facebook.github.io/react/docs/events.html#event-pooling)
75
- *
76
- * @param {Object} e Event
77
- *
78
- * @since 4.1
79
- */
80
- handleSearch = (e) => {
81
- e.persist()
82
- this.runSearch(e)
83
- };
84
-
85
- /**
86
- * Update our Redux store with the search value
87
- *
88
- * @param {Object} e Event
89
- *
90
- * @since 4.1
91
- */
92
- runSearch = (e) => {
93
- this.props.onSearch(e.target.value || '')
94
- };
95
-
96
- /**
97
- * @since 4.1
98
- */
99
- render() {
100
- return (
101
- <div>
102
- <input
103
- className="wp-filter-search"
104
- id="wp-filter-search-input"
105
- ref={node => this.input = node}
106
- placeholder="Search Installed Templates"
107
- type="search"
108
- aria-describedby="live-search-desc"
109
- tabIndex="145"
110
- onChange={this.handleSearch}
111
- defaultValue={this.props.search}
112
- />
113
- </div>
114
- )
115
- }
116
- }
117
-
118
- /**
119
- * Map state to props
120
- *
121
- * @param {Object} state The current Redux State
122
- *
123
- * @returns {{search: string}}
124
- *
125
- * @since 4.1
126
- */
127
- const mapStateToProps = (state) => {
128
- return {
129
- search: state.template.search
130
- }
131
- }
132
-
133
- /**
134
- * Map actions to props
135
- *
136
- * @param {func} dispatch Redux dispatcher
137
- *
138
- * @returns {{onSearch: (function(text=string))}}
139
- *
140
- * @since 4.1
141
- */
142
- const mapDispatchToProps = (dispatch) => {
143
- return {
144
- onSearch: (text) => {
145
- dispatch(searchTemplates(text))
146
- }
147
- }
148
- }
149
-
150
- /**
151
- * Maps our Redux store to our React component
152
- *
153
- * @since 4.1
154
- */
155
  export default connect(mapStateToProps, mapDispatchToProps)(TemplateSearch)
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react'
3
+ import { connect } from 'react-redux'
4
+ import debounce from 'lodash.debounce'
5
+
6
+ import { searchTemplates } from '../actions/templates'
7
+
8
+ /**
9
+ * Handles the PDF template search functionality
10
+ *
11
+ * @package Gravity PDF
12
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
13
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
14
+ * @since 4.1
15
+ */
16
+
17
+ /*
18
+ This file is part of Gravity PDF.
19
+
20
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
21
+
22
+ This program is free software; you can redistribute it and/or modify
23
+ it under the terms of the GNU General Public License as published by
24
+ the Free Software Foundation; either version 2 of the License, or
25
+ (at your option) any later version.
26
+
27
+ This program is distributed in the hope that it will be useful,
28
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
29
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30
+ GNU General Public License for more details.
31
+
32
+ You should have received a copy of the GNU General Public License
33
+ along with this program; if not, write to the Free Software
34
+ Found
35
+ */
36
+
37
+ /**
38
+ * React Component
39
+ *
40
+ * @since 4.1
41
+ */
42
+ export class TemplateSearch extends React.Component {
43
+ /**
44
+ * @since 4.1
45
+ */
46
+ static propTypes = {
47
+ onSearch: PropTypes.func,
48
+ search: PropTypes.string
49
+ };
50
+
51
+ /**
52
+ * Debounce our runSearch function so it can only be run once every 200 milliseconds
53
+ *
54
+ * @since 4.1
55
+ */
56
+ componentWillMount() {
57
+ this.runSearch = debounce(this.runSearch, 200)
58
+ }
59
+
60
+ /**
61
+ * On mount, add focus to the search box
62
+ *
63
+ * @since 4.1
64
+ */
65
+ componentDidMount() {
66
+ /* add focus to element */
67
+ this.input.focus()
68
+ }
69
+
70
+ /**
71
+ * Handles our search event
72
+ *
73
+ * Because ReactJS pools SyntheticEvent and we delay the search with debounce we need
74
+ * to ensure the event is persisted (see https://facebook.github.io/react/docs/events.html#event-pooling)
75
+ *
76
+ * @param {Object} e Event
77
+ *
78
+ * @since 4.1
79
+ */
80
+ handleSearch = (e) => {
81
+ e.persist()
82
+ this.runSearch(e)
83
+ };
84
+
85
+ /**
86
+ * Update our Redux store with the search value
87
+ *
88
+ * @param {Object} e Event
89
+ *
90
+ * @since 4.1
91
+ */
92
+ runSearch = (e) => {
93
+ this.props.onSearch(e.target.value || '')
94
+ };
95
+
96
+ /**
97
+ * @since 4.1
98
+ */
99
+ render() {
100
+ return (
101
+ <div>
102
+ <input
103
+ className="wp-filter-search"
104
+ id="wp-filter-search-input"
105
+ ref={node => this.input = node}
106
+ placeholder="Search Installed Templates"
107
+ type="search"
108
+ aria-describedby="live-search-desc"
109
+ tabIndex="145"
110
+ onChange={this.handleSearch}
111
+ defaultValue={this.props.search}
112
+ />
113
+ </div>
114
+ )
115
+ }
116
+ }
117
+
118
+ /**
119
+ * Map state to props
120
+ *
121
+ * @param {Object} state The current Redux State
122
+ *
123
+ * @returns {{search: string}}
124
+ *
125
+ * @since 4.1
126
+ */
127
+ const mapStateToProps = (state) => {
128
+ return {
129
+ search: state.template.search
130
+ }
131
+ }
132
+
133
+ /**
134
+ * Map actions to props
135
+ *
136
+ * @param {func} dispatch Redux dispatcher
137
+ *
138
+ * @returns {{onSearch: (function(text=string))}}
139
+ *
140
+ * @since 4.1
141
+ */
142
+ const mapDispatchToProps = (dispatch) => {
143
+ return {
144
+ onSearch: (text) => {
145
+ dispatch(searchTemplates(text))
146
+ }
147
+ }
148
+ }
149
+
150
+ /**
151
+ * Maps our Redux store to our React component
152
+ *
153
+ * @since 4.1
154
+ */
155
  export default connect(mapStateToProps, mapDispatchToProps)(TemplateSearch)
src/assets/js/react/components/TemplateSingle.js CHANGED
@@ -1,174 +1,174 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react'
3
- import { connect } from 'react-redux'
4
-
5
- import getTemplates from '../selectors/getTemplates'
6
-
7
- import TemplateContainer from './TemplateContainer'
8
- import TemplateHeaderNavigation from './TemplateHeaderNavigation'
9
- import TemplateFooterActions from './TemplateFooterActions'
10
- import TemplateScreenshots from './TemplateScreenshots'
11
- import ShowMessage from './ShowMessage'
12
-
13
- import {
14
- CurrentTemplate,
15
- Name,
16
- Author,
17
- Group,
18
- Description,
19
- Tags
20
- } from './TemplateSingleComponents'
21
-
22
- /**
23
- * Renders a single PDF template, which get displayed on the /template/:id page.
24
- *
25
- * @package Gravity PDF
26
- * @copyright Copyright (c) 2016, Blue Liquid Designs
27
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
28
- * @since 4.1
29
- */
30
-
31
- /*
32
- This file is part of Gravity PDF.
33
-
34
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
35
-
36
- This program is free software; you can redistribute it and/or modify
37
- it under the terms of the GNU General Public License as published by
38
- the Free Software Foundation; either version 2 of the License, or
39
- (at your option) any later version.
40
-
41
- This program is distributed in the hope that it will be useful,
42
- but WITHOUT ANY WARRANTY; without even the implied warranty of
43
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44
- GNU General Public License for more details.
45
-
46
- You should have received a copy of the GNU General Public License
47
- along with this program; if not, write to the Free Software
48
- Found
49
- */
50
-
51
- /**
52
- * React Component
53
- *
54
- * @since 4.1
55
- */
56
- export class TemplateSingle extends React.Component {
57
- /**
58
- * @since 4.1
59
- */
60
- static propTypes = {
61
- route: PropTypes.object,
62
-
63
- template: PropTypes.object,
64
- activeTemplate: PropTypes.string,
65
- templateIndex: PropTypes.number,
66
- templates: PropTypes.object,
67
- };
68
-
69
- /**
70
- * Ensure the component doesn't try and re-render when a template isn't found
71
- *
72
- * @param nextProps
73
- * @param nextState
74
- *
75
- * @Internal This problem seems to be prevelant due to a race condition when deleting a template and updating the URL
76
- *
77
- * @since 4.2
78
- */
79
- shouldComponentUpdate (nextProps, nextState) {
80
- if (nextProps.template == null) {
81
- return false
82
- }
83
-
84
- return true
85
- };
86
-
87
- /**
88
- * @since 4.1
89
- */
90
- render () {
91
- const item = this.props.template
92
- const isCurrentTemplate = this.props.activeTemplate === item.get('id')
93
-
94
- /* Assign our header / footer components to constants */
95
- const header = <TemplateHeaderNavigation
96
- template={item}
97
- templateIndex={this.props.templateIndex}
98
- templates={this.props.templates}
99
- showPreviousTemplateText={this.props.showPreviousTemplateText}
100
- showNextTemplateText={this.props.showNextTemplateText}/>
101
-
102
- const footer = <TemplateFooterActions
103
- template={item}
104
- isActiveTemplate={isCurrentTemplate}
105
-
106
- ajaxUrl={this.props.ajaxUrl}
107
- ajaxNonce={this.props.ajaxNonce}
108
-
109
- activateText={this.props.activateText}
110
- pdfWorkingDirPath={this.props.pdfWorkingDirPath}
111
- templateDeleteText={this.props.templateDeleteText}
112
- templateConfirmDeleteText={this.props.templateConfirmDeleteText}
113
- templateDeleteErrorText={this.props.templateDeleteErrorText}
114
- />
115
-
116
- /* Display our Single Template container */
117
- return (
118
- <TemplateContainer header={header} footer={footer} closeRoute="/template">
119
- <div id="gfpdf-template-detail-view" className="gfpdf-template-detail">
120
- <TemplateScreenshots image={item.get('screenshot')}/>
121
-
122
- <div className="theme-info">
123
- <CurrentTemplate isCurrentTemplate={isCurrentTemplate} label={this.props.currentTemplateText}/>
124
- <Name name={item.get('template')} version={item.get('version')}
125
- versionLabel={this.props.versionText}/>
126
- <Author author={item.get('author')} uri={item.get('author uri')}/>
127
- <Group group={item.get('group')} label={this.props.groupText}/>
128
-
129
- {item.get('long_message') ? <ShowMessage text={item.get('long_message')}/> : null}
130
- {item.get('long_error') ? <ShowMessage text={item.get('long_error')} error={true}/> : null}
131
-
132
- <Description desc={item.get('description')}/>
133
- <Tags tags={item.get('tags')} label={this.props.tagsText}/>
134
- </div>
135
- </div>
136
- </TemplateContainer>
137
- )
138
- }
139
- }
140
-
141
- /**
142
- * Map state to props
143
- *
144
- * @param {Object} state The current Redux State
145
- * @param {Object} props The current React props
146
- *
147
- * @returns {{template: Immutable Map, templateIndex: number, templates: Immutable List, activeTemplate: string}}
148
- *
149
- * @since 4.1
150
- */
151
- const MapStateToProps = (state, props) => {
152
-
153
- /* found our selected template */
154
- const templates = getTemplates(state)
155
- const id = props.match.params.id
156
-
157
- const findCurrentTemplate = (item) => {
158
- return (item.get('id') === id)
159
- }
160
-
161
- return {
162
- template: templates.find(findCurrentTemplate),
163
- templateIndex: templates.findIndex(findCurrentTemplate),
164
- templates: templates,
165
- activeTemplate: state.template.activeTemplate,
166
- }
167
- }
168
-
169
- /**
170
- * Maps our Redux store to our React component
171
- *
172
- * @since 4.1
173
- */
174
  export default connect(MapStateToProps)(TemplateSingle)
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react'
3
+ import { connect } from 'react-redux'
4
+
5
+ import getTemplates from '../selectors/getTemplates'
6
+
7
+ import TemplateContainer from './TemplateContainer'
8
+ import TemplateHeaderNavigation from './TemplateHeaderNavigation'
9
+ import TemplateFooterActions from './TemplateFooterActions'
10
+ import TemplateScreenshots from './TemplateScreenshots'
11
+ import ShowMessage from './ShowMessage'
12
+
13
+ import {
14
+ CurrentTemplate,
15
+ Name,
16
+ Author,
17
+ Group,
18
+ Description,
19
+ Tags
20
+ } from './TemplateSingleComponents'
21
+
22
+ /**
23
+ * Renders a single PDF template, which get displayed on the /template/:id page.
24
+ *
25
+ * @package Gravity PDF
26
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
27
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
28
+ * @since 4.1
29
+ */
30
+
31
+ /*
32
+ This file is part of Gravity PDF.
33
+
34
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
35
+
36
+ This program is free software; you can redistribute it and/or modify
37
+ it under the terms of the GNU General Public License as published by
38
+ the Free Software Foundation; either version 2 of the License, or
39
+ (at your option) any later version.
40
+
41
+ This program is distributed in the hope that it will be useful,
42
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
43
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44
+ GNU General Public License for more details.
45
+
46
+ You should have received a copy of the GNU General Public License
47
+ along with this program; if not, write to the Free Software
48
+ Found
49
+ */
50
+
51
+ /**
52
+ * React Component
53
+ *
54
+ * @since 4.1
55
+ */
56
+ export class TemplateSingle extends React.Component {
57
+ /**
58
+ * @since 4.1
59
+ */
60
+ static propTypes = {
61
+ route: PropTypes.object,
62
+
63
+ template: PropTypes.object,
64
+ activeTemplate: PropTypes.string,
65
+ templateIndex: PropTypes.number,
66
+ templates: PropTypes.object,
67
+ };
68
+
69
+ /**
70
+ * Ensure the component doesn't try and re-render when a template isn't found
71
+ *
72
+ * @param nextProps
73
+ * @param nextState
74
+ *
75
+ * @Internal This problem seems to be prevelant due to a race condition when deleting a template and updating the URL
76
+ *
77
+ * @since 4.2
78
+ */
79
+ shouldComponentUpdate (nextProps, nextState) {
80
+ if (nextProps.template == null) {
81
+ return false
82
+ }
83
+
84
+ return true
85
+ };
86
+
87
+ /**
88
+ * @since 4.1
89
+ */
90
+ render () {
91
+ const item = this.props.template
92
+ const isCurrentTemplate = this.props.activeTemplate === item.get('id')
93
+
94
+ /* Assign our header / footer components to constants */
95
+ const header = <TemplateHeaderNavigation
96
+ template={item}
97
+ templateIndex={this.props.templateIndex}
98
+ templates={this.props.templates}
99
+ showPreviousTemplateText={this.props.showPreviousTemplateText}
100
+ showNextTemplateText={this.props.showNextTemplateText}/>
101
+
102
+ const footer = <TemplateFooterActions
103
+ template={item}
104
+ isActiveTemplate={isCurrentTemplate}
105
+
106
+ ajaxUrl={this.props.ajaxUrl}
107
+ ajaxNonce={this.props.ajaxNonce}
108
+
109
+ activateText={this.props.activateText}
110
+ pdfWorkingDirPath={this.props.pdfWorkingDirPath}
111
+ templateDeleteText={this.props.templateDeleteText}
112
+ templateConfirmDeleteText={this.props.templateConfirmDeleteText}
113
+ templateDeleteErrorText={this.props.templateDeleteErrorText}
114
+ />
115
+
116
+ /* Display our Single Template container */
117
+ return (
118
+ <TemplateContainer header={header} footer={footer} closeRoute="/template">
119
+ <div id="gfpdf-template-detail-view" className="gfpdf-template-detail">
120
+ <TemplateScreenshots image={item.get('screenshot')}/>
121
+
122
+ <div className="theme-info">
123
+ <CurrentTemplate isCurrentTemplate={isCurrentTemplate} label={this.props.currentTemplateText}/>
124
+ <Name name={item.get('template')} version={item.get('version')}
125
+ versionLabel={this.props.versionText}/>
126
+ <Author author={item.get('author')} uri={item.get('author uri')}/>
127
+ <Group group={item.get('group')} label={this.props.groupText}/>
128
+
129
+ {item.get('long_message') ? <ShowMessage text={item.get('long_message')}/> : null}
130
+ {item.get('long_error') ? <ShowMessage text={item.get('long_error')} error={true}/> : null}
131
+
132
+ <Description desc={item.get('description')}/>
133
+ <Tags tags={item.get('tags')} label={this.props.tagsText}/>
134
+ </div>
135
+ </div>
136
+ </TemplateContainer>
137
+ )
138
+ }
139
+ }
140
+
141
+ /**
142
+ * Map state to props
143
+ *
144
+ * @param {Object} state The current Redux State
145
+ * @param {Object} props The current React props
146
+ *
147
+ * @returns {{template: Immutable Map, templateIndex: number, templates: Immutable List, activeTemplate: string}}
148
+ *
149
+ * @since 4.1
150
+ */
151
+ const MapStateToProps = (state, props) => {
152
+
153
+ /* found our selected template */
154
+ const templates = getTemplates(state)
155
+ const id = props.match.params.id
156
+
157
+ const findCurrentTemplate = (item) => {
158
+ return (item.get('id') === id)
159
+ }
160
+
161
+ return {
162
+ template: templates.find(findCurrentTemplate),
163
+ templateIndex: templates.findIndex(findCurrentTemplate),
164
+ templates: templates,
165
+ activeTemplate: state.template.activeTemplate,
166
+ }
167
+ }
168
+
169
+ /**
170
+ * Maps our Redux store to our React component
171
+ *
172
+ * @since 4.1
173
+ */
174
  export default connect(MapStateToProps)(TemplateSingle)
src/assets/js/react/components/TemplateSingleComponents.js CHANGED
@@ -1,180 +1,180 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react'
3
-
4
- /**
5
- * Contains stateless React components for our Single Template
6
- *
7
- * @package Gravity PDF
8
- * @copyright Copyright (c) 2016, Blue Liquid Designs
9
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
10
- * @since 4.1
11
- */
12
-
13
- /*
14
- This file is part of Gravity PDF.
15
-
16
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
17
-
18
- This program is free software; you can redistribute it and/or modify
19
- it under the terms of the GNU General Public License as published by
20
- the Free Software Foundation; either version 2 of the License, or
21
- (at your option) any later version.
22
-
23
- This program is distributed in the hope that it will be useful,
24
- but WITHOUT ANY WARRANTY; without even the implied warranty of
25
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
- GNU General Public License for more details.
27
-
28
- You should have received a copy of the GNU General Public License
29
- along with this program; if not, write to the Free Software
30
- Found
31
- */
32
-
33
- /**
34
- * React Stateless Component
35
- *
36
- * Display the current template label
37
- *
38
- * @since 4.1
39
- */
40
- export const CurrentTemplate = ({ isCurrentTemplate, label }) => {
41
- return (isCurrentTemplate) ? (
42
- <span className="current-label">{label}</span>
43
- ) : (
44
- <span />
45
- )
46
- }
47
-
48
- CurrentTemplate.propTypes = {
49
- isCurrentTemplate: PropTypes.bool,
50
- label: PropTypes.string
51
- }
52
-
53
- /**
54
- * React Stateless Component
55
- *
56
- * Display the template name and version number
57
- *
58
- * @since 4.1
59
- */
60
- export const Name = ({ name, version, versionLabel }) => (
61
- <h2 className="theme-name">
62
- {name}
63
-
64
- <Version version={version} label={versionLabel}/>
65
- </h2>
66
- )
67
-
68
- Name.propTypes = {
69
- name: PropTypes.string,
70
- version: PropTypes.string,
71
- versionLabel: PropTypes.string
72
- }
73
-
74
- /**
75
- * React Stateless Component
76
- *
77
- * Display the template version number
78
- *
79
- * @since 4.1
80
- */
81
- export const Version = ({ label, version }) => {
82
- return (version) ? (
83
- <span className="theme-version">{label}: {version}</span>
84
- ) : (
85
- <span />
86
- )
87
- }
88
-
89
- Version.propTypes = {
90
- label: PropTypes.string,
91
- version: PropTypes.string
92
- }
93
-
94
- /**
95
- * React Stateless Component
96
- *
97
- * Display the template author (and link to website, if any)
98
- *
99
- * @since 4.1
100
- */
101
- export const Author = ({ author, uri }) => {
102
-
103
- if (uri) {
104
- return (
105
- <p className="theme-author">
106
- <a href={uri}>
107
- {author}
108
- </a>
109
- </p>
110
- )
111
- } else {
112
- return (
113
- <p className="theme-author">
114
- {author}
115
- </p>
116
- )
117
- }
118
- }
119
-
120
- Author.propTypes = {
121
- author: PropTypes.string,
122
- uri: PropTypes.string
123
- }
124
-
125
- /**
126
- * React Stateless Component
127
- *
128
- * Display the template group
129
- *
130
- * @since 4.1
131
- */
132
- export const Group = ({ label, group }) => (
133
- <p className="theme-author">
134
- <strong>{label}: {group}</strong>
135
- </p>
136
- )
137
-
138
- Group.propTypes = {
139
- label: PropTypes.string,
140
- group: PropTypes.string,
141
- }
142
-
143
- /**
144
- * React Stateless Component
145
- *
146
- * Display the template description
147
- *
148
- * @since 4.1
149
- */
150
- export const Description = ({ desc }) => (
151
- <p className="theme-description">
152
- {desc}
153
- </p>
154
- )
155
-
156
- Description.propTypes = {
157
- desc: PropTypes.string,
158
- }
159
-
160
- /**
161
- * React Stateless Component
162
- *
163
- * Display the template tags
164
- *
165
- * @since 4.1
166
- */
167
- export const Tags = ({ label, tags }) => {
168
- return (tags) ? (
169
- <p className="theme-tags">
170
- <span>{label}:</span> {tags}
171
- </p>
172
- ) : (
173
- <span />
174
- )
175
- }
176
-
177
- Tags.propTypes = {
178
- label: PropTypes.string,
179
- tags: PropTypes.string,
180
- }
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react'
3
+
4
+ /**
5
+ * Contains stateless React components for our Single Template
6
+ *
7
+ * @package Gravity PDF
8
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
9
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
10
+ * @since 4.1
11
+ */
12
+
13
+ /*
14
+ This file is part of Gravity PDF.
15
+
16
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
17
+
18
+ This program is free software; you can redistribute it and/or modify
19
+ it under the terms of the GNU General Public License as published by
20
+ the Free Software Foundation; either version 2 of the License, or
21
+ (at your option) any later version.
22
+
23
+ This program is distributed in the hope that it will be useful,
24
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
25
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
+ GNU General Public License for more details.
27
+
28
+ You should have received a copy of the GNU General Public License
29
+ along with this program; if not, write to the Free Software
30
+ Found
31
+ */
32
+
33
+ /**
34
+ * React Stateless Component
35
+ *
36
+ * Display the current template label
37
+ *
38
+ * @since 4.1
39
+ */
40
+ export const CurrentTemplate = ({ isCurrentTemplate, label }) => {
41
+ return (isCurrentTemplate) ? (
42
+ <span className="current-label">{label}</span>
43
+ ) : (
44
+ <span />
45
+ )
46
+ }
47
+
48
+ CurrentTemplate.propTypes = {
49
+ isCurrentTemplate: PropTypes.bool,
50
+ label: PropTypes.string
51
+ }
52
+
53
+ /**
54
+ * React Stateless Component
55
+ *
56
+ * Display the template name and version number
57
+ *
58
+ * @since 4.1
59
+ */
60
+ export const Name = ({ name, version, versionLabel }) => (
61
+ <h2 className="theme-name">
62
+ {name}
63
+
64
+ <Version version={version} label={versionLabel}/>
65
+ </h2>
66
+ )
67
+
68
+ Name.propTypes = {
69
+ name: PropTypes.string,
70
+ version: PropTypes.string,
71
+ versionLabel: PropTypes.string
72
+ }
73
+
74
+ /**
75
+ * React Stateless Component
76
+ *
77
+ * Display the template version number
78
+ *
79
+ * @since 4.1
80
+ */
81
+ export const Version = ({ label, version }) => {
82
+ return (version) ? (
83
+ <span className="theme-version">{label}: {version}</span>
84
+ ) : (
85
+ <span />
86
+ )
87
+ }
88
+
89
+ Version.propTypes = {
90
+ label: PropTypes.string,
91
+ version: PropTypes.string
92
+ }
93
+
94
+ /**
95
+ * React Stateless Component
96
+ *
97
+ * Display the template author (and link to website, if any)
98
+ *
99
+ * @since 4.1
100
+ */
101
+ export const Author = ({ author, uri }) => {
102
+
103
+ if (uri) {
104
+ return (
105
+ <p className="theme-author">
106
+ <a href={uri}>
107
+ {author}
108
+ </a>
109
+ </p>
110
+ )
111
+ } else {
112
+ return (
113
+ <p className="theme-author">
114
+ {author}
115
+ </p>
116
+ )
117
+ }
118
+ }
119
+
120
+ Author.propTypes = {
121
+ author: PropTypes.string,
122
+ uri: PropTypes.string
123
+ }
124
+
125
+ /**
126
+ * React Stateless Component
127
+ *
128
+ * Display the template group
129
+ *
130
+ * @since 4.1
131
+ */
132
+ export const Group = ({ label, group }) => (
133
+ <p className="theme-author">
134
+ <strong>{label}: {group}</strong>
135
+ </p>
136
+ )
137
+
138
+ Group.propTypes = {
139
+ label: PropTypes.string,
140
+ group: PropTypes.string,
141
+ }
142
+
143
+ /**
144
+ * React Stateless Component
145
+ *
146
+ * Display the template description
147
+ *
148
+ * @since 4.1
149
+ */
150
+ export const Description = ({ desc }) => (
151
+ <p className="theme-description">
152
+ {desc}
153
+ </p>
154
+ )
155
+
156
+ Description.propTypes = {
157
+ desc: PropTypes.string,
158
+ }
159
+
160
+ /**
161
+ * React Stateless Component
162
+ *
163
+ * Display the template tags
164
+ *
165
+ * @since 4.1
166
+ */
167
+ export const Tags = ({ label, tags }) => {
168
+ return (tags) ? (
169
+ <p className="theme-tags">
170
+ <span>{label}:</span> {tags}
171
+ </p>
172
+ ) : (
173
+ <span />
174
+ )
175
+ }
176
+
177
+ Tags.propTypes = {
178
+ label: PropTypes.string,
179
+ tags: PropTypes.string,
180
+ }
src/assets/js/react/components/TemplateUploader.js CHANGED
@@ -1,301 +1,301 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react'
3
- import { connect } from 'react-redux'
4
- import request from 'superagent'
5
- import { fromJS } from 'immutable'
6
-
7
- import { addTemplate, updateTemplateParam } from '../actions/templates'
8
- import Dropzone from './Dropzone'
9
- import ShowMessage from './ShowMessage'
10
-
11
- /**
12
- * Handles the uploading of new PDF templates to the server
13
- *
14
- * @package Gravity PDF
15
- * @copyright Copyright (c) 2016, Blue Liquid Designs
16
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
17
- * @since 4.1
18
- */
19
-
20
- /*
21
- This file is part of Gravity PDF.
22
-
23
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
24
-
25
- This program is free software; you can redistribute it and/or modify
26
- it under the terms of the GNU General Public License as published by
27
- the Free Software Foundation; either version 2 of the License, or
28
- (at your option) any later version.
29
-
30
- This program is distributed in the hope that it will be useful,
31
- but WITHOUT ANY WARRANTY; without even the implied warranty of
32
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33
- GNU General Public License for more details.
34
-
35
- You should have received a copy of the GNU General Public License
36
- along with this program; if not, write to the Free Software
37
- Found
38
- */
39
-
40
- /**
41
- * React Component
42
- *
43
- * @since 4.1
44
- */
45
- export class TemplateUploader extends React.Component {
46
- /**
47
- * @since 4.1
48
- */
49
- static propTypes = {
50
- ajaxUrl: PropTypes.string,
51
- ajaxNonce: PropTypes.string,
52
-
53
- genericUploadErrorText: PropTypes.string,
54
- addTemplateText: PropTypes.string,
55
- filenameErrorText: PropTypes.string,
56
- filesizeErrorText: PropTypes.string,
57
- installSuccessText: PropTypes.string,
58
- installUpdatedText: PropTypes.string,
59
- templateSuccessfullyInstalledUpdated: PropTypes.string,
60
- templateInstallInstructions: PropTypes.string,
61
-
62
- addNewTemplate: PropTypes.func,
63
- updateTemplateParam: PropTypes.func,
64
- templates: PropTypes.object
65
- };
66
-
67
- /**
68
- * Setup internal component state that doesn't need to be in Redux
69
- *
70
- * @returns {{ajax: boolean, error: string, message: string}}
71
- *
72
- * @since 4.1
73
- */
74
- state = {
75
- ajax: false,
76
- error: '',
77
- message: ''
78
- };
79
-
80
- /**
81
- * Manages the template file upload
82
- *
83
- * @param {array} acceptedFiles The array of uploaded files we should send to the server
84
- *
85
- * @since 4.1
86
- */
87
- onDrop = (acceptedFiles) => {
88
- /* Handle file upload and pass in an nonce!!! */
89
- if (acceptedFiles instanceof Array && acceptedFiles.length > 0) {
90
-
91
- acceptedFiles.forEach((file) => {
92
- const filename = file.name
93
-
94
- /* Do validation */
95
- if (!this.checkFilename(filename) || !this.checkFilesize(file.size)) {
96
- return
97
- }
98
-
99
- /* Add our loader */
100
- this.setState({
101
- ajax: true,
102
- error: '',
103
- message: '',
104
- })
105
-
106
- /* POST the PDF template to our endpoint for processing */
107
- request
108
- .post(this.props.ajaxUrl)
109
- .field('action', 'gfpdf_upload_template')
110
- .field('nonce', this.props.ajaxNonce)
111
- .attach('template', file, filename)
112
- .then(this.ajaxSuccess, this.ajaxFailed)
113
- })
114
-
115
- }
116
- };
117
-
118
- /**
119
- * Checks if the uploaded file has a .zip extension
120
- * We do this instead of mime type checking as it doesn't work in all browsers
121
- *
122
- * @param {string} name
123
- *
124
- * @returns {boolean}
125
- *
126
- * @since 4.1
127
- */
128
- checkFilename = (name) => {
129
- if (name.substr(name.length - 4) !== '.zip') {
130
-
131
- /* Tell use about incorrect file type */
132
- this.setState({
133
- error: this.props.filenameErrorText
134
- })
135
-
136
- return false
137
- }
138
-
139
- return true
140
- };
141
-
142
- /**
143
- * Checks if the file size is larger than 5MB
144
- *
145
- * @param {int} size File size in bytes
146
- *
147
- * @returns {boolean}
148
- *
149
- * @since 4.1
150
- */
151
- checkFilesize = (size) => {
152
- /* Check the file is no larger than 5MB (convert from bytes to KB) */
153
- if (size / 1024 > 5120) {
154
- /* Tell use about incorrect file type */
155
- this.setState({
156
- error: this.props.filesizeErrorText
157
- })
158
-
159
- return false
160
- }
161
-
162
- return true
163
- };
164
-
165
- /**
166
- * Update our Redux store with the new PDF template details
167
- * If our upload AJAX call to the server passed this function gets fired
168
- *
169
- * @param {Object} response
170
- *
171
- * @since 4.1
172
- */
173
- ajaxSuccess = (response) => {
174
-
175
- /* Update our Redux Store with the new template(s) */
176
- response.body.templates.forEach((template) => {
177
-
178
- /* Check if template already in the list before adding to our store */
179
- const matched = this.props.templates.find((item) => {
180
- return (item.get('id') === template.id)
181
- })
182
-
183
- if (matched === undefined) {
184
- template.new = true //ensure new templates go to end of list
185
- template.message = this.props.installSuccessText
186
- this.props.addNewTemplate(fromJS(template))
187
- } else {
188
- this.props.updateTemplateParam(template.id, 'message', this.props.installUpdatedText)
189
- }
190
- })
191
-
192
- /* Mark as success and stop AJAX spinner */
193
- this.setState({
194
- ajax: false,
195
- message: this.props.templateSuccessfullyInstalledUpdated
196
- })
197
- };
198
-
199
- /**
200
- * Show any errors to the user when AJAX request fails for any reason
201
- *
202
- * @param {Object} error
203
- *
204
- * @since 4.1
205
- */
206
- ajaxFailed = (error) => {
207
- /* Let the user know there was a problem with the upload */
208
- this.setState({
209
- error: (error.response.body && error.response.body.error !== undefined) ? error.response.body.error : this.props.genericUploadErrorText,
210
- ajax: false
211
- })
212
- };
213
-
214
- /**
215
- * Remove message from state once the timeout has finished
216
- *
217
- * @since 4.1
218
- */
219
- removeMessage = () => {
220
- this.setState( {
221
- message: ''
222
- })
223
- };
224
-
225
- /**
226
- * Prevent normal behaviour when this event fires
227
- *
228
- * @param {Object} e Event
229
- *
230
- * @since 4.1
231
- */
232
- openDropzone = (e) => {
233
- e.preventDefault()
234
- };
235
-
236
- /**
237
- * @since 4.1
238
- */
239
- render() {
240
- return (
241
- <Dropzone
242
- onDrop={this.onDrop}
243
- maxSize={10240000}
244
- multiple={true}
245
- className="theme add-new-theme gfpdf-dropzone">
246
- <a href="#" onClick={this.openDropzone} className={this.state.ajax ? 'doing-ajax' : ''}>
247
- <div className="theme-screenshot"><span /></div>
248
-
249
- {this.state.error !== '' ? <ShowMessage text={this.state.error} error={true}/> : null}
250
- {this.state.message !== '' ? <ShowMessage text={this.state.message} dismissable={true} dismissableCallback={this.removeMessage} /> : null}
251
-
252
- <h2 className="theme-name">{this.props.addTemplateText}</h2>
253
- </a>
254
- <div className="gfpdf-template-install-instructions">{this.props.templateInstallInstructions}</div>
255
- </Dropzone>
256
- )
257
- }
258
- }
259
-
260
- /**
261
- * Map state to props
262
- *
263
- * @param {Object} state The current Redux State
264
- *
265
- * @returns {{templates}}
266
- *
267
- * @since 4.1
268
- */
269
- const mapStateToProps = (state) => {
270
- return {
271
- templates: state.template.list
272
- }
273
- }
274
-
275
- /**
276
- * Map actions to props
277
- *
278
- * @param {func} dispatch Redux dispatcher
279
- *
280
- * @returns {{addNewTemplate: (function(template=Immutable Map)), updateTemplateParam: (function(id=string, name=string, value=*))}}
281
- *
282
- * @since 4.1
283
- */
284
- const mapDispatchToProps = (dispatch) => {
285
- return {
286
- addNewTemplate: (template) => {
287
- dispatch(addTemplate(template))
288
- },
289
-
290
- updateTemplateParam: (id, name, value) => {
291
- dispatch(updateTemplateParam(id, name, value))
292
- }
293
- }
294
- }
295
-
296
- /**
297
- * Maps our Redux store to our React component
298
- *
299
- * @since 4.1
300
- */
301
  export default connect(mapStateToProps, mapDispatchToProps)(TemplateUploader)
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react'
3
+ import { connect } from 'react-redux'
4
+ import request from 'superagent'
5
+ import { fromJS } from 'immutable'
6
+
7
+ import { addTemplate, updateTemplateParam } from '../actions/templates'
8
+ import Dropzone from './Dropzone'
9
+ import ShowMessage from './ShowMessage'
10
+
11
+ /**
12
+ * Handles the uploading of new PDF templates to the server
13
+ *
14
+ * @package Gravity PDF
15
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
16
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
17
+ * @since 4.1
18
+ */
19
+
20
+ /*
21
+ This file is part of Gravity PDF.
22
+
23
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
24
+
25
+ This program is free software; you can redistribute it and/or modify
26
+ it under the terms of the GNU General Public License as published by
27
+ the Free Software Foundation; either version 2 of the License, or
28
+ (at your option) any later version.
29
+
30
+ This program is distributed in the hope that it will be useful,
31
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
32
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33
+ GNU General Public License for more details.
34
+
35
+ You should have received a copy of the GNU General Public License
36
+ along with this program; if not, write to the Free Software
37
+ Found
38
+ */
39
+
40
+ /**
41
+ * React Component
42
+ *
43
+ * @since 4.1
44
+ */
45
+ export class TemplateUploader extends React.Component {
46
+ /**
47
+ * @since 4.1
48
+ */
49
+ static propTypes = {
50
+ ajaxUrl: PropTypes.string,
51
+ ajaxNonce: PropTypes.string,
52
+
53
+ genericUploadErrorText: PropTypes.string,
54
+ addTemplateText: PropTypes.string,
55
+ filenameErrorText: PropTypes.string,
56
+ filesizeErrorText: PropTypes.string,
57
+ installSuccessText: PropTypes.string,
58
+ installUpdatedText: PropTypes.string,
59
+ templateSuccessfullyInstalledUpdated: PropTypes.string,
60
+ templateInstallInstructions: PropTypes.string,
61
+
62
+ addNewTemplate: PropTypes.func,
63
+ updateTemplateParam: PropTypes.func,
64
+ templates: PropTypes.object
65
+ };
66
+
67
+ /**
68
+ * Setup internal component state that doesn't need to be in Redux
69
+ *
70
+ * @returns {{ajax: boolean, error: string, message: string}}
71
+ *
72
+ * @since 4.1
73
+ */
74
+ state = {
75
+ ajax: false,
76
+ error: '',
77
+ message: ''
78
+ };
79
+
80
+ /**
81
+ * Manages the template file upload
82
+ *
83
+ * @param {array} acceptedFiles The array of uploaded files we should send to the server
84
+ *
85
+ * @since 4.1
86
+ */
87
+ onDrop = (acceptedFiles) => {
88
+ /* Handle file upload and pass in an nonce!!! */
89
+ if (acceptedFiles instanceof Array && acceptedFiles.length > 0) {
90
+
91
+ acceptedFiles.forEach((file) => {
92
+ const filename = file.name
93
+
94
+ /* Do validation */
95
+ if (!this.checkFilename(filename) || !this.checkFilesize(file.size)) {
96
+ return
97
+ }
98
+
99
+ /* Add our loader */
100
+ this.setState({
101
+ ajax: true,
102
+ error: '',
103
+ message: '',
104
+ })
105
+
106
+ /* POST the PDF template to our endpoint for processing */
107
+ request
108
+ .post(this.props.ajaxUrl)
109
+ .field('action', 'gfpdf_upload_template')
110
+ .field('nonce', this.props.ajaxNonce)
111
+ .attach('template', file, filename)
112
+ .then(this.ajaxSuccess, this.ajaxFailed)
113
+ })
114
+
115
+ }
116
+ };
117
+
118
+ /**
119
+ * Checks if the uploaded file has a .zip extension
120
+ * We do this instead of mime type checking as it doesn't work in all browsers
121
+ *
122
+ * @param {string} name
123
+ *
124
+ * @returns {boolean}
125
+ *
126
+ * @since 4.1
127
+ */
128
+ checkFilename = (name) => {
129
+ if (name.substr(name.length - 4) !== '.zip') {
130
+
131
+ /* Tell use about incorrect file type */
132
+ this.setState({
133
+ error: this.props.filenameErrorText
134
+ })
135
+
136
+ return false
137
+ }
138
+
139
+ return true
140
+ };
141
+
142
+ /**
143
+ * Checks if the file size is larger than 5MB
144
+ *
145
+ * @param {int} size File size in bytes
146
+ *
147
+ * @returns {boolean}
148
+ *
149
+ * @since 4.1
150
+ */
151
+ checkFilesize = (size) => {
152
+ /* Check the file is no larger than 5MB (convert from bytes to KB) */
153
+ if (size / 1024 > 5120) {
154
+ /* Tell use about incorrect file type */
155
+ this.setState({
156
+ error: this.props.filesizeErrorText
157
+ })
158
+
159
+ return false
160
+ }
161
+
162
+ return true
163
+ };
164
+
165
+ /**
166
+ * Update our Redux store with the new PDF template details
167
+ * If our upload AJAX call to the server passed this function gets fired
168
+ *
169
+ * @param {Object} response
170
+ *
171
+ * @since 4.1
172
+ */
173
+ ajaxSuccess = (response) => {
174
+
175
+ /* Update our Redux Store with the new template(s) */
176
+ response.body.templates.forEach((template) => {
177
+
178
+ /* Check if template already in the list before adding to our store */
179
+ const matched = this.props.templates.find((item) => {
180
+ return (item.get('id') === template.id)
181
+ })
182
+
183
+ if (matched === undefined) {
184
+ template.new = true //ensure new templates go to end of list
185
+ template.message = this.props.installSuccessText
186
+ this.props.addNewTemplate(fromJS(template))
187
+ } else {
188
+ this.props.updateTemplateParam(template.id, 'message', this.props.installUpdatedText)
189
+ }
190
+ })
191
+
192
+ /* Mark as success and stop AJAX spinner */
193
+ this.setState({
194
+ ajax: false,
195
+ message: this.props.templateSuccessfullyInstalledUpdated
196
+ })
197
+ };
198
+
199
+ /**
200
+ * Show any errors to the user when AJAX request fails for any reason
201
+ *
202
+ * @param {Object} error
203
+ *
204
+ * @since 4.1
205
+ */
206
+ ajaxFailed = (error) => {
207
+ /* Let the user know there was a problem with the upload */
208
+ this.setState({
209
+ error: (error.response.body && error.response.body.error !== undefined) ? error.response.body.error : this.props.genericUploadErrorText,
210
+ ajax: false
211
+ })
212
+ };
213
+
214
+ /**
215
+ * Remove message from state once the timeout has finished
216
+ *
217
+ * @since 4.1
218
+ */
219
+ removeMessage = () => {
220
+ this.setState( {
221
+ message: ''
222
+ })
223
+ };
224
+
225
+ /**
226
+ * Prevent normal behaviour when this event fires
227
+ *
228
+ * @param {Object} e Event
229
+ *
230
+ * @since 4.1
231
+ */
232
+ openDropzone = (e) => {
233
+ e.preventDefault()
234
+ };
235
+
236
+ /**
237
+ * @since 4.1
238
+ */
239
+ render() {
240
+ return (
241
+ <Dropzone
242
+ onDrop={this.onDrop}
243
+ maxSize={10240000}
244
+ multiple={true}
245
+ className="theme add-new-theme gfpdf-dropzone">
246
+ <a href="#" onClick={this.openDropzone} className={this.state.ajax ? 'doing-ajax' : ''}>
247
+ <div className="theme-screenshot"><span /></div>
248
+
249
+ {this.state.error !== '' ? <ShowMessage text={this.state.error} error={true}/> : null}
250
+ {this.state.message !== '' ? <ShowMessage text={this.state.message} dismissable={true} dismissableCallback={this.removeMessage} /> : null}
251
+
252
+ <h2 className="theme-name">{this.props.addTemplateText}</h2>
253
+ </a>
254
+ <div className="gfpdf-template-install-instructions">{this.props.templateInstallInstructions}</div>
255
+ </Dropzone>
256
+ )
257
+ }
258
+ }
259
+
260
+ /**
261
+ * Map state to props
262
+ *
263
+ * @param {Object} state The current Redux State
264
+ *
265
+ * @returns {{templates}}
266
+ *
267
+ * @since 4.1
268
+ */
269
+ const mapStateToProps = (state) => {
270
+ return {
271
+ templates: state.template.list
272
+ }
273
+ }
274
+
275
+ /**
276
+ * Map actions to props
277
+ *
278
+ * @param {func} dispatch Redux dispatcher
279
+ *
280
+ * @returns {{addNewTemplate: (function(template=Immutable Map)), updateTemplateParam: (function(id=string, name=string, value=*))}}
281
+ *
282
+ * @since 4.1
283
+ */
284
+ const mapDispatchToProps = (dispatch) => {
285
+ return {
286
+ addNewTemplate: (template) => {
287
+ dispatch(addTemplate(template))
288
+ },
289
+
290
+ updateTemplateParam: (id, name, value) => {
291
+ dispatch(updateTemplateParam(id, name, value))
292
+ }
293
+ }
294
+ }
295
+
296
+ /**
297
+ * Maps our Redux store to our React component
298
+ *
299
+ * @since 4.1
300
+ */
301
  export default connect(mapStateToProps, mapDispatchToProps)(TemplateUploader)
src/assets/js/react/gfpdf-main.js CHANGED
@@ -1,63 +1,63 @@
1
- import $ from 'jquery'
2
- import Promise from 'promise-polyfill'
3
- import templateBootstrap from './bootstrap/templateBootstrap'
4
-
5
- /**
6
- * JS Entry point for WebPack
7
- *
8
- * @package Gravity PDF
9
- * @copyright Copyright (c) 2016, Blue Liquid Designs
10
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
11
- * @since 4.1
12
- */
13
-
14
- /*
15
- This file is part of Gravity PDF.
16
-
17
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
18
-
19
- This program is free software; you can redistribute it and/or modify
20
- it under the terms of the GNU General Public License as published by
21
- the Free Software Foundation; either version 2 of the License, or
22
- (at your option) any later version.
23
-
24
- This program is distributed in the hope that it will be useful,
25
- but WITHOUT ANY WARRANTY; without even the implied warranty of
26
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
- GNU General Public License for more details.
28
-
29
- You should have received a copy of the GNU General Public License
30
- along with this program; if not, write to the Free Software
31
- Found
32
- */
33
-
34
- /**
35
- * Our main entry point for our modern unit-tested JS
36
- * This file gets run through Webpack to built it into valid ES5
37
- *
38
- * As we convert more JS to ES6 we'll likely load it from this file (unless we decide to make each feature modular)
39
- *
40
- * @since 4.1
41
- */
42
- $(function () {
43
-
44
- 'use strict'
45
-
46
- /* Initialise the Fancy Template Picker */
47
- if (GFPDF.templateList !== undefined) {
48
-
49
- // To add to window
50
- if (!window.Promise) {
51
- window.Promise = Promise;
52
- }
53
-
54
- /* Check if we should show the Fancy Template Picker */
55
- var templateId = '#gfpdf_settings\\[template\\], #gfpdf_settings\\[default_template\\]'
56
- var $templateField = $(templateId)
57
-
58
- /* Run this code if the element exists */
59
- if ($templateField.length > 0) {
60
- templateBootstrap($templateField)
61
- }
62
- }
63
  })
1
+ import $ from 'jquery'
2
+ import Promise from 'promise-polyfill'
3
+ import templateBootstrap from './bootstrap/templateBootstrap'
4
+
5
+ /**
6
+ * JS Entry point for WebPack
7
+ *
8
+ * @package Gravity PDF
9
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
10
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
11
+ * @since 4.1
12
+ */
13
+
14
+ /*
15
+ This file is part of Gravity PDF.
16
+
17
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
18
+
19
+ This program is free software; you can redistribute it and/or modify
20
+ it under the terms of the GNU General Public License as published by
21
+ the Free Software Foundation; either version 2 of the License, or
22
+ (at your option) any later version.
23
+
24
+ This program is distributed in the hope that it will be useful,
25
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
26
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
+ GNU General Public License for more details.
28
+
29
+ You should have received a copy of the GNU General Public License
30
+ along with this program; if not, write to the Free Software
31
+ Found
32
+ */
33
+
34
+ /**
35
+ * Our main entry point for our modern unit-tested JS
36
+ * This file gets run through Webpack to built it into valid ES5
37
+ *
38
+ * As we convert more JS to ES6 we'll likely load it from this file (unless we decide to make each feature modular)
39
+ *
40
+ * @since 4.1
41
+ */
42
+ $(function () {
43
+
44
+ 'use strict'
45
+
46
+ /* Initialise the Fancy Template Picker */
47
+ if (GFPDF.templateList !== undefined) {
48
+
49
+ // To add to window
50
+ if (!window.Promise) {
51
+ window.Promise = Promise;
52
+ }
53
+
54
+ /* Check if we should show the Fancy Template Picker */
55
+ var templateId = '#gfpdf_settings\\[template\\], #gfpdf_settings\\[default_template\\]'
56
+ var $templateField = $(templateId)
57
+
58
+ /* Run this code if the element exists */
59
+ if ($templateField.length > 0) {
60
+ templateBootstrap($templateField)
61
+ }
62
+ }
63
  })
src/assets/js/react/reducers/templateReducer.js CHANGED
@@ -1,155 +1,155 @@
1
- import { fromJS } from 'immutable'
2
- import {
3
- SEARCH_TEMPLATES,
4
- SELECT_TEMPLATE,
5
- ADD_TEMPLATE,
6
- UPDATE_TEMPLATE,
7
- UPDATE_TEMPLATE_PARAM,
8
- DELETE_TEMPLATE,
9
- } from '../actionTypes/templates'
10
-
11
- /**
12
- * Our Redux Template Reducer that take the objects returned from our Redux Template Actions
13
- * and updates the template portion of our store in an immutable way
14
- *
15
- * @package Gravity PDF
16
- * @copyright Copyright (c) 2016, Blue Liquid Designs
17
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
18
- * @since 4.1
19
- */
20
-
21
- /*
22
- This file is part of Gravity PDF.
23
-
24
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
25
-
26
- This program is free software; you can redistribute it and/or modify
27
- it under the terms of the GNU General Public License as published by
28
- the Free Software Foundation; either version 2 of the License, or
29
- (at your option) any later version.
30
-
31
- This program is distributed in the hope that it will be useful,
32
- but WITHOUT ANY WARRANTY; without even the implied warranty of
33
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34
- GNU General Public License for more details.
35
-
36
- You should have received a copy of the GNU General Public License
37
- along with this program; if not, write to the Free Software
38
- Found
39
- */
40
-
41
- /**
42
- * Setup the initial state of the "template" portion of our Redux store
43
- *
44
- * @type {{list: any, activeTemplate: (any), search: string}}
45
- *
46
- * @since 4.1
47
- */
48
- export const initialState = {
49
- list: fromJS(GFPDF.templateList),
50
- activeTemplate: GFPDF.activeTemplate || GFPDF.activeDefaultTemplate,
51
- search: '',
52
- }
53
-
54
- /**
55
- * Returns the first Immutable Map in our Immutable List which
56
- * matches the template id passed.
57
- *
58
- * @param {Object} list The Immutable list of templates
59
- * @param {string} id The template ID
60
- *
61
- * @returns object Immutable Map object of our template
62
- *
63
- * @since 4.1
64
- */
65
- const getTemplateIndex = (list, id) => {
66
- return list.findKey((template) => {
67
- if (template.get('id') === id) {
68
- return true
69
- }
70
- })
71
- }
72
-
73
- /**
74
- * The action template reducer which updates our state
75
- *
76
- * @param {Object} state The current state of our template store
77
- * @param {Object} action The Redux action details being triggered
78
- *
79
- * @returns {Object} State (whether updated or not)
80
- *
81
- * @since 4.1
82
- */
83
- export default function (state = initialState, action) {
84
-
85
- switch (action.type) {
86
- /**
87
- * Update the search key
88
- *
89
- * @since 4.1
90
- */
91
- case SEARCH_TEMPLATES:
92
- return {
93
- ...state,
94
- search: action.text
95
- }
96
-
97
- /**
98
- * Update the activeTemplate key
99
- *
100
- * @since 4.1
101
- */
102
- case SELECT_TEMPLATE:
103
- return {
104
- ...state,
105
- activeTemplate: action.id
106
- }
107
-
108
- /**
109
- * Push a new template Immutable Map onto our Immutable List
110
- *
111
- * @since 4.1
112
- */
113
- case ADD_TEMPLATE:
114
- return {
115
- ...state,
116
- list: state.list.push(action.template)
117
- }
118
-
119
- /**
120
- * Replace template Immutable Map with new Map
121
- *
122
- * @since 4.1
123
- */
124
- case UPDATE_TEMPLATE:
125
- return {
126
- ...state,
127
- list: state.list.set(getTemplateIndex(state.list, action.template.get('id')), action.template)
128
- }
129
-
130
- /**
131
- * Replace single parameter in template Immutable Map with new value
132
- *
133
- * @since 4.1
134
- */
135
- case UPDATE_TEMPLATE_PARAM:
136
- return {
137
- ...state,
138
- list: state.list.setIn([ getTemplateIndex(state.list, action.id), action.name ], action.value)
139
- }
140
-
141
- /**
142
- * Remove template Immutable Map from Immutable List
143
- *
144
- * @since 4.1
145
- */
146
- case DELETE_TEMPLATE:
147
- return {
148
- ...state,
149
- list: state.list.delete(getTemplateIndex(state.list, action.id))
150
- }
151
- }
152
-
153
- /* None of these actions fired so return state */
154
- return state
155
  }
1
+ import { fromJS } from 'immutable'
2
+ import {
3
+ SEARCH_TEMPLATES,
4
+ SELECT_TEMPLATE,
5
+ ADD_TEMPLATE,
6
+ UPDATE_TEMPLATE,
7
+ UPDATE_TEMPLATE_PARAM,
8
+ DELETE_TEMPLATE,
9
+ } from '../actionTypes/templates'
10
+
11
+ /**
12
+ * Our Redux Template Reducer that take the objects returned from our Redux Template Actions
13
+ * and updates the template portion of our store in an immutable way
14
+ *
15
+ * @package Gravity PDF
16
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
17
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
18
+ * @since 4.1
19
+ */
20
+
21
+ /*
22
+ This file is part of Gravity PDF.
23
+
24
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
25
+
26
+ This program is free software; you can redistribute it and/or modify
27
+ it under the terms of the GNU General Public License as published by
28
+ the Free Software Foundation; either version 2 of the License, or
29
+ (at your option) any later version.
30
+
31
+ This program is distributed in the hope that it will be useful,
32
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
33
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34
+ GNU General Public License for more details.
35
+
36
+ You should have received a copy of the GNU General Public License
37
+ along with this program; if not, write to the Free Software
38
+ Found
39
+ */
40
+
41
+ /**
42
+ * Setup the initial state of the "template" portion of our Redux store
43
+ *
44
+ * @type {{list: any, activeTemplate: (any), search: string}}
45
+ *
46
+ * @since 4.1
47
+ */
48
+ export const initialState = {
49
+ list: fromJS(GFPDF.templateList),
50
+ activeTemplate: GFPDF.activeTemplate || GFPDF.activeDefaultTemplate,
51
+ search: '',
52
+ }
53
+
54
+ /**
55
+ * Returns the first Immutable Map in our Immutable List which
56
+ * matches the template id passed.
57
+ *
58
+ * @param {Object} list The Immutable list of templates
59
+ * @param {string} id The template ID
60
+ *
61
+ * @returns object Immutable Map object of our template
62
+ *
63
+ * @since 4.1
64
+ */
65
+ const getTemplateIndex = (list, id) => {
66
+ return list.findKey((template) => {
67
+ if (template.get('id') === id) {
68
+ return true
69
+ }
70
+ })
71
+ }
72
+
73
+ /**
74
+ * The action template reducer which updates our state
75
+ *
76
+ * @param {Object} state The current state of our template store
77
+ * @param {Object} action The Redux action details being triggered
78
+ *
79
+ * @returns {Object} State (whether updated or not)
80
+ *
81
+ * @since 4.1
82
+ */
83
+ export default function (state = initialState, action) {
84
+
85
+ switch (action.type) {
86
+ /**
87
+ * Update the search key
88
+ *
89
+ * @since 4.1
90
+ */
91
+ case SEARCH_TEMPLATES:
92
+ return {
93
+ ...state,
94
+ search: action.text
95
+ }
96
+
97
+ /**
98
+ * Update the activeTemplate key
99
+ *
100
+ * @since 4.1
101
+ */
102
+ case SELECT_TEMPLATE:
103
+ return {
104
+ ...state,
105
+ activeTemplate: action.id
106
+ }
107
+
108
+ /**
109
+ * Push a new template Immutable Map onto our Immutable List
110
+ *
111
+ * @since 4.1
112
+ */
113
+ case ADD_TEMPLATE:
114
+ return {
115
+ ...state,
116
+ list: state.list.push(action.template)
117
+ }
118
+
119
+ /**
120
+ * Replace template Immutable Map with new Map
121
+ *
122
+ * @since 4.1
123
+ */
124
+ case UPDATE_TEMPLATE:
125
+ return {
126
+ ...state,
127
+ list: state.list.set(getTemplateIndex(state.list, action.template.get('id')), action.template)
128
+ }
129
+
130
+ /**
131
+ * Replace single parameter in template Immutable Map with new value
132
+ *
133
+ * @since 4.1
134
+ */
135
+ case UPDATE_TEMPLATE_PARAM:
136
+ return {
137
+ ...state,
138
+ list: state.list.setIn([ getTemplateIndex(state.list, action.id), action.name ], action.value)
139
+ }
140
+
141
+ /**
142
+ * Remove template Immutable Map from Immutable List
143
+ *
144
+ * @since 4.1
145
+ */
146
+ case DELETE_TEMPLATE:
147
+ return {
148
+ ...state,
149
+ list: state.list.delete(getTemplateIndex(state.list, action.id))
150
+ }
151
+ }
152
+
153
+ /* None of these actions fired so return state */
154
+ return state
155
  }
src/assets/js/react/router/templateRouter.js CHANGED
@@ -1,122 +1,122 @@
1
- import React from 'react'
2
-
3
- import { render } from 'react-dom'
4
- import { Provider } from 'react-redux'
5
-
6
- import { HashRouter as Router, Route, Switch } from 'react-router-dom'
7
-
8
- import TemplateList from '../components/TemplateList'
9
- import TemplateSingle from '../components/TemplateSingle'
10
- import Empty from '../components/Empty'
11
-
12
- /**
13
- * React Router v3 Routes with our Redux store integrated
14
- *
15
- * Once React Router v4 becomes stable we'll update as required, or if we need to decouple our
16
- * routes for another module.
17
- *
18
- * @package Gravity PDF
19
- * @copyright Copyright (c) 2016, Blue Liquid Designs
20
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
21
- * @since 4.1
22
- */
23
-
24
- /*
25
- This file is part of Gravity PDF.
26
-
27
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
28
-
29
- This program is free software; you can redistribute it and/or modify
30
- it under the terms of the GNU General Public License as published by
31
- the Free Software Foundation; either version 2 of the License, or
32
- (at your option) any later version.
33
-
34
- This program is distributed in the hope that it will be useful,
35
- but WITHOUT ANY WARRANTY; without even the implied warranty of
36
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37
- GNU General Public License for more details.
38
-
39
- You should have received a copy of the GNU General Public License
40
- along with this program; if not, write to the Free Software
41
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
42
- */
43
-
44
- /**
45
- * Contains the React Router Routes for our Advanced Template Selector.
46
- * We are using hashHistory instead of browserHistory so as not to affect the backend
47
- *
48
- * Routes include:
49
- *
50
- * /template/ (../components/TemplateList)
51
- * /template/:id (../components/TemplateSingle)
52
- * All other routes (../components/Empty)
53
- *
54
- * @since 4.1
55
- */
56
- export const Routes = () => (
57
- <Router>
58
- <Switch>
59
- <Route path="/template"
60
- exact
61
- render={(props) => (
62
- <TemplateList
63
- {...props}
64
-
65
- ajaxUrl={GFPDF.ajaxUrl}
66
- ajaxNonce={GFPDF.ajaxNonce}
67
-
68
- templateDetailsText={GFPDF.templateDetails}
69
- templateHeaderText={GFPDF.installedPdfs}
70
-
71
- genericUploadErrorText={GFPDF.problemWithTheUpload}
72
- activateText={GFPDF.select}
73
- addTemplateText={GFPDF.addNewTemplate}
74
- filenameErrorText={GFPDF.uploadInvalidNotZipFile}
75
- filesizeErrorText={GFPDF.uploadInvalidExceedsFileSizeLimit}
76
- installSuccessText={GFPDF.templateSuccessfullyInstalled}
77
- installUpdatedText={GFPDF.templateSuccessfullyUpdated}
78
- templateSuccessfullyInstalledUpdated={GFPDF.templateSuccessfullyInstalledUpdated}
79
- templateInstallInstructions={GFPDF.templateInstallInstructions}
80
- />
81
- )}
82
- />
83
-
84
- <Route path="/template/:id"
85
- render={(props) => (
86
- <TemplateSingle
87
- {...props}
88
-
89
- ajaxUrl={GFPDF.ajaxUrl}
90
- ajaxNonce={GFPDF.ajaxNonce}
91
- pdfWorkingDirPath={GFPDF.pdfWorkingDir}
92
-
93
- activateText={GFPDF.select}
94
- templateDeleteText={GFPDF.delete}
95
- templateConfirmDeleteText={GFPDF.doYouWantToDeleteTemplate}
96
- templateDeleteErrorText={GFPDF.couldNotDeleteTemplate}
97
- currentTemplateText={GFPDF.currentTemplate}
98
- versionText={GFPDF.version}
99
- groupText={GFPDF.group}
100
- tagsText={GFPDF.tags}
101
- showPreviousTemplateText={GFPDF.showPreviousTemplate}
102
- showNextTemplateText={GFPDF.showNextTemplate}
103
- />
104
- )}
105
- />
106
-
107
- <Route component={Empty}/>
108
- </Switch>
109
- </Router>)
110
-
111
- /**
112
- * Setup React Router with our Redux Store
113
- *
114
- * @param {Object} store Redux Store
115
- *
116
- * @since 4.1
117
- */
118
- export default function TemplatesRouter (store) {
119
- render((<Provider store={store}>
120
- <Routes />
121
- </Provider>), document.getElementById('gfpdf-overlay'))
122
  }
1
+ import React from 'react'
2
+
3
+ import { render } from 'react-dom'
4
+ import { Provider } from 'react-redux'
5
+
6
+ import { HashRouter as Router, Route, Switch } from 'react-router-dom'
7
+
8
+ import TemplateList from '../components/TemplateList'
9
+ import TemplateSingle from '../components/TemplateSingle'
10
+ import Empty from '../components/Empty'
11
+
12
+ /**
13
+ * React Router v3 Routes with our Redux store integrated
14
+ *
15
+ * Once React Router v4 becomes stable we'll update as required, or if we need to decouple our
16
+ * routes for another module.
17
+ *
18
+ * @package Gravity PDF
19
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
20
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
21
+ * @since 4.1
22
+ */
23
+
24
+ /*
25
+ This file is part of Gravity PDF.
26
+
27
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
28
+
29
+ This program is free software; you can redistribute it and/or modify
30
+ it under the terms of the GNU General Public License as published by
31
+ the Free Software Foundation; either version 2 of the License, or
32
+ (at your option) any later version.
33
+
34
+ This program is distributed in the hope that it will be useful,
35
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
36
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37
+ GNU General Public License for more details.
38
+
39
+ You should have received a copy of the GNU General Public License
40
+ along with this program; if not, write to the Free Software
41
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
42
+ */
43
+
44
+ /**
45
+ * Contains the React Router Routes for our Advanced Template Selector.
46
+ * We are using hashHistory instead of browserHistory so as not to affect the backend
47
+ *
48
+ * Routes include:
49
+ *
50
+ * /template/ (../components/TemplateList)
51
+ * /template/:id (../components/TemplateSingle)
52
+ * All other routes (../components/Empty)
53
+ *
54
+ * @since 4.1
55
+ */
56
+ export const Routes = () => (
57
+ <Router>
58
+ <Switch>
59
+ <Route path="/template"
60
+ exact
61
+ render={(props) => (
62
+ <TemplateList
63
+ {...props}
64
+
65
+ ajaxUrl={GFPDF.ajaxUrl}
66
+ ajaxNonce={GFPDF.ajaxNonce}
67
+
68
+ templateDetailsText={GFPDF.templateDetails}
69
+ templateHeaderText={GFPDF.installedPdfs}
70
+
71
+ genericUploadErrorText={GFPDF.problemWithTheUpload}
72
+ activateText={GFPDF.select}
73
+ addTemplateText={GFPDF.addNewTemplate}
74
+ filenameErrorText={GFPDF.uploadInvalidNotZipFile}
75
+ filesizeErrorText={GFPDF.uploadInvalidExceedsFileSizeLimit}
76
+ installSuccessText={GFPDF.templateSuccessfullyInstalled}
77
+ installUpdatedText={GFPDF.templateSuccessfullyUpdated}
78
+ templateSuccessfullyInstalledUpdated={GFPDF.templateSuccessfullyInstalledUpdated}
79
+ templateInstallInstructions={GFPDF.templateInstallInstructions}
80
+ />
81
+ )}
82
+ />
83
+
84
+ <Route path="/template/:id"
85
+ render={(props) => (
86
+ <TemplateSingle
87
+ {...props}
88
+
89
+ ajaxUrl={GFPDF.ajaxUrl}
90
+ ajaxNonce={GFPDF.ajaxNonce}
91
+ pdfWorkingDirPath={GFPDF.pdfWorkingDir}
92
+
93
+ activateText={GFPDF.select}
94
+ templateDeleteText={GFPDF.delete}
95
+ templateConfirmDeleteText={GFPDF.doYouWantToDeleteTemplate}
96
+ templateDeleteErrorText={GFPDF.couldNotDeleteTemplate}
97
+ currentTemplateText={GFPDF.currentTemplate}
98
+ versionText={GFPDF.version}
99
+ groupText={GFPDF.group}
100
+ tagsText={GFPDF.tags}
101
+ showPreviousTemplateText={GFPDF.showPreviousTemplate}
102
+ showNextTemplateText={GFPDF.showNextTemplate}
103
+ />
104
+ )}
105
+ />
106
+
107
+ <Route component={Empty}/>
108
+ </Switch>
109
+ </Router>)
110
+
111
+ /**
112
+ * Setup React Router with our Redux Store
113
+ *
114
+ * @param {Object} store Redux Store
115
+ *
116
+ * @since 4.1
117
+ */
118
+ export default function TemplatesRouter (store) {
119
+ render((<Provider store={store}>
120
+ <Routes />
121
+ </Provider>), document.getElementById('gfpdf-overlay'))
122
  }
src/assets/js/react/selectors/getTemplates.js CHANGED
@@ -1,186 +1,186 @@
1
- import { createSelector } from 'reselect'
2
- import versionCompare from '../utilities/versionCompare'
3
-
4
- /**
5
- * Uses the Redux Reselect library to sort, filter and search our templates.
6
- * It also checks if the PDF templates are compatible with the current version of Gravity PDF
7
- *
8
- * @package Gravity PDF
9
- * @copyright Copyright (c) 2016, Blue Liquid Designs
10
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
11
- * @since 4.1
12
- */
13
-
14
- /*
15
- This file is part of Gravity PDF.
16
-
17
- Gravity PDF – Copyright (C) 2016, Blue Liquid Designs
18
-
19
- This program is free software; you can redistribute it and/or modify
20
- it under the terms of the GNU General Public License as published by
21
- the Free Software Foundation; either version 2 of the License, or
22
- (at your option) any later version.
23
-
24
- This program is distributed in the hope that it will be useful,
25
- but WITHOUT ANY WARRANTY; without even the implied warranty of
26
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
- GNU General Public License for more details.
28
-
29
- You should have received a copy of the GNU General Public License
30
- along with this program; if not, write to the Free Software
31
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32
- */
33
-
34
- /* Assign specific parts of the Redux store to constants (note, we are returning functions) */
35
- const getTemplates = (state) => state.template.list
36
- const getSearch = (state) => state.template.search
37
- const getActiveTemplate = (state) => state.template.activeTemplate
38
-
39
- /**
40
- * Searches our templates for specific terms and returns the results
41
- * This function is adapted from the Backbone.js filter for themes
42
- *
43
- * @param {string} term
44
- * @param {Object} templates Immutable List of templates
45
- *
46
- * @returns {Object} Filtered Immutable list of templates
47
- *
48
- * @since 4.1
49
- */
50
- export const searchTemplates = (term, templates) => {
51
- /*
52
- * Escape the term string for RegExp meta characters
53
- * Consider spaces as word delimiters and match the whole string
54
- */
55
- term = term.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')
56
- term = term.replace(/ /g, ')(?=.*')
57
-
58
- const match = new RegExp('^(?=.*' + term + ').+', 'i')
59
-
60
- /* Filter through the templates. Any templates return "true" in out match.test() statement will be included */
61
- const results = templates.filter((template) => {
62
-
63
- /* Do very basic HTML tag removal from the fields we are interested in */
64
- const name = template.get('template').replace(/(<([^>]+)>)/ig, '')
65
- const description = template.get('description').replace(/(<([^>]+)>)/ig, '')
66
- const author = template.get('author').replace(/(<([^>]+)>)/ig, '')
67
- const group = template.get('group').replace(/(<([^>]+)>)/ig, '')
68
-
69
- /* Check if our matching term(s) are found in the string */
70
- return match.test([ name, template.get('id'), group, description, author ].toString())
71
- })
72
-
73
- return results
74
- }
75
-
76
- /**
77
- * A PDF template sorting function
78
- *
79
- * The sort order is as follows:
80
- *
81
- * 1. Any new templates get auto-shifted to the back of the list (just installed)
82
- * 2. The active template gets auto-shifted to the front of the list
83
- * 3. The templates are then sorted alphabetically by group
84
- * 4. Then alphabetically by name
85
- *
86
- * @param {Object} templates The Immutable list of templates
87
- * @param {string} activeTemplate The current active PDF template
88
- *
89
- * @returns {Object} Sorted Immutable List
90
- *
91
- * @since 4.1
92
- */
93
- export const sortTemplates = (templates, activeTemplate) => {
94
- /* Sort out template list using our comparator function */
95
- return templates.sort((a, b) => {
96
-
97
- /* Shift new templates to the bottom (only on install) */
98
- if (a.get('new', false) === true && a.get('new', false) === true) {
99
- return 0 //equal
100
- }
101
-
102
- if (a.get('new', false) === true) {
103
- return 1
104
- }
105
-
106
- if (b.get('new', false) === true) {
107
- return -1
108
- }
109
-
110
- /* Hoist the active template above the rest */
111
- if (activeTemplate === a.get('id')) {
112
- return -1
113
- }
114
-
115
- if (activeTemplate === b.get('id')) {
116
- return 1
117
- }
118
-
119
- /* Order alphabetically by the group name */
120
- if (a.get('group') < b.get('group')) {
121
- return -1 //before
122
- }
123
-
124
- if (a.get('group') > b.get('group')) {
125
- return 1 //after
126
- }
127
-
128
- /* Then order alphabetically by the template name */
129
- if (a.get('template') < b.get('template')) {
130
- return -1 //before
131
- }
132
-
133
- if (a.get('template') > b.get('template')) {
134
- return 1 //after
135
- }
136
-
137
- return 0 //equal
138
- })
139
- }
140
-
141
- /**
142
- * Check all PDF templates for compatibility with the current verison of Gravity PDF
143
- * If they don't pass we'll also dynamically apply error messages
144
- *
145
- * @param {Object} templates The Immutable list of templates
146
- *
147
- * @returns {Object} The Immutable list of templates
148
- *
149
- * @since 4.1
150
- */
151
- export const addCompatibilityCheck = (templates) => {
152
- /* Apply this function to all templates */
153
- return templates.map((template) => {
154
- /* Get the PDF version and check it against the Gravity PDF version */
155
- const requiredVersion = template.get('required_pdf_version')
156
- if (versionCompare(requiredVersion, GFPDF.currentVersion, '>')) {
157
- /* Not compatible, so let's mark it */
158
- return template.merge({
159
- 'compatible': false,
160
- 'error': GFPDF.requiresGravityPdfVersion.replace(/%s/g, requiredVersion),
161
- 'long_error': GFPDF.templateNotCompatibleWithGravityPdfVersion.replace(/%s/g, requiredVersion)
162
- })
163
- }
164
- /* If versionCompare() passed we'll mark as true */
165
- return template.set('compatible', true)
166
- })
167
- }
168
-
169
- /**
170
- * Create our Reselect selector and apply to our store
171
- *
172
- * @since 4.1
173
- */
174
- export default createSelector(
175
- [ getTemplates, getSearch, getActiveTemplate ],
176
- (templates, search, activeTemplate) => {
177
-
178
- templates = addCompatibilityCheck(templates)
179
-
180
- if (search) {
181
- templates = searchTemplates(search, templates)
182
- }
183
-
184
- return sortTemplates(templates, activeTemplate)
185
- }
186
  )
1
+ import { createSelector } from 'reselect'
2
+ import versionCompare from '../utilities/versionCompare'
3
+
4
+ /**
5
+ * Uses the Redux Reselect library to sort, filter and search our templates.
6
+ * It also checks if the PDF templates are compatible with the current version of Gravity PDF
7
+ *
8
+ * @package Gravity PDF
9
+ * @copyright Copyright (c) 2017, Blue Liquid Designs
10
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
11
+ * @since 4.1
12
+ */
13
+
14
+ /*
15
+ This file is part of Gravity PDF.
16
+
17
+ Gravity PDF – Copyright (C) 2017, Blue Liquid Designs
18
+
19
+ This program is free software; you can redistribute it and/or modify
20
+ it under the terms of the GNU General Public License as published by
21
+ the Free Software Foundation; either version 2 of the License, or
22
+ (at your option) any later version.
23
+
24
+ This program is distributed in the hope that it will be useful,
25
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
26
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
+ GNU General Public License for more details.
28
+
29
+ You should have received a copy of the GNU General Public License
30
+ along with this program; if not, write to the Free Software
31
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32
+ */
33
+
34
+ /* Assign specific parts of the Redux store to constants (note, we are returning functions) */
35
+ const getTemplates = (state) => state.template.list
36
+ const getSearch = (state) => state.template.search
37
+ const getActiveTemplate = (state) => state.template.activeTemplate
38
+
39
+ /**
40
+ * Searches our templates for specific terms and returns the results
41
+ * This function is adapted from the Backbone.js filter for themes
42
+ *
43
+ * @param {string} term
44
+ * @param {Object} templates Immutable List of templates
45
+ *
46
+ * @returns {Object} Filtered Immutable list of templates
47
+ *
48
+ * @since 4.1
49
+ */
50
+ export const searchTemplates = (term, templates) => {
51
+ /*
52
+ * Escape the term string for RegExp meta characters
53
+ * Consider spaces as word delimiters and match the whole string
54
+ */
55
+ term = term.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')
56
+ term = term.replace(/ /g, ')(?=.*')
57
+
58
+ const match = new RegExp('^(?=.*' + term + ').+', 'i')
59
+
60
+ /* Filter through the templates. Any templates return "true" in out match.test() statement will be included */
61
+ const results = templates.filter((template) => {
62
+
63
+ /* Do very basic HTML tag removal from the fields we are interested in */
64
+ const name = template.get('template').replace(/(<([^>]+)>)/ig, '')
65
+ const description = template.get('description').replace(/(<([^>]+)>)/ig, '')
66
+ const author = template.get('author').replace(/(<([^>]+)>)/ig, '')
67
+ const group = template.get('group').replace(/(<([^>]+)>)/ig, '')
68
+
69
+ /* Check if our matching term(s) are found in the string */
70
+ return match.test([ name, template.get('id'), group, description, author ].toString())
71
+ })
72
+
73
+ return results
74
+ }
75
+
76
+ /**
77
+ * A PDF template sorting function
78
+ *
79
+ * The sort order is as follows:
80
+ *
81
+ * 1. Any new templates get auto-shifted to the back of the list (just installed)
82
+ * 2. The active template gets auto-shifted to the front of the list
83
+ * 3. The templates are then sorted alphabetically by group
84
+ * 4. Then alphabetically by name
85
+ *
86
+ * @param {Object} templates The Immutable list of templates
87
+ * @param {string} activeTemplate The current active PDF template
88
+ *
89
+ * @returns {Object} Sorted Immutable List
90
+ *
91
+ * @since 4.1
92
+ */
93
+ export const sortTemplates = (templates, activeTemplate) => {
94
+ /* Sort out template list using our comparator function */
95
+ return templates.sort((a, b) => {
96
+
97
+ /* Shift new templates to the bottom (only on install) */
98
+ if (a.get('new', false) === true && a.get('new', false) === true) {
99
+ return 0 //equal
100
+ }
101
+
102
+ if (a.get('new', false) === true) {
103
+ return 1
104
+ }
105
+
106
+ if (b.get('new', false) === true) {
107
+ return -1
108
+ }
109
+
110
+ /* Hoist the active template above the rest */
111
+ if (activeTemplate === a.get('id')) {
112
+ return -1
113
+ }
114
+
115
+ if (activeTemplate === b.get('id')) {
116
+ return 1
117
+ }
118
+
119
+ /* Order alphabetically by the group name */
120
+ if (a.get('group') < b.get('group')) {
121
+ return -1 //before
122
+ }
123
+
124
+ if (a.get('group') > b.get('group')) {
125
+ return 1 //after
126
+ }
127
+
128
+ /* Then order alphabetically by the template name */
129
+ if (a.get('template') < b.get('template')) {
130
+ return -1 //before
131
+ }
132
+
133
+ if (a.get('template') > b.get('template')) {
134
+ return 1 //after
135
+ }
136
+
137
+ return 0 //equal
138
+ })
139
+ }
140
+
141
+ /**
142
+ * Check all PDF templates for compatibility with the current verison of Gravity PDF
143
+ * If they don't pass we'll also dynamically apply error messages
144
+ *
145
+ * @param {Object} templates The Immutable list of templates
146
+ *
147
+ * @returns {Object} The Immutable list of templates
148
+ *
149
+ * @since 4.1
150
+ */
151
+ export const addCompatibilityCheck = (templates) => {
152
+ /* Apply this function to all templates */
153
+ return templates.map((template) => {
154
+ /* Get the PDF version and check it against the Gravity PDF version */
155
+ const requiredVersion = template.get('required_pdf_version')
156
+ if (versionCompare(requiredVersion, GFPDF.currentVersion, '>')) {
157
+ /* Not compatible, so let's mark it */
158
+ return template.merge({
159
+ 'compatible': false,
160
+ 'error': GFPDF.requiresGravityPdfVersion.replace(/%s/g, requiredVersion),
161
+ 'long_error': GFPDF.templateNotCompatibleWithGravityPdfVersion.replace(/%s/g, requiredVersion)
162
+ })
163
+ }
164
+ /* If versionCompare() passed we'll mark as true */
165
+ return template.set('compatible', true)
166
+ })
167
+ }
168
+
169
+ /**
170
+ * Create our Reselect selector and apply to our store
171
+ *
172
+ * @since 4.1
173
+ */
174
+ export default createSelector(
175
+ [ getTemplates, getSearch, getActiveTemplate ],
176
+ (templates, search, activeTemplate) => {
177
+
178
+ templates = addCompatibilityCheck(templates)
179
+
180
+ if (search) {
181
+ templates = searchTemplates(search, templates)
182
+ }
183
+
184
+ return sortTemplates(templates, activeTemplate)
185
+ }
186
  )
src/assets/js/react/utilities/versionCompare.js CHANGED
@@ -1,153 +1,153 @@
1
- /**
2
- * A JS-port of PHP's version_compare()
3
- *
4
- * This function is taken from the Locutus project which has an MIT license.
5
- * The MIT license and copyright notice is included
6
- *
7
- * https://github.com/kvz/locutus
8
- * https://github.com/kvz/locutus/blob/master/src/php/info/version_compare.js
9
- *
10
- * @param string v1 First version number
11
- * @param string v2 Second version number
12
- * @param string operator optional If the third optional operator argument is specified, test for a particular relationship.
13
- * The possible operators are: <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne respectively.
14
- * @returns -1 if the first version is lower than the second, 0 if they are equal, and 1 if the second is lower.
15
- * When using the optional operator argument, the function will return TRUE if the relationship is the one specified by the operator, FALSE otherwise.
16
- */
17
-
18
- /*
19
- Copyright (c) 2007-2016 Kevin van Zonneveld (http://kvz.io)
20
- and Contributors (http://locutus.io/authors)
21
-
22
- Permission is hereby granted, free of charge, to any person obtaining a copy of
23
- this software and associated documentation files (the "Software"), to deal in
24
- the Software without restriction, including without limitation the rights to
25
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
26
- of the Software, and to permit persons to whom the Software is furnished to do
27
- so, subject to the following conditions:
28
-
29
- The above copyright notice and this permission notice shall be included in all
30
- copies or substantial portions of the Software.
31
-
32
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
35
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
36
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
37
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
38
- SOFTWARE.
39
- */
40
- export default (v1, v2, operator) => {
41
- // discuss at: http://locutus.io/php/version_compare/
42
- // original by: Philippe Jausions (http://pear.php.net/user/jausions)
43
- // original by: Aidan Lister (http://aidanlister.com/)
44
- // reimplemented by: Kankrelune (http://www.webfaktory.info/)
45
- // improved by: Brett Zamir (http://brett-zamir.me)
46
- // improved by: Scott Baker
47
- // improved by: Theriault (https://github.com/Theriault)
48
- // example 1: version_compare('8.2.5rc', '8.2.5a')
49
- // returns 1: 1
50
- // example 2: version_compare('8.2.50', '8.2.52', '<')
51
- // returns 2: true
52
- // example 3: version_compare('5.3.0-dev', '5.3.0')
53
- // returns 3: -1
54
- // example 4: version_compare('4.1.0.52','4.01.0.51')
55
- // returns 4: 1
56
-
57
- // Important: compare must be initialized at 0.
58
- var i
59
- var x
60
- var compare = 0
61
-
62
- // vm maps textual PHP versions to negatives so they're less than 0.
63
- // PHP currently defines these as CASE-SENSITIVE. It is important to
64
- // leave these as negatives so that they can come before numerical versions
65
- // and as if no letters were there to begin with.
66
- // (1alpha is < 1 and < 1.1 but > 1dev1)
67
- // If a non-numerical value can't be mapped to this table, it receives
68
- // -7 as its value.
69
- var vm = {
70
- 'dev': -6,
71
- 'alpha': -5,
72
- 'a': -5,
73
- 'beta': -4,
74
- 'b': -4,
75
- 'RC': -3,
76
- 'rc': -3,
77
- '#': -2,
78
- 'p': 1,
79
- 'pl': 1
80
- }
81
-
82
- // This function will be called to prepare each version argument.
83
- // It replaces every _, -, and + with a dot.
84
- // It surrounds any nonsequence of numbers/dots with dots.
85
- // It replaces sequences of dots with a single dot.
86
- // version_compare('4..0', '4.0') === 0
87
- // Important: A string of 0 length needs to be converted into a value
88
- // even less than an unexisting value in vm (-7), hence [-8].
89
- // It's also important to not strip spaces because of this.
90
- // version_compare('', ' ') === 1
91
- var _prepVersion = function _prepVersion (v) {
92
- v = ('' + v).replace(/[_\-+]/g, '.')
93
- v = v.replace(/([^.\d]+)/g, '.$1.').replace(/\.{2,}/g, '.')
94
- return !v.length ? [ -8 ] : v.split('.')
95
- }
96
- // This converts a version component to a number.
97
- // Empty component becomes 0.
98
- // Non-numerical component becomes a negative number.
99
- // Numerical component becomes itself as an integer.
100
- var _numVersion = function _numVersion (v) {
101
- return !v ? 0 : isNaN(v) ? vm[ v ] || -7 : parseInt(v, 10)
102
- }
103
-
104
- v1 = _prepVersion(v1)
105
- v2 = _prepVersion(v2)
106
- x = Math.max(v1.length, v2.length)
107
- for (i = 0; i < x; i++) {
108
- if (v1[ i ] === v2[ i ]) {
109
- continue
110
- }
111
- v1[ i ] = _numVersion(v1[ i ])
112
- v2[ i ] = _numVersion(v2[ i ])
113
- if (v1[ i ] < v2[ i ]) {
114
- compare = -1
115
- break
116
- } else if (v1[ i ] > v2[ i ]) {
117
- compare = 1
118
- break
119
- }
120
- }
121
- if (!operator) {
122
- return compare
123
- }
124
-
125
- // Important: operator is CASE-SENSITIVE.
126
- // "No operator" seems to be treated as "<."
127
- // Any other values seem to make the function return null.
128
- switch (operator) {
129
- case '>':
130
- case 'gt':
131
- return compare > 0
132
- case '>=':
133
- case 'ge':
134
- return compare >= 0
135
- case '<=':
136
- case 'le':
137
- return compare <= 0
138
- case '===':
139
- case '=':
140
- case 'eq':
141
- return compare === 0
142
- case '<>':
143
- case '!==':
144
- case 'ne':
145
- return compare !== 0
146
- case '':
147
- case '<':
148
- case 'lt':
149
- return compare < 0
150
- default:
151
- return null
152
- }
153
  }
1
+ /**
2
+ * A JS-port of PHP's version_compare()
3
+ *
4
+ * This function is taken from the Locutus project which has an MIT license.
5
+ * The MIT license and copyright notice is included
6
+ *
7
+ * https://github.com/kvz/locutus
8
+ * https://github.com/kvz/locutus/blob/master/src/php/info/version_compare.js
9
+ *
10
+ * @param string v1 First version number
11
+ * @param string v2 Second version number
12
+ * @param string operator optional If the third optional operator argument is specified, test for a particular relationship.
13
+ * The possible operators are: <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne respectively.
14
+ * @returns -1 if the first version is lower than the second, 0 if they are equal, and 1 if the second is lower.
15
+ * When using the optional operator argument, the function will return TRUE if the relationship is the one specified by the operator, FALSE otherwise.
16
+ */
17
+
18
+ /*
19
+ Copyright (c) 2007-2016 Kevin van Zonneveld (http://kvz.io)
20
+ and Contributors (http://locutus.io/authors)
21
+
22
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
23
+ this software and associated documentation files (the "Software"), to deal in
24
+ the Software without restriction, including without limitation the rights to
25
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
26
+ of the Software, and to permit persons to whom the Software is furnished to do
27
+ so, subject to the following conditions:
28
+
29
+ The above copyright notice and this permission notice shall be included in all
30
+ copies or substantial portions of the Software.
31
+
32
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
35
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
36
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
37
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
38
+ SOFTWARE.
39
+ */
40
+ export default (v1, v2, operator) => {
41
+ // discuss at: http://locutus.io/php/version_compare/
42
+ // original by: Philippe Jausions (http://pear.php.net/user/jausions)
43
+ // original by: Aidan Lister (http://aidanlister.com/)
44
+ // reimplemented by: Kankrelune (http://www.webfaktory.info/)
45
+ // improved by: Brett Zamir (http://brett-zamir.me)
46
+ // improved by: Scott Baker
47
+ // improved by: Theriault (https://github.com/Theriault)
48
+ // example 1: version_compare('8.2.5rc', '8.2.5a')
49
+ // returns 1: 1
50
+ // example 2: version_compare('8.2.50', '8.2.52', '<')
51
+ // returns 2: true
52
+ // example 3: version_compare('5.3.0-dev', '5.3.0')
53
+ // returns 3: -1
54
+ // example 4: version_compare('4.1.0.52','4.01.0.51')
55
+ // returns 4: 1
56
+
57
+ // Important: compare must be initialized at 0.
58
+ var i
59
+ var x
60
+ var compare = 0
61
+
62
+ // vm maps textual PHP versions to negatives so they're less than 0.
63
+ // PHP currently defines these as CASE-SENSITIVE. It is important to
64
+ // leave these as negatives so that they can come before numerical versions
65
+ // and as if no letters were there to begin with.
66
+ // (1alpha is < 1 and < 1.1 but > 1dev1)
67
+ // If a non-numerical value can't be mapped to this table, it receives
68
+ // -7 as its value.
69
+ var vm = {
70
+ 'dev': -6,
71
+ 'alpha': -5,
72
+ 'a': -5,
73
+ 'beta': -4,
74
+ 'b': -4,
75
+ 'RC': -3,
76
+ 'rc': -3,
77
+ '#': -2,
78
+ 'p': 1,
79
+ 'pl': 1
80
+ }
81
+
82
+ // This function will be called to prepare each version argument.
83
+ // It replaces every _, -, and + with a dot.
84
+ // It surrounds any nonsequence of numbers/dots with dots.
85
+ // It replaces sequences of dots with a single dot.
86
+ // version_compare('4..0', '4.0') === 0
87
+ // Important: A string of 0 length needs to be converted into a value
88
+ // even less than an unexisting value in vm (-7), hence [-8].
89
+ // It's also important to not strip spaces because of this.
90
+ // version_compare('', ' ') === 1
91
+ var _prepVersion = function _prepVersion (v) {
92
+ v = ('' + v).replace(/[_\-+]/g, '.')
93
+ v = v.replace(/([^.\d]+)/g, '.$1.').replace(/\.{2,}/g, '.')
94
+ return !v.length ? [ -8 ] : v.split('.')
95
+ }
96
+ // This converts a version component to a number.
97
+ // Empty component becomes 0.
98
+ // Non-numerical component becomes a negative number.
99
+ // Numerical component becomes itself as an integer.
100
+ var _numVersion = function _numVersion (v) {
101
+ return !v ? 0 : isNaN(v) ? vm[ v ] || -7 : parseInt(v, 10)
102
+ }
103
+
104
+ v1 = _prepVersion(v1)
105
+ v2 = _prepVersion(v2)
106
+ x = Math.max(v1.length, v2.length)
107
+ for (i = 0; i < x; i++) {
108
+ if (v1[ i ] === v2[ i ]) {
109
+ continue
110
+ }
111
+ v1[ i ] = _numVersion(v1[ i ])
112
+ v2[ i ] = _numVersion(v2[ i ])
113
+ if (v1[ i ] < v2[ i ]) {
114
+ compare = -1
115
+ break
116
+ } else if (v1[ i ] > v2[ i ]) {
117
+ compare = 1
118
+ break
119
+ }
120
+ }
121
+ if (!operator) {
122
+ return compare
123
+ }
124
+
125
+ // Important: operator is CASE-SENSITIVE.
126
+ // "No operator" seems to be treated as "<."
127
+ // Any other values seem to make the function return null.
128
+ switch (operator) {
129
+ case '>':
130
+ case 'gt':
131
+ return compare > 0
132
+ case '>=':
133
+ case 'ge':
134
+ return compare >= 0
135
+ case '<=':
136
+ case 'le':
137
+ return compare <= 0
138
+ case '===':
139
+ case '=':
140
+ case 'eq':
141
+ return compare === 0
142
+ case '<>':
143
+ case '!==':
144
+ case 'ne':
145
+ return compare !== 0
146
+ case '':
147
+ case '<':
148
+ case 'lt':
149
+ return compare < 0
150
+ default:
151
+ return null
152
+ }
153
  }
src/assets/languages/README.MD CHANGED
@@ -1,36 +1,36 @@
1
- ### Including your own Translations for Gravity PDF
2
-
3
- Don't place any .mo / .po files in this directory. They will be overridden when the plugin is updated.
4
- Instead, put them in your language directory – by default this is /wp-content/languages/plugins/.
5
-
6
- Make sure you name your .mo files `gravity-forms-pdf-extended-{:wp_locale}.mo`, where {:wp_locale} is the ID found
7
- in this list: https://make.wordpress.org/polyglots/teams/.
8
-
9
- For example, if you had a translation for Bengali you would name the file `gravity-forms-pdf-extended-bn_BD.mo`
10
-
11
- The same naming convension applies to .po files.
12
-
13
- ### Contributing Translations
14
-
15
- Feel free to email `support [at] gravitypdf [dot] com` with your .mo and .po files and we'll include them in the plugin.
16
-
17
- Better yet, join the WordPress Translation Community and help translate, review, or improve a translation for Gravity PDF:
18
- https://translate.wordpress.org/projects/wp-plugins/gravity-forms-pdf-extended
19
-
20
- Once a language is 95% translated on WordPress.org we'll start using that language pack and stop shipping the associated
21
- .po / .mo files in the plugin.
22
-
23
- More info can be found at https://make.wordpress.org/polyglots/
24
-
25
- ### What are .po / .mo files?
26
-
27
- They are special language files that WordPress uses to automatically translate the plugin from English to your language of choice.
28
-
29
- You can create these files by using a free program called Poedit. [There's a guide on WordPress.org](https://make.wordpress.org/polyglots/handbook/tools/poedit)
30
- showing you the basic steps for importing a translation template (called a .pot file), translating and generating .po and .mo files.
31
-
32
- Once generated, use the appropriate naming convension and save it in the language directory (see above for details).
33
-
34
- This directory contains an up-to-date .pot file you can use with Poedit.
35
-
36
 
1
+ ### Including your own Translations for Gravity PDF
2
+
3
+ Don't place any .mo / .po files in this directory. They will be overridden when the plugin is updated.
4
+ Instead, put them in your language directory – by default this is /wp-content/languages/plugins/.
5
+
6
+ Make sure you name your .mo files `gravity-forms-pdf-extended-{:wp_locale}.mo`, where {:wp_locale} is the ID found
7
+ in this list: https://make.wordpress.org/polyglots/teams/.
8
+
9
+ For example, if you had a translation for Bengali you would name the file `gravity-forms-pdf-extended-bn_BD.mo`
10
+
11
+ The same naming convension applies to .po files.
12
+
13
+ ### Contributing Translations
14
+
15
+ Feel free to email `support [at] gravitypdf [dot] com` with your .mo and .po files and we'll include them in the plugin.
16
+
17
+ Better yet, join the WordPress Translation Community and help translate, review, or improve a translation for Gravity PDF:
18
+ https://translate.wordpress.org/projects/wp-plugins/gravity-forms-pdf-extended
19
+
20
+ Once a language is 95% translated on WordPress.org we'll start using that language pack and stop shipping the associated
21
+ .po / .mo files in the plugin.
22
+
23
+ More info can be found at https://make.wordpress.org/polyglots/
24
+
25
+ ### What are .po / .mo files?
26
+
27
+ They are special language files that WordPress uses to automatically translate the plugin from English to your language of choice.
28
+
29
+ You can create these files by using a free program called Poedit. [There's a guide on WordPress.org](https://make.wordpress.org/polyglots/handbook/tools/poedit)
30
+ showing you the basic steps for importing a translation template (called a .pot file), translating and generating .po and .mo files.
31
+
32
+ Once generated, use the appropriate naming convension and save it in the language directory (see above for details).
33
+
34
+ This directory contains an up-to-date .pot file you can use with Poedit.
35
+
36
 
src/assets/languages/gravity-forms-pdf-extended-en_AU.po CHANGED
@@ -1,2595 +1,2595 @@
1
- # Copyright (C) 2016 gravity-forms-pdf-extended
2
- # This file is distributed under the same license as the gravity-forms-pdf-extended package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: gravity-forms-pdf-extended\n"
6
- "POT-Creation-Date: \n"
7
- "PO-Revision-Date: 2017-01-19 09:47+1100\n"
8
- "Last-Translator: Jake Jackson <support@gravitypdf.com>\n"
9
- "Language-Team: \n"
10
- "Language: en_AU\n"
11
- "MIME-Version: 1.0\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
- "Content-Transfer-Encoding: 8bit\n"
14
- "X-Poedit-Basepath: ..\n"
15
- "X-Poedit-SourceCharset: UTF-8\n"
16
- "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
17
- "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
18
- "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
19
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
20
- "X-Generator: Poedit 1.8.11\n"
21
- "X-Poedit-SearchPath-0: .\n"
22
- "X-Poedit-SearchPath-1: languages\n"
23
- "X-Poedit-SearchPathExcluded-0: *.js\n"
24
-
25
- #: api.php:503
26
- msgid ""
27
- "The $type parameter is invalid. Only \"view\" and \"model\" are accepted"
28
- msgstr ""
29
- "The $type parameter is invalid. Only \"view\" and \"model\" are accepted"
30
-
31
- #: api.php:793
32
- msgid ""
33
- "The option key %s already exists. Use GPDFAPI::update_plugin_option instead"
34
- msgstr ""
35
- "The option key %s already exists. Use GPDFAPI::update_plugin_option instead"
36
-
37
- #: pdf.php:379
38
- msgid "WordPress Version %s is required. %sGet more info%s."
39
- msgstr "WordPress Version %s is required. %sGet more info%s."
40
-
41
- #: pdf.php:417
42
- msgid "%sGravity Forms%s Version %s is required. %sGet more info%s."
43
- msgstr "%sGravity Forms%s Version %s is required. %sGet more info%s."
44
-
45
- #: pdf.php:455
46
- msgid ""
47
- "You are running an %soutdated version of PHP%s. Contact your web hosting "
48
- "provider to update. %sGet more info%s."
49
- msgstr ""
50
- "You are running an %soutdated version of PHP%s. Contact your web hosting "
51
- "provider to update. %sGet more info%s."
52
-
53
- #: pdf.php:493
54
- msgid ""
55
- "The PHP Extension MB String could not be detected. Contact your web hosting "
56
- "provider to fix. %sGet more info%s."
57
- msgstr ""
58
- "The PHP Extension MB String could not be detected. Contact your web hosting "
59
- "provider to fix. %sGet more info%s."
60
-
61
- #: pdf.php:531
62
- msgid ""
63
- "The PHP Extension MB String does not have MB Regex enabled. Contact your web "
64
- "hosting provider to fix. %sGet more info%s."
65
- msgstr ""
66
- "The PHP Extension MB String does not have MB Regex enabled. Contact your web "
67
- "hosting provider to fix. %sGet more info%s."
68
-
69
- #: pdf.php:569
70
- msgid ""
71
- "The PHP Extension GD Image Library could not be detected. Contact your web "
72
- "hosting provider to fix. %sGet more info%s."
73
- msgstr ""
74
- "The PHP Extension GD Image Library could not be detected. Contact your web "
75
- "hosting provider to fix. %sGet more info%s."
76
-
77
- #: pdf.php:607
78
- msgid ""
79
- "The PHP DOM Extension was not found. Contact your web hosting provider to "
80
- "fix. %sGet more info%s."
81
- msgstr ""
82
- "The PHP DOM Extension was not found. Contact your web hosting provider to "
83
- "fix. %sGet more info%s."
84
-
85
- #: pdf.php:621
86
- msgid ""
87
- "The PHP Extension libxml could not be detected. Contact your web hosting "
88
- "provider to fix. %sGet more info%s."
89
- msgstr ""
90
- "The PHP Extension libxml could not be detected. Contact your web hosting "
91
- "provider to fix. %sGet more info%s."
92
-
93
- #: pdf.php:667
94
- msgid ""
95
- "You need %s128MB%s of WP Memory (RAM) but we only found %s available. %sTry "
96
- "these methods to increase your memory limit%s, otherwise contact your web "
97
- "hosting provider to fix."
98
- msgstr ""
99
- "You need %s128MB%s of WP Memory (RAM) but we only found %s available. %sTry "
100
- "these methods to increase your memory limit%s, otherwise contact your web "
101
- "hosting provider to fix."
102
-
103
- #: pdf.php:801
104
- msgid "Gravity PDF Installation Problem"
105
- msgstr "Gravity PDF Installation Problem"
106
-
107
- #: pdf.php:805
108
- msgid ""
109
- "The minimum requirements for Gravity PDF have not been met. Please fix the "
110
- "issue(s) below to continue:"
111
- msgstr ""
112
- "The minimum requirements for Gravity PDF have not been met. Please fix the "
113
- "issue(s) below to continue:"
114
-
115
- #: src/bootstrap.php:315, src/bootstrap.php:339, src/deprecated.php:111,
116
- #: src/deprecated.php:135
117
- msgid "\"%s\" has been deprecated as of Gravity PDF 4.0"
118
- msgstr "\"%s\" has been deprecated as of Gravity PDF 4.0"
119
-
120
- #: src/bootstrap.php:799
121
- msgid "View Gravity PDF Settings"
122
- msgstr "View Gravity PDF Settings"
123
-
124
- #: src/bootstrap.php:799
125
- msgid "Settings"
126
- msgstr "Settings"
127
-
128
- #: src/bootstrap.php:839
129
- msgid "View Gravity PDF Documentation"
130
- msgstr "View Gravity PDF Documentation"
131
-
132
- #: src/bootstrap.php:839
133
- msgid "Docs"
134
- msgstr "Docs"
135
-
136
- #: src/bootstrap.php:841
137
- msgid "Get Help and Support"
138
- msgstr "Get Help and Support"
139
-
140
- #: src/bootstrap.php:841
141
- msgid "Support"
142
- msgstr "Support"
143
-
144
- #: src/bootstrap.php:843
145
- msgid "View Gravity PDF Theme Shop"
146
- msgstr "View Gravity PDF Theme Shop"
147
-
148
- #: src/bootstrap.php:843
149
- msgid "Theme Shop"
150
- msgstr "Theme Shop"
151
-
152
- #: src/bootstrap.php:1323, src/controller/Controller_Shortcodes.php:301,
153
- #: src/helper/Helper_Data.php:349
154
- msgid "Gravity PDF"
155
- msgstr "Gravity PDF"
156
-
157
- #: src/controller/Controller_Actions.php:311
158
- msgid "Review Submitted"
159
- msgstr "Review Submitted"
160
-
161
- #: src/controller/Controller_Actions.php:331
162
- msgid "Begin Migration"
163
- msgstr "Begin Migration"
164
-
165
- #: src/controller/Controller_Actions.php:469,
166
- #: src/model/Model_Form_Settings.php:379,
167
- #: src/model/Model_Form_Settings.php:449,
168
- #: src/model/Model_Form_Settings.php:569, src/view/View_Settings.php:535
169
- msgid "You do not have permission to access this page"
170
- msgstr "You do not have permission to access this page"
171
-
172
- #: src/controller/Controller_Actions.php:483,
173
- #: src/helper/Helper_Migration.php:319
174
- msgid "There was a problem processing the action. Please try again."
175
- msgstr "There was a problem processing the action. Please try again."
176
-
177
- #: src/controller/Controller_Install.php:469
178
- msgid "There was a problem uninstalling Gravity PDF. Please try again."
179
- msgstr "There was a problem uninstalling Gravity PDF. Please try again."
180
-
181
- #: src/controller/Controller_PDF.php:617, src/view/View_PDF.php:523
182
- msgid "There was a problem generating your PDF"
183
- msgstr "There was a problem generating your PDF"
184
-
185
- #: src/controller/Controller_Settings.php:675
186
- msgid "There was a problem installing the PDF templates. Please try again."
187
- msgstr "There was a problem installing the PDF templates. Please try again."
188
-
189
- #: src/helper/abstract/Helper_Abstract_Options.php:779,
190
- #: src/helper/abstract/Helper_Abstract_Options.php:811
191
- msgid "You must pass in a valid form ID"
192
- msgstr "You must pass in a valid form ID"
193
-
194
- #: src/helper/abstract/Helper_Abstract_Options.php:901
195
- msgid "You must pass in a valid PDF ID"
196
- msgstr "You must pass in a valid PDF ID"
197
-
198
- #: src/helper/abstract/Helper_Abstract_Options.php:1613
199
- msgid "Gravity Forms Capabilities"
200
- msgstr "Gravity Forms Capabilities"
201
-
202
- #: src/helper/abstract/Helper_Abstract_Options.php:1625
203
- msgid "Active WordPress Capabilities"
204
- msgstr "Active WordPress Capabilities"
205
-
206
- #: src/helper/abstract/Helper_Abstract_Options.php:1673
207
- msgid "Common Sizes"
208
- msgstr "Common Sizes"
209
-
210
- #: src/helper/abstract/Helper_Abstract_Options.php:1675
211
- msgid "A4 (210 x 297mm)"
212
- msgstr "A4 (210 x 297mm)"
213
-
214
- #: src/helper/abstract/Helper_Abstract_Options.php:1677
215
- msgid "Letter (8.5 x 11in)"
216
- msgstr "Letter (8.5 x 11in)"
217
-
218
- #: src/helper/abstract/Helper_Abstract_Options.php:1679
219
- msgid "Legal (8.5 x 14in)"
220
- msgstr "Legal (8.5 x 14in)"
221
-
222
- #: src/helper/abstract/Helper_Abstract_Options.php:1681
223
- msgid "Ledger / Tabloid (11 x 17in)"
224
- msgstr "Ledger / Tabloid (11 x 17in)"
225
-
226
- #: src/helper/abstract/Helper_Abstract_Options.php:1683
227
- msgid "Executive (7 x 10in)"
228
- msgstr "Executive (7 x 10in)"
229
-
230
- #: src/helper/abstract/Helper_Abstract_Options.php:1685,
231
- #: src/helper/Helper_Options_Fields.php:195,
232
- #: src/helper/Helper_Options_Fields.php:723
233
- msgid "Custom Paper Size"
234
- msgstr "Custom Paper Size"
235
-
236
- #: src/helper/abstract/Helper_Abstract_Options.php:1691
237
- msgid "\"A\" Sizes"
238
- msgstr "\"A\" Sizes"
239
-
240
- #: src/helper/abstract/Helper_Abstract_Options.php:1693
241
- msgid "A0 (841 x 1189mm)"
242
- msgstr "A0 (841 x 1189mm)"
243
-
244
- #: src/helper/abstract/Helper_Abstract_Options.php:1695
245
- msgid "A1 (594 x 841mm)"
246
- msgstr "A1 (594 x 841mm)"
247
-
248
- #: src/helper/abstract/Helper_Abstract_Options.php:1697
249
- msgid "A2 (420 x 594mm)"
250
- msgstr "A2 (420 x 594mm)"
251
-
252
- #: src/helper/abstract/Helper_Abstract_Options.php:1699
253
- msgid "A3 (297 x 420mm)"
254
- msgstr "A3 (297 x 420mm)"
255
-
256
- #: src/helper/abstract/Helper_Abstract_Options.php:1701
257
- msgid "A5 (210 x 297mm)"
258
- msgstr "A5 (210 x 297mm)"
259
-
260
- #: src/helper/abstract/Helper_Abstract_Options.php:1703
261
- msgid "A6 (105 x 148mm)"
262
- msgstr "A6 (105 x 148mm)"
263
-
264
- #: src/helper/abstract/Helper_Abstract_Options.php:1705
265
- msgid "A7 (74 x 105mm)"
266
- msgstr "A7 (74 x 105mm)"
267
-
268
- #: src/helper/abstract/Helper_Abstract_Options.php:1707
269
- msgid "A8 (52 x 74mm)"
270
- msgstr "A8 (52 x 74mm)"
271
-
272
- #: src/helper/abstract/Helper_Abstract_Options.php:1709
273
- msgid "A9 (37 x 52mm)"
274
- msgstr "A9 (37 x 52mm)"
275
-
276
- #: src/helper/abstract/Helper_Abstract_Options.php:1711
277
- msgid "A10 (26 x 37mm)"
278
- msgstr "A10 (26 x 37mm)"
279
-
280
- #: src/helper/abstract/Helper_Abstract_Options.php:1717
281
- msgid "\"B\" Sizes"
282
- msgstr "\"B\" Sizes"
283
-
284
- #: src/helper/abstract/Helper_Abstract_Options.php:1719
285
- msgid "B0 (1414 x 1000mm)"
286
- msgstr "B0 (1414 x 1000mm)"
287
-
288
- #: src/helper/abstract/Helper_Abstract_Options.php:1721
289
- msgid "B1 (1000 x 707mm)"
290
- msgstr "B1 (1000 x 707mm)"
291
-
292
- #: src/helper/abstract/Helper_Abstract_Options.php:1723
293
- msgid "B2 (707 x 500mm)"
294
- msgstr "B2 (707 x 500mm)"
295
-
296
- #: src/helper/abstract/Helper_Abstract_Options.php:1725
297
- msgid "B3 (500 x 353mm)"
298
- msgstr "B3 (500 x 353mm)"
299
-
300
- #: src/helper/abstract/Helper_Abstract_Options.php:1727
301
- msgid "B4 (353 x 250mm)"
302
- msgstr "B4 (353 x 250mm)"
303
-
304
- #: src/helper/abstract/Helper_Abstract_Options.php:1729
305
- msgid "B5 (250 x 176mm)"
306
- msgstr "B5 (250 x 176mm)"
307
-
308
- #: src/helper/abstract/Helper_Abstract_Options.php:1731
309
- msgid "B6 (176 x 125mm)"
310
- msgstr "B6 (176 x 125mm)"
311
-
312
- #: src/helper/abstract/Helper_Abstract_Options.php:1733
313
- msgid "B7 (125 x 88mm)"
314
- msgstr "B7 (125 x 88mm)"
315
-
316
- #: src/helper/abstract/Helper_Abstract_Options.php:1735
317
- msgid "B8 (88 x 62mm)"
318
- msgstr "B8 (88 x 62mm)"
319
-
320
- #: src/helper/abstract/Helper_Abstract_Options.php:1737
321
- msgid "B9 (62 x 44mm)"
322
- msgstr "B9 (62 x 44mm)"
323
-
324
- #: src/helper/abstract/Helper_Abstract_Options.php:1739
325
- msgid "B10 (44 x 31mm)"
326
- msgstr "B10 (44 x 31mm)"
327
-
328
- #: src/helper/abstract/Helper_Abstract_Options.php:1745
329
- msgid "\"C\" Sizes"
330
- msgstr "\"C\" Sizes"
331
-
332
- #: src/helper/abstract/Helper_Abstract_Options.php:1747
333
- msgid "C0 (1297 x 917mm)"
334
- msgstr "C0 (1297 x 917mm)"
335
-
336
- #: src/helper/abstract/Helper_Abstract_Options.php:1749
337
- msgid "C1 (917 x 648mm)"
338
- msgstr "C1 (917 x 648mm)"
339
-
340
- #: src/helper/abstract/Helper_Abstract_Options.php:1751
341
- msgid "C2 (648 x 458mm)"
342
- msgstr "C2 (648 x 458mm)"
343
-
344
- #: src/helper/abstract/Helper_Abstract_Options.php:1753
345
- msgid "C3 (458 x 324mm)"
346
- msgstr "C3 (458 x 324mm)"
347
-
348
- #: src/helper/abstract/Helper_Abstract_Options.php:1755
349
- msgid "C4 (324 x 229mm)"
350
- msgstr "C4 (324 x 229mm)"
351
-
352
- #: src/helper/abstract/Helper_Abstract_Options.php:1757
353
- msgid "C5 (229 x 162mm)"
354
- msgstr "C5 (229 x 162mm)"
355
-
356
- #: src/helper/abstract/Helper_Abstract_Options.php:1759
357
- msgid "C6 (162 x 114mm)"
358
- msgstr "C6 (162 x 114mm)"
359
-
360
- #: src/helper/abstract/Helper_Abstract_Options.php:1761
361
- msgid "C7 (114 x 81mm)"
362
- msgstr "C7 (114 x 81mm)"
363
-
364
- #: src/helper/abstract/Helper_Abstract_Options.php:1763
365
- msgid "C8 (81 x 57mm)"
366
- msgstr "C8 (81 x 57mm)"
367
-
368
- #: src/helper/abstract/Helper_Abstract_Options.php:1765
369
- msgid "C9 (57 x 40mm)"
370
- msgstr "C9 (57 x 40mm)"
371
-
372
- #: src/helper/abstract/Helper_Abstract_Options.php:1767
373
- msgid "C10 (40 x 28mm)"
374
- msgstr "C10 (40 x 28mm)"
375
-
376
- #: src/helper/abstract/Helper_Abstract_Options.php:1773
377
- msgid "\"RA\" and \"SRA\" Sizes"
378
- msgstr "\"RA\" and \"SRA\" Sizes"
379
-
380
- #: src/helper/abstract/Helper_Abstract_Options.php:1775
381
- msgid "RA0 (860 x 1220mm)"
382
- msgstr "RA0 (860 x 1220mm)"
383
-
384
- #: src/helper/abstract/Helper_Abstract_Options.php:1777
385
- msgid "RA1 (610 x 860mm)"
386
- msgstr "RA1 (610 x 860mm)"
387
-
388
- #: src/helper/abstract/Helper_Abstract_Options.php:1779
389
- msgid "RA2 (430 x 610mm)"
390
- msgstr "RA2 (430 x 610mm)"
391
-
392
- #: src/helper/abstract/Helper_Abstract_Options.php:1781
393
- msgid "RA3 (305 x 430mm)"
394
- msgstr "RA3 (305 x 430mm)"
395
-
396
- #: src/helper/abstract/Helper_Abstract_Options.php:1783
397
- msgid "RA4 (215 x 305mm)"
398
- msgstr "RA4 (215 x 305mm)"
399
-
400
- #: src/helper/abstract/Helper_Abstract_Options.php:1785
401
- msgid "SRA0 (900 x 1280mm)"
402
- msgstr "SRA0 (900 x 1280mm)"
403
-
404
- #: src/helper/abstract/Helper_Abstract_Options.php:1787
405
- msgid "SRA1 (640 x 900mm)"
406
- msgstr "SRA1 (640 x 900mm)"
407
-
408
- #: src/helper/abstract/Helper_Abstract_Options.php:1789
409
- msgid "SRA2 (450 x 640mm)"
410
- msgstr "SRA2 (450 x 640mm)"
411
-
412
- #: src/helper/abstract/Helper_Abstract_Options.php:1791
413
- msgid "SRA3 (320 x 450mm)"
414
- msgstr "SRA3 (320 x 450mm)"
415
-
416
- #: src/helper/abstract/Helper_Abstract_Options.php:1793
417
- msgid "SRA4 (225 x 320mm)"
418
- msgstr "SRA4 (225 x 320mm)"
419
-
420
- #: src/helper/abstract/Helper_Abstract_Options.php:1823
421
- msgid "Unicode"
422
- msgstr "Unicode"
423
-
424
- #: src/helper/abstract/Helper_Abstract_Options.php:1851
425
- msgid "Indic"
426
- msgstr "Indic"
427
-
428
- #: src/helper/abstract/Helper_Abstract_Options.php:1861
429
- msgid "Arabic"
430
- msgstr "Arabic"
431
-
432
- #: src/helper/abstract/Helper_Abstract_Options.php:1873
433
- msgid "Other"
434
- msgstr "Other"
435
-
436
- #: src/helper/abstract/Helper_Abstract_Options.php:1977,
437
- #: src/model/Model_Settings.php:665
438
- msgid "User-Defined Fonts"
439
- msgstr "User-Defined Fonts"
440
-
441
- #: src/helper/abstract/Helper_Abstract_Options.php:2115
442
- msgid "Copy"
443
- msgstr "Copy"
444
-
445
- #: src/helper/abstract/Helper_Abstract_Options.php:2117
446
- msgid "Print - Low Resolution"
447
- msgstr "Print - Low Resolution"
448
-
449
- #: src/helper/abstract/Helper_Abstract_Options.php:2119
450
- msgid "Print - High Resolution"
451
- msgstr "Print - High Resolution"
452
-
453
- #: src/helper/abstract/Helper_Abstract_Options.php:2121
454
- msgid "Modify"
455
- msgstr "Modify"
456
-
457
- #: src/helper/abstract/Helper_Abstract_Options.php:2123
458
- msgid "Annotate"
459
- msgstr "Annotate"
460
-
461
- #: src/helper/abstract/Helper_Abstract_Options.php:2125
462
- msgid "Fill Forms"
463
- msgstr "Fill Forms"
464
-
465
- #: src/helper/abstract/Helper_Abstract_Options.php:2127
466
- msgid "Extract"
467
- msgstr "Extract"
468
-
469
- #: src/helper/abstract/Helper_Abstract_Options.php:2129
470
- msgid "Assemble"
471
- msgstr "Assemble"
472
-
473
- #: src/helper/abstract/Helper_Abstract_Options.php:2379
474
- msgid "Settings updated."
475
- msgstr "Settings updated."
476
-
477
- #: src/helper/abstract/Helper_Abstract_Options.php:2639,
478
- #: src/helper/abstract/Helper_Abstract_Options.php:2655,
479
- #: src/helper/abstract/Helper_Abstract_Options.php:2671,
480
- #: tests/phpunit/unit-tests/test-settings.php:525,
481
- #: tests/phpunit/unit-tests/test-settings.php:527,
482
- #: tests/phpunit/unit-tests/test-settings.php:529
483
- msgid ""
484
- "PDF Settings could not be saved. Please enter all required information below."
485
- msgstr ""
486
- "PDF Settings could not be saved. Please enter all required information below."
487
-
488
- #: src/helper/abstract/Helper_Abstract_Options.php:3767,
489
- #: src/helper/abstract/Helper_Abstract_Options.php:3769
490
- msgid "Select Media"
491
- msgstr "Select Media"
492
-
493
- #: src/helper/abstract/Helper_Abstract_Options.php:3771
494
- msgid "Upload File"
495
- msgstr "Upload File"
496
-
497
- #: src/helper/abstract/Helper_Abstract_Options.php:4085
498
- msgid "Width"
499
- msgstr "Width"
500
-
501
- #: src/helper/abstract/Helper_Abstract_Options.php:4087
502
- msgid "Height"
503
- msgstr "Height"
504
-
505
- #: src/helper/abstract/Helper_Abstract_Options.php:4093
506
- msgid "mm"
507
- msgstr "mm"
508
-
509
- #: src/helper/abstract/Helper_Abstract_Options.php:4095
510
- msgid "inches"
511
- msgstr "inches"
512
-
513
- #: src/helper/abstract/Helper_Abstract_Options.php:4215
514
- msgid "The callback used for the %s setting is missing."
515
- msgstr "The callback used for the %s setting is missing."
516
-
517
- #: src/helper/abstract/Helper_Abstract_View.php:287
518
- msgid "Cannot find file %s"
519
- msgstr "Cannot find file %s"
520
-
521
- #: src/helper/fields/Field_Products.php:381
522
- msgid "Subtotal"
523
- msgstr "Subtotal"
524
-
525
- #: src/helper/fields/Field_Products.php:391
526
- msgid "Shipping (%s)"
527
- msgstr "Shipping (%s)"
528
-
529
- #: src/helper/Helper_Data.php:347, src/model/Model_Mergetags.php:269
530
- msgid "PDF"
531
- msgstr "PDF"
532
-
533
- #: src/helper/Helper_Data.php:405
534
- msgid "Loading..."
535
- msgstr "Loading..."
536
-
537
- #: src/helper/Helper_Data.php:407
538
- msgid "Continue"
539
- msgstr "Continue"
540
-
541
- #: src/helper/Helper_Data.php:409
542
- msgid "Uninstall"
543
- msgstr "Uninstall"
544
-
545
- #: src/helper/Helper_Data.php:411
546
- msgid "Cancel"
547
- msgstr "Cancel"
548
-
549
- #: src/helper/Helper_Data.php:413, src/helper/Helper_PDF_List_Table.php:675
550
- msgid "Delete"
551
- msgstr "Delete"
552
-
553
- #: src/helper/Helper_Data.php:415, src/helper/Helper_PDF_List_Table.php:493,
554
- #: src/helper/Helper_PDF_List_Table.php:495,
555
- #: src/model/Model_Form_Settings.php:1765
556
- msgid "Active"
557
- msgstr "Active"
558
-
559
- #: src/helper/Helper_Data.php:417, src/helper/Helper_PDF_List_Table.php:493,
560
- #: src/helper/Helper_PDF_List_Table.php:495,
561
- #: src/model/Model_Form_Settings.php:1765
562
- msgid "Inactive"
563
- msgstr "Inactive"
564
-
565
- #: src/helper/Helper_Data.php:419
566
- msgid "this PDF if"
567
- msgstr "this PDF if"
568
-
569
- #: src/helper/Helper_Data.php:421, src/helper/Helper_Options_Fields.php:359,
570
- #: src/helper/Helper_Options_Fields.php:425
571
- msgid "Enable"
572
- msgstr "Enable"
573
-
574
- #: src/helper/Helper_Data.php:423, src/helper/Helper_Options_Fields.php:361,
575
- #: src/helper/Helper_Options_Fields.php:427
576
- msgid "Disable"
577
- msgstr "Disable"
578
-
579
- #: src/helper/Helper_Data.php:425
580
- msgid "Successfully Updated"
581
- msgstr "Successfully Updated"
582
-
583
- #: src/helper/Helper_Data.php:427
584
- msgid "Successfully Deleted"
585
- msgstr "Successfully Deleted"
586
-
587
- #: src/helper/Helper_Data.php:429, src/helper/Helper_Options_Fields.php:309,
588
- #: src/helper/Helper_Options_Fields.php:313,
589
- #: src/helper/Helper_Options_Fields.php:431,
590
- #: src/helper/Helper_Options_Fields.php:847,
591
- #: src/helper/Helper_Options_Fields.php:943,
592
- #: src/helper/Helper_Options_Fields.php:947,
593
- #: src/helper/Helper_Options_Fields.php:1047,
594
- #: src/helper/Helper_Options_Fields.php:1051,
595
- #: src/helper/Helper_Options_Fields.php:1073,
596
- #: src/helper/Helper_Options_Fields.php:1077,
597
- #: src/helper/Helper_Options_Fields.php:1099,
598
- #: src/helper/Helper_Options_Fields.php:1181,
599
- #: src/helper/Helper_Options_Fields.php:1185,
600
- #: src/helper/Helper_Options_Fields.php:1227,
601
- #: src/helper/Helper_Options_Fields.php:1231,
602
- #: src/helper/Helper_Options_Fields.php:1269,
603
- #: src/helper/Helper_Options_Fields.php:1273,
604
- #: src/helper/Helper_Options_Fields.php:1311,
605
- #: src/helper/Helper_Options_Fields.php:1315,
606
- #: src/helper/Helper_Options_Fields.php:1353,
607
- #: src/helper/Helper_Options_Fields.php:1357,
608
- #: src/helper/Helper_Options_Fields.php:1395,
609
- #: src/helper/Helper_Options_Fields.php:1439,
610
- #: src/helper/Helper_Options_Fields.php:1443
611
- msgid "No"
612
- msgstr "No"
613
-
614
- #: src/helper/Helper_Data.php:431, src/helper/Helper_Options_Fields.php:307,
615
- #: src/helper/Helper_Options_Fields.php:845,
616
- #: src/helper/Helper_Options_Fields.php:941,
617
- #: src/helper/Helper_Options_Fields.php:1045,
618
- #: src/helper/Helper_Options_Fields.php:1071,
619
- #: src/helper/Helper_Options_Fields.php:1097,
620
- #: src/helper/Helper_Options_Fields.php:1179,
621
- #: src/helper/Helper_Options_Fields.php:1225,
622
- #: src/helper/Helper_Options_Fields.php:1267,
623
- #: src/helper/Helper_Options_Fields.php:1309,
624
- #: src/helper/Helper_Options_Fields.php:1351,
625
- #: src/helper/Helper_Options_Fields.php:1393,
626
- #: src/helper/Helper_Options_Fields.php:1399,
627
- #: src/helper/Helper_Options_Fields.php:1437
628
- msgid "Yes"
629
- msgstr "Yes"
630
-
631
- #: src/helper/Helper_Data.php:433
632
- msgid "Standard"
633
- msgstr "Standard"
634
-
635
- #: src/helper/Helper_Data.php:435
636
- msgid "Advanced"
637
- msgstr "Advanced"
638
-
639
- #: src/helper/Helper_Data.php:437
640
- msgid "Activate"
641
- msgstr "Activate"
642
-
643
- #: src/helper/Helper_Data.php:439, src/helper/Helper_Templates.php:817
644
- msgid "Version"
645
- msgstr "Version"
646
-
647
- #: src/helper/Helper_Data.php:441, src/helper/Helper_Templates.php:825
648
- msgid "Group"
649
- msgstr "Group"
650
-
651
- #: src/helper/Helper_Data.php:443, src/helper/Helper_Templates.php:829
652
- msgid "Tags"
653
- msgstr "Tags"
654
-
655
- #: src/helper/Helper_Data.php:447
656
- msgid "Migrating site #%s"
657
- msgstr "Migrating site #%s"
658
-
659
- #: src/helper/Helper_Data.php:449
660
- msgid "Site #%s migration complete."
661
- msgstr "Site #%s migration complete."
662
-
663
- #: src/helper/Helper_Data.php:451
664
- msgid "Migration Error"
665
- msgstr "Migration Error"
666
-
667
- #: src/helper/Helper_Data.php:453
668
- msgid "Site #%s migration errors."
669
- msgstr "Site #%s migration errors."
670
-
671
- #: src/helper/Helper_Data.php:457
672
- msgid "Add New Template"
673
- msgstr "Add New Template"
674
-
675
- #: src/helper/Helper_Data.php:459, src/view/html/Settings/general.php:139
676
- msgid "Show Advanced Options..."
677
- msgstr "Show Advanced Options..."
678
-
679
- #: src/helper/Helper_Data.php:461
680
- msgid "Hide Advanced Options..."
681
- msgstr "Hide Advanced Options..."
682
-
683
- #: src/helper/Helper_Data.php:463
684
- msgid "This form doesn't have any PDFs."
685
- msgstr "This form doesn't have any PDFs."
686
-
687
- #: src/helper/Helper_Data.php:465
688
- msgid "Let's go create one"
689
- msgstr "Let's go create one"
690
-
691
- #: src/helper/Helper_Data.php:467
692
- msgid "Installed PDFs"
693
- msgstr "Installed PDFs"
694
-
695
- #: src/helper/Helper_Data.php:471
696
- msgid "Search the Gravity PDF Knowledgebase..."
697
- msgstr "Search the Gravity PDF Knowledgebase..."
698
-
699
- #: src/helper/Helper_Data.php:475
700
- msgid "Requires Gravity PDF v%s"
701
- msgstr "Requires Gravity PDF v%s"
702
-
703
- #: src/helper/Helper_Data.php:477
704
- msgid ""
705
- "This PDF template is not compatible with your version of Gravity PDF. This "
706
- "template required Gravity PDF v%s."
707
- msgstr ""
708
- "This PDF template is not compatible with your version of Gravity PDF. This "
709
- "template required Gravity PDF v%s."
710
-
711
- #: src/helper/Helper_Data.php:479
712
- msgid "Template Details"
713
- msgstr "Template Details"
714
-
715
- #: src/helper/Helper_Data.php:481
716
- msgid "Current Template"
717
- msgstr "Current Template"
718
-
719
- #: src/helper/Helper_Data.php:483
720
- msgid "Show previous template"
721
- msgstr "Show previous template"
722
-
723
- #: src/helper/Helper_Data.php:485
724
- msgid "Show next template"
725
- msgstr "Show next template"
726
-
727
- #: src/helper/Helper_Data.php:487
728
- msgid "Upload is not a valid template. Upload a .zip file."
729
- msgstr "Upload is not a valid template. Upload a .zip file."
730
-
731
- #: src/helper/Helper_Data.php:489
732
- msgid "Upload exceeds the 2MB limit."
733
- msgstr "Upload exceeds the 2MB limit."
734
-
735
- #: src/helper/Helper_Data.php:491
736
- msgid "Template successfully installed"
737
- msgstr "Template successfully installed"
738
-
739
- #: src/helper/Helper_Data.php:493
740
- msgid "Template successfully updated"
741
- msgstr "Template successfully updated"
742
-
743
- #: src/helper/Helper_Data.php:495
744
- msgid "There was a problem with the upload. Reload the page and try again."
745
- msgstr "There was a problem with the upload. Reload the page and try again."
746
-
747
- #: src/helper/Helper_Data.php:497
748
- msgid ""
749
- "Do you really want to delete this PDF template?%sClick 'Cancel' to go back, "
750
- "'OK' to confirm the delete."
751
- msgstr ""
752
- "Do you really want to delete this PDF template?%sClick 'Cancel' to go back, "
753
- "'OK' to confirm the delete."
754
-
755
- #: src/helper/Helper_Data.php:499
756
- msgid "Could not delete template."
757
- msgstr "Could not delete template."
758
-
759
- #: src/helper/Helper_Migration.php:1117
760
- msgid ""
761
- "There was a problem migrating the following configuration nodes. You will "
762
- "need to manually setup those PDFs."
763
- msgstr ""
764
- "There was a problem migrating the following configuration nodes. You will "
765
- "need to manually setup those PDFs."
766
-
767
- #: src/helper/Helper_Migration.php:1137
768
- msgid "Migration Successful."
769
- msgstr "Migration Successful."
770
-
771
- #: src/helper/Helper_Options_Fields.php:173
772
- msgid "Default Paper Size"
773
- msgstr "Default Paper Size"
774
-
775
- #: src/helper/Helper_Options_Fields.php:175
776
- msgid "Set the default paper size used when generating PDFs."
777
- msgstr "Set the default paper size used when generating PDFs."
778
-
779
- #: src/helper/Helper_Options_Fields.php:197,
780
- #: src/helper/Helper_Options_Fields.php:725
781
- msgid "Control the exact paper size. Can be set in millimeters or inches."
782
- msgstr "Control the exact paper size. Can be set in millimeters or inches."
783
-
784
- #: src/helper/Helper_Options_Fields.php:217
785
- msgid "Default Template"
786
- msgstr "Default Template"
787
-
788
- #: src/helper/Helper_Options_Fields.php:219,
789
- #: src/helper/Helper_Options_Fields.php:579
790
- msgid ""
791
- "Choose an existing template or purchased more %sfrom our theme shop%s. You "
792
- "can also %sbuild your own%s or %shire us%s to create a custom solution."
793
- msgstr ""
794
- "Choose an existing template or purchased more %sfrom our theme shop%s. You "
795
- "can also %sbuild your own%s or %shire us%s to create a custom solution."
796
-
797
- #: src/helper/Helper_Options_Fields.php:231,
798
- #: src/helper/Helper_Options_Fields.php:591
799
- msgid "Templates"
800
- msgstr "Templates"
801
-
802
- #: src/helper/Helper_Options_Fields.php:231,
803
- #: src/helper/Helper_Options_Fields.php:591
804
- msgid ""
805
- "Gravity PDF comes with %sfour completely-free and highly customizable designs"
806
- "%s. You can also purchase additional templates from our theme shop, hire us "
807
- "to integrate existing PDFs or, with a bit of technical know-how, build your "
808
- "own."
809
- msgstr ""
810
- "Gravity PDF comes with %sfour completely-free and highly customisable designs"
811
- "%s. You can also purchase additional templates from our theme shop, hire us "
812
- "to integrate existing PDFs or, with a bit of technical know-how, build your "
813
- "own."
814
-
815
- #: src/helper/Helper_Options_Fields.php:241
816
- msgid "Default Font"
817
- msgstr "Default Font"
818
-
819
- #: src/helper/Helper_Options_Fields.php:243
820
- msgid ""
821
- "Set the default font type used in PDFs. Choose an existing font or %sinstall "
822
- "your own%s."
823
- msgstr ""
824
- "Set the default font type used in PDFs. Choose an existing font or %sinstall "
825
- "your own%s."
826
-
827
- #: src/helper/Helper_Options_Fields.php:253,
828
- #: src/helper/Helper_Options_Fields.php:523,
829
- #: src/helper/Helper_Options_Fields.php:785
830
- msgid "Fonts"
831
- msgstr "Fonts"
832
-
833
- #: src/helper/Helper_Options_Fields.php:253
834
- msgid ""
835
- "Gravity PDF comes bundled with fonts for most languages world-wide. Want to "
836
- "use a specific font type? Use the font installer (found in the Tools tab)."
837
- msgstr ""
838
- "Gravity PDF comes bundled with fonts for most languages world-wide. Want to "
839
- "use a specific font type? Use the font installer (found in the Tools tab)."
840
-
841
- #: src/helper/Helper_Options_Fields.php:263
842
- msgid "Default Font Size"
843
- msgstr "Default Font Size"
844
-
845
- #: src/helper/Helper_Options_Fields.php:265
846
- msgid "Set the default font size used in PDFs."
847
- msgstr "Set the default font size used in PDFs."
848
-
849
- #: src/helper/Helper_Options_Fields.php:283
850
- msgid "Default Font Color"
851
- msgstr "Default Font Colour"
852
-
853
- #: src/helper/Helper_Options_Fields.php:289
854
- msgid "Set the default font color used in PDFs."
855
- msgstr "Set the default font colour used in PDFs."
856
-
857
- #: src/helper/Helper_Options_Fields.php:299,
858
- #: src/helper/Helper_Options_Fields.php:315,
859
- #: src/helper/Helper_Options_Fields.php:837,
860
- #: src/helper/Helper_Options_Fields.php:853
861
- msgid "Reverse Text (RTL)"
862
- msgstr "Reverse Text (RTL)"
863
-
864
- #: src/helper/Helper_Options_Fields.php:301,
865
- #: src/helper/Helper_Options_Fields.php:839
866
- msgid "Script like Arabic and Hebrew are written right to left."
867
- msgstr "Script like Arabic and Hebrew are written right to left."
868
-
869
- #: src/helper/Helper_Options_Fields.php:315
870
- msgid ""
871
- "Enable RTL if you are writing in Arabic, Hebrew, Syriac, N'ko, Thaana, "
872
- "Tifinar, Urdu or other RTL languages."
873
- msgstr ""
874
- "Enable RTL if you are writing in Arabic, Hebrew, Syriac, N'ko, Thaana, "
875
- "Tifinar, Urdu or other RTL languages."
876
-
877
- #: src/helper/Helper_Options_Fields.php:325,
878
- #: src/helper/Helper_Options_Fields.php:341
879
- msgid "Entry View"
880
- msgstr "Entry View"
881
-
882
- #: src/helper/Helper_Options_Fields.php:327
883
- msgid ""
884
- "Select the default action used when accessing a PDF from the %sGravity Forms "
885
- "entries list%s page."
886
- msgstr ""
887
- "Select the default action used when accessing a PDF from the %sGravity Forms "
888
- "entries list%s page."
889
-
890
- #: src/helper/Helper_Options_Fields.php:333,
891
- #: src/view/html/PDF/entry_detailed_pdf.php:89
892
- msgid "View"
893
- msgstr "View"
894
-
895
- #: src/helper/Helper_Options_Fields.php:335,
896
- #: src/view/html/PDF/entry_detailed_pdf.php:91
897
- msgid "Download"
898
- msgstr "Download"
899
-
900
- #: src/helper/Helper_Options_Fields.php:341
901
- msgid ""
902
- "Choose to view the PDF in your web browser or download the document to your "
903
- "computer."
904
- msgstr ""
905
- "Choose to view the PDF in your web browser or download the document to your "
906
- "computer."
907
-
908
- #: src/helper/Helper_Options_Fields.php:351
909
- msgid "Show What's New"
910
- msgstr "Show What's New"
911
-
912
- #: src/helper/Helper_Options_Fields.php:367
913
- msgid "Show What's New Page"
914
- msgstr "Show What's New Page"
915
-
916
- #: src/helper/Helper_Options_Fields.php:367
917
- msgid ""
918
- "When upgrading Gravity PDF to a new major release (4.x) we'll automatically "
919
- "redirect you to our What's New page so you can see the changes. Bug fix and "
920
- "security releases are excluded (4.x.x)."
921
- msgstr ""
922
- "When upgrading Gravity PDF to a new major release (4.x) we'll automatically "
923
- "redirect you to our What's New page so you can see the changes. Bug fix and "
924
- "security releases are excluded (4.x.x)."
925
-
926
- #: src/helper/Helper_Options_Fields.php:387,
927
- #: src/helper/Helper_Options_Fields.php:407
928
- msgid "User Restriction"
929
- msgstr "User Restriction"
930
-
931
- #: src/helper/Helper_Options_Fields.php:389
932
- msgid ""
933
- "Restrict PDF access to users with any of these capabilities. The "
934
- "Administrator Role always has full access."
935
- msgstr ""
936
- "Restrict PDF access to users with any of these capabilities. The "
937
- "Administrator Role always has full access."
938
-
939
- #: src/helper/Helper_Options_Fields.php:405
940
- msgid "Select Capability"
941
- msgstr "Select Capability"
942
-
943
- #: src/helper/Helper_Options_Fields.php:407
944
- msgid ""
945
- "Only logged in users with any selected capability can view generated PDFs "
946
- "they don't have ownership of. Ownership refers to an end user who completed "
947
- "the original Gravity Form entry."
948
- msgstr ""
949
- "Only logged in users with any selected capability can view generated PDFs "
950
- "they don't have ownership of. Ownership refers to an end user who completed "
951
- "the original Gravity Form entry."
952
-
953
- #: src/helper/Helper_Options_Fields.php:417
954
- msgid "Default Owner Restrictions"
955
- msgstr "Default Owner Restrictions"
956
-
957
- #: src/helper/Helper_Options_Fields.php:419
958
- msgid ""
959
- "Set the default PDF owner permissions. When enabled, the original entry "
960
- "owner will NOT be able to view the PDFs (unless they have one of the above "
961
- "capabilities)."
962
- msgstr ""
963
- "Set the default PDF owner permissions. When enabled, the original entry "
964
- "owner will NOT be able to view the PDFs (unless they have one of the above "
965
- "capabilities)."
966
-
967
- #: src/helper/Helper_Options_Fields.php:433,
968
- #: src/helper/Helper_Options_Fields.php:1089,
969
- #: src/helper/Helper_Options_Fields.php:1105
970
- msgid "Restrict Owner"
971
- msgstr "Restrict Owner"
972
-
973
- #: src/helper/Helper_Options_Fields.php:433
974
- msgid ""
975
- "Enable this setting if your PDFs should not be viewable by the end user. "
976
- "This can be set on a per-PDF basis."
977
- msgstr ""
978
- "Enable this setting if your PDFs should not be viewable by the end user. "
979
- "This can be set on a per-PDF basis."
980
-
981
- #: src/helper/Helper_Options_Fields.php:443,
982
- #: src/helper/Helper_Options_Fields.php:455
983
- msgid "Logged Out Timeout"
984
- msgstr "Logged Out Timeout"
985
-
986
- #: src/helper/Helper_Options_Fields.php:445
987
- msgid ""
988
- "Limit how long a %slogged out%s users has direct access to the PDF after "
989
- "completing the form. Set to 0 to disable time limit (not recommended)."
990
- msgstr ""
991
- "Limit how long a %slogged out%s users has direct access to the PDF after "
992
- "completing the form. Set to 0 to disable time limit (not recommended)."
993
-
994
- #: src/helper/Helper_Options_Fields.php:447
995
- msgid "minutes"
996
- msgstr "minutes"
997
-
998
- #: src/helper/Helper_Options_Fields.php:455
999
- msgid ""
1000
- "Logged out users can view PDFs when their IP matches the one assigned to the "
1001
- "Gravity Form entry. Because IP addresses can change, a time-based "
1002
- "restriction also applies."
1003
- msgstr ""
1004
- "Logged out users can view PDFs when their IP matches the one assigned to the "
1005
- "Gravity Form entry. Because IP addresses can change, a time-based "
1006
- "restriction also applies."
1007
-
1008
- #: src/helper/Helper_Options_Fields.php:503,
1009
- #: src/helper/Helper_Options_Fields.php:513,
1010
- #: src/view/html/Settings/tools.php:141
1011
- msgid "Setup Custom Templates"
1012
- msgstr "Setup Custom Templates"
1013
-
1014
- #: src/helper/Helper_Options_Fields.php:505
1015
- msgid ""
1016
- "Setup environment for building custom templates. %sSee docs to get started%s."
1017
- msgstr ""
1018
- "Setup environment for building custom templates. %sSee docs to get started%s."
1019
-
1020
- #: src/helper/Helper_Options_Fields.php:509
1021
- msgid "Run Setup"
1022
- msgstr "Run Setup"
1023
-
1024
- #: src/helper/Helper_Options_Fields.php:513
1025
- msgid ""
1026
- "The setup will copy the plugin templates to your uploads directory so you "
1027
- "can freely create and modify PDF templates without the risk of overriding "
1028
- "your modifications when the plugin updates."
1029
- msgstr ""
1030
- "The setup will copy the plugin templates to your uploads directory so you "
1031
- "can freely create and modify PDF templates without the risk of overriding "
1032
- "your modifications when the plugin updates."
1033
-
1034
- #: src/helper/Helper_Options_Fields.php:525
1035
- msgid "Add, update or remove custom fonts."
1036
- msgstr "Add, update or remove custom fonts."
1037
-
1038
- #: src/helper/Helper_Options_Fields.php:529,
1039
- #: src/view/html/Settings/tools.php:167
1040
- msgid "Manage Fonts"
1041
- msgstr "Manage Fonts"
1042
-
1043
- #: src/helper/Helper_Options_Fields.php:533
1044
- msgid "Install Fonts"
1045
- msgstr "Install Fonts"
1046
-
1047
- #: src/helper/Helper_Options_Fields.php:533
1048
- msgid ""
1049
- "Custom fonts can be installed for use in your PDFs. Only %s.ttf%s font files "
1050
- "are supported."
1051
- msgstr ""
1052
- "Custom fonts can be installed for use in your PDFs. Only %s.ttf%s font files "
1053
- "are supported."
1054
-
1055
- #: src/helper/Helper_Options_Fields.php:561,
1056
- #: src/helper/Helper_PDF_List_Table.php:239
1057
- msgid "Name"
1058
- msgstr "Name"
1059
-
1060
- #: src/helper/Helper_Options_Fields.php:567
1061
- msgid "PDF Name"
1062
- msgstr "PDF Name"
1063
-
1064
- #: src/helper/Helper_Options_Fields.php:567
1065
- msgid ""
1066
- "Distinguish between multiple PDFs by giving it an easy-to-remember name (for "
1067
- "internal use). Use the %sFilename%s field below to set the actual PDF name."
1068
- msgstr ""
1069
- "Distinguish between multiple PDFs by giving it an easy-to-remember name (for "
1070
- "internal use). Use the %sFilename%s field below to set the actual PDF name."
1071
-
1072
- #: src/helper/Helper_Options_Fields.php:577,
1073
- #: src/helper/Helper_PDF_List_Table.php:243
1074
- msgid "Template"
1075
- msgstr "Template"
1076
-
1077
- #: src/helper/Helper_Options_Fields.php:601,
1078
- #: src/helper/Helper_Options_Fields.php:617,
1079
- #: src/helper/Helper_PDF_List_Table.php:245
1080
- msgid "Notifications"
1081
- msgstr "Notifications"
1082
-
1083
- #: src/helper/Helper_Options_Fields.php:603
1084
- msgid "Automatically attach PDF to the selected notifications."
1085
- msgstr "Automatically attach PDF to the selected notifications."
1086
-
1087
- #: src/helper/Helper_Options_Fields.php:615
1088
- msgid "Choose a Notification"
1089
- msgstr "Choose a Notification"
1090
-
1091
- #: src/helper/Helper_Options_Fields.php:617
1092
- msgid ""
1093
- "Automatically generate and attach the PDF to your selected notifications. "
1094
- "Conditional Logic for both the PDF and the notification applies. Inactive "
1095
- "PDFs are also not sent."
1096
- msgstr ""
1097
- "Automatically generate and attach the PDF to your selected notifications. "
1098
- "Conditional Logic for both the PDF and the notification applies. Inactive "
1099
- "PDFs are also not sent."
1100
-
1101
- #: src/helper/Helper_Options_Fields.php:627,
1102
- #: src/helper/Helper_Options_Fields.php:633
1103
- msgid "Filename"
1104
- msgstr "Filename"
1105
-
1106
- #: src/helper/Helper_Options_Fields.php:633
1107
- msgid ""
1108
- "Set an appropriate filename for the generated PDF. You should exclude the ."
1109
- "pdf extension from the name. The following are invalid characters and will "
1110
- "be converted to an underscore %s_%s when the PDF is generated: %s"
1111
- msgstr ""
1112
- "Set an appropriate filename for the generated PDF. You should exclude the ."
1113
- "pdf extension from the name. The following are invalid characters and will "
1114
- "be converted to an underscore %s_%s when the PDF is generated: %s"
1115
-
1116
- #: src/helper/Helper_Options_Fields.php:647,
1117
- #: src/helper/Helper_Options_Fields.php:657
1118
- msgid "Conditional Logic"
1119
- msgstr "Conditional Logic"
1120
-
1121
- #: src/helper/Helper_Options_Fields.php:651
1122
- msgid "Enable conditional logic"
1123
- msgstr "Enable conditional logic"
1124
-
1125
- #: src/helper/Helper_Options_Fields.php:657
1126
- msgid ""
1127
- "Create rules to dynamically enable or disable PDFs. This includes attaching "
1128
- "to notifications and viewing from your admin area."
1129
- msgstr ""
1130
- "Create rules to dynamically enable or disable PDFs. This includes attaching "
1131
- "to notifications and viewing from your admin area."
1132
-
1133
- #: src/helper/Helper_Options_Fields.php:699
1134
- msgid "Paper Size"
1135
- msgstr "Paper Size"
1136
-
1137
- #: src/helper/Helper_Options_Fields.php:701
1138
- msgid "Set the paper size used when generating PDFs."
1139
- msgstr "Set the paper size used when generating PDFs."
1140
-
1141
- #: src/helper/Helper_Options_Fields.php:747
1142
- msgid "Orientation"
1143
- msgstr "Orientation"
1144
-
1145
- #: src/helper/Helper_Options_Fields.php:753
1146
- msgid "Portrait"
1147
- msgstr "Portrait"
1148
-
1149
- #: src/helper/Helper_Options_Fields.php:755
1150
- msgid "Landscape"
1151
- msgstr "Landscape"
1152
-
1153
- #: src/helper/Helper_Options_Fields.php:771
1154
- msgid "Font"
1155
- msgstr "Font"
1156
-
1157
- #: src/helper/Helper_Options_Fields.php:779
1158
- msgid ""
1159
- "Set the font type used in PDFs. Choose an existing font or %sinstall your own"
1160
- "%s."
1161
- msgstr ""
1162
- "Set the font type used in PDFs. Choose an existing font or %sinstall your own"
1163
- "%s."
1164
-
1165
- #: src/helper/Helper_Options_Fields.php:785
1166
- msgid ""
1167
- "Gravity PDF comes bundled with fonts for most languages world-wide. Want to "
1168
- "use a specific font type? Use the font installer (found in the Forms -> "
1169
- "Settings -> Tools tab)."
1170
- msgstr ""
1171
- "Gravity PDF comes bundled with fonts for most languages world-wide. Want to "
1172
- "use a specific font type? Use the font installer (found in the Forms -> "
1173
- "Settings -> Tools tab)."
1174
-
1175
- #: src/helper/Helper_Options_Fields.php:797
1176
- msgid "Font Size"
1177
- msgstr "Font Size"
1178
-
1179
- #: src/helper/Helper_Options_Fields.php:799
1180
- msgid "Set the font size to use in the PDF."
1181
- msgstr "Set the font size to use in the PDF."
1182
-
1183
- #: src/helper/Helper_Options_Fields.php:819
1184
- msgid "Font Color"
1185
- msgstr "Font Colour"
1186
-
1187
- #: src/helper/Helper_Options_Fields.php:825
1188
- msgid "Set the font color to use in the PDF."
1189
- msgstr "Set the font colour to use in the PDF."
1190
-
1191
- #: src/helper/Helper_Options_Fields.php:853
1192
- msgid ""
1193
- "Enable RTL if you are writing in Arabic, Hebrew, Syriac, N'ko, Thaana, "
1194
- "Tifinar or Urdu."
1195
- msgstr ""
1196
- "Enable RTL if you are writing in Arabic, Hebrew, Syriac, N'ko, Thaana, "
1197
- "Tifinar or Urdu."
1198
-
1199
- #: src/helper/Helper_Options_Fields.php:905,
1200
- #: src/templates/config/focus-gravity.php:219
1201
- msgid "Format"
1202
- msgstr "Format"
1203
-
1204
- #: src/helper/Helper_Options_Fields.php:907
1205
- msgid "Generate a PDF in the selected format."
1206
- msgstr "Generate a PDF in the selected format."
1207
-
1208
- #: src/helper/Helper_Options_Fields.php:923
1209
- msgid "PDF Format"
1210
- msgstr "PDF Format"
1211
-
1212
- #: src/helper/Helper_Options_Fields.php:923
1213
- msgid ""
1214
- "Generate a document adhearing to the appropriate PDF standard. When not in "
1215
- "%sStandard%s mode, watermarks, alpha-transparent PNGs and security options "
1216
- "can NOT be used."
1217
- msgstr ""
1218
- "Generate a document adhearing to the appropriate PDF standard. When not in "
1219
- "%sStandard%s mode, watermarks, alpha-transparent PNGs and security options "
1220
- "can NOT be used."
1221
-
1222
- #: src/helper/Helper_Options_Fields.php:933
1223
- msgid "Enable PDF Security"
1224
- msgstr "Enable PDF Security"
1225
-
1226
- #: src/helper/Helper_Options_Fields.php:935
1227
- msgid "Password protect generated PDFs, or restrict user capabilities."
1228
- msgstr "Password protect generated PDFs, or restrict user capabilities."
1229
-
1230
- #: src/helper/Helper_Options_Fields.php:957
1231
- msgid "Password"
1232
- msgstr "Password"
1233
-
1234
- #: src/helper/Helper_Options_Fields.php:973,
1235
- #: src/helper/Helper_Options_Fields.php:1005
1236
- msgid "Privileges"
1237
- msgstr "Privileges"
1238
-
1239
- #: src/helper/Helper_Options_Fields.php:1005
1240
- msgid ""
1241
- "You can prevent the end user completing certain actions to the PDF – such as "
1242
- "copying text, printing, adding annotations or extracting pages."
1243
- msgstr ""
1244
- "You can prevent the end user completing certain actions to the PDF – such as "
1245
- "copying text, printing, adding annotations or extracting pages."
1246
-
1247
- #: src/helper/Helper_Options_Fields.php:1009
1248
- msgid "Select End User PDF Privileges"
1249
- msgstr "Select End User PDF Privileges"
1250
-
1251
- #: src/helper/Helper_Options_Fields.php:1019,
1252
- #: src/helper/Helper_Options_Fields.php:1027
1253
- msgid "Image DPI"
1254
- msgstr "Image DPI"
1255
-
1256
- #: src/helper/Helper_Options_Fields.php:1027
1257
- msgid ""
1258
- "Control the image DPI (dots per inch) in PDFs. Set to 300 when "
1259
- "professionally printing document."
1260
- msgstr ""
1261
- "Control the image DPI (dots per inch) in PDFs. Set to 300 when "
1262
- "professionally printing document."
1263
-
1264
- #: src/helper/Helper_Options_Fields.php:1037
1265
- msgid "Always Save PDF"
1266
- msgstr "Always Save PDF"
1267
-
1268
- #: src/helper/Helper_Options_Fields.php:1039
1269
- msgid "Force a PDF to be saved to disk when a new entry is created."
1270
- msgstr "Force a PDF to be saved to disk when a new entry is created."
1271
-
1272
- #: src/helper/Helper_Options_Fields.php:1053
1273
- msgid "Save PDF"
1274
- msgstr "Save PDF"
1275
-
1276
- #: src/helper/Helper_Options_Fields.php:1053
1277
- msgid ""
1278
- "By default, PDFs are not automatically saved to disk. Enable this option to "
1279
- "force the PDF to be generated and saved. Useful when using the "
1280
- "%sgfpdf_post_pdf_save%s hook to copy the PDF to an alternate location."
1281
- msgstr ""
1282
- "By default, PDFs are not automatically saved to disk. Enable this option to "
1283
- "force the PDF to be generated and saved. Useful when using the "
1284
- "%sgfpdf_post_pdf_save%s hook to copy the PDF to an alternate location."
1285
-
1286
- #: src/helper/Helper_Options_Fields.php:1063
1287
- msgid "Enable Public Access"
1288
- msgstr "Enable Public Access"
1289
-
1290
- #: src/helper/Helper_Options_Fields.php:1065
1291
- msgid ""
1292
- "Allow %sanyone%s with a direct link to access the PDF. %sThis disables all "
1293
- "%ssecurity protocols%s for this PDF.%s "
1294
- msgstr ""
1295
- "Allow %sanyone%s with a direct link to access the PDF. %sThis disables all "
1296
- "%ssecurity protocols%s for this PDF.%s "
1297
-
1298
- #: src/helper/Helper_Options_Fields.php:1079
1299
- msgid "Public Access"
1300
- msgstr "Public Access"
1301
-
1302
- #: src/helper/Helper_Options_Fields.php:1079
1303
- msgid ""
1304
- "When public access is on all security protocols are disabled and anyone "
1305
- "worldwide can view the PDF document for ALL your form's entries. For most "
1306
- "users the standard security measures will be adequate and public access "
1307
- "should remain disabled."
1308
- msgstr ""
1309
- "When public access is on all security protocols are disabled and anyone "
1310
- "worldwide can view the PDF document for ALL your form's entries. For most "
1311
- "users the standard security measures will be adequate and public access "
1312
- "should remain disabled."
1313
-
1314
- #: src/helper/Helper_Options_Fields.php:1091
1315
- msgid ""
1316
- "When enabled, the original entry owner will NOT be able to view the PDFs."
1317
- msgstr ""
1318
- "When enabled, the original entry owner will NOT be able to view the PDFs."
1319
-
1320
- #: src/helper/Helper_Options_Fields.php:1105
1321
- msgid ""
1322
- "Enable this setting if your PDFs should not be viewable by the end user."
1323
- msgstr ""
1324
- "Enable this setting if your PDFs should not be viewable by the end user."
1325
-
1326
- #: src/helper/Helper_Options_Fields.php:1171
1327
- msgid "Enable Advanced Templating"
1328
- msgstr "Enable Advanced Templating"
1329
-
1330
- #: src/helper/Helper_Options_Fields.php:1173
1331
- msgid "By enabling, a PDF template will no longer be treated as HTML."
1332
- msgstr "By enabling, a PDF template will no longer be treated as HTML."
1333
-
1334
- #: src/helper/Helper_Options_Fields.php:1217
1335
- msgid "Show Form Title"
1336
- msgstr "Show Form Title"
1337
-
1338
- #: src/helper/Helper_Options_Fields.php:1219
1339
- msgid "Display the form title at the beginning of the PDF."
1340
- msgstr "Display the form title at the beginning of the PDF."
1341
-
1342
- #: src/helper/Helper_Options_Fields.php:1259
1343
- msgid "Show Page Names"
1344
- msgstr "Show Page Names"
1345
-
1346
- #: src/helper/Helper_Options_Fields.php:1261
1347
- msgid ""
1348
- "Display form page names on the PDF. Requires the use of the %sPage Break "
1349
- "field%s."
1350
- msgstr ""
1351
- "Display form page names on the PDF. Requires the use of the %sPage Break "
1352
- "field%s."
1353
-
1354
- #: src/helper/Helper_Options_Fields.php:1301
1355
- msgid "Show HTML Fields"
1356
- msgstr "Show HTML Fields"
1357
-
1358
- #: src/helper/Helper_Options_Fields.php:1303
1359
- msgid "Display HTML fields in the PDF."
1360
- msgstr "Display HTML fields in the PDF."
1361
-
1362
- #: src/helper/Helper_Options_Fields.php:1343
1363
- msgid "Show Section Break Description"
1364
- msgstr "Show Section Break Description"
1365
-
1366
- #: src/helper/Helper_Options_Fields.php:1345
1367
- msgid "Display the Section Break field description in the PDF."
1368
- msgstr "Display the Section Break field description in the PDF."
1369
-
1370
- #: src/helper/Helper_Options_Fields.php:1385,
1371
- #: src/helper/Helper_Options_Fields.php:1401
1372
- msgid "Enable Conditional Logic"
1373
- msgstr "Enable Conditional Logic"
1374
-
1375
- #: src/helper/Helper_Options_Fields.php:1387
1376
- msgid "When enabled the PDF will adhere to the form field conditional logic."
1377
- msgstr "When enabled the PDF will adhere to the form field conditional logic."
1378
-
1379
- #: src/helper/Helper_Options_Fields.php:1401
1380
- msgid "Enable this option to hide failed conditional logic fields in the PDF."
1381
- msgstr "Enable this option to hide failed conditional logic fields in the PDF."
1382
-
1383
- #: src/helper/Helper_Options_Fields.php:1429
1384
- msgid "Show Empty Fields"
1385
- msgstr "Show Empty Fields"
1386
-
1387
- #: src/helper/Helper_Options_Fields.php:1431
1388
- msgid "Display Empty fields in the PDF."
1389
- msgstr "Display Empty fields in the PDF."
1390
-
1391
- #: src/helper/Helper_Options_Fields.php:1471,
1392
- #: src/helper/Helper_Options_Fields.php:1481
1393
- msgid "Header"
1394
- msgstr "Header"
1395
-
1396
- #: src/helper/Helper_Options_Fields.php:1477
1397
- msgid ""
1398
- "The header is included at the top of each page. For simple columns %stry "
1399
- "this HTML table snippet%s."
1400
- msgstr ""
1401
- "The header is included at the top of each page. For simple columns %stry "
1402
- "this HTML table snippet%s."
1403
-
1404
- #: src/helper/Helper_Options_Fields.php:1481
1405
- msgid ""
1406
- "When inserting images in the header set the size to %sLarge%s or %sFull Size"
1407
- "%s."
1408
- msgstr ""
1409
- "When inserting images in the header set the size to %sLarge%s or %sFull Size"
1410
- "%s."
1411
-
1412
- #: src/helper/Helper_Options_Fields.php:1509
1413
- msgid "First Page Header"
1414
- msgstr "First Page Header"
1415
-
1416
- #: src/helper/Helper_Options_Fields.php:1515
1417
- msgid "Override the header on the first page of the PDF."
1418
- msgstr "Override the header on the first page of the PDF."
1419
-
1420
- #: src/helper/Helper_Options_Fields.php:1519
1421
- msgid "Use different header on first page of PDF?"
1422
- msgstr "Use different header on first page of PDF?"
1423
-
1424
- #: src/helper/Helper_Options_Fields.php:1547,
1425
- #: src/helper/Helper_Options_Fields.php:1557
1426
- msgid "Footer"
1427
- msgstr "Footer"
1428
-
1429
- #: src/helper/Helper_Options_Fields.php:1553
1430
- msgid ""
1431
- "The footer is included at the bottom of every page. For simple columns %stry "
1432
- "this HTML table snippet%s."
1433
- msgstr ""
1434
- "The footer is included at the bottom of every page. For simple columns %stry "
1435
- "this HTML table snippet%s."
1436
-
1437
- #: src/helper/Helper_Options_Fields.php:1557
1438
- msgid ""
1439
- "For simple text footers use the left, center and right alignment buttons in "
1440
- "the editor. You can also use the special %s{PAGENO}%s and %s{nbpg}%s tags to "
1441
- "display page numbering."
1442
- msgstr ""
1443
- "For simple text footers use the left, center and right alignment buttons in "
1444
- "the editor. You can also use the special %s{PAGENO}%s and %s{nbpg}%s tags to "
1445
- "display page numbering."
1446
-
1447
- #: src/helper/Helper_Options_Fields.php:1585
1448
- msgid "First Page Footer"
1449
- msgstr "First Page Footer"
1450
-
1451
- #: src/helper/Helper_Options_Fields.php:1591
1452
- msgid "Override the footer on the first page of the PDF."
1453
- msgstr "Override the footer on the first page of the PDF."
1454
-
1455
- #: src/helper/Helper_Options_Fields.php:1595
1456
- msgid "Use different footer on first page of PDF?"
1457
- msgstr "Use different footer on first page of PDF?"
1458
-
1459
- #: src/helper/Helper_Options_Fields.php:1623
1460
- msgid "Background Color"
1461
- msgstr "Background Colour"
1462
-
1463
- #: src/helper/Helper_Options_Fields.php:1629
1464
- msgid "Set the background color for all pages."
1465
- msgstr "Set the background colour for all pages."
1466
-
1467
- #: src/helper/Helper_Options_Fields.php:1657,
1468
- #: src/helper/Helper_Options_Fields.php:1663
1469
- msgid "Background Image"
1470
- msgstr "Background Image"
1471
-
1472
- #: src/helper/Helper_Options_Fields.php:1661
1473
- msgid ""
1474
- "The background image is included on all pages. For optimal results, use an "
1475
- "image the same dimensions as the paper size."
1476
- msgstr ""
1477
- "The background image is included on all pages. For optimal results, use an "
1478
- "image the same dimensions as the paper size."
1479
-
1480
- #: src/helper/Helper_Options_Fields.php:1663
1481
- msgid ""
1482
- "For the best results, use a JPG or non-interlaced 8-Bit PNG that has the "
1483
- "same dimensions as the paper size."
1484
- msgstr ""
1485
- "For the best results, use a JPG or non-interlaced 8-Bit PNG that has the "
1486
- "same dimensions as the paper size."
1487
-
1488
- #: src/helper/Helper_PDF_List_Table.php:241
1489
- msgid "Download Shortcode"
1490
- msgstr "Download Shortcode"
1491
-
1492
- #: src/helper/Helper_PDF_List_Table.php:525
1493
- msgid "None"
1494
- msgstr "None"
1495
-
1496
- #: src/helper/Helper_PDF_List_Table.php:589,
1497
- #: src/view/html/PDF/entry_list_pdf_single.php:79
1498
- msgid "Download PDF"
1499
- msgstr "Download PDF"
1500
-
1501
- #: src/helper/Helper_PDF_List_Table.php:671
1502
- msgid "Edit this PDF"
1503
- msgstr "Edit this PDF"
1504
-
1505
- #: src/helper/Helper_PDF_List_Table.php:671
1506
- msgid "Edit"
1507
- msgstr "Edit"
1508
-
1509
- #: src/helper/Helper_PDF_List_Table.php:673
1510
- msgid "Duplicate this PDF"
1511
- msgstr "Duplicate this PDF"
1512
-
1513
- #: src/helper/Helper_PDF_List_Table.php:673
1514
- msgid "Duplicate"
1515
- msgstr "Duplicate"
1516
-
1517
- #: src/helper/Helper_PDF_List_Table.php:675
1518
- msgid "Delete this PDF"
1519
- msgstr "Delete this PDF"
1520
-
1521
- #: src/helper/Helper_PDF_List_Table.php:749
1522
- msgid "This form doesn't have any PDFs. Let's go %screate one%s."
1523
- msgstr "This form doesn't have any PDFs. Let's go %screate one%s."
1524
-
1525
- #: src/helper/Helper_PDF.php:753
1526
- msgid ""
1527
- "The PDF Template %s requires Gravity PDF version %s. Upgrade to the latest "
1528
- "version."
1529
- msgstr ""
1530
- "The PDF Template %s requires Gravity PDF version %s. Upgrade to the latest "
1531
- "version."
1532
-
1533
- #: src/helper/Helper_Templates.php:435
1534
- msgid "Requires Gravity PDF"
1535
- msgstr "Requires Gravity PDF"
1536
-
1537
- #: src/helper/Helper_Templates.php:641, src/helper/Helper_Templates.php:761,
1538
- #: src/view/View_PDF.php:1127
1539
- msgid "Legacy"
1540
- msgstr "Legacy"
1541
-
1542
- #: src/helper/Helper_Templates.php:815
1543
- msgid "Template Name"
1544
- msgstr "Template Name"
1545
-
1546
- #: src/helper/Helper_Templates.php:819
1547
- msgid "Description"
1548
- msgstr "Description"
1549
-
1550
- #: src/helper/Helper_Templates.php:821
1551
- msgid "Author"
1552
- msgstr "Author"
1553
-
1554
- #: src/helper/Helper_Templates.php:823
1555
- msgid "Author URI"
1556
- msgstr "Author URI"
1557
-
1558
- #: src/helper/Helper_Templates.php:827
1559
- msgid "Required PDF Version"
1560
- msgstr "Required PDF Version"
1561
-
1562
- #: src/model/Model_Actions.php:693
1563
- msgid "No configuration.php file found for site #%s"
1564
- msgstr "No configuration.php file found for site #%s"
1565
-
1566
- #: src/model/Model_Actions.php:733
1567
- msgid "Database import problem for site #%s"
1568
- msgstr "Database import problem for site #%s"
1569
-
1570
- #: src/model/Model_Form_Settings.php:503
1571
- msgid "Update PDF"
1572
- msgstr "Update PDF"
1573
-
1574
- #: src/model/Model_Form_Settings.php:503
1575
- msgid "Add PDF"
1576
- msgstr "Add PDF"
1577
-
1578
- #: src/model/Model_Form_Settings.php:581,
1579
- #: src/model/Model_Form_Settings.php:619,
1580
- #: src/model/Model_Form_Settings.php:717, src/model/Model_Form_Settings.php:777
1581
- msgid "There was a problem saving your PDF settings. Please try again."
1582
- msgstr "There was a problem saving your PDF settings. Please try again."
1583
-
1584
- #: src/model/Model_Form_Settings.php:665
1585
- msgid "PDF could not be saved. Please enter all required information below."
1586
- msgstr "PDF could not be saved. Please enter all required information below."
1587
-
1588
- #: src/model/Model_Form_Settings.php:705
1589
- msgid "PDF saved successfully. %sBack to PDF list.%s"
1590
- msgstr "PDF saved successfully. %sBack to PDF list.%s"
1591
-
1592
- #: src/model/Model_Form_Settings.php:1545
1593
- msgid "PDF successfully deleted."
1594
- msgstr "PDF successfully deleted."
1595
-
1596
- #: src/model/Model_Form_Settings.php:1667
1597
- msgid "PDF successfully duplicated."
1598
- msgstr "PDF successfully duplicated."
1599
-
1600
- #: src/model/Model_Install.php:641
1601
- msgid ""
1602
- "There was a problem creating the %s directory. Ensure you have write "
1603
- "permissions to your uploads folder."
1604
- msgstr ""
1605
- "There was a problem creating the %s directory. Ensure you have write "
1606
- "permissions to your uploads folder."
1607
-
1608
- #: src/model/Model_Install.php:659
1609
- msgid ""
1610
- "Gravity PDF does not have write permission to the %s directory. Contact your "
1611
- "web hosting provider to fix the issue."
1612
- msgstr ""
1613
- "Gravity PDF does not have write permission to the %s directory. Contact your "
1614
- "web hosting provider to fix the issue."
1615
-
1616
- #: src/model/Model_Install.php:957
1617
- msgid ""
1618
- "There was a problem removing the Gravity Form \"%s\" PDF configuration. Try "
1619
- "delete manually."
1620
- msgstr ""
1621
- "There was a problem removing the Gravity Form \"%s\" PDF configuration. Try "
1622
- "delete manually."
1623
-
1624
- #: src/model/Model_Install.php:1021
1625
- msgid ""
1626
- "There was a problem removing the %s directory. Clean up manually via (S)FTP."
1627
- msgstr ""
1628
- "There was a problem removing the %s directory. Clean up manually via (S)FTP."
1629
-
1630
- #: src/model/Model_PDF.php:669
1631
- msgid "The PDF configuration is not currently active."
1632
- msgstr "The PDF configuration is not currently active."
1633
-
1634
- #: src/model/Model_PDF.php:713
1635
- msgid "PDF conditional logic requirements have not been met."
1636
- msgstr "PDF conditional logic requirements have not been met."
1637
-
1638
- #: src/model/Model_PDF.php:917
1639
- msgid "Your PDF is no longer accessible."
1640
- msgstr "Your PDF is no longer accessible."
1641
-
1642
- #: src/model/Model_PDF.php:1093
1643
- msgid "You do not have access to view this PDF."
1644
- msgstr "You do not have access to view this PDF."
1645
-
1646
- #: src/model/Model_PDF.php:1813
1647
- msgid "The PDF could not be saved."
1648
- msgstr "The PDF could not be saved."
1649
-
1650
- #: src/model/Model_PDF.php:3649
1651
- msgid "Could not find PDF configuration requested"
1652
- msgstr "Could not find PDF configuration requested"
1653
-
1654
- #: src/model/Model_Settings.php:511
1655
- msgid "There was a problem copying all PDF templates to %s. Please try again."
1656
- msgstr "There was a problem copying all PDF templates to %s. Please try again."
1657
-
1658
- #: src/model/Model_Settings.php:521
1659
- msgid "Gravity PDF Custom Templates successfully installed to %s."
1660
- msgstr "Gravity PDF Custom Templates successfully installed to %s."
1661
-
1662
- #: src/model/Model_Settings.php:765
1663
- msgid "Could not locate font on web server: %s"
1664
- msgstr "Could not locate font on web server: %s"
1665
-
1666
- #: src/model/Model_Settings.php:777
1667
- msgid "There was a problem installing the font %s. Please try again."
1668
- msgstr "There was a problem installing the font %s. Please try again."
1669
-
1670
- #: src/model/Model_Settings.php:1005
1671
- msgid "Could not delete Gravity PDF font correctly. Please try again."
1672
- msgstr "Could not delete Gravity PDF font correctly. Please try again."
1673
-
1674
- #: src/model/Model_Settings.php:1067
1675
- msgid "Required fields have not been included."
1676
- msgstr "Required fields have not been included."
1677
-
1678
- #: src/model/Model_Settings.php:1101
1679
- msgid ""
1680
- "Font name is not valid. Only alphanumeric characters and spaces are accepted."
1681
- msgstr ""
1682
- "Font name is not valid. Only alphanumeric characters and spaces are accepted."
1683
-
1684
- #: src/model/Model_Settings.php:1137
1685
- msgid "A font with the same name already exists. Try a different name."
1686
- msgstr "A font with the same name already exists. Try a different name."
1687
-
1688
- #: src/model/Model_Templates.php:735
1689
- msgid "No valid PDF template found in Zip archive."
1690
- msgstr "No valid PDF template found in Zip archive."
1691
-
1692
- #: src/model/Model_Templates.php:797
1693
- msgid "The PHP file %s is not a valid PDF Template."
1694
- msgstr "The PHP file %s is not a valid PDF Template."
1695
-
1696
- #: src/model/Model_Welcome_Screen.php:185, src/view/html/Welcome/welcome.php:79
1697
- msgid "Welcome to Gravity PDF"
1698
- msgstr "Welcome to Gravity PDF"
1699
-
1700
- #: src/model/Model_Welcome_Screen.php:187
1701
- msgid "What's new in Gravity PDF?"
1702
- msgstr "What's new in Gravity PDF?"
1703
-
1704
- #: src/templates/config/focus-gravity.php:187
1705
- msgid "Accent Color"
1706
- msgstr "Accent Colour"
1707
-
1708
- #: src/templates/config/focus-gravity.php:191
1709
- msgid ""
1710
- "The accent color is used for the page and section titles, as well as the "
1711
- "border."
1712
- msgstr ""
1713
- "The accent colour is used for the page and section titles, as well as the "
1714
- "border."
1715
-
1716
- #: src/templates/config/focus-gravity.php:203
1717
- msgid "Secondary Color"
1718
- msgstr "Secondary Colour"
1719
-
1720
- #: src/templates/config/focus-gravity.php:207
1721
- msgid ""
1722
- "The secondary color is used with the field labels and for alternate rows."
1723
- msgstr ""
1724
- "The secondary colour is used with the field labels and for alternate rows."
1725
-
1726
- #: src/templates/config/focus-gravity.php:223
1727
- msgid "Combine the field label and value or have a distinct label/value."
1728
- msgstr "Combine the field label and value or have a distinct label/value."
1729
-
1730
- #: src/templates/config/focus-gravity.php:227
1731
- msgid "Combined Label"
1732
- msgstr "Combined Label"
1733
-
1734
- #: src/templates/config/focus-gravity.php:229
1735
- msgid "Split Label"
1736
- msgstr "Split Label"
1737
-
1738
- #: src/templates/config/rubix.php:187
1739
- msgid "Container Background Color"
1740
- msgstr "Container Background Colour"
1741
-
1742
- #: src/templates/config/rubix.php:191
1743
- msgid "Control the color of the field background."
1744
- msgstr "Control the colour of the field background."
1745
-
1746
- #: src/templates/config/zadani.php:187
1747
- msgid "Field Border Color"
1748
- msgstr "Field Border Colour"
1749
-
1750
- #: src/templates/config/zadani.php:191
1751
- msgid "Control the color of the field border."
1752
- msgstr "Control the colour of the field border."
1753
-
1754
- #: src/view/html/Actions/action_buttons.php:93
1755
- msgid "Dismiss Notice"
1756
- msgstr "Dismiss Notice"
1757
-
1758
- #: src/view/html/Actions/begin_multisite_migration.php:89
1759
- msgid "Gravity PDF Multisite Migration"
1760
- msgstr "Gravity PDF Multisite Migration"
1761
-
1762
- #: src/view/html/Actions/begin_multisite_migration.php:93
1763
- msgid "Beginning Migration..."
1764
- msgstr "Beginning Migration..."
1765
-
1766
- #: src/view/html/Actions/begin_multisite_migration.php:107
1767
- msgid "Migration Complete."
1768
- msgstr "Migration Complete."
1769
-
1770
- #: src/view/html/Actions/migration.php:81
1771
- msgid "Gravity PDF needs to migrate your configuration."
1772
- msgstr "Gravity PDF needs to migrate your configuration."
1773
-
1774
- #: src/view/html/Actions/migration.php:89
1775
- msgid ""
1776
- "The migration process will import your old configuration file into the "
1777
- "database."
1778
- msgstr ""
1779
- "The migration process will import your old configuration file into the "
1780
- "database."
1781
-
1782
- #: src/view/html/Actions/review_plugin.php:81
1783
- msgid "Hey, we just noticed you've generated your 100th PDF using Gravity PDF!"
1784
- msgstr ""
1785
- "Hey, we just noticed you've generated your 100th PDF using Gravity PDF!"
1786
-
1787
- #: src/view/html/Actions/review_plugin.php:89
1788
- msgid ""
1789
- "If you love how much time you've saved using Gravity PDF then do us a big "
1790
- "favor and %sgive it a five-star rating on WordPress.org%s."
1791
- msgstr ""
1792
- "If you love how much time you've saved using Gravity PDF then do us a big "
1793
- "favour and %sgive it a five-star rating on WordPress.org%s."
1794
-
1795
- #: src/view/html/Actions/review_plugin.php:97
1796
- msgid ""
1797
- "%sOr let your Twitter follows know how good it is%s (or anyone else for that "
1798
- "matter)."
1799
- msgstr ""
1800
- "%sOr let your Twitter follows know how good it is%s (or anyone else for that "
1801
- "matter)."
1802
-
1803
- #: src/view/html/FormSettings/list.php:111
1804
- msgid "Delete PDF?"
1805
- msgstr "Delete PDF?"
1806
-
1807
- #: src/view/html/FormSettings/list.php:113
1808
- msgid ""
1809
- "Warning! You are about to delete this PDF. Select 'Delete' to delete, "
1810
- "'Cancel' to stop."
1811
- msgstr ""
1812
- "Warning! You are about to delete this PDF. Select 'Delete' to delete, "
1813
- "'Cancel' to stop."
1814
-
1815
- #: src/view/html/PDF/entry_detailed_pdf.php:77
1816
- msgid "PDFs"
1817
- msgstr "PDFs"
1818
-
1819
- #: src/view/html/PDF/entry_list_pdf_multiple.php:79
1820
- msgid "Download PDFs"
1821
- msgstr "Download PDFs"
1822
-
1823
- #: src/view/html/PDF/entry_list_pdf_multiple.php:79
1824
- msgid "View PDFs"
1825
- msgstr "View PDFs"
1826
-
1827
- #: src/view/html/PDF/entry_list_pdf_single.php:79
1828
- msgid "View PDF"
1829
- msgstr "View PDF"
1830
-
1831
- #: src/view/html/Settings/general.php:91
1832
- msgid "General Settings"
1833
- msgstr "General Settings"
1834
-
1835
- #: src/view/html/Settings/general.php:121
1836
- msgid "Security Settings"
1837
- msgstr "Security Settings"
1838
-
1839
- #: src/view/html/Settings/help.php:87
1840
- msgid "Getting Help With Gravity PDF"
1841
- msgstr "Getting Help With Gravity PDF"
1842
-
1843
- #: src/view/html/Settings/help.php:93
1844
- msgid ""
1845
- "This is your portal to find quality help, support and documentation for "
1846
- "Gravity PDF"
1847
- msgstr ""
1848
- "This is your portal to find quality help, support and documentation for "
1849
- "Gravity PDF"
1850
-
1851
- #: src/view/html/Settings/help.php:95
1852
- msgid ""
1853
- "(This is not the place to get Gravity Forms support. %sPlease use their "
1854
- "official support channel%s for assistance)"
1855
- msgstr ""
1856
- "(This is not the place to get Gravity Forms support. %sPlease use their "
1857
- "official support channel%s for assistance)"
1858
-
1859
- #: src/view/html/Settings/help.php:113
1860
- msgid "Gravity PDF Documentation"
1861
- msgstr "Gravity PDF Documentation"
1862
-
1863
- #: src/view/html/Settings/help.php:143
1864
- msgid "Find the %sanswers%s you need…"
1865
- msgstr "Find the %sanswers%s you need…"
1866
-
1867
- #: src/view/html/Settings/help.php:153, src/view/html/Welcome/tabs.php:87
1868
- msgid "Getting Started"
1869
- msgstr "Getting Started"
1870
-
1871
- #: src/view/html/Settings/help.php:155
1872
- msgid ""
1873
- "Take a look at our quick-start guide and get Gravity PDF up and running in 5 "
1874
- "minutes flat!"
1875
- msgstr ""
1876
- "Take a look at our quick-start guide and get Gravity PDF up and running in 5 "
1877
- "minutes flat!"
1878
-
1879
- #: src/view/html/Settings/help.php:167
1880
- msgid "Comprehensive Documentation"
1881
- msgstr "Comprehensive Documentation"
1882
-
1883
- #: src/view/html/Settings/help.php:169
1884
- msgid ""
1885
- "We’ve got in-depth articles to help you learn the ins and outs of Gravity "
1886
- "PDF. From the basic setup to PDF security."
1887
- msgstr ""
1888
- "We’ve got in-depth articles to help you learn the ins and outs of Gravity "
1889
- "PDF. From the basic setup to PDF security."
1890
-
1891
- #: src/view/html/Settings/help.php:181
1892
- msgid "Common Problems"
1893
- msgstr "Common Problems"
1894
-
1895
- #: src/view/html/Settings/help.php:183
1896
- msgid ""
1897
- "Find out the most common issues user’s experience and ways to resolve them."
1898
- msgstr ""
1899
- "Find out the most common issues user’s experience and ways to resolve them."
1900
-
1901
- #: src/view/html/Settings/help.php:195
1902
- msgid "Developer Documentation"
1903
- msgstr "Developer Documentation"
1904
-
1905
- #: src/view/html/Settings/help.php:197
1906
- msgid ""
1907
- "You’ll find all the info and examples you’ll need to create your own custom "
1908
- "PDF templates."
1909
- msgstr ""
1910
- "You’ll find all the info and examples you’ll need to create your own custom "
1911
- "PDF templates."
1912
-
1913
- #: src/view/html/Settings/help.php:209
1914
- msgid "View All Documentation"
1915
- msgstr "View All Documentation"
1916
-
1917
- #: src/view/html/Settings/help.php:211
1918
- msgid "Contact Support"
1919
- msgstr "Contact Support"
1920
-
1921
- #: src/view/html/Settings/help.php:217
1922
- msgid ""
1923
- "Our support hours are 9:00am-5:00pm Monday to Friday, %sSydney Australia time"
1924
- "%s (public holidays excluded)."
1925
- msgstr ""
1926
- "Our support hours are 9:00am-5:00pm Monday to Friday, %sSydney Australia time"
1927
- "%s (public holidays excluded)."
1928
-
1929
- #: src/view/html/Settings/help.php:245
1930
- msgid "It doesn't look like there are any topics related to your issue."
1931
- msgstr "It doesn't look like there are any topics related to your issue."
1932
-
1933
- #: src/view/html/Settings/help.php:249
1934
- msgid "Maybe one of these articles will help..."
1935
- msgstr "Maybe one of these articles will help..."
1936
-
1937
- #: src/view/html/Settings/system_status.php:89
1938
- msgid "Installation Status"
1939
- msgstr "Installation Status"
1940
-
1941
- #: src/view/html/Settings/system_status.php:103, src/view/View_Settings.php:587
1942
- msgid "WP Memory Available"
1943
- msgstr "WP Memory Available"
1944
-
1945
- #: src/view/html/Settings/system_status.php:129
1946
- msgid "Unlimited"
1947
- msgstr "Unlimited"
1948
-
1949
- #: src/view/html/Settings/system_status.php:147
1950
- msgid ""
1951
- "We strongly recommend you have at least 128MB of available WP Memory (RAM) "
1952
- "assigned to your website. %sFind out how to increase this limit%s."
1953
- msgstr ""
1954
- "We strongly recommend you have at least 128MB of available WP Memory (RAM) "
1955
- "assigned to your website. %sFind out how to increase this limit%s."
1956
-
1957
- #: src/view/html/Settings/system_status.php:163
1958
- msgid "WordPress Version"
1959
- msgstr "WordPress Version"
1960
-
1961
- #: src/view/html/Settings/system_status.php:183
1962
- msgid "Gravity Forms Version"
1963
- msgstr "Gravity Forms Version"
1964
-
1965
- #: src/view/html/Settings/system_status.php:203
1966
- msgid "PHP Version"
1967
- msgstr "PHP Version"
1968
-
1969
- #: src/view/html/Settings/system_status.php:223, src/view/View_Settings.php:589
1970
- msgid "Direct PDF Protection"
1971
- msgstr "Direct PDF Protection"
1972
-
1973
- #: src/view/html/Settings/system_status.php:237
1974
- msgid "You need JavaScript enabled to perform this check."
1975
- msgstr "You need JavaScript enabled to perform this check."
1976
-
1977
- #: src/view/html/Settings/system_status.php:243
1978
- msgid "Protected"
1979
- msgstr "Protected"
1980
-
1981
- #: src/view/html/Settings/system_status.php:251
1982
- msgid "Unprotected"
1983
- msgstr "Unprotected"
1984
-
1985
- #: src/view/html/Settings/system_status.php:257
1986
- msgid ""
1987
- "We've detected the PDFs saved in Gravity PDF's %stmp%s directory can be "
1988
- "publically accessed."
1989
- msgstr ""
1990
- "We've detected the PDFs saved in Gravity PDF's %stmp%s directory can be "
1991
- "publically accessed."
1992
-
1993
- #: src/view/html/Settings/system_status.php:259
1994
- msgid ""
1995
- "We recommend you use our %sgfpdf_tmp_location%s filter to %smove the folder "
1996
- "outside your public website directory%s."
1997
- msgstr ""
1998
- "We recommend you use our %sgfpdf_tmp_location%s filter to %smove the folder "
1999
- "outside your public website directory%s."
2000
-
2001
- #: src/view/html/Settings/tools.php:91, src/view/html/Settings/tools.php:113,
2002
- #: src/view/View_Settings.php:385
2003
- msgid "Tools"
2004
- msgstr "Tools"
2005
-
2006
- #: src/view/html/Settings/tools.php:143
2007
- msgid ""
2008
- "During the setup process any of the following templates stored in %s will be "
2009
- "overridden. If you have modified any of the following template or template "
2010
- "configuration files %smake a backup before continuing%s."
2011
- msgstr ""
2012
- "During the setup process any of the following templates stored in %s will be "
2013
- "overridden. If you have modified any of the following template or template "
2014
- "configuration files %smake a backup before continuing%s."
2015
-
2016
- #: src/view/html/Settings/tools.php:169
2017
- msgid "Manage all your custom Gravity PDF fonts in one place."
2018
- msgstr "Manage all your custom Gravity PDF fonts in one place."
2019
-
2020
- #: src/view/html/Settings/tools.php:169
2021
- msgid ""
2022
- "Only .ttf font files are supported and they MUST be uploaded through your "
2023
- "media library (no external links)."
2024
- msgstr ""
2025
- "Only .ttf font files are supported and they MUST be uploaded through your "
2026
- "media library (no external links)."
2027
-
2028
- #: src/view/html/Settings/tools.php:207
2029
- msgid "Looks bare in here!%s Click \"Add Font\" below to get started."
2030
- msgstr "Looks bare in here!%s Click \"Add Font\" below to get started."
2031
-
2032
- #: src/view/html/Settings/tools.php:231
2033
- msgid "Font Name"
2034
- msgstr "Font Name"
2035
-
2036
- #: src/view/html/Settings/tools.php:235
2037
- msgid "Only alphanumeric characters and spaces are accepted."
2038
- msgstr "Only alphanumeric characters and spaces are accepted."
2039
-
2040
- #: src/view/html/Settings/tools.php:243
2041
- msgid "Regular"
2042
- msgstr "Regular"
2043
-
2044
- #: src/view/html/Settings/tools.php:251, src/view/html/Settings/tools.php:253,
2045
- #: src/view/html/Settings/tools.php:255, src/view/html/Settings/tools.php:275,
2046
- #: src/view/html/Settings/tools.php:277, src/view/html/Settings/tools.php:279,
2047
- #: src/view/html/Settings/tools.php:299, src/view/html/Settings/tools.php:301,
2048
- #: src/view/html/Settings/tools.php:303, src/view/html/Settings/tools.php:323,
2049
- #: src/view/html/Settings/tools.php:325, src/view/html/Settings/tools.php:327
2050
- msgid "Select Font"
2051
- msgstr "Select Font"
2052
-
2053
- #: src/view/html/Settings/tools.php:267
2054
- msgid "Italics"
2055
- msgstr "Italics"
2056
-
2057
- #: src/view/html/Settings/tools.php:291
2058
- msgid "Bold"
2059
- msgstr "Bold"
2060
-
2061
- #: src/view/html/Settings/tools.php:315
2062
- msgid "Bold Italics"
2063
- msgstr "Bold Italics"
2064
-
2065
- #: src/view/html/Settings/tools.php:339
2066
- msgid "Save Font"
2067
- msgstr "Save Font"
2068
-
2069
- #: src/view/html/Settings/tools.php:367
2070
- msgid "Delete Font?"
2071
- msgstr "Delete Font?"
2072
-
2073
- #: src/view/html/Settings/tools.php:369
2074
- msgid ""
2075
- "Warning! You are about to delete this Font. Select 'Delete' to delete, "
2076
- "'Cancel' to stop."
2077
- msgstr ""
2078
- "Warning! You are about to delete this Font. Select 'Delete' to delete, "
2079
- "'Cancel' to stop."
2080
-
2081
- #: src/view/html/Settings/uninstaller.php:87,
2082
- #: src/view/html/Settings/uninstaller.php:115,
2083
- #: src/view/html/Settings/uninstaller.php:123
2084
- msgid "Uninstall Gravity PDF"
2085
- msgstr "Uninstall Gravity PDF"
2086
-
2087
- #: src/view/html/Settings/uninstaller.php:103
2088
- msgid ""
2089
- "%sThis operation deletes ALL Gravity PDF data and deactivates the plugin.%s "
2090
- "If you continue, all settings, configuration, custom templates and fonts "
2091
- "will be removed."
2092
- msgstr ""
2093
- "%sThis operation deletes ALL Gravity PDF data and deactivates the plugin.%s "
2094
- "If you continue, all settings, configuration, custom templates and fonts "
2095
- "will be removed."
2096
-
2097
- #: src/view/html/Settings/uninstaller.php:125
2098
- msgid ""
2099
- "Warning! ALL Gravity PDF data, %sincluding PDF configurations and ALL custom "
2100
- "templates%s will be deleted. This cannot be undone. Select 'Uninstall' to "
2101
- "delete, 'Cancel' to stop."
2102
- msgstr ""
2103
- "Warning! ALL Gravity PDF data, %sincluding PDF configurations and ALL custom "
2104
- "templates%s will be deleted. This cannot be undone. Select 'Uninstall' to "
2105
- "delete, 'Cancel' to stop."
2106
-
2107
- #: src/view/html/Shortcodes/conditional_logic_not_met.php:79
2108
- msgid ""
2109
- "PDF link not displayed because conditional logic requirements have not been "
2110
- "met."
2111
- msgstr ""
2112
- "PDF link not displayed because conditional logic requirements have not been "
2113
- "met."
2114
-
2115
- #: src/view/html/Shortcodes/conditional_logic_not_met.php:81,
2116
- #: src/view/html/Shortcodes/invalid_pdf_config.php:81,
2117
- #: src/view/html/Shortcodes/no_entry_id.php:81,
2118
- #: src/view/html/Shortcodes/pdf_not_active.php:81
2119
- msgid "(Admin Only Message)"
2120
- msgstr "(Admin Only Message)"
2121
-
2122
- #: src/view/html/Shortcodes/invalid_pdf_config.php:79
2123
- msgid ""
2124
- "Could not get Gravity PDF configuration using the PDF and Entry IDs passed."
2125
- msgstr ""
2126
- "Could not get Gravity PDF configuration using the PDF and Entry IDs passed."
2127
-
2128
- #: src/view/html/Shortcodes/no_entry_id.php:79
2129
- msgid ""
2130
- "No Gravity Form entry ID passed to Gravity PDF. Ensure you pass the entry ID "
2131
- "via the confirmation url query string – using either \"entry\" or \"lid\" as "
2132
- "the query string name – or by passing an ID directly to the shortcode."
2133
- msgstr ""
2134
- "No Gravity Form entry ID passed to Gravity PDF. Ensure you pass the entry ID "
2135
- "via the confirmation url query string – using either \"entry\" or \"lid\" as "
2136
- "the query string name – or by passing an ID directly to the shortcode."
2137
-
2138
- #: src/view/html/Shortcodes/pdf_not_active.php:79
2139
- msgid "PDF link not displayed because PDF is inactive."
2140
- msgstr "PDF link not displayed because PDF is inactive."
2141
-
2142
- #: src/view/html/Welcome/more.php:83
2143
- msgid "Get more out of Gravity PDF"
2144
- msgstr "Get more out of Gravity PDF"
2145
-
2146
- #: src/view/html/Welcome/more.php:93
2147
- msgid "PDF Template Shop"
2148
- msgstr "PDF Template Shop"
2149
-
2150
- #: src/view/html/Welcome/more.php:97
2151
- msgid ""
2152
- "It's like a theme shop, but for Gravity PDF templates. %sHead over to our "
2153
- "online store%s and view our growing selection of premium PDF templates."
2154
- msgstr ""
2155
- "It's like a theme shop, but for Gravity PDF templates. %sHead over to our "
2156
- "online store%s and view our growing selection of premium PDF templates."
2157
-
2158
- #: src/view/html/Welcome/more.php:101
2159
- msgid "Stay Up To Date"
2160
- msgstr "Stay Up To Date"
2161
-
2162
- #: src/view/html/Welcome/more.php:105
2163
- msgid ""
2164
- "%sSign up to our newsletter%s to be amongst the first to receive the latest "
2165
- "news and details on upcoming feature."
2166
- msgstr ""
2167
- "%sSign up to our newsletter%s to be amongst the first to receive the latest "
2168
- "news and details on upcoming feature."
2169
-
2170
- #: src/view/html/Welcome/more.php:117
2171
- msgid "Tailored PDFs"
2172
- msgstr "Tailored PDFs"
2173
-
2174
- #: src/view/html/Welcome/more.php:121
2175
- msgid ""
2176
- "If the PDF Shop doesn't have what you're after %sour friendly team can build "
2177
- "a document just for you%s. With an addon, our devs can even create templates "
2178
- "that auto fill existing PDFs – like government and legal documents."
2179
- msgstr ""
2180
- "If the PDF Shop doesn't have what you're after %sour friendly team can build "
2181
- "a document just for you%s. With an addon, our devs can even create templates "
2182
- "that auto fill existing PDFs – like government and legal documents."
2183
-
2184
- #: src/view/html/Welcome/more.php:125
2185
- msgid "Get Support"
2186
- msgstr "Get Support"
2187
-
2188
- #: src/view/html/Welcome/more.php:129
2189
- msgid ""
2190
- "Have trouble using Gravity PDF? %sContact our friendly staff%s who are "
2191
- "avaliable 9am to 5pm Monday to Friday, %sAustralian Eastern Standard Time%s."
2192
- msgstr ""
2193
- "Have trouble using Gravity PDF? %sContact our friendly staff%s who are "
2194
- "avaliable 9am to 5pm Monday to Friday, %sAustralian Eastern Standard Time%s."
2195
-
2196
- #: src/view/html/Welcome/more.php:141
2197
- msgid "Roll your Own"
2198
- msgstr "Roll your Own"
2199
-
2200
- #: src/view/html/Welcome/more.php:145
2201
- msgid ""
2202
- "If PHP, HTML and CSS come easy to you, you'll find creating your own PDF "
2203
- "templates a breeze. With %sextensive documentation and great examples%s "
2204
- "you'll be up and running in no time."
2205
- msgstr ""
2206
- "If PHP, HTML and CSS come easy to you, you'll find creating your own PDF "
2207
- "templates a breeze. With %sextensive documentation and great examples%s "
2208
- "you'll be up and running in no time."
2209
-
2210
- #: src/view/html/Welcome/tabs.php:99
2211
- msgid "What's New"
2212
- msgstr "What's New"
2213
-
2214
- #: src/view/html/Welcome/update.php:79
2215
- msgid "Discover Gravity PDF %s"
2216
- msgstr "Discover Gravity PDF %s"
2217
-
2218
- #: src/view/html/Welcome/update.php:85
2219
- msgid ""
2220
- "Managing PDF templates just become a whole lot easier with our Advanced "
2221
- "Template Manager! View, Search, Install and Delete PDFs right from our new "
2222
- "UI."
2223
- msgstr ""
2224
- "Managing PDF templates just become a whole lot easier with our Advanced "
2225
- "Template Manager! View, Search, Install and Delete PDFs right from our new "
2226
- "UI."
2227
-
2228
- #: src/view/html/Welcome/update.php:91, src/view/html/Welcome/welcome.php:91
2229
- msgid "Version %s"
2230
- msgstr "Version %s"
2231
-
2232
- #: src/view/html/Welcome/update.php:105
2233
- msgid "Managing PDF Templates in WordPress"
2234
- msgstr "Managing PDF Templates in WordPress"
2235
-
2236
- #: src/view/html/Welcome/update.php:111
2237
- msgid ""
2238
- "It's 100% easier to work with PDF Templates thanks to our Advanced Template "
2239
- "Manager. Based on the WordPress Theme Manager, you can easily search through "
2240
- "your installed templates, see what a PDF might look like and view supported "
2241
- "features – all without a page reload!"
2242
- msgstr ""
2243
- "It's 100% easier to work with PDF Templates thanks to our Advanced Template "
2244
- "Manager. Based on the WordPress Theme Manager, you can easily search through "
2245
- "your installed templates, see what a PDF might look like and view supported "
2246
- "features – all without a page reload!"
2247
-
2248
- #: src/view/html/Welcome/update.php:119
2249
- msgid ""
2250
- "We've added the ability to install PDFs via a zip file and easily delete "
2251
- "them, too. It's now very simple to install and use custom PDF templates – "
2252
- "like the ones %syou might purchased from our PDF Template Shop%s."
2253
- msgstr ""
2254
- "We've added the ability to install PDFs via a zip file and easily delete "
2255
- "them, too. It's now very simple to install and use custom PDF templates – "
2256
- "like the ones %syou might purchased from our PDF Template Shop%s."
2257
-
2258
- #: src/view/html/Welcome/update.php:157
2259
- msgid "Gravity PDF Merge Tags"
2260
- msgstr "Gravity PDF Merge Tags"
2261
-
2262
- #: src/view/html/Welcome/update.php:163
2263
- msgid ""
2264
- "The %s[gravitypdf]%s shortcode is an excellent way to display a PDF download "
2265
- "link on your website. But sometimes it's more useful to display the raw PDF "
2266
- "URL, and that's where the new PDF merge tag %s{Title:pdf:ID}%s comes in."
2267
- msgstr ""
2268
- "The %s[gravitypdf]%s shortcode is an excellent way to display a PDF download "
2269
- "link on your website. But sometimes it's more useful to display the raw PDF "
2270
- "URL, and that's where the new PDF merge tag %s{Title:pdf:ID}%s comes in."
2271
-
2272
- #: src/view/html/Welcome/update.php:171
2273
- msgid ""
2274
- "The PDF Merge Tag will be automatically converted to a URL if the PDF is "
2275
- "active and the PDF conditional logic has been met. The new merge tag is "
2276
- "automatically included in the Gravity Forms merge tag selector and can be "
2277
- "used anywhere Gravity Forms allows other merge tags (provided the entry has "
2278
- "been created)."
2279
- msgstr ""
2280
- "The PDF Merge Tag will be automatically converted to a URL if the PDF is "
2281
- "active and the PDF conditional logic has been met. The new merge tag is "
2282
- "automatically included in the Gravity Forms merge tag selector and can be "
2283
- "used anywhere Gravity Forms allows other merge tags (provided the entry has "
2284
- "been created)."
2285
-
2286
- #: src/view/html/Welcome/update.php:191
2287
- msgid "Four Column Support added to Core PDF Templates!"
2288
- msgstr "Four Column Support added to Core PDF Templates!"
2289
-
2290
- #: src/view/html/Welcome/update.php:197
2291
- msgid ""
2292
- "%sThis four-column CSS code%s has become increasingly popular for Gravity "
2293
- "Forms users and so we have added full support for these classes in Gravity "
2294
- "PDF (make sure to include the custom CSS with your theme)."
2295
- msgstr ""
2296
- "%sThis four-column CSS code%s has become increasingly popular for Gravity "
2297
- "Forms users and so we have added full support for these classes in Gravity "
2298
- "PDF (make sure to include the custom CSS with your theme)."
2299
-
2300
- #: src/view/html/Welcome/update.php:207
2301
- msgid ""
2302
- "To start using in your PDF, add the classes %sgf_first_quarter%s, "
2303
- "%sgf_second_quarter%s, %sgf_third_quarter%s and %sgf_fourth_quarter%s to "
2304
- "your Gravity Form fields and supported PDF templates will automatically "
2305
- "create a four column layout to match."
2306
- msgstr ""
2307
- "To start using in your PDF, add the classes %sgf_first_quarter%s, "
2308
- "%sgf_second_quarter%s, %sgf_third_quarter%s and %sgf_fourth_quarter%s to "
2309
- "your Gravity Form fields and supported PDF templates will automatically "
2310
- "create a four column layout to match."
2311
-
2312
- #: src/view/html/Welcome/welcome.php:85
2313
- msgid ""
2314
- "You're just minutes away from producing your first highly-customizable PDF "
2315
- "document using Gravity Forms data."
2316
- msgstr ""
2317
- "You're just minutes away from producing your first highly-customisable PDF "
2318
- "document using Gravity Forms data."
2319
-
2320
- #: src/view/html/Welcome/welcome.php:105
2321
- msgid "Where to Start?"
2322
- msgstr "Where to Start?"
2323
-
2324
- #: src/view/html/Welcome/welcome.php:111
2325
- msgid ""
2326
- "Your first step is to review %sGravity PDF's General Settings%s which can be "
2327
- "found by navigating to %sForms -> Settings -> PDF%s in your WordPress admin "
2328
- "area. From here you'll be able to set defaults for paper size, font face, "
2329
- "font colour, and select a PDF template – %swe ship with four completely-free "
2330
- "layouts%s – which will be used for all new PDFs. There's even an easy-to-use "
2331
- "interface for installing custom fonts."
2332
- msgstr ""
2333
- "Your first step is to review %sGravity PDF's General Settings%s which can be "
2334
- "found by navigating to %sForms -> Settings -> PDF%s in your WordPress admin "
2335
- "area. From here you'll be able to set defaults for paper size, font face, "
2336
- "font colour, and select a PDF template – %swe ship with four completely-free "
2337
- "layouts%s – which will be used for all new PDFs. There's even an easy-to-use "
2338
- "interface for installing custom fonts."
2339
-
2340
- #: src/view/html/Welcome/welcome.php:117
2341
- msgid "Configure Settings"
2342
- msgstr "Configure Settings"
2343
-
2344
- #: src/view/html/Welcome/welcome.php:149
2345
- msgid "Setting up a PDF"
2346
- msgstr "Setting up a PDF"
2347
-
2348
- #: src/view/html/Welcome/welcome.php:155
2349
- msgid ""
2350
- "You can setup individual PDF documents from the %sGravity Form \"Forms\" page"
2351
- "%s in your admin area – located at %sForms -> Forms%s in your navigation. A "
2352
- "new %sPDF%s option will be avaliable in each forms' settings section. The "
2353
- "only required fields are %sName%s – an internal identifier – and %sFilename"
2354
- "%s – the name used when saving and emailing the PDF."
2355
- msgstr ""
2356
- "You can setup individual PDF documents from the %sGravity Form \"Forms\" page"
2357
- "%s in your admin area – located at %sForms -> Forms%s in your navigation. A "
2358
- "new %sPDF%s option will be avaliable in each forms' settings section. The "
2359
- "only required fields are %sName%s – an internal identifier – and %sFilename"
2360
- "%s – the name used when saving and emailing the PDF."
2361
-
2362
- #: src/view/html/Welcome/welcome.php:179
2363
- msgid "Select which Form you want to setup first:"
2364
- msgstr "Select which Form you want to setup first:"
2365
-
2366
- #: src/view/html/Welcome/welcome.php:193
2367
- msgid "Create a PDF"
2368
- msgstr "Create a PDF"
2369
-
2370
- #: src/view/html/Welcome/welcome.php:215
2371
- msgid "Simple PDF Download Links"
2372
- msgstr "Simple PDF Download Links"
2373
-
2374
- #: src/view/html/Welcome/welcome.php:219
2375
- msgid ""
2376
- "The %s[gravitypdf]%s shortcode allows you to %seasily place a PDF download "
2377
- "link%s on any of the Gravity Forms Confirmation types."
2378
- msgstr ""
2379
- "The %s[gravitypdf]%s shortcode allows you to %seasily place a PDF download "
2380
- "link%s on any of the Gravity Forms Confirmation types."
2381
-
2382
- #: src/view/html/Welcome/welcome.php:229
2383
- msgid "Automated PDF Emails"
2384
- msgstr "Automated PDF Emails"
2385
-
2386
- #: src/view/html/Welcome/welcome.php:233
2387
- msgid ""
2388
- "Select a Gravity Form Notification and your PDF will automatically be sent "
2389
- "as an attachment. Powerful conditional logic can also be used to determine "
2390
- "if a PDF will be included."
2391
- msgstr ""
2392
- "Select a Gravity Form Notification and your PDF will automatically be sent "
2393
- "as an attachment. Powerful conditional logic can also be used to determine "
2394
- "if a PDF will be included."
2395
-
2396
- #: src/view/html/Welcome/welcome.php:243
2397
- msgid "Custom Fonts"
2398
- msgstr "Custom Fonts"
2399
-
2400
- #: src/view/html/Welcome/welcome.php:247
2401
- msgid ""
2402
- "Make your documents stand out by including your favorite fonts with our "
2403
- "%ssimple font manager%s."
2404
- msgstr ""
2405
- "Make your documents stand out by including your favourite fonts with our "
2406
- "%ssimple font manager%s."
2407
-
2408
- #: src/view/View_Settings.php:375
2409
- msgid "General"
2410
- msgstr "General"
2411
-
2412
- #: src/view/View_Settings.php:395
2413
- msgid "Help"
2414
- msgstr "Help"
2415
-
2416
- #: src/view/View_Settings.php:587
2417
- msgid ""
2418
- "Producing PDF documents is hard work and Gravity PDF requires more resources "
2419
- "than most plugins. We strongly recommend you have at least 128MB, but you "
2420
- "may need more."
2421
- msgstr ""
2422
- "Producing PDF documents is hard work and Gravity PDF requires more resources "
2423
- "than most plugins. We strongly recommend you have at least 128MB, but you "
2424
- "may need more."
2425
-
2426
- #: src/view/View_Settings.php:589
2427
- msgid ""
2428
- "Apache and Litespeed servers automatically disable public access to the "
2429
- "Gravity PDF temporary directory using a %s.htaccess%s file, but other web "
2430
- "servers like Nginx do not support this feature. We will check if your PDFs "
2431
- "are automatically protected, and let you know what you can do to protect "
2432
- "your data if they are not."
2433
- msgstr ""
2434
- "Apache and Litespeed servers automatically disable public access to the "
2435
- "Gravity PDF temporary directory using a %s.htaccess%s file, but other web "
2436
- "servers like Nginx do not support this feature. We will check if your PDFs "
2437
- "are automatically protected, and let you know what you can do to protect "
2438
- "your data if they are not."
2439
-
2440
- #: tests/phpunit/unit-tests/test-settings.php:523
2441
- msgid "Normal Notice"
2442
- msgstr "Normal Notice"
2443
-
2444
- #~ msgid ""
2445
- #~ "The %s[gravitypdf]%s shortcode is an excellent way to display a PDF "
2446
- #~ "download link on your website. Sometimes it's more useful to display the "
2447
- #~ "raw PDF URL, and that's where the new PDF merge tag %s{Title:pdf:ID}%s "
2448
- #~ "comes in."
2449
- #~ msgstr ""
2450
- #~ "The %s[gravitypdf]%s shortcode is an excellent way to display a PDF "
2451
- #~ "download link on your website. Sometimes it's more useful to display the "
2452
- #~ "raw PDF URL, and that's where the new PDF merge tag %s{Title:pdf:ID}%s "
2453
- #~ "comes in."
2454
-
2455
- #~ msgid ""
2456
- #~ "The PDF Merge Tag will be automatically converted to a URL if the PDF is "
2457
- #~ "active and the PDF conditional logic has been met. The new merge tag is "
2458
- #~ "automatically included in Gravity Forms merge tag selector and can be "
2459
- #~ "used anywhere Gravity Forms allows other merge tags (provided the entry "
2460
- #~ "has been saved)."
2461
- #~ msgstr ""
2462
- #~ "The PDF Merge Tag will be automatically converted to a URL if the PDF is "
2463
- #~ "active and the PDF conditional logic has been met. The new merge tag is "
2464
- #~ "automatically included in Gravity Forms merge tag selector and can be "
2465
- #~ "used anywhere Gravity Forms allows other merge tags (provided the entry "
2466
- #~ "has been saved)."
2467
-
2468
- #~ msgid ""
2469
- #~ "To start using in your PDF, add the classes %sgf_first_quarter%s, "
2470
- #~ "%sgf_second_quarter%s, %sgf_third_quarter%s and %sgf_fourth_quarter%s to "
2471
- #~ "your Gravity Form fields and support PDF templates will automatically "
2472
- #~ "create a four column layout to match."
2473
- #~ msgstr ""
2474
- #~ "To start using in your PDF, add the classes %sgf_first_quarter%s, "
2475
- #~ "%sgf_second_quarter%s, %sgf_third_quarter%s and %sgf_fourth_quarter%s to "
2476
- #~ "your Gravity Form fields and support PDF templates will automatically "
2477
- #~ "create a four column layout to match."
2478
-
2479
- #~ msgid ""
2480
- #~ "Custom fonts can be installed for use in your PDFs. Only %s.ttf%s and %s."
2481
- #~ "otf%s font files are supported."
2482
- #~ msgstr ""
2483
- #~ "Custom fonts can be installed for use in your PDFs. Only %s.ttf%s and %s."
2484
- #~ "otf%s font files are supported."
2485
-
2486
- #~ msgid ""
2487
- #~ "Only .ttf and %s.otf font files%s are supported and they MUST be uploaded "
2488
- #~ "through your media library (no external links)."
2489
- #~ msgstr ""
2490
- #~ "Only .ttf and %s.otf font files%s are supported and they MUST be uploaded "
2491
- #~ "through your media library (no external links)."
2492
-
2493
- #~ msgid ""
2494
- #~ "Gravity PDF has been completely rebuilt with simplicity, stability and "
2495
- #~ "security in mind. Our team has spent over 12 months making a great "
2496
- #~ "product even greater. Discover what's new..."
2497
- #~ msgstr ""
2498
- #~ "Gravity PDF has been completely rebuilt with simplicity, stability and "
2499
- #~ "security in mind. Our team has spent over 12 months making a great "
2500
- #~ "product even greater. Discover what's new..."
2501
-
2502
- #~ msgid "Bringing Config Settings to WordPress"
2503
- #~ msgstr "Bringing Config Settings to WordPress"
2504
-
2505
- #~ msgid ""
2506
- #~ "We've done away with the need to edit PHP files to configure Gravity PDF. "
2507
- #~ "You'll have a familiar and seamless experience controlling PDF settings "
2508
- #~ "direct from your WordPress Admin area."
2509
- #~ msgstr ""
2510
- #~ "We've done away with the need to edit PHP files to configure Gravity PDF. "
2511
- #~ "You'll have a familiar and seamless experience controlling PDF settings "
2512
- #~ "direct from your WordPress Admin area."
2513
-
2514
- #~ msgid ""
2515
- #~ "If you've ever configured a Gravity Form add-on you'll feel right at home "
2516
- #~ "setting up PDFs."
2517
- #~ msgstr ""
2518
- #~ "If you've ever configured a Gravity Form add-on you'll feel right at home "
2519
- #~ "setting up PDFs."
2520
-
2521
- #~ msgid "All-New Templates with CSS Ready Class Support"
2522
- #~ msgstr "All-New Templates with CSS Ready Class Support"
2523
-
2524
- #~ msgid ""
2525
- #~ "We were always getting feedback for templates that look more like their "
2526
- #~ "Gravity Forms layouts. %sYou asked and we've delivered!%s"
2527
- #~ msgstr ""
2528
- #~ "We were always getting feedback for templates that look more like their "
2529
- #~ "Gravity Forms layouts. %sYou asked and we've delivered!%s"
2530
-
2531
- #~ msgid ""
2532
- #~ "All v4 PDFs will support %sGravity Forms CSS Ready Classes%s. When used "
2533
- #~ "in your form the PDF will automatically create two and three column "
2534
- #~ "layouts to suit. Plus, Gravity PDF %snow comes with four free PDF "
2535
- #~ "templates%s out of the box."
2536
- #~ msgstr ""
2537
- #~ "All v4 PDFs will support %sGravity Forms CSS Ready Classes%s. When used "
2538
- #~ "in your form the PDF will automatically create two and three column "
2539
- #~ "layouts to suit. Plus, Gravity PDF %snow comes with four free PDF "
2540
- #~ "templates%s out of the box."
2541
-
2542
- #~ msgid "A Beautiful Font Manager"
2543
- #~ msgstr "A Beautiful Font Manager"
2544
-
2545
- #~ msgid ""
2546
- #~ "No more playing around with FTP when installing fonts, or \"guessing\" "
2547
- #~ "the font family name to use in your templates. Our all-new font manager "
2548
- #~ "makes it a breeze to upload TTF or OTF font files and use them in your "
2549
- #~ "PDFs."
2550
- #~ msgstr ""
2551
- #~ "No more playing around with FTP when installing fonts, or \"guessing\" "
2552
- #~ "the font family name to use in your templates. Our all-new font manager "
2553
- #~ "makes it a breeze to upload TTF or OTF font files and use them in your "
2554
- #~ "PDFs."
2555
-
2556
- #~ msgid ""
2557
- #~ "Once installed, you'll have full control over the font face, size and "
2558
- #~ "color using our powerful settings interface."
2559
- #~ msgstr ""
2560
- #~ "Once installed, you'll have full control over the font face, size and "
2561
- #~ "colour using our powerful settings interface."
2562
-
2563
- #~ msgid "PDF Conditional Logic"
2564
- #~ msgstr "PDF Conditional Logic"
2565
-
2566
- #~ msgid ""
2567
- #~ "Enable or disable PDFs with Gravity Forms powerful conditional logic "
2568
- #~ "feature. Control when PDFs are attached to email notifications and "
2569
- #~ "disable a PDF from being viewed if your conditions aren't met."
2570
- #~ msgstr ""
2571
- #~ "Enable or disable PDFs with Gravity Forms powerful conditional logic "
2572
- #~ "feature. Control when PDFs are attached to email notifications and "
2573
- #~ "disable a PDF from being viewed if your conditions aren't met."
2574
-
2575
- #~ msgid "Headers and Footers"
2576
- #~ msgstr "Headers and Footers"
2577
-
2578
- #~ msgid ""
2579
- #~ "We've built in header and footer support in all our v4 templates. You can "
2580
- #~ "optionally have a different first page header and footer. Now that's "
2581
- #~ "control!"
2582
- #~ msgstr ""
2583
- #~ "We've built in header and footer support in all our v4 templates. You can "
2584
- #~ "optionally have a different first page header and footer. Now that's "
2585
- #~ "control!"
2586
-
2587
- #~ msgid "There was an error processing your request. Please try again."
2588
- #~ msgstr "There was an error processing your request. Please try again."
2589
-
2590
- #~ msgctxt "Required"
2591
- #~ msgid "needs"
2592
- #~ msgstr "needs"
2593
-
2594
- #~ msgid "No Template Preview Available"
2595
- #~ msgstr "No Template Preview Available"
1
+ # Copyright (C) 2016 gravity-forms-pdf-extended
2
+ # This file is distributed under the same license as the gravity-forms-pdf-extended package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: gravity-forms-pdf-extended\n"
6
+ "POT-Creation-Date: \n"
7
+ "PO-Revision-Date: 2017-01-19 09:47+1100\n"
8
+ "Last-Translator: Jake Jackson <support@gravitypdf.com>\n"
9
+ "Language-Team: \n"
10
+ "Language: en_AU\n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: 8bit\n"
14
+ "X-Poedit-Basepath: ..\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
17
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
18
+ "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
19
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
20
+ "X-Generator: Poedit 1.8.11\n"
21
+ "X-Poedit-SearchPath-0: .\n"
22
+ "X-Poedit-SearchPath-1: languages\n"
23
+ "X-Poedit-SearchPathExcluded-0: *.js\n"
24
+
25
+ #: api.php:503
26
+ msgid ""
27
+ "The $type parameter is invalid. Only \"view\" and \"model\" are accepted"
28
+ msgstr ""
29
+ "The $type parameter is invalid. Only \"view\" and \"model\" are accepted"
30
+
31
+ #: api.php:793
32
+ msgid ""
33
+ "The option key %s already exists. Use GPDFAPI::update_plugin_option instead"
34
+ msgstr ""
35
+ "The option key %s already exists. Use GPDFAPI::update_plugin_option instead"
36
+
37
+ #: pdf.php:379
38
+ msgid "WordPress Version %s is required. %sGet more info%s."
39
+ msgstr "WordPress Version %s is required. %sGet more info%s."
40
+
41
+ #: pdf.php:417
42
+ msgid "%sGravity Forms%s Version %s is required. %sGet more info%s."
43
+ msgstr "%sGravity Forms%s Version %s is required. %sGet more info%s."
44
+
45
+ #: pdf.php:455
46
+ msgid ""
47
+ "You are running an %soutdated version of PHP%s. Contact your web hosting "
48
+ "provider to update. %sGet more info%s."
49
+ msgstr ""
50
+ "You are running an %soutdated version of PHP%s. Contact your web hosting "
51
+ "provider to update. %sGet more info%s."
52
+
53
+ #: pdf.php:493
54
+ msgid ""
55
+ "The PHP Extension MB String could not be detected. Contact your web hosting "
56
+ "provider to fix. %sGet more info%s."
57
+ msgstr ""
58
+ "The PHP Extension MB String could not be detected. Contact your web hosting "
59
+ "provider to fix. %sGet more info%s."
60
+
61
+ #: pdf.php:531
62
+ msgid ""
63
+ "The PHP Extension MB String does not have MB Regex enabled. Contact your web "
64
+ "hosting provider to fix. %sGet more info%s."
65
+ msgstr ""
66
+ "The PHP Extension MB String does not have MB Regex enabled. Contact your web "
67
+ "hosting provider to fix. %sGet more info%s."
68
+
69
+ #: pdf.php:569
70
+ msgid ""
71
+ "The PHP Extension GD Image Library could not be detected. Contact your web "
72
+ "hosting provider to fix. %sGet more info%s."
73
+ msgstr ""
74
+ "The PHP Extension GD Image Library could not be detected. Contact your web "
75
+ "hosting provider to fix. %sGet more info%s."
76
+
77
+ #: pdf.php:607
78
+ msgid ""
79
+ "The PHP DOM Extension was not found. Contact your web hosting provider to "
80
+ "fix. %sGet more info%s."
81
+ msgstr ""
82
+ "The PHP DOM Extension was not found. Contact your web hosting provider to "
83
+ "fix. %sGet more info%s."
84
+
85
+ #: pdf.php:621
86
+ msgid ""
87
+ "The PHP Extension libxml could not be detected. Contact your web hosting "
88
+ "provider to fix. %sGet more info%s."
89
+ msgstr ""
90
+ "The PHP Extension libxml could not be detected. Contact your web hosting "
91
+ "provider to fix. %sGet more info%s."
92
+
93
+ #: pdf.php:667
94
+ msgid ""
95
+ "You need %s128MB%s of WP Memory (RAM) but we only found %s available. %sTry "
96
+ "these methods to increase your memory limit%s, otherwise contact your web "
97
+ "hosting provider to fix."
98
+ msgstr ""
99
+ "You need %s128MB%s of WP Memory (RAM) but we only found %s available. %sTry "
100
+ "these methods to increase your memory limit%s, otherwise contact your web "
101
+ "hosting provider to fix."
102
+
103
+ #: pdf.php:801
104
+ msgid "Gravity PDF Installation Problem"
105
+ msgstr "Gravity PDF Installation Problem"
106
+
107
+ #: pdf.php:805
108
+ msgid ""
109
+ "The minimum requirements for Gravity PDF have not been met. Please fix the "
110
+ "issue(s) below to continue:"
111
+ msgstr ""
112
+ "The minimum requirements for Gravity PDF have not been met. Please fix the "
113
+ "issue(s) below to continue:"
114
+
115
+ #: src/bootstrap.php:315, src/bootstrap.php:339, src/deprecated.php:111,
116
+ #: src/deprecated.php:135
117
+ msgid "\"%s\" has been deprecated as of Gravity PDF 4.0"
118
+ msgstr "\"%s\" has been deprecated as of Gravity PDF 4.0"
119
+
120
+ #: src/bootstrap.php:799
121
+ msgid "View Gravity PDF Settings"
122
+ msgstr "View Gravity PDF Settings"
123
+
124
+ #: src/bootstrap.php:799
125
+ msgid "Settings"
126
+ msgstr "Settings"
127
+
128
+ #: src/bootstrap.php:839
129
+ msgid "View Gravity PDF Documentation"
130
+ msgstr "View Gravity PDF Documentation"
131
+
132
+ #: src/bootstrap.php:839
133
+ msgid "Docs"
134
+ msgstr "Docs"
135
+
136
+ #: src/bootstrap.php:841
137
+ msgid "Get Help and Support"
138
+ msgstr "Get Help and Support"
139
+
140
+ #: src/bootstrap.php:841
141
+ msgid "Support"
142
+ msgstr "Support"
143
+
144
+ #: src/bootstrap.php:843
145
+ msgid "View Gravity PDF Theme Shop"
146
+ msgstr "View Gravity PDF Theme Shop"
147
+
148
+ #: src/bootstrap.php:843
149
+ msgid "Theme Shop"
150
+ msgstr "Theme Shop"
151
+
152
+ #: src/bootstrap.php:1323, src/controller/Controller_Shortcodes.php:301,
153
+ #: src/helper/Helper_Data.php:349
154
+ msgid "Gravity PDF"
155
+ msgstr "Gravity PDF"
156
+
157
+ #: src/controller/Controller_Actions.php:311
158
+ msgid "Review Submitted"
159
+ msgstr "Review Submitted"
160
+
161
+ #: src/controller/Controller_Actions.php:331
162
+ msgid "Begin Migration"
163
+ msgstr "Begin Migration"
164
+
165
+ #: src/controller/Controller_Actions.php:469,
166
+ #: src/model/Model_Form_Settings.php:379,
167
+ #: src/model/Model_Form_Settings.php:449,
168
+ #: src/model/Model_Form_Settings.php:569, src/view/View_Settings.php:535
169
+ msgid "You do not have permission to access this page"
170
+ msgstr "You do not have permission to access this page"
171
+
172
+ #: src/controller/Controller_Actions.php:483,
173
+ #: src/helper/Helper_Migration.php:319
174
+ msgid "There was a problem processing the action. Please try again."
175
+ msgstr "There was a problem processing the action. Please try again."
176
+
177
+ #: src/controller/Controller_Install.php:469
178
+ msgid "There was a problem uninstalling Gravity PDF. Please try again."
179
+ msgstr "There was a problem uninstalling Gravity PDF. Please try again."
180
+
181
+ #: src/controller/Controller_PDF.php:617, src/view/View_PDF.php:523
182
+ msgid "There was a problem generating your PDF"
183
+ msgstr "There was a problem generating your PDF"
184
+
185
+ #: src/controller/Controller_Settings.php:675
186
+ msgid "There was a problem installing the PDF templates. Please try again."
187
+ msgstr "There was a problem installing the PDF templates. Please try again."
188
+
189
+ #: src/helper/abstract/Helper_Abstract_Options.php:779,
190
+ #: src/helper/abstract/Helper_Abstract_Options.php:811
191
+ msgid "You must pass in a valid form ID"
192
+ msgstr "You must pass in a valid form ID"
193
+
194
+ #: src/helper/abstract/Helper_Abstract_Options.php:901
195
+ msgid "You must pass in a valid PDF ID"
196
+ msgstr "You must pass in a valid PDF ID"
197
+
198
+ #: src/helper/abstract/Helper_Abstract_Options.php:1613
199
+ msgid "Gravity Forms Capabilities"
200
+ msgstr "Gravity Forms Capabilities"
201
+
202
+ #: src/helper/abstract/Helper_Abstract_Options.php:1625
203
+ msgid "Active WordPress Capabilities"
204
+ msgstr "Active WordPress Capabilities"
205
+
206
+ #: src/helper/abstract/Helper_Abstract_Options.php:1673
207
+ msgid "Common Sizes"
208
+ msgstr "Common Sizes"
209
+
210
+ #: src/helper/abstract/Helper_Abstract_Options.php:1675
211
+ msgid "A4 (210 x 297mm)"
212
+ msgstr "A4 (210 x 297mm)"
213
+
214
+ #: src/helper/abstract/Helper_Abstract_Options.php:1677
215
+ msgid "Letter (8.5 x 11in)"
216
+ msgstr "Letter (8.5 x 11in)"
217
+
218
+ #: src/helper/abstract/Helper_Abstract_Options.php:1679
219
+ msgid "Legal (8.5 x 14in)"
220
+ msgstr "Legal (8.5 x 14in)"
221
+
222
+ #: src/helper/abstract/Helper_Abstract_Options.php:1681
223
+ msgid "Ledger / Tabloid (11 x 17in)"
224
+ msgstr "Ledger / Tabloid (11 x 17in)"
225
+
226
+ #: src/helper/abstract/Helper_Abstract_Options.php:1683
227
+ msgid "Executive (7 x 10in)"
228
+ msgstr "Executive (7 x 10in)"
229
+
230
+ #: src/helper/abstract/Helper_Abstract_Options.php:1685,
231
+ #: src/helper/Helper_Options_Fields.php:195,
232
+ #: src/helper/Helper_Options_Fields.php:723
233
+ msgid "Custom Paper Size"
234
+ msgstr "Custom Paper Size"
235
+
236
+ #: src/helper/abstract/Helper_Abstract_Options.php:1691
237
+ msgid "\"A\" Sizes"
238
+ msgstr "\"A\" Sizes"
239
+
240
+ #: src/helper/abstract/Helper_Abstract_Options.php:1693
241
+ msgid "A0 (841 x 1189mm)"
242
+ msgstr "A0 (841 x 1189mm)"
243
+
244
+ #: src/helper/abstract/Helper_Abstract_Options.php:1695
245
+ msgid "A1 (594 x 841mm)"
246
+ msgstr "A1 (594 x 841mm)"
247
+
248
+ #: src/helper/abstract/Helper_Abstract_Options.php:1697
249
+ msgid "A2 (420 x 594mm)"
250
+ msgstr "A2 (420 x 594mm)"
251
+
252
+ #: src/helper/abstract/Helper_Abstract_Options.php:1699
253
+ msgid "A3 (297 x 420mm)"
254
+ msgstr "A3 (297 x 420mm)"
255
+
256
+ #: src/helper/abstract/Helper_Abstract_Options.php:1701
257
+ msgid "A5 (210 x 297mm)"
258
+ msgstr "A5 (210 x 297mm)"
259
+
260
+ #: src/helper/abstract/Helper_Abstract_Options.php:1703
261
+ msgid "A6 (105 x 148mm)"
262
+ msgstr "A6 (105 x 148mm)"
263
+
264
+ #: src/helper/abstract/Helper_Abstract_Options.php:1705
265
+ msgid "A7 (74 x 105mm)"
266
+ msgstr "A7 (74 x 105mm)"
267
+
268
+ #: src/helper/abstract/Helper_Abstract_Options.php:1707
269
+ msgid "A8 (52 x 74mm)"
270
+ msgstr "A8 (52 x 74mm)"
271
+
272
+ #: src/helper/abstract/Helper_Abstract_Options.php:1709
273
+ msgid "A9 (37 x 52mm)"
274
+ msgstr "A9 (37 x 52mm)"
275
+
276
+ #: src/helper/abstract/Helper_Abstract_Options.php:1711
277
+ msgid "A10 (26 x 37mm)"
278
+ msgstr "A10 (26 x 37mm)"
279
+
280
+ #: src/helper/abstract/Helper_Abstract_Options.php:1717
281
+ msgid "\"B\" Sizes"
282
+ msgstr "\"B\" Sizes"
283
+
284
+ #: src/helper/abstract/Helper_Abstract_Options.php:1719
285
+ msgid "B0 (1414 x 1000mm)"
286
+ msgstr "B0 (1414 x 1000mm)"
287
+
288
+ #: src/helper/abstract/Helper_Abstract_Options.php:1721
289
+ msgid "B1 (1000 x 707mm)"
290
+ msgstr "B1 (1000 x 707mm)"
291
+
292
+ #: src/helper/abstract/Helper_Abstract_Options.php:1723
293
+ msgid "B2 (707 x 500mm)"
294
+ msgstr "B2 (707 x 500mm)"
295
+
296
+ #: src/helper/abstract/Helper_Abstract_Options.php:1725
297
+ msgid "B3 (500 x 353mm)"
298
+ msgstr "B3 (500 x 353mm)"
299
+
300
+ #: src/helper/abstract/Helper_Abstract_Options.php:1727
301
+ msgid "B4 (353 x 250mm)"
302
+ msgstr "B4 (353 x 250mm)"
303
+
304
+ #: src/helper/abstract/Helper_Abstract_Options.php:1729
305
+ msgid "B5 (250 x 176mm)"
306
+ msgstr "B5 (250 x 176mm)"
307
+
308
+ #: src/helper/abstract/Helper_Abstract_Options.php:1731
309
+ msgid "B6 (176 x 125mm)"
310
+ msgstr "B6 (176 x 125mm)"
311
+
312
+ #: src/helper/abstract/Helper_Abstract_Options.php:1733
313
+ msgid "B7 (125 x 88mm)"
314
+ msgstr "B7 (125 x 88mm)"
315
+
316
+ #: src/helper/abstract/Helper_Abstract_Options.php:1735
317
+ msgid "B8 (88 x 62mm)"
318
+ msgstr "B8 (88 x 62mm)"
319
+
320
+ #: src/helper/abstract/Helper_Abstract_Options.php:1737
321
+ msgid "B9 (62 x 44mm)"
322
+ msgstr "B9 (62 x 44mm)"
323
+
324
+ #: src/helper/abstract/Helper_Abstract_Options.php:1739
325
+ msgid "B10 (44 x 31mm)"
326
+ msgstr "B10 (44 x 31mm)"
327
+
328
+ #: src/helper/abstract/Helper_Abstract_Options.php:1745
329
+ msgid "\"C\" Sizes"
330
+ msgstr "\"C\" Sizes"
331
+
332
+ #: src/helper/abstract/Helper_Abstract_Options.php:1747
333
+ msgid "C0 (1297 x 917mm)"
334
+ msgstr "C0 (1297 x 917mm)"
335
+
336
+ #: src/helper/abstract/Helper_Abstract_Options.php:1749
337
+ msgid "C1 (917 x 648mm)"
338
+ msgstr "C1 (917 x 648mm)"
339
+
340
+ #: src/helper/abstract/Helper_Abstract_Options.php:1751
341
+ msgid "C2 (648 x 458mm)"
342
+ msgstr "C2 (648 x 458mm)"
343
+
344
+ #: src/helper/abstract/Helper_Abstract_Options.php:1753
345
+ msgid "C3 (458 x 324mm)"
346
+ msgstr "C3 (458 x 324mm)"
347
+
348
+ #: src/helper/abstract/Helper_Abstract_Options.php:1755
349
+ msgid "C4 (324 x 229mm)"
350
+ msgstr "C4 (324 x 229mm)"
351
+
352
+ #: src/helper/abstract/Helper_Abstract_Options.php:1757
353
+ msgid "C5 (229 x 162mm)"
354
+ msgstr "C5 (229 x 162mm)"
355
+
356
+ #: src/helper/abstract/Helper_Abstract_Options.php:1759
357
+ msgid "C6 (162 x 114mm)"
358
+ msgstr "C6 (162 x 114mm)"
359
+
360
+ #: src/helper/abstract/Helper_Abstract_Options.php:1761
361
+ msgid "C7 (114 x 81mm)"
362
+ msgstr "C7 (114 x 81mm)"
363
+
364
+ #: src/helper/abstract/Helper_Abstract_Options.php:1763
365
+ msgid "C8 (81 x 57mm)"
366
+ msgstr "C8 (81 x 57mm)"
367
+
368
+ #: src/helper/abstract/Helper_Abstract_Options.php:1765
369
+ msgid "C9 (57 x 40mm)"
370
+ msgstr "C9 (57 x 40mm)"
371
+
372
+ #: src/helper/abstract/Helper_Abstract_Options.php:1767
373
+ msgid "C10 (40 x 28mm)"
374
+ msgstr "C10 (40 x 28mm)"
375
+
376
+ #: src/helper/abstract/Helper_Abstract_Options.php:1773
377
+ msgid "\"RA\" and \"SRA\" Sizes"
378
+ msgstr "\"RA\" and \"SRA\" Sizes"
379
+
380
+ #: src/helper/abstract/Helper_Abstract_Options.php:1775
381
+ msgid "RA0 (860 x 1220mm)"
382
+ msgstr "RA0 (860 x 1220mm)"
383
+
384
+ #: src/helper/abstract/Helper_Abstract_O