PluginProbe ʕ •ᴥ•ʔ
Hustle – Email Marketing, Lead Generation, Optins, Popups / 7.3.7
Hustle – Email Marketing, Lead Generation, Optins, Popups v7.3.7
7.8.13 7.8.13.1 trunk 3.0 3.1 3.1.1 3.1.2 3.1.3 3.1.4 4.3.2 4.4.4 4.4.5 4.4.5.1 4.4.5.4 4.6 4.6.1.1 4.6.1.4 4.7.0.2 4.7.0.3 4.7.0.7 4.7.0.9 4.7.1.0 4.7.1.1 4.8.0.0 5.0.0 5.0.1 5.0.1.1 5.0.1.2 5.1 5.1.1 5.1.2 5.1.3 5.1.3.1 5.1.3.2 5.1.4 5.1.5 6.0 6.0.1 6.0.2 6.0.3 6.0.4.2 6.0.5 6.0.6.1 6.0.7 6.0.8.1 6.0.9 7.0.0.1 7.0.2 7.0.3 7.0.4 7.1.0 7.1.1 7.2.0 7.2.1 7.3.0 7.3.1 7.3.3 7.3.5 7.3.6 7.3.7 7.4.0 7.4.1 7.4.11 7.4.13 7.4.13.1 7.4.2 7.4.3 7.4.4 7.4.5 7.4.5.1 7.4.5.2 7.4.6 7.4.7 7.5.0 7.6.0 7.6.1 7.6.3 7.6.4 7.6.6 7.7.0 7.7.1 7.8.0 7.8.1 7.8.10 7.8.10.1 7.8.10.2 7.8.11 7.8.12 7.8.12.1 7.8.2 7.8.3 7.8.4 7.8.5 7.8.6 7.8.7 7.8.8 7.8.9 7.8.9.1 7.8.9.2 7.8.9.3
wordpress-popup / assets / js / vendor / tiny-mce-button.js
wordpress-popup / assets / js / vendor Last commit date
ace 5 years ago chartjs 6 years ago fitie 5 years ago daterangepicker.min.js 6 years ago jquery.timepicker.min.js 5 years ago moment-timezone-with-data.min.js 6 years ago moment.min.js 7 years ago tiny-mce-button.js 6 years ago wp-color-picker-alpha.min.js 5 years ago
tiny-mce-button.js
39 lines
1 ( function( $ ) {
2 tinymce.PluginManager.add( 'hustle', function( editor, url ) {
3
4 if ( -1 === $.inArray( editor.id, hustleData.available_editors ) ) {
5 return;
6 }
7
8 let options = '';
9 $.each( hustleData.fields, function( name, label ) {
10 options += `<li><button value="{${name}}">${label}</button></li>`;
11 });
12
13 let html = `<div class="sui-dropdown sui-dropdown-right">
14 <button class="sui-button-icon sui-dropdown-anchor sui-tooltip sui-tooltip-top-left" data-tooltip="${hustleData.button_title}">
15 <i class="sui-icon-layout" aria-hidden="true"></i>
16 <span class="sui-screen-reader-text">Opt-in options</span>
17 </button>
18 <ul class="hustle-button-options hustle-fields-placeholders-options" data-mce-id="${editor.id}">${options}</ul></div>`.trim();
19
20 // Add the custom button to the editor.
21 editor.addButton( 'hustlefields', {
22 icon: false,
23 classes: editor.id + '-button',
24 image: url.split( '/' ).slice( 0, -2 ).join( '/' ) + '/img/hustle.png', //16x16 recommended
25 onPostRender: function() {
26 $( '.mce-' + editor.id + '-button' ).html( html );
27 }
28 });
29
30 });
31
32 $( 'body' ).on( 'click', '.hustle-button-options', function( e ) {
33 var $this = $( e.target ),
34 $mce = $( this ).data('mce-id');
35 tinymce.get( $mce ).insertContent( $this.val() );
36 });
37
38 } (jQuery) );
39