[Toaster] [review-request] adamian/20150507_toasterui_fixes
Damian, Alexandru
alexandru.damian at intel.com
Wed May 13 02:42:39 PDT 2015
On Tue, May 12, 2015 at 7:06 PM, Michael Wood <michael.g.wood at intel.com>
wrote:
>
> 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.
>
Unfortunately, the <style> tag can only occur in certain places under
HTML5 specification; the validator complains about its presence there. I
think the presence there leads to undefined behaviour in the specification,
and it's not guaranteed to work in future browsers.
>
> 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.
>
Yep, this would be a better solution. I'm going to push a patch on top of
this one to reverse the behaviour.
>
> 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
>>
>>
>>
> ---------------------------------------------------------------------
> Intel Corporation (UK) Limited
> Registered No. 1134945 (England)
> Registered Office: Pipers Way, Swindon SN3 1RJ
> VAT No: 860 2173 47
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
>
--
Alex Damian
Yocto Project
SSG / OTC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/toaster/attachments/20150513/2c0c7f3a/attachment.html>
More information about the toaster
mailing list