mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 01:19:52 +00:00
bitbake: toaster: insure IMAGE_INSTALL_append values have a space prefix
When the IMAGE_INSTALL_append value is not empty, it must have a space prefix in order for the "append" operator to concatenate the values correctly, so we enforce it in this variable's submit javascript. [YOCTO #7394] (Bitbake rev: fc0cec1f38aa6f2d09434cc008a429d350a5706f) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
d2b20465c3
commit
12c7efe40a
@@ -468,7 +468,7 @@
|
|||||||
// re-assert the event handlers
|
// re-assert the event handlers
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ensure cookie exists {% csrf_token %} */
|
/* ensure cookie exists {% csrf_token %} */
|
||||||
function postEditAjaxRequest(reqdata) {
|
function postEditAjaxRequest(reqdata) {
|
||||||
var ajax = $.ajax({
|
var ajax = $.ajax({
|
||||||
type:"POST",
|
type:"POST",
|
||||||
@@ -621,10 +621,13 @@
|
|||||||
// change IMAGE_INSTALL_append variable
|
// change IMAGE_INSTALL_append variable
|
||||||
$('#change-image_install-icon').click(function() {
|
$('#change-image_install-icon').click(function() {
|
||||||
// preset the edit value
|
// preset the edit value
|
||||||
var current_val = $("span#image_install").text();
|
var current_val = $("span#image_install").text().trim();
|
||||||
if (current_val == "Not set") {
|
if (current_val == "Not set") {
|
||||||
current_val="";
|
current_val="";
|
||||||
$("#apply-change-image_install").attr("disabled","disabled");
|
$("#apply-change-image_install").attr("disabled","disabled");
|
||||||
|
} else {
|
||||||
|
// insure these non-empty values have single space prefix
|
||||||
|
current_val=" " + current_val;
|
||||||
}
|
}
|
||||||
$("input#new-image_install").val(current_val);
|
$("input#new-image_install").val(current_val);
|
||||||
|
|
||||||
@@ -643,7 +646,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
$("#new-image_install").on('input', function(){
|
$("#new-image_install").on('input', function(){
|
||||||
if ($(this).val().length == 0) {
|
if ($(this).val().trim().length == 0) {
|
||||||
$("#apply-change-image_install").attr("disabled","disabled");
|
$("#apply-change-image_install").attr("disabled","disabled");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -652,13 +655,14 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('#apply-change-image_install').click(function(){
|
$('#apply-change-image_install').click(function(){
|
||||||
var name = $('#new-image_install').val();
|
// insure these non-empty values have single space prefix
|
||||||
postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL_append:'+name});
|
var value = " " + $('#new-image_install').val().trim();
|
||||||
$('#image_install').text(name);
|
postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL_append:'+value});
|
||||||
|
$('#image_install').text(value);
|
||||||
$('#image_install').removeClass('muted');
|
$('#image_install').removeClass('muted');
|
||||||
$("#change-image_install-form").slideUp(function () {
|
$("#change-image_install-form").slideUp(function () {
|
||||||
$('#image_install, #change-image_install-icon').show();
|
$('#image_install, #change-image_install-icon').show();
|
||||||
if (name.length > -1) {
|
if (value.length > -1) {
|
||||||
$('#delete-image_install-icon').show();
|
$('#delete-image_install-icon').show();
|
||||||
setDeleteTooltip($('#delete-image_install-icon'));
|
setDeleteTooltip($('#delete-image_install-icon'));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user