composer is almost finished, ramins to record compos order through ajax

This commit is contained in:
Bachir Soussi Chiadmi
2018-03-26 21:21:00 +02:00
parent 0fedff7573
commit 90c9c68dcd
26 changed files with 1048 additions and 89 deletions
@@ -147,10 +147,15 @@
this.setSRC(this.historic[this.currentHistoricIndex].audio_url);
this.loadNode(this.historic[this.currentHistoricIndex].nid);
// emmit new playing doc (e.g.: corpus map nowing that audio played from RandomPlayer)
_$corpus_canvas.trigger({
'type':'audio-node-opened',
'nid':this.historic[this.currentHistoricIndex].nid
});
try {
_$corpus_canvas.trigger({
'type':'audio-node-opened',
'nid':this.historic[this.currentHistoricIndex].nid
});
} catch (e) {
console.warn('AudioPlayer : _$corpus_canvas does not exists');
}
this.showHidePreviousBtn();
this.showHideNextBtn();
this.show();
@@ -1100,6 +1100,9 @@ body, html {
margin: 0;
padding: 0; }
body.toolbar-horizontal.toolbar-themes.toolbar-no-tabs {
padding-top: 24px !important; }
header[role="banner"] {
z-index: 2;
position: relative;
@@ -1136,7 +1139,7 @@ main[role="main"] {
padding: 7em 2em 9em;
overflow: hidden;
pointer-events: none;
height: auto; }
height: 100%; }
main[role="main"] .layout-content {
width: 100%;
height: 100%;
@@ -1144,8 +1147,8 @@ main[role="main"] {
main[role="main"] .layout-content > * {
pointer-events: auto; }
body[corpus-map="ready"] main[role="main"] {
height: 100%; }
body.toolbar-horizontal.toolbar-themes.toolbar-no-tabs main[role="main"] {
padding-top: 8em; }
footer[role="contentinfo"] {
z-index: 2;
@@ -1567,7 +1570,8 @@ main[role="main"] span.close-col-btn {
#studio-ui .chutier_ui .documents {
padding-top: 35px;
height: calc(100% - 35px);
overflow-y: auto; }
overflow-y: auto;
overflow-x: hidden; }
#studio-ui .chutier_ui .documents ul, #studio-ui .chutier_ui .documents li {
margin: 0;
padding: 0;
@@ -1578,6 +1582,12 @@ main[role="main"] span.close-col-btn {
width: 49%;
margin-bottom: 0.5em;
white-space: nowrap; }
#studio-ui .chutier_ui .documents li > div {
display: inline-block;
padding-right: 2em; }
#studio-ui .chutier_ui .documents li > div.ui-draggable {
cursor: -webkit-grab;
cursor: grab; }
#studio-ui .chutier_ui .documents li .entrees {
line-height: 0; }
#studio-ui .chutier_ui .documents li .entrees span {
@@ -1653,12 +1663,16 @@ main[role="main"] span.close-col-btn {
white-space: nowrap; }
#studio-ui .composition_ui > .wrapper section.compositions-list, #studio-ui .composition_ui > .wrapper section.composer {
display: inline-block;
vertical-align: top;
vertical-align: bottom;
height: 100%; }
#studio-ui .composition_ui > .wrapper .compositions-list {
width: 30%;
height: 100%;
overflow-y: auto; }
overflow-y: auto;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding-right: 0.5em;
border-right: 1px solid #aaa; }
#studio-ui .composition_ui > .wrapper .compositions-list li {
opacity: 1;
-webkit-transition: opacity 0.3s ease-in-out;
@@ -1671,7 +1685,20 @@ main[role="main"] span.close-col-btn {
font-size: 0.756em; }
#studio-ui .composition_ui > .wrapper .compositions-list a.composition-link {
display: inline-block;
width: calc(100% - 14px); }
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: calc(100% - 21px); }
#studio-ui .composition_ui > .wrapper .compositions-list a.composition-link:before {
content: "";
width: 7px;
height: 7px;
border: 1px solid black;
background-color: white;
display: inline-block;
vertical-align: middle;
margin-right: 5px; }
#studio-ui .composition_ui > .wrapper .compositions-list a.composition-link.is-active:before {
background-color: black; }
#studio-ui .composition_ui > .wrapper .compositions-list a.delete-composition-link {
display: inline-block;
vertical-align: middle;
@@ -1690,13 +1717,13 @@ main[role="main"] span.close-col-btn {
display: inline-block;
vertical-align: top;
overflow: hidden;
margin-top: 0.4em;
height: 1em;
-webkit-transition: height 0.2s ease-in-out;
transition: height 0.2s ease-in-out; }
#studio-ui .composition_ui > .wrapper .compositions-list a.new-composition-link:before {
content: "+";
font-weight: bold;
margin-right: 0.2em; }
margin-right: 5px; }
#studio-ui .composition_ui > .wrapper .compositions-list a.new-composition-link.folded {
height: 0; }
#studio-ui .composition_ui > .wrapper .compositions-list .new-compo-form {
@@ -1720,11 +1747,157 @@ main[role="main"] span.close-col-btn {
#studio-ui .composition_ui > .wrapper .compositions-list .new-compo-form.ajax-loading {
opacity: 0.4; }
#studio-ui .composition_ui > .wrapper .composer {
-webkit-box-sizing: content-box;
box-sizing: content-box;
width: 69%;
padding-left: 1em;
border-left: 1px solid #aaa; }
position: relative;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding-left: 0.5em;
width: 69%; }
#studio-ui .composition_ui > .wrapper .composer > * {
-webkit-box-sizing: border-box;
box-sizing: border-box; }
#studio-ui .composition_ui > .wrapper .composer > header {
height: 25px;
padding-bottom: 5px; }
#studio-ui .composition_ui > .wrapper .composer > .composition {
position: relative;
height: calc(100% - 60px);
padding-bottom: 1em; }
#studio-ui .composition_ui > .wrapper .composer > .composition .field--name-documents {
position: relative;
-webkit-box-sizing: border-box;
box-sizing: border-box;
height: 100%;
width: 100%;
padding: 0 0.5em; }
#studio-ui .composition_ui > .wrapper .composer > .composition .field--name-documents:before, #studio-ui .composition_ui > .wrapper .composer > .composition .field--name-documents:after {
content: "";
width: calc(100% - 2px);
position: absolute;
bottom: 0;
left: 0; }
#studio-ui .composition_ui > .wrapper .composer > .composition .field--name-documents:before {
border-top: 1px solid #A1A1A1;
height: 14.5px; }
#studio-ui .composition_ui > .wrapper .composer > .composition .field--name-documents:after {
border-left: 1px solid #A1A1A1;
border-right: 1px solid #A1A1A1;
height: 29px; }
#studio-ui .composition_ui > .wrapper .composer > .composition .field--name-documents .field__item {
display: inline-block;
position: relative;
width: 25px;
height: 100%;
white-space: nowrap;
pointer-events: none;
opacity: 1;
-webkit-transition: opacity 0.1s ease-in-out;
transition: opacity 0.1s ease-in-out; }
#studio-ui .composition_ui > .wrapper .composer > .composition .field--name-documents .field__item.ui-draggable-dragging {
height: 100px; }
#studio-ui .composition_ui > .wrapper .composer > .composition .field--name-documents .field__item.ready-to-remove {
opacity: 0.3;
cursor: crosshair; }
#studio-ui .composition_ui > .wrapper .composer > .composition .field--name-documents .field__item > * {
pointer-events: all; }
#studio-ui .composition_ui > .wrapper .composer > .composition .field--name-documents .field__item article {
position: absolute;
bottom: 0;
-webkit-transform-origin: left top;
transform-origin: left top;
-webkit-transform: rotateZ(-45deg);
transform: rotateZ(-45deg); }
#studio-ui .composition_ui > .wrapper .composer > .composition .field--name-documents .field__item article h2 {
margin: 0;
text-transform: none; }
#studio-ui .composition_ui > .wrapper .composer > .composition .field--name-documents .field__item article h2 a {
font-size: 0.756em; }
#studio-ui .composition_ui > .wrapper .composer > .composition .field--name-documents .field__item article h2 a:before {
content: "";
display: inline-block;
vertical-align: middle;
width: 12px;
height: 12px;
border: 1px solid white;
background-color: white; }
#studio-ui .composition_ui > .wrapper .composer > .composition .field--name-documents .field__item .handler {
z-index: 99;
cursor: -webkit-grab;
cursor: grab;
position: absolute;
bottom: 0;
left: 1px;
display: block;
width: 12px;
height: 12px;
-webkit-transform-origin: left top;
transform-origin: left top;
-webkit-transform: rotateZ(-45deg);
transform: rotateZ(-45deg);
border: 1px solid red;
background-color: white; }
#studio-ui .composition_ui > .wrapper .composer > .composition .remove-drop-zone {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 45%;
z-index: 150; }
#studio-ui .composition_ui > .wrapper .composer > .actions {
padding-top: 5px;
height: 25px; }
#studio-ui .field__item.ui-draggable-dragging {
display: inline-block;
position: relative;
width: 25px;
height: 100%;
white-space: nowrap;
pointer-events: none;
opacity: 1;
-webkit-transition: opacity 0.1s ease-in-out;
transition: opacity 0.1s ease-in-out; }
#studio-ui .field__item.ui-draggable-dragging.ui-draggable-dragging {
height: 100px; }
#studio-ui .field__item.ui-draggable-dragging.ready-to-remove {
opacity: 0.3;
cursor: crosshair; }
#studio-ui .field__item.ui-draggable-dragging > * {
pointer-events: all; }
#studio-ui .field__item.ui-draggable-dragging article {
position: absolute;
bottom: 0;
-webkit-transform-origin: left top;
transform-origin: left top;
-webkit-transform: rotateZ(-45deg);
transform: rotateZ(-45deg); }
#studio-ui .field__item.ui-draggable-dragging article h2 {
margin: 0;
text-transform: none; }
#studio-ui .field__item.ui-draggable-dragging article h2 a {
font-size: 0.756em; }
#studio-ui .field__item.ui-draggable-dragging article h2 a:before {
content: "";
display: inline-block;
vertical-align: middle;
width: 12px;
height: 12px;
border: 1px solid white;
background-color: white; }
#studio-ui .field__item.ui-draggable-dragging .handler {
z-index: 99;
cursor: -webkit-grab;
cursor: grab;
position: absolute;
bottom: 0;
left: 1px;
display: block;
width: 12px;
height: 12px;
-webkit-transform-origin: left top;
transform-origin: left top;
-webkit-transform: rotateZ(-45deg);
transform: rotateZ(-45deg);
border: 1px solid red;
background-color: white; }
.col[theme="edlp_search_search_form"], .col[theme="edlp_search_search_form"] > .wrapper {
position: relative;
@@ -147,10 +147,15 @@
this.setSRC(this.historic[this.currentHistoricIndex].audio_url);
this.loadNode(this.historic[this.currentHistoricIndex].nid);
// emmit new playing doc (e.g.: corpus map nowing that audio played from RandomPlayer)
_$corpus_canvas.trigger({
'type':'audio-node-opened',
'nid':this.historic[this.currentHistoricIndex].nid
});
try {
_$corpus_canvas.trigger({
'type':'audio-node-opened',
'nid':this.historic[this.currentHistoricIndex].nid
});
} catch (e) {
console.warn('AudioPlayer : _$corpus_canvas does not exists');
}
this.showHidePreviousBtn();
this.showHideNextBtn();
this.show();
@@ -472,6 +472,66 @@ main[role="main"]{
}
#studio-ui{
height:100%;
@mixin draggable_sortable_field__item {
// outline: 1px dotted green;
display: inline-block;
position: relative;
// margin-right: 25px;
width:25px;
height: 100%;
&.ui-draggable-dragging{
height:100px;
// cursor: grabbing;
}
white-space: nowrap;
pointer-events: none;
opacity: 1;
transition: opacity 0.1s ease-in-out;
&.ready-to-remove{
opacity:0.3;
cursor:crosshair;
}
&>*{
pointer-events: all;
}
article{
// outline: 1px dotted purple;
position: absolute;
bottom:0;
transform-origin: left top;
transform: rotateZ(-45deg);
h2{
margin:0;
text-transform: none;
a{
&:before{
content:"";
display: inline-block;
vertical-align: middle;
width:$compo_square_size; height:$compo_square_size;
border: 1px solid white;
background-color: white;
// TODO: entries color;
}
font-size: 0.756em;
}
}
}
.handler{
z-index: 99;
cursor: grab;
position: absolute;
bottom:0; left:1px;
display: block;
width:$compo_square_size; height:$compo_square_size;
transform-origin: left top;
transform: rotateZ(-45deg);
border: 1px solid red;
background-color: white;
// TODO: entries color;
}
} // end mixin
.chutier_ui{
height: 50%;
border-bottom: 1px solid red;
@@ -492,6 +552,7 @@ main[role="main"]{
padding-top: 35px;
height:calc(100% - 35px);
overflow-y: auto;
overflow-x: hidden;
// box-sizing: content-box;
// outline: 1px solid green;
ul,li{
@@ -502,6 +563,13 @@ main[role="main"]{
display: inline-block; vertical-align: top;
width:49%; margin-bottom: 0.5em;
white-space: nowrap;
>div{
display:inline-block;
padding-right: 2em;
&.ui-draggable{
cursor:grab;
}
}
.entrees{
line-height: 0;
span{
@@ -523,6 +591,7 @@ main[role="main"]{
}
}
$compo_square_size:12px;
.composition_ui{
height:50%;
&>h2{
@@ -543,12 +612,16 @@ main[role="main"]{
overflow: hidden;
white-space: nowrap;
section.compositions-list, section.composer{
display: inline-block; vertical-align: top;
display: inline-block; vertical-align: bottom;
height: 100%;
}
.compositions-list{
width:30%; height:100%;
width:30%;
height:100%; // this is not working
overflow-y: auto;
box-sizing: border-box;
padding-right: 0.5em;
border-right: 1px solid #aaa;
li{
opacity: 1;
transition: opacity 0.3s ease-in-out;
@@ -563,10 +636,25 @@ main[role="main"]{
}
a{
font-size: 0.756em;
$w:7px;
$s:7px; $m:5px;
&.composition-link{
display: inline-block;
width: calc(100% - #{$s +$m +2});
box-sizing: border-box;
// width:100%;
width: calc(100% - #{$w +$s +$m +2});
&:before{
content: "";
width:$w; height:$w;
border: 1px solid black;
background-color: white;
display: inline-block;
vertical-align: middle;
margin-right: $m;
}
&.is-active:before{
background-color: black;
}
}
&.delete-composition-link{
display: inline-block;
@@ -584,12 +672,13 @@ main[role="main"]{
// padding-left: 1em;
&:before{
content:"+";
font-weight: bold;
margin-right: 0.2em;
// font-weight: bold;
margin-right: $m;
}
display: inline-block;
vertical-align: top;
overflow: hidden;
margin-top: 0.4em;
height:1em;
transition: height 0.2s ease-in-out;
&.folded{
@@ -622,13 +711,77 @@ main[role="main"]{
}
}
.composer{
box-sizing: content-box;
position: relative;
box-sizing: border-box;
padding-left: 0.5em;
width:69%;
padding-left: 1em;
border-left: 1px solid #aaa;
$header_height:25px;
$actions_height:25px;
$padding:5px;
>*{
box-sizing: border-box;
}
>header{
height:$header_height;
padding-bottom:$padding;
}
>.composition{
position: relative;
height:calc(100% - #{$header_height + $actions_height + $padding*2});
// outline: 1px solid red;
padding-bottom: 1em;
.field--name-documents{
position: relative;
box-sizing: border-box;
height: 100%;
width: 100%; padding:0 0.5em;
$h:29px; $w:calc(100% - 2px); $c:#A1A1A1;
&:before, &:after{
content: "";
width:$w;
position: absolute;
bottom:0; left:0;
// z-index: -1;
}
&:before{
border-top: 1px solid $c;
height:$h /2;
}
&:after{
border-left: 1px solid $c;
border-right: 1px solid $c;
height:$h;
}
.field__item{
@include draggable_sortable_field__item;
}
}
.remove-drop-zone{
position: absolute;
top:0; left:0; width:100%; height:45%;
z-index: 150;
// &.ui-droppable-hover{
// background-color: red;
// }
}
}
>.actions{
padding-top:$padding;
height:$actions_height;
// outline: 1px solid blue;
}
}
}
}
// drag and drop specifics
// created by js
.field__item.ui-draggable-dragging{
// outline: 1px solid green;
@include draggable_sortable_field__item;
}
}
@@ -9,7 +9,9 @@ body, html{
padding:0;
// background-color: rgb(219, 219, 219);
}
body.toolbar-horizontal.toolbar-themes.toolbar-no-tabs{
padding-top: 24px!important;
}
// div.layout-container{
// position: relative;
// width:100%; height:100%;
@@ -57,7 +59,7 @@ main[role="main"]{
padding:7em 2em 9em;
overflow: hidden;
pointer-events: none;
height:auto;
height:100%;
.layout-content{
width: 100%; height:100%;
overflow:hidden;
@@ -67,10 +69,17 @@ main[role="main"]{
}
}
body[corpus-map="ready"] main[role="main"]{
height:100%;
// overflow-y: hidden;
body.toolbar-horizontal.toolbar-themes.toolbar-no-tabs{
main[role="main"]{
padding-top: 7em + 1em;
}
}
// body.toolbar-fixed.toolbar-tray-open{
// main[role="main"]{
// padding-top: 7em + 4em;
// // overflow-y: hidden;
// }
// }
footer[role="contentinfo"]{
// outline: 1px solid pink;