Cardboard Toolbox: Config button to edit board information.
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
|
using VAR.Focus.Web.Pages;
|
||||||
using VAR.Json;
|
using VAR.Json;
|
||||||
|
|
||||||
namespace VAR.Focus.Web.Controls
|
namespace VAR.Focus.Web.Controls
|
||||||
@@ -102,6 +103,7 @@ namespace VAR.Focus.Web.Controls
|
|||||||
{"divBoard", divBoard.ClientID},
|
{"divBoard", divBoard.ClientID},
|
||||||
{"IDBoard", _idBoard},
|
{"IDBoard", _idBoard},
|
||||||
{"UserName", _userName},
|
{"UserName", _userName},
|
||||||
|
{"EditBoardUrl", FrmBoardEdit.GetUrl(_idBoard)},
|
||||||
{"IDCardEvent", string.Empty},
|
{"IDCardEvent", string.Empty},
|
||||||
{"ServiceUrl", _serviceUrl},
|
{"ServiceUrl", _serviceUrl},
|
||||||
{"TimePoolData", _timePoolData},
|
{"TimePoolData", _timePoolData},
|
||||||
@@ -111,6 +113,7 @@ namespace VAR.Focus.Web.Controls
|
|||||||
{"Texts", new Dictionary<string, object> {
|
{"Texts", new Dictionary<string, object> {
|
||||||
{"Toolbox", "Toolbox"},
|
{"Toolbox", "Toolbox"},
|
||||||
{"AddCard", "+ Add card"},
|
{"AddCard", "+ Add card"},
|
||||||
|
{"EditBoard", "Config"},
|
||||||
{"Accept", "Accept"},
|
{"Accept", "Accept"},
|
||||||
{"Cancel", "Cancel"},
|
{"Cancel", "Cancel"},
|
||||||
{"ConfirmDelete", "Are you sure to delete?"},
|
{"ConfirmDelete", "Are you sure to delete?"},
|
||||||
|
|||||||
@@ -38,6 +38,12 @@ var Toolbox = function (cfg, container) {
|
|||||||
this.btnAdd.innerHTML = cfg.Texts.AddCard;
|
this.btnAdd.innerHTML = cfg.Texts.AddCard;
|
||||||
this.btnAdd.addEventListener("click", Toolbox.prototype.btnAdd_Click.bind(this), false);
|
this.btnAdd.addEventListener("click", Toolbox.prototype.btnAdd_Click.bind(this), false);
|
||||||
|
|
||||||
|
this.btnEditBoard = document.createElement("button");
|
||||||
|
this.divToolbox.appendChild(this.btnEditBoard);
|
||||||
|
this.btnEditBoard.className = "btnToolbox";
|
||||||
|
this.btnEditBoard.innerHTML = cfg.Texts.EditBoard;
|
||||||
|
this.btnEditBoard.addEventListener("click", Toolbox.prototype.btnEditBoard_Click.bind(this), false);
|
||||||
|
|
||||||
this.divOverlay = document.createElement("div");
|
this.divOverlay = document.createElement("div");
|
||||||
this.divToolbox.appendChild(this.divOverlay);
|
this.divToolbox.appendChild(this.divOverlay);
|
||||||
this.divOverlay.className = "divOverlay";
|
this.divOverlay.className = "divOverlay";
|
||||||
@@ -142,7 +148,13 @@ Toolbox.prototype = {
|
|||||||
card.InsertOnContainer(this.cfg.divBoard);
|
card.InsertOnContainer(this.cfg.divBoard);
|
||||||
card.EnterEditionMode();
|
card.EnterEditionMode();
|
||||||
return false;
|
return false;
|
||||||
}
|
},
|
||||||
|
btnEditBoard_Click: function (evt) {
|
||||||
|
evt.preventDefault();
|
||||||
|
window.location.href = this.cfg.EditBoardUrl;
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
empty: null
|
||||||
};
|
};
|
||||||
|
|
||||||
var Card = function (cfg, idCard, title, body, x, y) {
|
var Card = function (cfg, idCard, title, body, x, y) {
|
||||||
|
|||||||
Reference in New Issue
Block a user