1/** 2@fileOverview 3 4@toc 5 6*/ 7 8'use strict'; 9 10angular.module('oitozero.ngSweetAlert', []) 11.factory('SweetAlert', [ '$rootScope', function ( $rootScope ) { 12 13 var swal = window.swal; 14 15 //public methods 16 var self = { 17 18 swal: function ( arg1, arg2, arg3 ) { 19 $rootScope.$evalAsync(function(){ 20 if( typeof(arg2) === 'function' ) { 21 swal( arg1, function(isConfirm){ 22 $rootScope.$evalAsync( function(){ 23 arg2(isConfirm); 24 }); 25 }, arg3 ); 26 } else { 27 swal( arg1, arg2, arg3 ); 28 } 29 }); 30 }, 31 success: function(title, message) { 32 $rootScope.$evalAsync(function(){ 33 swal( title, message, 'success' ); 34 }); 35 }, 36 error: function(title, message) { 37 $rootScope.$evalAsync(function(){ 38 swal( title, message, 'error' ); 39 }); 40 }, 41 warning: function(title, message) { 42 $rootScope.$evalAsync(function(){ 43 swal( title, message, 'warning' ); 44 }); 45 }, 46 info: function(title, message) { 47 $rootScope.$evalAsync(function(){ 48 swal( title, message, 'info' ); 49 }); 50 } 51 52 }; 53 54 return self; 55}]); 56
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.