1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Fixes #3386 TinyMce wasn't inserting image correctly when pref "resize dimension" width was empty. Fixed TinyMce cancel button.

This commit is contained in:
Cameron
2018-08-26 12:25:08 -07:00
parent db976c931b
commit 9fc35e190c
3 changed files with 12 additions and 10 deletions

View File

@@ -1731,7 +1731,7 @@ class media_admin_ui extends e_admin_ui
<button id='etrigger-submit' type='submit' class='btn btn-success submit e-dialog-save e-dialog-close' data-bbcode='".$options['bbcode']."' data-target='".$this->getQuery('tagid')."' name='save_image' value='Save it' >
<span>".LAN_SAVE."</span>
</button>
<button type='submit' class=' btn btn-default btn-secondary submit e-dialog-close' name='cancel_image' value='Cancel' data-close='true'>
<button type='submit' class=' btn btn-default btn-secondary submit e-dialog-close e-dialog-cancel' name='cancel_image' value='Cancel' data-close='true'>
<span>".LAN_CANCEL."</span>
</button>
</div>";
@@ -2439,14 +2439,15 @@ class media_admin_ui extends e_admin_ui
}
}
}
/**
* @deprecated by $prefs.
* @return bool|void
*/
function settingsPage()
{
return false;
global $pref;
$frm = e107::getForm();

View File

@@ -170,9 +170,9 @@ if((e107::wysiwyg(null, true) === 'tinymce4' && check_class($pref['post_html']))
});
$('.e-dialog-close').click(function(){
$('.e-dialog-cancel').click(function(){
// top.tinymce.activeEditor.windowManager.close();
top.tinymce.activeEditor.windowManager.close();
});

View File

@@ -216,12 +216,13 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
if (path == '') return;
// Only Do width/height styling on bbcodes --
if(width != '' && width !== undefined)
if(width != '' && width != 0 && width !== undefined)
{
console.log('Width: '+ width);
style = style + 'width:' + width + 'px;';
}
if(height != '' && height !== undefined)
if(height != '' && height != 0 && height !== undefined)
{
style = style + 'height:' + height + 'px;';
}