summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/projectconf.html18
1 files changed, 11 insertions, 7 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/projectconf.html b/bitbake/lib/toaster/toastergui/templates/projectconf.html
index ffdf760dab..d8ead8199b 100644
--- a/bitbake/lib/toaster/toastergui/templates/projectconf.html
+++ b/bitbake/lib/toaster/toastergui/templates/projectconf.html
@@ -468,7 +468,7 @@
468 // re-assert the event handlers 468 // re-assert the event handlers
469 } 469 }
470 470
471 /* ensure cookie exists {% csrf_token %} */ 471 /* ensure cookie exists {% csrf_token %} */
472 function postEditAjaxRequest(reqdata) { 472 function postEditAjaxRequest(reqdata) {
473 var ajax = $.ajax({ 473 var ajax = $.ajax({
474 type:"POST", 474 type:"POST",
@@ -621,10 +621,13 @@
621 // change IMAGE_INSTALL_append variable 621 // change IMAGE_INSTALL_append variable
622 $('#change-image_install-icon').click(function() { 622 $('#change-image_install-icon').click(function() {
623 // preset the edit value 623 // preset the edit value
624 var current_val = $("span#image_install").text(); 624 var current_val = $("span#image_install").text().trim();
625 if (current_val == "Not set") { 625 if (current_val == "Not set") {
626 current_val=""; 626 current_val="";
627 $("#apply-change-image_install").attr("disabled","disabled"); 627 $("#apply-change-image_install").attr("disabled","disabled");
628 } else {
629 // insure these non-empty values have single space prefix
630 current_val=" " + current_val;
628 } 631 }
629 $("input#new-image_install").val(current_val); 632 $("input#new-image_install").val(current_val);
630 633
@@ -643,7 +646,7 @@
643 }); 646 });
644 647
645 $("#new-image_install").on('input', function(){ 648 $("#new-image_install").on('input', function(){
646 if ($(this).val().length == 0) { 649 if ($(this).val().trim().length == 0) {
647 $("#apply-change-image_install").attr("disabled","disabled"); 650 $("#apply-change-image_install").attr("disabled","disabled");
648 } 651 }
649 else { 652 else {
@@ -652,13 +655,14 @@
652 }); 655 });
653 656
654 $('#apply-change-image_install').click(function(){ 657 $('#apply-change-image_install').click(function(){
655 var name = $('#new-image_install').val(); 658 // insure these non-empty values have single space prefix
656 postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL_append:'+name}); 659 var value = " " + $('#new-image_install').val().trim();
657 $('#image_install').text(name); 660 postEditAjaxRequest({"configvarChange" : 'IMAGE_INSTALL_append:'+value});
661 $('#image_install').text(value);
658 $('#image_install').removeClass('muted'); 662 $('#image_install').removeClass('muted');
659 $("#change-image_install-form").slideUp(function () { 663 $("#change-image_install-form").slideUp(function () {
660 $('#image_install, #change-image_install-icon').show(); 664 $('#image_install, #change-image_install-icon').show();
661 if (name.length > -1) { 665 if (value.length > -1) {
662 $('#delete-image_install-icon').show(); 666 $('#delete-image_install-icon').show();
663 setDeleteTooltip($('#delete-image_install-icon')); 667 setDeleteTooltip($('#delete-image_install-icon'));
664 } 668 }