This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function scripts_include() { | |
| //CSS | |
| wp_enqueue_style( 'bootstrap-min', get_template_directory_uri() . '/assets/bootstrap/css/bootstrap.min.css' ); | |
| wp_enqueue_style( 'own-theme', get_template_directory_uri() . '/assets/css/owl.theme.css' ); | |
| wp_enqueue_style( 'own-carousel', get_template_directory_uri() . '/assets/css/owl.carousel.css' ); | |
| wp_enqueue_style( 'magnific-popup', get_template_directory_uri() . '/assets/css/magnific-popup.css' ); | |
| wp_enqueue_style( 'simpletextrotator', get_template_directory_uri() . '/assets/css/simpletextrotator.css' ); | |
| wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/assets/css/font-awesome.min.css' ); | |
| wp_enqueue_style( 'animate', get_template_directory_uri() . '/assets/css/animate.css"' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var rmdir = function(dir) { | |
| var list = fs.readdirSync(dir); | |
| for(var i = 0; i < list.length; i++) { | |
| var filename = path.join(dir, list[i]); | |
| var stat = fs.statSync(filename); | |
| if(filename == "." || filename == "..") { | |
| } else if(stat.isDirectory()) { | |
| rmdir(filename); | |
| } else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var rmfile = function(dir) { | |
| var list = fs.readdirSync(dir); | |
| for(var i = 0; i < list.length; i++) { | |
| var filename = path.join(dir, list[i]); | |
| var stat = fs.statSync(filename); | |
| if(filename != "." && filename != "..") { | |
| //if(moment()-moment(stat.mtime)>3600000) | |
| fs.unlinkSync(filename); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| idade : function (dia, mes, ano) { | |
| return ~~((Date.now()-(+new Date(ano+'/'+mes+'/'+dia)))/31557600000); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data : function (dia,mes,ano) { | |
| if(dia=='' || mes =='' || ano=='') | |
| return false; | |
| if(dia>31 || dia<1) | |
| return false; | |
| if(mes>12 || dia<1) | |
| return false; | |
| if(((new Date().getFullYear())-18)<ano || ano<1900) | |
| return false; | |
| if (((mes==4)||(mes==6)||(mes==9)||(mes==11))&&(dia>30)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .directive('ngKeyup', ['$parse', function($parse) { | |
| return function(scope, element, attr) { | |
| var fn = $parse(attr['ngKeyup']); | |
| element.bind('keyup', function(event) { | |
| scope.$apply(function() { | |
| fn(scope, {$event:event}); | |
| }); | |
| }); | |
| } | |
| }]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .directive('ngChange', ['$parse', function($parse) { | |
| return function(scope, element, attr) { | |
| var fn = $parse(attr['ngChange']); | |
| element.bind('change', function(event) { | |
| scope.$apply(function() { | |
| fn(scope, {$event:event}); | |
| }); | |
| }); | |
| } | |
| }]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .directive('ngBlur', ['$parse', function($parse) { | |
| return function(scope, element, attr) { | |
| var fn = $parse(attr['ngBlur']); | |
| element.bind('blur', function(event) { | |
| scope.$apply(function() { | |
| fn(scope, {$event:event}); | |
| }); | |
| }); | |
| } | |
| }]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| app.directive('stopEvent', function () {//parar propgragaçao de um evento | |
| return { | |
| restrict: 'A', | |
| link: function (scope, element, attr) { | |
| element.bind(attr.stopEvent, function (e) { | |
| e.stopPropagation(); | |
| }); | |
| } | |
| }; | |
| }) |