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
const id = 'gumga-filter'; | |
let elm = document.querySelector('#' + id); | |
document.addEventListener('click', (e) => { | |
let isElement = 0; | |
angular.forEach(e.path, (node) => { | |
if (node.nodeName == id.toUpperCase()) isElement++ | |
}); | |
if (!isElement) { | |
if (!isValidQuery()) { | |
elm.classList.add('shake'); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Loja de Cerveja</title> | |
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Loja de Cerveja</title> | |
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css"> | |
<style> |
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
<!DOCTYPE html> | |
<html ng-app="lojaDeCerveja"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Loja de Cerveja</title> | |
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css"> | |
<style> |
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
var app = angular.module('lojaDeCerveja', []); | |
app.controller('LojaDeCervejaController', function($scope) { | |
// Definindo a lista de cervejarias default | |
$scope.cervejarias = [ | |
{ | |
id: 1, | |
nome: 'Araucária' | |
}, | |
{ |
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
<gumga-filter search="searchFilter()" data="teste"> | |
<advanced-search-field type="string" label="Nome" field="nome"></advanced-search-field> | |
<advanced-search-field type="number" label="Idade" field="idade"></advanced-search-field> | |
<advanced-search-field type="cpf" label="CPF" field="cpf"></advanced-search-field> | |
<advanced-search-field type="cnpj" label="CNPJ" field="cnpj"></advanced-search-field> | |
<advanced-search-field type="boolean" label="Ativo" field="ativo" true-label="True" false-label="False"></advanced-search-field> | |
<advanced-search-field type="select" label="Estados" field="id" data="selects"></advanced-search-field> | |
<advanced-search-field type="enum" label="Roles" field="states" data="selects"></advanced-search-field> | |
</gumga-filter> |
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
export default class FacebookFactory { | |
constructor($window, $timeout, $q) { | |
this.options = { | |
appId: null, | |
status: true, | |
cookie: false, | |
xfbml: false, | |
version: 'v2.4', | |
scope: '' | |
} |
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
export default class FixedOnScroll { | |
constructor($window) { | |
this.restrict = 'A' | |
this.window = $window | |
} | |
link(scope, elem, attrs) { | |
let e = elem[0], | |
offset = attrs.offset || 0, | |
top = attrs.top || 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
<mat-form-field class="w-full" appearance="outline"> | |
<mat-label>Localize sua empresa no mapa</mat-label> | |
<input type="text" placeholder="Procure pelo nome da empresa ou endereço" matInput [formControl]="searchInput" [matAutocomplete]="auto"> | |
<mat-icon matSuffix>place</mat-icon> | |
<mat-hint>Ao selecionar, ajuste o ponto no mapa se necessário</mat-hint> | |
<mat-autocomplete #auto="matAutocomplete" [displayWith]="displayFn" (optionSelected)="onChangeAddress($event)"> | |
<mat-option class="address-option" *ngFor="let option of options" [value]="option"> | |
<mat-icon matSuffix>place</mat-icon> | |
<span class="place">{{option.structured_formatting.main_text}}</span> | |
<small class="address">{{option.structured_formatting.secondary_text}}</small> |
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
export interface ErrorMessages { | |
[k: string]: string; | |
} |
OlderNewer