<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    On 04/12/2011 03:06 PM, Endi Sukma Dewata wrote:
    <blockquote cite="mid:4DA4A2BF.5070200@redhat.com" type="cite">The
      entitlement facet will show the appropriate buttons depending on
      <br>
      the entitlement status. If it's not registered, the facet will
      show
      <br>
      a Register button. If it's registered, the facet will show a
      Consume
      <br>
      button.
      <br>
      <br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Freeipa-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Freeipa-devel@redhat.com">Freeipa-devel@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/freeipa-devel">https://www.redhat.com/mailman/listinfo/freeipa-devel</a></pre>
    </blockquote>
    <br>
    <br>
    Please make sure all String literals come from the interal.py
    messages plugin. New button labels are defined in entitle.js for
    Consume and Register.<br>
    <br>
    <br>
    The consume dialog should be limited to accepting only integer
    values: pass the validation pattern in to the text widget.
    that.entity = function(spec) {<br>
    <br>
    We are starting to see a proliferation of code like this:<br>
    <br>
            if (spec instanceof Object){<br>
                var factory = spec.factory || IPA.entity;<br>
                entity = factory(spec);<br>
            } else {<br>
                var name = spec;<br>
                entity = IPA.entity({name: name});<br>
            }<br>
            return that;<br>
        };<br>
    <br>
    <br>
    Can we pull it into a helper function?<br>
    <br>
    <br>
    In dialog.js   the code that.entity =
    IPA.get_entity(that.entity_name);  should happen before init, in the
    initial construction of the object.  The goal is to remove init
    functions; please don't put any more code into them from here on
    out.  Same thing with Facet in entity.js<br>
    <br>
    <br>
  </body>
</html>