Commit b4735457 authored by Mab's avatar Mab

Merge branch 'ccomptes/recette' into ccomptes/master

parents 1d7b8f95 2a5adf31
......@@ -66,6 +66,7 @@ import QuoteMarksPackage from './elements/quote_mark/QuoteMarksPackage'
import ListPackage from './elements/list/ListPackage'
import TablePackage from './elements/table/TablePackage'
import InlineNotePackage from './elements/inline_note/InlineNotePackage'
import PlaceholderPackage from './elements/placeholder/PlaceholderPackage'
// import DiacriticsPackage from './elements/diacritics/DiacriticsPackage'
// import SpellCheckTogglePackage from './elements/spellcheck_toggle/SpellCheckTogglePackage'
// import ChangeCasePackage from './elements/change_case/ChangeCasePackage'
......@@ -114,7 +115,9 @@ const config = {
config.import(HeadingPackage)
config.import(RecommandationPackage)
config.import(ApostilPackage)
config.import(RiopPackage)
config.import(PlaceholderPackage)
config.import(SignaturePackage)
config.import(GlossaryPackage)
// config.import(ChapterSubtitlePackage)
......
......@@ -6,8 +6,6 @@ $white: #fff;
.sc-track-change-add {
color: $blue;
font-family: 'Visible-Spaces', 'Vollkorn';
font-variant-ligatures: contextual; // for the spacing ligature to work
// font-variant-ligatures: no-contextual; // or to hide ligatures. (we need those for now)
line-height: 0;
text-decoration: none;
......@@ -43,7 +41,6 @@ $white: #fff;
.sc-track-add-show {
color: inherit !important;
font-family: 'Vollkorn';
.sc-accept-reject-container {
display: none;
......
......@@ -24,13 +24,13 @@ export default {
commandGroup: 'front-matter-a',
})
config.addLabel('chapter-title-part', {
en: 'Titre',
en: 'Titre Chapitre',
})
config.addLabel('chapter-title-chapter', {
en: 'Titre',
en: 'Titre Chapitre',
})
config.addLabel('front-chapter-title', {
en: 'Titre',
en: 'Titre Chapitre',
})
config.addProvider('chapterTitleProvider', ChapterTitleProvider)
......
......@@ -11,10 +11,6 @@ export default {
config.addComponent(Heading.type, HeadingComponent)
config.addConverter('html', HeadingHTMLConverter)
config.addCommand('heading1-part', WaxSwitchTextTypeCommand, {
spec: { type: 'heading', level: 1 },
commandGroup: 'text-display-part',
})
config.addCommand('heading2-part', WaxSwitchTextTypeCommand, {
spec: { type: 'heading', level: 2 },
commandGroup: 'text-display-part',
......@@ -23,18 +19,6 @@ export default {
spec: { type: 'heading', level: 3 },
commandGroup: 'text-display-part',
})
config.addCommand('heading1-chapter--unnumbered', WaxSwitchTextTypeCommand, {
spec: { type: 'heading', level: 1, suffixes: 'unnumbered' },
commandGroup: 'text-display-chapter',
})
config.addCommand('heading2-chapter--unnumbered', WaxSwitchTextTypeCommand, {
spec: { type: 'heading', level: 2, suffixes: 'unnumbered' },
commandGroup: 'text-display-chapter',
})
config.addCommand('heading1-chapter', WaxSwitchTextTypeCommand, {
spec: { type: 'heading', level: 1, suffixes: '' },
commandGroup: 'text-display-chapter',
})
config.addCommand('heading2-chapter', WaxSwitchTextTypeCommand, {
spec: { type: 'heading', level: 2, suffixes: '' },
commandGroup: 'text-display-chapter',
......@@ -86,31 +70,15 @@ export default {
spec: { type: 'heading', level: 3 },
commandGroup: 'text-display-back',
})
config.addLabel('heading1-part', {
en: 'Titre 1',
})
config.addLabel('heading2-part', {
en: 'Titre 2',
})
config.addLabel('heading3-part', {
en: 'Titre 3',
})
config.addLabel('heading1-chapter--unnumbered', {
en: 'Titre 1 - Non numéroté'
})
config.addLabel('heading2-chapter--unnumbered', {
en: 'Titre 2 - Non numéroté'
})
config.addLabel('heading1-chapter', {
en: 'Titre 1',
})
config.addLabel('heading2-chapter', {
en: 'Titre 2',
})
// config.addLabel('heading2-observation-chapter', {
// en: 'Titre 2 - Observation'
// })
config.addLabel('heading3-chapter', {
en: 'Titre 3',
})
......@@ -120,17 +88,9 @@ export default {
config.addLabel('heading5-chapter', {
en: 'Titre 5',
})
config.addLabel('heading1-front', {
en: 'Titre 1',
})
config.addLabel('heading2-front', {
en: 'Titre 2',
})
config.addLabel('heading1-back', {
en: 'Titre 1',
})
config.addLabel('heading2-back', {
en: 'Titre 2',
})
......
......@@ -19,4 +19,5 @@
@import './apostil/apostil';
@import './riop/riop';
@import './recommandation/recommandation';
@import './boxed_text/boxedText';
\ No newline at end of file
@import './boxed_text/boxedText';
@import './placeholder/placeholder';
\ No newline at end of file
import { InsertNodeCommand } from 'substance'
class InsertPlaceholderCommand extends InsertNodeCommand {
getCommandState(params, context) {
const sel = params.selection
const newState = {
disabled: true,
active: false,
}
const { surface } = params
if (surface && surface.props.textCommands) {
if (
!['full', this.name].some(
e => surface.props.textCommands.indexOf(e) !== -1,
) ||
surface.props.editing === 'selection'
) {
newState.disabled = true
return newState
}
}
if (sel && !sel.isNull() && !sel.isCustomSelection() && sel.containerId) {
newState.disabled = false
}
newState.showInContext = this.showInContext(sel, params, context)
return newState
}
createNodeData() {
return {
type: 'placeholder',
}
}
}
export default InsertPlaceholderCommand
\ No newline at end of file
import { BlockNode } from 'substance'
class Placeholder extends BlockNode {}
Placeholder.type = 'placeholder'
export default Placeholder
import { Component } from 'substance'
class PlaceholderComponent extends Component {
render($$) {
const el = $$('placeholder').append(
'-- Emplacement de la table de recommandation --',
)
return el
}
}
export default PlaceholderComponent
export default {
type: 'placeholder',
tagName: 'placeholder',
import: function(el, node, converter) {},
export: function(node, el) {},
}
import { Tool } from 'substance'
import PlaceHolder from './Placeholder'
import PlaceHolderComponent from './PlaceholderComponent'
import PlaceholderHTMLConverter from './PlaceholderHTMLConverter'
import InsertPlaceholderCommand from './InsertPlaceholderCommand'
export default {
name: 'ornament',
configure: config => {
config.addNode(PlaceHolder)
config.addComponent(PlaceHolder.type, PlaceHolderComponent)
config.addCommand('placeholder', InsertPlaceholderCommand, {
nodeType: 'placeholder',
commandGroup: 'placeholder',
})
config.addConverter('html', PlaceholderHTMLConverter)
config.addTool('placeholder', Tool)
config.addIcon('placeholder', { fontawesome: 'fa-id-card-o' })
config.addLabel('placeholder', 'Ajouter table des recommandations')
},
}
\ No newline at end of file
placeholder{
display: block;
background: #92bdee;
text-align: center;
font-size: 18px;
}
\ No newline at end of file
......@@ -4,7 +4,7 @@ class TableOfContentsComponent extends Component {
render($$) {
const el = $$('div')
.addClass('ornament-seperator')
.append('-- Table des matières --')
.append('-- Emplacement de la table des matières --')
return el
}
}
......
......@@ -18,4 +18,4 @@ export default {
config.addIcon('table-of-contents', { fontawesome: 'fa-list-alt' })
config.addLabel('table-of-contents', 'Ajouter table des matières')
},
}
}
\ No newline at end of file
......@@ -139,6 +139,10 @@ $white: #fff;
color: #505F79;
}
.fa-list-alt:before {
content: "\e1b2";
}
.fa-save:before,
.fa-undo:before,
.fa-repeat:before,
......@@ -148,6 +152,8 @@ $white: #fff;
.fa-quote-left:before,
.fa-link:before,
.fa-image:before,
.fa-list-alt:before,
.fa-id-card-o:before,
.fa-bookmark:before,
.fa-search:before,
.fa-pagelines:before {
......@@ -193,6 +199,16 @@ $white: #fff;
content: "\e410";
}
// table des matieres icon
.fa-list-alt:before {
content: "\e1b2";
}
// table de recommandations icon
.fa-id-card-o:before {
content: "\e05c";
}
.fa-bookmark:before {
content: "\e866";
top: 4px;
......
......@@ -79,6 +79,13 @@ export default {
style: 'minimal',
commandGroups: ['ornament'],
},
{
name: 'placeholder',
type: 'tool-group',
showDisabled: true,
style: 'minimal',
commandGroups: ['placeholder'],
},
{
name: 'table-of-contents',
type: 'tool-group',
......
......@@ -321,11 +321,10 @@ $color-grey: #828282;
// ornament-seperator
.wax-e-editoria .ornament-seperator {
background: #fff;
font-size: 22px;
display: block;
background: #92bdee;
text-align: center;
padding-top: 12px;
user-select: none;
font-size: 18px;
}
//link
......
......@@ -170,7 +170,7 @@ $color-grey: #828282;
// word-spacing: 0.1ch;
}
// apostil
// boxed-text
.wax-e-editoria .sc-boxed-text {
display: block;
border-style: solid;
......@@ -185,7 +185,7 @@ $color-grey: #828282;
}
// apostil
// recommandation
.wax-e-editoria .sc-recommandation {
display: block;
color: green;
......@@ -1041,15 +1041,6 @@ $color-grey: #828282;
font-variant-caps: small-caps;
}
// ornament-seperator
.wax-e-editoria .ornament-seperator {
background: #fff;
font-size: 22px;
text-align: center;
padding-top: 12px;
user-select: none;
}
//link
.wax-e-editoria .sc-link {
......
......@@ -164,20 +164,16 @@ $note-blue: #4990e2;
text-decoration: underline;
}
.sc-heading.sm-level-1::before {
content: counter(cc_counter-h1) ". ";
}
.sc-heading.sm-level-2::before {
content: counter(cc_counter-h1) "." counter(cc_counter-h2) ". ";
content: counter(cc_counter-h2) ". ";
}
.sc-heading.sm-level-3::before {
content: counter(cc_counter-h1) "." counter(cc_counter-h2) "." counter(cc_counter-h3) ". ";
content: counter(cc_counter-h2) "." counter(cc_counter-h3) ". ";
}
.sc-heading.sm-level-4::before {
content: counter(cc_counter-h1) "." counter(cc_counter-h2) "." counter(cc_counter-h3) "." counter(cc_counter-h4) ". ";
content: counter(cc_counter-h2) "." counter(cc_counter-h3) "." counter(cc_counter-h4) ". ";
}
.sc-heading.sm-level-2-observation {
......@@ -322,12 +318,10 @@ $note-blue: #4990e2;
// ornament-seperator
.wax-e-ucp .ornament-seperator {
font-size: 22px;
display: block;
background: #92bdee;
text-align: center;
padding-top: 12px;
user-select: none;
z-index: 100000;
position: relative;
font-size: 18px;
}
.wax-e-ucp .sc-isolated-node.sm-default-style.sm-selected {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment