Changeset 1887311
- Timestamp:
- 06/05/2018 09:01:43 AM (8 years ago)
- Location:
- share-button
- Files:
-
- 2 added
- 7 deleted
- 9 edited
- 79 copied
-
tags/1.4 (copied) (copied from share-button/trunk)
-
tags/1.4/admin (copied) (copied from share-button/trunk/admin)
-
tags/1.4/admin/header.php (copied) (copied from share-button/trunk/admin/header.php)
-
tags/1.4/admin/meta_boxes.php (copied) (copied from share-button/trunk/admin/meta_boxes.php)
-
tags/1.4/admin/page_editor.php (copied) (copied from share-button/trunk/admin/page_editor.php)
-
tags/1.4/admin/page_networks.php (copied) (copied from share-button/trunk/admin/page_networks.php)
-
tags/1.4/admin/page_settings.php (copied) (copied from share-button/trunk/admin/page_settings.php)
-
tags/1.4/admin/review_notice.php (copied) (copied from share-button/trunk/admin/review_notice.php)
-
tags/1.4/admin/save_meta_boxes.php (copied) (copied from share-button/trunk/admin/save_meta_boxes.php)
-
tags/1.4/admin/update_mb.php (copied) (copied from share-button/trunk/admin/update_mb.php)
-
tags/1.4/classes (copied) (copied from share-button/trunk/classes)
-
tags/1.4/classes/blocks/admin_block.php (copied) (copied from share-button/trunk/classes/blocks/admin_block.php)
-
tags/1.4/classes/blocks/count_block.php (copied) (copied from share-button/trunk/classes/blocks/count_block.php)
-
tags/1.4/classes/blocks/display_block.php (copied) (copied from share-button/trunk/classes/blocks/display_block.php)
-
tags/1.4/classes/blocks/effect_block.php (copied) (copied from share-button/trunk/classes/blocks/effect_block.php) (1 diff)
-
tags/1.4/classes/blocks/general_block.php (copied) (copied from share-button/trunk/classes/blocks/general_block.php)
-
tags/1.4/classes/blocks/layout-block.php (copied) (copied from share-button/trunk/classes/blocks/layout-block.php)
-
tags/1.4/classes/blocks/network-block.php (copied) (copied from share-button/trunk/classes/blocks/network-block.php) (1 diff)
-
tags/1.4/classes/blocks/preview_block.php (copied) (copied from share-button/trunk/classes/blocks/preview_block.php)
-
tags/1.4/classes/blocks/profile_block.php (copied) (copied from share-button/trunk/classes/blocks/profile_block.php)
-
tags/1.4/classes/blocks/style_block.php (copied) (copied from share-button/trunk/classes/blocks/style_block.php)
-
tags/1.4/classes/blocks/twitter_block.php (copied) (copied from share-button/trunk/classes/blocks/twitter_block.php)
-
tags/1.4/classes/class-admin.php (copied) (copied from share-button/trunk/classes/class-admin.php)
-
tags/1.4/classes/class-block.php (copied) (copied from share-button/trunk/classes/class-block.php)
-
tags/1.4/classes/class-collection.php (copied) (copied from share-button/trunk/classes/class-collection.php)
-
tags/1.4/classes/class-collections.php (copied) (copied from share-button/trunk/classes/class-collections.php)
-
tags/1.4/classes/class-fautils.php (copied) (copied from share-button/trunk/classes/class-fautils.php)
-
tags/1.4/classes/class-install.php (copied) (copied from share-button/trunk/classes/class-install.php)
-
tags/1.4/classes/class-network.php (copied) (copied from share-button/trunk/classes/class-network.php)
-
tags/1.4/classes/class-presets.php (copied) (copied from share-button/trunk/classes/class-presets.php)
-
tags/1.4/classes/class-social-networks.php (copied) (copied from share-button/trunk/classes/class-social-networks.php)
-
tags/1.4/classes/class-social.php (copied) (copied from share-button/trunk/classes/class-social.php) (1 diff)
-
tags/1.4/classes/class-style.php (copied) (copied from share-button/trunk/classes/class-style.php)
-
tags/1.4/classes/class-styles.php (copied) (copied from share-button/trunk/classes/class-styles.php)
-
tags/1.4/classes/network/buffer.php (copied) (copied from share-button/trunk/classes/network/buffer.php)
-
tags/1.4/classes/network/custom.php (copied) (copied from share-button/trunk/classes/network/custom.php)
-
tags/1.4/classes/network/googleplus.php (copied) (copied from share-button/trunk/classes/network/googleplus.php)
-
tags/1.4/classes/network/mbcustom.php (copied) (copied from share-button/trunk/classes/network/mbcustom.php)
-
tags/1.4/classes/network/pinterest.php (copied) (copied from share-button/trunk/classes/network/pinterest.php)
-
tags/1.4/classes/network/simple.php (copied) (copied from share-button/trunk/classes/network/simple.php)
-
tags/1.4/classes/network/twitter.php (copied) (copied from share-button/trunk/classes/network/twitter.php)
-
tags/1.4/classes/network/vk.php (copied) (copied from share-button/trunk/classes/network/vk.php)
-
tags/1.4/classes/styles/_dropsquare-style.php (copied) (copied from share-button/trunk/classes/styles/_dropsquare-style.php)
-
tags/1.4/classes/styles/_liftsquare-style.php (copied) (copied from share-button/trunk/classes/styles/_liftsquare-style.php)
-
tags/1.4/classes/styles/_rectangle-style.php (copied) (copied from share-button/trunk/classes/styles/_rectangle-style.php)
-
tags/1.4/classes/styles/_round-style-nucleo.php (copied) (copied from share-button/trunk/classes/styles/_round-style-nucleo.php)
-
tags/1.4/classes/styles/_roundflip-style.php (copied) (copied from share-button/trunk/classes/styles/_roundflip-style.php)
-
tags/1.4/classes/styles/_shiftsquare-style.php (copied) (copied from share-button/trunk/classes/styles/_shiftsquare-style.php)
-
tags/1.4/classes/styles/dropsquare-style.php (deleted)
-
tags/1.4/classes/styles/horizontal-style.php (copied) (copied from share-button/trunk/classes/styles/horizontal-style.php)
-
tags/1.4/classes/styles/liftsquare-style.php (deleted)
-
tags/1.4/classes/styles/rectangle-style.php (deleted)
-
tags/1.4/classes/styles/round-style-nucleo.php (deleted)
-
tags/1.4/classes/styles/round-style.php (copied) (copied from share-button/trunk/classes/styles/round-style.php)
-
tags/1.4/classes/styles/roundflip-style.php (deleted)
-
tags/1.4/classes/styles/shiftsquare-style.php (deleted)
-
tags/1.4/classes/styles/square-style.php (copied) (copied from share-button/trunk/classes/styles/square-style.php)
-
tags/1.4/css (copied) (copied from share-button/trunk/css)
-
tags/1.4/css/admin.css (copied) (copied from share-button/trunk/css/admin.css) (1 diff)
-
tags/1.4/css/buttons.css (copied) (copied from share-button/trunk/css/buttons.css)
-
tags/1.4/css/global-admin.css (copied) (copied from share-button/trunk/css/global-admin.css)
-
tags/1.4/images (copied) (copied from share-button/trunk/images)
-
tags/1.4/images/icons/shape_circle.png (copied) (copied from share-button/trunk/images/icons/shape_circle.png)
-
tags/1.4/images/icons/shape_square.png (copied) (copied from share-button/trunk/images/icons/shape_square.png)
-
tags/1.4/images/icons/shape_stretch.png (copied) (copied from share-button/trunk/images/icons/shape_stretch.png)
-
tags/1.4/images/mb-blue-network.png (copied) (copied from share-button/trunk/images/mb-blue-network.png)
-
tags/1.4/images/mbsocial-icon-128.png (copied) (copied from share-button/trunk/images/mbsocial-icon-128.png)
-
tags/1.4/js (copied) (copied from share-button/trunk/js)
-
tags/1.4/js/maxbuttons-custom.js (added)
-
tags/1.4/js/maxbuttons-social.js (copied) (copied from share-button/trunk/js/maxbuttons-social.js) (8 diffs)
-
tags/1.4/js/network-editor.js (copied) (copied from share-button/trunk/js/network-editor.js) (1 diff)
-
tags/1.4/js/social-front.js (copied) (copied from share-button/trunk/js/social-front.js)
-
tags/1.4/languages (copied) (copied from share-button/trunk/languages)
-
tags/1.4/libraries (copied) (copied from share-button/trunk/libraries)
-
tags/1.4/libraries/simple_template.php (deleted)
-
tags/1.4/libraries/whistle.php (copied) (copied from share-button/trunk/libraries/whistle.php)
-
tags/1.4/readme.txt (copied) (copied from share-button/trunk/readme.txt) (1 diff)
-
tags/1.4/scss (copied) (copied from share-button/trunk/scss)
-
tags/1.4/scss/_editor.scss (copied) (copied from share-button/trunk/scss/_editor.scss)
-
tags/1.4/scss/_modals.scss (copied) (copied from share-button/trunk/scss/_modals.scss) (1 diff)
-
tags/1.4/scss/_networks.scss (copied) (copied from share-button/trunk/scss/_networks.scss)
-
tags/1.4/scss/_postbox.scss (copied) (copied from share-button/trunk/scss/_postbox.scss)
-
tags/1.4/scss/_settings.scss (copied) (copied from share-button/trunk/scss/_settings.scss)
-
tags/1.4/scss/_variables.scss (copied) (copied from share-button/trunk/scss/_variables.scss)
-
tags/1.4/scss/admin.scss (copied) (copied from share-button/trunk/scss/admin.scss)
-
tags/1.4/scss/buttons.scss (copied) (copied from share-button/trunk/scss/buttons.scss)
-
tags/1.4/share-button.php (copied) (copied from share-button/trunk/share-button.php) (2 diffs)
-
trunk/classes/blocks/effect_block.php (modified) (1 diff)
-
trunk/classes/blocks/network-block.php (modified) (1 diff)
-
trunk/classes/class-social.php (modified) (1 diff)
-
trunk/css/admin.css (modified) (1 diff)
-
trunk/js/maxbuttons-custom.js (added)
-
trunk/js/maxbuttons-social.js (modified) (8 diffs)
-
trunk/js/network-editor.js (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/scss/_modals.scss (modified) (1 diff)
-
trunk/share-button.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
share-button/tags/1.4/classes/blocks/effect_block.php
r1827649 r1887311 97 97 $etype->options = $types; 98 98 $etype->selected = $this->getValue($etype->id); 99 $etype->disabled = true; 99 100 100 101 101 $admin->addField($etype, 'start','end'); -
share-button/tags/1.4/classes/blocks/network-block.php
r1876456 r1887311 714 714 { 715 715 ?> 716 <span class='config_button'><button type='button' class='button-primary' data-parent='#maxbuttons' data-callback='window.maxFoundry.maxSocial.selectMBCustomButton' data-nonce="<?php echo wp_create_nonce('maxajax'); ?>"><?php _e('Config', 'mbsocial'); ?></button></span>716 <span class='config_button'><button type='button' class='button-primary' ><?php _e('Config', 'mbsocial'); ?></button></span> 717 717 <?php 718 718 } -
share-button/tags/1.4/classes/class-social.php
r1876456 r1887311 208 208 209 209 if (Install::isPro()) 210 { 210 211 $deps = array('maxbuttons-pro-init','maxbuttons-ajax', 'mb-media-button', 'jquery-ui-sortable'); // pro init 212 wp_register_script('maxbuttons-mbcustom', $this->plugin_url . 'js/maxbuttons-custom.js', $deps, $this->version, true); 213 wp_enqueue_script('maxbuttons-mbcustom'); 214 } 211 215 else 216 { 212 217 $deps = array('maxbutton-js-init', 'maxbuttons-ajax', 'mb-media-button', 'jquery-ui-sortable'); // free init 213 218 } 214 219 wp_register_script('maxbuttons-social', $this->plugin_url . 'js/maxbuttons-social.js', $deps , $this->version, true); 215 220 wp_enqueue_script('maxbuttons-social'); -
share-button/tags/1.4/css/admin.css
r1876456 r1887311 474 474 .max-modal.save_done .modal_close { 475 475 display: none; } 476 .max-modal.save_done .modal_content {477 display: none; }478 476 .max-modal.save_done + .maxmodal_overlay { 479 477 background-color: #eee; } -
share-button/tags/1.4/js/maxbuttons-social.js
r1876456 r1887311 1 jQuery(document).ready(function($) { 1 jQuery(document).ready(function(jq) { 2 $ = jq; 2 3 3 4 var maxSocial = function () { … … 5 6 var form_updated = false; 6 7 var style_changed = false; 7 8 8 var preview_in_view = false; 9 9 } … … 12 12 { 13 13 this.initSortables(); 14 /* This is a repair for media script messing with the position of maxmodal and unsets it somehow */ 15 window.maxFoundry.maxmodal = new maxModal(); 16 window.maxFoundry.maxmodal.init(); 14 15 colorPalette = (mbpro_options.colorPalette !== '' ? mbpro_options.colorPalette : true); 17 16 18 17 $('.maxbuttons-social .color-field').wpColorPicker( 19 { change: $.proxy( _.throttle(function(event, ui) { 18 { 19 width: 300, 20 palettes: colorPalette, 21 change: $.proxy( _.throttle(function(event, ui) { 20 22 event.preventDefault(); 21 23 var target = $(event.target); … … 55 57 56 58 } ,this) ); 57 58 // Custom MB Button config button59 $(document).on('click', '.item .config_button button', $.proxy(this.openMBCustomModal, this));60 59 61 60 // first this, before unhook maxmodal, otherwise this won't work (workaround) … … 144 143 145 144 connectWith: '.drag-area', 146 145 update: function (event, ui) 146 { 147 if ( $(event.target).data('area') == 'active') 148 { 149 $('#network_trigger_change').trigger('change'); 150 $('input[name="network_item_active[]"]').trigger('change'); // for conditionals 151 } 152 }, 147 153 receive: function(event, ui) { 148 154 … … 182 188 } 183 189 184 $('#network_trigger_change').trigger('change');185 $('input[name="network_item_active[]"]').trigger('change'); // for conditionals186 187 190 }, 188 191 … … 519 522 this.form_updated = false; 520 523 521 //console.log(two); console.log(one); console.log(modal);522 524 window.location = url; 523 525 }, this, [modal] ) ); … … 525 527 } 526 528 527 /** Function to open MB Custom selection modal, for custom buttons **/ 528 maxSocial.prototype.openMBCustomModal = function (e) 529 { 530 this.mbCustomTarget = $(e.target).parents('.item'); 531 var self = this; 532 533 var options = $(this.mbCustomTarget).find('.mbcustom-options'); 534 var index = $(this.mbCustomTarget).find('input[name="mbcustom_index[]"]').val(); 535 536 if ( $(options).length > 0) 537 { 538 var button_id = $(options).find('input[name="mbcustom_id[' + index + ']"]').val(); 539 540 if (typeof button_id !== 'undefined' && button_id > 0) 541 { 542 //window.maxMedia.showPostEditScreen(); 543 $(document).off('mb_media_put_results'); 544 $(document).on('mb_media_put_results', function (modal) 545 { 546 button_id = $(options).find('input[name="mbcustom_id[' + index + ']"]').val(); 547 self.selectMBCustomButton(button_id, e, options); 548 $(document).off('mb_media_put_results'); // turn this off to prevent previous results from echoing. 549 }); 550 } 551 } 552 553 window.maxMedia.clickAddButton(e); 554 555 } 556 557 // Select shortcode window, add MB Custom specific fields 558 maxSocial.prototype.selectMBCustomButton = function(button_id, event, options) 559 { 560 options = (typeof options !== 'undefined') ? options : false; 561 var index = $(this.mbCustomTarget).find('input[name="mbcustom_index[]"]').val(); 562 563 window.maxMedia.showShortcodeOptions(button_id, event); 564 565 var modal = window.maxMedia.maxm.currentModal; // find modal 566 var button = $(modal).find('input[name="add_shortcode"]'); 567 $(button).off('click'); // remove standard click event 568 if (options) 569 { 570 var clone = $(options).clone(); 571 572 // redo some problem fields 573 var option = $(options).find('select[name="mbcustom_network[' + index + ']"]').val(); 574 $(clone).find('select[name="mbcustom_network[' + index + ']"]').val(option); 575 } 576 else 577 { 578 579 var nextdex = 0; 580 $('input[name="mbcustom_index[]"]').each(function() 581 { 582 if ($(this).val() > nextdex) 583 nextdex = $(this).val(); 584 }); // find next index 585 nextdex++; 586 587 var clone = $('.mbcustom-helper .mbcustom-options').clone(); 588 589 // put next index at clone 590 $(clone).find('input, select, label').each(function() { 591 592 if (typeof $(this).attr('name') !== 'undefined') 593 $(this).attr('name', $(this).attr('name').replace(/-1/i, nextdex)); 594 595 if (typeof $(this).attr('id') !== 'undefined') 596 $(this).attr('id', $(this).attr('id').replace(/-1/i, nextdex)); 597 598 if (typeof $(this).attr('for') !== 'undefined') 599 $(this).attr('for', $(this).attr('for').replace(/-1/i, nextdex)); 600 }); 601 602 $(clone).find('input[name="mbcustom_index[]"]').val(nextdex); // put index on the counter 603 index = nextdex; 604 } 605 606 var the_switch = $(clone).find('.switch_button'); 607 $(the_switch).find('label').attr('for', 'mbcustom_usenetwork_active'); 608 $(the_switch).find('input').attr('id', 'mbcustom_usenetwork_active'); 609 610 var url = $(clone).find('input[name="mbcustom_url[' + index + ']"]').val(); 611 var text = $(clone).find('input[name="mbcustom_text[' + index + ']"]').val(); 612 613 $(modal).find('input[name="shortcode_url"]').val(url); 614 $(modal).find('input[name="shortcode_text"]').val(text); 615 616 $(clone).removeClass('hidden'); 617 $(button).before( clone ); // insert the fields 618 619 $(modal).find('input[name="mbcustom_id[' + index +']"]').val(button_id); 620 621 $(modal).on('click','input[name="add_shortcode"]', $.proxy(window.maxFoundry.maxSocial.putMBCustomOptions, window.maxFoundry.maxSocial)); 622 623 window.maxMedia.maxm.checkResize(); 624 625 } 626 627 // Write back custom options back to main editor 628 maxSocial.prototype.putMBCustomOptions = function (event) 629 { 630 var modal = window.maxMedia.maxm.currentModal; 631 632 var url = $(modal).find('input[name="shortcode_url"]').val(); 633 var text = $(modal).find('input[name="shortcode_text"]').val(); 634 635 var options = $(modal).find('.mbcustom-options'); 636 637 var index = $(options).find('input[name="mbcustom_index[]"]').val(); 638 $(options).find('input[name="mbcustom_url[' + index +']"]').val(url); 639 $(options).find('input[name="mbcustom_text[' + index +']"]').val(text); 640 641 var the_switch = $(options).find('.switch_button'); // move back ID 642 $(the_switch).find('label').attr('for', 'mbcustom_usenetwork_' + index); 643 $(the_switch).find('input').attr('id', 'mbcustom_usenetwork_' + index); 644 645 if (options.length > 0) 646 { 647 $(options).addClass('hidden'); 648 if ($(this.mbCustomTarget).find('.mbcustom-options').length > 0) 649 $(this.mbCustomTarget).find('.mbcustom-options').replaceWith(options); 650 else { 651 $(this.mbCustomTarget).append(options); // new entries 652 } 653 } 654 else { 655 656 } 657 658 $('#network_trigger_change').trigger('change'); 659 window.maxMedia.maxm.close(); 660 661 662 } 529 663 530 664 531 if (typeof window.maxFoundry === 'undefined') -
share-button/tags/1.4/js/network-editor.js
r1861103 r1887311 36 36 mbsEditor.prototype.doColorPicker = function() 37 37 { 38 colorPalette = (mbpro_options.colorPalette !== '' ? mbpro_options.colorPalette : true); 39 38 40 // colors 39 41 $('.maxbuttons-social .network_editor .color-field').wpColorPicker( 40 { change: $.proxy( _.throttle(function(event, ui) { 42 { 43 width: 300, 44 palettes: colorPalette, 45 change: $.proxy( _.throttle(function(event, ui) { 41 46 event.preventDefault(); 42 47 var target = $(event.target); -
share-button/tags/1.4/readme.txt
r1876456 r1887311 67 67 == Changelog == 68 68 69 = 1.3.1 = 70 71 = 1.4 = 72 73 * Preview is refreshed when changing icon order 74 * [PRO] Customizable color palette 75 * [PRO] Streamline process for adding maxbuttons 76 * [PRO] Fixed issue with disabled effects 77 * Minimum MaxButtons version - 7.2 78 69 79 = 1.3 = 70 80 -
share-button/tags/1.4/scss/_modals.scss
r1827649 r1887311 16 16 17 17 .modal_close { display: none; } 18 .modal_content { display: none; }18 //.modal_content { display: none; } 19 19 & + .maxmodal_overlay { background-color: #eee; } 20 20 } -
share-button/tags/1.4/share-button.php
r1876456 r1887311 4 4 Plugin URI: http://maxbuttons.com/share-button 5 5 Description: Wordpress Social Share Buttons lets you easily setup Social Share Buttons on your site 6 Version: 1. 36 Version: 1.4 7 7 Author: Max Foundry 8 8 Author URI: http://maxfoundry.com … … 16 16 17 17 define("MBSOCIAL_ROOT_FILE", __FILE__); 18 define('MBSOCIAL_VERSION_NUM', '1. 3');19 define('MBSOCIAL_RELEASE'," 19 Apr2018");20 define('MBSOCIAL_REQUIRED_MB', '7. 1');18 define('MBSOCIAL_VERSION_NUM', '1.4'); 19 define('MBSOCIAL_RELEASE',"5 Jun 2018"); 20 define('MBSOCIAL_REQUIRED_MB', '7.2'); 21 21 22 22 // load runtime. -
share-button/trunk/classes/blocks/effect_block.php
r1827649 r1887311 97 97 $etype->options = $types; 98 98 $etype->selected = $this->getValue($etype->id); 99 $etype->disabled = true; 99 100 100 101 101 $admin->addField($etype, 'start','end'); -
share-button/trunk/classes/blocks/network-block.php
r1876456 r1887311 714 714 { 715 715 ?> 716 <span class='config_button'><button type='button' class='button-primary' data-parent='#maxbuttons' data-callback='window.maxFoundry.maxSocial.selectMBCustomButton' data-nonce="<?php echo wp_create_nonce('maxajax'); ?>"><?php _e('Config', 'mbsocial'); ?></button></span>716 <span class='config_button'><button type='button' class='button-primary' ><?php _e('Config', 'mbsocial'); ?></button></span> 717 717 <?php 718 718 } -
share-button/trunk/classes/class-social.php
r1876456 r1887311 208 208 209 209 if (Install::isPro()) 210 { 210 211 $deps = array('maxbuttons-pro-init','maxbuttons-ajax', 'mb-media-button', 'jquery-ui-sortable'); // pro init 212 wp_register_script('maxbuttons-mbcustom', $this->plugin_url . 'js/maxbuttons-custom.js', $deps, $this->version, true); 213 wp_enqueue_script('maxbuttons-mbcustom'); 214 } 211 215 else 216 { 212 217 $deps = array('maxbutton-js-init', 'maxbuttons-ajax', 'mb-media-button', 'jquery-ui-sortable'); // free init 213 218 } 214 219 wp_register_script('maxbuttons-social', $this->plugin_url . 'js/maxbuttons-social.js', $deps , $this->version, true); 215 220 wp_enqueue_script('maxbuttons-social'); -
share-button/trunk/css/admin.css
r1876456 r1887311 474 474 .max-modal.save_done .modal_close { 475 475 display: none; } 476 .max-modal.save_done .modal_content {477 display: none; }478 476 .max-modal.save_done + .maxmodal_overlay { 479 477 background-color: #eee; } -
share-button/trunk/js/maxbuttons-social.js
r1876456 r1887311 1 jQuery(document).ready(function($) { 1 jQuery(document).ready(function(jq) { 2 $ = jq; 2 3 3 4 var maxSocial = function () { … … 5 6 var form_updated = false; 6 7 var style_changed = false; 7 8 8 var preview_in_view = false; 9 9 } … … 12 12 { 13 13 this.initSortables(); 14 /* This is a repair for media script messing with the position of maxmodal and unsets it somehow */ 15 window.maxFoundry.maxmodal = new maxModal(); 16 window.maxFoundry.maxmodal.init(); 14 15 colorPalette = (mbpro_options.colorPalette !== '' ? mbpro_options.colorPalette : true); 17 16 18 17 $('.maxbuttons-social .color-field').wpColorPicker( 19 { change: $.proxy( _.throttle(function(event, ui) { 18 { 19 width: 300, 20 palettes: colorPalette, 21 change: $.proxy( _.throttle(function(event, ui) { 20 22 event.preventDefault(); 21 23 var target = $(event.target); … … 55 57 56 58 } ,this) ); 57 58 // Custom MB Button config button59 $(document).on('click', '.item .config_button button', $.proxy(this.openMBCustomModal, this));60 59 61 60 // first this, before unhook maxmodal, otherwise this won't work (workaround) … … 144 143 145 144 connectWith: '.drag-area', 146 145 update: function (event, ui) 146 { 147 if ( $(event.target).data('area') == 'active') 148 { 149 $('#network_trigger_change').trigger('change'); 150 $('input[name="network_item_active[]"]').trigger('change'); // for conditionals 151 } 152 }, 147 153 receive: function(event, ui) { 148 154 … … 182 188 } 183 189 184 $('#network_trigger_change').trigger('change');185 $('input[name="network_item_active[]"]').trigger('change'); // for conditionals186 187 190 }, 188 191 … … 519 522 this.form_updated = false; 520 523 521 //console.log(two); console.log(one); console.log(modal);522 524 window.location = url; 523 525 }, this, [modal] ) ); … … 525 527 } 526 528 527 /** Function to open MB Custom selection modal, for custom buttons **/ 528 maxSocial.prototype.openMBCustomModal = function (e) 529 { 530 this.mbCustomTarget = $(e.target).parents('.item'); 531 var self = this; 532 533 var options = $(this.mbCustomTarget).find('.mbcustom-options'); 534 var index = $(this.mbCustomTarget).find('input[name="mbcustom_index[]"]').val(); 535 536 if ( $(options).length > 0) 537 { 538 var button_id = $(options).find('input[name="mbcustom_id[' + index + ']"]').val(); 539 540 if (typeof button_id !== 'undefined' && button_id > 0) 541 { 542 //window.maxMedia.showPostEditScreen(); 543 $(document).off('mb_media_put_results'); 544 $(document).on('mb_media_put_results', function (modal) 545 { 546 button_id = $(options).find('input[name="mbcustom_id[' + index + ']"]').val(); 547 self.selectMBCustomButton(button_id, e, options); 548 $(document).off('mb_media_put_results'); // turn this off to prevent previous results from echoing. 549 }); 550 } 551 } 552 553 window.maxMedia.clickAddButton(e); 554 555 } 556 557 // Select shortcode window, add MB Custom specific fields 558 maxSocial.prototype.selectMBCustomButton = function(button_id, event, options) 559 { 560 options = (typeof options !== 'undefined') ? options : false; 561 var index = $(this.mbCustomTarget).find('input[name="mbcustom_index[]"]').val(); 562 563 window.maxMedia.showShortcodeOptions(button_id, event); 564 565 var modal = window.maxMedia.maxm.currentModal; // find modal 566 var button = $(modal).find('input[name="add_shortcode"]'); 567 $(button).off('click'); // remove standard click event 568 if (options) 569 { 570 var clone = $(options).clone(); 571 572 // redo some problem fields 573 var option = $(options).find('select[name="mbcustom_network[' + index + ']"]').val(); 574 $(clone).find('select[name="mbcustom_network[' + index + ']"]').val(option); 575 } 576 else 577 { 578 579 var nextdex = 0; 580 $('input[name="mbcustom_index[]"]').each(function() 581 { 582 if ($(this).val() > nextdex) 583 nextdex = $(this).val(); 584 }); // find next index 585 nextdex++; 586 587 var clone = $('.mbcustom-helper .mbcustom-options').clone(); 588 589 // put next index at clone 590 $(clone).find('input, select, label').each(function() { 591 592 if (typeof $(this).attr('name') !== 'undefined') 593 $(this).attr('name', $(this).attr('name').replace(/-1/i, nextdex)); 594 595 if (typeof $(this).attr('id') !== 'undefined') 596 $(this).attr('id', $(this).attr('id').replace(/-1/i, nextdex)); 597 598 if (typeof $(this).attr('for') !== 'undefined') 599 $(this).attr('for', $(this).attr('for').replace(/-1/i, nextdex)); 600 }); 601 602 $(clone).find('input[name="mbcustom_index[]"]').val(nextdex); // put index on the counter 603 index = nextdex; 604 } 605 606 var the_switch = $(clone).find('.switch_button'); 607 $(the_switch).find('label').attr('for', 'mbcustom_usenetwork_active'); 608 $(the_switch).find('input').attr('id', 'mbcustom_usenetwork_active'); 609 610 var url = $(clone).find('input[name="mbcustom_url[' + index + ']"]').val(); 611 var text = $(clone).find('input[name="mbcustom_text[' + index + ']"]').val(); 612 613 $(modal).find('input[name="shortcode_url"]').val(url); 614 $(modal).find('input[name="shortcode_text"]').val(text); 615 616 $(clone).removeClass('hidden'); 617 $(button).before( clone ); // insert the fields 618 619 $(modal).find('input[name="mbcustom_id[' + index +']"]').val(button_id); 620 621 $(modal).on('click','input[name="add_shortcode"]', $.proxy(window.maxFoundry.maxSocial.putMBCustomOptions, window.maxFoundry.maxSocial)); 622 623 window.maxMedia.maxm.checkResize(); 624 625 } 626 627 // Write back custom options back to main editor 628 maxSocial.prototype.putMBCustomOptions = function (event) 629 { 630 var modal = window.maxMedia.maxm.currentModal; 631 632 var url = $(modal).find('input[name="shortcode_url"]').val(); 633 var text = $(modal).find('input[name="shortcode_text"]').val(); 634 635 var options = $(modal).find('.mbcustom-options'); 636 637 var index = $(options).find('input[name="mbcustom_index[]"]').val(); 638 $(options).find('input[name="mbcustom_url[' + index +']"]').val(url); 639 $(options).find('input[name="mbcustom_text[' + index +']"]').val(text); 640 641 var the_switch = $(options).find('.switch_button'); // move back ID 642 $(the_switch).find('label').attr('for', 'mbcustom_usenetwork_' + index); 643 $(the_switch).find('input').attr('id', 'mbcustom_usenetwork_' + index); 644 645 if (options.length > 0) 646 { 647 $(options).addClass('hidden'); 648 if ($(this.mbCustomTarget).find('.mbcustom-options').length > 0) 649 $(this.mbCustomTarget).find('.mbcustom-options').replaceWith(options); 650 else { 651 $(this.mbCustomTarget).append(options); // new entries 652 } 653 } 654 else { 655 656 } 657 658 $('#network_trigger_change').trigger('change'); 659 window.maxMedia.maxm.close(); 660 661 662 } 529 663 530 664 531 if (typeof window.maxFoundry === 'undefined') -
share-button/trunk/js/network-editor.js
r1861103 r1887311 36 36 mbsEditor.prototype.doColorPicker = function() 37 37 { 38 colorPalette = (mbpro_options.colorPalette !== '' ? mbpro_options.colorPalette : true); 39 38 40 // colors 39 41 $('.maxbuttons-social .network_editor .color-field').wpColorPicker( 40 { change: $.proxy( _.throttle(function(event, ui) { 42 { 43 width: 300, 44 palettes: colorPalette, 45 change: $.proxy( _.throttle(function(event, ui) { 41 46 event.preventDefault(); 42 47 var target = $(event.target); -
share-button/trunk/readme.txt
r1876456 r1887311 67 67 == Changelog == 68 68 69 = 1.3.1 = 70 71 = 1.4 = 72 73 * Preview is refreshed when changing icon order 74 * [PRO] Customizable color palette 75 * [PRO] Streamline process for adding maxbuttons 76 * [PRO] Fixed issue with disabled effects 77 * Minimum MaxButtons version - 7.2 78 69 79 = 1.3 = 70 80 -
share-button/trunk/scss/_modals.scss
r1827649 r1887311 16 16 17 17 .modal_close { display: none; } 18 .modal_content { display: none; }18 //.modal_content { display: none; } 19 19 & + .maxmodal_overlay { background-color: #eee; } 20 20 } -
share-button/trunk/share-button.php
r1876456 r1887311 4 4 Plugin URI: http://maxbuttons.com/share-button 5 5 Description: Wordpress Social Share Buttons lets you easily setup Social Share Buttons on your site 6 Version: 1. 36 Version: 1.4 7 7 Author: Max Foundry 8 8 Author URI: http://maxfoundry.com … … 16 16 17 17 define("MBSOCIAL_ROOT_FILE", __FILE__); 18 define('MBSOCIAL_VERSION_NUM', '1. 3');19 define('MBSOCIAL_RELEASE'," 19 Apr2018");20 define('MBSOCIAL_REQUIRED_MB', '7. 1');18 define('MBSOCIAL_VERSION_NUM', '1.4'); 19 define('MBSOCIAL_RELEASE',"5 Jun 2018"); 20 define('MBSOCIAL_REQUIRED_MB', '7.2'); 21 21 22 22 // load runtime.
Note: See TracChangeset
for help on using the changeset viewer.