diff --git a/CHANGELOG.md b/CHANGELOG.md
index 35981416b..bdb7a20b7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,6 @@
+* **Build 239** (2015-04-06)
+ - Installing plugins has a new interface and themes can now be installed using the back-end.
+
* **Build 236** (2015-03-28)
- Default context of `manage` and `pivot` forms is now *create* and *update* respectively, instead of the old value *relation*. Use the `context` option to set it back to the old value (see Backend > Relations docs).
diff --git a/modules/backend/ServiceProvider.php b/modules/backend/ServiceProvider.php
index 4f23977b8..581f9dc26 100644
--- a/modules/backend/ServiceProvider.php
+++ b/modules/backend/ServiceProvider.php
@@ -101,14 +101,15 @@ class ServiceProvider extends ModuleServiceProvider
'permissions' => ['backend.manage_branding'],
'order' => 500
],
- 'editor' => [
- 'label' => 'backend::lang.editor.menu_label',
- 'description' => 'backend::lang.editor.menu_description',
+ 'myaccount' => [
+ 'label' => 'backend::lang.myaccount.menu_label',
+ 'description' => 'backend::lang.myaccount.menu_description',
'category' => SettingsManager::CATEGORY_MYSETTINGS,
- 'icon' => 'icon-code',
- 'url' => Backend::URL('backend/editorpreferences'),
- 'order' => 600,
- 'context' => 'mysettings'
+ 'icon' => 'icon-user',
+ 'url' => Backend::URL('backend/users/myaccount'),
+ 'order' => 500,
+ 'context' => 'mysettings',
+ 'keywords' => 'backend::lang.myaccount.menu_keywords'
],
'backend_preferences' => [
'label' => 'backend::lang.backend_preferences.menu_label',
@@ -116,18 +117,17 @@ class ServiceProvider extends ModuleServiceProvider
'category' => SettingsManager::CATEGORY_MYSETTINGS,
'icon' => 'icon-laptop',
'class' => 'Backend\Models\BackendPreferences',
- 'order' => 500,
+ 'order' => 510,
'context' => 'mysettings'
],
- 'myaccount' => [
- 'label' => 'backend::lang.myaccount.menu_label',
- 'description' => 'backend::lang.myaccount.menu_description',
+ 'editor' => [
+ 'label' => 'backend::lang.editor.menu_label',
+ 'description' => 'backend::lang.editor.menu_description',
'category' => SettingsManager::CATEGORY_MYSETTINGS,
- 'icon' => 'icon-user',
- 'url' => Backend::URL('backend/users/myaccount'),
- 'order' => 400,
- 'context' => 'mysettings',
- 'keywords' => 'backend::lang.myaccount.menu_keywords'
+ 'icon' => 'icon-code',
+ 'url' => Backend::URL('backend/editorpreferences'),
+ 'order' => 520,
+ 'context' => 'mysettings'
],
'access_logs' => [
'label' => 'backend::lang.access_log.menu_label',
@@ -136,7 +136,7 @@ class ServiceProvider extends ModuleServiceProvider
'icon' => 'icon-lock',
'url' => Backend::url('backend/accesslogs'),
'permissions' => ['system.access_logs'],
- 'order' => 800
+ 'order' => 920
]
]);
});
@@ -183,6 +183,7 @@ class ServiceProvider extends ModuleServiceProvider
$combiner->registerBundle('~/modules/backend/formwidgets/datepicker/assets/js/build.js');
$combiner->registerBundle('~/modules/backend/formwidgets/richeditor/assets/less/richeditor.less');
$combiner->registerBundle('~/modules/backend/formwidgets/richeditor/assets/js/build.js');
+ $combiner->registerBundle('~/modules/backend/formwidgets/codeeditor/assets/less/codeeditor.less');
});
}
diff --git a/modules/backend/assets/css/october.css b/modules/backend/assets/css/october.css
index b9a140d17..a8e837538 100644
--- a/modules/backend/assets/css/october.css
+++ b/modules/backend/assets/css/october.css
@@ -2285,7 +2285,7 @@ nav#layout-mainmenu.navbar ul li.icon a{padding:14px}
nav#layout-mainmenu.navbar ul li.power-off i,nav#layout-mainmenu.navbar ul li.preview i{font-size:20px}
nav#layout-mainmenu.navbar ul li.power-off a,nav#layout-mainmenu.navbar ul li.preview a{padding:22px 20px 20px 20px}
nav#layout-mainmenu.navbar ul li.account{margin-right:0;line-height:23px}
-nav#layout-mainmenu.navbar ul li.account a{padding-right:20px;position:relative;z-index:900}
+nav#layout-mainmenu.navbar ul li.account a{padding-right:20px;position:relative;z-index:590}
nav#layout-mainmenu.navbar ul li.account img{width:25px;margin-right:7px;position:relative;top:-2px}
nav#layout-mainmenu.navbar ul.nav{display:inline-block}
nav#layout-mainmenu.navbar .menu-toggle{display:none}
@@ -2295,7 +2295,7 @@ nav#layout-mainmenu.navbar .toolbar-item:before{left:-12px}
nav#layout-mainmenu.navbar .toolbar-item:after{right:-12px}
nav#layout-mainmenu.navbar .toolbar-item.scroll-active-before:before{color:#ffffff}
nav#layout-mainmenu.navbar .toolbar-item.scroll-active-after:after{color:#ffffff}
-nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu{position:fixed;top:63px;right:0;width:225px;background:#2b3e50;z-index:900;display:none}
+nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu{position:fixed;top:63px;right:0;background:#2b3e50;z-index:590;display:none}
nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu.active{display:block}
nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu:after{content:'';display:block;width:0;height:0;border-left:11px solid transparent;border-right:11px solid transparent;border-bottom:12px solid #2b3e50;right:40px;top:-12px;position:absolute}
nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu ul{float:none;display:block}
diff --git a/modules/backend/assets/less/layout/mainmenu.less b/modules/backend/assets/less/layout/mainmenu.less
index 4c205f731..8fcbdd44e 100644
--- a/modules/backend/assets/less/layout/mainmenu.less
+++ b/modules/backend/assets/less/layout/mainmenu.less
@@ -66,7 +66,7 @@ nav#layout-mainmenu.navbar {
a {
padding-right: 20px;
position: relative;
- z-index: 900;
+ z-index: 590;
}
img {
@@ -98,9 +98,8 @@ nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu {
position: fixed;
top: 63px;
right: 0;
- width: 225px;
background: @color-accountmenu-bg;
- z-index: 900;
+ z-index: 590;
display: none;
&.active {
diff --git a/modules/backend/behaviors/RelationController.php b/modules/backend/behaviors/RelationController.php
index 0c5d97140..0e7049578 100644
--- a/modules/backend/behaviors/RelationController.php
+++ b/modules/backend/behaviors/RelationController.php
@@ -561,6 +561,12 @@ class RelationController extends ControllerBehavior
if ($config->recordUrl) {
$defaultOnClick = null;
}
+ elseif (
+ !$this->makeConfigForMode('manage', 'form', false) &&
+ !$this->makeConfigForMode('pivot', 'form', false)
+ ) {
+ $defaultOnClick = null;
+ }
$config->recordOnClick = $this->getConfig('view[recordOnClick]', $defaultOnClick);
@@ -898,7 +904,7 @@ class RelationController extends ControllerBehavior
$saveData = $this->manageWidget->getSaveData();
if ($this->viewMode == 'multi') {
- $model = $this->relationObject->find($this->manageId);
+ $model = $this->relationModel->find($this->manageId);
$model->save($saveData, $this->manageWidget->getSessionKey());
}
elseif ($this->viewMode == 'single') {
@@ -1267,7 +1273,7 @@ class RelationController extends ControllerBehavior
* Returns the configuration for a mode (view, manage, pivot) for an
* expected type (list, form). Uses fallback configuration.
*/
- protected function makeConfigForMode($mode = 'view', $type = 'list')
+ protected function makeConfigForMode($mode = 'view', $type = 'list', $throwException = true)
{
$config = null;
@@ -1293,12 +1299,16 @@ class RelationController extends ControllerBehavior
* - view.list => manage.list
*/
if (!$config) {
-
if ($mode == 'manage' && $type == 'list') {
return $this->makeConfigForMode('view', $type);
}
- throw new ApplicationException('Missing configuration for '.$mode.'.'.$type.' in RelationController definition '.$this->field);
+ if ($throwException) {
+ throw new ApplicationException('Missing configuration for '.$mode.'.'.$type.' in RelationController definition '.$this->field);
+ }
+ else {
+ return false;
+ }
}
return $this->makeConfig($config);
diff --git a/modules/backend/behaviors/relationcontroller/assets/js/october.relation.js b/modules/backend/behaviors/relationcontroller/assets/js/october.relation.js
index 581feb4ff..5e13a2810 100644
--- a/modules/backend/behaviors/relationcontroller/assets/js/october.relation.js
+++ b/modules/backend/behaviors/relationcontroller/assets/js/october.relation.js
@@ -56,6 +56,20 @@
})
}
+ /*
+ * This function transfers the supplied variables as hidden form inputs,
+ * to any popup that is spawned within the supplied container. The spawned
+ * popup must contain a form element.
+ */
+ this.bindToPopups = function(container, vars) {
+ $(container).on('show.oc.popup', function(event, $trigger, $modal){
+ var $form = $('form', $modal)
+ $.each(vars, function(name, value){
+ $form.prepend($('').attr({ type: 'hidden', name: name, value: value }))
+ })
+ })
+ }
+
}
$.oc.relationBehavior = new RelationBehavior;
diff --git a/modules/backend/behaviors/relationcontroller/partials/_manage_form.htm b/modules/backend/behaviors/relationcontroller/partials/_manage_form.htm
index 1ec08321d..1d18c7a49 100644
--- a/modules/backend/behaviors/relationcontroller/partials/_manage_form.htm
+++ b/modules/backend/behaviors/relationcontroller/partials/_manage_form.htm
@@ -1,41 +1,79 @@
-
+
- = Form::ajax('onRelationManageCreate', ['data-popup-load-indicator' => true, 'sessionKey' => $newSessionKey]) ?>
-
-
-
-
-
-
-
-
- = $relationManageWidget->render() ?>
-
-
-
- = Form::close() ?>
-
-
+
\ No newline at end of file
diff --git a/modules/backend/formwidgets/codeeditor/assets/css/codeeditor.css b/modules/backend/formwidgets/codeeditor/assets/css/codeeditor.css
index 91ce203c6..48973735a 100644
--- a/modules/backend/formwidgets/codeeditor/assets/css/codeeditor.css
+++ b/modules/backend/formwidgets/codeeditor/assets/css/codeeditor.css
@@ -1,105 +1,21 @@
-.field-codeeditor {
- width: 100%;
- position: relative;
- border: 2px solid #e0e0e0;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
-}
-.field-codeeditor textarea {
- opacity: 0;
- filter: alpha(opacity=0);
-}
-.field-codeeditor.editor-focus {
- border: 2px solid #808c8d;
-}
-.field-codeeditor.size-tiny {
- min-height: 50px;
-}
-.field-codeeditor.size-small {
- min-height: 100px;
-}
-.field-codeeditor.size-large {
- min-height: 200px;
-}
-.field-codeeditor.size-huge {
- min-height: 250px;
-}
-.field-codeeditor.size-giant {
- min-height: 350px;
-}
-.field-codeeditor .ace_search {
- font-family: 'Open Sans', Arial, sans-serif;
- font-size: 14px;
- color: #333333;
- z-index: 153;
-}
-.field-codeeditor .editor-code {
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
-}
-.field-codeeditor .editor-toolbar {
- position: absolute;
- top: 3px;
- right: 3px;
- z-index: 150;
-}
-.field-codeeditor .editor-toolbar > ul,
-.field-codeeditor .editor-toolbar ul > li {
- list-style-type: none;
- padding: 0;
- margin: 0;
-}
-.field-codeeditor .editor-toolbar > ul > li {
- float: left;
-}
-.field-codeeditor .editor-toolbar > ul > li > a {
- display: block;
- height: 25px;
- width: 25px;
- color: #666;
- font-size: 20px;
- text-align: center;
- text-decoration: none;
-}
-.field-codeeditor .editor-toolbar > ul > li > a > abbr {
- position: absolute;
- font: 0/0 a;
- color: transparent;
- text-shadow: none;
- background-color: transparent;
- border: 0;
-}
-.field-codeeditor .editor-toolbar > ul > li > a > i {
- opacity: 0.4;
- filter: alpha(opacity=40);
- display: block;
-}
-.field-codeeditor .editor-toolbar > ul > li > a > i:before {
- font-size: 14px;
-}
-.field-codeeditor .editor-toolbar > ul > li > a:hover > i,
-.field-codeeditor .editor-toolbar > ul > li > a:focus > i {
- opacity: 1;
- filter: alpha(opacity=100);
-}
-.field-codeeditor.editor-fullscreen {
- z-index: 151;
- position: fixed!important;
- top: 0;
- left: 0;
- height: 100%;
- border-width: 0;
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
-}
-.field-codeeditor.editor-fullscreen .editor-code {
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
-}
-.field-codeeditor.editor-fullscreen .editor-toolbar {
- z-index: 152;
-}
+.field-codeeditor{width:100%;position:relative;border:2px solid #e0e0e0;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}
+.field-codeeditor textarea{opacity:0;filter:alpha(opacity=0)}
+.field-codeeditor.editor-focus{border:2px solid #808c8d}
+.field-codeeditor.size-tiny{min-height:50px}
+.field-codeeditor.size-small{min-height:100px}
+.field-codeeditor.size-large{min-height:200px}
+.field-codeeditor.size-huge{min-height:250px}
+.field-codeeditor.size-giant{min-height:350px}
+.field-codeeditor .ace_search{font-family:'Open Sans',Arial,sans-serif;font-size:14px;color:#333333;z-index:603}
+.field-codeeditor .editor-code{-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}
+.field-codeeditor .editor-toolbar{position:absolute;top:3px;right:3px;z-index:600}
+.field-codeeditor .editor-toolbar > ul,.field-codeeditor .editor-toolbar ul > li{list-style-type:none;padding:0;margin:0}
+.field-codeeditor .editor-toolbar > ul > li{float:left}
+.field-codeeditor .editor-toolbar > ul > li > a{display:block;height:25px;width:25px;color:#666;font-size:20px;text-align:center;text-decoration:none}
+.field-codeeditor .editor-toolbar > ul > li > a > abbr{position:absolute;font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}
+.field-codeeditor .editor-toolbar > ul > li > a > i{opacity:0.4;filter:alpha(opacity=40);display:block}
+.field-codeeditor .editor-toolbar > ul > li > a > i:before{font-size:14px}
+.field-codeeditor .editor-toolbar > ul > li > a:hover > i,.field-codeeditor .editor-toolbar > ul > li > a:focus > i{opacity:1;filter:alpha(opacity=100)}
+.field-codeeditor.editor-fullscreen{z-index:601;position:fixed !important;top:0;left:0;height:100%;border-width:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}
+.field-codeeditor.editor-fullscreen .editor-code{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}
+.field-codeeditor.editor-fullscreen .editor-toolbar{z-index:602}
\ No newline at end of file
diff --git a/modules/backend/formwidgets/codeeditor/assets/less/codeeditor.less b/modules/backend/formwidgets/codeeditor/assets/less/codeeditor.less
index 0757ab7af..83528c6cf 100644
--- a/modules/backend/formwidgets/codeeditor/assets/less/codeeditor.less
+++ b/modules/backend/formwidgets/codeeditor/assets/less/codeeditor.less
@@ -1,6 +1,6 @@
@import "../../../../assets/less/core/boot.less";
-@codeeditor-zindex: 150;
+@codeeditor-zindex: 600;
.field-codeeditor {
width: 100%;
diff --git a/modules/backend/formwidgets/repeater/partials/_repeater_item.htm b/modules/backend/formwidgets/repeater/partials/_repeater_item.htm
index be62b92c2..f0756618a 100644
--- a/modules/backend/formwidgets/repeater/partials/_repeater_item.htm
+++ b/modules/backend/formwidgets/repeater/partials/_repeater_item.htm
@@ -11,7 +11,7 @@
aria-label="Remove"
data-request="= $this->getEventHandler('onRemoveItem') ?>"
data-request-data="'index': '= $indexValue ?>'"
- data-request-success="$el.closest('.field-repeater-item').remove()"
+ data-request-success="$(this).closest('.field-repeater-item').remove()"
data-request-confirm="Are you sure?">
×
diff --git a/modules/backend/formwidgets/richeditor/assets/css/richeditor.css b/modules/backend/formwidgets/richeditor/assets/css/richeditor.css
index 7446b1f76..e16d9049a 100644
--- a/modules/backend/formwidgets/richeditor/assets/css/richeditor.css
+++ b/modules/backend/formwidgets/richeditor/assets/css/richeditor.css
@@ -173,7 +173,7 @@ to{background-position:0 0}
.redactor-editor figure[data-type=quote] cite:before{content:"\2014\00a0"}
.redactor-editor figure[data-type=quote] cite:empty:before{opacity:0.4;content:"\2014 Type to add citation (optional)"}
.redactor-box figcaption:empty:before{opacity:.4;content:"Type to add caption (optional)"}
-.redactor-box .oc-figure-controls{background:#2b3e50 !important;padding:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;position:absolute;display:none;white-space:nowrap;left:10px;top:-50px;margin:0 auto;font-family:'Open Sans',Arial,sans-serif;line-height:20px;font-style:normal;z-index:800;text-align:center}
+.redactor-box .oc-figure-controls{background:#2b3e50 !important;padding:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;position:absolute;display:none;white-space:nowrap;left:10px;top:-50px;margin:0 auto;font-family:'Open Sans',Arial,sans-serif;line-height:20px;font-style:normal;z-index:1100;text-align:center}
.redactor-box .oc-figure-controls:after{content:' ';left:0;position:absolute;display:block;height:10px;background:rgba(0,0,0,0.1);width:100%;bottom:-10px;opacity:0.1;filter:alpha(opacity=10);filter:alpha(opacity=0.1);-moz-opacity:0.001;opacity:0.001}
.redactor-box .oc-figure-controls:before{content:'';display:block;width:0;height:0;border-left:8.5px solid transparent;border-right:8.5px solid transparent;border-top:9px solid #2b3e50;border-bottom-width:0;position:absolute;left:14px;bottom:-8px}
.redactor-box figure:hover .oc-figure-controls{display:block}
@@ -246,9 +246,9 @@ to{background-position:0 0}
.field-richeditor.size-giant .redactor-editor{height:320px !important}
.redactor-box{margin-bottom:0}
.redactor-box iframe{border:none}
-.redactor-box-fullscreen{z-index:415 !important}
-.redactor-toolbar,.redactor-dropdown{z-index:410 !important}
-#redactor-modal-overlay,#redactor-modal-box,#redactor-modal{z-index:420 !important}
+.redactor-box-fullscreen{z-index:715 !important}
+.redactor-toolbar,.redactor-dropdown{z-index:710 !important}
+#redactor-modal-overlay,#redactor-modal-box,#redactor-modal{z-index:720 !important}
.redactor-toolbar{background:#dddddd;-webkit-box-shadow:none;box-shadow:none}
.redactor-toolbar li.redactor-btn-right{float:right;margin-right:2px}
.redactor-toolbar li a{color:#404040;font-size:14px;width:20px;line-height:20px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
diff --git a/modules/backend/formwidgets/richeditor/assets/js/build-min.js b/modules/backend/formwidgets/richeditor/assets/js/build-min.js
index beab831de..d67bfa1ea 100644
--- a/modules/backend/formwidgets/richeditor/assets/js/build-min.js
+++ b/modules/backend/formwidgets/richeditor/assets/js/build-min.js
@@ -22,8 +22,11 @@ else
{$.data(this,'redactor',{});$.data(this,'redactor',Redactor(this,options));});}
if(val.length===0)return this;else if(val.length===1)return val[0];else return val;};function Redactor(el,options)
{return new Redactor.prototype.init(el,options);}
-$.Redactor=Redactor;$.Redactor.VERSION='10.0.7';$.Redactor.modules=['alignment','autosave','block','buffer','build','button','caret','clean','code','core','dropdown','file','focus','image','indent','inline','insert','keydown','keyup','lang','line','link','list','modal','observe','paragraphize','paste','placeholder','progress','selection','shortcuts','tabifier','tidy','toolbar','upload','utils'];$.Redactor.opts={lang:'en',direction:'ltr',plugins:false,focus:false,focusEnd:false,placeholder:false,visual:true,tabindex:false,minHeight:false,maxHeight:false,linebreaks:false,replaceDivs:true,paragraphize:true,cleanStyleOnEnter:false,enterKey:true,cleanOnPaste:true,cleanSpaces:true,pastePlainText:false,autosave:false,autosaveName:false,autosaveInterval:60,autosaveOnChange:false,linkTooltip:true,linkProtocol:'http',linkNofollow:false,linkSize:50,imageEditable:true,imageLink:true,imagePosition:true,imageFloatMargin:'10px',imageResizable:true,imageUpload:null,imageUploadParam:'file',uploadImageField:false,dragImageUpload:true,fileUpload:null,fileUploadParam:'file',dragFileUpload:true,s3:false,convertLinks:true,convertUrlLinks:true,convertImageLinks:true,convertVideoLinks:true,preSpaces:4,tabAsSpaces:false,tabKey:true,scrollTarget:false,toolbar:true,toolbarFixed:true,toolbarFixedTarget:document,toolbarFixedTopOffset:0,toolbarExternal:false,toolbarOverflow:false,source:true,buttons:['html','formatting','bold','italic','deleted','unorderedlist','orderedlist','outdent','indent','image','file','link','alignment','horizontalrule'],buttonsHide:[],buttonsHideOnMobile:[],formatting:['p','blockquote','pre','h1','h2','h3','h4','h5','h6'],formattingAdd:false,tabifier:true,deniedTags:['html','head','link','body','meta','script','style','applet'],allowedTags:false,removeComments:false,replaceTags:[['strike','del']],replaceStyles:[['font-weight:\\s?bold',"strong"],['font-style:\\s?italic',"em"],['text-decoration:\\s?underline',"u"],['text-decoration:\\s?line-through','del']],removeDataAttr:false,removeAttr:false,allowedAttr:false,removeWithoutAttr:['span'],removeEmpty:['p'],activeButtons:['deleted','italic','bold','underline','unorderedlist','orderedlist','alignleft','aligncenter','alignright','justify'],activeButtonsStates:{b:'bold',strong:'bold',i:'italic',em:'italic',del:'deleted',strike:'deleted',ul:'unorderedlist',ol:'orderedlist',u:'underline'},shortcuts:{'ctrl+shift+m, meta+shift+m':{func:'inline.removeFormat'},'ctrl+b, meta+b':{func:'inline.format',params:['bold']},'ctrl+i, meta+i':{func:'inline.format',params:['italic']},'ctrl+h, meta+h':{func:'inline.format',params:['superscript']},'ctrl+l, meta+l':{func:'inline.format',params:['subscript']},'ctrl+k, meta+k':{func:'link.show'},'ctrl+shift+7':{func:'list.toggle',params:['orderedlist']},'ctrl+shift+8':{func:'list.toggle',params:['unorderedlist']}},shortcutsAdd:false,buffer:[],rebuffer:[],emptyHtml:'
',invisibleSpace:'',imageTypes:['image/png','image/jpeg','image/gif'],indentValue:20,verifiedTags:['a','img','b','strong','sub','sup','i','em','u','small','strike','del','cite','ul','ol','li'],inlineTags:['strong','b','u','em','i','code','del','ins','samp','kbd','sup','sub','mark','var','cite','small'],alignmentTags:['P','H1','H2','H3','H4','H5','H6','DL','DT','DD','DIV','TD','BLOCKQUOTE','OUTPUT','FIGCAPTION','ADDRESS','SECTION','HEADER','FOOTER','ASIDE','ARTICLE'],blockLevelElements:['PRE','UL','OL','LI'],langs:{en:{html:'HTML',video:'Insert Video',image:'Insert Image',table:'Table',link:'Link',link_insert:'Insert link',link_edit:'Edit link',unlink:'Unlink',formatting:'Formatting',paragraph:'Normal text',quote:'Quote',code:'Code',header1:'Header 1',header2:'Header 2',header3:'Header 3',header4:'Header 4',header5:'Header 5',bold:'Bold',italic:'Italic',fontcolor:'Font Color',backcolor:'Back Color',unorderedlist:'Unordered List',orderedlist:'Ordered List',outdent:'Outdent',indent:'Indent',cancel:'Cancel',insert:'Insert',save:'Save',_delete:'Delete',insert_table:'Insert Table',insert_row_above:'Add Row Above',insert_row_below:'Add Row Below',insert_column_left:'Add Column Left',insert_column_right:'Add Column Right',delete_column:'Delete Column',delete_row:'Delete Row',delete_table:'Delete Table',rows:'Rows',columns:'Columns',add_head:'Add Head',delete_head:'Delete Head',title:'Title',image_position:'Position',none:'None',left:'Left',right:'Right',center:'Center',image_web_link:'Image Web Link',text:'Text',mailto:'Email',web:'URL',video_html_code:'Video Embed Code or Youtube/Vimeo Link',file:'Insert File',upload:'Upload',download:'Download',choose:'Choose',or_choose:'Or choose',drop_file_here:'Drop file here',align_left:'Align text to the left',align_center:'Center text',align_right:'Align text to the right',align_justify:'Justify text',horizontalrule:'Insert Horizontal Rule',deleted:'Deleted',anchor:'Anchor',link_new_tab:'Open link in new tab',underline:'Underline',alignment:'Alignment',filename:'Name (optional)',edit:'Edit'}}};Redactor.fn=$.Redactor.prototype={keyCode:{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,SPACE:32,ESC:27,TAB:9,CTRL:17,META:91,SHIFT:16,ALT:18,RIGHT:39,LEFT:37,LEFT_WIN:91},init:function(el,options)
-{this.$element=$(el);this.uuid=uuid++;this.rtePaste=false;this.$pasteBox=false;this.loadOptions(options);this.loadModules();this.formatting={};$.merge(this.opts.blockLevelElements,this.opts.alignmentTags);this.reIsBlock=new RegExp('^('+this.opts.blockLevelElements.join('|')+')$','i');this.tidy.setupAllowed();this.lang.load();$.extend(this.opts.shortcuts,this.opts.shortcutsAdd);this.core.setCallback('start');this.start=true;this.build.run();},loadOptions:function(options)
+$.Redactor=Redactor;$.Redactor.VERSION='10.0.9';$.Redactor.modules=['alignment','autosave','block','buffer','build','button','caret','clean','code','core','dropdown','file','focus','image','indent','inline','insert','keydown','keyup','lang','line','link','list','modal','observe','paragraphize','paste','placeholder','progress','selection','shortcuts','tabifier','tidy','toolbar','upload','utils'];$.Redactor.opts={lang:'en',direction:'ltr',plugins:false,focus:false,focusEnd:false,placeholder:false,visual:true,tabindex:false,minHeight:false,maxHeight:false,linebreaks:false,replaceDivs:true,paragraphize:true,cleanStyleOnEnter:false,enterKey:true,cleanOnPaste:true,cleanSpaces:true,pastePlainText:false,autosave:false,autosaveName:false,autosaveInterval:60,autosaveOnChange:false,autosaveFields:false,linkTooltip:true,linkProtocol:'http',linkNofollow:false,linkSize:50,imageEditable:true,imageLink:true,imagePosition:true,imageFloatMargin:'10px',imageResizable:true,imageUpload:null,imageUploadParam:'file',uploadImageField:false,dragImageUpload:true,fileUpload:null,fileUploadParam:'file',dragFileUpload:true,s3:false,convertLinks:true,convertUrlLinks:true,convertImageLinks:true,convertVideoLinks:true,preSpaces:4,tabAsSpaces:false,tabKey:true,scrollTarget:false,toolbar:true,toolbarFixed:true,toolbarFixedTarget:document,toolbarFixedTopOffset:0,toolbarExternal:false,toolbarOverflow:false,source:true,buttons:['html','formatting','bold','italic','deleted','unorderedlist','orderedlist','outdent','indent','image','file','link','alignment','horizontalrule'],buttonsHide:[],buttonsHideOnMobile:[],formatting:['p','blockquote','pre','h1','h2','h3','h4','h5','h6'],formattingAdd:false,tabifier:true,deniedTags:['script','style'],allowedTags:false,removeComments:false,replaceTags:[['strike','del']],replaceStyles:[['font-weight:\\s?bold',"strong"],['font-style:\\s?italic',"em"],['text-decoration:\\s?underline',"u"],['text-decoration:\\s?line-through','del']],removeDataAttr:false,removeAttr:false,allowedAttr:false,removeWithoutAttr:['span'],removeEmpty:['p'],activeButtons:['deleted','italic','bold','underline','unorderedlist','orderedlist','alignleft','aligncenter','alignright','justify'],activeButtonsStates:{b:'bold',strong:'bold',i:'italic',em:'italic',del:'deleted',strike:'deleted',ul:'unorderedlist',ol:'orderedlist',u:'underline'},shortcuts:{'ctrl+shift+m, meta+shift+m':{func:'inline.removeFormat'},'ctrl+b, meta+b':{func:'inline.format',params:['bold']},'ctrl+i, meta+i':{func:'inline.format',params:['italic']},'ctrl+h, meta+h':{func:'inline.format',params:['superscript']},'ctrl+l, meta+l':{func:'inline.format',params:['subscript']},'ctrl+k, meta+k':{func:'link.show'},'ctrl+shift+7':{func:'list.toggle',params:['orderedlist']},'ctrl+shift+8':{func:'list.toggle',params:['unorderedlist']}},shortcutsAdd:false,buffer:[],rebuffer:[],emptyHtml:'
',invisibleSpace:'',imageTypes:['image/png','image/jpeg','image/gif'],indentValue:20,verifiedTags:['a','img','b','strong','sub','sup','i','em','u','small','strike','del','cite','ul','ol','li'],inlineTags:['strong','b','u','em','i','code','del','ins','samp','kbd','sup','sub','mark','var','cite','small'],alignmentTags:['P','H1','H2','H3','H4','H5','H6','DL','DT','DD','DIV','TD','BLOCKQUOTE','OUTPUT','FIGCAPTION','ADDRESS','SECTION','HEADER','FOOTER','ASIDE','ARTICLE'],blockLevelElements:['PRE','UL','OL','LI'],langs:{en:{html:'HTML',video:'Insert Video',image:'Insert Image',table:'Table',link:'Link',link_insert:'Insert link',link_edit:'Edit link',unlink:'Unlink',formatting:'Formatting',paragraph:'Normal text',quote:'Quote',code:'Code',header1:'Header 1',header2:'Header 2',header3:'Header 3',header4:'Header 4',header5:'Header 5',bold:'Bold',italic:'Italic',fontcolor:'Font Color',backcolor:'Back Color',unorderedlist:'Unordered List',orderedlist:'Ordered List',outdent:'Outdent',indent:'Indent',cancel:'Cancel',insert:'Insert',save:'Save',_delete:'Delete',insert_table:'Insert Table',insert_row_above:'Add Row Above',insert_row_below:'Add Row Below',insert_column_left:'Add Column Left',insert_column_right:'Add Column Right',delete_column:'Delete Column',delete_row:'Delete Row',delete_table:'Delete Table',rows:'Rows',columns:'Columns',add_head:'Add Head',delete_head:'Delete Head',title:'Title',image_position:'Position',none:'None',left:'Left',right:'Right',center:'Center',image_web_link:'Image Web Link',text:'Text',mailto:'Email',web:'URL',video_html_code:'Video Embed Code or Youtube/Vimeo Link',file:'Insert File',upload:'Upload',download:'Download',choose:'Choose',or_choose:'Or choose',drop_file_here:'Drop file here',align_left:'Align text to the left',align_center:'Center text',align_right:'Align text to the right',align_justify:'Justify text',horizontalrule:'Insert Horizontal Rule',deleted:'Deleted',anchor:'Anchor',link_new_tab:'Open link in new tab',underline:'Underline',alignment:'Alignment',filename:'Name (optional)',edit:'Edit',upload_label:'Drop file here or '}}};Redactor.fn=$.Redactor.prototype={keyCode:{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,SPACE:32,ESC:27,TAB:9,CTRL:17,META:91,SHIFT:16,ALT:18,RIGHT:39,LEFT:37,LEFT_WIN:91},init:function(el,options)
+{this.$element=$(el);this.uuid=uuid++;this.rtePaste=false;this.$pasteBox=false;this.loadOptions(options);this.loadModules();this.formatting={};$.merge(this.opts.blockLevelElements,this.opts.alignmentTags);this.reIsBlock=new RegExp('^('+this.opts.blockLevelElements.join('|')+')$','i');this.tidy.setupAllowed();if(this.opts.deniedTags!==false)
+{var tags=['html','head','link','body','meta','applet'];for(var i=0;i').append('
');this.utils.replaceWithContents(s);}
+{var $formatted=false;if(this.opts.linebreaks)
+{$(s).prepend('
').append('
');$formatted=this.utils.replaceWithContents(s);}
else
-{this.utils.replaceToTag(s,'p');}},this));return;}}
+{$formatted=this.utils.replaceToTag(s,'p');}
+if($formatted&&typeof this.block.type=='undefined'&&typeof this.block.value=='undefined')
+{$formatted.removeAttr('class').removeAttr('style');}},this));return;}}
this.block.formatWrap(tag);}
else
{var classSize=0;var toggleType=false;if(this.block.type=='class')
@@ -123,7 +134,8 @@ else
var exceptTags=['ul','ol','li','td','th','dl','dt','dd'];$.each(this.block.blocks,$.proxy(function(i,s)
{if($.inArray(s.tagName.toLowerCase(),exceptTags)!=-1)return;var $formatted=this.utils.replaceToTag(s,tag);if(toggleType)
{if(toggleType=='toggle')this.block.toggle($formatted);else if(toggleType=='remove')this.block.remove($formatted);else if(toggleType=='set')this.block.setForce($formatted);}
-else this.block.toggle($formatted);if(tag!='p'&&tag!='blockquote')$formatted.find('img').remove();if(this.block.isRemoveInline)this.utils.removeInlineTags($formatted);if(tag=='p'||this.block.headTag)$formatted.find('p').contents().unwrap();},this));}}},setForce:function($el)
+else this.block.toggle($formatted);if(tag!='p'&&tag!='blockquote')$formatted.find('img').remove();if(this.block.isRemoveInline)this.utils.removeInlineTags($formatted);if(tag=='p'||this.block.headTag)$formatted.find('p').contents().unwrap();if(typeof this.block.type=='undefined'&&typeof this.block.value=='undefined')
+{$formatted.removeAttr('class').removeAttr('style');}},this));}}},setForce:function($el)
{if(this.block.clearStyle)
{$el.removeAttr('class').removeAttr('style');}
if(this.block.type=='class')
@@ -239,7 +251,7 @@ if($.isFunction(this[s].init))this[s].init();},this));},disableMozillaEditing:fu
{var $button=$('').attr('tabindex','-1');if(btnObject.func||btnObject.command||btnObject.dropdown)
{this.button.setEvent($button,btnName,btnObject);}
if(btnObject.dropdown)
-{var $dropdown=$('');$button.data('dropdown',$dropdown);this.dropdown.build(btnName,$dropdown,btnObject.dropdown);}
+{var $dropdown=$('
');$button.data('dropdown',$dropdown);this.dropdown.build(btnName,$dropdown,btnObject.dropdown);}
if(this.utils.isDesktop())
{this.button.createTooltip($button,btnName,btnObject.title);}
return $button;},setEvent:function($button,btnName,btnObject)
@@ -259,7 +271,7 @@ else this[callback](btnName);this.observe.buttons(e,btnName);},get:function(key)
{return this.$toolbar.find('a.re-'+key);},setActive:function(key)
{this.button.get(key).addClass('redactor-act');},setInactive:function(key)
{this.button.get(key).removeClass('redactor-act');},setInactiveAll:function(key)
-{if(typeof key=='undefined')
+{if(typeof key==='undefined')
{this.$toolbar.find('a.re-icon').removeClass('redactor-act');}
else
{this.$toolbar.find('a.re-icon').not('.re-'+key).removeClass('redactor-act');}},setActiveInVisual:function()
@@ -270,11 +282,11 @@ else
{var $button=this.button.get(key);$button.removeClass('redactor-btn-image').addClass('fa-redactor-btn');$button.html('
');},addCallback:function($btn,callback)
{var type=(callback=='dropdown')?'dropdown':'func';var key=$btn.attr('rel');$btn.on('touchstart click',$.proxy(function(e)
{if($btn.hasClass('redactor-button-disabled'))return false;this.button.onClick(e,key,type,callback);},this));},addDropdown:function($btn,dropdown)
-{var key=$btn.attr('rel');this.button.addCallback($btn,'dropdown');var $dropdown=$('
');$btn.data('dropdown',$dropdown);if(dropdown)this.dropdown.build(key,$dropdown,dropdown);return $dropdown;},add:function(key,title)
+{var key=$btn.attr('rel');this.button.addCallback($btn,'dropdown');var $dropdown=$('
');$btn.data('dropdown',$dropdown);if(dropdown)this.dropdown.build(key,$dropdown,dropdown);return $dropdown;},add:function(key,title)
{if(!this.opts.toolbar)return;var btn=this.button.build(key,{title:title});btn.addClass('redactor-btn-image');this.$toolbar.append($('
').append(btn));return btn;},addFirst:function(key,title)
-{if(!this.opts.toolbar)return;var btn=this.button.build(key,{title:title});this.$toolbar.prepend($('').append(btn));return btn;},addAfter:function(afterkey,key,title)
-{if(!this.opts.toolbar)return;var btn=this.button.build(key,{title:title});var $btn=this.button.get(afterkey);if($btn.length!==0)$btn.parent().after($('').append(btn));else this.$toolbar.append($('').append(btn));return btn;},addBefore:function(beforekey,key,title)
-{if(!this.opts.toolbar)return;var btn=this.button.build(key,{title:title});var $btn=this.button.get(beforekey);if($btn.length!==0)$btn.parent().before($('').append(btn));else this.$toolbar.append($('').append(btn));return btn;},remove:function(key)
+{if(!this.opts.toolbar)return;var btn=this.button.build(key,{title:title});btn.addClass('redactor-btn-image');this.$toolbar.prepend($('').append(btn));return btn;},addAfter:function(afterkey,key,title)
+{if(!this.opts.toolbar)return;var btn=this.button.build(key,{title:title});btn.addClass('redactor-btn-image');var $btn=this.button.get(afterkey);if($btn.length!==0)$btn.parent().after($('').append(btn));else this.$toolbar.append($('').append(btn));return btn;},addBefore:function(beforekey,key,title)
+{if(!this.opts.toolbar)return;var btn=this.button.build(key,{title:title});btn.addClass('redactor-btn-image');var $btn=this.button.get(beforekey);if($btn.length!==0)$btn.parent().before($('').append(btn));else this.$toolbar.append($('').append(btn));return btn;},remove:function(key)
{this.button.get(key).remove();}};},caret:function()
{return{setStart:function(node)
{if(!this.utils.isBlock(node))
@@ -324,7 +336,7 @@ this.range.collapse(false);this.selection.addRange();},setToPoint:function(start
{this.caret.setOffset(start,end);},getCoords:function()
{return this.caret.getOffset();}};},clean:function()
{return{onSet:function(html)
-{html=this.clean.savePreCode(html);html=html.replace(/