This file contains hidden or 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
function execInBackground($cmd){ | |
if (substr(php_uname(), 0, 7) == "Windows"){ | |
pclose(popen("start /B ". $cmd, "r")); | |
}else{ | |
exec($cmd . " > /dev/null &"); | |
} | |
} | |
// Pass parameter if you need | |
//$second_param = 1; |
This file contains hidden or 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
$(function () { | |
// Get the template HTML and remove it from the doumenthe template HTML and remove it from the doument | |
var previewNode = document.querySelector("#referenceTemplate"); | |
previewNode.id = ""; | |
var previewTemplate = previewNode.parentNode.innerHTML; | |
previewNode.parentNode.removeChild(previewNode); | |
Dropzone.autoDiscover = false; | |
var myDropzone = new Dropzone(".uploadReference", {// Make the whole body a dropzone | |
url: "ajax/upload-file.php", // Set the url |
This file contains hidden or 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
var selected = []; | |
$(function () { | |
$('#emailTemplatesDataTable').DataTable({ | |
"paging": true, | |
"lengthChange": true, | |
"searching": true, | |
"ordering": true, | |
"info": true, |
This file contains hidden or 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
public function StripUrl($title) | |
{ | |
$title = str_replace("#", "sharp", $title); | |
$title = str_replace("/", "or", $title); | |
$title = str_replace("$", "-", $title); | |
$title = str_replace("&", "and", $title); | |
$title = str_replace("&", "and", $title); | |
$title = str_replace("+", "plus", $title); | |
$title = str_replace(",", "-", $title); | |
$title = str_replace(":", "-", $title); |
This file contains hidden or 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
<!-- BOOTSTRAP DATE TIME PICKER --> | |
<script src="plugins/datetimepicker/bootstrap-datetimepicker.min.js"></script> | |
<script type="text/javascript"> | |
$(function () { | |
$('#meetingdatetime').datetimepicker({format: 'DD-MM-YYYY, h:m a'}).on('dp.change',function(e){ | |
var formatedValue = e.date.format("YYYY-MM-DD HH:mm:ss"); | |
$("#datetime").val(formatedValue); | |
}); | |
}); | |
</script> |
This file contains hidden or 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
/** | |
* Sticky header | |
*/ | |
if ( $body.hasClass( 'header-sticky' ) ) | |
{ | |
var $topbar = $( '#topbar' ), | |
offset = $topbar.length ? $topbar.height() : 0; | |
$window.scroll( function() | |
{ //alert(offset); |
This file contains hidden or 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
// Put this code in config.js file & then use jquery validation plugin with CkEditor | |
CKEDITOR.on('instanceReady', function (e) { | |
var instance = e.editor; | |
instance.on("change", function (evt) { | |
onCKEditorChange(evt.editor); | |
}); | |
//key event handler is a hack, cause change event doesn't handle interaction with these keys | |
instance.on('key', function (evt) { | |
var backSpaceKeyCode = 8; |
This file contains hidden or 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
errorPlacement: function(error, $elem) | |
{ | |
if ($elem.attr('id')=='#textarea') { | |
error.insertAfter($elem.next('#cke_message')); | |
}else{ | |
error.insertAfter($elem); | |
} | |
} |
This file contains hidden or 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
<!-- Custom page script --> | |
<script> | |
var selected = []; | |
$(function () { | |
$('#emailTemplatesDataTable').DataTable({ | |
"paging": true, | |
"lengthChange": true, | |
"searching": true, | |
"ordering": true, | |
"info": true, |
NewerOlder