1var ls = ls || {}; 2ls.plugin = ls.plugin || {}; 3 4ls.plugin.autoopenid =( function ($) { 5 6 var that=this; 7 8 this.goServiceLogin = function(service) { 9 ls.ajax('autoopenid/login-oauth',{ service: service, referal: window.location.href },function(res){ 10 if (!res.bStateError) { 11 window.location.href=res.sUrl; 12 } else { 13 ls.msg.error(null,'РегиÑÑÑаÑÐ¸Ñ ÑеÑез '+service+' вÑеменно не доÑÑÑпна.'); 14 } 15 }.bind(this)); 16 }; 17 18 this.removeService = function(type,id) { 19 ls.ajax('autoopenid/service-remove',{ type: type, id: id },function(res){ 20 if (!res.bStateError) { 21 $('#autoopenid-service-connect-item-'+res.id).remove(); 22 } else { 23 ls.msg.error(null,res.sMsg); 24 } 25 }.bind(this)); 26 }; 27 28 this.showFormData = function() { 29 $('#aoid-form-mail').hide(); 30 $('#aoid-form-data').show(); 31 $('#aoid-toggle-data').addClass('active'); 32 $('#aoid-toggle-mail').removeClass('active'); 33 }; 34 35 this.showFormMail = function() { 36 $('#aoid-form-mail').show(); 37 $('#aoid-form-data').hide(); 38 $('#aoid-toggle-data').removeClass('active'); 39 $('#aoid-toggle-mail').addClass('active'); 40 }; 41 42 this.toggleFieldMail = function() { 43 $('#aoid-field-mail').toggle(); 44 }; 45 46 $(function(){ 47 $(document).on('click', '.js-autoopenid-auth', function (e) { 48 that.goServiceLogin($(this).data('service')); 49 return false; 50 }); 51 $(document).on('click', '.js-autoopenid-remove', function (e) { 52 that.removeService($(this).data('serviceType'),$(this).attr('data-service-id')); 53 return false; 54 }); 55 }.bind(this)); 56 57 return this; 58}).call(ls.plugin.autoopenid || {},jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.