');
+
+ }
+ }).always(function(){
+ button.prop('disabled', false);
+ });
+ }
+})
diff --git a/datatables/css/jquery.datetimepicker.css b/datatables/css/jquery.datetimepicker.css
deleted file mode 100644
index 4ed981aa..00000000
--- a/datatables/css/jquery.datetimepicker.css
+++ /dev/null
@@ -1,568 +0,0 @@
-.xdsoft_datetimepicker {
- box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.506);
- background: #fff;
- border-bottom: 1px solid #bbb;
- border-left: 1px solid #ccc;
- border-right: 1px solid #ccc;
- border-top: 1px solid #ccc;
- color: #333;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- padding: 8px;
- padding-left: 0;
- padding-top: 2px;
- position: absolute;
- z-index: 9999;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- display: none;
-}
-.xdsoft_datetimepicker.xdsoft_rtl {
- padding: 8px 0 8px 8px;
-}
-
-.xdsoft_datetimepicker iframe {
- position: absolute;
- left: 0;
- top: 0;
- width: 75px;
- height: 210px;
- background: transparent;
- border: none;
-}
-
-/*For IE8 or lower*/
-.xdsoft_datetimepicker button {
- border: none !important;
-}
-
-.xdsoft_noselect {
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- -o-user-select: none;
- user-select: none;
-}
-
-.xdsoft_noselect::selection { background: transparent }
-.xdsoft_noselect::-moz-selection { background: transparent }
-
-.xdsoft_datetimepicker.xdsoft_inline {
- display: inline-block;
- position: static;
- box-shadow: none;
-}
-
-.xdsoft_datetimepicker * {
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- padding: 0;
- margin: 0;
-}
-
-.xdsoft_datetimepicker .xdsoft_datepicker, .xdsoft_datetimepicker .xdsoft_timepicker {
- display: none;
-}
-
-.xdsoft_datetimepicker .xdsoft_datepicker.active, .xdsoft_datetimepicker .xdsoft_timepicker.active {
- display: block;
-}
-
-.xdsoft_datetimepicker .xdsoft_datepicker {
- width: 224px;
- float: left;
- margin-left: 8px;
-}
-.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_datepicker {
- float: right;
- margin-right: 8px;
- margin-left: 0;
-}
-
-.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker {
- width: 256px;
-}
-
-.xdsoft_datetimepicker .xdsoft_timepicker {
- width: 58px;
- float: left;
- text-align: center;
- margin-left: 8px;
- margin-top: 0;
-}
-.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker {
- float: right;
- margin-right: 8px;
- margin-left: 0;
-}
-
-.xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker {
- margin-top: 8px;
- margin-bottom: 3px
-}
-
-.xdsoft_datetimepicker .xdsoft_monthpicker {
- position: relative;
- text-align: center;
-}
-
-.xdsoft_datetimepicker .xdsoft_label i,
-.xdsoft_datetimepicker .xdsoft_prev,
-.xdsoft_datetimepicker .xdsoft_next,
-.xdsoft_datetimepicker .xdsoft_today_button {
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Q0NBRjI1NjM0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Q0NBRjI1NjQ0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDQ0FGMjU2MTQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDQ0FGMjU2MjQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoNEP54AAAIOSURBVHja7Jq9TsMwEMcxrZD4WpBYeKUCe+kTMCACHZh4BFfHO/AAIHZGFhYkBBsSEqxsLCAgXKhbXYOTxh9pfJVP+qutnZ5s/5Lz2Y5I03QhWji2GIcgAokWgfCxNvcOCCGKqiSqhUp0laHOne05vdEyGMfkdxJDVjgwDlEQgYQBgx+ULJaWSXXS6r/ER5FBVR8VfGftTKcITNs+a1XpcFoExREIDF14AVIFxgQUS+h520cdud6wNkC0UBw6BCO/HoCYwBhD8QCkQ/x1mwDyD4plh4D6DDV0TAGyo4HcawLIBBSLDkHeH0Mg2yVP3l4TQMZQDDsEOl/MgHQqhMNuE0D+oBh0CIr8MAKyazBH9WyBuKxDWgbXfjNf32TZ1KWm/Ap1oSk/R53UtQ5xTh3LUlMmT8gt6g51Q9p+SobxgJQ/qmsfZhWywGFSl0yBjCLJCMgXail3b7+rumdVJ2YRss4cN+r6qAHDkPWjPjdJCF4n9RmAD/V9A/Wp4NQassDjwlB6XBiCxcJQWmZZb8THFilfy/lfrTvLghq2TqTHrRMTKNJ0sIhdo15RT+RpyWwFdY96UZ/LdQKBGjcXpcc1AlSFEfLmouD+1knuxBDUVrvOBmoOC/rEcN7OQxKVeJTCiAdUzUJhA2Oez9QTkp72OTVcxDcXY8iKNkxGAJXmJCOQwOa6dhyXsOa6XwEGAKdeb5ET3rQdAAAAAElFTkSuQmCC);
-}
-
-.xdsoft_datetimepicker .xdsoft_label i {
- opacity: 0.5;
- background-position: -92px -19px;
- display: inline-block;
- width: 9px;
- height: 20px;
- vertical-align: middle;
-}
-
-.xdsoft_datetimepicker .xdsoft_prev {
- float: left;
- background-position: -20px 0;
-}
-.xdsoft_datetimepicker .xdsoft_today_button {
- float: left;
- background-position: -70px 0;
- margin-left: 5px;
-}
-
-.xdsoft_datetimepicker .xdsoft_next {
- float: right;
- background-position: 0 0;
-}
-
-.xdsoft_datetimepicker .xdsoft_next,
-.xdsoft_datetimepicker .xdsoft_prev ,
-.xdsoft_datetimepicker .xdsoft_today_button {
- background-color: transparent;
- background-repeat: no-repeat;
- border: 0 none;
- cursor: pointer;
- display: block;
- height: 30px;
- opacity: 0.5;
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
- outline: medium none;
- overflow: hidden;
- padding: 0;
- position: relative;
- text-indent: 100%;
- white-space: nowrap;
- width: 20px;
- min-width: 0;
-}
-
-.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev,
-.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next {
- float: none;
- background-position: -40px -15px;
- height: 15px;
- width: 30px;
- display: block;
- margin-left: 14px;
- margin-top: 7px;
-}
-.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker .xdsoft_prev,
-.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker .xdsoft_next {
- float: none;
- margin-left: 0;
- margin-right: 14px;
-}
-
-.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev {
- background-position: -40px 0;
- margin-bottom: 7px;
- margin-top: 0;
-}
-
-.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box {
- height: 151px;
- overflow: hidden;
- border-bottom: 1px solid #ddd;
-}
-
-.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div {
- background: #f5f5f5;
- border-top: 1px solid #ddd;
- color: #666;
- font-size: 12px;
- text-align: center;
- border-collapse: collapse;
- cursor: pointer;
- border-bottom-width: 0;
- height: 25px;
- line-height: 25px;
-}
-
-.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div > div:first-child {
- border-top-width: 0;
-}
-
-.xdsoft_datetimepicker .xdsoft_today_button:hover,
-.xdsoft_datetimepicker .xdsoft_next:hover,
-.xdsoft_datetimepicker .xdsoft_prev:hover {
- opacity: 1;
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
-}
-
-.xdsoft_datetimepicker .xdsoft_label {
- display: inline;
- position: relative;
- z-index: 9999;
- margin: 0;
- padding: 5px 3px;
- font-size: 14px;
- line-height: 20px;
- font-weight: bold;
- background-color: #fff;
- float: left;
- width: 182px;
- text-align: center;
- cursor: pointer;
-}
-
-.xdsoft_datetimepicker .xdsoft_label:hover>span {
- text-decoration: underline;
-}
-
-.xdsoft_datetimepicker .xdsoft_label:hover i {
- opacity: 1.0;
-}
-
-.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select {
- border: 1px solid #ccc;
- position: absolute;
- right: 0;
- top: 30px;
- z-index: 101;
- display: none;
- background: #fff;
- max-height: 160px;
- overflow-y: hidden;
-}
-
-.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_monthselect{ right: -7px }
-.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_yearselect{ right: 2px }
-.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover {
- color: #fff;
- background: #ff8000;
-}
-
-.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option {
- padding: 2px 10px 2px 5px;
- text-decoration: none !important;
-}
-
-.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current {
- background: #33aaff;
- box-shadow: #178fe5 0 1px 3px 0 inset;
- color: #fff;
- font-weight: 700;
-}
-
-.xdsoft_datetimepicker .xdsoft_month {
- width: 100px;
- text-align: right;
-}
-
-.xdsoft_datetimepicker .xdsoft_calendar {
- clear: both;
-}
-
-.xdsoft_datetimepicker .xdsoft_year{
- width: 48px;
- margin-left: 5px;
-}
-
-.xdsoft_datetimepicker .xdsoft_calendar table {
- border-collapse: collapse;
- width: 100%;
-
-}
-
-.xdsoft_datetimepicker .xdsoft_calendar td > div {
- padding-right: 5px;
-}
-
-.xdsoft_datetimepicker .xdsoft_calendar th {
- height: 25px;
-}
-
-.xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th {
- width: 14.2857142%;
- background: #f5f5f5;
- border: 1px solid #ddd;
- color: #666;
- font-size: 12px;
- text-align: right;
- vertical-align: middle;
- padding: 0;
- border-collapse: collapse;
- cursor: pointer;
- height: 25px;
-}
-.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th {
- width: 12.5%;
-}
-
-.xdsoft_datetimepicker .xdsoft_calendar th {
- background: #f1f1f1;
-}
-
-.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today {
- color: #33aaff;
-}
-
-.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_highlighted_default {
- background: #ffe9d2;
- box-shadow: #ffb871 0 1px 4px 0 inset;
- color: #000;
-}
-.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_highlighted_mint {
- background: #c1ffc9;
- box-shadow: #00dd1c 0 1px 4px 0 inset;
- color: #000;
-}
-
-.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,
-.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,
-.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current {
- background: #33aaff;
- box-shadow: #178fe5 0 1px 3px 0 inset;
- color: #fff;
- font-weight: 700;
-}
-
-.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month,
-.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled,
-.xdsoft_datetimepicker .xdsoft_time_box >div >div.xdsoft_disabled {
- opacity: 0.5;
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
- cursor: default;
-}
-
-.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled {
- opacity: 0.2;
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
-}
-
-.xdsoft_datetimepicker .xdsoft_calendar td:hover,
-.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div:hover {
- color: #fff !important;
- background: #ff8000 !important;
- box-shadow: none !important;
-}
-
-.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current.xdsoft_disabled:hover,
-.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_current.xdsoft_disabled:hover {
- background: #33aaff !important;
- box-shadow: #178fe5 0 1px 3px 0 inset !important;
- color: #fff !important;
-}
-
-.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover,
-.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_disabled:hover {
- color: inherit !important;
- background: inherit !important;
- box-shadow: inherit !important;
-}
-
-.xdsoft_datetimepicker .xdsoft_calendar th {
- font-weight: 700;
- text-align: center;
- color: #999;
- cursor: default;
-}
-
-.xdsoft_datetimepicker .xdsoft_copyright {
- color: #ccc !important;
- font-size: 10px;
- clear: both;
- float: none;
- margin-left: 8px;
-}
-
-.xdsoft_datetimepicker .xdsoft_copyright a { color: #eee !important }
-.xdsoft_datetimepicker .xdsoft_copyright a:hover { color: #aaa !important }
-
-.xdsoft_time_box {
- position: relative;
- border: 1px solid #ccc;
-}
-.xdsoft_scrollbar >.xdsoft_scroller {
- background: #ccc !important;
- height: 20px;
- border-radius: 3px;
-}
-.xdsoft_scrollbar {
- position: absolute;
- width: 7px;
- right: 0;
- top: 0;
- bottom: 0;
- cursor: pointer;
-}
-.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_scrollbar {
- left: 0;
- right: auto;
-}
-.xdsoft_scroller_box {
- position: relative;
-}
-
-.xdsoft_datetimepicker.xdsoft_dark {
- box-shadow: 0 5px 15px -5px rgba(255, 255, 255, 0.506);
- background: #000;
- border-bottom: 1px solid #444;
- border-left: 1px solid #333;
- border-right: 1px solid #333;
- border-top: 1px solid #333;
- color: #ccc;
-}
-
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box {
- border-bottom: 1px solid #222;
-}
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div {
- background: #0a0a0a;
- border-top: 1px solid #222;
- color: #999;
-}
-
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label {
- background-color: #000;
-}
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select {
- border: 1px solid #333;
- background: #000;
-}
-
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover {
- color: #000;
- background: #007fff;
-}
-
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current {
- background: #cc5500;
- box-shadow: #b03e00 0 1px 3px 0 inset;
- color: #000;
-}
-
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label i,
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_prev,
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_next,
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_today_button {
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUExQUUzOTA0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUExQUUzOTE0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQTFBRTM4RTQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQTFBRTM4RjQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pp0VxGEAAAIASURBVHja7JrNSgMxEMebtgh+3MSLr1T1Xn2CHoSKB08+QmR8Bx9A8e7RixdB9CKCoNdexIugxFlJa7rNZneTbLIpM/CnNLsdMvNjM8l0mRCiQ9Ye61IKCAgZAUnH+mU3MMZaHYChBnJUDzWOFZdVfc5+ZFLbrWDeXPwbxIqrLLfaeS0hEBVGIRQCEiZoHQwtlGSByCCdYBl8g8egTTAWoKQMRBRBcZxYlhzhKegqMOageErsCHVkk3hXIFooDgHB1KkHIHVgzKB4ADJQ/A1jAFmAYhkQqA5TOBtocrKrgXwQA8gcFIuAIO8sQSA7hidvPwaQGZSaAYHOUWJABhWWw2EMIH9QagQERU4SArJXo0ZZL18uvaxejXt/Em8xjVBXmvFr1KVm/AJ10tRe2XnraNqaJvKE3KHuUbfK1E+VHB0q40/y3sdQSxY4FHWeKJCunP8UyDdqJZenT3ntVV5jIYCAh20vT7ioP8tpf6E2lfEMwERe+whV1MHjwZB7PBiCxcGQWwKZKD62lfGNnP/1poFAA60T7rF1UgcKd2id3KDeUS+oLWV8DfWAepOfq00CgQabi9zjcgJVYVD7PVzQUAUGAQkbNJTBICDhgwYTjDYD6XeW08ZKh+A4pYkzenOxXUbvZcWz7E8ykRMnIHGX1XPl+1m2vPYpL+2qdb8CDAARlKFEz/ZVkAAAAABJRU5ErkJggg==);
-}
-
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td,
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
- background: #0a0a0a;
- border: 1px solid #222;
- color: #999;
-}
-
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
- background: #0e0e0e;
-}
-
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_today {
- color: #cc5500;
-}
-
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_highlighted_default {
- background: #ffe9d2;
- box-shadow: #ffb871 0 1px 4px 0 inset;
- color:#000;
-}
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_highlighted_mint {
- background: #c1ffc9;
- box-shadow: #00dd1c 0 1px 4px 0 inset;
- color:#000;
-}
-
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_default,
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current,
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current {
- background: #cc5500;
- box-shadow: #b03e00 0 1px 3px 0 inset;
- color: #000;
-}
-
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td:hover,
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div:hover {
- color: #000 !important;
- background: #007fff !important;
-}
-
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
- color: #666;
-}
-
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright { color: #333 !important }
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a { color: #111 !important }
-.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a:hover { color: #555 !important }
-
-.xdsoft_dark .xdsoft_time_box {
- border: 1px solid #333;
-}
-
-.xdsoft_dark .xdsoft_scrollbar >.xdsoft_scroller {
- background: #333 !important;
-}
-.xdsoft_datetimepicker .xdsoft_save_selected {
- display: block;
- border: 1px solid #dddddd !important;
- margin-top: 5px;
- width: 100%;
- color: #454551;
- font-size: 13px;
-}
-.xdsoft_datetimepicker .blue-gradient-button {
- font-family: "museo-sans", "Book Antiqua", sans-serif;
- font-size: 12px;
- font-weight: 300;
- color: #82878c;
- height: 28px;
- position: relative;
- padding: 4px 17px 4px 33px;
- border: 1px solid #d7d8da;
- background: -moz-linear-gradient(top, #fff 0%, #f4f8fa 73%);
- /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(73%, #f4f8fa));
- /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #fff 0%, #f4f8fa 73%);
- /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #fff 0%, #f4f8fa 73%);
- /* Opera 11.10+ */
- background: -ms-linear-gradient(top, #fff 0%, #f4f8fa 73%);
- /* IE10+ */
- background: linear-gradient(to bottom, #fff 0%, #f4f8fa 73%);
- /* W3C */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fff', endColorstr='#f4f8fa',GradientType=0 );
-/* IE6-9 */
-}
-.xdsoft_datetimepicker .blue-gradient-button:hover, .xdsoft_datetimepicker .blue-gradient-button:focus, .xdsoft_datetimepicker .blue-gradient-button:hover span, .xdsoft_datetimepicker .blue-gradient-button:focus span {
- color: #454551;
- background: -moz-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
- /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f4f8fa), color-stop(73%, #FFF));
- /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
- /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
- /* Opera 11.10+ */
- background: -ms-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
- /* IE10+ */
- background: linear-gradient(to bottom, #f4f8fa 0%, #FFF 73%);
- /* W3C */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f8fa', endColorstr='#FFF',GradientType=0 );
- /* IE6-9 */
-}
diff --git a/datatables/js/edit_datatables.js b/datatables/js/edit_datatables.js
deleted file mode 100644
index 572178e7..00000000
--- a/datatables/js/edit_datatables.js
+++ /dev/null
@@ -1,956 +0,0 @@
-// Add the init function:
-function notification_init() {
- // Init stuff ...
-}
-
-/**
- *
- * @param row
- * @returns {boolean}
- */
-function compare_row(row) {
- return (this == row.DT_RowId);
-}
-
-
-var now = new Date();
-var extension_form_change = false;
-window.addEventListener('beforeunload', (event) => {
- if (table_obj_list) {
- for (var table_id in table_obj_list) {
- table_obj_list[table_id].state.save();
- }
- }
-});
-$(document).ready(function () {
- require(['jquery', 'datatables/js/jquery.datetimepicker.js'], function ($, datetimepicker) {
- function log_datatable_navigate(tr) {
- var row_id = tr.attr('id');
- var tableid = tr.closest('table').attr('id');
- var key = 'datatable_navigate_' + window.location.href + tableid;
- localStorage.setItem(key, row_id);
- }
-
- /* plagiarism flag */
- $('.datatabletest').on('click', '.new_plagiarism_flag', function (e) {
- log_datatable_navigate($(this).closest('tr'));
- });
-
- $('.datatabletest').on('click', '.edit_plagiarism_flag', function (e) {
- log_datatable_navigate($(this).closest('tr'));
- });
-
- /* feedback */
- $('.datatabletest').on('click', '.new_final_feedback', function (e) {
- log_datatable_navigate($(this).closest('tr'));
- });
-
- $('.datatabletest').on('click', '.edit_final_feedback', function (e) {
- log_datatable_navigate($(this).closest('tr'));
- });
-
- $('.datatabletest').on('click', '.show_feedback', function (e) {
- log_datatable_navigate($(this).closest('tr'));
- });
-
- /* assessor feedback */
- $('.datatabletest').on('click', '.assessor_feedback_grade .new_feedback', function (e) {
- log_datatable_navigate($(this).closest('td.assessors').closest('table.assessors').closest('tr').prev());
- });
-
- $('.datatabletest').on('click', '.assessor_feedback_grade .show_feedback', function (e) {
- log_datatable_navigate($(this).closest('td.assessors').closest('table.assessors').closest('tr').prev());
- });
-
- $('.datatabletest').on('click', '.assessor_feedback_grade .edit_feedback', function (e) {
- log_datatable_navigate($(this).closest('td.assessors').closest('table.assessors').closest('tr').prev());
- });
-
- /* deadline extension */
- $('.datatabletest').on('click', '.new_deadline_extension', function (e) {
- log_datatable_navigate($(this).closest('tr'));
- });
-
- $('.datatabletest').on('click', '.edit_deadline_extension', function (e) {
- log_datatable_navigate($(this).closest('tr'));
- });
-
- /* submission */
- $('.datatabletest').on('click', '.new_submission', function (e) {
- log_datatable_navigate($(this).closest('tr'));
- });
-
- // Prepare Message
- var datatables_lang_messages = JSON.parse($('#datatables_lang_messages').attr('data-lang'));
-
- /**
- * Personal Deadline
- */
- $('.datatabletest').on('click', '.edit_personal_deadline',function (e) {
- e.preventDefault();
- var parent = $(this).closest('.personal_deadline_cell');
- parent.children('.show_personal_dealine').addClass('display-none');
- var change_form = parent.children('.show_edit_personal_dealine');
- var data_get = $(this).attr('data-get');
- var data_time = $(this).attr('data-time');
- if (change_form.html().length == 1) {
- var form = '
';
- form += '
';
- $(change_form).html(form);
- }
- var time = $(change_form).children('.input-personal-deadline');
- $(time).datetimepicker({
- format: 'd-m-Y H:i',
- step: 5
- });
- $(change_form).removeClass('display-none');
- });
-
- $('.datatabletest').on('click', '.cancel-personal-deadline', function (e) {
- e.preventDefault();
- $(this).closest('.show_edit_personal_dealine').addClass('display-none');
- $(this).closest('.personal_deadline_cell').children('.show_personal_dealine').removeClass('display-none');
- });
-
- $('.datatabletest').on('click', '.approve-personal-deadline', function (e) {
- e.preventDefault();
- var deadline = $(this);
- var data_get = $(deadline).attr('data-get');
-
- var value = $(deadline).closest('.show_edit_personal_dealine').children('.input-personal-deadline').val();
-
- var fmt = new DateFormatter();
- var input_date = Date.parse(fmt.parseDate(value, "d-m-Y H:i"));
-
- if (input_date <= Date.parse(now)) {
- var notification = new M.core.alert({
- message: datatables_lang_messages.alert_validate_deadline.replace(/\_/g, ' '),
- title: datatables_lang_messages.notification_info,
- });
- notification.show();
- return 0;
- }
-
- var url = datatables_lang_messages.url_root + "/mod/coursework/actions/personal_deadline.php";
- var param = JSON.parse(data_get);
- param.personal_deadline_time = value;
-
- $.ajax({
- type: "POST",
- url: url,
- data: param,
- beforeSend: function () {
- $('html, body').css("cursor", "wait");
- $(self).prev('img').css('visibility', 'visible');
- },
- success: function (response) {
- $('html, body').css("cursor", "auto");
- data_response = JSON.parse(response);
- if (data_response.error == 1) {
- var notification = new M.core.alert({
- message: data_response.message,
- title: datatables_lang_messages.notification_info,
- });
- notification.show();
- } else {
- var parent = $(deadline).closest('.personal_deadline_cell');
- $(parent).attr('data-order', data_response.timestamp);
- var table = table_obj_list[Object.keys(table_obj_list)[0]];
- table.row('#' + $(parent).closest('tr').attr('id')).invalidate();
-
- $(parent).children('.show_personal_dealine').children('.content_personal_deadline').html(data_response.time);
- $(parent).children('.show_edit_personal_dealine').addClass('display-none');
- $(parent).children('.show_personal_dealine').removeClass('display-none');
- var notification = new M.core.alert({
- message: datatables_lang_messages.alert_personaldeadline_save_successful.replace(/\_/g, ' '),
- title: datatables_lang_messages.notification_info,
- });
- notification.show();
- }
- },
- error: function () {
- $('html, body').css("cursor", "auto");
- },
- complete: function () {
- $('html, body').css("cursor", "auto");
- }
- });
-
- });
-
- /***************************
- * Extensions
- */
-
- /**
- * Add new extension
- */
- $('.datatabletest').on('click', '.new_deadline_extension', function (e) {
- e.preventDefault();
- var data_name = $(this).attr('data-name');
- var data_params = JSON.parse($(this).attr('data-params'));
- var data_time = JSON.parse($(this).attr('data-time'));
- var current_rowid = $(this).closest('tr').attr('id');
- extension_new_change_data_form(data_name, data_params, data_time, current_rowid);
- $('#modal-ajax').modal('show');
- });
-
- /**
- * Edit extensions
- */
- $('.datatabletest').on('click', '.edit_deadline_extension', function (e) {
-
- e.preventDefault();
- var data_name = $(this).attr('data-name');
- var data_params = JSON.parse($(this).attr('data-params'));
- var data_time = JSON.parse($(this).attr('data-time'));
- var current_rowid = $(this).closest('tr').attr('id');
- extension_edit_change_data_form(data_name, data_params, data_time, current_rowid);
- $('#modal-ajax').modal('show');
- });
-
- /**
- * Submit save extension
- */
- $('.modal-footer').on('click', '#extension-submit', function (e) {
- e.preventDefault();
- var params = {};
- params.allocatabletype = $('#extension-allocatabletype').val();
- params.allocatableid = $('#extension-allocatableid').val();
- params.courseworkid = $('#extension-courseworkid').val();
- params.id = $('#extension-id').val();
- params.extended_deadline = $('#extension-extend-deadline').val();
- params.editor = $('#extension-time-content').html();
- params.text = $('#id_extra_information').val();
- params.submissionid = $('#extension-submissionid').val();
- params.pre_defined_reason = $('#extension-reason-select').val();
- params.requesttype = 'submit';
- current_rowid = $('#button-id').val();
- var url = datatables_lang_messages.url_root;
- $.ajax({
- type: "POST",
- url: url + "/mod/coursework/actions/ajax/deadline_extension/submit.php",
- data: params,
- beforeSend: function () {
- $('html, body').css("cursor", "wait");
- $('.modal-footer').children('img').css('visibility', 'visible');
- },
- success: function (response) {
- var data_response = JSON.parse(response);
- $('html, body').css("cursor", "auto");
- $('.modal-footer').children('img').css('visibility', 'hidden');
- if (data_response.error == 1) {
- var notification = new M.core.alert({
- message: data_response.messages,
- title: datatables_lang_messages.notification_info,
- });
- notification.show();
- } else {
- if (Object.keys(table_obj_list).length > 0) {
- // Get the first datatable object.
- var table = table_obj_list[Object.keys(table_obj_list)[0]];
- var current_row_data = table.row('#' + current_rowid).data();
- var submissiondateindex = table.column('.tableheaddate').index();
- var current_moderation_cell_data = data_response.content;
- current_row_data[submissiondateindex] = current_moderation_cell_data;
- var table_row = table.row('#' + current_rowid);
- table_row.data(current_row_data);
- var dom_row = $('#' + current_rowid);
- dom_row.find('.time_submitted_cell').attr('data-order', current_moderation_cell_data['@data-order']);
- dom_row.find('.edit_personal_deadline').remove();
- table_row.invalidate();
- $('#extension-id').val(data_response.data.id);
- }
-
- change__status_extension_submit_button(true);
- save_extension_form_data();
-
- var notification = new M.core.alert({
- message: datatables_lang_messages.alert_extension_save_successful.replace(/\_/g, ' '),
- title: datatables_lang_messages.notification_info,
- });
- notification.show();
- }
- },
- error: function () {
- $('html, body').css("cursor", "auto");
- },
- complete: function () {
- $('html, body').css("cursor", "auto");
- }
- });
- });
-
-
- /**
- * Function close button
- */
- $('#modal-ajax').on('hide.bs.modal', function (e) {
- var self = this;
- if(is_data_extension_form_change()) {
- var confirm = new M.core.confirm({
- title: datatables_lang_messages.notification_leave_form_title.replace(/\_/g, ' '),
- question: datatables_lang_messages.notification_leave_form_message.replace(/\_/g, ' '),
- yesLabel: datatables_lang_messages.notification_yes_label,
- noLabel: datatables_lang_messages.notification_no_label,
- });
-
- confirm.on('complete-yes',function() {
- save_extension_form_data();
- confirm.hide();
- confirm.destroy();
- $(self).modal('hide');
- });
-
- confirm.on('complete-no',function() {
- confirm.hide();
- confirm.destroy();
- return false;
- });
-
- confirm.show();
- return false;
- }
- return true;
- });
-
- /**
- * Function next button
- */
- $('.modal-footer').on('click', '#extension-next', function (e) {
- e.preventDefault();
-
- if (is_data_extension_form_change()) {
- var confirm = new M.core.confirm({
- title: datatables_lang_messages.notification_leave_form_title.replace(/\_/g, ' '),
- question: datatables_lang_messages.notification_leave_form_message.replace(/\_/g, ' '),
- yesLabel: datatables_lang_messages.notification_yes_label,
- noLabel: datatables_lang_messages.notification_no_label,
- });
-
- confirm.on('complete-yes', function () {
- confirm.hide();
- confirm.destroy();
- if (Object.keys(table_obj_list).length > 0) {
-
- var self = $(this);
- var prev_rowid = $('#button-id').val();
-
- // Get the first datatable object.
- var table = table_obj_list[Object.keys(table_obj_list)[0]];
-
- var prev_row_index = table.row('#' + prev_rowid).index();
-
-
- var current_row_index = prev_row_index + 1;
-
- if (table.row(current_row_index)) {
- var current_row_data = table.row(current_row_index).data();
- if (current_row_data) {
- var current_rowid = table.row(current_row_index).id();
-
- var submissiondateindex = table.column('.tableheaddate').index();
- var current_cell_data = current_row_data[submissiondateindex];
- if (current_cell_data) {
- var tmp_node = $('
').html(current_cell_data.display);
- var submisiondate = $(tmp_node).find('.new_deadline_extension');
- if (submisiondate.length > 0) {
- var data_params = JSON.parse(submisiondate.attr('data-params'));
- var data_name = submisiondate.attr('data-name');
- var data_time = JSON.parse(submisiondate.attr('data-time'));
- extension_new_change_data_form(data_name, data_params, data_time, current_rowid);
- } else {
- submisiondate = $(tmp_node).find('.edit_deadline_extension');
- var data_params = JSON.parse(submisiondate.attr('data-params'));
- var data_name = submisiondate.attr('data-name');
- var data_time = JSON.parse(submisiondate.attr('data-time'));
- extension_edit_change_data_form(data_name, data_params, data_time, current_rowid);
- }
- }
- }
- else {
- $('#extension-next').prop('disabled', true);
- var notification = new M.core.alert({
- message: datatables_lang_messages.alert_no_extension.replace(/\_/g, ' '),
- title: datatables_lang_messages.notification_info,
- });
- notification.show();
- }
- }
- }
- });
-
- confirm.on('complete-no', function () {
- confirm.hide();
- confirm.destroy();
-
- });
-
- confirm.show();
- } else {
- if (Object.keys(table_obj_list).length > 0) {
-
- var self = $(this);
- var prev_rowid = $('#button-id').val();
-
- // Get the first datatable object.
- var table = table_obj_list[Object.keys(table_obj_list)[0]];
-
- var ordereddata = table.rows( { order: 'applied', search: 'applied' } ).data().toArray();
- var prev_row_index = ordereddata.findIndex(compare_row, prev_rowid);
-
-
- var current_row_index = prev_row_index + 1;
-
- if (table.row(current_row_index)) {
- var current_row_data = ordereddata[current_row_index];
- if (typeof current_row_data != 'undefined') {
- var current_rowid = current_row_data.DT_RowId;
-
- var submissiondateindex = table.column('.tableheaddate').index();
- var current_cell_data = current_row_data[submissiondateindex];
- if (current_cell_data) {
- var tmp_node = $('
').html(current_cell_data.display);
- var submisiondate = $(tmp_node).find('.new_deadline_extension');
- if (submisiondate.length > 0) {
- var data_params = JSON.parse(submisiondate.attr('data-params'));
- var data_name = submisiondate.attr('data-name');
- var data_time = JSON.parse(submisiondate.attr('data-time'));
- extension_new_change_data_form(data_name, data_params, data_time, current_rowid);
- } else {
- submisiondate = $(tmp_node).find('.edit_deadline_extension');
- var data_params = JSON.parse(submisiondate.attr('data-params'));
- var data_name = submisiondate.attr('data-name');
- var data_time = JSON.parse(submisiondate.attr('data-time'));
- extension_edit_change_data_form(data_name, data_params, data_time, current_rowid);
- }
- }
- }
- else {
- $('#extension-next').prop('disabled', true);
- var notification = new M.core.alert({
- message: datatables_lang_messages.alert_no_mitigation.replace(/\_/g, ' '),
- title: datatables_lang_messages.notification_info,
- });
- notification.show();
- }
- }
- }
- }
-
-
- });
-
- /**
- * Function back button
- */
- $('.modal-footer').on('click', '#extension-back', function (e) {
- e.preventDefault();
- if (is_data_extension_form_change()) {
- var confirm = new M.core.confirm({
- title: datatables_lang_messages.notification_leave_form_title.replace(/\_/g, ' '),
- question: datatables_lang_messages.notification_leave_form_message.replace(/\_/g, ' '),
- yesLabel: datatables_lang_messages.notification_yes_label,
- noLabel: datatables_lang_messages.notification_no_label,
- });
-
- confirm.on('complete-yes', function () {
- confirm.hide();
- confirm.destroy();
- if (Object.keys(table_obj_list).length > 0) {
-
- var self = $(this);
- var prev_rowid = $('#button-id').val();
-
- // Get the first datatable object.
- var table = table_obj_list[Object.keys(table_obj_list)[0]];
-
- var prev_row_index = table.row('#' + prev_rowid).index();
-
-
- var current_row_index = prev_row_index - 1;
-
- if (table.row(current_row_index)) {
- var current_row_data = table.row(current_row_index).data();
- if (current_row_data) {
- var current_rowid = table.row(current_row_index).id();
-
- var submissiondateindex = table.column('.tableheaddate').index();
- var current_cell_data = current_row_data[submissiondateindex];
- if (current_cell_data) {
- var tmp_node = $('
').html(current_cell_data.display);
- var submisiondate = $(tmp_node).find('.new_deadline_extension');
- if (submisiondate.length > 0) {
- var data_params = JSON.parse(submisiondate.attr('data-params'));
- var data_name = submisiondate.attr('data-name');
- var data_time = JSON.parse(submisiondate.attr('data-time'));
- extension_new_change_data_form(data_name, data_params, data_time, current_rowid);
- } else {
- submisiondate = $(tmp_node).find('.edit_deadline_extension');
- var data_params = JSON.parse(submisiondate.attr('data-params'));
- var data_name = submisiondate.attr('data-name');
- var data_time = JSON.parse(submisiondate.attr('data-time'));
- extension_edit_change_data_form(data_name, data_params, data_time, current_rowid);
- }
- }
- }
- else {
- $('#extension-back').prop('disabled', true);
- var notification = new M.core.alert({
- message: datatables_lang_messages.alert_no_mitigation.replace(/\_/g, ' '),
- title: datatables_lang_messages.notification_info,
- });
- notification.show();
- }
- }
- }
- });
-
- confirm.on('complete-no', function () {
- confirm.hide();
- confirm.destroy();
- });
-
- confirm.show();
- } else {
- if (Object.keys(table_obj_list).length > 0) {
-
- var self = $(this);
- var prev_rowid = $('#button-id').val();
-
- // Get the first datatable object.
- var table = table_obj_list[Object.keys(table_obj_list)[0]];
-
- var ordereddata = table.rows( { order: 'applied', search: 'applied' } ).data().toArray();
- var prev_row_index = ordereddata.findIndex(compare_row, prev_rowid);
-
-
- var current_row_index = prev_row_index - 1;
-
- if (table.row(current_row_index)) {
- var current_row_data = ordereddata[current_row_index];
- if (typeof current_row_data != 'undefined') {
- var current_rowid = current_row_data.DT_RowId;
-
- var submissiondateindex = table.column('.tableheaddate').index();
- var current_cell_data = current_row_data[submissiondateindex];
- if (current_cell_data) {
- var tmp_node = $('
').html(current_cell_data.display);
- var submisiondate = $(tmp_node).find('.new_deadline_extension');
- if (submisiondate.length > 0) {
- var data_params = JSON.parse(submisiondate.attr('data-params'));
- var data_name = submisiondate.attr('data-name');
- var data_time = JSON.parse(submisiondate.attr('data-time'));
- extension_new_change_data_form(data_name, data_params, data_time, current_rowid);
- } else {
- submisiondate = $(tmp_node).find('.edit_deadline_extension');
- var data_params = JSON.parse(submisiondate.attr('data-params'));
- var data_name = submisiondate.attr('data-name');
- var data_time = JSON.parse(submisiondate.attr('data-time'));
- extension_edit_change_data_form(data_name, data_params, data_time, current_rowid);
- }
- }
- }
- else {
- $('#extension-back').prop('disabled', true);
- var notification = new M.core.alert({
- message: datatables_lang_messages.alert_no_mitigation.replace(/\_/g, ' '),
- title: datatables_lang_messages.notification_info,
- });
- notification.show();
- }
- }
- }
- }
-
-
- });
-
- function extension_edit_change_data_form(data_name, data_params, data_time, current_rowid) {
- var title = 'Editing the extension for ' + data_name;
- var time_content = 'Default deadline: ' + data_time.time_content;
- $('#extension-modal-title').html(title);
- $('#form-extension').find('input[type=hidden]').val("");
- $('#form-extension').find('textarea').val("");
- $('#button-id').val(current_rowid);
- $('#extension-submissionid').val(data_params.submissionid);
- $('#extension-name').val(data_name);
- data_params.requesttype = 'edit';
- var url = datatables_lang_messages.url_root;
- $.ajax({
- type: "GET",
- url: url + "/mod/coursework/actions/ajax/deadline_extension/edit.php",
- data: data_params,
- beforeSend: function () {
- change__status_extension_submit_button(true);
- $('html, body').css("cursor", "wait");
- $('.modal-footer').children('img').css('visibility', 'visible');
- },
- success: function (response) {
- var data_response = JSON.parse(response);
- $('html, body').css("cursor", "auto");
- $('.modal-footer').children('img').css('visibility', 'hidden');
- if (data_response.error == 1) {
- var notification = new M.core.alert({
- message: data_response.message + ' .Please reload the page!',
- title: datatables_lang_messages.notification_info,
- });
- notification.show();
- } else {
- var extension = data_response.data;
- if (extension.time_content) {
- $('#extension-time-content').html(extension.time_content);
- } else {
- $('#extension-time-content').html(time_content);
- }
-
- $('#extension-extend-deadline').val(extension.time);
- $('#extension-extend-deadline').datetimepicker({
- format: 'd-m-Y H:i',
- step: 5
- });
- $('#extension-reason-select').val(extension.pre_defined_reason);
- $('#extension-allocatabletype').val(extension.allocatabletype);
- $('#extension-allocatableid').val(extension.allocatableid);
- $('#extension-courseworkid').val(extension.courseworkid);
- $('#extension-id').val(extension.id);
-
- $('#id_extra_information').val(extension.text);
-
- $('#id_extra_information').prop('disabled', false);
- $('#extension-extend-deadline').prop('disabled', false);
- $('#extension-reason-select').prop('disabled', false);
- save_extension_form_data();
- }
- },
- error: function () {
- $('html, body').css("cursor", "auto");
- change__status_extension_submit_button(false);
- },
- complete: function () {
- $('html, body').css("cursor", "auto");
- change__status_extension_submit_button(false);
- }
- });
- }
-
- function extension_new_change_data_form(data_name, data_params, data_time, current_rowid) {
- var title = 'New extension for ' + data_name;
- $('#extension-modal-title').html(title);
- $('#form-extension').find('input[type=hidden]').val('');
- $('#form-extension').find('textarea').val('');
-
- if(data_time.is_have_deadline == '1') {
- var url = datatables_lang_messages.url_root;
- $.ajax({
- type: "GET",
- url: url + "/mod/coursework/actions/ajax/deadline_extension/new.php",
- data: data_params,
- beforeSend: function () {
- change__status_extension_submit_button(true);
- $('html, body').css("cursor", "wait");
- $('.modal-footer').children('img').css('visibility', 'visible');
- },
- success: function (response) {
- $('html, body').css("cursor", "auto");
- $('.modal-footer').children('img').css('visibility', 'hidden');
- var data_response = JSON.parse(response);
- $('#extension-time-content').html(data_response.data.time_content);
- $('#extension-extend-deadline').val(data_response.data.time);
- $('#extension-extend-deadline').datetimepicker({
- format: 'd-m-Y H:i',
- step: 5
- });
- save_extension_form_data();
- },
- error: function () {
- $('html, body').css("cursor", "auto");
- },
- complete: function () {
- $('html, body').css("cursor", "auto");
- }
- });
- } else {
- save_extension_form_data();
- }
- $('#extension-reason-select').val('');
- $('#extension-allocatabletype').val(data_params.allocatabletype);
- $('#extension-allocatableid').val(data_params.allocatableid);
- $('#extension-courseworkid').val(data_params.courseworkid);
- $('#extension-submissionid').val(data_params.submissionid);
- $('#extension-name').val(data_name);
- $('#button-id').val(current_rowid);
-
- $('#id_extra_information').prop('disabled', false);
- $('#extension-extend-deadline').prop('disabled', false);
- $('#extension-reason-select').prop('disabled', false);
- }
-
-
- $("#form-extension :input").change(function () {
- extension_form_change = true;
- change__status_extension_submit_button(false);
- });
-
- function change__status_extension_submit_button(status) {
- $('#extension-submit').prop('disabled', status);
- }
-
- function save_extension_form_data() {
- extension_form_change = false;
- }
-
- function is_data_extension_form_change() {
- return extension_form_change;
- }
-
- /**
- * Feedback
- */
- $('.datatabletest').on('click', '.new_final_feedback, .new_feedback, .edit_final_feedback, .edit_feedback, .show_feedback', function (e) {
- e.preventDefault();
- var url = $(this).attr('href');
- $.ajax({
- type: "GET",
- url: url+'&ajax=1'
- }).done(function(response) {
- response = $.parseJSON(response);
- var modalbody = $('#modal-grading').find('.modal-body');
- // Careful as not all requests return a response.success value. Only if it's false, show error.
- if ((response.success ?? true) === false && (response.message ?? null)) {
- modalbody.html(response.message);
- } else {
- modalbody.html(response.formhtml);
- var filemanager = modalbody.find('.filemanager');
- if (response.filemanageroptions && filemanager.length) {
- var elementid = filemanager.attr('id');
- var clientid = elementid.substr(12);
- if (clientid) {
- response.filemanageroptions.client_id = clientid;
- M.form_filemanager.init(Y, response.filemanageroptions);
- }
- }
- if (response.editoroptions) {
- require(['editor_tiny/editor'], (Tiny) => {
- Tiny.setupForElementId({
- elementId: 'id_feedbackcomment',
- options: JSON.parse(response.editoroptions),
- });
- });
- }
-
- if (response.commentoptions) {
- M.util.js_pending('gradingform_guide/comment_chooser');
- require(['gradingform_guide/comment_chooser'], function(amd) {
- $(".remark").each( function (i,ele) {
- buttonele = $(ele).find(".commentchooser");
- textele = $(ele).find(".markingguideremark");
- buttonid = $(buttonele).attr("id");
- textid = $(textele).attr("id");
- amd.initialise(1, buttonid, textid, response.commentoptions);
- M.util.js_complete('gradingform_guide/comment_chooser');
-
- })
-
- });
- }
- }
- });
- var cell_td = $(this).closest('td');
- var cell_selector = get_td_cell_selector(cell_td);
- var cell_type = cell_td.attr('data-class-name');
- show_loading_modal_grading(cell_selector, cell_type);
- });
-
- /**
- *
- * @param td_cell
- * @returns {string}
- */
- function get_td_cell_selector(td_cell) {
- var result = '.' + td_cell.attr('class').replaceAll(' ', '.');
- var tr_cell = td_cell.closest('tr');
- if (tr_cell.attr('id')) {
- result = '#' + tr_cell.attr('id') + ' ' + result;
- } else {
- result = '.' + tr_cell.attr('class').replaceAll(' ', '.') + ' ' + result;
- }
- return result;
- }
-
- /**
- *
- * @param cell_selector
- * @param cell_type
- */
- function show_loading_modal_grading(cell_selector, cell_type) {
- // Set row id.
- var modal = $('#modal-grading');
- modal.find('#cell_selector').val(cell_selector);
- modal.find('#cell_type').val(cell_type);
- modal.find('.modal-body').html('
loading');
- $('#modal-grading').modal('show');
- }
-
- $('#modal-grading').on('click', '#id_submitfeedbackbutton, #id_submitbutton', function (e) {
- e.preventDefault();
- var button = $(this);
- button.prop('disabled', true);
- var submitbutton = (button.attr('id') == 'id_submitbutton') ? 1 : 0;
- var removefeedbackbutton = (button.attr('id') == 'id_removefeedbackbutton') ? 1 : 0;
- var submitfeedbackbutton = (button.attr('id') == 'id_submitfeedbackbutton') ? 1 : 0;
- var modal = $('#modal-grading');
- var url = '/mod/coursework/actions/feedbacks/create.php';
- var form_data = modal.find('form').serializeArray();
- for (var i = 0, length = form_data.length; i < length; i++) {
- if (form_data[i].name == 'feedbackid' && !isNaN(parseInt(form_data[i].value)) && form_data[i].value != '0') {
- url = '/mod/coursework/actions/feedbacks/update.php';
- break;
- }
- }
- var cell_type = modal.find('#cell_type').val();
- update_feedback(form_data,url,cell_type,submitbutton,removefeedbackbutton,submitfeedbackbutton,0,button);
- /*
- form_data = form_data.concat({name: 'ajax', value: 1},
- {name: 'cell_type', value: cell_type},
- {name: 'submitbutton', value: submitbutton},
- {name: 'removefeedbackbutton', value: removefeedbackbutton});
- $.ajax({
- type: 'POST',
- data: form_data,
- url: url,
- dataType: 'json'
- }).done(function(response) {
- console.log(response);
- if (response.success) {
- var cell_selector = modal.find('#cell_selector').val();
- $(cell_selector).html(response.html);
- $('#modal-grading').modal('hide');
- if (submitbutton == 1) {
- alert('Your data has been saved.');
- } else {
- alert('The feedback has been removed.');
- }
- } else {
- alert('Sorry! There was an error with your request.');
- }
- }).always(function() {
- me.prop('disabled', false);
- });*/
- });
-
- $('#modal-grading').on('click', '#id_cancel', function (e) {
- e.preventDefault();
- $('#modal-grading').modal('hide');
- });
-
- $('#modal-grading').on('click', '#id_removefeedbackbutton', function (e) {
- e.preventDefault();
- var button = $(this);
- button.prop('disabled', true);
- if (confirm('do you want to remove feedback')) {
- var submitbutton = (button.attr('id') == 'id_submitbutton') ? 1 : 0;
- var removefeedbackbutton = (button.attr('id') == 'id_removefeedbackbutton') ? 1 : 0;
- var submitfeedbackbutton = (button.attr('id') == 'id_submitfeedbackbutton') ? 1 : 0;
- var modal = $('#modal-grading');
- var url = '/mod/coursework/actions/feedbacks/update.php';
- var form_data = modal.find('form').serializeArray();
- var cell_type = modal.find('#cell_type').val();
- update_feedback(form_data, url, cell_type, submitbutton, removefeedbackbutton, submitfeedbackbutton,1, button);
- }
- });
-
- function update_feedback(form_data,url,celltype,submitbutton,removefeedbackbutton,submitfeedbackbutton,confirm,button) {
- $.noConflict();
- console.log('no conflict');
- form_data = form_data.concat({name: 'ajax', value: 1},
- {name: 'cell_type', value: celltype},
- {name: 'submitbutton', value: submitbutton},
- {name: 'submitfeedbackbutton', value: submitfeedbackbutton},
- {name: 'removefeedbackbutton', value: removefeedbackbutton},
- {name: 'confirm', value: confirm});
-
- $.ajax({
- type: 'POST',
- data: form_data,
- url: url,
- dataType: 'json'
- }).done(function(response) {
- if ((response.success ?? true) === false && (response.message ?? null)) {
- // Could be an error like "Please provide a valid grade for each criterion".
- $('#modal-grading').find('.modal-body').html(
- '
' + response.message + '
'
- );
- } else if (response.success) {
- var cell_selector = $('#modal-grading').find('#cell_selector').val();
- $(cell_selector).html(response.html);
-
- if (typeof response.extrahtml !== 'undefined' && response.extrahtml != '') {
- $(cell_selector).next('td').html(response.extrahtml);
- }
- if (typeof response.assessdate !== 'undefined' && response.assessdate != '') {
- $(cell_selector).next('td').html(response.assessdate);
- }
-
- if (typeof response.assessorname !== 'undefined' && response.assessorname != '') {
- $(cell_selector).prev('td').html(response.assessorname);
- }
-
- if (typeof response.assessortwo !== 'undefined' && response.assessortwo != '') {
- var tdcell = $(cell_selector).closest('tr').next().find('td')[1];
- $(tdcell).html(response.assessortwo);
- }
-
- if (typeof response.finalhtml !== 'undefined' && response.assessortwo != '') {
- var tablerowid = 'allocatable_' + response.allocatableid;
- var tdcell2 = $('#' + tablerowid).find('.multiple_agreed_grade_cell')[0];
- $(tdcell2).html(response.finalhtml);
- }
-
- var datatables_lang_messages_two = JSON.parse($('#datatables_lang_messages').attr('data-lang'));
-
- console.log('call modal hide');
-
- $('#modal-grading').modal('hide');
-
- if (submitbutton == 1) {
- var notification = new M.core.alert({
- message: datatables_lang_messages_two.alert_feedback_save_successful.replace(/\_/g, ' '),
- title: datatables_lang_messages_two.notification_info,
- });
- notification.show();
-
- } else if (submitfeedbackbutton == 1) {
- var notification = new M.core.alert({
- message: datatables_lang_messages_two.alert_feedback_draft_save_successful.replace(/\_/g, ' '),
- title: datatables_lang_messages_two.notification_info,
- });
- notification.show();
-
- } else {
- var notification = new M.core.alert({
- message: datatables_lang_messages_two.alert_feedback_remove_successful.replace(/\_/g, ' '),
- title: datatables_lang_messages_two.notification_info,
- });
- notification.show();
- }
- } else {
- var notification = new M.core.alert({
- message: response.message,
- title: datatables_lang_messages_two.notification_info,
- });
- notification.show();
-
- error_wrapper_element.prepend('