Hi,
as ticket #1485135 [1] suggests, javascript's native prompt() should be replaced with a custom one. I did a bit of research and I found Impromptu [2] seemed to do this job quite well.
after some fiddling with the code I managed to get a nice-looking (at least I think so -> but that doesn't count as I fail at any design/graphics tasks) prompt dialog. A screenshot of it can be seen under [3]
my only problem is: to get this working, I had to refactor some code in app.js (not much, but still enough that it could break something :)) Because of this I'm asking for someone who could review my code and suggest what could've been done better. A patch against svn trunk is provided under [4]
PS: I also think that the milestone for the ticket should be set to 0.4-beta, as it requires a bit more work than just replacing one line in app.js
Regards, Martin
[1] http://trac.roundcube.net/ticket/1485135 [2] http://trentrichardson.com/Impromptu/index.php [3] http://img5.abload.de/img/rcppuje3.png [4] http://pastebin.ca/1467910 _______________________________________________ List info: http://lists.roundcube.net/dev/
On Sat, Jun 20, 2009 at 10:19 PM, darklightdarklight.xdarklight@googlemail.com wrote:
Hi,
as ticket #1485135 [1] suggests, javascript's native prompt() should be replaced with a custom one. I did a bit of research and I found Impromptu [2] seemed to do this job quite well.
after some fiddling with the code I managed to get a nice-looking (at least I think so -> but that doesn't count as I fail at any design/graphics tasks) prompt dialog. A screenshot of it can be seen under [3]
my only problem is: to get this working, I had to refactor some code in app.js (not much, but still enough that it could break something :)) Because of this I'm asking for someone who could review my code and suggest what could've been done better. A patch against svn trunk is provided under [4]
PS: I also think that the milestone for the ticket should be set to 0.4-beta, as it requires a bit more work than just replacing one line in app.js
Thanks for working on this, and I also liked what you did.
Re: the workload. I think a jquery-ui based version would def. need a little more time. Can anyone confirm if this is an urgent thing? I never heard that prompt() is blocked in IE. I also don't have IE until Tuesday to confirm this.
Till
Regards, Martin
[1] http://trac.roundcube.net/ticket/1485135 [2] http://trentrichardson.com/Impromptu/index.php [3] http://img5.abload.de/img/rcppuje3.png [4] http://pastebin.ca/1467910 _______________________________________________ List info: http://lists.roundcube.net/dev/
List info: http://lists.roundcube.net/dev/
Hallo,
don't looked at the code, but had some time ago the same problem. As long as i know IE don't block promt's, but it ask/warn you if you want to popup the promt. And this is very annoying...
The replacement of promt/alert and co. is not that difficult. But, as i said before, i don't looked a the code. As replacement there are different (ready) possibilities:
http://abeautifulsite.net/notebook_files/87/demo/ Just replace alert/promt/confirm with jAlert/jConfirm... Okey... one must define the Event-Handler when pressing OK-Button and so on in a different way. But nothing difficult.
http://docs.jquery.com/UI/Dialog For my tastes a littlebit heavy-weight. But when one want to use more of the UI-Library of JQuery, than maybe a usefull choise.
do, what the plugin above do for you, by yourself. But also this is not that difficult. First time i had to solve this problem with promts i used the jQuery BlockUI-Plugin (http://www.malsup.com/jquery/block/).
One Thing what i'm thinking about is the skinning. Since this Prompts (don't know if this is the same for the plugin darklight mentiod) are skinable the skindefinitions should be editable a replaceable by each rc-skin. For the first two plugins the definitions are done through css-definitions. So also nothing difficult.
Eduard
till schrieb:
On Sat, Jun 20, 2009 at 10:19 PM, darklightdarklight.xdarklight@googlemail.com wrote:
Hi,
as ticket #1485135 [1] suggests, javascript's native prompt() should be replaced with a custom one. I did a bit of research and I found Impromptu [2] seemed to do this job quite well.
after some fiddling with the code I managed to get a nice-looking (at least I think so -> but that doesn't count as I fail at any design/graphics tasks) prompt dialog. A screenshot of it can be seen under [3]
my only problem is: to get this working, I had to refactor some code in app.js (not much, but still enough that it could break something :)) Because of this I'm asking for someone who could review my code and suggest what could've been done better. A patch against svn trunk is provided under [4]
PS: I also think that the milestone for the ticket should be set to 0.4-beta, as it requires a bit more work than just replacing one line in app.js
Thanks for working on this, and I also liked what you did.
Re: the workload. I think a jquery-ui based version would def. need a little more time. Can anyone confirm if this is an urgent thing? I never heard that prompt() is blocked in IE. I also don't have IE until Tuesday to confirm this.
Till
Regards, Martin
[1] http://trac.roundcube.net/ticket/1485135 [2] http://trentrichardson.com/Impromptu/index.php [3] http://img5.abload.de/img/rcppuje3.png [4] http://pastebin.ca/1467910 _______________________________________________ List info: http://lists.roundcube.net/dev/
List info: http://lists.roundcube.net/dev/
List info: http://lists.roundcube.net/dev/
Hi,
okay... as far as I can see: jQuery is the way to go :)
http://abeautifulsite.net/notebook_files/87/demo/ Just replace alert/promt/confirm with jAlert/jConfirm... Okey... one must define the Event-Handler when pressing OK-Button and so on in a different way. But nothing difficult.
okay, this one sounds cool.. we could also give alert()'s a "native" look with this.
http://docs.jquery.com/UI/Dialog For my tastes a littlebit heavy-weight. But when one want to use more of the UI-Library of JQuery, than maybe a usefull choise.
if the roundcube devs wish to create an UI (including js elements) this may be the way to go since basically everything can be done with this (seems there are many plugins for this)
Yet another way is to use any of the modal-plugins. This way you must do, what the plugin above do for you, by yourself. But also this is not that difficult. First time i had to solve this problem with promts i used the jQuery BlockUI-Plugin (http://www.malsup.com/jquery/block/).
may also be an option, see what I wrote above
One Thing what i'm thinking about is the skinning. Since this Prompts (don't know if this is the same for the plugin darklight mentiod) are skinable the skindefinitions should be editable a replaceable by each rc-skin. For the first two plugins the definitions are done through css-definitions. So also nothing difficult.
the jQuery plugin I used allows to skinning via CSS
maybe the roundcube devs should suggest which of the jQuery plugins will be used, so when other devs/contributors want to do a javascript UI they all use the same jQuery plugin (so no plugin mess will be there)
Regards, Martin _______________________________________________ List info: http://lists.roundcube.net/dev/
darklight wrote:
as ticket #1485135 [1] suggests, javascript's native prompt() should be replaced with a custom one. I did a bit of research and I found Impromptu [2] seemed to do this job quite well.
after some fiddling with the code I managed to get a nice-looking (at least I think so -> but that doesn't count as I fail at any design/graphics tasks) prompt dialog. A screenshot of it can be seen under [3]
Because we're using prompt in only one place, maybe would be better to replace it by standard confirm dialog. I don't like to include many js files for one small effect.
Because we're using prompt in only one place, maybe would be better to replace it by standard confirm dialog. I don't like to include many js files for one small effect.
In general, i don't like the look of alert/confirm and co. dialogs. They
just don't fit to the look of the site. As long as i see the prompt is
used for asking a Subject, if it is empty. Why not simply add an
Error-Message above the Subjects-Field with small red characters and set
the Subject to "(No Subject)". If the user try to send the same mail a
second time with an empty Subject the program should recognize this and
pass.
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hi,
Because we're using prompt in only one place, maybe would be better to replace it by standard confirm dialog. I don't like to include many js files for one small effect.
yes, using a js which only targets one problem should be avoided.
but to make all dialogs match roundcube's look and feel there are two solutions (I can think of):
don't use javascript for those kind of dialogs.. find another way to tell the user he has to do something (see last mail from Eduard Krieger). problem: this may affect the usability
use a jQuery plugin that can create multiple dialogs (not just one for prompts, another one for alerts and so on...) we could make that one look exactly like the rest of roundcube PLUS: this can be changed in the CSS (so it's still fully skinable if someone creates another theme) if the devs vote for this one we should decide which of the jQuery plugins to use (list of plugins posted earlier by Eduard Krieger)
I (as in "myself" :)) would prefer the second one.. the jQuery plugin I just like that someone can re-use it everywhere he wants to and the look and feel still stays the same. and from a developers point of view it's not too hard to integrate (at least as far as I can say)
Regards, Martin _______________________________________________ List info: http://lists.roundcube.net/dev/