All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Wood <michael.g.wood@intel.com>
To: toaster@yoctoproject.org, "Damian,
	Alexandru" <alexandru.damian@intel.com>
Subject: Re: [review-request] adamian/20150507_toasterui_fixes
Date: Tue, 12 May 2015 19:06:28 +0100	[thread overview]
Message-ID: <55524124.60708@intel.com> (raw)
In-Reply-To: <CAJ2CSBuk6_N72nvw0=_TAn0OqOsQByk0GSsnxfVO3dFTO+28qw@mail.gmail.com>


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
>
>



  reply	other threads:[~2015-05-12 18:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 17:18 [review-request] adamian/20150507_toasterui_fixes Damian, Alexandru
2015-05-12 18:06 ` Michael Wood [this message]
2015-05-13  9:42   ` Damian, Alexandru
2015-05-13 13:10     ` Damian, Alexandru
2015-05-13 14:09       ` Michael Wood
  -- strict thread matches above, loose matches on Subject: below --
2015-05-07 17:13 Damian, Alexandru
     [not found] ` <554CE6D6.3030602@intel.com>
2015-05-08 16:53   ` Michael Wood
2015-05-08 17:04     ` Damian, Alexandru

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55524124.60708@intel.com \
    --to=michael.g.wood@intel.com \
    --cc=alexandru.damian@intel.com \
    --cc=toaster@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.