[Architecture] UI Options default site settings and branching

Chris Petsos cpetsos at certh.gr
Mon Feb 25 03:20:06 EST 2013


Hi Colin,

On 02/23/2013 11:36 PM, Colin Clark wrote:
> Hi Chris,
>
> On 2013-02-22, at 1:52 AM, Chris Petsos <cpetsos at certh.gr> wrote:
>
>> I am trying to implement the following scenario for the PMT.
>>
>> 1) User logs in
>> 2) Observes current UI Options
>> 3) Tweaks some of them
>> 4) Saves
>> 5) Tweaks some options again
>> 3) Doesn't like the result and wants to revert to what was on (4)
>>
>> Right now by clicking "Cancel" the changes revert to empty set. I know i can set custom default site settings as described here but this way the options revert to what was found on (2). Is there a way to revert to what was on (4)?
> I'm not quite sure why you're seeing the behaviour you describe. Are you able to reproduce it on this demo?
>
> http://fluidproject.org/releases/1.4/demos/uiOptions/html/uiOptionsFullWithoutPreview.html
>
> In terms of how the code works, when the user presses the Cancel button, UI Options' onCancel event is fired. If you need any custom cancellation behaviour, you can register a listener for this event and do what you need. However, the default implementation is that the user's last saved version of their preferences (UI Options' "model") is fetched from the settingsStore and UI Options' settings are reverted accordingly. From my reading of the code, it's doing exactly what you want it to (i.e. reverting to step #4 when the user presses the cancel button).
You are right Colin. I have confused buttons "RESET AND APPLY" and 
"CANCEL". I was using "RESET AND APPLY" instead of "CANCEL" (we've hid 
these buttons and we "click" them with JS on other buttons' click).
>> Also, is there a way i can branch the Fluid Infusion at the official repo so that contributed code is not here and there?
> Yes. You can fork repositories using Github if you need to. Here's some documentation:
>
> https://help.github.com/articles/fork-a-repo
>
> I highly recommend that you spend a little bit of time getting to know how to use Git and Github. They are a great and very powerful way to collaborate on code projects.
>
> That said, in the vast majority of cases you should never have to modify Infusion or UI Options' code directly. There are plenty of events and configuration options that should allow you to extend UIO and your own custom behaviour without changing any Infusion code. If you find yourselves having to change Infusion itself, that's probably a bug and we can help fix it.
Yes, i will dig into this. Haven't used git in the past, but i'm quite 
familiar with SVN and Bazaar.
> I'm looking forward to seeing your code when you get the chance to post it to Github!
>
> Colin

Thanks,

Chris.

>
> ---
> Colin Clark
> http://fluidproject.org



More information about the Architecture mailing list