Skip to content

Commit

Permalink
Merge pull request #523 from biblibre/Issue_520
Browse files Browse the repository at this point in the history
Issue 520: Allow to modify Date.format in the main common.js file
  • Loading branch information
veggiematts authored Jan 14, 2019
2 parents 41c915e + 306a66a commit 8699f42
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 23 deletions.
8 changes: 0 additions & 8 deletions licensing/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@
})(jQuery)



//Required for date picker
Date.firstDayOfWeek = 0;

//suggested: mm/dd/yyyy OR dd-mm-yyyy
Date.format = 'mm/dd/yyyy';


$(function(){
$('.date-pick').datePicker({startDate:'01/01/1996'});

Expand Down
1 change: 1 addition & 0 deletions licensing/templates/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
<script type="text/javascript" src="../js/plugins/translate.js"></script>
<script type="text/javascript" src="../js/plugins/datejs-patched-for-i18n.js"></script>
<script type="text/javascript" src="../js/plugins/jquery.datePicker-patched-for-i18n.js"></script>
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="js/common.js"></script>
</head>
<body id="licensing">
Expand Down
7 changes: 0 additions & 7 deletions management/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@



//Required for date picker
Date.firstDayOfWeek = 0;

//suggested: mm/dd/yyyy OR dd-mm-yyyy
Date.format = 'mm/dd/yyyy';


$(function(){
loadDatePicker();

Expand Down
1 change: 1 addition & 0 deletions management/templates/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
<script type="text/javascript" src="../js/plugins/jquery.datePicker-patched-for-i18n.js"></script>
<script type="text/javascript" src="../js/plugins/jquery.autocomplete.js"></script>
<script type="text/javascript" src="../js/plugins/jquery.tooltip.js"></script>
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="js/common.js"></script>
</head>
<body>
Expand Down
5 changes: 0 additions & 5 deletions organizations/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@
})(jQuery)


//Required for date picker
Date.firstDayOfWeek = 0;
Date.format = 'mm/dd/yyyy';


$(function(){
refreshContext();

Expand Down
1 change: 1 addition & 0 deletions organizations/templates/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
<script type="text/javascript" src="../js/plugins/translate.js"></script>
<script type="text/javascript" src="../js/plugins/datejs-patched-for-i18n.js"></script>
<script type="text/javascript" src="../js/plugins/jquery.datePicker-patched-for-i18n.js"></script>
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="js/common.js"></script>
</head>
<body>
Expand Down
3 changes: 0 additions & 3 deletions resources/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
//Required for date picker
Date.firstDayOfWeek = 0;

//suggested: mm/dd/yyyy OR dd-mm-yyyy
Date.format = 'mm/dd/yyyy';


$(function(){
refreshContext();
Expand Down
3 changes: 3 additions & 0 deletions resources/js/forms/costForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
*/

$(function(){


$('.date-pick').datePicker({startDate:'01/01/1996'});
$('.date-pick').attr('placeholder', Date.format);

//bind all of the inputs

Expand Down
1 change: 1 addition & 0 deletions resources/templates/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
<script type="text/javascript" src="../js/plugins/translate.js"></script>
<script type="text/javascript" src="../js/plugins/datejs-patched-for-i18n.js"></script>
<script type="text/javascript" src="../js/plugins/jquery.datePicker-patched-for-i18n.js"></script>
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="js/common.js"></script>
</head>
<body>
Expand Down

0 comments on commit 8699f42

Please sign in to comment.