[Freeipa-devel] [PATCH] admiyo-freeipa-0019-associations.patch
Adam Young
ayoung at redhat.com
Sat Sep 4 02:29:26 UTC 2010
You are right. the 'this' pointer always gets overridden, so it has to
be assigtned to a nother variable name in order to get used in a closure.
Here's an updated patch
On 09/03/2010 05:20 PM, Endi Sukma Dewata wrote:
> Hi Adam,
>
> Thanks for the update. I found a problem, the "this.pkey" in the
> callback function below is undefined so it won't load the values back
> in the details page.
>
> diff --git a/install/static/associate.js b/install/static/associate.js
> index dabc76c..ae1f4af 100644
> --- a/install/static/associate.js
> +++ b/install/static/associate.js
> @@ -90,10 +90,10 @@ function BulkAssociator(form, pkey, manyObjPkeys){
> function(response){
> var qs = ipa_parse_qs();
> if (response.error){
> - alert("error adding memeber");
> + alert("error adding member");
> }else{
> location.hash="tab=" +form.oneObj
> - +"&facet=details&pkey="+this.pkey;
> + +"&facet=details&pkey="+pkey;
> }
> },
> function(response){
>
> Attached is the service tab I've been working on. Sometimes the
> enrollment page doesn't work quite right. When I click "Find" it
> will show the available hosts, but sometimes it would replace the
> list immediately with the list of available users. Probably the
> previous "click" handler still got called somehow.
>
> --
> Endi S. Dewata
>
> ----- "Adam Young"<ayoung at redhat.com> wrote:
>
>
>> Updated version that provides the means to overload the method called.
>>
>> This was requested by edewata to support services. I also simplified
>>
>> some of the internal code .
>>
>> https://fedorahosted.org/freeipa/attachment/ticket/104/admiyo-freeipa-0019-2-associations.patch
>>
>> _______________________________________________
>> Freeipa-devel mailing list
>> Freeipa-devel at redhat.com
>> https://www.redhat.com/mailman/listinfo/freeipa-devel
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: admiyo-freeipa-0019-3-associations.patch
Type: text/x-patch
Size: 370737 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20100903/987e9b6c/attachment.bin>
More information about the Freeipa-devel
mailing list