🚧 [jquery] Afina cambios para el tutorial
This commit is contained in:
parent
bf356774f8
commit
751809a0cb
3 changed files with 5 additions and 5 deletions
|
|
@ -15,10 +15,6 @@ impl ModuleTrait for JQuery {
|
|||
MODULE_JQUERY
|
||||
}
|
||||
|
||||
fn actions(&self) -> Vec<Action> {
|
||||
vec![action!(ActionBeforeRenderPage => before_render_page)]
|
||||
}
|
||||
|
||||
fn name(&self) -> L10n {
|
||||
L10n::t("module_name", &LOCALE_JQUERY)
|
||||
}
|
||||
|
|
@ -27,6 +23,10 @@ impl ModuleTrait for JQuery {
|
|||
L10n::t("module_description", &LOCALE_JQUERY)
|
||||
}
|
||||
|
||||
fn actions(&self) -> Vec<Action> {
|
||||
vec![action!(ActionBeforeRenderPage => before_render_page)]
|
||||
}
|
||||
|
||||
fn configure_service(&self, cfg: &mut service::web::ServiceConfig) {
|
||||
serve_static_files!(cfg, "/jquery", jquery);
|
||||
}
|
||||
|
|
@ -45,7 +45,7 @@ impl JQuery {
|
|||
fn before_render_page(page: &mut Page) {
|
||||
if let Some(true) = page.context().get_param::<bool>(JQUERY_PARAM) {
|
||||
page.context().alter(ContextOp::AddJavaScript(
|
||||
JavaScript::located("/jquery/3.6.0/jquery.min.js")
|
||||
JavaScript::located("/jquery/jquery.min.js?v=3.6.0")
|
||||
.with_weight(isize::MIN)
|
||||
.with_mode(ModeJS::Normal),
|
||||
));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue