From 751809a0cb5fa74efb2247aa017dff070066679a Mon Sep 17 00:00:00 2001 From: Manuel Cillero Date: Mon, 26 Jun 2023 22:29:15 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20[jquery]=20Afina=20cambios=20par?= =?UTF-8?q?a=20el=20tutorial?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagetop-jquery/src/lib.rs | 10 +++++----- pagetop-jquery/static/{3.6.0 => }/jquery.min.js | 0 pagetop-jquery/static/{3.6.0 => }/jquery.min.map | 0 3 files changed, 5 insertions(+), 5 deletions(-) rename pagetop-jquery/static/{3.6.0 => }/jquery.min.js (100%) rename pagetop-jquery/static/{3.6.0 => }/jquery.min.map (100%) diff --git a/pagetop-jquery/src/lib.rs b/pagetop-jquery/src/lib.rs index d3df0573..f9cbd26c 100644 --- a/pagetop-jquery/src/lib.rs +++ b/pagetop-jquery/src/lib.rs @@ -15,10 +15,6 @@ impl ModuleTrait for JQuery { MODULE_JQUERY } - fn actions(&self) -> Vec { - 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 { + 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::(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), )); diff --git a/pagetop-jquery/static/3.6.0/jquery.min.js b/pagetop-jquery/static/jquery.min.js similarity index 100% rename from pagetop-jquery/static/3.6.0/jquery.min.js rename to pagetop-jquery/static/jquery.min.js diff --git a/pagetop-jquery/static/3.6.0/jquery.min.map b/pagetop-jquery/static/jquery.min.map similarity index 100% rename from pagetop-jquery/static/3.6.0/jquery.min.map rename to pagetop-jquery/static/jquery.min.map