This file contains 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
npm version minor |
This file contains 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
closeModal: function() { | |
var fw7 = new Framework7(); | |
Ember.$(document).click(function(e) { | |
var panel = Ember.$('.container-sidebar'); | |
var elementClicked = Ember.$(e.target); | |
var clickIn = Ember.$.contains(panel[0], e.target); | |
if (!clickIn && !elementClicked.hasClass('close-sidebar')) { | |
fw7.closePanel(); | |
} |
This file contains 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
npm i Atlantis-Software/waterline#deepPopulate | |
USE: | |
Father.find() | |
.populate('child.grandchild') | |
http://stackoverflow.com/questions/23446484/sails-js-populate-nested-associations |
This file contains 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
STEPS: | |
1 CREATE PROJECT: | |
1.1 -> ember new project-name | |
2 PODS: | |
2.1 -> In config/environment add this line podModulePrefix: 'project-name/pods', | |
2.2 -> ember generate route application --pod | |
2.3 -> read more in http://ember-cli.com/user-guide/ | |
This file contains 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
/******************************** Custom Post contact ****************************/ | |
function custom_post_contact() { | |
$labels = array( | |
'name' => _x( 'contacts', 'post type general name' ), | |
'singular_name' => _x( 'contact', 'post type singular name' ), | |
'add_new' => _x( 'Adicionar Nova contact', 'contact' ), | |
'add_new_item' => __( 'Nova contact' ), | |
'edit_item' => __( 'Editar contact' ), | |
'new_item' => __( 'Nova contact' ), | |
'all_items' => __( 'Todas as contacts' ), |
This file contains 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
JQUERY LIB: | |
https://raw.githubusercontent.com/cdnjs/cdnjs/master/ajax/libs/jquery.inputmask/3.1.49/jquery.inputmask.bundle.min.js | |
HTML: | |
<input type="text" placeholder="Telefone*" name="telefone" class="input-phone" required> | |
CODE JS: | |
jQuery(".input-phone").inputmask({ | |
mask: ['(99) 9999-9999', '(99) 99999-9999'], | |
keepStatic: true, |
This file contains 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
arquivo javascript | |
//code ajax of loading feed of facebook | |
var skipFb = 0; | |
$('.button-feed-fb').click(function(e) { | |
var idFeedFb = e.target.id; | |
if (idFeedFb === 'prev-feed-fb') { | |
if (skipFb > 0) { |
This file contains 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
sass --watch input.scss:output.css |
This file contains 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
$(document).scroll(function() { | |
var top = document.body.scrollTop; | |
var maxTop = document.body.scrollHeight - document.body.clientHeight; | |
if (parseInt(top) === maxTop) { | |
console.log('Chegou ao fim da página') | |
} | |
}); |
NewerOlder