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

View File

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

View File

@@ -17,8 +17,11 @@
.tox-tbtn:disabled:hover svg { .tox-tbtn:disabled:hover svg {
fill: $gray-300; fill: $gray-300;
} }
.tox-tbtn__select-label { .tox-tbtn__select-label,
color: $col_main_1; .tox-statusbar a,
.tox-statusbar__path-item,
.tox-statusbar__wordcount {
color: $col_main_1;
} }
.tox-toolbar, .tox-toolbar__overflow, .tox-toolbar__primary { .tox-toolbar, .tox-toolbar__overflow, .tox-toolbar__primary {
background: url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23cbbdb5'/%3E%3C/svg%3E") left 0 top 0 #fff; background: url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23cbbdb5'/%3E%3C/svg%3E") left 0 top 0 #fff;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long