--- a/src/pyams_security/resources/js/security.js Mon Jan 18 18:34:27 2016 +0100
+++ b/src/pyams_security/resources/js/security.js Thu Jun 02 16:14:07 2016 +0200
@@ -1,6 +1,10 @@
-(function($) {
+(function($, globals) {
+
+ 'use strict';
- window.PyAMS_security = {
+ var MyAMS = globals.MyAMS;
+
+ var PyAMS_security = {
/**
* Init social plug-in
@@ -8,7 +12,7 @@
init_social: function (element) {
MyAMS.ajax.check(window.authomatic,
- '/--static--/pyams_security/js/authomatic' + (MyAMS.devmode ? '.min.js' : '.js'),
+ '/--static--/pyams_security/js/authomatic' + MyAMS.devext + '.js',
function (first_load) {
authomatic.setup({
popupWidth: 800,
@@ -26,5 +30,6 @@
});
}
};
+ globals.PyAMS_security = PyAMS_security;
-})(jQuery);
+})(jQuery, this);
--- a/src/pyams_security/resources/js/security.min.js Mon Jan 18 18:34:27 2016 +0100
+++ b/src/pyams_security/resources/js/security.min.js Thu Jun 02 16:14:07 2016 +0200
@@ -1,1 +1,1 @@
-(function(a){window.PyAMS_security={init_social:function(b){MyAMS.ajax.check(window.authomatic,"/--static--/pyams_security/js/authomatic"+(MyAMS.devmode?".min.js":".js"),function(c){authomatic.setup({popupWidth:800,popupHeight:400,onLoginComplete:function(d){console.log(d);if(d.error){}else{if(d.user){alert(d.user)}}}});authomatic.popupInit()})}}})(jQuery);
\ No newline at end of file
+(function(c,b){var d=b.MyAMS;var a={init_social:function(e){d.ajax.check(window.authomatic,"/--static--/pyams_security/js/authomatic"+d.devext+".js",function(f){authomatic.setup({popupWidth:800,popupHeight:400,onLoginComplete:function(g){console.log(g);if(g.error){}else{if(g.user){alert(g.user)}}}});authomatic.popupInit()})}};b.PyAMS_security=a})(jQuery,this);
\ No newline at end of file