[Freeipa-devel] [PATCH] 031 Remove WebUI identifiers from global namespace
Adam Young
ayoung at redhat.com
Tue Feb 15 18:23:38 UTC 2011
On 02/15/2011 08:25 AM, Martin Kosek wrote:
> Many WebUI identifiers were defined in a global namespace. This is
> not a good programming practice and may result in name clashes,
> for example with other libraries.
>
> This patch moves these variables to IPA namespace or its
> sub-namespaces, if required.
>
> https://fedorahosted.org/freeipa/ticket/212
>
>
>
> _______________________________________________
> Freeipa-devel mailing list
> Freeipa-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/freeipa-devel
Nice work.
One thing I think we should make heppen before we push this is to scope
down the number of IPA.functions.
For example, the certificate widget should be the only thing that needs
to access most of the functions in certificate.js. We can avoid making
them publicly accessible.
The certificate_status_widget should probably be directly under IPA, not
under IPA.certificates. Perhaps in the future we will make an
IPA.widget namespace and stick all of the widgets creators in there.
IPA.search_generate_checkbox_td should be a method on the search
table. The one place where we use that outside of search.js (in
policy.js for dns) is a hack...I should know, I wrote it.
I suspect much of the code in navigation can be scoped down.
If you are going to add the navigation subnamesapce in navigation.js,
you should do the same with the certificate namespace in
certificate.js. You are currently adding it in ipa.js
Lets drop the _ separating namespaces: For example nav_push_state
should become IPA.nav.push_state, certificates_revoke_dialog should
become IPA.certificates.revoke_dialog and so on
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110215/be244799/attachment.htm>
More information about the Freeipa-devel
mailing list