Нет описания

editor.html 61KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594
  1. <% extends 'layout.html' %>
  2. <% block templates %>
  3. <%= partial(
  4. 'newsletter_editor_template_tools_generic',
  5. 'newsletter/templates/blocks/base/toolsGeneric.hbs'
  6. ) %>
  7. <%= partial(
  8. 'newsletter_editor_template_automated_latest_content_block',
  9. 'newsletter/templates/blocks/automatedLatestContent/block.hbs'
  10. ) %>
  11. <%= partial(
  12. 'newsletter_editor_template_automated_latest_content_widget',
  13. 'newsletter/templates/blocks/automatedLatestContent/widget.hbs'
  14. ) %>
  15. <%= partial(
  16. 'newsletter_editor_template_automated_latest_content_settings',
  17. 'newsletter/templates/blocks/automatedLatestContent/settings.hbs'
  18. ) %>
  19. <%= partial(
  20. 'newsletter_editor_template_automated_latest_content_layout_block',
  21. 'newsletter/templates/blocks/automatedLatestContentLayout/block.hbs'
  22. ) %>
  23. <%= partial(
  24. 'newsletter_editor_template_automated_latest_content_layout_widget',
  25. 'newsletter/templates/blocks/automatedLatestContentLayout/widget.hbs'
  26. ) %>
  27. <%= partial(
  28. 'newsletter_editor_template_automated_latest_content_layout_settings',
  29. 'newsletter/templates/blocks/automatedLatestContentLayout/settings.hbs'
  30. ) %>
  31. <%= partial(
  32. 'newsletter_editor_template_button_block',
  33. 'newsletter/templates/blocks/button/block.hbs'
  34. ) %>
  35. <%= partial(
  36. 'newsletter_editor_template_button_widget',
  37. 'newsletter/templates/blocks/button/widget.hbs'
  38. ) %>
  39. <%= partial(
  40. 'newsletter_editor_template_button_settings',
  41. 'newsletter/templates/blocks/button/settings.hbs'
  42. ) %>
  43. <%= partial(
  44. 'newsletter_editor_template_container_block',
  45. 'newsletter/templates/blocks/container/block.hbs'
  46. ) %>
  47. <%= partial(
  48. 'newsletter_editor_template_container_block_empty',
  49. 'newsletter/templates/blocks/container/emptyBlock.hbs'
  50. ) %>
  51. <%= partial(
  52. 'newsletter_editor_template_container_one_column_widget',
  53. 'newsletter/templates/blocks/container/oneColumnLayoutWidget.hbs'
  54. ) %>
  55. <%= partial(
  56. 'newsletter_editor_template_container_two_column_widget',
  57. 'newsletter/templates/blocks/container/twoColumnLayoutWidget.hbs'
  58. ) %>
  59. <%= partial(
  60. 'newsletter_editor_template_container_two_column_12_widget',
  61. 'newsletter/templates/blocks/container/twoColumnLayoutWidget12.hbs'
  62. ) %>
  63. <%= partial(
  64. 'newsletter_editor_template_container_two_column_21_widget',
  65. 'newsletter/templates/blocks/container/twoColumnLayoutWidget21.hbs'
  66. ) %>
  67. <%= partial(
  68. 'newsletter_editor_template_container_three_column_widget',
  69. 'newsletter/templates/blocks/container/threeColumnLayoutWidget.hbs'
  70. ) %>
  71. <%= partial(
  72. 'newsletter_editor_template_container_settings',
  73. 'newsletter/templates/blocks/container/settings.hbs'
  74. ) %>
  75. <%= partial(
  76. 'newsletter_editor_template_container_column_settings',
  77. 'newsletter/templates/blocks/container/columnSettings.hbs'
  78. ) %>
  79. <%= partial(
  80. 'newsletter_editor_template_divider_block',
  81. 'newsletter/templates/blocks/divider/block.hbs'
  82. ) %>
  83. <%= partial(
  84. 'newsletter_editor_template_divider_widget',
  85. 'newsletter/templates/blocks/divider/widget.hbs'
  86. ) %>
  87. <%= partial(
  88. 'newsletter_editor_template_divider_settings',
  89. 'newsletter/templates/blocks/divider/settings.hbs'
  90. ) %>
  91. <%= partial(
  92. 'newsletter_editor_template_footer_block',
  93. 'newsletter/templates/blocks/footer/block.hbs'
  94. ) %>
  95. <%= partial(
  96. 'newsletter_editor_template_footer_widget',
  97. 'newsletter/templates/blocks/footer/widget.hbs'
  98. ) %>
  99. <%= partial(
  100. 'newsletter_editor_template_footer_settings',
  101. 'newsletter/templates/blocks/footer/settings.hbs'
  102. ) %>
  103. <%= partial(
  104. 'newsletter_editor_template_header_block',
  105. 'newsletter/templates/blocks/header/block.hbs'
  106. ) %>
  107. <%= partial(
  108. 'newsletter_editor_template_header_widget',
  109. 'newsletter/templates/blocks/header/widget.hbs'
  110. ) %>
  111. <%= partial(
  112. 'newsletter_editor_template_header_settings',
  113. 'newsletter/templates/blocks/header/settings.hbs'
  114. ) %>
  115. <%= partial(
  116. 'newsletter_editor_template_image_block',
  117. 'newsletter/templates/blocks/image/block.hbs'
  118. ) %>
  119. <%= partial(
  120. 'newsletter_editor_template_image_widget',
  121. 'newsletter/templates/blocks/image/widget.hbs'
  122. ) %>
  123. <%= partial(
  124. 'newsletter_editor_template_image_settings',
  125. 'newsletter/templates/blocks/image/settings.hbs'
  126. ) %>
  127. <%= partial(
  128. 'newsletter_editor_template_posts_block',
  129. 'newsletter/templates/blocks/posts/block.hbs'
  130. ) %>
  131. <%= partial(
  132. 'newsletter_editor_template_posts_widget',
  133. 'newsletter/templates/blocks/posts/widget.hbs'
  134. ) %>
  135. <%= partial(
  136. 'newsletter_editor_template_posts_settings',
  137. 'newsletter/templates/blocks/posts/settings.hbs'
  138. ) %>
  139. <%= partial(
  140. 'newsletter_editor_template_posts_settings_display_options',
  141. 'newsletter/templates/blocks/posts/settingsDisplayOptions.hbs'
  142. ) %>
  143. <%= partial(
  144. 'newsletter_editor_template_posts_settings_selection',
  145. 'newsletter/templates/blocks/posts/settingsSelection.hbs'
  146. ) %>
  147. <%= partial(
  148. 'newsletter_editor_template_posts_settings_selection_empty',
  149. 'newsletter/templates/blocks/posts/settingsSelectionEmpty.hbs'
  150. ) %>
  151. <%= partial(
  152. 'newsletter_editor_template_posts_settings_single_post',
  153. 'newsletter/templates/blocks/posts/settingsSinglePost.hbs'
  154. ) %>
  155. <%= partial(
  156. 'newsletter_editor_template_products_block',
  157. 'newsletter/templates/blocks/products/block.hbs'
  158. ) %>
  159. <%= partial(
  160. 'newsletter_editor_template_products_widget',
  161. 'newsletter/templates/blocks/products/widget.hbs'
  162. ) %>
  163. <%= partial(
  164. 'newsletter_editor_template_products_settings',
  165. 'newsletter/templates/blocks/products/settings.hbs'
  166. ) %>
  167. <%= partial(
  168. 'newsletter_editor_template_products_settings_display_options',
  169. 'newsletter/templates/blocks/products/settingsDisplayOptions.hbs'
  170. ) %>
  171. <%= partial(
  172. 'newsletter_editor_template_products_settings_selection',
  173. 'newsletter/templates/blocks/products/settingsSelection.hbs'
  174. ) %>
  175. <%= partial(
  176. 'newsletter_editor_template_products_settings_selection_empty',
  177. 'newsletter/templates/blocks/products/settingsSelectionEmpty.hbs'
  178. ) %>
  179. <%= partial(
  180. 'newsletter_editor_template_products_settings_single_post',
  181. 'newsletter/templates/blocks/products/settingsSinglePost.hbs'
  182. ) %>
  183. <%= partial(
  184. 'newsletter_editor_template_acc_block',
  185. 'newsletter/templates/blocks/abandonedCartContent/block.hbs'
  186. ) %>
  187. <%= partial(
  188. 'newsletter_editor_template_acc_widget',
  189. 'newsletter/templates/blocks/abandonedCartContent/widget.hbs'
  190. ) %>
  191. <%= partial(
  192. 'newsletter_editor_template_acc_settings',
  193. 'newsletter/templates/blocks/abandonedCartContent/settings.hbs'
  194. ) %>
  195. <%= partial(
  196. 'newsletter_editor_template_acc_settings_display_options',
  197. 'newsletter/templates/blocks/abandonedCartContent/settingsDisplayOptions.hbs'
  198. ) %>
  199. <%= partial(
  200. 'newsletter_editor_template_social_block',
  201. 'newsletter/templates/blocks/social/block.hbs'
  202. ) %>
  203. <%= partial(
  204. 'newsletter_editor_template_social_block_icon',
  205. 'newsletter/templates/blocks/social/blockIcon.hbs'
  206. ) %>
  207. <%= partial(
  208. 'newsletter_editor_template_social_widget',
  209. 'newsletter/templates/blocks/social/widget.hbs'
  210. ) %>
  211. <%= partial(
  212. 'newsletter_editor_template_social_settings',
  213. 'newsletter/templates/blocks/social/settings.hbs'
  214. ) %>
  215. <%= partial(
  216. 'newsletter_editor_template_social_settings_icon',
  217. 'newsletter/templates/blocks/social/settingsIcon.hbs'
  218. ) %>
  219. <%= partial(
  220. 'newsletter_editor_template_social_settings_icon_selector',
  221. 'newsletter/templates/blocks/social/settingsIconSelector.hbs'
  222. ) %>
  223. <%= partial(
  224. 'newsletter_editor_template_social_settings_styles',
  225. 'newsletter/templates/blocks/social/settingsStyles.hbs'
  226. ) %>
  227. <%= partial(
  228. 'newsletter_editor_template_spacer_block',
  229. 'newsletter/templates/blocks/spacer/block.hbs'
  230. ) %>
  231. <%= partial(
  232. 'newsletter_editor_template_spacer_widget',
  233. 'newsletter/templates/blocks/spacer/widget.hbs'
  234. ) %>
  235. <%= partial(
  236. 'newsletter_editor_template_spacer_settings',
  237. 'newsletter/templates/blocks/spacer/settings.hbs'
  238. ) %>
  239. <%= partial(
  240. 'newsletter_editor_template_text_block',
  241. 'newsletter/templates/blocks/text/block.hbs'
  242. ) %>
  243. <%= partial(
  244. 'newsletter_editor_template_text_widget',
  245. 'newsletter/templates/blocks/text/widget.hbs'
  246. ) %>
  247. <%= partial(
  248. 'newsletter_editor_template_text_settings',
  249. 'newsletter/templates/blocks/text/settings.hbs'
  250. ) %>
  251. <%= partial(
  252. 'newsletter_editor_template_heading',
  253. 'newsletter/templates/components/heading.hbs'
  254. ) %>
  255. <%= partial(
  256. 'newsletter_editor_template_history',
  257. 'newsletter/templates/components/history.hbs'
  258. ) %>
  259. <%= partial(
  260. 'newsletter_editor_template_save',
  261. 'newsletter/templates/components/save.hbs'
  262. ) %>
  263. <%= partial(
  264. 'newsletter_editor_template_styles',
  265. 'newsletter/templates/components/styles.hbs'
  266. ) %>
  267. <%= partial(
  268. 'newsletter_editor_template_newsletter_preview',
  269. 'newsletter/templates/components/newsletterPreview.hbs'
  270. ) %>
  271. <%= partial(
  272. 'newsletter_editor_template_sidebar',
  273. 'newsletter/templates/components/sidebar/sidebar.hbs'
  274. ) %>
  275. <%= partial(
  276. 'newsletter_editor_template_sidebar_content',
  277. 'newsletter/templates/components/sidebar/content.hbs'
  278. ) %>
  279. <%= partial(
  280. 'newsletter_editor_template_sidebar_layout',
  281. 'newsletter/templates/components/sidebar/layout.hbs'
  282. ) %>
  283. <%= partial(
  284. 'newsletter_editor_template_sidebar_styles',
  285. 'newsletter/templates/components/sidebar/styles.hbs'
  286. ) %>
  287. <%= partial(
  288. 'newsletter_editor_template_woocommerce_new_account_content',
  289. 'newsletter/templates/blocks/woocommerceContent/new_account.hbs'
  290. ) %>
  291. <%= partial(
  292. 'newsletter_editor_template_woocommerce_processing_order_content',
  293. 'newsletter/templates/blocks/woocommerceContent/processing_order.hbs'
  294. ) %>
  295. <%= partial(
  296. 'newsletter_editor_template_woocommerce_completed_order_content',
  297. 'newsletter/templates/blocks/woocommerceContent/completed_order.hbs'
  298. ) %>
  299. <%= partial(
  300. 'newsletter_editor_template_woocommerce_customer_note_content',
  301. 'newsletter/templates/blocks/woocommerceContent/customer_note.hbs'
  302. ) %>
  303. <%= partial(
  304. 'newsletter_editor_template_woocommerce_content_widget',
  305. 'newsletter/templates/blocks/woocommerceContent/widget.hbs'
  306. ) %>
  307. <%= partial(
  308. 'newsletter_editor_template_woocommerce_heading_block',
  309. 'newsletter/templates/blocks/woocommerceHeading/block.hbs'
  310. ) %>
  311. <%= partial(
  312. 'newsletter_editor_template_woocommerce_heading_widget',
  313. 'newsletter/templates/blocks/woocommerceHeading/widget.hbs'
  314. ) %>
  315. <%= partial(
  316. 'newsletter_editor_template_unknown_block_fallback_block',
  317. 'newsletter/templates/blocks/unknownBlockFallback/block.hbs'
  318. ) %>
  319. <%= partial(
  320. 'newsletter_editor_template_unknown_block_fallback_widget',
  321. 'newsletter/templates/blocks/unknownBlockFallback/widget.hbs'
  322. ) %>
  323. <% endblock %>
  324. <% block content %>
  325. <!-- Hidden heading for notices to appear under -->
  326. <h1 style="display:none"><%= __('Newsletter Editor') %></h1>
  327. <div id="mailpoet_editor">
  328. <div id="mailpoet_editor_steps_heading"></div>
  329. <div class="clearfix"></div>
  330. <div id="mailpoet_editor_heading_left">
  331. <div id="mailpoet_editor_heading"></div>
  332. </div>
  333. <div id="mailpoet_editor_heading_right">
  334. <div id="mailpoet_editor_top"></div>
  335. </div>
  336. <div class="clearfix"></div>
  337. <div id="mailpoet_editor_main_wrapper">
  338. <div id="mailpoet_editor_styles"></div>
  339. <div id="mailpoet_editor_content_container">
  340. <div class="mailpoet_newsletter_wrapper">
  341. <div id="mailpoet_editor_content"></div>
  342. </div>
  343. </div>
  344. <div id="mailpoet_editor_sidebar"></div>
  345. <div class="clear"></div>
  346. </div>
  347. <div id="mailpoet_editor_bottom"></div>
  348. <div class="mailpoet_layer_overlay" style="display:none;"></div>
  349. </div>
  350. <% if is_wc_transactional_email %>
  351. <script type="text/javascript">
  352. var mailpoet_beacon_articles = [
  353. '5de8c5cd2c7d3a7e9ae4c15f',
  354. ];
  355. </script>
  356. <% endif %>
  357. <% endblock %>
  358. <% block translations %>
  359. <%= localize({
  360. 'stepNameTypeStandard': __('Newsletter'),
  361. 'stepNameTypeWelcome': __('Welcome Email'),
  362. 'stepNameTypeNotification': __('Post Notification'),
  363. 'stepNameTypeWooCommerce': __('WooCommerce'),
  364. 'stepNameTypeReEngagement': __('Re-engagement'),
  365. 'stepNameTemplate': __('Template'),
  366. 'stepNameDesign': __('Design'),
  367. 'stepNameSend': __('Send'),
  368. 'stepNameActivate': __('Activate'),
  369. 'close': __('Close'),
  370. 'failedToFetchAvailablePosts': __('Failed to fetch available posts'),
  371. 'failedToFetchRenderedPosts': __('Failed to fetch rendered posts'),
  372. 'shortcodesWindowTitle': __('Select a shortcode'),
  373. 'newsletterSavingError': __('The email could not be saved. Please, clear browser cache and reload the page. If the problem persists, duplicate the email and try again.'),
  374. 'unsubscribeLinkMissing': __('All emails must include an "Unsubscribe" link. Add a footer widget to your email to continue.'),
  375. 'newsletterIsEmpty': __('Poet, please add prose to your masterpiece before you send it to your followers.'),
  376. 'emailAlreadySent': __('This email has already been sent. It can be edited, but not sent again. Duplicate this email if you want to send it again.'),
  377. 'automatedLatestContentMissing': _x('Please add an “Automatic Latest Content” widget to the email from the right sidebar.', '(Please reuse the current translation used for the string “Automatic Latest Content”) This Error message is displayed when a user tries to send a “Post Notification” email without any “Automatic Latest Content” widget inside'),
  378. 'newsletterPreviewEmailMissing': __('Enter an email address to send the preview newsletter to.'),
  379. 'newsletterPreviewError': __('Sorry, there was an error, please try again later.'),
  380. 'newsletterPreviewErrorNotice': __('The email could not be sent due to a technical issue with %$1s'),
  381. 'newsletterPreviewErrorCheckConfiguration': __('Please check your sending method configuration, you may need to consult with your hosting company.'),
  382. 'newsletterPreviewErrorUseSendingService': __('The easy alternative is to <b>send emails with MailPoet Sending Service</b> instead, like thousands of other users do.'),
  383. 'newsletterPreviewErrorSignUpForSendingService': __('Sign up for free in minutes'),
  384. 'newsletterPreviewErrorCheckSettingsNotice': __('Check your [link]sending method settings[/link].'),
  385. 'templateNameMissing': __('Please add a template name'),
  386. 'helpTooltipSendPreview': helpTooltipSendPreview,
  387. 'helpTooltipDesignerSubjectLine': __("You can add MailPoet shortcodes here. For example, you can add your subscribers' first names by using this shortcode: [subscriber:firstname | default:reader]. Simply copy and paste the shortcode into the field."),
  388. 'helpTooltipDesignerPreheader': __("This optional text will appear in your subscribers' inboxes, beside the subject line. Write something enticing!"),
  389. 'helpTooltipDesignerPreheaderWarning': __("Max length is 250 characters, however, we recommend 80 characters."),
  390. 'helpTooltipDesignerFullWidth': __("This option eliminates padding around the image."),
  391. 'helpTooltipDesignerIdealWidth': __("Use images with widths of at least 1,000 pixels to ensure sharp display on high density screens, like mobile devices."),
  392. 'templateSaved': __('Template has been saved.'),
  393. 'templateSaveFailed': __('Template has not been saved, please try again'),
  394. 'categoriesAndTags': __('Categories & tags'),
  395. 'noPostsToDisplay': __('There is no content to display.'),
  396. 'previewShouldOpenInNewTab': __('Your preview should open in a new tab. Please ensure your browser is not blocking popups from this page.'),
  397. 'newsletterPreview': __('Newsletter Preview'),
  398. 'newsletterBodyIsCorrupted': __('Contents of this newsletter are corrupted and may be lost, you may need to add new content to this newsletter, or create a new one. If possible, please contact us and report this issue.'),
  399. 'saving': __('Saving...'),
  400. 'unsavedChangesWillBeLost': __('There are unsaved changes which will be lost if you leave this page.'),
  401. 'selectColor': _x('Select', 'select color'),
  402. 'cancelColorSelection': _x('Cancel', 'cancel color selection'),
  403. 'newsletterIsPaused': __('Email sending has been paused.'),
  404. 'tutorialVideoTitle': __('Before you start, this is how you drag and drop in MailPoet'),
  405. 'selectType': __('Select type'),
  406. 'events': __('Events'),
  407. 'conditions': _x('Conditions', 'Configuration options for automatic email events'),
  408. 'template': __('Template'),
  409. 'designer': __('Designer'),
  410. 'send': __('Send'),
  411. 'canUndo': _x('Undo', 'A button title when user can undo the change in editor', 'mailpoet'),
  412. 'canNotUndo': _x('No actions available to undo.', "A button title when user can't undo the change in editor", 'mailpoet'),
  413. 'canRedo': _x('Redo', 'A button title when user can redo the change in editor', 'mailpoet'),
  414. 'canNotRedo': _x('No actions available to redo.', "A button title when user can't redo the change in editor", 'mailpoet'),
  415. }) %>
  416. <% endblock %>
  417. <% block after_css %>
  418. <%= stylesheet('mailpoet-editor.css') %>
  419. <% endblock %>
  420. <% block after_javascript %>
  421. <%= javascript('newsletter_editor.js') %>
  422. <%= do_action('mailpoet_newsletter_editor_after_javascript') %>
  423. <script type="text/javascript">
  424. function renderWithFont(node) {
  425. if (!node.element) return node.text;
  426. var $wrapper = jQuery('<span></span>');
  427. $wrapper.css({'font-family': Handlebars.helpers.fontWithFallback(node.element.value)});
  428. $wrapper.text(node.text);
  429. return $wrapper;
  430. }
  431. function fontsSelect(selector) {
  432. jQuery(selector).select2({
  433. minimumResultsForSearch: Infinity,
  434. templateSelection: renderWithFont,
  435. templateResult: renderWithFont
  436. });
  437. }
  438. var templates = {
  439. styles: Handlebars.compile(
  440. jQuery('#newsletter_editor_template_styles').html()
  441. ),
  442. save: Handlebars.compile(
  443. jQuery('#newsletter_editor_template_save').html()
  444. ),
  445. heading: Handlebars.compile(
  446. jQuery('#newsletter_editor_template_heading').html()
  447. ),
  448. history: Handlebars.compile(
  449. jQuery('#newsletter_editor_template_history').html()
  450. ),
  451. sidebar: Handlebars.compile(
  452. jQuery('#newsletter_editor_template_sidebar').html()
  453. ),
  454. sidebarContent: Handlebars.compile(
  455. jQuery('#newsletter_editor_template_sidebar_content').html()
  456. ),
  457. sidebarLayout: Handlebars.compile(
  458. jQuery('#newsletter_editor_template_sidebar_layout').html()
  459. ),
  460. sidebarStyles: Handlebars.compile(
  461. jQuery('#newsletter_editor_template_sidebar_styles').html()
  462. ),
  463. newsletterPreview: Handlebars.compile(
  464. jQuery('#newsletter_editor_template_newsletter_preview').html()
  465. ),
  466. genericBlockTools: Handlebars.compile(
  467. jQuery('#newsletter_editor_template_tools_generic').html()
  468. ),
  469. containerBlock: Handlebars.compile(
  470. jQuery('#newsletter_editor_template_container_block').html()
  471. ),
  472. containerEmpty: Handlebars.compile(
  473. jQuery('#newsletter_editor_template_container_block_empty').html()
  474. ),
  475. oneColumnLayoutInsertion: Handlebars.compile(
  476. jQuery('#newsletter_editor_template_container_one_column_widget').html()
  477. ),
  478. twoColumnLayoutInsertion: Handlebars.compile(
  479. jQuery('#newsletter_editor_template_container_two_column_widget').html()
  480. ),
  481. twoColumn12LayoutInsertion: Handlebars.compile(
  482. jQuery('#newsletter_editor_template_container_two_column_12_widget').html()
  483. ),
  484. twoColumn21LayoutInsertion: Handlebars.compile(
  485. jQuery('#newsletter_editor_template_container_two_column_21_widget').html()
  486. ),
  487. threeColumnLayoutInsertion: Handlebars.compile(
  488. jQuery('#newsletter_editor_template_container_three_column_widget').html()
  489. ),
  490. containerBlockSettings: Handlebars.compile(
  491. jQuery('#newsletter_editor_template_container_settings').html()
  492. ),
  493. containerBlockColumnSettings: Handlebars.compile(
  494. jQuery('#newsletter_editor_template_container_column_settings').html()
  495. ),
  496. buttonBlock: Handlebars.compile(
  497. jQuery('#newsletter_editor_template_button_block').html()
  498. ),
  499. buttonInsertion: Handlebars.compile(
  500. jQuery('#newsletter_editor_template_button_widget').html()
  501. ),
  502. buttonBlockSettings: Handlebars.compile(
  503. jQuery('#newsletter_editor_template_button_settings').html()
  504. ),
  505. dividerBlock: Handlebars.compile(
  506. jQuery('#newsletter_editor_template_divider_block').html()
  507. ),
  508. dividerInsertion: Handlebars.compile(
  509. jQuery('#newsletter_editor_template_divider_widget').html()
  510. ),
  511. dividerBlockSettings: Handlebars.compile(
  512. jQuery('#newsletter_editor_template_divider_settings').html()
  513. ),
  514. footerBlock: Handlebars.compile(
  515. jQuery('#newsletter_editor_template_footer_block').html()
  516. ),
  517. footerInsertion: Handlebars.compile(
  518. jQuery('#newsletter_editor_template_footer_widget').html()
  519. ),
  520. footerBlockSettings: Handlebars.compile(
  521. jQuery('#newsletter_editor_template_footer_settings').html()
  522. ),
  523. headerBlock: Handlebars.compile(
  524. jQuery('#newsletter_editor_template_header_block').html()
  525. ),
  526. headerInsertion: Handlebars.compile(
  527. jQuery('#newsletter_editor_template_header_widget').html()
  528. ),
  529. headerBlockSettings: Handlebars.compile(
  530. jQuery('#newsletter_editor_template_header_settings').html()
  531. ),
  532. imageBlock: Handlebars.compile(
  533. jQuery('#newsletter_editor_template_image_block').html()
  534. ),
  535. imageInsertion: Handlebars.compile(
  536. jQuery('#newsletter_editor_template_image_widget').html()
  537. ),
  538. imageBlockSettings: Handlebars.compile(
  539. jQuery('#newsletter_editor_template_image_settings').html()
  540. ),
  541. socialBlock: Handlebars.compile(
  542. jQuery('#newsletter_editor_template_social_block').html()
  543. ),
  544. socialIconBlock: Handlebars.compile(
  545. jQuery('#newsletter_editor_template_social_block_icon').html()
  546. ),
  547. socialInsertion: Handlebars.compile(
  548. jQuery('#newsletter_editor_template_social_widget').html()
  549. ),
  550. socialBlockSettings: Handlebars.compile(
  551. jQuery('#newsletter_editor_template_social_settings').html()
  552. ),
  553. socialSettingsIconSelector: Handlebars.compile(
  554. jQuery('#newsletter_editor_template_social_settings_icon_selector').html()
  555. ),
  556. socialSettingsIcon: Handlebars.compile(
  557. jQuery('#newsletter_editor_template_social_settings_icon').html()
  558. ),
  559. socialSettingsStyles: Handlebars.compile(
  560. jQuery('#newsletter_editor_template_social_settings_styles').html()
  561. ),
  562. spacerBlock: Handlebars.compile(
  563. jQuery('#newsletter_editor_template_spacer_block').html()
  564. ),
  565. spacerInsertion: Handlebars.compile(
  566. jQuery('#newsletter_editor_template_spacer_widget').html()
  567. ),
  568. spacerBlockSettings: Handlebars.compile(
  569. jQuery('#newsletter_editor_template_spacer_settings').html()
  570. ),
  571. automatedLatestContentBlock: Handlebars.compile(
  572. jQuery('#newsletter_editor_template_automated_latest_content_block').html()
  573. ),
  574. automatedLatestContentInsertion: Handlebars.compile(
  575. jQuery('#newsletter_editor_template_automated_latest_content_widget').html()
  576. ),
  577. automatedLatestContentBlockSettings: Handlebars.compile(
  578. jQuery('#newsletter_editor_template_automated_latest_content_settings').html()
  579. ),
  580. automatedLatestContentLayoutBlock: Handlebars.compile(
  581. jQuery('#newsletter_editor_template_automated_latest_content_layout_block').html()
  582. ),
  583. automatedLatestContentLayoutInsertion: Handlebars.compile(
  584. jQuery('#newsletter_editor_template_automated_latest_content_layout_widget').html()
  585. ),
  586. automatedLatestContentLayoutBlockSettings: Handlebars.compile(
  587. jQuery('#newsletter_editor_template_automated_latest_content_layout_settings').html()
  588. ),
  589. postsBlock: Handlebars.compile(
  590. jQuery('#newsletter_editor_template_posts_block').html()
  591. ),
  592. postsInsertion: Handlebars.compile(
  593. jQuery('#newsletter_editor_template_posts_widget').html()
  594. ),
  595. postsBlockSettings: Handlebars.compile(
  596. jQuery('#newsletter_editor_template_posts_settings').html()
  597. ),
  598. postSelectionPostsBlockSettings: Handlebars.compile(
  599. jQuery('#newsletter_editor_template_posts_settings_selection').html()
  600. ),
  601. emptyPostPostsBlockSettings: Handlebars.compile(
  602. jQuery('#newsletter_editor_template_posts_settings_selection_empty').html()
  603. ),
  604. singlePostPostsBlockSettings: Handlebars.compile(
  605. jQuery('#newsletter_editor_template_posts_settings_single_post').html()
  606. ),
  607. displayOptionsPostsBlockSettings: Handlebars.compile(
  608. jQuery('#newsletter_editor_template_posts_settings_display_options').html()
  609. ),
  610. productsBlock: Handlebars.compile(
  611. jQuery('#newsletter_editor_template_products_block').html()
  612. ),
  613. productsInsertion: Handlebars.compile(
  614. jQuery('#newsletter_editor_template_products_widget').html()
  615. ),
  616. productsBlockSettings: Handlebars.compile(
  617. jQuery('#newsletter_editor_template_products_settings').html()
  618. ),
  619. postSelectionProductsBlockSettings: Handlebars.compile(
  620. jQuery('#newsletter_editor_template_products_settings_selection').html()
  621. ),
  622. emptyPostProductsBlockSettings: Handlebars.compile(
  623. jQuery('#newsletter_editor_template_products_settings_selection_empty').html()
  624. ),
  625. singlePostProductsBlockSettings: Handlebars.compile(
  626. jQuery('#newsletter_editor_template_products_settings_single_post').html()
  627. ),
  628. displayOptionsProductsBlockSettings: Handlebars.compile(
  629. jQuery('#newsletter_editor_template_products_settings_display_options').html()
  630. ),
  631. abandonedCartContentBlock: Handlebars.compile(
  632. jQuery('#newsletter_editor_template_acc_block').html()
  633. ),
  634. abandonedCartContentInsertion: Handlebars.compile(
  635. jQuery('#newsletter_editor_template_acc_widget').html()
  636. ),
  637. abandonedCartContentBlockSettings: Handlebars.compile(
  638. jQuery('#newsletter_editor_template_acc_settings').html()
  639. ),
  640. displayOptionsAbandonedCartContentBlockSettings: Handlebars.compile(
  641. jQuery('#newsletter_editor_template_acc_settings_display_options').html()
  642. ),
  643. textBlock: Handlebars.compile(
  644. jQuery('#newsletter_editor_template_text_block').html()
  645. ),
  646. textInsertion: Handlebars.compile(
  647. jQuery('#newsletter_editor_template_text_widget').html()
  648. ),
  649. textBlockSettings: Handlebars.compile(
  650. jQuery('#newsletter_editor_template_text_settings').html()
  651. ),
  652. woocommerceNewAccount: Handlebars.compile(
  653. jQuery('#newsletter_editor_template_woocommerce_new_account_content').html()
  654. ),
  655. woocommerceProcessingOrder: Handlebars.compile(
  656. jQuery('#newsletter_editor_template_woocommerce_processing_order_content').html()
  657. ),
  658. woocommerceCompletedOrder: Handlebars.compile(
  659. jQuery('#newsletter_editor_template_woocommerce_completed_order_content').html()
  660. ),
  661. woocommerceCustomerNote: Handlebars.compile(
  662. jQuery('#newsletter_editor_template_woocommerce_customer_note_content').html()
  663. ),
  664. woocommerceContentInsertion: Handlebars.compile(
  665. jQuery('#newsletter_editor_template_woocommerce_content_widget').html()
  666. ),
  667. woocommerceHeadingBlock: Handlebars.compile(
  668. jQuery('#newsletter_editor_template_woocommerce_heading_block').html()
  669. ),
  670. woocommerceHeadingInsertion: Handlebars.compile(
  671. jQuery('#newsletter_editor_template_woocommerce_heading_widget').html()
  672. ),
  673. unknownBlockFallbackBlock: Handlebars.compile(
  674. jQuery('#newsletter_editor_template_unknown_block_fallback_block').html()
  675. ),
  676. unknownBlockFallbackInsertion: Handlebars.compile(
  677. jQuery('#newsletter_editor_template_unknown_block_fallback_widget').html()
  678. ),
  679. };
  680. var mailpoet_site_name = '<%= site_name %>';
  681. var mailpoet_site_address = '<%= site_address %>';
  682. var mailpoet_mss_key_pending_approval = '<%= mss_key_pending_approval %>';
  683. var currentUserEmail = '<%= current_wp_user.user_email %>';
  684. var config = {
  685. availableStyles: {
  686. textSizes: [
  687. '9px', '10px', '11px', '12px', '13px', '14px', '15px', '16px',
  688. '17px', '18px', '19px', '20px', '21px', '22px', '23px', '24px'
  689. ],
  690. headingSizes: [
  691. '10px', '12px', '14px', '16px', '18px', '20px', '22px', '24px',
  692. '26px', '30px', '36px', '40px'
  693. ],
  694. lineHeights: [
  695. '1.0',
  696. '1.2',
  697. '1.4',
  698. '1.6',
  699. '1.8',
  700. '2.0',
  701. ],
  702. fonts: {
  703. standard: [
  704. 'Arial',
  705. 'Comic Sans MS',
  706. 'Courier New',
  707. 'Georgia',
  708. 'Lucida',
  709. 'Tahoma',
  710. 'Times New Roman',
  711. 'Trebuchet MS',
  712. 'Verdana'
  713. ],
  714. custom: [
  715. 'Arvo',
  716. 'Lato',
  717. 'Lora',
  718. 'Merriweather',
  719. 'Merriweather Sans',
  720. 'Noticia Text',
  721. 'Open Sans',
  722. 'Playfair Display',
  723. 'Roboto',
  724. 'Source Sans Pro',
  725. 'Oswald',
  726. 'Raleway',
  727. 'Permanent Marker',
  728. 'Pacifico',
  729. ]
  730. },
  731. socialIconSets: {
  732. 'default': {
  733. 'custom': '<%= image_url(
  734. 'newsletter_editor/social-icons/custom.png'
  735. ) %>',
  736. 'facebook': '<%= image_url(
  737. 'newsletter_editor/social-icons/01-social/Facebook.png'
  738. ) %>',
  739. 'twitter': '<%= image_url(
  740. 'newsletter_editor/social-icons/01-social/Twitter.png'
  741. ) %>',
  742. 'google-plus': '<%= image_url(
  743. 'newsletter_editor/social-icons/01-social/Google-Plus.png'
  744. ) %>',
  745. 'youtube': '<%= image_url(
  746. 'newsletter_editor/social-icons/01-social/Youtube.png'
  747. ) %>',
  748. 'website': '<%= image_url(
  749. 'newsletter_editor/social-icons/01-social/Website.png'
  750. ) %>',
  751. 'email': '<%= image_url(
  752. 'newsletter_editor/social-icons/01-social/Email.png'
  753. ) %>',
  754. 'instagram': '<%= image_url(
  755. 'newsletter_editor/social-icons/01-social/Instagram.png'
  756. ) %>',
  757. 'pinterest': '<%= image_url(
  758. 'newsletter_editor/social-icons/01-social/Pinterest.png'
  759. ) %>',
  760. 'linkedin': '<%= image_url(
  761. 'newsletter_editor/social-icons/01-social/LinkedIn.png'
  762. ) %>'
  763. },
  764. 'grey': {
  765. 'custom': '<%= image_url(
  766. 'newsletter_editor/social-icons/custom.png'
  767. ) %>',
  768. 'facebook': '<%= image_url(
  769. 'newsletter_editor/social-icons/02-grey/Facebook.png'
  770. ) %>',
  771. 'twitter': '<%= image_url(
  772. 'newsletter_editor/social-icons/02-grey/Twitter.png'
  773. ) %>',
  774. 'google-plus': '<%= image_url(
  775. 'newsletter_editor/social-icons/02-grey/Google-Plus.png'
  776. ) %>',
  777. 'youtube': '<%= image_url(
  778. 'newsletter_editor/social-icons/02-grey/Youtube.png'
  779. ) %>',
  780. 'website': '<%= image_url(
  781. 'newsletter_editor/social-icons/02-grey/Website.png'
  782. ) %>',
  783. 'email': '<%= image_url(
  784. 'newsletter_editor/social-icons/02-grey/Email.png'
  785. ) %>',
  786. 'instagram': '<%= image_url(
  787. 'newsletter_editor/social-icons/02-grey/Instagram.png'
  788. ) %>',
  789. 'pinterest': '<%= image_url(
  790. 'newsletter_editor/social-icons/02-grey/Pinterest.png'
  791. ) %>',
  792. 'linkedin': '<%= image_url(
  793. 'newsletter_editor/social-icons/02-grey/LinkedIn.png'
  794. ) %>',
  795. },
  796. 'circles': {
  797. 'custom': '<%= image_url(
  798. 'newsletter_editor/social-icons/custom.png'
  799. ) %>',
  800. 'facebook': '<%= image_url(
  801. 'newsletter_editor/social-icons/03-circles/Facebook.png'
  802. ) %>',
  803. 'twitter': '<%= image_url(
  804. 'newsletter_editor/social-icons/03-circles/Twitter.png'
  805. ) %>',
  806. 'google-plus': '<%= image_url(
  807. 'newsletter_editor/social-icons/03-circles/Google-Plus.png'
  808. ) %>',
  809. 'youtube': '<%= image_url(
  810. 'newsletter_editor/social-icons/03-circles/Youtube.png'
  811. ) %>',
  812. 'website': '<%= image_url(
  813. 'newsletter_editor/social-icons/03-circles/Website.png'
  814. ) %>',
  815. 'email': '<%= image_url(
  816. 'newsletter_editor/social-icons/03-circles/Email.png'
  817. ) %>',
  818. 'instagram': '<%= image_url(
  819. 'newsletter_editor/social-icons/03-circles/Instagram.png'
  820. ) %>',
  821. 'pinterest': '<%= image_url(
  822. 'newsletter_editor/social-icons/03-circles/Pinterest.png'
  823. ) %>',
  824. 'linkedin': '<%= image_url(
  825. 'newsletter_editor/social-icons/03-circles/LinkedIn.png'
  826. ) %>',
  827. },
  828. 'full-flat-roundrect': {
  829. 'custom': '<%= image_url(
  830. 'newsletter_editor/social-icons/custom.png'
  831. ) %>',
  832. 'facebook': '<%= image_url(
  833. 'newsletter_editor/social-icons/04-full-flat-roundrect/Facebook.png'
  834. ) %>',
  835. 'twitter': '<%= image_url(
  836. 'newsletter_editor/social-icons/04-full-flat-roundrect/Twitter.png'
  837. ) %>',
  838. 'google-plus': '<%= image_url(
  839. 'newsletter_editor/social-icons/04-full-flat-roundrect/Google-Plus.png'
  840. ) %>',
  841. 'youtube': '<%= image_url(
  842. 'newsletter_editor/social-icons/04-full-flat-roundrect/Youtube.png'
  843. ) %>',
  844. 'website': '<%= image_url(
  845. 'newsletter_editor/social-icons/04-full-flat-roundrect/Website.png'
  846. ) %>',
  847. 'email': '<%= image_url(
  848. 'newsletter_editor/social-icons/04-full-flat-roundrect/Email.png'
  849. ) %>',
  850. 'instagram': '<%= image_url(
  851. 'newsletter_editor/social-icons/04-full-flat-roundrect/Instagram.png'
  852. ) %>',
  853. 'pinterest': '<%= image_url(
  854. 'newsletter_editor/social-icons/04-full-flat-roundrect/Pinterest.png'
  855. ) %>',
  856. 'linkedin': '<%= image_url(
  857. 'newsletter_editor/social-icons/04-full-flat-roundrect/LinkedIn.png'
  858. ) %>',
  859. },
  860. 'full-gradient-square': {
  861. 'custom': '<%= image_url(
  862. 'newsletter_editor/social-icons/custom.png'
  863. ) %>',
  864. 'facebook': '<%= image_url(
  865. 'newsletter_editor/social-icons/05-full-gradient-square/Facebook.png'
  866. ) %>',
  867. 'twitter': '<%= image_url(
  868. 'newsletter_editor/social-icons/05-full-gradient-square/Twitter.png'
  869. ) %>',
  870. 'google-plus': '<%= image_url(
  871. 'newsletter_editor/social-icons/05-full-gradient-square/Google-Plus.png'
  872. ) %>',
  873. 'youtube': '<%= image_url(
  874. 'newsletter_editor/social-icons/05-full-gradient-square/Youtube.png'
  875. ) %>',
  876. 'website': '<%= image_url(
  877. 'newsletter_editor/social-icons/05-full-gradient-square/Website.png'
  878. ) %>',
  879. 'email': '<%= image_url(
  880. 'newsletter_editor/social-icons/05-full-gradient-square/Email.png'
  881. ) %>',
  882. 'instagram': '<%= image_url(
  883. 'newsletter_editor/social-icons/05-full-gradient-square/Instagram.png'
  884. ) %>',
  885. 'pinterest': '<%= image_url(
  886. 'newsletter_editor/social-icons/05-full-gradient-square/Pinterest.png'
  887. ) %>',
  888. 'linkedin': '<%= image_url(
  889. 'newsletter_editor/social-icons/05-full-gradient-square/LinkedIn.png'
  890. ) %>',
  891. },
  892. 'full-symbol-color': {
  893. 'custom': '<%= image_url(
  894. 'newsletter_editor/social-icons/custom.png'
  895. ) %>',
  896. 'facebook': '<%= image_url(
  897. 'newsletter_editor/social-icons/06-full-symbol-color/Facebook.png'
  898. ) %>',
  899. 'twitter': '<%= image_url(
  900. 'newsletter_editor/social-icons/06-full-symbol-color/Twitter.png'
  901. ) %>',
  902. 'google-plus': '<%= image_url(
  903. 'newsletter_editor/social-icons/06-full-symbol-color/Google-Plus.png'
  904. ) %>',
  905. 'youtube': '<%= image_url(
  906. 'newsletter_editor/social-icons/06-full-symbol-color/Youtube.png'
  907. ) %>',
  908. 'website': '<%= image_url(
  909. 'newsletter_editor/social-icons/06-full-symbol-color/Website.png'
  910. ) %>',
  911. 'email': '<%= image_url(
  912. 'newsletter_editor/social-icons/06-full-symbol-color/Email.png'
  913. ) %>',
  914. 'instagram': '<%= image_url(
  915. 'newsletter_editor/social-icons/06-full-symbol-color/Instagram.png'
  916. ) %>',
  917. 'pinterest': '<%= image_url(
  918. 'newsletter_editor/social-icons/06-full-symbol-color/Pinterest.png'
  919. ) %>',
  920. 'linkedin': '<%= image_url(
  921. 'newsletter_editor/social-icons/06-full-symbol-color/LinkedIn.png'
  922. ) %>',
  923. },
  924. 'full-symbol-black': {
  925. 'custom': '<%= image_url(
  926. 'newsletter_editor/social-icons/custom.png'
  927. ) %>',
  928. 'facebook': '<%= image_url(
  929. 'newsletter_editor/social-icons/07-full-symbol-black/Facebook.png'
  930. ) %>',
  931. 'twitter': '<%= image_url(
  932. 'newsletter_editor/social-icons/07-full-symbol-black/Twitter.png'
  933. ) %>',
  934. 'google-plus': '<%= image_url(
  935. 'newsletter_editor/social-icons/07-full-symbol-black/Google-Plus.png'
  936. ) %>',
  937. 'youtube': '<%= image_url(
  938. 'newsletter_editor/social-icons/07-full-symbol-black/Youtube.png'
  939. ) %>',
  940. 'website': '<%= image_url(
  941. 'newsletter_editor/social-icons/07-full-symbol-black/Website.png'
  942. ) %>',
  943. 'email': '<%= image_url(
  944. 'newsletter_editor/social-icons/07-full-symbol-black/Email.png'
  945. ) %>',
  946. 'instagram': '<%= image_url(
  947. 'newsletter_editor/social-icons/07-full-symbol-black/Instagram.png'
  948. ) %>',
  949. 'pinterest': '<%= image_url(
  950. 'newsletter_editor/social-icons/07-full-symbol-black/Pinterest.png'
  951. ) %>',
  952. 'linkedin': '<%= image_url(
  953. 'newsletter_editor/social-icons/07-full-symbol-black/LinkedIn.png'
  954. ) %>',
  955. },
  956. 'full-symbol-grey': {
  957. 'custom': '<%= image_url(
  958. 'newsletter_editor/social-icons/custom.png'
  959. ) %>',
  960. 'facebook': '<%= image_url(
  961. 'newsletter_editor/social-icons/08-full-symbol-grey/Facebook.png'
  962. ) %>',
  963. 'twitter': '<%= image_url(
  964. 'newsletter_editor/social-icons/08-full-symbol-grey/Twitter.png'
  965. ) %>',
  966. 'google-plus': '<%= image_url(
  967. 'newsletter_editor/social-icons/08-full-symbol-grey/Google-Plus.png'
  968. ) %>',
  969. 'youtube': '<%= image_url(
  970. 'newsletter_editor/social-icons/08-full-symbol-grey/Youtube.png'
  971. ) %>',
  972. 'website': '<%= image_url(
  973. 'newsletter_editor/social-icons/08-full-symbol-grey/Website.png'
  974. ) %>',
  975. 'email': '<%= image_url(
  976. 'newsletter_editor/social-icons/08-full-symbol-grey/Email.png'
  977. ) %>',
  978. 'instagram': '<%= image_url(
  979. 'newsletter_editor/social-icons/08-full-symbol-grey/Instagram.png'
  980. ) %>',
  981. 'pinterest': '<%= image_url(
  982. 'newsletter_editor/social-icons/08-full-symbol-grey/Pinterest.png'
  983. ) %>',
  984. 'linkedin': '<%= image_url(
  985. 'newsletter_editor/social-icons/08-full-symbol-grey/LinkedIn.png'
  986. ) %>',
  987. },
  988. 'line-roundrect': {
  989. 'custom': '<%= image_url(
  990. 'newsletter_editor/social-icons/custom.png'
  991. ) %>',
  992. 'facebook': '<%= image_url(
  993. 'newsletter_editor/social-icons/09-line-roundrect/Facebook.png'
  994. ) %>',
  995. 'twitter': '<%= image_url(
  996. 'newsletter_editor/social-icons/09-line-roundrect/Twitter.png'
  997. ) %>',
  998. 'google-plus': '<%= image_url(
  999. 'newsletter_editor/social-icons/09-line-roundrect/Google-Plus.png'
  1000. ) %>',
  1001. 'youtube': '<%= image_url(
  1002. 'newsletter_editor/social-icons/09-line-roundrect/Youtube.png'
  1003. ) %>',
  1004. 'website': '<%= image_url(
  1005. 'newsletter_editor/social-icons/09-line-roundrect/Website.png'
  1006. ) %>',
  1007. 'email': '<%= image_url(
  1008. 'newsletter_editor/social-icons/09-line-roundrect/Email.png'
  1009. ) %>',
  1010. 'instagram': '<%= image_url(
  1011. 'newsletter_editor/social-icons/09-line-roundrect/Instagram.png'
  1012. ) %>',
  1013. 'pinterest': '<%= image_url(
  1014. 'newsletter_editor/social-icons/09-line-roundrect/Pinterest.png'
  1015. ) %>',
  1016. 'linkedin': '<%= image_url(
  1017. 'newsletter_editor/social-icons/09-line-roundrect/LinkedIn.png'
  1018. ) %>',
  1019. },
  1020. 'line-square': {
  1021. 'custom': '<%= image_url(
  1022. 'newsletter_editor/social-icons/custom.png'
  1023. ) %>',
  1024. 'facebook': '<%= image_url(
  1025. 'newsletter_editor/social-icons/10-line-square/Facebook.png'
  1026. ) %>',
  1027. 'twitter': '<%= image_url(
  1028. 'newsletter_editor/social-icons/10-line-square/Twitter.png'
  1029. ) %>',
  1030. 'google-plus': '<%= image_url(
  1031. 'newsletter_editor/social-icons/10-line-square/Google-Plus.png'
  1032. ) %>',
  1033. 'youtube': '<%= image_url(
  1034. 'newsletter_editor/social-icons/10-line-square/Youtube.png'
  1035. ) %>',
  1036. 'website': '<%= image_url(
  1037. 'newsletter_editor/social-icons/10-line-square/Website.png'
  1038. ) %>',
  1039. 'email': '<%= image_url(
  1040. 'newsletter_editor/social-icons/10-line-square/Email.png'
  1041. ) %>',
  1042. 'instagram': '<%= image_url(
  1043. 'newsletter_editor/social-icons/10-line-square/Instagram.png'
  1044. ) %>',
  1045. 'pinterest': '<%= image_url(
  1046. 'newsletter_editor/social-icons/10-line-square/Pinterest.png'
  1047. ) %>',
  1048. 'linkedin': '<%= image_url(
  1049. 'newsletter_editor/social-icons/10-line-square/LinkedIn.png'
  1050. ) %>',
  1051. },
  1052. },
  1053. dividers: [
  1054. 'hidden',
  1055. 'dotted',
  1056. 'dashed',
  1057. 'solid',
  1058. 'double',
  1059. 'groove',
  1060. 'ridge'
  1061. ]
  1062. },
  1063. socialIcons: {
  1064. 'facebook': {
  1065. title: 'Facebook',
  1066. linkFieldName: '<%= __('Link') | escape('js') %>',
  1067. defaultLink: 'http://www.facebook.com',
  1068. },
  1069. 'twitter': {
  1070. title: 'Twitter',
  1071. linkFieldName: '<%= __('Link') | escape('js') %>',
  1072. defaultLink: 'http://www.twitter.com',
  1073. },
  1074. 'google-plus': {
  1075. title: 'Google Plus',
  1076. linkFieldName: '<%= __('Link') | escape('js') %>',
  1077. defaultLink: 'http://plus.google.com',
  1078. },
  1079. 'youtube': {
  1080. title: 'Youtube',
  1081. linkFieldName: '<%= __('Link') | escape('js') %>',
  1082. defaultLink: 'http://www.youtube.com',
  1083. },
  1084. 'website': {
  1085. title: '<%= __('Website') | escape('js') %>',
  1086. linkFieldName: '<%= __('Link') | escape('js') %>',
  1087. defaultLink: '',
  1088. },
  1089. 'email': {
  1090. title: '<%= __('Email') | escape('js') %>',
  1091. linkFieldName: '<%= __('Email') | escape('js') %>',
  1092. defaultLink: '',
  1093. },
  1094. 'instagram': {
  1095. title: 'Instagram',
  1096. linkFieldName: '<%= __('Link') | escape('js') %>',
  1097. defaultLink: 'http://instagram.com',
  1098. },
  1099. 'pinterest': {
  1100. title: 'Pinterest',
  1101. linkFieldName: '<%= __('Link') | escape('js') %>',
  1102. defaultLink: 'http://www.pinterest.com',
  1103. },
  1104. 'linkedin': {
  1105. title: 'LinkedIn',
  1106. linkFieldName: '<%= __('Link') | escape('js') %>',
  1107. defaultLink: 'http://www.linkedin.com',
  1108. },
  1109. 'custom': {
  1110. title: '<%= __('Custom') | escape('js') %>',
  1111. linkFieldName: '<%= __('Link') | escape('js') %>',
  1112. defaultLink: '',
  1113. },
  1114. },
  1115. blockDefaults: {
  1116. abandonedCartContent: {
  1117. amount: '2',
  1118. withLayout: true,
  1119. contentType: 'product',
  1120. postStatus: 'publish', // 'draft'|'pending'|'publish'
  1121. inclusionType: 'include', // 'include'|'exclude'
  1122. displayType: 'excerpt', // 'excerpt'|'full'|'titleOnly'
  1123. titleFormat: 'h1', // 'h1'|'h2'|'h3'
  1124. titleAlignment: 'left', // 'left'|'center'|'right'
  1125. titleIsLink: false, // false|true
  1126. imageFullWidth: false, // true|false
  1127. featuredImagePosition: 'alternate', // 'centered'|'left'|'right'|'alternate'|'none',
  1128. pricePosition: 'below', // 'hidden'|'above'|'below'
  1129. readMoreType: 'none', // 'link'|'button'|'none'
  1130. readMoreText: '',
  1131. readMoreButton: {},
  1132. sortBy: 'newest', // 'newest'|'oldest',
  1133. showDivider: true, // true|false
  1134. divider: {
  1135. context: 'abandonedCartContent.divider',
  1136. styles: {
  1137. block: {
  1138. backgroundColor: 'transparent',
  1139. padding: '13px',
  1140. borderStyle: 'solid',
  1141. borderWidth: '3px',
  1142. borderColor: '#aaaaaa',
  1143. },
  1144. },
  1145. },
  1146. backgroundColor: '#ffffff',
  1147. backgroundColorAlternate: '#eeeeee',
  1148. },
  1149. automatedLatestContent: {
  1150. amount: '5',
  1151. withLayout: false,
  1152. contentType: 'post', // 'post'|'page'|'mailpoet_page'
  1153. inclusionType: 'include', // 'include'|'exclude'
  1154. displayType: 'excerpt', // 'excerpt'|'full'|'titleOnly'
  1155. titleFormat: 'h1', // 'h1'|'h2'|'h3'|'ul'
  1156. titleAlignment: 'left', // 'left'|'center'|'right'
  1157. titleIsLink: false, // false|true
  1158. imageFullWidth: false, // true|false
  1159. featuredImagePosition: 'belowTitle', // 'belowTitle'|'aboveTitle'|'none',
  1160. showAuthor: 'no', // 'no'|'aboveText'|'belowText'
  1161. authorPrecededBy: '<%= __('Author:') | escape('js') %>',
  1162. showCategories: 'no', // 'no'|'aboveText'|'belowText'
  1163. categoriesPrecededBy: '<%= __('Categories:') | escape('js') %>',
  1164. readMoreType: 'button', // 'link'|'button'
  1165. readMoreText: '<%= __('Read more') | escape('js') %>',
  1166. readMoreButton: {
  1167. text: '<%= __('Read more') | escape('js') %>',
  1168. url: '[postLink]',
  1169. context: 'automatedLatestContent.readMoreButton',
  1170. styles: {
  1171. block: {
  1172. backgroundColor: '#2ea1cd',
  1173. borderColor: '#0074a2',
  1174. borderWidth: '1px',
  1175. borderRadius: '5px',
  1176. borderStyle: 'solid',
  1177. width: '180px',
  1178. lineHeight: '40px',
  1179. fontColor: '#ffffff',
  1180. fontFamily: 'Verdana',
  1181. fontSize: '18px',
  1182. fontWeight: 'normal',
  1183. textAlign: 'center',
  1184. }
  1185. }
  1186. },
  1187. sortBy: 'newest', // 'newest'|'oldest',
  1188. showDivider: true, // true|false
  1189. divider: {
  1190. context: 'automatedLatestContent.divider',
  1191. styles: {
  1192. block: {
  1193. backgroundColor: 'transparent',
  1194. padding: '13px',
  1195. borderStyle: 'solid',
  1196. borderWidth: '3px',
  1197. borderColor: '#aaaaaa',
  1198. },
  1199. },
  1200. },
  1201. backgroundColor: '#ffffff',
  1202. backgroundColorAlternate: '#eeeeee',
  1203. },
  1204. automatedLatestContentLayout: {
  1205. amount: '5',
  1206. withLayout: true,
  1207. contentType: 'post', // 'post'|'page'|'mailpoet_page'
  1208. inclusionType: 'include', // 'include'|'exclude'
  1209. displayType: 'excerpt', // 'excerpt'|'full'|'titleOnly'
  1210. titleFormat: 'h1', // 'h1'|'h2'|'h3'|'ul'
  1211. titleAlignment: 'left', // 'left'|'center'|'right'
  1212. titleIsLink: false, // false|true
  1213. imageFullWidth: false, // true|false
  1214. featuredImagePosition: 'alternate', // 'centered'|'left'|'right'|'alternate'|'none',
  1215. showAuthor: 'no', // 'no'|'aboveText'|'belowText'
  1216. authorPrecededBy: '<%= __('Author:') | escape('js') %>',
  1217. showCategories: 'no', // 'no'|'aboveText'|'belowText'
  1218. categoriesPrecededBy: '<%= __('Categories:') | escape('js') %>',
  1219. readMoreType: 'button', // 'link'|'button'
  1220. readMoreText: '<%= __('Read more') | escape('js') %>',
  1221. readMoreButton: {
  1222. text: '<%= __('Read more') | escape('js') %>',
  1223. url: '[postLink]',
  1224. context: 'automatedLatestContentLayout.readMoreButton',
  1225. styles: {
  1226. block: {
  1227. backgroundColor: '#2ea1cd',
  1228. borderColor: '#0074a2',
  1229. borderWidth: '1px',
  1230. borderRadius: '5px',
  1231. borderStyle: 'solid',
  1232. width: '180px',
  1233. lineHeight: '40px',
  1234. fontColor: '#ffffff',
  1235. fontFamily: 'Verdana',
  1236. fontSize: '18px',
  1237. fontWeight: 'normal',
  1238. textAlign: 'center',
  1239. }
  1240. }
  1241. },
  1242. sortBy: 'newest', // 'newest'|'oldest',
  1243. showDivider: true, // true|false
  1244. divider: {
  1245. context: 'automatedLatestContentLayout.divider',
  1246. styles: {
  1247. block: {
  1248. backgroundColor: 'transparent',
  1249. padding: '13px',
  1250. borderStyle: 'solid',
  1251. borderWidth: '3px',
  1252. borderColor: '#aaaaaa',
  1253. },
  1254. },
  1255. },
  1256. backgroundColor: '#ffffff',
  1257. backgroundColorAlternate: '#eeeeee',
  1258. },
  1259. button: {
  1260. text: '<%= __('Button') | escape('js') %>',
  1261. url: '',
  1262. styles: {
  1263. block: {
  1264. backgroundColor: '#2ea1cd',
  1265. borderColor: '#0074a2',
  1266. borderWidth: '1px',
  1267. borderRadius: '5px',
  1268. borderStyle: 'solid',
  1269. width: '180px',
  1270. lineHeight: '40px',
  1271. fontColor: '#ffffff',
  1272. fontFamily: 'Verdana',
  1273. fontSize: '18px',
  1274. fontWeight: 'normal',
  1275. textAlign: 'center',
  1276. },
  1277. },
  1278. },
  1279. container: {
  1280. image: {
  1281. src: null,
  1282. display: 'scale',
  1283. },
  1284. styles: {
  1285. block: {
  1286. backgroundColor: 'transparent',
  1287. },
  1288. },
  1289. },
  1290. divider: {
  1291. styles: {
  1292. block: {
  1293. backgroundColor: 'transparent',
  1294. padding: '13px',
  1295. borderStyle: 'solid',
  1296. borderWidth: '3px',
  1297. borderColor: '#aaaaaa',
  1298. },
  1299. },
  1300. },
  1301. footer: {
  1302. text: '<p><a href="[link:subscription_unsubscribe_url]"><%= __('Unsubscribe') %></a> | <a href="[link:subscription_manage_url]"><%= __('Manage subscription') %></a><br /><%= __('Add your postal address here!') %></p>',
  1303. styles: {
  1304. block: {
  1305. backgroundColor: 'transparent',
  1306. },
  1307. text: {
  1308. fontColor: '#222222',
  1309. fontFamily: 'Arial',
  1310. fontSize: '12px',
  1311. textAlign: 'center',
  1312. },
  1313. link: {
  1314. fontColor: '#6cb7d4',
  1315. textDecoration: 'none',
  1316. },
  1317. },
  1318. },
  1319. image: {
  1320. link: '',
  1321. src: '',
  1322. alt: '<%= __('An image of...') | escape('js') %>',
  1323. fullWidth: false,
  1324. width: '281px',
  1325. height: '190px',
  1326. styles: {
  1327. block: {
  1328. textAlign: 'center',
  1329. },
  1330. },
  1331. },
  1332. posts: {
  1333. amount: '10',
  1334. withLayout: true,
  1335. contentType: 'post', // 'post'|'page'|'mailpoet_page'
  1336. postStatus: 'publish', // 'draft'|'pending'|'private'|'publish'|'future'
  1337. inclusionType: 'include', // 'include'|'exclude'
  1338. displayType: 'excerpt', // 'excerpt'|'full'|'titleOnly'
  1339. titleFormat: 'h1', // 'h1'|'h2'|'h3'|'ul'
  1340. titleAlignment: 'left', // 'left'|'center'|'right'
  1341. titleIsLink: false, // false|true
  1342. imageFullWidth: false, // true|false
  1343. featuredImagePosition: 'alternate', // 'centered'|'left'|'right'|'alternate'|'none',
  1344. showAuthor: 'no', // 'no'|'aboveText'|'belowText'
  1345. authorPrecededBy: '<%= __('Author:') | escape('js') %>',
  1346. showCategories: 'no', // 'no'|'aboveText'|'belowText'
  1347. categoriesPrecededBy: '<%= __('Categories:') | escape('js') %>',
  1348. readMoreType: 'link', // 'link'|'button'
  1349. readMoreText: '<%= __('Read more') | escape('js') %>',
  1350. readMoreButton: {
  1351. text: '<%= __('Read more') | escape('js') %>',
  1352. url: '[postLink]',
  1353. context: 'posts.readMoreButton',
  1354. styles: {
  1355. block: {
  1356. backgroundColor: '#2ea1cd',
  1357. borderColor: '#0074a2',
  1358. borderWidth: '1px',
  1359. borderRadius: '5px',
  1360. borderStyle: 'solid',
  1361. width: '180px',
  1362. lineHeight: '40px',
  1363. fontColor: '#ffffff',
  1364. fontFamily: 'Verdana',
  1365. fontSize: '18px',
  1366. fontWeight: 'normal',
  1367. textAlign: 'center',
  1368. },
  1369. },
  1370. },
  1371. sortBy: 'newest', // 'newest'|'oldest',
  1372. showDivider: true, // true|false
  1373. divider: {
  1374. context: 'posts.divider',
  1375. styles: {
  1376. block: {
  1377. backgroundColor: 'transparent',
  1378. padding: '13px',
  1379. borderStyle: 'solid',
  1380. borderWidth: '3px',
  1381. borderColor: '#aaaaaa',
  1382. },
  1383. },
  1384. },
  1385. backgroundColor: '#ffffff',
  1386. backgroundColorAlternate: '#eeeeee',
  1387. },
  1388. products: {
  1389. amount: '10',
  1390. withLayout: true,
  1391. contentType: 'product',
  1392. postStatus: 'publish', // 'draft'|'pending'|'publish'
  1393. inclusionType: 'include', // 'include'|'exclude'
  1394. displayType: 'excerpt', // 'excerpt'|'full'|'titleOnly'
  1395. titleFormat: 'h1', // 'h1'|'h2'|'h3'
  1396. titleAlignment: 'left', // 'left'|'center'|'right'
  1397. titleIsLink: false, // false|true
  1398. imageFullWidth: false, // true|false
  1399. featuredImagePosition: 'alternate', // 'centered'|'left'|'right'|'alternate'|'none',
  1400. pricePosition: 'below', // 'hidden'|'above'|'below'
  1401. readMoreType: 'link', // 'link'|'button'
  1402. readMoreText: '<%= _x('Buy now', 'Text of a button which links to an ecommerce product page') | escape('js') %>',
  1403. readMoreButton: {
  1404. text: '<%= _x('Buy now', 'Text of a button which links to an ecommerce product page') | escape('js') %>',
  1405. url: '[postLink]',
  1406. context: 'posts.readMoreButton',
  1407. styles: {
  1408. block: {
  1409. backgroundColor: '#2ea1cd',
  1410. borderColor: '#0074a2',
  1411. borderWidth: '1px',
  1412. borderRadius: '5px',
  1413. borderStyle: 'solid',
  1414. width: '180px',
  1415. lineHeight: '40px',
  1416. fontColor: '#ffffff',
  1417. fontFamily: 'Verdana',
  1418. fontSize: '18px',
  1419. fontWeight: 'normal',
  1420. textAlign: 'center',
  1421. },
  1422. },
  1423. },
  1424. sortBy: 'newest', // 'newest'|'oldest',
  1425. showDivider: true, // true|false
  1426. divider: {
  1427. context: 'posts.divider',
  1428. styles: {
  1429. block: {
  1430. backgroundColor: 'transparent',
  1431. padding: '13px',
  1432. borderStyle: 'solid',
  1433. borderWidth: '3px',
  1434. borderColor: '#aaaaaa',
  1435. },
  1436. },
  1437. },
  1438. backgroundColor: '#ffffff',
  1439. backgroundColorAlternate: '#eeeeee',
  1440. },
  1441. social: {
  1442. iconSet: 'default',
  1443. styles: {
  1444. block: {
  1445. textAlign: 'center'
  1446. }
  1447. },
  1448. icons: [
  1449. {
  1450. type: 'socialIcon',
  1451. iconType: 'facebook',
  1452. link: 'http://www.facebook.com',
  1453. image: '<%= image_url(
  1454. 'newsletter_editor/social-icons/01-social/Facebook.png'
  1455. ) %>',
  1456. height: '32px',
  1457. width: '32px',
  1458. text: '<%= __('Facebook') | escape('js') %>',
  1459. },
  1460. {
  1461. type: 'socialIcon',
  1462. iconType: 'twitter',
  1463. link: 'http://www.twitter.com',
  1464. image: '<%= image_url(
  1465. 'newsletter_editor/social-icons/01-social/Twitter.png'
  1466. ) %>',
  1467. height: '32px',
  1468. width: '32px',
  1469. text: '<%= __('Twitter') | escape('js') %>',
  1470. },
  1471. ],
  1472. },
  1473. spacer: {
  1474. styles: {
  1475. block: {
  1476. backgroundColor: 'transparent',
  1477. height: '40px',
  1478. },
  1479. },
  1480. },
  1481. text: {
  1482. text: '<%= __('Edit this to insert text.') | escape('js') %>',
  1483. },
  1484. header: {
  1485. text: '<a href="[link:newsletter_view_in_browser_url]"><%= __('View this in your browser.') %></a>',
  1486. styles: {
  1487. block: {
  1488. backgroundColor: 'transparent',
  1489. },
  1490. text: {
  1491. fontColor: '#222222',
  1492. fontFamily: 'Arial',
  1493. fontSize: '12px',
  1494. textAlign: 'center',
  1495. },
  1496. link: {
  1497. fontColor: '#6cb7d4',
  1498. textDecoration: 'underline',
  1499. },
  1500. },
  1501. },
  1502. woocommerceHeading: {
  1503. contents: <%= json_encode(woocommerce.email_headings) %>,
  1504. },
  1505. },
  1506. shortcodes: <%= json_encode(shortcodes) %>,
  1507. sidepanelWidth: '331px',
  1508. newsletterPreview: {
  1509. width: '1024px',
  1510. height: '768px',
  1511. previewTypeLocalStorageKey: 'newsletter_editor.preview_type'
  1512. },
  1513. validation: {
  1514. validateUnsubscribeLinkPresent: <%= mss_active and is_wc_transactional_email != true ? 'true' : 'false' %>,
  1515. },
  1516. urls: {
  1517. send: '<%= admin_url('admin.php?page=mailpoet-newsletters#/send/' ~ (params('id') | intval)) %>',
  1518. imageMissing: '<%= image_url(
  1519. "newsletter_editor/image-missing.svg"
  1520. ) %>',
  1521. },
  1522. dragDemoUrl: '<%= cdn_url('newsletter-editor/editor-drag-demo.20190226-1505.mp4') %>',
  1523. currentUserId: '<%= current_wp_user.wp_user_id %>',
  1524. dragDemoUrlSettings: '<%= editor_tutorial_seen %>',
  1525. installedAt: '<%= settings["installed_at"] %>',
  1526. mtaMethod: '<%= settings["mta"]["method"] %>',
  1527. woocommerceCustomizerEnabled: <%= woocommerce.customizer_enabled ? 'true' : 'false' %>,
  1528. <% if is_wc_transactional_email %>
  1529. overrideGlobalStyles: {
  1530. text: {
  1531. fontColor: <%= json_encode(woocommerce.text_color) %>,
  1532. },
  1533. h1: {
  1534. fontColor: <%= json_encode(woocommerce.base_color) %>,
  1535. },
  1536. h2: {
  1537. fontColor: <%= json_encode(woocommerce.base_color) %>,
  1538. },
  1539. h3: {
  1540. fontColor: <%= json_encode(woocommerce.base_color) %>,
  1541. },
  1542. link: {
  1543. fontColor: <%= json_encode(woocommerce.link_color) %>,
  1544. },
  1545. wrapper: {
  1546. backgroundColor: <%= json_encode(woocommerce.body_background_color) %>,
  1547. },
  1548. body: {
  1549. backgroundColor: <%= json_encode(woocommerce.background_color) %>,
  1550. },
  1551. woocommerce: {
  1552. brandingColor: <%= json_encode(woocommerce.base_color) %>,
  1553. headingFontColor: <%= json_encode(woocommerce.base_text_color) %>,
  1554. },
  1555. },
  1556. hiddenWidgets: ['automatedLatestContentLayout', 'header', 'footer', 'posts', 'products'],
  1557. <% endif %>
  1558. };
  1559. wp.hooks.doAction('mailpoet_newsletters_editor_initialize', config);
  1560. </script>
  1561. <% endblock %>