1
0
Fork 0

correcion en pasos de formualrio

This commit is contained in:
humano 2017-11-13 17:00:00 -05:00
parent a4f20aea78
commit d67960bde1
3 changed files with 145 additions and 1 deletions

View File

@ -680,6 +680,8 @@ $aplicacion_pie="
<script type='text/javascript' src='librerias/notas/script.js'></script>
<script type='text/javascript' src='./librerias/jquery/jquery-ui.min.js'></script>
<script type='text/javascript' src='./librerias/jquery/jquery.ui.touch-punch.js'></script>
<script type='text/javascript' src='./librerias/jquery/jquery.touch.js'></script>
<script type='text/javascript' src='./librerias/notas/jquery.infinitedrag.js'></script>
<link rel='stylesheet' type='text/css' href='./librerias/notas/styles.css' />
";

View File

@ -0,0 +1,138 @@
/*!
tap / double tap special event for jQuery
v 1.0.0
(c) 2014 Yair Even Or <http://dropthebit.com>
MIT-style license.
*/
;(function($){
"use strict";
var tapTimer,
moved = false, // flag to know if the finger had moved while touched the device
threshold = 250; // ms
//////////////////////
// special events
$.event.special.doubleTap = {
setup : setup,
teardown : teardown,
handler : handler
};
$.event.special.tap = {
setup : setup,
teardown : teardown,
handler : handler
};
//////////////////////
// events methods
function setup(data, namespaces){
var elm = $(this);
if( elm.data('tap_event') == true )
return;
elm.bind('touchend.tap', handler)
.bind('touchmove.tap', function(){
moved = true;
}).data('tap_event', true);
}
function teardown(namespaces) {
$(this).unbind('touchend.tap touchmove.tap');
}
function handler(event){
console.log(event);
if( moved ){ // reset
moved = false;
return false;
}
var elem = event.target,
$elem = $(elem),
lastTouch = $elem.data('lastTouch') || 0,
now = event.timeStamp,
delta = now - lastTouch;
// double-tap condition
if( delta > 20 && delta < threshold ){
clearTimeout(tapTimer);
return $elem.data('lastTouch', 0).trigger('doubleTap');
}
else
$elem.data('lastTouch', now);
tapTimer = setTimeout(function(){
$elem.trigger('tap');
}, threshold);
}
})(jQuery);
/**
* jQuery Plugin to add basic "swipe" support on touch-enabled devices
*
* @author Yair Even Or
* @version 1.0.0 (March 20, 2013)
*/
(function($){
"use strict";
$.event.special.swipe = {
setup: function(){
$(this).bind('touchstart', $.event.special.swipe.handler);
},
teardown: function(){
$(this).unbind('touchstart', $.event.special.swipe.handler);
},
handler: function(event){
var args = [].slice.call( arguments, 1 ), // clone arguments array, remove original event from cloned array
touches = event.originalEvent.touches,
startX, startY,
deltaX = 0, deltaY = 0,
that = this;
event = $.event.fix(event);
if( touches.length == 1 ){
startX = touches[0].pageX;
startY = touches[0].pageY;
this.addEventListener('touchmove', onTouchMove, false);
}
function cancelTouch(){
that.removeEventListener('touchmove', onTouchMove);
startX = startY = null;
}
function onTouchMove(e){
//e.preventDefault();
var Dx = startX - e.touches[0].pageX,
Dy = startY - e.touches[0].pageY;
if( Math.abs(Dx) >= 50 ){
cancelTouch();
deltaX = (Dx > 0) ? -1 : 1;
}
else if( Math.abs(Dy) >= 20 ){
cancelTouch();
deltaY = (Dy > 0) ? 1 : -1;
}
event.type = 'swipe';
args.unshift(event, deltaX, deltaY); // add back the new event to the front of the arguments with the delatas
return ($.event.dispatch || $.event.handle).apply(that, args);
}
}
};
})(jQuery);

View File

@ -23,6 +23,9 @@ function notas_tablero($form) {
<a href='e$empresa[0]' class='btn btn-default ' >
<i class='fa fa-home' aria-hidden='true'></i>
</a>
<a class='btn btn-default ' onclick=\"coordenadas(event); \" href='#' >
<i class='fa fa fa-plus' aria-hidden='true'></i>
</a>
<div class='btn-group'>
@ -38,6 +41,7 @@ function notas_tablero($form) {
</li>
</ul>
</div>
<a href='https://tupale.co' class='navbar-brand pull-right'>Tupale.co</a>
@ -8450,7 +8454,7 @@ $muestra_form = "
<div class='container-fluid' id='myWizard'>
<div class='progress'>
<div class='progress-bar progress-bar-success' role='progressbar' aria-valuenow='1' aria-valuemin='1' aria-valuemax='$fila' style='width: 10%;'>
1 $fila
Paso 1 de $fila
</div>
</div>
<div class='navbar hidden-xs '>