Cards: Editing background.
This commit is contained in:
@@ -545,15 +545,25 @@ Card.prototype = {
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
EnterEditionMode: function () {
|
EnterEditionMode: function () {
|
||||||
|
this.RemoveFromContainer();
|
||||||
|
this.InsertOnContainer(this.cfg.divBoard);
|
||||||
|
|
||||||
this.txtTitle.value = this.Title;
|
this.txtTitle.value = this.Title;
|
||||||
this.txtBody.value = this.Body;
|
this.txtBody.value = this.Body;
|
||||||
|
|
||||||
this.divOverlay.style.display = "none";
|
this.divOverlay.style.display = "none";
|
||||||
this.Editing = true;
|
this.Editing = true;
|
||||||
|
|
||||||
|
this.divEditBackground = document.createElement("div");
|
||||||
|
this.divEditBackground.className = "divEditBackground";
|
||||||
|
this.divEditBackground.addEventListener("click", Card.prototype.btnEdit_Click.bind(this), false);
|
||||||
|
this.divCard.offsetParent.insertBefore(this.divEditBackground, this.divCard);
|
||||||
|
|
||||||
},
|
},
|
||||||
ExitEditionMode: function () {
|
ExitEditionMode: function () {
|
||||||
this.divOverlay.style.display = "";
|
this.divOverlay.style.display = "";
|
||||||
this.Editing = false;
|
this.Editing = false;
|
||||||
|
this.divEditBackground.offsetParent.removeChild(this.divEditBackground);
|
||||||
},
|
},
|
||||||
btnEdit_Click: function (evt) {
|
btnEdit_Click: function (evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
|
|||||||
@@ -166,3 +166,13 @@
|
|||||||
border: none;
|
border: none;
|
||||||
resize: none;
|
resize: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.divEditBackground {
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
background-color: rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user