fix page exits

This commit is contained in:
2020-03-05 22:07:06 +01:00
parent f9d413a6d7
commit f699ae3406
5 changed files with 18 additions and 12 deletions

View File

@@ -13,7 +13,7 @@
</div>
<div id="notes_box" class="col-9 h-100">
<div id="notes_feedback"></div>
<form id="notes" method="post"><textarea id="tiny"></textarea></form>
<form id="notes" method="post"><i class="fa fa-2x fa-loading" style="position:absolute;"></i><textarea id="tiny"></textarea></form>
</div>
</div>
<div class="template-items">
@@ -53,6 +53,7 @@ oCATC.pageInit = function(asHash, bFirstPage) {
autosave_interval: "10s",
setup: function(ed) {
ed.on('init', function(e) {
$('.fa-loading').hide();
Tools.ajax(
'get_note',
(asData) => {
@@ -107,11 +108,14 @@ oCATC.pageInit = function(asHash, bFirstPage) {
};
oCATC.onSamePageMove = function(asHash) {
tinymce.remove();
return true;
};
oCATC.onQuitPage = function(sExitMode) {
return save(true, (sExitMode==self.consts.exitmodes.closing));
save(true, (sExitMode == self.consts.exitmodes.closing));
tinymce.remove();
return true;
};
function loadDocs() {
@@ -175,7 +179,7 @@ function save(bForce, bOnUnload) {
var sContent = tinymce.activeEditor.getContent();
if(self.tmp('id_course') != 0) {
self.tmp('saving', true);
noteFeedback('info', 'Saving...');
if($.type(noteFeedback)=='function') noteFeedback('info', 'Saving...');
Tools.ajax(
'set_note',
function(asData) {

View File

@@ -37,18 +37,17 @@
#notes_feedback {
position: absolute;
top: 0;
bottom: 0;
right: 0;
height: 39px;
width: 350px;
text-align: right;
z-index: 1000;
.alert {
font-size: 0.8em;
font-size: 10px;
margin: 0;
padding: 0 13px;
line-height: 39px;
padding: 0 18px;
line-height: 18px;
&.note-error {
color: $col_main_2;

View File

@@ -17,7 +17,10 @@
.tox-tbtn:disabled:hover svg {
fill: $gray-300;
}
.tox-tbtn__select-label {
.tox-tbtn__select-label,
.tox-statusbar a,
.tox-statusbar__path-item,
.tox-statusbar__wordcount {
color: $col_main_1;
}
.tox-toolbar, .tox-toolbar__overflow, .tox-toolbar__primary {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long