This repository has been archived by the owner on Jul 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
422 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
#ts_head { | ||
width: calc(100% - 20px); | ||
max-width: 800px; | ||
text-align: center; | ||
font-size: 30px; | ||
} | ||
|
||
#ts_load { | ||
display: flex; | ||
width: calc(100% - 20px); | ||
max-width: 800px; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
#add_form { | ||
width: calc(100% - 20px); | ||
max-width: 800px; | ||
} | ||
|
||
#add_form table { | ||
width: 100%; | ||
box-sizing: border-box !important; | ||
border-collapse: separate !important; | ||
border-spacing: 0 !important; | ||
} | ||
|
||
#add_form table tr { | ||
line-height: 3; | ||
} | ||
|
||
h3 { | ||
margin-top: 5px; | ||
color: red; | ||
} | ||
|
||
|
||
/* Thanks to css-spinners.com */ | ||
@-moz-keyframes three-quarters-loader { | ||
0% { | ||
-moz-transform: rotate(0deg); | ||
transform: rotate(0deg); | ||
} | ||
100% { | ||
-moz-transform: rotate(360deg); | ||
transform: rotate(360deg); | ||
} | ||
} | ||
@-webkit-keyframes three-quarters-loader { | ||
0% { | ||
-webkit-transform: rotate(0deg); | ||
transform: rotate(0deg); | ||
} | ||
100% { | ||
-webkit-transform: rotate(360deg); | ||
transform: rotate(360deg); | ||
} | ||
} | ||
@keyframes three-quarters-loader { | ||
0% { | ||
-moz-transform: rotate(0deg); | ||
-ms-transform: rotate(0deg); | ||
-webkit-transform: rotate(0deg); | ||
transform: rotate(0deg); | ||
} | ||
100% { | ||
-moz-transform: rotate(360deg); | ||
-ms-transform: rotate(360deg); | ||
-webkit-transform: rotate(360deg); | ||
transform: rotate(360deg); | ||
} | ||
} | ||
/* :not(:required) hides this rule from IE9 and below */ | ||
.three-quarters-loader:not(:required) { | ||
-moz-animation: three-quarters-loader 1250ms infinite linear; | ||
-webkit-animation: three-quarters-loader 1250ms infinite linear; | ||
animation: three-quarters-loader 1250ms infinite linear; | ||
border: 8px solid #2faadd; | ||
border-right-color: transparent; | ||
border-radius: 50%; | ||
box-sizing: border-box; | ||
display: inline-block; | ||
position: relative; | ||
overflow: hidden; | ||
text-indent: -9999px; | ||
width: 50px; | ||
height: 50px; | ||
visibility: hidden; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
// Zugriff einschränken | ||
defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); | ||
// Um $wpdb nutzen zu können | ||
global $wpdb; | ||
|
||
$opt1 = sanitize_text_field($_POST["opt1"]); | ||
$opt2 = sanitize_text_field($_POST["opt2"]); | ||
$opt3 = sanitize_text_field($_POST["opt3"]); | ||
$datepicker = sanitize_text_field($_POST["datepicker"]); | ||
|
||
$wpdb->query($wpdb->prepare("UPDATE wp_sts_options SET ts_value = CASE | ||
WHEN ts_option = 'opt_field_1' THEN %s | ||
WHEN ts_option = 'opt_field_2' THEN %s | ||
WHEN ts_option = 'opt_field_3' THEN %s | ||
WHEN ts_option = 'datepicker' THEN %s | ||
END", $opt1, $opt2, $opt3, $datepicker)); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
// Zugriff einschränken | ||
defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); | ||
// Um $wpdb nutzen zu können | ||
global $wpdb; | ||
|
||
$opt1 = $wpdb->get_var("SELECT ts_value FROM wp_sts_options WHERE ts_option = 'opt_field_1'"); | ||
$opt2 = $wpdb->get_var("SELECT ts_value FROM wp_sts_options WHERE ts_option = 'opt_field_2'"); | ||
$opt3 = $wpdb->get_var("SELECT ts_value FROM wp_sts_options WHERE ts_option = 'opt_field_3'"); | ||
$datepicker = $wpdb->get_var("SELECT ts_value FROM wp_sts_options WHERE ts_option = 'datepicker'"); | ||
?> | ||
<h1 id="ts_head"><?php _e('General Options', 'simple-support-ticket-system'); ?></h1> | ||
<div id="ts_load"><div class="three-quarters-loader"></div></div> | ||
<div id="ts_content"> | ||
<form id="add_form" onsubmit="addChanges();return false;"> | ||
<table> | ||
<tr> | ||
<td> | ||
<?php _e('Title Optional Field 1:', 'simple-support-ticket-system'); ?> | ||
</td> | ||
<td> | ||
<input id="add_opt1" type="text" size="32" maxlength="50" name="opt1" value="<?php echo $opt1; ?>"> | ||
</td> | ||
<tr> | ||
<tr> | ||
<td> | ||
<?php _e('Title Optional Field 2:', 'simple-support-ticket-system'); ?> | ||
</td> | ||
<td> | ||
<input id="add_opt2" type="text" size="32" maxlength="50" name="opt2" value="<?php echo $opt2; ?>"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<?php _e('Title Optional Field 3:', 'simple-support-ticket-system'); ?> | ||
</td> | ||
<td> | ||
<input id="add_opt3" type="text" size="32" maxlength="50" name="opt3" value="<?php echo $opt3; ?>"> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<?php _e('Title Datepicker Field:', 'simple-support-ticket-system'); ?> | ||
</td> | ||
<td> | ||
<input id="add_datepicker"type="text" size="32" maxlength="50" name="datepick" value="<?php echo $datepicker; ?>"> | ||
</td> | ||
</tr> | ||
</table> | ||
<hr> | ||
<h3><?php _e('An empty Title will hide this Field in the Submit-Form', 'simple-support-ticket-system'); ?></h3> | ||
<p class="submit"><input class="button button-primary" type="submit" value="<?php _e('Save Settings', 'simple-support-ticket-system'); ?>"></input></p> | ||
</form> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
jQuery(document).ready(function() { | ||
// Ladeanimation | ||
jQuery(document) | ||
.ajaxStart(function () { | ||
jQuery('.three-quarters-loader').css('visibility', 'visible'); | ||
}) | ||
.ajaxStop(function () { | ||
jQuery('.three-quarters-loader').css('visibility', 'hidden'); | ||
}); | ||
}); | ||
|
||
function addChanges() { | ||
var opt1 = jQuery('#add_opt1').val(); | ||
var opt2 = jQuery('#add_opt2').val(); | ||
var opt3 = jQuery('#add_opt3').val(); | ||
var datepicker = jQuery('#add_datepicker').val(); | ||
|
||
var data = { | ||
'action': 'SAVE', | ||
'opt1': opt1, | ||
'opt2': opt2, | ||
'opt3': opt3, | ||
'datepicker': datepicker, | ||
}; | ||
|
||
jQuery.post(ajax_object.ajax_url, data, function() { | ||
var data2 = {'action': 'GENERAL_LOAD'}; | ||
jQuery.post(ajax_object.ajax_url, data2, function(response) { | ||
var final_data = jQuery(response).find('#ajax_form').html(); | ||
jQuery('#ajax_form').html(final_data); | ||
}); | ||
}); | ||
} |
Binary file not shown.
Oops, something went wrong.