Re: questions on some moo tools components
Re: questions on some moo tools components
- Subject: Re: questions on some moo tools components
- From: Tim Worman <email@hidden>
- Date: Tue, 29 May 2012 13:19:20 -0700
Johnny:
Feel better.
That's what I needed. I kept trying to inspect the page but couldn't find how the functions were being generated. This makes sense. Thanks much!
Tim
On May 29, 2012, at 1:14 PM, Johnny Miller <email@hidden> wrote:
> Hi Tim,
>
> I'm battling the flu right now. So I'm about ready to go crashing into my keyboard but I believe....
>
> it's in MTWonder.js file:
>
> var MTAjaxInPlace = {
>
> saveFunctionName: function(id) {
> return "window." + id + "Save";
> },
>
> cancelFunctionName: function(id) {
> return "window." + id + "Cancel";
> },
>
> editFunctionName: function(id) {
> return "window." + id + "Edit";
> },
>
> cleanupEdit: function(id) {
> var saveFunctionName = this.saveFunctionName(id);
> var cancelFunctionName = this.cancelFunctionName(id);
> if (typeof eval(saveFunctionName) != 'undefined') { eval(saveFunctionName + " = null"); }
> if (typeof eval(cancelFunctionName) != 'undefined') { eval(cancelFunctionName + " = null"); }
> },
>
> cleanupView: function(id) {
> var editFunctionName = this.editFunctionName(id);
> if (typeof eval(editFunctionName) != 'undefined') { eval(editFunctionName + " = null"); }
> }
>
> };
>
> Check your declaration for MTAjaxInPlace that it's id is fancy:
>
> FancyInPlace : MTAjaxInPlace {
> formClass = "well";
> id = "fancy";
> manualEditControl = true;
> }
>
>
> HTH,
>
> Johnny Miller
> Kahalawai Media Corp.
> www.kahalawai.com
>
>
>
> On May 29, 2012, at 9:54 AM, Tim Worman wrote:
>
>> Hello all:
>>
>> I've been testing out some of the Moo Tools components when I have a chance. Today I've been trying some of the options for "in place" text fields. I just want to see if a problem I'm having is actually a problem with the operator. :-)
>>
>> I've inserted the fancy in place editor into my app just as it is in the Moo Tools example. For some reason I can't figure out, the save and cancel buttons in the edit mode do not return the editor to view mode. My wod definitions for the buttons look like this:
>>
>> FancySave : MTAjaxSubmitButton {
>> action = savePerson;
>> updateContainerID = "FullPersonViewUpdater";
>> value = "save";
>> class = "btn btn-primary";
>> onClick = "fancySave()";
>> }
>>
>> FancyCancel : AjaxFunctionLink {
>> class = "btn";
>> onclick = "fancyCancel()";
>> }
>>
>> Right now I'm using the same css as the example and "FullPersonViewUpdater" is a surrounding MTAjaxUpdateContainer. I don't know where "fancySave()" or "fancyCancel" live. (I've tried to use the Eclipse file search but right now it is in one of those moods where it generates an error on each search attempt.)
>>
>> Can anyone push me in the right direction to figure out why the buttons to update the view?
>>
>> Tim
>> UCLA GSE&IS
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden