Пример #1
0
                var img = document.getElementById('img'+id);
                var o_w = img.offsetWidth;
                var o_h = img.offsetHeight;
                var f_w = div.offsetWidth;
                var f_h = div.offsetHeight;
                if ((o_w > f_w) || (o_h > f_h)) {
                    if ((f_w / f_h) > (o_w / o_h))
                        f_w = parseInt((o_w * f_h) / o_h);
                    else if ((f_w / f_h) < (o_w / o_h))
                        f_h = parseInt((o_h * f_w) / o_w);
                    img.style.width = f_w + "px";
                    img.style.height = f_h + "px";
                } else {
                    f_w = o_w;
                    f_h = o_h;
                }
                img.style.marginLeft = parseInt((div.offsetWidth - f_w) / 2) + 'px';
                img.style.marginTop = parseInt((div.offsetHeight - f_h) / 2) + 'px';
                img.style.visibility = "visible";
            }
        }
    };
    window.open('<?php 
echo locationPlugin("url") . "kcfinder";
?>
/browse.php?type=images&dir=assets/uploads/',
        'kcfinder_image', 'status=0, toolbar=0, location=0, menubar=0, ' +
        'directories=0, resizable=1, scrollbars=0, width=800, height=600'
    );
}
</script>
Пример #2
0
<?php

echo incCSS(locationPlugin('url') . 'toggles/dist/css/bootstrap3/bootstrap-switch.min');
echo incJS(locationPlugin('url') . 'toggles/dist/js/bootstrap-switch.min');
?>
<script>
$(document).ready(function(){
$("[name='service']").bootstrapSwitch();
$('input[name="service"]').on('switchChange.bootstrapSwitch', function(event, state) {
  if(state==true){
  	$("#laststate").val("1");
  	$("#option").show();
  }else{
  	$("#laststate").val("0");
  	$("#option").hide();
  }
});

$("#tipe").change(function(){
	var id=$(this).val();
	$.ajax({
		type:'get',
		dataType:'html',
		url:'<?php 
echo base_url(roleURIUser() . "/config/captcha/showconfig");
?>
',
		data:'tipe='+id,
		beforeSend:function(){
			$("#config").hide();
			$("#loader").show();
Пример #3
0
<?php

echo incCSS(locationPlugin('url') . 'datatables/dataTables.bootstrap');
echo incCSS(locationPlugin('url') . 'datatables/extensions/responsive/css/dataTables.responsive');
echo incJS(locationPlugin('url') . 'datatables/jquery.dataTables');
echo incJS(locationPlugin('url') . 'datatables/dataTables.bootstrap');
echo incJS(locationPlugin('url') . 'datatables/extensions/responsive/js/dataTables.responsive');
?>
<script>
$(document).ready(function(){
	
$('.data-render').dataTable({
    "sPaginationType": "full_numbers",
    "iDisplayLength": 10,
    "oLanguage": {
        "sLengthMenu": "<span class='lenghtMenu'> _MENU_</span><span class='lengthLabel'>Entries per page:</span>",
    },
    "sDom": '<"tbl-searchbox clearfix"fl<"clear">>,<"table_content"t>,<"widget-bottom"p<"clear">>'

});
$("div.tbl-searchbox select").addClass('tbl_length');

$(".editbtn").each(function(){
	$(this).click(function(){
		var did=$(this).attr('data-id');
		$.ajax({
			type:'get',
			dataType:'html',
			url:'<?php 
echo base_url(roleURIUser() . "content/category/edit");
?>
Пример #4
0
<script type="text/javascript">
    $(document).ready(function () {
        var oTable = $('#tb').dataTable({
            "bProcessing": true,
            "bServerSide": true,
            "responsive": true,
            "sAjaxSource": '<?php 
echo base_url(roleURIUser());
?>
/media/gallery/viewdata',
            "bJQueryUI": false,
            "dom": 'T<"clear">lfrtip<"clear spacer">',
            "tableTools": {
            "sSwfPath": "<?php 
echo locationPlugin('url');
?>
datatables/extensions/TableTools/swf/copy_csv_xls_pdf.swf"
            },            
        	"sPaginationType": "full_numbers",        
            "iDisplayStart ": 10,
            "aoColumns": [{
	             "mData": "judul"
	         }, {
	             "mData": "tanggal"
	         }, {
	             "mData": "keterangan"
	         }, {
	             "mData": "album"
	         }, {
	             "mData": "aksi"
Пример #5
0
            if(url!=''){
				$("#addFeature").hide();
			}
        }
    };
    div.innerHTML = '<iframe name="kcfinder_iframe" src="<?php 
echo locationPlugin("url") . "kcfinder";
?>
/browse.php?type=images&dir=assets/uploads/" ' +
        'frameborder="0" width="100%" height="100%" marginwidth="0" marginheight="0" scrolling="no" />';
    div.style.display = 'block';
}
</script>
<?php 
echo incCSS(locationPlugin() . 'bootstrapeditor/bootstrap3-wysihtml5.min');
echo incJS(locationPlugin() . 'bootstrapeditor/bootstrap3-wysihtml5.all.min');
foreach ($data as $row) {
}
$att = array('class' => 'form-horizontal');
echo form_open(base_url(roleURIUser() . 'media/album/editapply'), $att);
?>
<input type="hidden" name="albumid" value="<?php 
echo $row->album_id;
?>
"/>
<div class="col-sm-12" id="btnup">
	<button type="submit" class="btn btn-default btn-flat pull-right" id="submitbtn">Simpan</button>
</div>
<div id="kcfinder_div"></div>
<div class="form-group">
	<label class="col-sm-2 control-label">Nama Album</label>
Пример #6
0
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?php 
echo $judul;
?>
</title>    
    <link href="<?php 
echo locationPlugin();
?>
bootstrap/css/bootstrap.min.css" rel="stylesheet">    
    <link href="<?php 
echo locationAsset();
?>
css/style.css" rel="stylesheet">
    <link rel="shortcut icon" href="<?php 
echo mc_favicon();
?>
" type="image/x-icon" />
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
    	@media (min-width:768px){
			.navbar-brand{
				display: none;
			}
Пример #7
0
<?php

echo incCSS(locationPlugin() . 'jqueryui/jquery-ui.min');
echo incJS(locationPlugin() . 'jqueryui/jquery-ui.min');
echo incJS(locationAsset('url') . 'js/nestedmenu');
echo incCSS(locationAsset() . 'css/nestedmenu');
?>
<script>
$(document).ready(function(){
    var ns = $('ol.sortable').nestedSortable({
		forcePlaceholderSize: true,
		handle: 'div',
		helper:	'clone',
		items: 'li',
		opacity: .6,
		placeholder: 'placeholder',
		revert: 250,
		tabSize: 25,
		tolerance: 'pointer',
		toleranceElement: '> div',
		maxLevels: 3,
		isTree: true,
		expandOnHover: 700,
		startCollapsed: false,
		update: function(){			
			serialized = $('ol.sortable').nestedSortable('serialize');
			$.ajax({
				type:"post",
				dataType:"json",
				url:'<?php 
echo site_url(roleURIUser());
Пример #8
0
if($(".textarea-editor").length){
	$(".textarea-editor").wysihtml5();
}

$(".select2").select2({
	placeholder: "Ketik nama Album"
});
});
</script>
<?php 
echo incCSS(locationPlugin() . 'bootstrapeditor/bootstrap3-wysihtml5.min');
echo incCSS(locationPlugin() . 'select2/select2');
echo incCSS(locationPlugin() . 'select2/select2-bootstrap');
echo incJS(locationPlugin() . 'bootstrapeditor/bootstrap3-wysihtml5.all.min');
echo incJS(locationPlugin() . 'select2/select2.min');
echo incJS(locationPlugin() . 'select2/select2_locale_id');
$att = array('class' => 'form-horizontal');
echo form_open(base_url(roleURIUser() . 'media/gallery/addapply'), $att);
?>
<div class="col-sm-12" id="btnup">
	<button type="submit" class="btn btn-default btn-flat pull-right" id="submitbtn">Simpan</button>
</div>
<div id="kcfinder_div"></div>
<div class="form-group">
	<label class="col-sm-2 control-label">Nama Galeri</label>
	<div class="col-md-6">
		<input type="text" name="nama" class="form-control" required="" value="<?php 
echo set_value('nama');
?>
"/>
	</div>