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
| ### | |
| Knockout Live plugin | |
| http://github.com/thelinuxlich/knockout.live.plugin | |
| Copyright 2011, Alisson Cavalcante Agiani | |
| Licensed under the MIT license. | |
| http://github.com/thelinuxlich/knockout.live.plugin/MIT-LICENSE.txt | |
| Date: Mon Feb 01 09:00:29 2011 -0300 | |
| ### |
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
| # Modelo base | |
| class @Model | |
| constructor: (defaults,urls) -> | |
| @__defaults = if typeof defaults is "object" then defaults else {} | |
| @__urls = if typeof urls is "object" then defaults else {} | |
| @set(@__defaults) | |
| get: (attr) -> | |
| ko.unwrapObservable @[attr] |
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(){ | |
| module("Testes Offline"); | |
| var dados = { | |
| nome: "Joao", | |
| sobrenome: "Teste", | |
| cpf: "123.456.789-0", | |
| data_de_nascimento: "01/01/1980", | |
| endereco: "Rua teste", |
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
| class @Animal | |
| constructor: () -> | |
| @id = "" | |
| @urls: [] | |
| @print: -> | |
| console.log @urls | |
| printInternal: -> |
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
| # URL do sistema. | |
| URL = "http://#{window.location.host}/aplic/cadastro_pdv" | |
| # Classe que contém o comportamento geral do sistema. | |
| @VM = | |
| loading: KO false | |
| documentComplete: KO false | |
| funcionario: new Funcionario() | |
| estados: KO [] | |
| cidades: KO [] |
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
| # creates an action with HTTP POST | |
| postAction: (routeName,options) => | |
| options = options or {} | |
| instance = @ | |
| @[routeName] = -> | |
| [params,callback] = instance.constructor.__generate_request_parameters.apply(@,arguments) | |
| params = $.extend(params,instance.toJS()) | |
| url = instance.constructor.__parse_url(instance.__urls[routeName],params) | |
| RQ.add ($.post url, params, (data) -> | |
| callback(data) if typeof callback is "function" |
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
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
| "http://www.w3.org/TR/html4/loose.dtd"> | |
| <html> | |
| <head> | |
| <link rel="stylesheet" href="../../css/qunit.css" type="text/css" media="screen" /> | |
| <script type="text/javascript"> var TEST_ENV = true;</script> | |
| <script src="../../js/jquery.js"></script> | |
| <script src="../../js/knockout.js"></script> | |
| <script src="../../js/reqman.js"></script> | |
| <script src="../js/fale_conosco.js"></script> |
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
| class HorarioAula < ActiveRecord::Base | |
| set_table_name :horarios_aulas | |
| set_primary_keys :num_ano_turma,:num_sem_turma,:num_mes,:cod_centro, | |
| :cod_curso,:cod_bloco,:idt_periodo_bloco,:num_periodo_turma, | |
| :cod_turma,:cod_discip,:cod_grupo,:cod_doce,:idt_campus, | |
| :num_dia_semana,:cod_modulo,:cod_sub_modu | |
| end |
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
| class CurriculoAluno < ActiveRecord::Base | |
| set_table_name :curr_alunos | |
| set_primary_keys :rgm,:num_ano_turma,:num_sem_turma,:cod_discip | |
| belongs_to :disciplina,:foreign_key => :cod_discip | |
| belongs_to :historico_de_matricula, :class_name => "HistoricoMatricula", :foreign_key => [:rgm,:num_ano_turma,:num_sem_turma] | |
| has_many :horarios_de_aula,:class_name => "HorarioAula", :finder_sql => proc { | |
| "SELECT * FROM HORARIOS_AULAS | |
| WHERE NUM_ANO_TURMA = #{num_ano_turma_ad || num_ano_turma} | |
| AND NUM_SEM_TURMA = #{num_sem_turma_ad || num_sem_turma} AND | |
| COD_CENTRO = #{cod_centro_ad || cod_centro} AND COD_CURSO = #{cod_curso_ad || cod_curso} AND |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | |
| <title>Questionário</title> | |
| <link href="http://intranet.umc.br/estilo.css" rel="stylesheet"> | |
| <link rel="stylesheet" href="styles/estilo.css" type="text/css" /> | |
| <link rel="stylesheet" href="../../includes/css/redmond/jquery-ui.css" type="text/css" /> |