Diff
checker
Texto
Texto
Imágenes
Documentos
Excel
Carpetas
Legal
Enterprise
Aplicación de escritorio
Precios
Iniciar sesión
Descargar Diffchecker Desktop
Comparar texto
Encuentra la diferencia entre dos archivos de texto
Herramientas
Historial
Editor live
Ocultar sin cambios
Sin ajuste de línea
Vista
Dividido
Unificado
Nivel de detalle
Inteligente
Palabra
Letra
Resaltado de sintaxis
Elegir sintaxis
Ignorar
Transformar texto
Ir al primer cambio
Editar entrada
Diffchecker Desktop
La forma más segura de usar Diffchecker. ¡Obtén la app de Diffchecker Desktop: tus diffs nunca salen de tu computadora!
Obtener Desktop
Untitled diff
Creado
hace 11 años
El diff nunca expira
Borrar
Exportar
Compartir
Explicar
5 eliminaciones
Líneas
Total
Eliminado
Caracteres
Total
Eliminado
Para continuar usando esta función, actualice a
Diff
checker
Pro
Ver precios
50 líneas
Copiar todo
10 adiciones
Líneas
Total
Añadido
Caracteres
Total
Añadido
Para continuar usando esta función, actualice a
Diff
checker
Pro
Ver precios
52 líneas
Copiar todo
(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);
Diferencias guardadas
Texto original
Abrir archivo
(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 modificado
Abrir archivo
(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 la diferencia