Version Description
- JS error Fix for IE9
Download this release
Release Info
Developer | DesignsAndCode |
Plugin | Forget About Shortcode Buttons |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.0.1
- assets/js/fasc-buttons/popup.js +1 -1
- assets/js/fasc-buttons/scripts.js +1 -1
- forget-about-shortcode-buttons.php +2 -2
- readme.txt +12 -7
assets/js/fasc-buttons/popup.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function getButton(){var e=jQuery("#button-dialog input#button-url").val();var t=jQuery("#button-dialog input#button-text").val();var n=jQuery("#button-dialog select#button-size").val();var r=jQuery("#button-dialog input#button-color").val();var i=jQuery("#button-dialog input#text-color").val();var s=jQuery("#button-dialog select#button-type").val();var o=jQuery("#button-dialog select#button-align").val();var u=jQuery("#button-dialog input#new-window").prop("checked");var a="";var f="";var l="";var c="";var h="";var p="";var d="";if(u==true){p=' target="_blank"'}if(s){if(s!=""){l=" "+s}}if(n){if(n!=""){c=" "+n}}var v=$("#tab-2-content .ico-grid div.active");var m="";var g="";if(v.length==1){var y=v.attr("class").split(" ");for(var b=0;b<y.length;b++){if(y[b]!="dashicons"&&y[b]!="active"){m=" fasc-ico "+y[b];g=' data-icon-class="'+y[b]+'"'}}}var w='<a href="'+e+'" class="fasc-button'+c+l+m+'"'+p+g+' data-size="'+n+'" data-type="'+s+'" style="background-color:'+r+";color:"+i+';" data-fasc-style="background-color:'+r+";color:"+i+';">'+t+"</a>";return w}function rgb2hex(e){if(e.search("rgb")==-1){return e}else{e=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+))?\)$/);function t(e){return("0"+parseInt(e).toString(16)).slice(-2)}return"#"+t(e[1])+t(e[2])+t(e[3])}}var $currentNode=null;(function(e){e(function(){e("#tab-header a").click(function(){$this=e(this);var t=$this.attr("href");$this.parent().parent().find("li").removeClass("active");$this.parent().addClass("active");e("#button-dialog .fasc-tab-content").hide();e("#button-dialog "+t).show();return false});e("#tab-2-content .ico-grid div").click(function(t){t.preventDefault();e("#tab-2-content .ico-grid div").removeClass("active");e(this).addClass("active");$previewButton.html(getButton());e("#tab-2-content .fasc-ico-position").removeAttr("checked");e('#tab-2-content .fasc-ico-position[value="before"]').prop("checked",true);return false});e("#tab-2-content .fasc-ico-position").change(function(t){if(e(this).val()=="none"){e("#tab-2-content .ico-grid div").removeClass("active")}else if(e(this).val()=="before"){var n=e("#tab-2-content .ico-grid div.active");if(n.length==1){}else{e(e("#tab-2-content .ico-grid > div").get(0)).addClass("active")}}$previewButton.html(getButton())});$previewButton=jQuery(".preview-button-area .centered-button");e('#button-dialog select, #button-dialog input[type="checkbox"]').change(function(){$previewButton.html(getButton())});e('#button-dialog input[type="text"]').keyup(function(){$previewButton.html(getButton())});e('#button-dialog input[type="text"]').keyup(function(){$previewButton.html(getButton())});$previewButton.html(getButton())})})(window.jQuery);var ButtonDialog={local_ed:"ed",init:function(e){ButtonDialog.local_ed=e;tinyMCEPopup.resizeToInnerSize();var t=top.tinymce.activeEditor.windowManager.getParams();$currentNode=t.target;if(source=="click"){var n="";var r=$currentNode.attr("href");jQuery("#button-dialog input#button-url").val(r);var i=$currentNode.attr("target");if(typeof i!="undefined"){if(i=="_blank"){jQuery("#button-dialog input#new-window").prop("checked",true)}}var s=$currentNode.text();jQuery("#button-dialog input#button-text").val(s);if($currentNode.is("[data-icon-class]")){var o=$currentNode.attr("data-icon-class");jQuery(".ico-grid ."+o).addClass("active");$('#tab-2-content .fasc-ico-position[value="before"]').attr("checked","checked")}var u=$currentNode.attr("data-size");jQuery("#button-size option").removeAttr("selected");jQuery('#button-size option[value="'+u+'"]').attr("selected","selected");var a=$currentNode.attr("data-type");jQuery("#button-type option").removeAttr("selected");jQuery('#button-type option[value="'+a+'"]').attr("selected","selected");var f=rgb2hex($currentNode.css("color"));jQuery("#text-color").val(f);var l=rgb2hex($currentNode.css("background-color"));jQuery("#button-color").val(l)}else{var s=e.selection.getContent();jQuery("#button-dialog input#button-text").val(s)}$previewButton=jQuery(".preview-button-area .centered-button");$previewButton.html(getButton());$("#button-color, #text-color").minicolors({position:"top left",change:function(e,t){$previewButton.html(getButton())}})},insert:function(t){if(source=="click"){
|
1 |
+
function getButton(){var e=jQuery("#button-dialog input#button-url").val();var t=jQuery("#button-dialog input#button-text").val();var n=jQuery("#button-dialog select#button-size").val();var r=jQuery("#button-dialog input#button-color").val();var i=jQuery("#button-dialog input#text-color").val();var s=jQuery("#button-dialog select#button-type").val();var o=jQuery("#button-dialog select#button-align").val();var u=jQuery("#button-dialog input#new-window").prop("checked");var a="";var f="";var l="";var c="";var h="";var p="";var d="";if(u==true){p=' target="_blank"'}if(s){if(s!=""){l=" "+s}}if(n){if(n!=""){c=" "+n}}var v=$("#tab-2-content .ico-grid div.active");var m="";var g="";if(v.length==1){var y=v.attr("class").split(" ");for(var b=0;b<y.length;b++){if(y[b]!="dashicons"&&y[b]!="active"){m=" fasc-ico "+y[b];g=' data-icon-class="'+y[b]+'"'}}}var w='<a href="'+e+'" class="fasc-button'+c+l+m+'"'+p+g+' data-size="'+n+'" data-type="'+s+'" style="background-color:'+r+";color:"+i+';" data-fasc-style="background-color:'+r+";color:"+i+';">'+t+"</a>";return w}function rgb2hex(e){if(e.search("rgb")==-1){return e}else{e=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+))?\)$/);function t(e){return("0"+parseInt(e).toString(16)).slice(-2)}return"#"+t(e[1])+t(e[2])+t(e[3])}}var $currentNode=null;(function(e){e(function(){e("#tab-header a").click(function(){$this=e(this);var t=$this.attr("href");$this.parent().parent().find("li").removeClass("active");$this.parent().addClass("active");e("#button-dialog .fasc-tab-content").hide();e("#button-dialog "+t).show();return false});e("#tab-2-content .ico-grid div").click(function(t){t.preventDefault();e("#tab-2-content .ico-grid div").removeClass("active");e(this).addClass("active");$previewButton.html(getButton());e("#tab-2-content .fasc-ico-position").removeAttr("checked");e('#tab-2-content .fasc-ico-position[value="before"]').prop("checked",true);return false});e("#tab-2-content .fasc-ico-position").change(function(t){if(e(this).val()=="none"){e("#tab-2-content .ico-grid div").removeClass("active")}else if(e(this).val()=="before"){var n=e("#tab-2-content .ico-grid div.active");if(n.length==1){}else{e(e("#tab-2-content .ico-grid > div").get(0)).addClass("active")}}$previewButton.html(getButton())});$previewButton=jQuery(".preview-button-area .centered-button");e('#button-dialog select, #button-dialog input[type="checkbox"]').change(function(){$previewButton.html(getButton())});e('#button-dialog input[type="text"]').keyup(function(){$previewButton.html(getButton())});e('#button-dialog input[type="text"]').keyup(function(){$previewButton.html(getButton())});$previewButton.html(getButton())})})(window.jQuery);var ButtonDialog={local_ed:"ed",init:function(e){ButtonDialog.local_ed=e;tinyMCEPopup.resizeToInnerSize();var t=top.tinymce.activeEditor.windowManager.getParams();$currentNode=t.target;if(source=="click"){var n="";var r=$currentNode.attr("href");jQuery("#button-dialog input#button-url").val(r);var i=$currentNode.attr("target");if(typeof i!="undefined"){if(i=="_blank"){jQuery("#button-dialog input#new-window").prop("checked",true)}}var s=$currentNode.text();jQuery("#button-dialog input#button-text").val(s);if($currentNode.is("[data-icon-class]")){var o=$currentNode.attr("data-icon-class");jQuery(".ico-grid ."+o).addClass("active");$('#tab-2-content .fasc-ico-position[value="before"]').attr("checked","checked")}var u=$currentNode.attr("data-size");jQuery("#button-size option").removeAttr("selected");jQuery('#button-size option[value="'+u+'"]').attr("selected","selected");var a=$currentNode.attr("data-type");jQuery("#button-type option").removeAttr("selected");jQuery('#button-type option[value="'+a+'"]').attr("selected","selected");var f=rgb2hex($currentNode.css("color"));jQuery("#text-color").val(f);var l=rgb2hex($currentNode.css("background-color"));jQuery("#button-color").val(l)}else{var s=e.selection.getContent();jQuery("#button-dialog input#button-text").val(s)}$previewButton=jQuery(".preview-button-area .centered-button");$previewButton.html(getButton());$("#button-color, #text-color").minicolors({position:"top left",change:function(e,t){$previewButton.html(getButton())}})},insert:function(t){if(source=="click"){var n=t.selection.getNode();t.selection.select(n)}tinyMCEPopup.execCommand("mceReplaceContent",false,getButton());tinyMCEPopup.close()}};tinyMCEPopup.onInit.add(ButtonDialog.init,ButtonDialog)
|
assets/js/fasc-buttons/scripts.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(function(e){"use strict";e(function(){tinymce.create("tinymce.plugins.fascbuttons",{init:function(t,n){function r(){var e=tinymce.activeEditor.dom.select(".fasc-button");var n=false;jQuery(e).each(function(){if(jQuery(this).is("[data-fasc-style]")){var e=jQuery(this).attr("data-fasc-style").replace(/\s+/,"");var r="";if(jQuery(this).is("[style]")){r=jQuery(this).attr("style").replace(/\s+/,"")}if(e!=r){jQuery(this).attr("style",jQuery(this).attr("data-fasc-style"));t.nodeChanged();n=true}}});if(n==true){t.undoManager.removeLevel()}}function i(){var t=tinymce.activeEditor.dom.select(".fasc-button");jQuery(t).each(function(){if(jQuery(this).is("[data-fasc-style]")){var t=tinymce.activeEditor.dom.parseStyle(jQuery(this).attr("data-fasc-style"));var n=tinymce.activeEditor.dom.parseStyle(jQuery(this).attr("style"));if(e(t).not(n).length==0&&e(n).not(t).length==0){}else{}}})}var s=t;var o=false;var u={};var a=520;var f=420;if(tinymce.majorVersion<4){alert("FASC Buttons only work with WordPress 3.9 and above. Please update your WordPress installation")}t.addButton("fascbuttons",{icon:"fascbutton-ico",tooltip:"Insert Button",onclick:function(){t.windowManager.open({url:n+"/popup.php?source=insert",width:f,height:a},{plugin_url:n})}});t.
|
1 |
+
(function(e){"use strict";e(function(){tinymce.create("tinymce.plugins.fascbuttons",{init:function(t,n){function r(){var e=tinymce.activeEditor.dom.select(".fasc-button");var n=false;jQuery(e).each(function(){if(jQuery(this).is("[data-fasc-style]")){var e=jQuery(this).attr("data-fasc-style").replace(/\s+/,"");var r="";if(jQuery(this).is("[style]")){r=jQuery(this).attr("style").replace(/\s+/,"")}if(e!=r){jQuery(this).attr("style",jQuery(this).attr("data-fasc-style"));t.nodeChanged();n=true}}});if(n==true){t.undoManager.removeLevel()}}function i(){var t=tinymce.activeEditor.dom.select(".fasc-button");jQuery(t).each(function(){if(jQuery(this).is("[data-fasc-style]")){var t=tinymce.activeEditor.dom.parseStyle(jQuery(this).attr("data-fasc-style"));var n=tinymce.activeEditor.dom.parseStyle(jQuery(this).attr("style"));if(e(t).not(n).length==0&&e(n).not(t).length==0){}else{}}})}var s=t;var o=false;var u={};var a=520;var f=420;if(tinymce.majorVersion<4){alert("FASC Buttons only work with WordPress 3.9 and above. Please update your WordPress installation")}t.addButton("fascbuttons",{icon:"fascbutton-ico",tooltip:"Insert Button",onclick:function(){t.windowManager.open({url:n+"/popup.php?source=insert",width:f,height:a},{plugin_url:n})}});t.on("change",function(e){r()});t.onInit.add(function(e){e.undoManager.onAdd.add(function(e,t){});e.undoManager.removeLevel=function(){if(this.data.length>1){this.data.splice(this.data.length-1,1)}}});t.on("undo",function(e,t){i()});t.on("redo",function(e){});t.on("dblClick",function(e){if(jQuery(e.target).hasClass("fasc-button")){t.selection.select(e.toElement);t.windowManager.open({url:n+"/popup.php?source=click",width:f,height:a},{plugin_url:n,target:jQuery(e.target)})}});t.on("click",function(e,t){});t.on("keyDown",function(e,t){})},createControl:function(e,t){return null},getInfo:function(){return{longname:"Forget About Shortcodes Buttons",author:"Ross Morsali",authorurl:"http://www.designsandcode.com/",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("fascbuttons",tinymce.plugins.fascbuttons)})})(jQuery)
|
forget-about-shortcode-buttons.php
CHANGED
@@ -6,7 +6,7 @@ Description: A visual way to add buttons in the post editor screen.
|
|
6 |
Author: Designs & Code
|
7 |
Author URI: http://www.designsandcode.com/
|
8 |
License: GPL v3
|
9 |
-
Version: 1.0.
|
10 |
Text Domain: fascbuttons
|
11 |
*/
|
12 |
|
@@ -14,7 +14,7 @@ Text Domain: fascbuttons
|
|
14 |
* Set up Plugin Globals
|
15 |
*/
|
16 |
if (!defined('FASC_BUTTONS_VERSION_NUM'))
|
17 |
-
define('FASC_BUTTONS_VERSION_NUM', '1.0.
|
18 |
|
19 |
if (!defined('PLUGIN_SLUG'))
|
20 |
define('PLUGIN_SLUG', 'fasc-buttons');
|
6 |
Author: Designs & Code
|
7 |
Author URI: http://www.designsandcode.com/
|
8 |
License: GPL v3
|
9 |
+
Version: 1.0.1
|
10 |
Text Domain: fascbuttons
|
11 |
*/
|
12 |
|
14 |
* Set up Plugin Globals
|
15 |
*/
|
16 |
if (!defined('FASC_BUTTONS_VERSION_NUM'))
|
17 |
+
define('FASC_BUTTONS_VERSION_NUM', '1.0.1');
|
18 |
|
19 |
if (!defined('PLUGIN_SLUG'))
|
20 |
define('PLUGIN_SLUG', 'fasc-buttons');
|
readme.txt
CHANGED
@@ -4,15 +4,15 @@ Donate link:
|
|
4 |
Tags: button, shortcode, edit, buttons, wysiwyg, post editor, tinymce, shortcodes, button editor
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 3.9
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
A visual way to add buttons in the post editor screen.
|
12 |
|
13 |
== Installation ==
|
14 |
|
15 |
-
1. Upload the entire `
|
16 |
1. Activate the plugin through the 'Plugins' menu in WordPress.
|
17 |
|
18 |
For basic usage, you can also have a look at the [plugin homepage](http://www.designsandcode.com/551/wordpress-forget-about-shortcode-buttons/).
|
@@ -25,13 +25,16 @@ For basic usage, you can also have a look at the [plugin homepage](http://www.de
|
|
25 |
|
26 |
1. Some of the buttons you can create in the Post Editor
|
27 |
2. Edit button properties popup
|
28 |
-
3. Add an icon to your
|
29 |
-
4. Buttons on the
|
30 |
|
31 |
|
32 |
== Changelog ==
|
33 |
|
34 |
-
= 1.0.
|
|
|
|
|
|
|
35 |
* Initial Release
|
36 |
|
37 |
== Upgrade Notice ==
|
@@ -42,7 +45,7 @@ For basic usage, you can also have a look at the [plugin homepage](http://www.de
|
|
42 |
|
43 |
**This plugin is only compatible with WordPress 3.9 and upwards**
|
44 |
|
45 |
-
Forget About Shortcode (FASC) Buttons are a visual way to add buttons in the post editor screen. Instead of adding shortcodes in the post editor, you insert real, styled buttons - making the process of adding buttons to your posts and pages much more natural whilst improving the appearance and usability of the post editor.
|
46 |
|
47 |
https://www.youtube.com/watch?v=BA9ruSe-i1A
|
48 |
|
@@ -50,6 +53,8 @@ FASC Buttons tries to be as clean as possible with the html, only using data att
|
|
50 |
|
51 |
Editing a button couldn't be easier - just double click a button and an options panel appears allowing you to completely reconfigure the current button - beats tedious shortcodes and using precise syntax!
|
52 |
|
|
|
|
|
53 |
Includes Dashicons to add to your buttons and use in your themes.
|
54 |
|
55 |
= Links =
|
4 |
Tags: button, shortcode, edit, buttons, wysiwyg, post editor, tinymce, shortcodes, button editor
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 3.9
|
7 |
+
Stable tag: 1.0.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
A visual way to add buttons in the post editor screen and to your themes.
|
12 |
|
13 |
== Installation ==
|
14 |
|
15 |
+
1. Upload the entire `forget-about-shortcode-buttons` folder to the `/wp-content/plugins/` directory.
|
16 |
1. Activate the plugin through the 'Plugins' menu in WordPress.
|
17 |
|
18 |
For basic usage, you can also have a look at the [plugin homepage](http://www.designsandcode.com/551/wordpress-forget-about-shortcode-buttons/).
|
25 |
|
26 |
1. Some of the buttons you can create in the Post Editor
|
27 |
2. Edit button properties popup
|
28 |
+
3. Add an icon to your button
|
29 |
+
4. Buttons on the frontend in the WP 2014 theme
|
30 |
|
31 |
|
32 |
== Changelog ==
|
33 |
|
34 |
+
= 1.0.1 =
|
35 |
+
* JS error Fix for IE9
|
36 |
+
|
37 |
+
= 1.0.1 =
|
38 |
* Initial Release
|
39 |
|
40 |
== Upgrade Notice ==
|
45 |
|
46 |
**This plugin is only compatible with WordPress 3.9 and upwards**
|
47 |
|
48 |
+
Forget About Shortcode (FASC) Buttons are a visual way to add CSS buttons in the post editor screen and to your themes. Instead of adding shortcodes in the post editor, you insert real, styled buttons - making the process of adding buttons to your posts and pages much more natural whilst improving the appearance and usability of the post editor.
|
49 |
|
50 |
https://www.youtube.com/watch?v=BA9ruSe-i1A
|
51 |
|
53 |
|
54 |
Editing a button couldn't be easier - just double click a button and an options panel appears allowing you to completely reconfigure the current button - beats tedious shortcodes and using precise syntax!
|
55 |
|
56 |
+
Utilises the latest CSS properties for styling
|
57 |
+
|
58 |
Includes Dashicons to add to your buttons and use in your themes.
|
59 |
|
60 |
= Links =
|