Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 29A80E00E09; Tue, 24 May 2016 04:55:55 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 5DCDAE00D02 for ; Tue, 24 May 2016 04:53:20 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP; 24 May 2016 04:53:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,359,1459839600"; d="scan'208";a="961194480" Received: from icarus.isw.intel.com ([10.237.224.37]) by orsmga001.jf.intel.com with ESMTP; 24 May 2016 04:53:19 -0700 From: Belen Barros Pena To: toaster@yoctoproject.org Date: Tue, 24 May 2016 12:39:37 +0100 Message-Id: <1464090003-23469-81-git-send-email-belen.barros.pena@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1464090003-23469-1-git-send-email-belen.barros.pena@linux.intel.com> References: <1464090003-23469-1-git-send-email-belen.barros.pena@linux.intel.com> Subject: [PATCH 080/106] toaster: Fix the import layer form X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2016 11:55:55 -0000 Style it for Bootstrap 3. Signed-off-by: Belen Barros Pena --- .../lib/toaster/toastergui/static/css/default.css | 27 +++- .../toaster/toastergui/static/js/importlayer.js | 8 +- .../toaster/toastergui/templates/importlayer.html | 136 ++++++++++----------- 3 files changed, 92 insertions(+), 79 deletions(-) diff --git a/bitbake/lib/toaster/toastergui/static/css/default.css b/bitbake/lib/toaster/toastergui/static/css/default.css index 363e3ce..f9116e9 100644 --- a/bitbake/lib/toaster/toastergui/static/css/default.css +++ b/bitbake/lib/toaster/toastergui/static/css/default.css @@ -82,7 +82,7 @@ tbody > tr > td > .glyphicon-minus-sign { color: #a94442; } /* Set the font size for icons inside headings and lead paragraphs */ h1 > .glyphicon-edit, p.lead .glyphicon { font-size: 16px; } - +h2 > .glyphicon-question-sign, h3 > .glyphicon-question-sign { font-size: 14px; } /* Create a class for wells without background colour */ @@ -113,12 +113,15 @@ h3 > .glyphicon-question-sign { font-size: 14px; } #freq-build-btn { margin-top: 10px; } #no-most-built { margin-top: 20px; } -/* Style the layers section in the project page */ +/* Style the layers section in the project page and the layer dependencies in the import layer form */ #layer-container .form-inline { margin-top: 20px; } #layer-add-input { width: 17em; } -#layers-in-project-list { margin-top: 20px; } -#layers-in-project-list > li { line-height: 38px; } -#layers-in-project-list .glyphicon-trash { font-size: 16px; margin-left: 7px; } +#layers-in-project-list, +#layer-deps-list { margin-top: 20px; } +#layers-in-project-list > li, +#layer-deps-list > li { line-height: 38px; } +#layers-in-project-list .glyphicon-trash, +#layer-deps-list .glyphicon-trash { font-size: 16px; margin-left: 7px; } #layers-in-project-list .tooltip-inner { max-width: 600px; } #no-layers-in-project { margin-top: 20px; } #no-layers-in-project ul { margin-top: 10px; } @@ -134,4 +137,16 @@ h2 { margin-bottom: 25px; } .tt-suggestion { padding: 5px 10px; } .tt-suggestion:hover, .tt-suggestion:active { background-color: #f5f5f5; cursor: pointer; } - + +/* Style the import layer form controls*/ +legend { border: none; } +#layer-name-ctrl { margin-top: 20px; } +#import-layer-name, +#layer-subdir { width: 20%; } +#layer-git-repo-url { width: 40%; } +#layer-git-ref { width: 32%; } +#layer-dependency { width: 16em; } +#form-actions { margin-bottom: 30px; } +#duplicate-layer-info dl { margin-top: 10px; } +#duplicate-layer-info dd { margin-bottom: 10px; } +.help-inline { color: #737373; margin-left: 10px; } diff --git a/bitbake/lib/toaster/toastergui/static/js/importlayer.js b/bitbake/lib/toaster/toastergui/static/js/importlayer.js index e193557..2f59567 100644 --- a/bitbake/lib/toaster/toastergui/static/js/importlayer.js +++ b/bitbake/lib/toaster/toastergui/static/js/importlayer.js @@ -46,7 +46,7 @@ function importLayerPageInit (ctx) { currentLayerDepSelection = choice; } else { - layerDepBtn.attr("disabled", "disabled"); + layerDepBtn.attr("disabled","disabled"); currentLayerDepSelection = undefined; } }); @@ -70,7 +70,7 @@ function importLayerPageInit (ctx) { layerDeps[currentLayerDepSelection.id] = currentLayerDepSelection; /* Make a list item for the new layer dependency */ - var newLayerDep = $("
  • "); + var newLayerDep = $("
  • "); newLayerDep.data('layer-id', currentLayerDepSelection.id); newLayerDep.children("span").tooltip(); @@ -263,7 +263,7 @@ function importLayerPageInit (ctx) { layerNameInput.on('input', function() { if ($(this).val() && !validLayerName.test($(this).val())){ - layerNameCtrl.addClass("error") + layerNameCtrl.addClass("has-error") $("#invalid-layer-name-hint").show(); enable_import_btn(false); return; @@ -280,7 +280,7 @@ function importLayerPageInit (ctx) { * reason. */ if (!duplicatedLayerName.is(":visible")) - layerNameCtrl.removeClass("error") + layerNameCtrl.removeClass("has-error") $("#invalid-layer-name-hint").hide(); check_form(); diff --git a/bitbake/lib/toaster/toastergui/templates/importlayer.html b/bitbake/lib/toaster/toastergui/templates/importlayer.html index 765106c..e7522d7 100644 --- a/bitbake/lib/toaster/toastergui/templates/importlayer.html +++ b/bitbake/lib/toaster/toastergui/templates/importlayer.html @@ -29,7 +29,7 @@
    - Layer repository information +

    Layer repository information

    The layer you are importing must be compatible with {{project.release.description}}, which is the release you are using in this project. -
    -
    -
    - +
    +

    Layer dependencies - (optional) - - -
      + (optional) + +

    +
    - - You can only add layers Toaster knows about +
    +
    + +
    + + You can only add layers Toaster knows about +
    -
    - +
    + To import a layer you need to enter a layer name, a Git repository URL and a Git revision (branch, tag or commit)
    -- 1.9.1