bitbake: toaster: Add links to the layer add notification

Adds links to the layer details for the layer that has just been
removed or added

(Bitbake rev: 3b323af501f7ec81cce34adb4ea86a7d6599e60a)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Michael Wood
2015-04-21 20:29:46 +01:00
committed by Richard Purdie
parent bec5d16471
commit 286da989d9

View File

@@ -261,7 +261,7 @@ var libtoaster = (function (){
var alertMsg;
if (layerDepsList.length > 0 && add === true) {
alertMsg = $("<span>You have added <strong>"+(layerDepsList.length+1)+"</strong> layers to <a id=\"project-affected-name\"></a>: <span id=\"layer-affected-name\"></span> and its dependencies </span>");
alertMsg = $("<span>You have added <strong>"+(layerDepsList.length+1)+"</strong> layers to <a id=\"project-affected-name\"></a>: <a id=\"layer-affected-name\"></a> and its dependencies </span>");
/* Build the layer deps list */
layerDepsList.map(function(layer, i){
@@ -277,12 +277,13 @@ var libtoaster = (function (){
alertMsg.append(link);
});
} else if (layerDepsList.length === 0 && add === true) {
alertMsg = $("<span>You have added <strong>1</strong> layer to <a id=\"project-affected-name\"></a>: <span id=\"layer-affected-name\"></span></span>");
alertMsg = $("<span>You have added <strong>1</strong> layer to <a id=\"project-affected-name\"></a>: <a id=\"layer-affected-name\"></a></span></span>");
} else if (add === false) {
alertMsg = $("<span>You have deleted <strong>1</strong> layer from <a id=\"project-affected-name\"></a>: <strong id=\"layer-affected-name\"></strong></span>");
alertMsg = $("<span>You have deleted <strong>1</strong> layer from <a id=\"project-affected-name\"></a>: <a id=\"layer-affected-name\"></a></span>");
}
alertMsg.children("#layer-affected-name").text(layer.name);
alertMsg.children("#layer-affected-name").attr("href", layer.url);
alertMsg.children("#project-affected-name").text(libtoaster.ctx.projectName);
alertMsg.children("#project-affected-name").attr("href", libtoaster.ctx.projectPageUrl);