beautify html

This commit is contained in:
Ilya Kantor 2015-03-09 19:02:13 +03:00
parent ecf1478e7e
commit 5342f628da
354 changed files with 13965 additions and 9486 deletions

View file

@ -1,51 +1,60 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.2.0/lodash.js"></script>
<script src="dateselector.js"></script>
</head>
<body>
<script type="text/template" id="date-selector-template">
<select class="year">
<% for(var year = yearFrom; year <= yearTo; year++) { %>
<option value="<%=year%>"><%=year%></option>
<% } %>
</select>
<select class="month">
<% for(var month = 0; month <= 11; month++) { %>
<option value="<%=month%>"><%=monthNames[month]%></option>
<% } %>
</select>
<select class="day">
<% for(var day = 1; day <= dayTo; day++) { %>
<option value="<%=day%>"><%=day%></option>
<% } %>
</select>
</script>
<script type="text/template" id="date-selector-template">
<select class="year">
<% for(var year=y earFrom; year <=y earTo; year++) { %>
<option value="<%=year%>">
<%=year%>
</option>
<% } %>
</select>
<select class="month">
<% for(var month=0 ; month <=1 1; month++) { %>
<option value="<%=month%>">
<%=monthNames[month]%>
</option>
<% } %>
</select>
<select class="day">
<% for(var day=1 ; day <=d ayTo; day++) { %>
<option value="<%=day%>">
<%=day%>
</option>
<% } %>
</select>
</script>
<div id="selector-holder"></div>
<div id="value">тут будет значение даты при выборе</div>
<div id="selector-holder"></div>
<div id="value">тут будет значение даты при выборе</div>
<script>
var dateSelector = new DateSelector({
yearFrom: 2010,
yearTo: 2020,
value: new Date(2012, 2, 31), // 31 марта 2012
template: $('#date-selector-template').html().trim()
});
<script>
var dateSelector = new DateSelector({
yearFrom: 2010,
yearTo: 2020,
value: new Date(2012, 2, 31), // 31 марта 2012
template: $('#date-selector-template').html().trim()
});
$('#selector-holder').append(dateSelector.getElement());
$('#selector-holder').append(dateSelector.getElement());
$(dateSelector).on("select", function(e) {
$('#value').html( e.value + '' );
});
</script>
$(dateSelector).on("select", function(e) {
$('#value').html(e.value + '');
});
</script>
<button onclick="dateSelector.setValue(new Date)">setValue(сегодня)</button>
<button onclick="dateSelector.setValue(new Date)">setValue(сегодня)</button>
</body>
</html>
</html>

View file

@ -1,37 +1,40 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.2.0/lodash.js"></script>
<script src="dateselector.js"></script>
</head>
<body>
<script type="text/template" id="date-selector-template">
/* шаблон для виджета */
</script>
<script type="text/template" id="date-selector-template">
/* шаблон для виджета */
</script>
<div id="selector-holder"></div>
<div id="value">тут будет значение даты при выборе</div>
<div id="selector-holder"></div>
<div id="value">тут будет значение даты при выборе</div>
<script>
var dateSelector = new DateSelector({
yearFrom: 2010,
yearTo: 2020,
value: new Date(2012, 2, 31), // 31 марта 2012
template: $('#date-selector-template').html()
});
<script>
var dateSelector = new DateSelector({
yearFrom: 2010,
yearTo: 2020,
value: new Date(2012, 2, 31), // 31 марта 2012
template: $('#date-selector-template').html()
});
$('#selector-holder').append(dateSelector.getElement());
$('#selector-holder').append(dateSelector.getElement());
$(dateSelector).on("select", function(e) {
$('#value').html( e.value + '' );
});
</script>
$(dateSelector).on("select", function(e) {
$('#value').html(e.value + '');
});
</script>
<button onclick="dateSelector.setValue(new Date)">setValue(сегодня)</button>
<button onclick="dateSelector.setValue(new Date)">setValue(сегодня)</button>
</body>
</html>
</html>