From 8d0f2ec1c7d7c23dd71c3643e9a798d384b4c1b4 Mon Sep 17 00:00:00 2001 From: Stefan Neculai Date: Fri, 22 Apr 2016 18:26:04 +0300 Subject: [PATCH] Update to V2.2.4. --- .../froala_editor/css/froala_editor.min.css | 2 +- .../froala_editor/css/froala_style.min.css | 2 +- .../css/plugins/char_counter.min.css | 2 +- .../css/plugins/code_view.min.css | 2 +- .../froala_editor/css/plugins/colors.min.css | 2 +- .../css/plugins/draggable.min.css | 2 +- .../css/plugins/emoticons.min.css | 2 +- .../froala_editor/css/plugins/file.min.css | 2 +- .../css/plugins/fullscreen.min.css | 2 +- .../froala_editor/css/plugins/image.min.css | 2 +- .../css/plugins/image_manager.min.css | 2 +- .../css/plugins/line_breaker.min.css | 2 +- .../css/plugins/quick_insert.min.css | 2 +- .../froala_editor/css/plugins/table.min.css | 2 +- .../froala_editor/css/plugins/video.min.css | 2 +- .../froala_editor/css/themes/dark.min.css | 2 +- .../froala_editor/css/themes/gray.min.css | 2 +- .../froala_editor/css/themes/red.min.css | 2 +- .../froala_editor/css/themes/royal.min.css | 2 +- .../froala_editor/js/froala_editor.min.js | 12 ++++----- .../static/froala_editor/js/languages/ar.js | 7 ++++-- .../static/froala_editor/js/languages/bs.js | 7 ++++-- .../static/froala_editor/js/languages/cs.js | 7 ++++-- .../static/froala_editor/js/languages/da.js | 7 ++++-- .../static/froala_editor/js/languages/de.js | 25 +++++++++++-------- .../froala_editor/js/languages/en_ca.js | 7 ++++-- .../froala_editor/js/languages/en_gb.js | 7 ++++-- .../static/froala_editor/js/languages/es.js | 9 ++++--- .../static/froala_editor/js/languages/et.js | 7 ++++-- .../static/froala_editor/js/languages/fa.js | 7 ++++-- .../static/froala_editor/js/languages/fi.js | 9 ++++--- .../static/froala_editor/js/languages/fr.js | 7 ++++-- .../static/froala_editor/js/languages/he.js | 7 ++++-- .../static/froala_editor/js/languages/hr.js | 9 ++++--- .../static/froala_editor/js/languages/hu.js | 7 ++++-- .../static/froala_editor/js/languages/id.js | 8 ++++-- .../static/froala_editor/js/languages/it.js | 9 ++++--- .../static/froala_editor/js/languages/ja.js | 7 ++++-- .../static/froala_editor/js/languages/ko.js | 7 ++++-- .../static/froala_editor/js/languages/me.js | 7 ++++-- .../static/froala_editor/js/languages/nb.js | 9 ++++--- .../static/froala_editor/js/languages/nl.js | 9 ++++--- .../static/froala_editor/js/languages/pl.js | 7 ++++-- .../froala_editor/js/languages/pt_br.js | 9 ++++--- .../froala_editor/js/languages/pt_pt.js | 7 ++++-- .../static/froala_editor/js/languages/ro.js | 9 ++++--- .../static/froala_editor/js/languages/ru.js | 9 ++++--- .../static/froala_editor/js/languages/sr.js | 7 ++++-- .../static/froala_editor/js/languages/sv.js | 7 ++++-- .../static/froala_editor/js/languages/th.js | 7 ++++-- .../static/froala_editor/js/languages/tr.js | 7 ++++-- .../static/froala_editor/js/languages/ua.js | 7 ++++-- .../froala_editor/js/languages/zh_cn.js | 15 ++++++----- .../froala_editor/js/languages/zh_tw.js | 9 ++++--- .../froala_editor/js/plugins/align.min.js | 2 +- .../js/plugins/char_counter.min.js | 2 +- .../js/plugins/code_beautifier.min.js | 2 +- .../froala_editor/js/plugins/code_view.min.js | 2 +- .../froala_editor/js/plugins/colors.min.js | 2 +- .../froala_editor/js/plugins/draggable.min.js | 2 +- .../froala_editor/js/plugins/emoticons.min.js | 2 +- .../froala_editor/js/plugins/entities.min.js | 2 +- .../froala_editor/js/plugins/file.min.js | 4 +-- .../js/plugins/font_family.min.js | 2 +- .../froala_editor/js/plugins/font_size.min.js | 4 +-- .../froala_editor/js/plugins/forms.min.js | 2 +- .../js/plugins/fullscreen.min.js | 2 +- .../froala_editor/js/plugins/image.min.js | 5 ++-- .../js/plugins/image_manager.min.js | 2 +- .../js/plugins/inline_style.min.js | 2 +- .../js/plugins/line_breaker.min.js | 4 +-- .../froala_editor/js/plugins/link.min.js | 4 +-- .../froala_editor/js/plugins/lists.min.js | 4 +-- .../js/plugins/paragraph_format.min.js | 2 +- .../js/plugins/paragraph_style.min.js | 2 +- .../js/plugins/quick_insert.min.js | 2 +- .../froala_editor/js/plugins/quote.min.js | 2 +- .../froala_editor/js/plugins/save.min.js | 2 +- .../froala_editor/js/plugins/table.min.js | 2 +- .../froala_editor/js/plugins/url.min.js | 2 +- .../froala_editor/js/plugins/video.min.js | 4 +-- setup.py | 2 +- 82 files changed, 254 insertions(+), 152 deletions(-) diff --git a/froala_editor/static/froala_editor/css/froala_editor.min.css b/froala_editor/static/froala_editor/css/froala_editor.min.css index 62e14142..593f4e79 100644 --- a/froala_editor/static/froala_editor/css/froala_editor.min.css +++ b/froala_editor/static/froala_editor/css/froala_editor.min.css @@ -1,5 +1,5 @@ /*! - * froala_editor v2.2.3 (https://www.froala.com/wysiwyg-editor) + * froala_editor v2.2.4 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2016 Froala Labs */ diff --git a/froala_editor/static/froala_editor/css/froala_style.min.css b/froala_editor/static/froala_editor/css/froala_style.min.css index 807b4272..54358962 100644 --- a/froala_editor/static/froala_editor/css/froala_style.min.css +++ b/froala_editor/static/froala_editor/css/froala_style.min.css @@ -1,5 +1,5 @@ /*! - * froala_editor v2.2.3 (https://www.froala.com/wysiwyg-editor) + * froala_editor v2.2.4 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2016 Froala Labs */ diff --git a/froala_editor/static/froala_editor/css/plugins/char_counter.min.css b/froala_editor/static/froala_editor/css/plugins/char_counter.min.css index 2beeaedc..b20b797e 100644 --- a/froala_editor/static/froala_editor/css/plugins/char_counter.min.css +++ b/froala_editor/static/froala_editor/css/plugins/char_counter.min.css @@ -1,5 +1,5 @@ /*! - * froala_editor v2.2.3 (https://www.froala.com/wysiwyg-editor) + * froala_editor v2.2.4 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2016 Froala Labs */ diff --git a/froala_editor/static/froala_editor/css/plugins/code_view.min.css b/froala_editor/static/froala_editor/css/plugins/code_view.min.css index 9dfec42b..cef264f7 100644 --- a/froala_editor/static/froala_editor/css/plugins/code_view.min.css +++ b/froala_editor/static/froala_editor/css/plugins/code_view.min.css @@ -1,5 +1,5 @@ /*! - * froala_editor v2.2.3 (https://www.froala.com/wysiwyg-editor) + * froala_editor v2.2.4 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2016 Froala Labs */ diff --git a/froala_editor/static/froala_editor/css/plugins/colors.min.css b/froala_editor/static/froala_editor/css/plugins/colors.min.css index 8d8e4e99..20874470 100644 --- a/froala_editor/static/froala_editor/css/plugins/colors.min.css +++ b/froala_editor/static/froala_editor/css/plugins/colors.min.css @@ -1,5 +1,5 @@ /*! - * froala_editor v2.2.3 (https://www.froala.com/wysiwyg-editor) + * froala_editor v2.2.4 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2016 Froala Labs */ diff --git a/froala_editor/static/froala_editor/css/plugins/draggable.min.css b/froala_editor/static/froala_editor/css/plugins/draggable.min.css index c59022a4..73d9259d 100644 --- a/froala_editor/static/froala_editor/css/plugins/draggable.min.css +++ b/froala_editor/static/froala_editor/css/plugins/draggable.min.css @@ -1,5 +1,5 @@ /*! - * froala_editor v2.2.3 (https://www.froala.com/wysiwyg-editor) + * froala_editor v2.2.4 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2016 Froala Labs */ diff --git a/froala_editor/static/froala_editor/css/plugins/emoticons.min.css b/froala_editor/static/froala_editor/css/plugins/emoticons.min.css index 8cd9378a..49ed9f77 100644 --- a/froala_editor/static/froala_editor/css/plugins/emoticons.min.css +++ b/froala_editor/static/froala_editor/css/plugins/emoticons.min.css @@ -1,5 +1,5 @@ /*! - * froala_editor v2.2.3 (https://www.froala.com/wysiwyg-editor) + * froala_editor v2.2.4 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2016 Froala Labs */ diff --git a/froala_editor/static/froala_editor/css/plugins/file.min.css b/froala_editor/static/froala_editor/css/plugins/file.min.css index ed589ff4..420e2fc3 100644 --- a/froala_editor/static/froala_editor/css/plugins/file.min.css +++ b/froala_editor/static/froala_editor/css/plugins/file.min.css @@ -1,5 +1,5 @@ /*! - * froala_editor v2.2.3 (https://www.froala.com/wysiwyg-editor) + * froala_editor v2.2.4 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2016 Froala Labs */ diff --git a/froala_editor/static/froala_editor/css/plugins/fullscreen.min.css b/froala_editor/static/froala_editor/css/plugins/fullscreen.min.css index c21b148e..9d57ade0 100644 --- a/froala_editor/static/froala_editor/css/plugins/fullscreen.min.css +++ b/froala_editor/static/froala_editor/css/plugins/fullscreen.min.css @@ -1,5 +1,5 @@ /*! - * froala_editor v2.2.3 (https://www.froala.com/wysiwyg-editor) + * froala_editor v2.2.4 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2016 Froala Labs */ diff --git a/froala_editor/static/froala_editor/css/plugins/image.min.css b/froala_editor/static/froala_editor/css/plugins/image.min.css index 27faa4f3..b1dbcfeb 100644 --- a/froala_editor/static/froala_editor/css/plugins/image.min.css +++ b/froala_editor/static/froala_editor/css/plugins/image.min.css @@ -1,5 +1,5 @@ /*! - * froala_editor v2.2.3 (https://www.froala.com/wysiwyg-editor) + * froala_editor v2.2.4 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2016 Froala Labs */ diff --git a/froala_editor/static/froala_editor/css/plugins/image_manager.min.css b/froala_editor/static/froala_editor/css/plugins/image_manager.min.css index a75fa93b..818060f1 100644 --- a/froala_editor/static/froala_editor/css/plugins/image_manager.min.css +++ b/froala_editor/static/froala_editor/css/plugins/image_manager.min.css @@ -1,5 +1,5 @@ /*! - * froala_editor v2.2.3 (https://www.froala.com/wysiwyg-editor) + * froala_editor v2.2.4 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2016 Froala Labs */ diff --git a/froala_editor/static/froala_editor/css/plugins/line_breaker.min.css b/froala_editor/static/froala_editor/css/plugins/line_breaker.min.css index 8a930942..81779de9 100644 --- a/froala_editor/static/froala_editor/css/plugins/line_breaker.min.css +++ b/froala_editor/static/froala_editor/css/plugins/line_breaker.min.css @@ -1,5 +1,5 @@ /*! - * froala_editor v2.2.3 (https://www.froala.com/wysiwyg-editor) + * froala_editor v2.2.4 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2016 Froala Labs */ diff --git a/froala_editor/static/froala_editor/css/plugins/quick_insert.min.css b/froala_editor/static/froala_editor/css/plugins/quick_insert.min.css index c6531905..2a7be7e8 100644 --- a/froala_editor/static/froala_editor/css/plugins/quick_insert.min.css +++ b/froala_editor/static/froala_editor/css/plugins/quick_insert.min.css @@ -1,5 +1,5 @@ /*! - * froala_editor v2.2.3 (https://www.froala.com/wysiwyg-editor) + * froala_editor v2.2.4 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2016 Froala Labs */ diff --git a/froala_editor/static/froala_editor/css/plugins/table.min.css b/froala_editor/static/froala_editor/css/plugins/table.min.css index 42ac9255..ee9886cd 100644 --- a/froala_editor/static/froala_editor/css/plugins/table.min.css +++ b/froala_editor/static/froala_editor/css/plugins/table.min.css @@ -1,5 +1,5 @@ /*! - * froala_editor v2.2.3 (https://www.froala.com/wysiwyg-editor) + * froala_editor v2.2.4 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2016 Froala Labs */ diff --git a/froala_editor/static/froala_editor/css/plugins/video.min.css b/froala_editor/static/froala_editor/css/plugins/video.min.css index 1f5e1e80..bdb8644b 100644 --- a/froala_editor/static/froala_editor/css/plugins/video.min.css +++ b/froala_editor/static/froala_editor/css/plugins/video.min.css @@ -1,5 +1,5 @@ /*! - * froala_editor v2.2.3 (https://www.froala.com/wysiwyg-editor) + * froala_editor v2.2.4 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2016 Froala Labs */ diff --git a/froala_editor/static/froala_editor/css/themes/dark.min.css b/froala_editor/static/froala_editor/css/themes/dark.min.css index fa3ed053..37ba68cc 100644 --- a/froala_editor/static/froala_editor/css/themes/dark.min.css +++ b/froala_editor/static/froala_editor/css/themes/dark.min.css @@ -1,5 +1,5 @@ /*! - * froala_editor v2.2.3 (https://www.froala.com/wysiwyg-editor) + * froala_editor v2.2.4 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2016 Froala Labs */ diff --git a/froala_editor/static/froala_editor/css/themes/gray.min.css b/froala_editor/static/froala_editor/css/themes/gray.min.css index 538a0d07..e41af9e3 100644 --- a/froala_editor/static/froala_editor/css/themes/gray.min.css +++ b/froala_editor/static/froala_editor/css/themes/gray.min.css @@ -1,5 +1,5 @@ /*! - * froala_editor v2.2.3 (https://www.froala.com/wysiwyg-editor) + * froala_editor v2.2.4 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2016 Froala Labs */ diff --git a/froala_editor/static/froala_editor/css/themes/red.min.css b/froala_editor/static/froala_editor/css/themes/red.min.css index babb3fb9..62636d2e 100644 --- a/froala_editor/static/froala_editor/css/themes/red.min.css +++ b/froala_editor/static/froala_editor/css/themes/red.min.css @@ -1,5 +1,5 @@ /*! - * froala_editor v2.2.3 (https://www.froala.com/wysiwyg-editor) + * froala_editor v2.2.4 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2016 Froala Labs */ diff --git a/froala_editor/static/froala_editor/css/themes/royal.min.css b/froala_editor/static/froala_editor/css/themes/royal.min.css index b10ad895..764de16b 100644 --- a/froala_editor/static/froala_editor/css/themes/royal.min.css +++ b/froala_editor/static/froala_editor/css/themes/royal.min.css @@ -1,5 +1,5 @@ /*! - * froala_editor v2.2.3 (https://www.froala.com/wysiwyg-editor) + * froala_editor v2.2.4 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2016 Froala Labs */ diff --git a/froala_editor/static/froala_editor/js/froala_editor.min.js b/froala_editor/static/froala_editor/js/froala_editor.min.js index 435b8600..4e567e5b 100644 --- a/froala_editor/static/froala_editor/js/froala_editor.min.js +++ b/froala_editor/static/froala_editor/js/froala_editor.min.js @@ -1,11 +1,11 @@ /*! - * froala_editor v2.2.3 (https://www.froala.com/wysiwyg-editor) + * froala_editor v2.2.4 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2016 Froala Labs */ -!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){"use strict";var b=function(c,d){this.id=++a.FE.ID,this.opts=a.extend(!0,{},a.extend({},b.DEFAULTS,"object"==typeof d&&d));var e=JSON.stringify(this.opts);a.FE.OPTS_MAPPING[e]=a.FE.OPTS_MAPPING[e]||this.id,this.sid=a.FE.OPTS_MAPPING[e],a.FE.SHARED[this.sid]=a.FE.SHARED[this.sid]||{},this.shared=a.FE.SHARED[this.sid],this.shared.count=(this.shared.count||0)+1,this.$oel=a(c),this.$oel.data("froala.editor",this),this.o_doc=c.ownerDocument,this.o_win="defaultView"in this.o_doc?this.o_doc.defaultView:this.o_doc.parentWindow;var f=a(this.o_win).scrollTop();this.$oel.on("froala.doInit",a.proxy(function(){this.$oel.off("froala.doInit"),this.doc=this.$el.get(0).ownerDocument,this.win="defaultView"in this.doc?this.doc.defaultView:this.doc.parentWindow,this.$doc=a(this.doc),this.$win=a(this.win),this.opts.pluginsEnabled||(this.opts.pluginsEnabled=Object.keys(a.FE.PLUGINS)),this.opts.initOnClick?(this.load(a.FE.MODULES),this.$el.on("mousedown.init touchstart.init dragenter.init focus.init",a.proxy(function(b){if(1===b.which||0===b.which){this.$el.off("mousedown.init dragenter.init focus.init touchstart.init"),this.load(a.FE.MODULES),this.load(a.FE.PLUGINS);var c=b.originalEvent&&b.originalEvent.originalTarget;c&&"IMG"==c.tagName&&a(c).trigger("mousedown"),"undefined"==typeof this.ul&&this.destroy(),this.events.trigger("initialized")}},this))):(this.load(a.FE.MODULES),this.load(a.FE.PLUGINS),a(this.o_win).scrollTop(f),"undefined"==typeof this.ul&&this.destroy(),this.events.trigger("initialized"))},this)),this._init()};b.DEFAULTS={initOnClick:!1,pluginsEnabled:null},b.MODULES={},b.PLUGINS={},b.VERSION="2.2.3",b.INSTANCES=[],b.OPTS_MAPPING={},b.SHARED={},b.ID=0,b.prototype._init=function(){var b=this.$oel.prop("tagName"),c=a.proxy(function(){this._original_html=this._original_html||this.$oel.html(),this.$box=this.$box||this.$oel,this.opts.fullPage&&(this.opts.iframe=!0),this.opts.iframe?(this.$iframe=a(''},{test_regex:/^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com)\/(?:channels\/[A-z]+\/|groups\/[A-z]+\/videos\/)?(.+)/g,url_text:"//player.vimeo.com/video/$1",html:''},{test_regex:/^.+(dailymotion.com|dai.ly)\/(video|hub)?\/?([^_]+)[^#]*(#video=([^_&]+))?/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:dailymotion\.com|dai\.ly)\/(?:video|hub)?\/?(.+)/g,url_text:"//www.dailymotion.com/embed/video/$1",html:''},{test_regex:/^.+(screen.yahoo.com)\/[^_&]+/,url_regex:"",url_text:"",html:''},{test_regex:/^.+(rutube.ru)\/[^_&]+/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g,url_text:"//rutube.ru/play/embed/$1",html:''}],a.FE.PLUGINS.video=function(b){function c(){var a=b.popups.get("video.insert"),c=a.find(".fr-video-by-url-layer input");c.val("").trigger("change");var d=a.find(".fr-video-embed-layer textarea");d.val("").trigger("change")}function d(){var a=b.$tb.find('.fr-command[data-cmd="insertVideo"]'),c=b.popups.get("video.insert");if(c||(c=f()),!c.hasClass("fr-active")){b.popups.refresh("video.insert"),b.popups.setContainer("video.insert",b.$tb);var d=a.offset().left+a.outerWidth()/2,e=a.offset().top+(b.opts.toolbarBottom?10:a.outerHeight()-10);b.popups.show("video.insert",d,e,a.outerHeight())}}function e(){var c=b.popups.get("video.edit");c||(c=z()),b.popups.setContainer("video.edit",a(b.opts.scrollableContainer)),b.popups.refresh("video.edit");var d=S.find("iframe, embed, video"),e=d.offset().left+d.outerWidth()/2,f=d.offset().top+d.outerHeight();b.popups.show("video.edit",e,f,d.outerHeight())}function f(a){if(a)return b.popups.onRefresh("video.insert",c),b.popups.onHide("video.insert",j),!0;var d="";b.opts.videoInsertButtons.length>1&&(d='
'+b.button.buildList(b.opts.videoInsertButtons)+"
");var e="";b.opts.videoInsertButtons.indexOf("videoByURL")>=0&&(e='
");var f="";b.opts.videoInsertButtons.indexOf("videoEmbed")>=0&&(f='
");var g={buttons:d,by_url_layer:e,embed_layer:f},h=b.popups.create("video.insert",g);return h}function g(a){var c,d,e=b.popups.get("video.insert");if(!S&&!b.opts.toolbarInline){var f=b.$tb.find('.fr-command[data-cmd="insertVideo"]');c=f.offset().left+f.outerWidth()/2,d=f.offset().top+(b.opts.toolbarBottom?10:f.outerHeight()-10)}b.opts.toolbarInline&&(d=e.offset().top-b.helpers.getPX(e.css("margin-top")),e.hasClass("fr-above")&&(d+=e.outerHeight())),e.find(".fr-layer").removeClass("fr-active"),e.find(".fr-"+a+"-layer").addClass("fr-active"),b.popups.show("video.insert",c,d,0)}function h(a){var c=b.popups.get("video.insert");c.find(".fr-video-by-url-layer").hasClass("fr-active")&&a.addClass("fr-active")}function i(a){var c=b.popups.get("video.insert");c.find(".fr-video-embed-layer").hasClass("fr-active")&&a.addClass("fr-active")}function j(){}function k(a){b.events.focus(!0),b.selection.restore(),b.html.insert(''+a+"",!1,b.opts.videoSplitHTML),b.popups.hide("video.insert");var c=b.$el.find(".fr-jiv");c.removeClass("fr-jiv"),c.toggleClass("fr-draggable",b.opts.videoMove),b.events.trigger("video.inserted",[c])}function l(c){if("undefined"==typeof c){var d=b.popups.get("video.insert");c=d.find('.fr-video-by-url-layer input[type="text"]').val()||""}var e=null;if(b.helpers.isURL(c))for(var f=0;f'}function r(){var c;b.shared.$video_resizer?(R=b.shared.$video_resizer,P=b.shared.$vid_overlay,b.events.on("destroy",function(){R.removeClass("fr-active").appendTo(a("body"))},!0)):(b.shared.$video_resizer=a('
'),R=b.shared.$video_resizer,b.events.$on(R,"mousedown",function(a){a.stopPropagation()},!0),b.opts.videoResize&&(R.append(q("nw")+q("ne")+q("sw")+q("se")),b.shared.$vid_overlay=a('
'),P=b.shared.$vid_overlay,c=R.get(0).ownerDocument,a(c).find("body").append(P))),b.events.on("shared.destroy",function(){R.html("").removeData().remove(),b.opts.videoResize&&P.remove()},!0),b.helpers.isMobile()||b.events.$on(a(b.o_win),"resize.video",function(){u(!0)}),b.opts.videoResize&&(c=R.get(0).ownerDocument,b.events.$on(R,b._mousedown,".fr-handler",n),b.events.$on(a(c),b._mousemove,o),b.events.$on(a(c.defaultView||c.parentWindow),b._mouseup,p),b.events.$on(P,"mouseleave",p))}function s(){R||r(),(b.$wp||a(b.opts.scrollableContainer)).append(R),R.data("instance",b);var c=S.find("iframe, embed, video");R.css("top",(b.opts.iframe?c.offset().top-1:c.offset().top-b.$wp.offset().top-1)+b.$wp.scrollTop()).css("left",(b.opts.iframe?c.offset().left-1:c.offset().left-b.$wp.offset().left-1)+b.$wp.scrollLeft()).css("width",c.outerWidth()).css("height",c.height()).addClass("fr-active")}function t(c){if(c&&"touchend"==c.type&&T)return!0;if(c.preventDefault(),c.stopPropagation(),b.edit.isDisabled())return!1;for(var d=0;d0&&u()}),b.events.on("blur video.hideResizer commands.undo commands.redo element.dropped",function(){u(!0)})}function z(){var a="";b.opts.videoEditButtons.length>1&&(a+='
',a+=b.button.buildList(b.opts.videoEditButtons),a+="
");var c={buttons:a},d=b.popups.create("video.edit",c);return b.events.$on(b.$wp,"scroll.video-edit",function(){S&&b.popups.isVisible("video.edit")&&e()}),d}function A(){if(S){var a=b.popups.get("video.size"),c=S.find("iframe, embed, video");a.find('input[name="width"]').val(c.get(0).style.width||c.attr("width")).trigger("change"),a.find('input[name="height"]').val(c.get(0).style.height||c.attr("height")).trigger("change")}}function B(){var c=b.popups.get("video.size");c||(c=C()),b.popups.refresh("video.size"),b.popups.setContainer("video.size",a(b.opts.scrollableContainer));var d=S.find("iframe, embed, video"),e=d.offset().left+d.width()/2,f=d.offset().top+d.height();b.popups.show("video.size",e,f,d.height())}function C(a){if(a)return b.popups.onRefresh("video.size",A),!0;var c="";c='
'+b.button.buildList(b.opts.videoSizeButtons)+"
";var d="";d='
";var e={buttons:c,size_layer:d},f=b.popups.create("video.size",e);return b.events.$on(b.$wp,"scroll",function(){S&&b.popups.isVisible("video.size")&&B()}),f}function D(a){S.removeClass("fr-fvr fr-fvl"),"left"==a?S.addClass("fr-fvl"):"right"==a&&S.addClass("fr-fvr"),s(),e()}function E(a){return S?void(S.hasClass("fr-fvl")?a.find("> *:first").replaceWith(b.icon.create("align-left")):S.hasClass("fr-fvr")?a.find("> *:first").replaceWith(b.icon.create("align-right")):a.find("> *:first").replaceWith(b.icon.create("align-justify"))):!1}function F(a,b){var c="justify";S.hasClass("fr-fvl")?c="left":S.hasClass("fr-fvr")&&(c="right"),b.find('.fr-command[data-param1="'+c+'"]').addClass("fr-active")}function G(a){S.removeClass("fr-dvi fr-dvb"),"inline"==a?S.addClass("fr-dvi"):"block"==a&&S.addClass("fr-dvb"),s(),e()}function H(a,b){var c="block";S.hasClass("fr-dvi")&&(c="inline"),b.find('.fr-command[data-param1="'+c+'"]').addClass("fr-active")}function I(){if(S&&b.events.trigger("video.beforeRemove",[S])!==!1){var a=S;b.popups.hideAll(),u(!0),b.selection.setBefore(a.get(0))||b.selection.setAfter(a.get(0)),a.remove(),b.selection.restore(),b.html.fillEmptyBlocks(),b.events.trigger("video.removed",[a])}}function J(a){if(!a.hasClass("fr-dvi")&&!a.hasClass("fr-dvb")){var c=a.css("float");a.css("float","none"),"block"==a.css("display")?(a.css("float",c),0===parseInt(a.css("margin-left"),10)&&(a.attr("style")||"").indexOf("margin-right: auto")>=0?a.addClass("fr-fvl"):0===parseInt(a.css("margin-right"),10)&&(a.attr("style")||"").indexOf("margin-left: auto")>=0&&a.addClass("fr-fvr"),a.addClass("fr-dvb")):(a.css("float",c),"left"==a.css("float")?a.addClass("fr-fvl"):"right"==a.css("float")&&a.addClass("fr-fvr"),a.addClass("fr-dvi")),a.css("margin",""),a.css("float",""),a.css("display",""),a.css("z-index",""),a.css("position",""),a.css("overflow",""),a.css("vertical-align","")}b.opts.videoTextNear||a.removeClass("fr-dvi").addClass("fr-dvb")}function K(){b.$el.find("video").filter(function(){return 0===a(this).parents("span.fr-video").length}).wrap(''),b.$el.find("embed, iframe").filter(function(){if(b.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),a(this).parents("span.fr-video").length>0)return!1;for(var c=a(this).attr("src"),d=0;d');for(var c=b.$el.find("span.fr-video"),d=0;d'+this.icon.create("align-"+d)+"");return b+=""},callback:function(a,b){this.video.align(b)},refresh:function(a){this.video.refreshAlign(a)},refreshOnShow:function(a,b){this.video.refreshAlignOnShow(a,b)}}),a.FE.DefineIcon("videoRemove",{NAME:"trash"}),a.FE.RegisterCommand("videoRemove",{title:"Remove",callback:function(){this.video.remove()}}),a.FE.DefineIcon("videoSize",{NAME:"arrows-alt"}),a.FE.RegisterCommand("videoSize",{undo:!1,focus:!1,title:"Change Size",callback:function(){this.video.showSizePopup()}}),a.FE.DefineIcon("videoBack",{NAME:"arrow-left"}),a.FE.RegisterCommand("videoBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.video.back()},refresh:function(a){var b=this.video.get();b||this.opts.toolbarInline?(a.removeClass("fr-hidden"),a.next(".fr-separator").removeClass("fr-hidden")):(a.addClass("fr-hidden"),a.next(".fr-separator").addClass("fr-hidden"))}}),a.FE.RegisterCommand("videoSetSize",{undo:!0,focus:!1,callback:function(){this.video.setSize()}})}); \ No newline at end of file +!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){"use strict";a.extend(a.FE.POPUP_TEMPLATES,{"video.insert":"[_BUTTONS_][_BY_URL_LAYER_][_EMBED_LAYER_]","video.edit":"[_BUTTONS_]","video.size":"[_BUTTONS_][_SIZE_LAYER_]"}),a.extend(a.FE.DEFAULTS,{videoInsertButtons:["videoBack","|","videoByURL","videoEmbed"],videoEditButtons:["videoDisplay","videoAlign","videoSize","videoRemove"],videoResize:!0,videoSizeButtons:["videoBack","|"],videoSplitHTML:!1,videoTextNear:!0,videoDefaultAlign:"center",videoDefaultDisplay:"block",videoMove:!0}),a.FE.VIDEO_PROVIDERS=[{test_regex:/^.*((youtu.be\/)|(youtube.com))\/((v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=|embed\/)?([0-9a-zA-Z_\-]+)(.+)?/g,url_text:"//www.youtube.com/embed/$1",html:''},{test_regex:/^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:vimeo\.com)\/(?:channels\/[A-z]+\/|groups\/[A-z]+\/videos\/)?(.+)/g,url_text:"//player.vimeo.com/video/$1",html:''},{test_regex:/^.+(dailymotion.com|dai.ly)\/(video|hub)?\/?([^_]+)[^#]*(#video=([^_&]+))?/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:dailymotion\.com|dai\.ly)\/(?:video|hub)?\/?(.+)/g,url_text:"//www.dailymotion.com/embed/video/$1",html:''},{test_regex:/^.+(screen.yahoo.com)\/[^_&]+/,url_regex:"",url_text:"",html:''},{test_regex:/^.+(rutube.ru)\/[^_&]+/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g,url_text:"//rutube.ru/play/embed/$1",html:''}],a.FE.VIDEO_EMBED_REGEX=/^\W*((<\/iframe>)|())\W*$/i,a.FE.PLUGINS.video=function(b){function c(){var a=b.popups.get("video.insert"),c=a.find(".fr-video-by-url-layer input");c.val("").trigger("change");var d=a.find(".fr-video-embed-layer textarea");d.val("").trigger("change")}function d(){var a=b.$tb.find('.fr-command[data-cmd="insertVideo"]'),c=b.popups.get("video.insert");if(c||(c=f()),!c.hasClass("fr-active")){b.popups.refresh("video.insert"),b.popups.setContainer("video.insert",b.$tb);var d=a.offset().left+a.outerWidth()/2,e=a.offset().top+(b.opts.toolbarBottom?10:a.outerHeight()-10);b.popups.show("video.insert",d,e,a.outerHeight())}}function e(){var c=b.popups.get("video.edit");c||(c=y()),b.popups.setContainer("video.edit",a(b.opts.scrollableContainer)),b.popups.refresh("video.edit");var d=R.find("iframe, embed, video"),e=d.offset().left+d.outerWidth()/2,f=d.offset().top+d.outerHeight();b.popups.show("video.edit",e,f,d.outerHeight())}function f(a){if(a)return b.popups.onRefresh("video.insert",c),!0;var d="";b.opts.videoInsertButtons.length>1&&(d='
'+b.button.buildList(b.opts.videoInsertButtons)+"
");var e="";b.opts.videoInsertButtons.indexOf("videoByURL")>=0&&(e='
");var f="";b.opts.videoInsertButtons.indexOf("videoEmbed")>=0&&(f='
");var g={buttons:d,by_url_layer:e,embed_layer:f},h=b.popups.create("video.insert",g);return h}function g(a){var c,d,e=b.popups.get("video.insert");if(!R&&!b.opts.toolbarInline){var f=b.$tb.find('.fr-command[data-cmd="insertVideo"]');c=f.offset().left+f.outerWidth()/2,d=f.offset().top+(b.opts.toolbarBottom?10:f.outerHeight()-10)}b.opts.toolbarInline&&(d=e.offset().top-b.helpers.getPX(e.css("margin-top")),e.hasClass("fr-above")&&(d+=e.outerHeight())),e.find(".fr-layer").removeClass("fr-active"),e.find(".fr-"+a+"-layer").addClass("fr-active"),b.popups.show("video.insert",c,d,0)}function h(a){var c=b.popups.get("video.insert");c.find(".fr-video-by-url-layer").hasClass("fr-active")&&a.addClass("fr-active")}function i(a){var c=b.popups.get("video.insert");c.find(".fr-video-embed-layer").hasClass("fr-active")&&a.addClass("fr-active")}function j(a){b.events.focus(!0),b.selection.restore(),b.html.insert(''+a+"",!1,b.opts.videoSplitHTML),b.popups.hide("video.insert");var c=b.$el.find(".fr-jiv");c.removeClass("fr-jiv"),c.toggleClass("fr-draggable",b.opts.videoMove),b.events.trigger("video.inserted",[c])}function k(c){if("undefined"==typeof c){var d=b.popups.get("video.insert");c=d.find('.fr-video-by-url-layer input[type="text"]').val()||""}var e=null;if(b.helpers.isURL(c))for(var f=0;f'}function q(){var c;b.shared.$video_resizer?(Q=b.shared.$video_resizer,O=b.shared.$vid_overlay,b.events.on("destroy",function(){Q.removeClass("fr-active").appendTo(a("body"))},!0)):(b.shared.$video_resizer=a('
'),Q=b.shared.$video_resizer,b.events.$on(Q,"mousedown",function(a){a.stopPropagation()},!0),b.opts.videoResize&&(Q.append(p("nw")+p("ne")+p("sw")+p("se")),b.shared.$vid_overlay=a('
'),O=b.shared.$vid_overlay,c=Q.get(0).ownerDocument,a(c).find("body").append(O))),b.events.on("shared.destroy",function(){Q.html("").removeData().remove(),b.opts.videoResize&&O.remove()},!0),b.helpers.isMobile()||b.events.$on(a(b.o_win),"resize.video",function(){t(!0)}),b.opts.videoResize&&(c=Q.get(0).ownerDocument,b.events.$on(Q,b._mousedown,".fr-handler",m),b.events.$on(a(c),b._mousemove,n),b.events.$on(a(c.defaultView||c.parentWindow),b._mouseup,o),b.events.$on(O,"mouseleave",o))}function r(){Q||q(),(b.$wp||a(b.opts.scrollableContainer)).append(Q),Q.data("instance",b);var c=R.find("iframe, embed, video");Q.css("top",(b.opts.iframe?c.offset().top-1:c.offset().top-b.$wp.offset().top-1)+b.$wp.scrollTop()).css("left",(b.opts.iframe?c.offset().left-1:c.offset().left-b.$wp.offset().left-1)+b.$wp.scrollLeft()).css("width",c.outerWidth()).css("height",c.height()).addClass("fr-active")}function s(c){if(c&&"touchend"==c.type&&S)return!0;if(c.preventDefault(),c.stopPropagation(),b.edit.isDisabled())return!1;for(var d=0;d0&&t()}),b.events.on("blur video.hideResizer commands.undo commands.redo element.dropped",function(){t(!0)})}function y(){var a="";b.opts.videoEditButtons.length>1&&(a+='
',a+=b.button.buildList(b.opts.videoEditButtons),a+="
");var c={buttons:a},d=b.popups.create("video.edit",c);return b.events.$on(b.$wp,"scroll.video-edit",function(){R&&b.popups.isVisible("video.edit")&&e()}),d}function z(){if(R){var a=b.popups.get("video.size"),c=R.find("iframe, embed, video");a.find('input[name="width"]').val(c.get(0).style.width||c.attr("width")).trigger("change"),a.find('input[name="height"]').val(c.get(0).style.height||c.attr("height")).trigger("change")}}function A(){var c=b.popups.get("video.size");c||(c=B()),b.popups.refresh("video.size"),b.popups.setContainer("video.size",a(b.opts.scrollableContainer));var d=R.find("iframe, embed, video"),e=d.offset().left+d.width()/2,f=d.offset().top+d.height();b.popups.show("video.size",e,f,d.height())}function B(a){if(a)return b.popups.onRefresh("video.size",z),!0;var c="";c='
'+b.button.buildList(b.opts.videoSizeButtons)+"
";var d="";d='
";var e={buttons:c,size_layer:d},f=b.popups.create("video.size",e);return b.events.$on(b.$wp,"scroll",function(){R&&b.popups.isVisible("video.size")&&A()}),f}function C(a){R.removeClass("fr-fvr fr-fvl"),"left"==a?R.addClass("fr-fvl"):"right"==a&&R.addClass("fr-fvr"),r(),e()}function D(a){return R?void(R.hasClass("fr-fvl")?a.find("> *:first").replaceWith(b.icon.create("align-left")):R.hasClass("fr-fvr")?a.find("> *:first").replaceWith(b.icon.create("align-right")):a.find("> *:first").replaceWith(b.icon.create("align-justify"))):!1}function E(a,b){var c="justify";R.hasClass("fr-fvl")?c="left":R.hasClass("fr-fvr")&&(c="right"),b.find('.fr-command[data-param1="'+c+'"]').addClass("fr-active")}function F(a){R.removeClass("fr-dvi fr-dvb"),"inline"==a?R.addClass("fr-dvi"):"block"==a&&R.addClass("fr-dvb"),r(),e()}function G(a,b){var c="block";R.hasClass("fr-dvi")&&(c="inline"),b.find('.fr-command[data-param1="'+c+'"]').addClass("fr-active")}function H(){if(R&&b.events.trigger("video.beforeRemove",[R])!==!1){var a=R;b.popups.hideAll(),t(!0),b.selection.setBefore(a.get(0))||b.selection.setAfter(a.get(0)),a.remove(),b.selection.restore(),b.html.fillEmptyBlocks(),b.events.trigger("video.removed",[a])}}function I(a){if(!a.hasClass("fr-dvi")&&!a.hasClass("fr-dvb")){var c=a.css("float");a.css("float","none"),"block"==a.css("display")?(a.css("float",c),0===parseInt(a.css("margin-left"),10)&&(a.attr("style")||"").indexOf("margin-right: auto")>=0?a.addClass("fr-fvl"):0===parseInt(a.css("margin-right"),10)&&(a.attr("style")||"").indexOf("margin-left: auto")>=0&&a.addClass("fr-fvr"),a.addClass("fr-dvb")):(a.css("float",c),"left"==a.css("float")?a.addClass("fr-fvl"):"right"==a.css("float")&&a.addClass("fr-fvr"),a.addClass("fr-dvi")),a.css("margin",""),a.css("float",""),a.css("display",""),a.css("z-index",""),a.css("position",""),a.css("overflow",""),a.css("vertical-align","")}b.opts.videoTextNear||a.removeClass("fr-dvi").addClass("fr-dvb")}function J(){b.$el.find("video").filter(function(){return 0===a(this).parents("span.fr-video").length}).wrap(''),b.$el.find("embed, iframe").filter(function(){if(b.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),a(this).parents("span.fr-video").length>0)return!1;for(var c=a(this).attr("src"),d=0;d');for(var c=b.$el.find("span.fr-video"),d=0;d'+this.icon.create("align-"+d)+"");return b+=""},callback:function(a,b){this.video.align(b)},refresh:function(a){this.video.refreshAlign(a)},refreshOnShow:function(a,b){this.video.refreshAlignOnShow(a,b)}}),a.FE.DefineIcon("videoRemove",{NAME:"trash"}),a.FE.RegisterCommand("videoRemove",{title:"Remove",callback:function(){this.video.remove()}}),a.FE.DefineIcon("videoSize",{NAME:"arrows-alt"}),a.FE.RegisterCommand("videoSize",{undo:!1,focus:!1,title:"Change Size",callback:function(){this.video.showSizePopup()}}),a.FE.DefineIcon("videoBack",{NAME:"arrow-left"}),a.FE.RegisterCommand("videoBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.video.back()},refresh:function(a){var b=this.video.get();b||this.opts.toolbarInline?(a.removeClass("fr-hidden"),a.next(".fr-separator").removeClass("fr-hidden")):(a.addClass("fr-hidden"),a.next(".fr-separator").addClass("fr-hidden"))}}),a.FE.RegisterCommand("videoSetSize",{undo:!0,focus:!1,callback:function(){this.video.setSize()}})}); \ No newline at end of file diff --git a/setup.py b/setup.py index 8f6881c3..2bb3bf69 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='django-froala-editor', - version='2.2.3', + version='2.2.4', author='Dipesh Acharya', author_email='xtranophilist@gmail.com', maintainer='Froala Labs',