Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Change to date and time; add German; fix translation loading; add filter #11

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3cfcf84
PHP code cleaning
Jul 5, 2018
0d0f825
Change expiry date to standard WordPress format
Jul 5, 2018
2dd14e0
Fix translation loading
Jul 5, 2018
326843c
Add Switzerland and Germany translations
Jul 5, 2018
8400526
Merge branch 'feature/1.1.0' into develop
Jul 5, 2018
54df99b
Bump version
Jul 5, 2018
d7e1156
Merge branch 'release/2.0.0'
Jul 5, 2018
f07a5c5
Merge tag '2.0.0' into develop
Jul 5, 2018
3dfde25
Update README.md
Jul 5, 2018
8bb1316
Clean translation files
Sep 10, 2018
095c351
Ignore .po backup files
Sep 10, 2018
02015fb
Version bump
Sep 10, 2018
6d897b9
Merge branch 'hotfix/2.1.0'
Sep 10, 2018
b035b09
Merge tag '2.1.0' into develop
Sep 10, 2018
409f1e4
Convert external plugin to CT plugin
Sep 10, 2018
3fbf015
Merge branch 'release/3.0.0'
Sep 10, 2018
875ac58
Merge tag '3.0.0' into develop
Sep 10, 2018
3b8bcc6
Update en_US translations
Sep 10, 2018
9cf1f57
Merge branch 'master' into develop
Sep 10, 2018
921acfb
Update German/add Italian translation
Sep 10, 2018
77a4f86
Merge branch 'release/3.1.0'
Sep 10, 2018
fd4d643
Merge tag '3.1.0' into develop
Sep 10, 2018
198d1dd
Update translations
Sep 13, 2018
ad20753
Merge branch 'master' into develop
Sep 13, 2018
1a13e2e
Remove pw_spe_prefix option and settings page
Sep 13, 2018
10b7da8
Merge branch 'hotfix/3.1.1'
Sep 13, 2018
d9b2856
Merge tag '3.1.1' into develop
Sep 13, 2018
3a61dad
Added local date format functionallity
menthacubetech Jul 18, 2019
2b40cce
Version Bump
menthacubetech Jul 18, 2019
c522735
Merge branch 'release/3.2.1'
menthacubetech Jul 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
._*
*.po~
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ The [expires] short code accepts 5 optional parameters:
- class - The class or classes given to the DIV element
- id - The ID given to the DIV element

The short code paramters can also be modified programatically using the `pw_spe_shortcode_atts` filter, which receives the array of parameters.

The `%s` will be replaced with the expiration date.
30 changes: 30 additions & 0 deletions assets/css/jquery-ui-timepicker-addon.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
.ui-timepicker-div dl { text-align: left; }
.ui-timepicker-div dl dt { float: left; clear:left; padding: 0 0 0 5px; }
.ui-timepicker-div dl dd { margin: 0 10px 10px 40%; }
.ui-timepicker-div td { font-size: 90%; }
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
.ui-timepicker-div .ui_tpicker_unit_hide{ display: none; }

.ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input { background: none; color: inherit; border: none; outline: none; border-bottom: solid 1px #555; width: 95%; }
.ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input:focus { border-bottom-color: #aaa; }

.ui-timepicker-rtl{ direction: rtl; }
.ui-timepicker-rtl dl { text-align: right; padding: 0 5px 0 0; }
.ui-timepicker-rtl dl dt{ float: right; clear: right; }
.ui-timepicker-rtl dl dd { margin: 0 40% 10px 10px; }

/* Shortened version style */
.ui-timepicker-div.ui-timepicker-oneLine { padding-right: 2px; }
.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time,
.ui-timepicker-div.ui-timepicker-oneLine dt { display: none; }
.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time_label { display: block; padding-top: 2px; }
.ui-timepicker-div.ui-timepicker-oneLine dl { text-align: right; }
.ui-timepicker-div.ui-timepicker-oneLine dl dd,
.ui-timepicker-div.ui-timepicker-oneLine dl dd > div { display:inline-block; margin:0; }
.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_minute:before,
.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_second:before { content:':'; display:inline-block; }
.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_millisec:before,
.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_microsec:before { content:'.'; display:inline-block; }
.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide,
.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide:before{ display: none; }
29 changes: 15 additions & 14 deletions assets/js/edit.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
jQuery(document).ready(function($) {

var previous = $('#pw-spe-expiration').val();
var previous = $('#pw-spe-expiration').val();

$('#pw-spe-expiration').datepicker({
dateFormat: 'yy-mm-dd'
});
$('#pw-spe-expiration').datetimepicker({
timeFormat: "HH:mm",
dateFormat: 'yy-mm-dd'
});

$('#pw-spe-edit-expiration, .pw-spe-hide-expiration').click(function(e) {
$('#pw-spe-edit-expiration, .pw-spe-hide-expiration').click(function(e) {

e.preventDefault();
e.preventDefault();

var date = $('#pw-spe-expiration').val();
var date = $('#pw-spe-expiration').val();

if( $(this).hasClass('cancel') ) {
if ($(this).hasClass('cancel')) {

$('#pw-spe-expiration').val( previous );
$('#pw-spe-expiration').val(previous);

} else if( date ) {
} else if (date) {

$('#pw-spe-expiration-label').text( $('#pw-spe-expiration').val() );
$('#pw-spe-expiration-label').text($('#pw-spe-expiration').val());

}
}

$('#pw-spe-expiration-field').slideToggle();
$('#pw-spe-expiration-field').slideToggle();

});
});
});
Loading