Skip to content

Commit

Permalink
Fix issues with synchronisity loss #7
Browse files Browse the repository at this point in the history
  • Loading branch information
valkirilov committed Sep 27, 2017
1 parent 9edfb53 commit e0131c9
Show file tree
Hide file tree
Showing 11 changed files with 297 additions and 302 deletions.
12 changes: 7 additions & 5 deletions demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
var MtrDatepickerDemo = (function() {

var datepickers = [];
var exportSettings;

var init = function(config, settings) {
exportSettings = settings;
var datepicker = new MtrDatepicker(config);
datepickers.push(datepicker);

Expand Down Expand Up @@ -32,8 +34,8 @@ var MtrDatepickerDemo = (function() {
datepicker.toLocaleDateString() + '<br /><br />' +

datepicker.toTimeString() + '<br />' +
datepicker.getFullTime() + '<br />' +
datepicker.format('M/D/YYYY hh:mm A') + '<br />' +
datepicker.getFullTime() + '<br />' +
datepicker.format('M/D/YYYY hh:mm A') + '<br />' +
datepicker.format('YYYY-MM-DD HH:mm') + '<br />';

resultElement.innerHTML = result;
Expand All @@ -52,7 +54,7 @@ var MtrDatepickerDemo = (function() {
delete config.timestamp;
}

datepicker = new MtrDatepicker(config);
datepicker = init(config, exportSettings);
}, false);
}

Expand All @@ -61,7 +63,7 @@ var MtrDatepickerDemo = (function() {

checkboxElement.addEventListener('change', function() {
config.smartHours = checkboxElement.checked;
datepicker = new MtrDatepicker(config);
datepicker = init(config, exportSettings);
}, false);

}
Expand Down Expand Up @@ -131,7 +133,7 @@ var MtrDatepickerDemo = (function() {
delete config[type];
}

datepicker = new MtrDatepicker(config);
datepicker = init(config, exportSettings);
}
}

Expand Down
2 changes: 1 addition & 1 deletion docs/MtrDatepicker.html
Original file line number Diff line number Diff line change
Expand Up @@ -3152,7 +3152,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="MtrDatepi
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Sep 26 2017 15:48:32 GMT+0300 (EEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Wed Sep 27 2017 10:32:34 GMT+0300 (EEST)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="MtrDatepi
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Sep 26 2017 15:48:32 GMT+0300 (EEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Wed Sep 27 2017 10:32:34 GMT+0300 (EEST)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="MtrDatepi
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Sep 26 2017 15:48:32 GMT+0300 (EEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Wed Sep 27 2017 10:32:34 GMT+0300 (EEST)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/mtr-datepicker.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -2040,7 +2040,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="MtrDatepi
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Sep 26 2017 15:48:32 GMT+0300 (EEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Wed Sep 27 2017 10:32:34 GMT+0300 (EEST)
</footer>

<script> prettyPrint(); </script>
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
<link rel="stylesheet" type="text/css" href="demo/cosmo.bootstrap.min.css">

<!-- Custom styles for this template -->
<link rel="stylesheet" type="text/css" href="dist/mtr-datepicker.min.css?rel=1506430109131" />
<link rel="stylesheet" type="text/css" href="dist/mtr-datepicker.default-theme.min.css?rel=1506430109132" />
<link rel="stylesheet" type="text/css" href="dist/mtr-datepicker.min.css?rel=1506497550972" />
<link rel="stylesheet" type="text/css" href="dist/mtr-datepicker.default-theme.min.css?rel=1506497550975" />
<link rel="stylesheet" type="text/css" href="demo/jumbotron-narrow.css" />

<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=yyxxeK88Mx">
Expand Down Expand Up @@ -162,7 +162,7 @@ <h1 id="demo" class="text-center">Demo</h1>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="libs/bootstrap/js/bootstrap.min.js"></script>

<script type="text/javascript" src="dist/mtr-datepicker.min.js?rel=1506430109133"></script>
<script type="text/javascript" src="dist/mtr-datepicker.min.js?rel=1506497550975"></script>

<script type="text/javascript">
var demoDatepicker = new MtrDatepicker({
Expand Down
7 changes: 0 additions & 7 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ module.exports = function(config) {
subdir: '.'
},


// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
Expand Down Expand Up @@ -91,12 +90,6 @@ module.exports = function(config) {
if (process.env.TRAVIS) {
cfg.browsers = ['Chrome_travis_ci', 'Firefox', 'PhantomJS'];

cfg.logLevel = config.LOG_DISABLE;

cfg.browserConsoleLogOptions = {
level: 'disable'
};

cfg.client = {
captureConsole: false
};
Expand Down
20 changes: 10 additions & 10 deletions tests/coverage/lcov-report/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ <h1>
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">80.65% </span>
<span class="strong">80.44% </span>
<span class="quiet">Statements</span>
<span class='fraction'>767/951</span>
<span class='fraction'>765/951</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">73.26% </span>
Expand All @@ -35,9 +35,9 @@ <h1>
<span class='fraction'>78/107</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">81.3% </span>
<span class="strong">81.09% </span>
<span class="quiet">Lines</span>
<span class='fraction'>748/920</span>
<span class='fraction'>746/920</span>
</div>
</div>
</div>
Expand All @@ -60,15 +60,15 @@ <h1>
</thead>
<tbody><tr>
<td class="file high" data-value="scripts/"><a href="scripts/index.html">scripts/</a></td>
<td data-value="80.65" class="pic high"><div class="chart"><div class="cover-fill" style="width: 80%;"></div><div class="cover-empty" style="width:20%;"></div></div></td>
<td data-value="80.65" class="pct high">80.65%</td>
<td data-value="951" class="abs high">767/951</td>
<td data-value="80.44" class="pic high"><div class="chart"><div class="cover-fill" style="width: 80%;"></div><div class="cover-empty" style="width:20%;"></div></div></td>
<td data-value="80.44" class="pct high">80.44%</td>
<td data-value="951" class="abs high">765/951</td>
<td data-value="73.26" class="pct medium">73.26%</td>
<td data-value="516" class="abs medium">378/516</td>
<td data-value="72.9" class="pct medium">72.9%</td>
<td data-value="107" class="abs medium">78/107</td>
<td data-value="81.3" class="pct high">81.3%</td>
<td data-value="920" class="abs high">748/920</td>
<td data-value="81.09" class="pct high">81.09%</td>
<td data-value="920" class="abs high">746/920</td>
</tr>

</tbody>
Expand All @@ -77,7 +77,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Sep 26 2017 17:29:46 GMT+0300 (EEST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Sep 27 2017 11:08:33 GMT+0300 (EEST)
</div>
</div>
<script src="prettify.js"></script>
Expand Down
20 changes: 10 additions & 10 deletions tests/coverage/lcov-report/scripts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ <h1>
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">80.65% </span>
<span class="strong">80.44% </span>
<span class="quiet">Statements</span>
<span class='fraction'>767/951</span>
<span class='fraction'>765/951</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">73.26% </span>
Expand All @@ -35,9 +35,9 @@ <h1>
<span class='fraction'>78/107</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">81.3% </span>
<span class="strong">81.09% </span>
<span class="quiet">Lines</span>
<span class='fraction'>748/920</span>
<span class='fraction'>746/920</span>
</div>
</div>
</div>
Expand All @@ -60,15 +60,15 @@ <h1>
</thead>
<tbody><tr>
<td class="file high" data-value="mtr-datepicker.js"><a href="mtr-datepicker.js.html">mtr-datepicker.js</a></td>
<td data-value="80.65" class="pic high"><div class="chart"><div class="cover-fill" style="width: 80%;"></div><div class="cover-empty" style="width:20%;"></div></div></td>
<td data-value="80.65" class="pct high">80.65%</td>
<td data-value="951" class="abs high">767/951</td>
<td data-value="80.44" class="pic high"><div class="chart"><div class="cover-fill" style="width: 80%;"></div><div class="cover-empty" style="width:20%;"></div></div></td>
<td data-value="80.44" class="pct high">80.44%</td>
<td data-value="951" class="abs high">765/951</td>
<td data-value="73.26" class="pct medium">73.26%</td>
<td data-value="516" class="abs medium">378/516</td>
<td data-value="72.9" class="pct medium">72.9%</td>
<td data-value="107" class="abs medium">78/107</td>
<td data-value="81.3" class="pct high">81.3%</td>
<td data-value="920" class="abs high">748/920</td>
<td data-value="81.09" class="pct high">81.09%</td>
<td data-value="920" class="abs high">746/920</td>
</tr>

</tbody>
Expand All @@ -77,7 +77,7 @@ <h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Sep 26 2017 17:29:46 GMT+0300 (EEST)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Sep 27 2017 11:08:33 GMT+0300 (EEST)
</div>
</div>
<script src="../prettify.js"></script>
Expand Down
Loading

0 comments on commit e0131c9

Please sign in to comment.