Skip to content

Commit d046a34

Browse files
committed
Fix bug toolbar buttons doens't hide after tab preview clicked & update z-index of icon.expand-editor.
1 parent 76e8ec9 commit d046a34

File tree

9 files changed

+29
-23
lines changed

9 files changed

+29
-23
lines changed

martor/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
22

3-
__VERSION__ = '1.5.7'
3+
__VERSION__ = '1.5.8'
44
__AUTHOR__ = 'Agus Makmun (Summon Agus)'
55
__AUTHOR_EMAIL__ = '[email protected]'

martor/static/martor/css/martor-admin.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

martor/static/martor/css/martor.bootstrap.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ div.martor-preview-stale {
120120
position: absolute;
121121
bottom: -8px;
122122
right: 8px;
123+
z-index: 100;
123124
}
124125
.no-border {
125126
border: none!important;

martor/static/martor/css/martor.bootstrap.min.css

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

martor/static/martor/css/martor.semantic.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

martor/static/martor/js/martor.bootstrap.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* Name : Martor v1.5.7
2+
* Name : Martor v1.5.8
33
* Created by : Agus Makmun (Summon Agus)
4-
* Release date : 16-Sep-2020
4+
* Release date : 05-Oct-2020
55
* License : GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
66
* Repository : https://github.com/agusmakmun/django-markdown-editor
77
**/
@@ -145,7 +145,18 @@
145145

146146
// update the preview if this menu is clicked
147147
var currentTab = $('.tab-pane#nav-preview-'+field_name);
148+
var editorTabButton = $('.nav-link#nav-editor-tab-'+field_name);
148149
var previewTabButton = $('.nav-link#nav-preview-tab-'+field_name);
150+
var toolbarButtons = $(this).closest('.tab-martor-menu').find('.martor-toolbar')
151+
152+
editorTabButton.click(function(){
153+
// show the `.martor-toolbar` for this current editor if under preview.
154+
$(this).closest('.tab-martor-menu').find('.martor-toolbar').show();
155+
});
156+
previewTabButton.click(function() {
157+
$(this).closest('.tab-martor-menu').find('.martor-toolbar').hide();
158+
});
159+
149160
var refreshPreview = function() {
150161
var value = textareaId.val();
151162
var form = new FormData();
@@ -194,12 +205,6 @@
194205
editor.on('change', refreshPreview);
195206
}
196207

197-
var editorTabButton = $('.nav-link#nav-preview-tab-'+field_name);
198-
editorTabButton.click(function(){
199-
// show the `.martor-toolbar` for this current editor if under preview.
200-
$(this).closest('.tab-martor-menu').find('.martor-toolbar').show();
201-
});
202-
203208
if (editorConfig.spellcheck == 'true') {
204209
try {
205210
enable_spellcheck(editorId);

martor/static/martor/js/martor.bootstrap.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

martor/static/martor/js/martor.semantic.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* Name : Martor v1.5.7
2+
* Name : Martor v1.5.8
33
* Created by : Agus Makmun (Summon Agus)
4-
* Release date : 16-Sep-2020
4+
* Release date : 05-Oct-2020
55
* License : GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
66
* Repository : https://github.com/agusmakmun/django-markdown-editor
77
**/

martor/static/martor/js/martor.semantic.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)