Hi Gruson,
El 22/02/13 10:53, GRUSON Christophe escribió:
> I wondered if a couldn't send a ajax post to the server and modify
> javacript acccording to the response.
>
> Ex. IsUserProfile('action','CreateEvent') = TRUE then "generate
> dialog and create dialog"
> or IsUserPorfile('profile','client') = true then generate a
> specific dialog
>
> Do you think it need lot of work ?
You can make it simpler (and save lots of bandwidth) if you define a JS
variable inside the js_generator controller with those values, depending
on current user permissions.
Modifying the app.js code then would only require checking that variable
and generating a different dialog in case it has certain values.
I think the most difficult part of this modification would be coding the
new dialog, but if you have a look at app.js to see how it generates
other dialogs you should get along fine :-)
jabber:
jor...@jabberes.org