@osfarm/itineraire-technique 1.1.13 → 1.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/styles-editor.css +1 -1
- package/css/styles-editor.css.map +1 -1
- package/editor.html +4 -0
- package/js/editor-wiki-editor.js +8 -0
- package/package.json +1 -1
- package/scss/styles-editor.scss +44 -34
package/css/styles-editor.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.main-header{background-color:#6fa76f;color:#fff;height:3rem;display:flex;align-items:center}.main-header .btn.show,.main-header .btn:first-child:active,.main-header :not(.btn-check)+.btn:active{background-color:#026602}.editor-view{overflow-y:auto;height:calc(100vh - 4rem)}.rotation_item .step-edit{color:#878787;cursor:pointer;display:none;margin-left:10px;font-size:70%;vertical-align:super}.rotation_item:hover .step-edit{display:inline !important}.welcome-view{background-color:#6fa76f;color:#fff;padding:1rem;margin-top:1rem;border-radius:1rem}.welcome-view #cropsContainer{color:green}.card-white{background-color:#fff;padding:1rem;border-radius:1rem}.card-holder{background-color:#f5f5f5;padding:1rem;border-radius:1rem;margin:auto}.editable-row{background-color:#f7f7f7;min-height:3rem;display:flex;align-items:center;border-radius:.5rem}.editable-row .edit-buttons{visibility:hidden}.editable-row:hover>.edit-buttons{visibility:visible}.intervention-row{background:#e0e0e0}.primary-button{color:#fff;background-color:green;border:green}.primary-button:hover{background-color:#026602}.close-step-times{background:none;border:none;color:#878787;font-size:120%}.close-step-times:hover{color:#494949}#cropsContainer .drag-handle{color:#ccc;font-weight:normal;font-size:86%;margin-right:10px;vertical-align:middle;cursor:grab}.form-control.text-right{text-align:right}.modal .form-label{font-weight:600}/*# sourceMappingURL=styles-editor.css.map */
|
|
1
|
+
.main-header{background-color:#6fa76f;color:#fff;height:3rem;display:flex;align-items:center}.main-header .btn.show,.main-header .btn:first-child:active,.main-header :not(.btn-check)+.btn:active{background-color:#026602}.editor-view{overflow-y:auto;height:calc(100vh - 4rem)}.rotation_item .step-edit{color:#878787;cursor:pointer;display:none;margin-left:10px;font-size:70%;vertical-align:super}.rotation_item:hover .step-edit{display:inline !important}.welcome-view{background-color:#6fa76f;color:#fff;padding:1rem;margin-top:1rem;border-radius:1rem}.welcome-view #cropsContainer{color:green}.card-white{background-color:#fff;padding:1rem;border-radius:1rem}.card-holder{background-color:#f5f5f5;padding:1rem;border-radius:1rem;margin:auto}.editable-row{background-color:#f7f7f7;min-height:3rem;display:flex;align-items:center;border-radius:.5rem}.editable-row .edit-buttons{visibility:hidden}.editable-row:hover>.edit-buttons{visibility:visible}.intervention-row{background:#e0e0e0}.primary-button{color:#fff;background-color:green;border:green}.primary-button:hover{background-color:#026602}.close-step-times{background:none;border:none;color:#878787;font-size:120%}.close-step-times:hover{color:#494949}#cropsContainer .drag-handle{color:#ccc;font-weight:normal;font-size:86%;margin-right:10px;vertical-align:middle;cursor:grab}.form-control.text-right{text-align:right}.modal .form-label{font-weight:600}#code-snippet{font-family:monospace;font-size:13px;text-align:left;border:1px inset;background-color:#f1f1f1}/*# sourceMappingURL=styles-editor.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../scss/styles-editor.scss"],"names":[],"mappings":"AAKA,aACI,yBACA,WACA,
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../scss/styles-editor.scss"],"names":[],"mappings":"AAKA,aACI,yBACA,WACA,OALiB,KAOjB,aACA,mBAEA,sGAGI,yBAIR,aACI,gBAGA,0BAKA,0BACI,cACA,eACA,aACA,iBACA,cACA,qBAGJ,gCACI,0BAIR,cACI,yBACA,WACA,aACA,gBACA,mBAEA,8BACI,YAIR,YACI,sBACA,aACA,mBAGJ,aACI,yBACA,aACA,mBACA,YAGJ,cACI,yBACA,gBAEA,aACA,mBAEA,oBAEA,4BACI,kBAGJ,kCACI,mBAIR,kBACI,mBAGJ,gBACI,MAzFiB,KA0FjB,iBA5FiB,MA6FjB,OA7FiB,MA+FjB,sBACI,iBA/Fa,QAmGrB,kBACI,gBACA,YACA,cACA,eAEA,wBACI,cAIR,6BACI,WACA,mBACA,cACA,kBACA,sBACA,YAIA,yBACI,iBAKJ,mBACI,gBAIR,cACI,sBACA,eACA,gBACA,iBACA","file":"styles-editor.css"}
|
package/editor.html
CHANGED
|
@@ -360,6 +360,10 @@
|
|
|
360
360
|
<label for="stepsTitle" class="form-label">Titre des étapes de la rotation</label>
|
|
361
361
|
<input type="text" class="form-control" id="stepsTitle" value="Étapes de la rotation dans la parcelle">
|
|
362
362
|
</div>
|
|
363
|
+
<div class="mb-3 d-none" id="codeSnippetDiv">
|
|
364
|
+
<label for="code-snippet" class="form-label">Code à insérer dans la page</label>
|
|
365
|
+
<textarea readonly class="form-control-plaintext" id="code-snippet" rows="5"></textarea>
|
|
366
|
+
</div>
|
|
363
367
|
</div>
|
|
364
368
|
|
|
365
369
|
<!-- Plot context -->
|
package/js/editor-wiki-editor.js
CHANGED
|
@@ -36,6 +36,14 @@ class WikiEditor {
|
|
|
36
36
|
sm.setAsEdited();
|
|
37
37
|
});
|
|
38
38
|
reloadCropsFromJson(content);
|
|
39
|
+
|
|
40
|
+
let codeSnippet = `{{Graphique Triple Performance \n| title=${content.title} \n| json=${self.pageTitle} \n| type=Rotation }}`;
|
|
41
|
+
$('#code-snippet').val(codeSnippet).on('focus', function() {
|
|
42
|
+
$(this).select();
|
|
43
|
+
});
|
|
44
|
+
$('#codeSnippetDiv').removeClass('d-none');
|
|
45
|
+
|
|
46
|
+
|
|
39
47
|
} catch (e) {
|
|
40
48
|
console.error("Erreur lors de l'analyse du JSON de la page :", e);
|
|
41
49
|
$('#jsonErrorMessage').text("Le contenu de la page n'est pas un JSON valide.");
|
package/package.json
CHANGED
package/scss/styles-editor.scss
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
$button-color: green;
|
|
1
|
+
$button-color : green;
|
|
2
2
|
$button-hover-color: rgb(2, 102, 2);
|
|
3
|
-
$button-text-color: white;
|
|
4
|
-
$header-height: 3rem;
|
|
3
|
+
$button-text-color : white;
|
|
4
|
+
$header-height : 3rem;
|
|
5
5
|
|
|
6
6
|
.main-header {
|
|
7
7
|
background-color: #6fa76f;
|
|
8
|
-
color: white;
|
|
9
|
-
height: $header-height;
|
|
8
|
+
color : white;
|
|
9
|
+
height : $header-height;
|
|
10
10
|
|
|
11
|
-
display: flex;
|
|
11
|
+
display : flex;
|
|
12
12
|
align-items: center;
|
|
13
13
|
|
|
14
|
-
.btn.show,
|
|
14
|
+
.btn.show,
|
|
15
|
+
.btn:first-child:active,
|
|
16
|
+
:not(.btn-check)+.btn:active {
|
|
15
17
|
background-color: #026602;
|
|
16
18
|
}
|
|
17
19
|
}
|
|
@@ -26,11 +28,11 @@ $header-height: 3rem;
|
|
|
26
28
|
// Add a button in the rotation to edit right from the transcript
|
|
27
29
|
.rotation_item {
|
|
28
30
|
.step-edit {
|
|
29
|
-
color: #878787;
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
display:none;
|
|
32
|
-
margin-left: 10px;
|
|
33
|
-
font-size: 70%;
|
|
31
|
+
color : #878787;
|
|
32
|
+
cursor : pointer;
|
|
33
|
+
display : none;
|
|
34
|
+
margin-left : 10px;
|
|
35
|
+
font-size : 70%;
|
|
34
36
|
vertical-align: super;
|
|
35
37
|
}
|
|
36
38
|
|
|
@@ -41,10 +43,10 @@ $header-height: 3rem;
|
|
|
41
43
|
|
|
42
44
|
.welcome-view {
|
|
43
45
|
background-color: #6fa76f;
|
|
44
|
-
color: white;
|
|
45
|
-
padding: 1rem;
|
|
46
|
-
margin-top: 1rem;
|
|
47
|
-
border-radius: 1rem;
|
|
46
|
+
color : white;
|
|
47
|
+
padding : 1rem;
|
|
48
|
+
margin-top : 1rem;
|
|
49
|
+
border-radius : 1rem;
|
|
48
50
|
|
|
49
51
|
#cropsContainer {
|
|
50
52
|
color: green;
|
|
@@ -53,22 +55,22 @@ $header-height: 3rem;
|
|
|
53
55
|
|
|
54
56
|
.card-white {
|
|
55
57
|
background-color: white;
|
|
56
|
-
padding: 1rem;
|
|
57
|
-
border-radius: 1rem;
|
|
58
|
+
padding : 1rem;
|
|
59
|
+
border-radius : 1rem;
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
.card-holder {
|
|
61
63
|
background-color: whitesmoke;
|
|
62
|
-
padding: 1rem;
|
|
63
|
-
border-radius: 1rem;
|
|
64
|
-
margin: auto
|
|
64
|
+
padding : 1rem;
|
|
65
|
+
border-radius : 1rem;
|
|
66
|
+
margin : auto
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
.editable-row {
|
|
68
70
|
background-color: #f7f7f7;
|
|
69
|
-
min-height: 3rem;
|
|
71
|
+
min-height : 3rem;
|
|
70
72
|
|
|
71
|
-
display: flex;
|
|
73
|
+
display : flex;
|
|
72
74
|
align-items: center;
|
|
73
75
|
|
|
74
76
|
border-radius: 0.5rem;
|
|
@@ -77,7 +79,7 @@ $header-height: 3rem;
|
|
|
77
79
|
visibility: hidden;
|
|
78
80
|
}
|
|
79
81
|
|
|
80
|
-
&:hover
|
|
82
|
+
&:hover>.edit-buttons {
|
|
81
83
|
visibility: visible;
|
|
82
84
|
}
|
|
83
85
|
}
|
|
@@ -87,9 +89,9 @@ $header-height: 3rem;
|
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
.primary-button {
|
|
90
|
-
color: $button-text-color;
|
|
92
|
+
color : $button-text-color;
|
|
91
93
|
background-color: $button-color;
|
|
92
|
-
border: $button-color;
|
|
94
|
+
border : $button-color;
|
|
93
95
|
|
|
94
96
|
&:hover {
|
|
95
97
|
background-color: $button-hover-color;
|
|
@@ -98,9 +100,9 @@ $header-height: 3rem;
|
|
|
98
100
|
|
|
99
101
|
.close-step-times {
|
|
100
102
|
background: none;
|
|
101
|
-
border: none;
|
|
102
|
-
color: #878787;
|
|
103
|
-
font-size: 120%;
|
|
103
|
+
border : none;
|
|
104
|
+
color : #878787;
|
|
105
|
+
font-size : 120%;
|
|
104
106
|
|
|
105
107
|
&:hover {
|
|
106
108
|
color: #494949;
|
|
@@ -108,12 +110,12 @@ $header-height: 3rem;
|
|
|
108
110
|
}
|
|
109
111
|
|
|
110
112
|
#cropsContainer .drag-handle {
|
|
111
|
-
color: #CCC;
|
|
112
|
-
font-weight: normal;
|
|
113
|
-
font-size: 86%;
|
|
114
|
-
margin-right: 10px;
|
|
113
|
+
color : #CCC;
|
|
114
|
+
font-weight : normal;
|
|
115
|
+
font-size : 86%;
|
|
116
|
+
margin-right : 10px;
|
|
115
117
|
vertical-align: middle;
|
|
116
|
-
cursor: grab;
|
|
118
|
+
cursor : grab;
|
|
117
119
|
}
|
|
118
120
|
|
|
119
121
|
.form-control {
|
|
@@ -126,4 +128,12 @@ $header-height: 3rem;
|
|
|
126
128
|
.form-label {
|
|
127
129
|
font-weight: 600;
|
|
128
130
|
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
#code-snippet {
|
|
134
|
+
font-family : monospace;
|
|
135
|
+
font-size : 13px;
|
|
136
|
+
text-align : left;
|
|
137
|
+
border : 1px inset;
|
|
138
|
+
background-color: #f1f1f1;
|
|
129
139
|
}
|