diff --git a/dist/jquery.webhook-redactor.js b/dist/jquery.webhook-redactor.js
index a1c7dcf..6fd1204 100644
--- a/dist/jquery.webhook-redactor.js
+++ b/dist/jquery.webhook-redactor.js
@@ -1,6 +1,6 @@
-/*! webhook-redactor - v0.0.1 - 2015-01-12
+/*! webhook-redactor - v0.0.1 - 2016-03-29
* https://github.com/webhook/webhook-redactor
-* Copyright (c) 2015 Mike Horn; Licensed MIT */
+* Copyright (c) 2016 Mike Horn; Licensed MIT */
(function ($) {
'use strict';
@@ -734,10 +734,11 @@
right : { classSuffix: 'arrow-right' },
small : { classSuffix: 'small', text: 'S' },
medium : { classSuffix: 'medium', text: 'M' },
+ large : { classSuffix: 'large', text: 'L' },
resize_full : { classSuffix: 'resize-full' },
resize_small: { classSuffix: 'resize-small' }
},
- controlGroup: ['left', 'up', 'down', 'right', '|', 'small', 'medium', 'resize_full', 'resize_small', 'remove'],
+ controlGroup: ['left', 'up', 'down', 'right', '|', 'small', 'medium', 'large', 'resize_full', 'resize_small', 'remove'],
init: function () {
this.redactor.$editor.on('focus', $.proxy(this.addCaptions, this));
// this.addCaptions();
@@ -771,6 +772,7 @@
if ($figure.hasClass('wy-figure-small')) {
$toolbar.find('.wy-figure-controls-small').show().addClass('on');
$toolbar.find('.wy-figure-controls-medium').show();
+ $toolbar.find('.wy-figure-controls-large').show();
$toolbar.find('.wy-figure-controls-resize-full').show();
$toolbar.find('.wy-figure-controls-resize-small').hide();
}
@@ -778,6 +780,15 @@
else if ($figure.hasClass('wy-figure-medium')) {
$toolbar.find('.wy-figure-controls-small').show();
$toolbar.find('.wy-figure-controls-medium').show().addClass('on');
+ $toolbar.find('.wy-figure-controls-large').show();
+ $toolbar.find('.wy-figure-controls-resize-full').show();
+ $toolbar.find('.wy-figure-controls-resize-small').hide();
+ }
+
+ else if ($figure.hasClass('wy-figure-large')) {
+ $toolbar.find('.wy-figure-controls-small').show();
+ $toolbar.find('.wy-figure-controls-medium').show();
+ $toolbar.find('.wy-figure-controls-large').show().addClass('on');
$toolbar.find('.wy-figure-controls-resize-full').show();
$toolbar.find('.wy-figure-controls-resize-small').hide();
}
@@ -825,7 +836,8 @@
case 'small':
case 'medium':
- changeSuffix(['small', 'medium', 'large'], [command]);
+ case 'large':
+ changeSuffix(['small', 'medium', 'large', 'full'], [command]);
if (!$figure.hasClass('wy-figure-left') && !$figure.hasClass('wy-figure-right')) {
$figure.addClass('wy-figure-left');
$figure.trigger('left');
@@ -833,11 +845,11 @@
break;
case 'resize_full':
- changeSuffix(['small', 'medium', 'left', 'right'], ['large']);
+ changeSuffix(['small', 'medium', 'large', 'left', 'right'], ['full']);
break;
case 'resize_small':
- changeSuffix(['small', 'large', 'right'], ['medium', 'left']);
+ changeSuffix(['small', 'medium', 'full', 'right'], ['large', 'left']);
break;
}
diff --git a/dist/jquery.webhook-redactor.min.js b/dist/jquery.webhook-redactor.min.js
index 6bfb65c..bce5ab9 100644
--- a/dist/jquery.webhook-redactor.min.js
+++ b/dist/jquery.webhook-redactor.min.js
@@ -1,4 +1,4 @@
-/*! webhook-redactor - v0.0.1 - 2015-01-12
+/*! webhook-redactor - v0.0.1 - 2016-03-29
* https://github.com/webhook/webhook-redactor
-* Copyright (c) 2015 Mike Horn; Licensed MIT */
-!function(a){"use strict";window.RedactorPlugins=window.RedactorPlugins||{},a.embedly.defaults.key="65874c90af644c6a8f0b7072fe857811",a.embedly.defaults.query={maxwidth:640};var b=function(a){this.redactor=a,this.$editor=a.$editor,this.observe()};b.prototype={urlRegex:/((http:\/\/(.*youtube\.com\/watch.*|.*\.youtube\.com\/v\/.*|youtu\.be\/.*|.*\.youtube\.com\/user\/.*|.*\.youtube\.com\/.*#.*\/.*|m\.youtube\.com\/watch.*|m\.youtube\.com\/index.*|.*\.youtube\.com\/profile.*|.*\.youtube\.com\/view_play_list.*|.*\.youtube\.com\/playlist.*|www\.vimeo\.com\/groups\/.*\/videos\/.*|www\.vimeo\.com\/.*|vimeo\.com\/groups\/.*\/videos\/.*|vimeo\.com\/.*|vimeo\.com\/m\/#\/.*|player\.vimeo\.com\/.*))|(https:\/\/(.*youtube\.com\/watch.*|.*\.youtube\.com\/v\/.*|www\.vimeo\.com\/.*|vimeo\.com\/.*|player\.vimeo\.com\/.*)))/i,observe:function(){this.redactor.$editor.on("keyup.redactor",a.proxy(function(a){a.which===this.redactor.keyCode.ENTER&&this.checkNode(this.redactor.$editor.get(0))},this))},checkNode:function(b){return a.each(b.childNodes,a.proxy(function(b,c){if(3===c.nodeType&&c.nodeValue&&this.urlRegex.test(c.nodeValue)){this.redactor.buffer.set();var d=c.nodeValue.match(this.urlRegex)[0],e=a("loading embed...");c.nodeValue=c.nodeValue.replace(this.urlRegex,""),a(c).parentsUntil(this.$editor).last().after(e),a.embedly.oembed(d).done(function(b){a.each(b,function(){e.replaceWith(this.html?'
").text(d))})})}else 1!==c.nodeType||/^(a|button|textarea)$/i.test(c.tagName)||this.checkNode(c)},this)),this.matches}},window.RedactorPlugins.autoembedly=function(){return{init:function(){this.autoembedly=new b(this)}}}}(jQuery),function(a){"use strict";window.RedactorPlugins||(window.RedactorPlugins={});var b=function(a){this.redactor=a,this.$editor=a.$editor,this.init()};b.prototype={getTemplate:function(){return String()+''},init:function(){var b=this.redactor.button.addBefore("html","embed","Insert Embed Code"),c=this.redactor.button.get("embed");c.removeClass("redactor-btn-image").addClass("fa-redactor-btn"),c.html(''),this.redactor.button.addCallback(b,a.proxy(this.show,this))},show:function(){this.redactor.modal.addTemplate("insert-embed",this.getTemplate()),this.redactor.modal.addCallback("insert-embed",a.proxy(function(){this.redactor.selection.save(),setTimeout(function(){a("#embed-code-textarea").focus()},200)},this)),this.redactor.modal.load("insert-embed","Insert Embed",500),this.redactor.modal.createCancelButton();var b=this.redactor.modal.createActionButton("Insert");b.on("click",a.proxy(this.insert,this)),this.redactor.modal.show()},insert:function(){var b=a("#embed-code-textarea").val();this.redactor.modal.close(),this.redactor.selection.restore(),this.redactor.insert.html('
"),this.redactor.caret.setEnd(b.target),b.stopPropagation()},this)),a(window).on("click",a.proxy(this.cleanCaptions,this)),this.redactor.$editor.on("blur",a.proxy(this.cleanCaptions,this)),this.redactor.$editor.closest("form").one("submit",a.proxy(this.clearCaptions,this)),this.redactor.$editor.on("keydown",a.proxy(function(b){var c=a(this.redactor.selection.getCurrent()),d=!c.text().length,e=!!a(c).closest("figcaption, cite").length,f=a.inArray(b.keyCode,[this.redactor.keyCode.BACKSPACE,this.redactor.keyCode.DELETE])>=0;d&&f&&e&&b.preventDefault()},this))},cleanCaptions:function(){this.redactor.$editor.find("figcaption, cite").filter(function(){return!a(this).text()}).empty()},clearCaptions:function(){this.redactor.$editor.find("figcaption, cite").filter(function(){return!a(this).text()}).remove(),this.redactor.opts.visual&&this.redactor.code.sync()},showToolbar:function(b){var c=a(b.currentTarget),d=c.data("type")||"default";"image"===d&&(d="webhookImage");var e=this.getToolbar(d).data("figure",c).prependTo(c);this.redactor[d]&&this.redactor[d].onShow&&this.redactor[d].onShow(c,e)},hideToolbar:function(b){a(b.currentTarget).find(".wy-figure-controls").appendTo(this.redactor.$box)},observeToolbars:function(){this.redactor.$editor.on("mousedown",".wy-figure-controls",a.proxy(function(){event.preventDefault(),this.current=this.redactor.selection.getCurrent()},this)),this.redactor.$editor.on("click",".wy-figure-controls span, .wy-figure-controls a",a.proxy(function(b){b.stopPropagation();var c=a(b.currentTarget),d=c.data("command"),e=c.closest("figure"),f=e.data("type");"image"===f&&(f="webhookImage");var g=this.redactor[f];this.command(d,e,g)},this)),this.redactor.$editor.on("keydown",function(){a(this).find("figure").trigger("mouseleave")}),this.redactor.utils.isMobile()?(this.redactor.$editor.on("touchstart","figure",function(b){"FIGCAPTION"!==b.target.nodeName&&a(b.target).parents(".wy-figure-controls").length&&a(this).trigger("click",b)}),this.redactor.$editor.on("click","figure",a.proxy(function(a){"FIGCAPTION"!==a.target.nodeName&&this.redactor.$editor.trigger("blur"),this.showToolbar(a)},this))):(this.redactor.$editor.on("mouseenter","figure",a.proxy(this.showToolbar,this)),this.redactor.$editor.on("mouseleave","figure",a.proxy(this.hideToolbar,this)))},getToolbar:function(b){if(this.toolbar[b])return this.toolbar[b];var c=this.redactor[b]&&this.redactor[b].controlGroup||this.controlGroup,d=a.extend({},this.control,this.redactor[b]&&this.redactor[b].control||{}),e=this.buildControls(c,d),f=a('