Prechádzať zdrojové kódy

Ménage fichiers js

François Drouhard 9 mesiacov pred
rodič
commit
50073b4180
3 zmenil súbory, kde vykonal 0 pridanie a 51 odobranie
  1. 0 2
      assets/app.js
  2. 0 30
      assets/js/suivifilms2.js
  3. 0 19
      assets/js/switchView.js

+ 0 - 2
assets/app.js

@@ -13,10 +13,8 @@ import 'bootstrap-star-rating/js/locales/fr'
 import 'bootstrap-star-rating/css/star-rating.css';
 import 'bootstrap-star-rating/themes/krajee-fa/theme';
 import 'bootstrap-star-rating/themes/krajee-fa/theme.css';
-import './js/suivifilms2';
 import './js/addCollectionWidget';
 import './js/filtre';
-//import './js/switchView';
 import './js/colorModeBootstrap'
 import { switchView } from './js/switchViewVanilla';
 import { switchEtat } from './js/switchEtat';

+ 0 - 30
assets/js/suivifilms2.js

@@ -1,30 +0,0 @@
-(function ($) {
-    $.fn.switchEtat = function () {
-        this.each(function() {
-            $(this).on("click", function(e) {
-                e.preventDefault();
-                let $icone = $(this).children('i');
-                let contenu = $(this).data('content');
-                let iconeEtatUn = $(this).data('icone-actif');
-                let iconeEtatDeux = $(this).data('icone-inactif');
-                let chemin = $(this).data('path');
-                $.ajax({
-                    type: 'POST',
-                    url: chemin,
-                    data: 'id_film=' + contenu,
-                    success: function (data) {
-                        if ($icone.attr('class') === iconeEtatUn) {
-                            $icone.attr('class', iconeEtatDeux);
-                        } else {
-                            $icone.attr('class', iconeEtatUn);
-                        }
-                        return;
-                    },
-                    complete: function () {
-
-                    }
-                })
-            })
-        })
-    }
-})(jQuery);

+ 0 - 19
assets/js/switchView.js

@@ -1,19 +0,0 @@
-(function ($) {
-    $.fn.switchView = function () {
-        $(this).on('click', function(e) {
-            e.preventDefault();
-            change();
-        });
-
-        function change () {
-            $.ajax({
-                url: "/changeview",
-                type: 'GET',
-                dataType: 'json',
-                success: function (reponse) {
-                    window.location.reload();
-                }
-            })
-        }
-    }
-})(jQuery);