mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-07 20:40:26 +08:00
Merge branch 'develop' into ai-sci-6970-step-rearranging-fixes
This commit is contained in:
commit
186f892288
7 changed files with 18 additions and 7 deletions
|
@ -17,15 +17,20 @@
|
||||||
.step-element-header {
|
.step-element-header {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
flex-basis: 80%;
|
flex-basis: 80%;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
.step-name-edit-icon {
|
.step-name-edit-icon {
|
||||||
display: none;
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
right: -8px;
|
||||||
|
top: -6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover .step-name-edit-icon {
|
&:hover .step-name-edit-icon {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
|
margin-top: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.step-collapse-link {
|
.step-collapse-link {
|
||||||
|
@ -223,7 +228,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.step-element-header {
|
.step-element-header {
|
||||||
align-items: center;
|
align-items: flex-start;
|
||||||
display: flex;
|
display: flex;
|
||||||
min-height: 40px;
|
min-height: 40px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div ref="modal" @keydown.esc="cancel" class="modal" id="modalDestroyProtocolContent" tabindex="-1" role="dialog">
|
<div ref="modal" @keydown.esc="cancel" class="modal" id="modalDestroyProtocolContent" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog modal-sm" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div ref="modal" @keydown.esc="cancel" class="modal" tabindex="-1" role="dialog">
|
<div ref="modal" @keydown.esc="cancel" class="modal" tabindex="-1" role="dialog">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog modal-sm" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
|
|
|
@ -96,7 +96,7 @@
|
||||||
<div v-if="urls.update_url" class="step-actions-container">
|
<div v-if="urls.update_url" class="step-actions-container">
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<button class="btn btn-light dropdown-toggle insert-button" type="button" :id="'stepInserMenu_' + step.id" data-toggle="dropdown" data-display="static" aria-haspopup="true" aria-expanded="true">
|
<button class="btn btn-light dropdown-toggle insert-button" type="button" :id="'stepInserMenu_' + step.id" data-toggle="dropdown" data-display="static" aria-haspopup="true" aria-expanded="true">
|
||||||
<i class="fas fa-ellipsis-v"></i>
|
<i class="fas fa-ellipsis-h"></i>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu dropdown-menu-right insert-element-dropdown" :aria-labelledby="'stepInserMenu_' + step.id">
|
<ul class="dropdown-menu dropdown-menu-right insert-element-dropdown" :aria-labelledby="'stepInserMenu_' + step.id">
|
||||||
<li class="title">
|
<li class="title">
|
||||||
|
|
|
@ -174,8 +174,7 @@
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// create item, then append next one
|
// create item, then append next one
|
||||||
this.postItem(item);
|
this.postItem(item, this.addItem);
|
||||||
this.addItem();
|
|
||||||
}
|
}
|
||||||
this.update();
|
this.update();
|
||||||
},
|
},
|
||||||
|
|
|
@ -17,12 +17,14 @@
|
||||||
:value="element.attributes.orderable.text"
|
:value="element.attributes.orderable.text"
|
||||||
:value_html="element.attributes.orderable.text_view"
|
:value_html="element.attributes.orderable.text_view"
|
||||||
:placeholder="element.attributes.orderable.placeholder"
|
:placeholder="element.attributes.orderable.placeholder"
|
||||||
|
:inEditMode="inEditMode"
|
||||||
:updateUrl="element.attributes.orderable.urls.update_url"
|
:updateUrl="element.attributes.orderable.urls.update_url"
|
||||||
:objectType="'StepText'"
|
:objectType="'StepText'"
|
||||||
:objectId="element.attributes.orderable.id"
|
:objectId="element.attributes.orderable.id"
|
||||||
:fieldName="'step_text[text]'"
|
:fieldName="'step_text[text]'"
|
||||||
:lastUpdated="element.attributes.orderable.updated_at"
|
:lastUpdated="element.attributes.orderable.updated_at"
|
||||||
:characterLimit="100000"
|
:characterLimit="100000"
|
||||||
|
:inEditMode="isNew"
|
||||||
@update="update"
|
@update="update"
|
||||||
@editingDisabled="disableEditMode"
|
@editingDisabled="disableEditMode"
|
||||||
@editingEnabled="enableEditMode"
|
@editingEnabled="enableEditMode"
|
||||||
|
|
|
@ -106,6 +106,11 @@
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
if (this.inEditMode) {
|
||||||
|
this.initTinymce();
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initTinymce() {
|
initTinymce() {
|
||||||
let textArea = `#${this.objectType}_textarea_${this.objectId}`;
|
let textArea = `#${this.objectType}_textarea_${this.objectId}`;
|
||||||
|
@ -126,7 +131,7 @@
|
||||||
initCharacterCount() {
|
initCharacterCount() {
|
||||||
this.characterCount = $(this.editorInstance.getContent()).text().length
|
this.characterCount = $(this.editorInstance.getContent()).text().length
|
||||||
|
|
||||||
this.editorInstance.on('input', (e) => {
|
this.editorInstance.on('input paste', (e) => {
|
||||||
this.characterCount = e.currentTarget.innerText.length
|
this.characterCount = e.currentTarget.innerText.length
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue