bitbake: toastergui: remove project name from layer change notification

The project name is always a link to the basic
configuration page, which looks quite silly when
you change layers from that page.

Since I guess the idea is reusing those notifications
everywhere, I've replaced the project name with a
generic 'to your project' / 'from your project', so
that they read right no matter where you see them.

(Bitbake rev: 59bcafa712b9a16b647bd26b3bd738ae6fc21eaa)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Belen Barros Pena 2015-08-04 16:07:09 +01:00 committed by Richard Purdie
parent 69c6f1fd13
commit 0378aadd58
1 changed files with 3 additions and 5 deletions

View File

@ -280,7 +280,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>: <a id=\"layer-affected-name\"></a> and its dependencies </span>");
alertMsg = $("<span>You have added <strong>"+(layerDepsList.length+1)+"</strong> layers to your project: <a id=\"layer-affected-name\"></a> and its dependencies </span>");
/* Build the layer deps list */
layerDepsList.map(function(layer, i){
@ -296,15 +296,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>: <a id=\"layer-affected-name\"></a></span></span>");
alertMsg = $("<span>You have added <strong>1</strong> layer to your project: <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>: <a id=\"layer-affected-name\"></a></span>");
alertMsg = $("<span>You have deleted <strong>1</strong> layer from your project: <a id=\"layer-affected-name\"></a></span>");
}
alertMsg.children("#layer-affected-name").text(layer.name);
alertMsg.children("#layer-affected-name").attr("href", layer.layerdetailurl);
alertMsg.children("#project-affected-name").text(libtoaster.ctx.projectName);
alertMsg.children("#project-affected-name").attr("href", libtoaster.ctx.projectPageUrl);
return alertMsg.html();
}