initial import

This commit is contained in:
2020-12-23 10:11:11 +01:00
commit be83b43a59
5600 changed files with 577973 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="script/common.css">
<script src="script/common.js"></script>
<script>
function setup(){
var dp = $('.base').datepicker().data('datepicker');
dp.focusDate = new Date(Date.UTC(2013, 7, 14));
dp.update();
$('.date').datepicker({
format: 'mm-dd-yyyy'
});
$('.inline').datepicker();
}
</script>
</head>
<body data-capture=".base, .date, .datepicker">
<div class="row">
<div class="col-sm-3">
<input type="text" class="form-control base" value="08/03/2013">
</div>
<div class="col-sm-offset-1 col-sm-3">
<div class="input-group date">
<input type="text" class="form-control" value="10-05-2003" readonly>
<div class="input-group-addon">
<span class="glyphicon glyphicon-th"></span>
</div>
</div>
</div>
<div class="col-sm-offset-1 col-sm-4 inline" data-date="01/03/2004"></div>
</div>
</body>
</html>

View File

@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="script/common.css">
<script src="script/common.js"></script>
<script>
function setup(){
$('.date').datepicker({
format: 'mm-dd-yyyy'
});
}
</script>
</head>
<body data-capture=".input-group, .datepicker">
<div class="row">
<div class="col-sm-offset-4 col-sm-3">
<div class="input-group date">
<input type="text" class="form-control" value="12-02-2012">
<div class="input-group-addon">
<span class="glyphicon glyphicon-th"></span>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="script/common.css">
<script src="script/common.js"></script>
<script>
function setup(){
$('.input-daterange').datepicker({
format: 'yyyy-mm-dd'
});
}
</script>
</head>
<body data-capture=".input-daterange, .datepicker" data-show="input:first, input:last">
<div class="row">
<div class="col-sm-5">
<div class="input-group input-daterange">
<input type="text" class="form-control" value="2012-04-05">
<div class="input-group-addon">to</div>
<input type="text" class="form-control" value="2012-04-19">
</div>
</div>
<div class="col-sm-5">
<div class="input-group input-daterange">
<input type="text" class="form-control" value="2012-04-05">
<div class="input-group-addon">to</div>
<input type="text" class="form-control" value="2012-04-19">
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="script/common.css">
<script src="script/common.js"></script>
<script>
function setup(){
$('div').datepicker();
}
</script>
</head>
<body data-capture=".datepicker">
<div data-date="12/03/2012"></div>
</body>
</html>

View File

@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="script/common.css">
<script src="script/common.js"></script>
<script>
function setup(){
$('input').datepicker({
format: 'mm-dd-yyyy'
});
}
</script>
</head>
<body data-capture="input, .datepicker">
<div class="row">
<div class="col-sm-offset-4 col-sm-3">
<input type="text" class="form-control" value="02-16-2012">
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="script/common.css">
<script src="script/common.js"></script>
<script>
function setup(){
$('input').datepicker({
format: 'mm-dd-yyyy',
calendarWeeks: true
});
}
</script>
</head>
<body data-capture="input, .datepicker">
<div class="row">
<div class="col-sm-3">
<input type="text" class="form-control" value="01-16-2012">
</div>
<div class="col-sm-offset-2 col-sm-3">
<input type="text" class="form-control" value="12-16-2012">
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="script/common.css">
<script src="script/common.js"></script>
<script>
function setup(){
$('input').datepicker({
format: 'mm-dd-yyyy',
clearBtn: true
});
}
</script>
</head>
<body data-capture="input, .datepicker">
<div class="row">
<div class="col-sm-offset-4 col-sm-3">
<input type="text" class="form-control" value="03-03-2013">
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="script/common.css">
<script src="script/common.js"></script>
<script>
function setup(){
$('input').datepicker({
format: 'mm-dd-yyyy',
daysOfWeekDisabled: [0, 6]
});
}
</script>
</head>
<body data-capture="input, .datepicker">
<div class="row">
<div class="col-sm-offset-4 col-sm-3">
<input type="text" class="form-control" value="03-05-2013">
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="script/common.css">
<script src="script/common.js"></script>
<script>
function setup(){
$('input').datepicker({
format: 'mm-dd-yyyy',
endDate: '03-14-2013'
});
}
</script>
</head>
<body data-capture="input, .datepicker">
<div class="row">
<div class="col-sm-offset-4 col-sm-3">
<input type="text" class="form-control" value="03-03-2013">
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="script/common.css">
<style>
.row + .row {
margin-top: 30px;
}
</style>
<script src="script/common.js"></script>
<script src="../../js/locales/bootstrap-datepicker.es.js" charset="UTF-8"></script>
<script src="../../js/locales/bootstrap-datepicker.fr.js" charset="UTF-8"></script>
<script src="../../js/locales/bootstrap-datepicker.zh-TW.js" charset="UTF-8"></script>
<script src="../../js/locales/bootstrap-datepicker.ru.js" charset="UTF-8"></script>
<script src="../../js/locales/bootstrap-datepicker.ja.js" charset="UTF-8"></script>
<script>
function setup(){
$('[data-date]').datepicker({
format: 'mm/dd/yyyy' // To override locale-specific formats
});
}
</script>
</head>
<body data-capture=".datepicker">
<div class="row">
<div class="col-sm-4" data-date="03/03/2013" data-date-language="en"></div>
<div class="col-sm-4" data-date="03/03/2013" data-date-start-view="1" data-date-language="es"></div>
<div class="col-sm-4" data-date="03/03/2013" data-date-language="fr"></div>
</div>
<div class="row">
<div class="col-sm-4" data-date="03/03/2013" data-date-start-view="1" data-date-language="zh-TW"></div>
<div class="col-sm-4" data-date="03/03/2013" data-date-language="ja"></div>
<div class="col-sm-4" data-date="03/03/2013" data-date-start-view="1" data-date-language="ru"></div>
</div>
</body>
</html>

View File

@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="script/common.css">
<script src="script/common.js"></script>
<script>
function setup(){
$('input').datepicker({
multidate: true
});
}
</script>
</head>
<body data-capture="input, .datepicker">
<div class="row">
<div class="col-sm-4">
<input type="text" class="form-control" value="03/03/2013,03/16/2013">
</div>
<div class="col-sm-4">
<input type="text" class="form-control" value="03/03/2013,06/16/2013" data-date-start-view="1">
</div>
<div class="col-sm-4">
<input type="text" class="form-control" value="03/03/2013,03/16/2014" data-date-start-view="2">
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="script/common.css">
<script src="script/common.js"></script>
<script>
function setup(){
$('input').datepicker({
format: 'mm-dd-yyyy',
showWeekDays: false
});
}
</script>
</head>
<body data-capture="input, .datepicker">
<div class="row">
<div class="col-sm-offset-4 col-sm-3">
<input type="text" class="form-control" value="03-03-2013">
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="script/common.css">
<script src="script/common.js"></script>
<script>
function setup(){
$('input').datepicker({
format: 'mm-dd-yyyy',
startDate: '03-14-2013'
});
}
</script>
</head>
<body data-capture="input, .datepicker">
<div class="row">
<div class="col-sm-offset-4 col-sm-3">
<input type="text" class="form-control" value="03-18-2013">
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="script/common.css">
<script src="script/common.js"></script>
<script>
function setup(){
$('input').datepicker({
todayBtn: true
});
}
</script>
</head>
<body data-capture="input, .datepicker">
<div class="row">
<div class="col-sm-offset-4 col-sm-3">
<input type="text" class="form-control" value="03/03/2013">
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="script/common.css">
<script src="script/common.js"></script>
<script>
function patch_date(f){
var NativeDate = window.Date;
var date = function date(y,m,d,h,i,s,j){
switch(arguments.length){
case 0: return date.now ? new NativeDate(date.now) : new NativeDate();
case 1: return new NativeDate(y);
case 2: return new NativeDate(y,m);
case 3: return new NativeDate(y,m,d);
case 4: return new NativeDate(y,m,d,h);
case 5: return new NativeDate(y,m,d,h,i);
case 6: return new NativeDate(y,m,d,h,i,s);
case 7: return new NativeDate(y,y,m,d,h,i,s,j);
}
};
date.UTC = NativeDate.UTC;
return function(){
Array.prototype.push.call(arguments, date);
window.Date = date;
f.apply(this, arguments);
window.Date = NativeDate;
};
}
var setup = patch_date(function(Date){
Date.now = new Date(2013, 2, 18);
$('input').datepicker({
todayHighlight: true
});
});
</script>
</head>
<body data-capture="input, .datepicker">
<div class="row">
<div class="col-sm-3">
<input type="text" class="form-control" value="03/03/2013">
</div>
<div class="col-sm-offset-2 col-sm-3">
<input type="text" class="form-control" value="03/18/2013">
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="script/common.css">
<script src="script/common.js"></script>
<script>
function setup(){
$('input').datepicker();
}
</script>
</head>
<body data-capture="input, .datepicker">
<div class="row">
<div class="col-sm-3">
<input type="text" class="form-control" value="03/03/2013" data-date-week-start="2">
</div>
<div class="col-sm-offset-1 col-sm-3">
<input type="text" class="form-control" value="03/03/2013" data-date-week-start="4">
</div>
<div class="col-sm-offset-1 col-sm-3">
<input type="text" class="form-control" value="03/03/2013" data-date-week-start="6">
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,9 @@
@import url('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css');
@import url('../../../dist/css/bootstrap-datepicker3.min.css');
body {
/* Padding around all elements to allow space for screenshots */
padding: 10px;
/* Transparent background for PNG screenshots */
background: none;
}

View File

@@ -0,0 +1,2 @@
document.write("<script src='https://code.jquery.com/jquery-3.1.1.min.js'></script>");
document.write("<script src='../../js/bootstrap-datepicker.js'></script>");

View File

@@ -0,0 +1,21 @@
/*
Usage: $ phantomjs --remote-debugger-port=9001 --remote-debugger-autorun=yes debug.js page.html
Open Chrome tab to http://localhost:9001/; open second link (ie, path to page.html)
*/
var system = require('system' ), fs = require('fs'), webpage = require('webpage');
(function(phantom){
var page=webpage.create();
function debugPage(){
console.log("Refresh a second debugger-port page and open a second webkit inspector for the target page.");
console.log("Letting this page continue will then trigger a break in the target page.");
debugger; // pause here in first web browser tab for steps 5 & 6
page.open(system.args[1]);
page.evaluateAsync(function() {
debugger; // step 7 will wait here in the second web browser tab
});
}
debugPage();
}(phantom));

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,69 @@
/* jshint phantom:true, devel:true */
/* Usage: phantomjs screenshot.js in.html out.png */
var sys = require('system'),
page = new WebPage();
page.viewportSize = {
width: 800,
height: 600
};
page.open(sys.args[1], function(status){
if (status !== 'success'){
console.log('Bad status: %s', status);
phantom.exit(1);
}
window.setTimeout(function(){
var box = page.evaluate(function(){
var lefts, rights, tops, bottoms,
padding = 10, // px
selection, show;
// Call setup method
if (window.setup)
window.setup();
// Show all pickers, or only those marked for showing
show = $('body').data('show');
show = show ? $(show) : $('*');
show
.filter(function(){
return 'datepicker' in $(this).data();
})
.datepicker('show');
// Get bounds of selected elements
selection = $($('body').data('capture'));
tops = selection.map(function(){
return $(this).offset().top;
}).toArray();
lefts = selection.map(function(){
return $(this).offset().left;
}).toArray();
bottoms = selection.map(function(){
return $(this).offset().top + $(this).outerHeight();
}).toArray();
rights = selection.map(function(){
return $(this).offset().left + $(this).outerWidth();
}).toArray();
// Convert bounds to single bounding box
var b = {
top: Math.min.apply(Math, tops),
left: Math.min.apply(Math, lefts)
};
b.width = Math.max.apply(Math, rights) - b.left;
b.height = Math.max.apply(Math, bottoms) - b.top;
// Return bounding box
return {
top: Math.max(b.top - padding, 0),
left: Math.max(b.left - padding, 0),
width: b.width + 2 * padding,
height: b.height + 2 * padding
};
});
page.clipRect = box;
page.render(sys.args[2]);
phantom.exit();
}, 1);
});