developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.
#688 closed enhancement (fixed)
jForms: always include jQuery when using HTML builder
Reported by: | Julien | Owned by: | laurentj |
---|---|---|---|
Priority: | high | Milestone: | Jelix 1.1 beta 1 |
Component: | jelix:forms | Version: | trunk |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | #687 | Documentation needed: | no |
Hosting Provider: | Php version: |
Attachments (1)
Change History (11)
Changed 12 years ago by Julien
comment:1 Changed 12 years ago by Julien
- Status changed from new to assigned
comment:2 Changed 12 years ago by laurentj
- Milestone set to Jelix 1.1 beta 1
should we really include jquery everytime we use the html builder of jquery ? that is the question. Because even for little forms, we will have 55ko of javascript loaded in the page...
we have to discuss about that point...
comment:3 Changed 12 years ago by Julien
maybe I could write the patches another way, but I think we should remember :
- jquery.js will be cached in browsers
- jQuery is needed by Wymeditor, the future datepicker, ajax for jForms, etc...
So I think that default inclusion may be a really good thing that does not cost that much perf.
Maybe we should write an alternative builder ? The problem is that #687 make jforms.js require jQuery for triggering pre-check event. So we may need 2 jforms.js, one for each builder.
Or jforms.js could check jQuery availability before binding that event ?
comment:4 Changed 12 years ago by laurentj
- Version changed from 1.0.5 to trunk
comment:5 Changed 12 years ago by laurentj
- Owner changed from Julien to laurentj
- Status changed from assigned to new
Ok, we decided to include jQuery for the html builder. But at the same time, I would like a htmllight builder.
I'm currently creating this htmllight builder and integrate your patch...
comment:6 Changed 12 years ago by Julien
Laurent,
just added a variant of the patch for #687
It does not make jQuery required thanks to a simple test on jQuery function presence in jforms.js
So the current ticket may be invalid.
I say that, because if you write a htmllight builder, you will still need to check for jQuery availability in jforms.js, or have a jforms-ligh.js or something....
So please take a look at the second version of the patch for #687, it may save your time ;)
comment:7 follow-up: ↓ 8 Changed 12 years ago by laurentj
because if you write a htmllight builder, you will still need to check for jQuery availability in jforms.js, or have a jforms-ligh.js or something....
Yes, I know ;-)
it may save your time
too late...
comment:8 in reply to: ↑ 7 Changed 12 years ago by Julien
comment:9 Changed 12 years ago by laurentj
- Resolution set to fixed
- review review? deleted
- Status changed from new to closed
Done. Commited in the trunk.
the html builder now includes always jquery and has its own javascript file, jforms_jquery.js. A new builder, htmllight, won't use jquery except for the html editor, and have its own javascript file jforms_light.js
we can now improve jforms_jquery.js to use all features we need of jquery. And you can patch jforms_light.js to fix bug #687.
comment:10 Changed 12 years ago by Julien
ok, I just made a third version of the patch for #687
blocking #687 because committing #687 without committing this ticket will break jforms.js