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.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using VAR.Focus.Web.Pages;
|
||||
using VAR.Json;
|
||||
|
||||
namespace VAR.Focus.Web.Controls
|
||||
@@ -102,6 +103,7 @@ namespace VAR.Focus.Web.Controls
|
||||
{"divBoard", divBoard.ClientID},
|
||||
{"IDBoard", _idBoard},
|
||||
{"UserName", _userName},
|
||||
{"EditBoardUrl", FrmBoardEdit.GetUrl(_idBoard)},
|
||||
{"IDCardEvent", string.Empty},
|
||||
{"ServiceUrl", _serviceUrl},
|
||||
{"TimePoolData", _timePoolData},
|
||||
@@ -111,6 +113,7 @@ namespace VAR.Focus.Web.Controls
|
||||
{"Texts", new Dictionary<string, object> {
|
||||
{"Toolbox", "Toolbox"},
|
||||
{"AddCard", "+ Add card"},
|
||||
{"EditBoard", "Config"},
|
||||
{"Accept", "Accept"},
|
||||
{"Cancel", "Cancel"},
|
||||
{"ConfirmDelete", "Are you sure to delete?"},
|
||||
|
||||
@@ -38,6 +38,12 @@ var Toolbox = function (cfg, container) {
|
||||
this.btnAdd.innerHTML = cfg.Texts.AddCard;
|
||||
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.divToolbox.appendChild(this.divOverlay);
|
||||
this.divOverlay.className = "divOverlay";
|
||||
@@ -142,7 +148,13 @@ Toolbox.prototype = {
|
||||
card.InsertOnContainer(this.cfg.divBoard);
|
||||
card.EnterEditionMode();
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user