Diff
checker
Texto
Texto
Imagens
Documentos
Excel
Pastas
Legal
Enterprise
Aplicativo para desktop
Preços
Fazer login
Baixar o Diffchecker Desktop
Comparar texto
Encontre a diferença entre dois arquivos de texto
Ferramentas
Histórico
Editor live
Recolher inalteradas
Sem quebra de linha
Layout
Dividido
Unificado
Nível de detalhe
Inteligente
Palavra
Caractere
Realce de sintaxe
Escolher sintaxe
Ignorar
Transformar texto
Ir à primeira mudança
Editar entrada
Diffchecker Desktop
A maneira mais segura de usar o Diffchecker. Obtenha o aplicativo Diffchecker Desktop: seus diffs nunca saem do seu computador!
Obter Desktop
Untitled diff
Criado
há 11 anos
O diff nunca expira
Limpar
Exportar
Compartilhar
Explicar
5 remoções
Linhas
Total
Removido
Caracteres
Total
Removido
Para continuar usando este recurso, atualize para
Diff
checker
Pro
Ver preços
50 linhas
Copiar tudo
10 adições
Linhas
Total
Adicionado
Caracteres
Total
Adicionado
Para continuar usando este recurso, atualize para
Diff
checker
Pro
Ver preços
52 linhas
Copiar tudo
(function($, undefined) {
(function($, undefined) {
ko.bindingHandlers.timepicker = {
ko.bindingHandlers.timepicker = {
init: function (element, valueAccessor, allBindingsAccessor) {
init: function (element, valueAccessor, allBindingsAccessor) {
//initialize timepicker with some optional options
//initialize timepicker with some optional options
var options = allBindingsAccessor().timepickerOptions || {},
var options = allBindingsAccessor().timepickerOptions || {},
input = $(element).timepicker(options);
input = $(element).timepicker(options);
//handle the field changing
//handle the field changing
ko.utils.registerEventHandler(element, "time-change", function (event, time) {
ko.utils.registerEventHandler(element, "time-change", function (event, time) {
var observable = valueAccessor(),
var observable = valueAccessor(),
Copiar
Copiado
Copiar
Copiado
current = ko.utils.unwrapObservable(observable)
;
current = ko.utils.unwrapObservable(observable)
,
instance = $(element).timepicker()
;
if ( time === false ) {
if ( time === false ) {
Copiar
Copiado
Copiar
Copiado
observable( '
enter the value when input is empty here!
' );
observable( '
' );
} else if (current - time !== 0) {
} else if (current - time !== 0) {
Copiar
Copiado
Copiar
Copiado
observable(
time
);
observable(
instance.format(
time
)
);
}
}
});
});
//handle disposal (if KO removes by the template binding)
//handle disposal (if KO removes by the template binding)
ko.utils.domNodeDisposal.addDisposeCallback(element, function () {
ko.utils.domNodeDisposal.addDisposeCallback(element, function () {
$(element).timepicker("destroy");
$(element).timepicker("destroy");
});
});
},
},
update: function (element, valueAccessor) {
update: function (element, valueAccessor) {
var value = ko.utils.unwrapObservable(valueAccessor()),
var value = ko.utils.unwrapObservable(valueAccessor()),
// calling timepicker() on an element already initialized will
// calling timepicker() on an element already initialized will
// return a TimePicker object
// return a TimePicker object
Copiar
Copiado
Copiar
Copiado
instance = $(element).timepicker()
;
instance = $(element).timepicker()
,
time = $.fn.timepicker.parseTime( value )
;
Copiar
Copiado
Copiar
Copiado
if (
value
- instance.getTime() !== 0) {
if (
time
- instance.getTime() !== 0) {
instance.setTime(
value
);
instance.setTime(
time
);
}
}
}
}
};
};
var model = {
var model = {
// all Date objects returned by the timepicker have the date
// all Date objects returned by the timepicker have the date
// part set to Dec 31 1899. That date is not important, but
// part set to Dec 31 1899. That date is not important, but
// using the same value every time makes internal calculations
// using the same value every time makes internal calculations
// easier.
// easier.
Copiar
Copiado
Copiar
Copiado
time: ko.observable(
$.fn.timepicker.parseTime(
'2:20:35 pm'
)
)
time: ko.observable(
'2:20:35 pm'
)
}
}
$(function() {
$(function() {
ko.applyBindings(model);
ko.applyBindings(model);
});
});
})(jQuery);
})(jQuery);
Diferenças salvas
Texto original
Abrir arquivo
(function($, undefined) { ko.bindingHandlers.timepicker = { init: function (element, valueAccessor, allBindingsAccessor) { //initialize timepicker with some optional options var options = allBindingsAccessor().timepickerOptions || {}, input = $(element).timepicker(options); //handle the field changing ko.utils.registerEventHandler(element, "time-change", function (event, time) { var observable = valueAccessor(), current = ko.utils.unwrapObservable(observable); if ( time === false ) { observable( 'enter the value when input is empty here!' ); } else if (current - time !== 0) { observable(time); } }); //handle disposal (if KO removes by the template binding) ko.utils.domNodeDisposal.addDisposeCallback(element, function () { $(element).timepicker("destroy"); }); }, update: function (element, valueAccessor) { var value = ko.utils.unwrapObservable(valueAccessor()), // calling timepicker() on an element already initialized will // return a TimePicker object instance = $(element).timepicker(); if (value - instance.getTime() !== 0) { instance.setTime(value); } } }; var model = { // all Date objects returned by the timepicker have the date // part set to Dec 31 1899. That date is not important, but // using the same value every time makes internal calculations // easier. time: ko.observable($.fn.timepicker.parseTime('2:20:35 pm')) } $(function() { ko.applyBindings(model); }); })(jQuery);
Texto alterado
Abrir arquivo
(function($, undefined) { ko.bindingHandlers.timepicker = { init: function (element, valueAccessor, allBindingsAccessor) { //initialize timepicker with some optional options var options = allBindingsAccessor().timepickerOptions || {}, input = $(element).timepicker(options); //handle the field changing ko.utils.registerEventHandler(element, "time-change", function (event, time) { var observable = valueAccessor(), current = ko.utils.unwrapObservable(observable), instance = $(element).timepicker(); if ( time === false ) { observable( '' ); } else if (current - time !== 0) { observable( instance.format( time ) ); } }); //handle disposal (if KO removes by the template binding) ko.utils.domNodeDisposal.addDisposeCallback(element, function () { $(element).timepicker("destroy"); }); }, update: function (element, valueAccessor) { var value = ko.utils.unwrapObservable(valueAccessor()), // calling timepicker() on an element already initialized will // return a TimePicker object instance = $(element).timepicker(), time = $.fn.timepicker.parseTime( value ); if (time - instance.getTime() !== 0) { instance.setTime( time ); } } }; var model = { // all Date objects returned by the timepicker have the date // part set to Dec 31 1899. That date is not important, but // using the same value every time makes internal calculations // easier. time: ko.observable( '2:20:35 pm' ) } $(function() { ko.applyBindings(model); }); })(jQuery);
Encontrar Diferença