<commit_before><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
==============================================================================
  Licensed under the Apache License, Version 2.0 (the "License"); you may not
  use this file except in compliance with the License. You may obtain a copy of
  the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  License for the specific language governing permissions and limitations under
  the License.
 -->
<html>
<head>
  <title>Continuous Calendar playground</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <link rel="stylesheet" href="main/jquery.continuous-calendar.css" type="text/css" media="all"/>
  <style type="text/css" media="all">
    body { font-family: "Arial", serif; font-size: 90%; }
    h1 { font-size: 120%; }
    h2 { font-size: 100%; }
    ul { margin: 0 }
    fieldset { border: none }
    fieldset .col { float: left; margin-right: 50px; }
    fieldset .row { clear: both; overflow: hidden; margin-bottom: 5px; display: block; }
    .row .date { width: 80px; }
    .row .dates { width: 200px; }
    .row .number { width: 30px; }
    .row .label { display: block; width: 190px; float: left; }
    .row input[type=text] { display: block; float: left; margin-right: 5px; }
    .row input[type=checkbox], .row input[type=radio] { float: left; }
    #create { margin-top: 10px; }
    .calendarScrollContent { height: 200px; }
    .continuousCalendarContainer { float: left; margin: 5px; }
    .hint {font-size:80%;color:#666;}
    .example_params {width:100%;height:50px; font-size:10px;display:block;margin:4px 0;}
  </style>
  <style type="text/css" media="print">
    fieldset { display: none; }
  </style>
</head>
<body>
<a href="https://github.com/reaktor/jquery-continuous-calendar">Project Home in Github</a>
<h1>Try it out yourself!</h1>
<ul class="hint">
  <li>Date format should match locale</li>
</ul>
<fieldset>
  <div class="col">
    <div class="row">
      <div class="label"><label for="weeksBefore">weeksBefore</label> /
        <label for="firstDate">firstDate</label></div>
      <input type="text" id="weeksBefore" class="number"/>
      <input type="text" id="firstDate" class="date" value="today"/>
    </div>
    <div class="row">
      <div class="label">
        <label for="weeksAfter">weeksAfter</label> /
        <label for="lastDate">lastDate</label></div>
      <input type="text" id="weeksAfter" class="number" value="52"/>
      <input type="text" id="lastDate" class="date"/>
    </div>
    <div class="row">
      <div class="label">
        <label for="selectionStart">selectionStart</label> /
        <label for="selectionEnd">selectionEnd</label></div>
      <input type="text" id="selectionStart" class="date" value=""/>
      <input type="text" id="selectionEnd" class="date" value=""/>
    </div>
    <label class="row"><span class="label">minimumRange</span><input type="text" id="minimumRange" value="-1" class="number"/></label>
    <label class="row"><span class="label">disabledDates</span><input type="text" id="disabledDates" class="dates"/></label>
    <label class="row"><span class="label">fadeOutDuration</span><input type="text" id="fadeOutDuration" value="0" class="number"/></label>
    <label class="row"><input type="checkbox" value="" id="isPopup"/><span class="label">isPopup</span></label>
    <label class="row"><input type="checkbox" value="" id="selectToday"/><span class="label">selectToday</span></label>
    <label class="row"><input type="checkbox" value="" id="disableWeekends"/><span class="label">disableWeekends</span></label>
    <label class="row"><input type="checkbox" value="" checked="checked" id="isRange"/><span class="label">isRange</span></label>
    <label class="row"><input type="checkbox" value="" id="selectWeek"/><span class="label">selectWeek</span></label>
  </div>
  <div class="col">
    <label>Locale:</label>
    <label class="row"><input type="radio" name="locale" value="DATE_LOCALE_EN" id="EN" checked="checked"/><span class="label">DATE_LOCALE_EN</span></label>
    <label class="row"><input type="radio" name="locale" value="DATE_LOCALE_FI" id="FI"/><span class="label">DATE_LOCALE_FI</span></label>
    <label class="row"><input type="radio" name="locale" value="DATE_LOCALE_AU" id="AU"/><span class="label">DATE_LOCALE_AU</span></label>
  </div>
  <ul class="col">
    <div>Examples of other options</div>
    <li><strong>startField</strong>: $('input.startDate', this)</li>
    <li><strong>endField</strong>: $('input.endDate', this)</li>
    <li><strong>callback</strong>: function() {}</li>
  </ul>
  <div style="clear:both;"></div>
  <button id="create">Create</button>
</fieldset>

<!--<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js" charset="UTF-8"></script>-->
<script type="text/javascript" src="../src/lib/jquery-1.6.js"></script>
<script type="text/javascript" src="../build/jquery.continuous-calendar-latest.js" charset="UTF-8"></script>
<script type="text/javascript">
  counter = 0
  $('#create').click(create)

  function create() {
    var containerClass = 'container' + counter;
    var container = $('<div>').addClass(containerClass)
    if(valueOf('isRange')) {
      container.append('<input type="hidden" class="startDate" value="' + $('#selectionStart').val() + '" /><input type="hidden" class="endDate" value="' + $('#selectionEnd').val() + '"/>')
    }
    $('body').append(container)
    var optionsList = [ 'selectToday', 'disableWeekends', 'isPopup', 'weeksBefore', 'weeksAfter', 'firstDate', 'lastDate', 'minimumRange', 'selectWeek', 'disabledDates', 'fadeOutDuration' ]
    var options = {}
    for(var i = 0; i < optionsList.length; i++)
      options[optionsList[i]] = valueOf(optionsList[i])
    options.locale = window[$('[name=locale]').filter(':checked').val()]
    var params = JSON.stringify(options);
    container.prepend('<textarea  class="example_params">$(selector).continuousCalendar('+params+')</textarea>')
    container.continuousCalendar(options)
    function valueOf(id) {
      var elem = $('#' + id)
      return elem.attr('type') == 'checkbox' ? elem.filter(':checked').length > 0 : elem.val();
    }

    return false
  }
<commit_msg>Filter devault values from constructor<commit_after><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
==============================================================================
  Licensed under the Apache License, Version 2.0 (the "License"); you may not
  use this file except in compliance with the License. You may obtain a copy of
  the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  License for the specific language governing permissions and limitations under
  the License.
 -->
<html>
<head>
  <title>Continuous Calendar playground</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <link rel="stylesheet" href="main/jquery.continuous-calendar.css" type="text/css" media="all"/>
  <style type="text/css" media="all">
    body { font-family: "Arial", serif; font-size: 90%; }
    h1 { font-size: 120%; }
    h2 { font-size: 100%; }
    ul { margin: 0 }
    fieldset { border: none }
    fieldset .col { float: left; margin-right: 50px; }
    fieldset .row { clear: both; overflow: hidden; margin-bottom: 5px; display: block; }
    .row .date { width: 80px; }
    .row .dates { width: 200px; }
    .row .number { width: 30px; }
    .row .label { display: block; width: 190px; float: left; }
    .row input[type=text] { display: block; float: left; margin-right: 5px; }
    .row input[type=checkbox], .row input[type=radio] { float: left; }
    #create { margin-top: 10px; }
    .calendarScrollContent { height: 200px; }
    .continuousCalendarContainer { float: left; margin: 5px; }
    .hint {font-size:80%;color:#666;}
    .example_params {width:100%;height:50px; font-size:10px;display:block;margin:4px 0;}
  </style>
  <style type="text/css" media="print">
    fieldset { display: none; }
  </style>
</head>
<body>
<a href="https://github.com/reaktor/jquery-continuous-calendar">Project Home in Github</a>
<h1>Try it out yourself!</h1>
<ul class="hint">
  <li>Date format should match locale</li>
</ul>
<fieldset>
  <div class="col">
    <div class="row">
      <div class="label"><label for="weeksBefore">weeksBefore</label> /
        <label for="firstDate">firstDate</label></div>
      <input type="text" id="weeksBefore" class="number"/>
      <input type="text" id="firstDate" class="date" value="today"/>
    </div>
    <div class="row">
      <div class="label">
        <label for="weeksAfter">weeksAfter</label> /
        <label for="lastDate">lastDate</label></div>
      <input type="text" id="weeksAfter" class="number" value="52"/>
      <input type="text" id="lastDate" class="date"/>
    </div>
    <div class="row">
      <div class="label">
        <label for="selectionStart">selectionStart</label> /
        <label for="selectionEnd">selectionEnd</label></div>
      <input type="text" id="selectionStart" class="date" value=""/>
      <input type="text" id="selectionEnd" class="date" value=""/>
    </div>
    <label class="row"><span class="label">minimumRange</span><input type="text" id="minimumRange" value="-1" class="number"/></label>
    <label class="row"><span class="label">disabledDates</span><input type="text" id="disabledDates" class="dates"/></label>
    <label class="row"><span class="label">fadeOutDuration</span><input type="text" id="fadeOutDuration" value="0" class="number"/></label>
    <label class="row"><input type="checkbox" value="" id="isPopup"/><span class="label">isPopup</span></label>
    <label class="row"><input type="checkbox" value="" id="selectToday"/><span class="label">selectToday</span></label>
    <label class="row"><input type="checkbox" value="" id="disableWeekends"/><span class="label">disableWeekends</span></label>
    <label class="row"><input type="checkbox" value="" checked="checked" id="isRange"/><span class="label">isRange</span></label>
    <label class="row"><input type="checkbox" value="" id="selectWeek"/><span class="label">selectWeek</span></label>
  </div>
  <div class="col">
    <label>Locale:</label>
    <label class="row"><input type="radio" name="locale" value="DATE_LOCALE_EN" id="EN" checked="checked"/><span class="label">DATE_LOCALE_EN</span></label>
    <label class="row"><input type="radio" name="locale" value="DATE_LOCALE_FI" id="FI"/><span class="label">DATE_LOCALE_FI</span></label>
    <label class="row"><input type="radio" name="locale" value="DATE_LOCALE_AU" id="AU"/><span class="label">DATE_LOCALE_AU</span></label>
  </div>
  <ul class="col">
    <div>Examples of other options</div>
    <li><strong>startField</strong>: $('input.startDate', this)</li>
    <li><strong>endField</strong>: $('input.endDate', this)</li>
    <li><strong>callback</strong>: function() {}</li>
  </ul>
  <div style="clear:both;"></div>
  <button id="create">Create</button>
</fieldset>

<!--<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js" charset="UTF-8"></script>-->
<script type="text/javascript" src="../src/lib/jquery-1.6.js"></script>
<script type="text/javascript" src="../build/jquery.continuous-calendar-latest.js" charset="UTF-8"></script>
<script type="text/javascript">
  counter = 0
  $('#create').click(create)

  function create() {
    var containerClass = 'container' + counter;
    var container = $('<div>').addClass(containerClass)
    if(valueOf('isRange')) {
      container.append('<input type="hidden" class="startDate" value="' + $('#selectionStart').val() + '" /><input type="hidden" class="endDate" value="' + $('#selectionEnd').val() + '"/>')
    }
    $('body').append(container)
    var optionsList = [ 'selectToday', 'disableWeekends', 'isPopup', 'weeksBefore', 'weeksAfter', 'firstDate', 'lastDate', 'minimumRange', 'selectWeek', 'disabledDates', 'fadeOutDuration' ]
    var options = {}
    for(var i = 0; i < optionsList.length; i++) {
      var value = valueOf(optionsList[i]);
      if(value) {
        options[optionsList[i]] = value
      }
    }
    options.locale = window[$('[name=locale]').filter(':checked').val()]
    var params = JSON.stringify(options);
    container.prepend('<textarea  class="example_params">$(selector).continuousCalendar('+params+')</textarea>')
    container.continuousCalendar(options)
    function valueOf(id) {
      var elem = $('#' + id)
      return elem.attr('type') == 'checkbox' ? elem.filter(':checked').length > 0 : elem.val();
    }

    return false
  }

{'fraction_non_alphanumeric': 0.2057255976853967, 'fraction_numerical': 0.010811633927211817, 'mean_word_length': 4.6084543125533735, 'pattern_counts': {'":': 0, '<': 301, '<?xml version=': 0, '>': 301, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1027920', 'n_tokens_mistral': 4228, 'n_tokens_neox': 4049, 'n_words': 912}