Browse Source

[FIX][11.0] website_anchor_smooth_scroll travis warn

pull/481/head
tbaden 1 month ago
parent
commit
7cddc63792

+ 0
- 1
website_anchor_smooth_scroll/__manifest__.py View File

@@ -1,4 +1,3 @@
1
-# -*- coding: utf-8 -*-
2 1
 # © 2016 Antiun Ingeniería S.L. - Jairo Llopis
3 2
 # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
4 3
 {

+ 16
- 16
website_anchor_smooth_scroll/static/src/js/website_anchor_smooth_scroll.js View File

@@ -2,25 +2,25 @@
2 2
  * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
3 3
 odoo.define('website_anchor_smooth_scroll.website_anchor_smooth_scroll', function (require) {
4 4
 
5
-"use strict";
5
+    "use strict";
6 6
 
7
-function website_anchor_smooth_scroll(event) {
8
-    event.preventDefault();
9
-    var target = $(event.currentTarget.hash);
7
+    function website_anchor_smooth_scroll (event) {
8
+        event.preventDefault();
9
+        var target = $(event.currentTarget.hash);
10 10
 
11
-    return $('html, body')
12
-    .stop()
13
-    .animate({
14
-        'scrollTop': target.offset().top - 100
15
-    })
16
-    .promise()
17
-    .done(function(element) {
18
-        history.pushState(null, document.title, event.target.hash);
19
-    });
20
-}
11
+        return $('html, body')
12
+            .stop()
13
+            .animate({
14
+                'scrollTop': target.offset().top - 100,
15
+            })
16
+            .promise()
17
+            .done(function () {
18
+                history.pushState(null, document.title, event.target.hash);
19
+            });
20
+    }
21 21
 
22
-require('web.dom_ready');
22
+    require('web.dom_ready');
23 23
 
24
-$("a[href^='#']:not([href=#])").on("click", website_anchor_smooth_scroll);
24
+    $("a[href^='#']:not([href=#])").on("click", website_anchor_smooth_scroll);
25 25
 
26 26
 });

Loading…
Cancel
Save