bug #186 - ullCore: ullHelper: ull_link_to(): don't use javascript links if in non-edit mode

0 views
Skip to first unread message

klemens_u

unread,
Aug 7, 2008, 4:15:17 PM8/7/08
to ullright developers
previous discussion from the bugtracker:

--------------------------------
Denny Reeh (7.8.2008 20:29h):
There is a simple solution to detect if javascript is enabled or not.
We have the issue only, if something is in edit mode, so we can savly
check the javascript feature on the login-site with a hidden
formfield:

<input name="js_check" id="js_check" value="0" type="hidden">

<script language="JavaScript"><!--
document.getElementById('js_check').value = '1';
//--></script>

--------------------------------
Klemens Ullmann (7.8.2008 9:28h):
Thanks for the ideas!

We'll do this this way as a quick-workaround until there is better
support for real "graceful degration" helpers in symfony.

How will you detect if it's a non-javascript browser?

--------------------------------
Denny Reeh (5.8.2008 11:55h):
Two Ideas:
- if a non javascript browser enters the site, ullCore will not use
javascript in links
- only if the url .../edit/... or .../create, than javascript is used
(URL-parsing in helper function is needed)

--------------------------------
Klemens Ullmann (17.7.2008 10:50h):
problems: no graceful degration for non-javascript browsers
in the main navigation: right-click on link -> open in new tab does
not work

klemens_u

unread,
Aug 7, 2008, 4:21:10 PM8/7/08
to ullright developers
> Denny Reeh (7.8.2008 20:29h):
> There is a simple solution to detect if javascript is enabled or not.
> We have the issue only, if something is in edit mode,

ok, to sum this first issue up:

ull_link_to() parses the URL and uses javascript only if the action is
'create' or 'edit'.
so in any other actions the links will be plain html.

right?

> so we can savly
> check the javascript feature on the login-site with a hidden
> formfield:
>
what do you mean by 'login-site'?

Denny Reeh

unread,
Aug 7, 2008, 4:30:48 PM8/7/08
to ullrig...@googlegroups.com


2008/8/7 klemens_u <kle...@ull.at>


> Denny Reeh (7.8.2008 20:29h):
> There is a simple solution to detect if javascript is enabled or not.
> We have the issue only, if something is in edit mode,

ok, to sum this first issue up:

ull_link_to() parses the URL and uses javascript only if the action is
'create' or 'edit'.
so in any other actions the links will be plain html.

right?

Yes, correct.
 


> so we can savly
> check the javascript feature on the login-site with a hidden
> formfield:
>
what do  you mean by 'login-site'?

I've this formular plugins/ullCorePlugin/modules/ullUser/templates/loginSuccess.php in mind. I would add a hidden field describes above and store the result of javascript enabled/disabled in the session object.

Regards, Denny






--

Blog:
http://www.dreckscheisse.de

Fanshop:
http://www.black-dragon-king-fanware.com

klemens_u

unread,
Aug 7, 2008, 4:40:41 PM8/7/08
to ullright developers
> I've this formular
> plugins/ullCorePlugin/modules/ullUser/templates/loginSuccess.php in mind. I
> would add a hidden field describes above and store the result of javascript
> enabled/disabled in the session object.
>
ok - sounds good. so we check javascript during login, then set an
attribute in the users object like "has_javascript=true". if
"has_javascript=false" ull_link_to() never uses any javascript. if
"has_javascript=true", ull_link_to() uses javascript only in the
create and edit actions.

right? than lets go :-)

;-) klemens

Denny Reeh

unread,
Aug 7, 2008, 4:44:05 PM8/7/08
to ullrig...@googlegroups.com


2008/8/7 klemens_u <kle...@ull.at>

exactly, that's what i want to do.

Regards, Denny

 


;-) klemens

Reply all
Reply to author
Forward
0 new messages