Browse Source

fixed js bug Drupal.ajax undefined, fixe #81

Bachir Soussi Chiadmi 6 years ago
parent
commit
1eb61fe020

+ 11 - 9
sites/all/themes/gui/materiobasetheme/js/script.js

@@ -519,14 +519,16 @@
       });
 
       // @see http://www.jaypan.com/tutorial/calling-function-after-ajax-event-drupal-7
-    	Drupal.ajax.prototype.commands.ajaxAfterAddedFilterLine = function(ajax, response, status){
-    		// console.log('ajax after added filter line');
-        initLayout();
-    	};
-      Drupal.ajax.prototype.commands.ajaxAfterRemovedFilterLine = function(ajax, response, status){
-        // console.log('ajax after removed filter line');
-        initLayout();
-      };
+      if(typeof Drupal.ajax !== "undefined"){
+      	Drupal.ajax.prototype.commands.ajaxAfterAddedFilterLine = function(ajax, response, status){
+      		// console.log('ajax after added filter line');
+          initLayout();
+      	};
+        Drupal.ajax.prototype.commands.ajaxAfterRemovedFilterLine = function(ajax, response, status){
+          // console.log('ajax after removed filter line');
+          initLayout();
+        };
+      }
     };
 
     function onLoadingContent(event){
@@ -661,7 +663,7 @@
     // };
 
     MaterioBaseTheme.prototype.on_mousemove_card = function(event){
-      //trace('on_mousemove_Card', event);
+      // trace('on_mousemove_Card', event);
       focusCard($(this));
     };
 

File diff suppressed because it is too large
+ 0 - 0
sites/all/themes/gui/materiobasetheme/js/script.min.js


Some files were not shown because too many files changed in this diff