[Toaster] [review-request] adamian/20150507_toasterui_fixes
Michael Wood
michael.g.wood at intel.com
Tue May 12 11:06:28 PDT 2015
Thanks, this fixes a bunch of the url issues for me, I also had to
delete the urls.pyc as well as I was getting some strange issues (like
where the project links weren't working)
Only one issue, what was the reason for doing this?:
--- a/bitbake/lib/toaster/toastergui/templates/layerdetails.html
+++ b/bitbake/lib/toaster/toastergui/templates/layerdetails.html
@@ -37,27 +37,18 @@
document.write("Sorry, An error has occurred loading this page");
console.warn(e);
}
+
+ {# If this is not an imported layer then hide the edit ui #}
+ {% if layerversion.layer_source.sourcetype !=
layerversion.layer_source.TYPE_IMPORTED %}
+ $(".icon-pencil").hide();
+ $(".delete-current-value").hide();
+ $(".icon-trash").hide();
+ $(".add-deps").hide();
+ {% endif %}
+
});
</script>
-{# If this is not an imported layer then hide the edit ui #}
-{% if layerversion.layer_source_id != 3 %}
-<style>
- .icon-pencil {
- display:none;
- }
-.delete-current-value{
- display: none;
-}
- li .icon-trash {
- display:none;
- }
- .add-deps {
- display:none;
- }
-</style>
-{% endif %}
-
The advantage of doing it in the style/document is that you don't get a
visible state change in the page when the page is loaded.
e.g. doing this is in the JS will do: All visible -> Hide the
.icon-pencil, Hide the .delete-current-value etc all in front of the user.
I'd rather have the page state setup correctly at render when possible,
if you really want to do this in the JS it needs to be inside the
layerDetailsPageInit function and everything hidden by default then
shown once the hide/shows inside the page are done.
Thanks,
Michael
On 12/05/15 18:18, Damian, Alexandru wrote:
> Hello,
>
> This is a review request for a single patch that brings all views in
> compliance with W3C's HTML5 markup validation service.
>
> It also fixes minor problems discovered during validation.
>
> Can you please review ?
>
> Alex
>
> --
> Alex Damian
> Yocto Project
> SSG / OTC
>
>
More information about the toaster
mailing list