FCKEditor loading even if not wanted

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

FCKEditor loading even if not wanted

StephR
Sorry for the subject, I couldn't find anything more relevant.

Depending on user's status, he can edit or add a news with the help of a dialog. I do something like this :


<xforms:group ref=".[instance('rights-instance')/role = 'Coordinator']">
  <xforms:trigger appearance="minimal" ref="instance('news-template')">
    <xforms:label>
      <img src="/design/images/add.gif" alt="Add" /> Add a news
    </xforms:label>
    <xforms:action ev:event="DOMActivate">
      <xxforms:show dialog="addNews"/>
      <xforms:setfocus control="addNewsSaveTrigger"/>
    </xforms:action>
  </xforms:trigger>
</xforms:group>


If the user as the status as "coordinator" you will see a image "add" and can call the dialog "addNews". This is working great... but I was wondering if there would be a way to not load the dialog if the user doesn't have the status "coordinator". He can't add a news, that's ok, but I see that the FCKeditor is loaded anyway. I tried to but the dialog in a group like the one above, but it doesn't help.

A hint?

Thanks steph


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: FCKEditor loading even if not wanted

Erik Bruchez
Administrator
Steph,

At the moment, Orbeon Forms decides on which JavaScript files to  
included based on an analysis of the controls present in the form. If  
there is a possible use of the HTML area, say, then the JavaScript for  
the FCK editor will be included. This is not optimal, but I don't  
think there is an easy way to change this.

-Erik

On Dec 18, 2007, at 3:10 AM, Stephane Ruchet wrote:

> Sorry for the subject, I couldn't find anything more relevant.
>
> Depending on user's status, he can edit or add a news with the help  
> of a dialog. I do something like this :
>
>
> <xforms:group ref=".[instance('rights-instance')/role =  
> 'Coordinator']">
>   <xforms:trigger appearance="minimal" ref="instance('news-
> template')">
>     <xforms:label>
>       <img src="/design/images/add.gif" alt="Add" /> Add a news
>     </xforms:label>
>     <xforms:action ev:event="DOMActivate">
>       <xxforms:show dialog="addNews"/>
>       <xforms:setfocus control="addNewsSaveTrigger"/>
>     </xforms:action>
>   </xforms:trigger>
> </xforms:group>
>
>
> If the user as the status as "coordinator" you will see a image  
> "add" and can call the dialog "addNews". This is working great...  
> but I was wondering if there would be a way to not load the dialog  
> if the user doesn't have the status "coordinator". He can't add a  
> news, that's ok, but I see that the FCKeditor is loaded anyway. I  
> tried to but the dialog in a group like the one above, but it  
> doesn't help.
>
> A hint?
>
> Thanks steph
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: FCKEditor loading even if not wanted

StephR
I understand... but if the dialog is in a group where you evaluate a condition... wouldn't it be possible to omit the dialog if the evaluation turns false?

Maybe I'm missing a point here, but when on the server, the translation XForms -> HTML is done... can't you skip anything that would be in a evaluation returning false?




Erik Bruchez a écrit :
Steph,

At the moment, Orbeon Forms decides on which JavaScript files to included based on an analysis of the controls present in the form. If there is a possible use of the HTML area, say, then the JavaScript for the FCK editor will be included. This is not optimal, but I don't think there is an easy way to change this.

-Erik

On Dec 18, 2007, at 3:10 AM, Stephane Ruchet wrote:

Sorry for the subject, I couldn't find anything more relevant.

Depending on user's status, he can edit or add a news with the help of a dialog. I do something like this :


<xforms:group ref=".[instance('rights-instance')/role = 'Coordinator']">
  <xforms:trigger appearance="minimal" ref="instance('news-template')">
    <xforms:label>
      <img src="/design/images/add.gif" alt="Add" /> Add a news
    </xforms:label>
    <xforms:action ev:event="DOMActivate">
      <xxforms:show dialog="addNews"/>
      <xforms:setfocus control="addNewsSaveTrigger"/>
    </xforms:action>
  </xforms:trigger>
</xforms:group>


If the user as the status as "coordinator" you will see a image "add" and can call the dialog "addNews". This is working great... but I was wondering if there would be a way to not load the dialog if the user doesn't have the status "coordinator". He can't add a news, that's ok, but I see that the FCKeditor is loaded anyway. I tried to but the dialog in a group like the one above, but it doesn't help.

A hint?

Thanks steph

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: FCKEditor loading even if not wanted

Erik Bruchez
Administrator
Say we we what you propose. Then the dialog-related JavaScript files  
are not included.

Now what happens if something occurs which causes the group's  
condition to evaluate to true() and the group to become visible again?  
Then the dialog-related JavaScript files must be made available. This  
is not impossible: the server could tell the client to load the  
missing files dynamically. But my point is that it is not as simple as  
just omitting the files: you need to also handle the case where they  
become needed later.

In most cases, this is not much a problem if you combined the  
JavaScript files (this is the default), in that the client will  
request only one JavaScript file, e.g. xforms-dialog-min.js. The file  
will be a little larger, but that's all.

In the case of the FCK editor, things are worse because that editor  
requires loading more JavaScript files. Some of them are loaded in an  
iframe, and dynamically. So here eventually we will need a better  
solution, but we hope that the YUI RTE will help by being a little bit  
cleaner.

-Erik

On Dec 18, 2007, at 2:20 PM, Stephane Ruchet wrote:

> I understand... but if the dialog is in a group where you evaluate a  
> condition... wouldn't it be possible to omit the dialog if the  
> evaluation turns false?
>
> Maybe I'm missing a point here, but when on the server, the  
> translation XForms -> HTML is done... can't you skip anything that  
> would be in a evaluation returning false?
>
>
>
>
> Erik Bruchez a écrit :
>>
>> Steph,
>>
>> At the moment, Orbeon Forms decides on which JavaScript files to  
>> included based on an analysis of the controls present in the form.  
>> If there is a possible use of the HTML area, say, then the  
>> JavaScript for the FCK editor will be included. This is not  
>> optimal, but I don't think there is an easy way to change this.
>>
>> -Erik
>>
>> On Dec 18, 2007, at 3:10 AM, Stephane Ruchet wrote:
>>
>>> Sorry for the subject, I couldn't find anything more relevant.
>>>
>>> Depending on user's status, he can edit or add a news with the  
>>> help of a dialog. I do something like this :
>>>
>>>
>>> <xforms:group ref=".[instance('rights-instance')/role =  
>>> 'Coordinator']">
>>>   <xforms:trigger appearance="minimal" ref="instance('news-
>>> template')">
>>>     <xforms:label>
>>>       <img src="/design/images/add.gif" alt="Add" /> Add a news
>>>     </xforms:label>
>>>     <xforms:action ev:event="DOMActivate">
>>>       <xxforms:show dialog="addNews"/>
>>>       <xforms:setfocus control="addNewsSaveTrigger"/>
>>>     </xforms:action>
>>>   </xforms:trigger>
>>> </xforms:group>
>>>
>>>
>>> If the user as the status as "coordinator" you will see a image  
>>> "add" and can call the dialog "addNews". This is working great...  
>>> but I was wondering if there would be a way to not load the dialog  
>>> if the user doesn't have the status "coordinator". He can't add a  
>>> news, that's ok, but I see that the FCKeditor is loaded anyway. I  
>>> tried to but the dialog in a group like the one above, but it  
>>> doesn't help.
>>>
>>> A hint?
>>>
>>> Thanks steph
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email]  
>>> mailing list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>> --
>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>> http://www.orbeon.com/
>>
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: FCKEditor loading even if not wanted

StephR
OK I get the point... thanks!

Erik Bruchez a écrit :
Say we we what you propose. Then the dialog-related JavaScript files are not included.

Now what happens if something occurs which causes the group's condition to evaluate to true() and the group to become visible again? Then the dialog-related JavaScript files must be made available. This is not impossible: the server could tell the client to load the missing files dynamically. But my point is that it is not as simple as just omitting the files: you need to also handle the case where they become needed later.

In most cases, this is not much a problem if you combined the JavaScript files (this is the default), in that the client will request only one JavaScript file, e.g. xforms-dialog-min.js. The file will be a little larger, but that's all.

In the case of the FCK editor, things are worse because that editor requires loading more JavaScript files. Some of them are loaded in an iframe, and dynamically. So here eventually we will need a better solution, but we hope that the YUI RTE will help by being a little bit cleaner.

-Erik

On Dec 18, 2007, at 2:20 PM, Stephane Ruchet wrote:

I understand... but if the dialog is in a group where you evaluate a condition... wouldn't it be possible to omit the dialog if the evaluation turns false?

Maybe I'm missing a point here, but when on the server, the translation XForms -> HTML is done... can't you skip anything that would be in a evaluation returning false?




Erik Bruchez a écrit :

Steph,

At the moment, Orbeon Forms decides on which JavaScript files to included based on an analysis of the controls present in the form. If there is a possible use of the HTML area, say, then the JavaScript for the FCK editor will be included. This is not optimal, but I don't think there is an easy way to change this.

-Erik

On Dec 18, 2007, at 3:10 AM, Stephane Ruchet wrote:

Sorry for the subject, I couldn't find anything more relevant.

Depending on user's status, he can edit or add a news with the help of a dialog. I do something like this :


<xforms:group ref=".[instance('rights-instance')/role = 'Coordinator']">
  <xforms:trigger appearance="minimal" ref="instance('news-template')">
    <xforms:label>
      <img src="/design/images/add.gif" alt="Add" /> Add a news
    </xforms:label>
    <xforms:action ev:event="DOMActivate">
      <xxforms:show dialog="addNews"/>
      <xforms:setfocus control="addNewsSaveTrigger"/>
    </xforms:action>
  </xforms:trigger>
</xforms:group>


If the user as the status as "coordinator" you will see a image "add" and can call the dialog "addNews". This is working great... but I was wondering if there would be a way to not load the dialog if the user doesn't have the status "coordinator". He can't add a news, that's ok, but I see that the FCKeditor is loaded anyway. I tried to but the dialog in a group like the one above, but it doesn't help.

A hint?

Thanks steph

-- 
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws

-- 
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/


--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws